:root {
    --bg: #f4f7f4;
    --surface: #ffffff;
    --ink: #1d2a21;
    --ink-soft: #5d6b61;
    --ink-faint: #8a958d;
    --line: #e6ece6;
    --green: #2f7d52;
    --green-soft: #e8f2ec;
    --amber: #b7791f;
    --amber-soft: #fdf3e2;
    --red: #c0453c;
    --red-soft: #fdeceb;
    --blue: #2b6cb0;
    --blue-soft: #eaf2fa;
    --radius: 18px;
    --shadow: 0 6px 20px rgba(31, 58, 41, 0.06);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* 作者样式的 display 会盖掉 hidden 属性的默认 display:none，这里显式兜住 */
[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
}

/* 兜底：单列移动端不该出现整页左右滑。用 clip 而不是 hidden——
   hidden 会让 html 变成滚动容器，把页头和弹层的 sticky 弄坏。 */
@supports (overflow-x: clip) {
    html {
        overflow-x: clip;
    }

    /* 弹层正文只竖着滚。它本来就是 overflow-y:auto，
       横向会被顺带算成 auto，一行超宽控件就能让整个表单左右滑。 */
    .sheet__body {
        overflow-x: clip;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: 16px;
    color: var(--ink);
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- 启动 / 登录 ---------- */

.boot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 100vh;
    color: var(--ink-faint);
    font-size: 14px;
}

.spinner {
    width: 26px;
    height: 26px;
    border: 2px solid var(--line);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 登录层现在是盖在界面上的浮层：未登录也能先浏览示例数据，所以不能再整屏独占、
   更不能把 app 藏起来。margin:auto 让内容少时居中、内容多时从顶部滚动。 */
.gate {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    flex-direction: column;
    padding: 28px 22px calc(32px + var(--safe-bottom));
    background: var(--bg);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gate__card {
    width: 100%;
    max-width: 340px;
    margin: auto;
    text-align: center;
}

.gate__tabs {
    display: flex;
    gap: 4px;
    margin: 20px 0 20px;
    padding: 4px;
    border-radius: 12px;
    background: #e9efe9;
}

.gate__tab {
    flex: 1;
    min-height: 38px;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-soft);
    font-size: 14px;
}

.gate__tab.is-active {
    background: var(--surface);
    color: var(--ink);
    font-weight: 500;
    box-shadow: 0 1px 5px rgba(31, 58, 41, 0.1);
}

.gate .field {
    margin-bottom: 14px;
    text-align: left;
}

.gate .btn--primary {
    margin-top: 18px;
}

.gate .btn--ghost,
.gate .btn--text {
    margin-top: 10px;
}

.gate__emoji {
    font-size: 56px;
    line-height: 1;
}

.gate__title {
    margin: 18px 0 0;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 1px;
}

.gate__desc {
    margin: 12px 0 30px;
    max-width: 320px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 340px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 500;
    transition: opacity 0.15s ease, transform 0.1s ease;
}

.btn:active {
    transform: scale(0.985);
}

.btn[disabled] {
    opacity: 0.55;
    pointer-events: none;
}

.btn--primary {
    background: var(--green);
    color: #fff;
    box-shadow: 0 6px 16px rgba(47, 125, 82, 0.24);
}

.btn--ghost {
    margin-top: 12px;
    background: var(--surface);
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.btn--danger {
    background: var(--red-soft);
    color: var(--red);
}

.btn--wide {
    max-width: none;
}

.gate__error {
    margin: 18px 0 0;
    max-width: 340px;
    color: var(--red);
    font-size: 13px;
    line-height: 1.7;
    text-align: left;
}

/* ---------- 布局 ---------- */

.app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 560px;
    margin: 0 auto;
    background: var(--bg);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 18px 18px 12px;
    background: linear-gradient(180deg, var(--bg) 78%, rgba(244, 247, 244, 0.86));
    backdrop-filter: blur(8px);
}

.topbar__row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.topbar__main {
    flex: 1;
    min-width: 0;
}

.topbar__title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.topbar__sub {
    margin: 4px 0 0;
    color: var(--ink-faint);
    font-size: 13px;
}

.topbar__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 18px;
}

.icon-btn--accent {
    background: var(--green);
    color: #fff;
    box-shadow: 0 6px 16px rgba(47, 125, 82, 0.26);
}

.view {
    flex: 1;
    padding: 4px 18px calc(96px + var(--safe-bottom));
}

/* ---------- 分段控件 ---------- */

.segment {
    display: flex;
    gap: 4px;
    margin-top: 14px;
    padding: 4px;
    border-radius: 14px;
    background: #e9efe9;
}

.segment__item {
    flex: 1;
    min-height: 36px;
    border-radius: 11px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
}

.segment__item.is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(31, 58, 41, 0.08);
}

/* ---------- 搜索 / 分类 ---------- */

.search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 0 14px;
    height: 44px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search__icon {
    font-size: 14px;
    opacity: 0.6;
}

.search__input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
}

.search__input::placeholder {
    color: #adb6af;
}

.search__clear {
    padding: 6px;
    color: var(--ink-faint);
    font-size: 14px;
}

.chips {
    display: flex;
    gap: 8px;
    margin: 14px -18px 0;
    padding: 0 18px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

.chips::-webkit-scrollbar {
    display: none;
}

/* 表单里的选项多（渠道 7 个），横滑容易漏看，直接换行铺开 */
.chips--wrap {
    flex-wrap: wrap;
    row-gap: 8px;
    overflow-x: visible;
}

/* 日记页第二行：按植物筛。比动作行轻一档，免得两组筛选抢视觉 */
.chips--plants .chip {
    padding: 6px 12px;
    font-size: 12.5px;
}

.chip {
    flex: none;
    padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 13.5px;
    white-space: nowrap;
}

.chip.is-active {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
    font-weight: 500;
}

/* ---------- 植物卡片 ---------- */

.section-label {
    margin: 22px 0 10px 2px;
    color: var(--ink-faint);
    font-size: 12.5px;
    letter-spacing: 1px;
}

.plant-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.plant-card {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.12s ease;
}

.plant-card:active {
    transform: scale(0.99);
}

.plant-card__thumb {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: var(--green-soft);
    font-size: 28px;
    overflow: hidden;
}

.plant-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plant-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.plant-card__name {
    margin: 0;
    font-size: 16.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plant-card__meta {
    color: var(--ink-faint);
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status {
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.status--overdue {
    background: var(--red-soft);
    color: var(--red);
}

.status--today {
    background: var(--amber-soft);
    color: var(--amber);
}

.status--soon {
    background: var(--blue-soft);
    color: var(--blue);
}

.status--later,
.status--idle {
    background: #f1f4f1;
    color: var(--ink-faint);
}

/* 卡片上的第二枚标签：只有真的开花/结果才出现，所以固定给一点颜色，一眼可见 */
.plant-card__badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pill {
    padding: 2px 9px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 状态标签按语义上色：长叶=绿、花=粉、果/收=琥珀、掉叶休眠=灰、出状态=蓝。
   分类各有各的状态 key，颜色按语义归组，加新状态不用再补一条规则。 */
.pill--grow,
.pill--newleaf,
.pill--seedling,
.pill--bud {
    background: var(--green-soft);
    color: var(--green);
}

.pill--bloom {
    background: #fdeef3;
    color: #b23a63;
}

.pill--fruit,
.pill--ripe,
.pill--harvest {
    background: var(--amber-soft);
    color: var(--amber);
}

.pill--colored {
    background: #eaf2fb;
    color: #2b6cb0;
}

.pill--faded,
.pill--dormant,
.pill--yellow,
.pill--bolting,
.pill--etiolated {
    background: #f2f1ee;
    color: var(--ink-faint);
}

/* ---------- 待办 ---------- */

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.task__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--green-soft);
    font-size: 19px;
}

.task__body {
    flex: 1;
    min-width: 0;
}

.task__title {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task__sub {
    margin: 3px 0 0;
    color: var(--ink-faint);
    font-size: 12.5px;
}

.task__done {
    flex: none;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 11px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 13.5px;
    font-weight: 500;
}

.task__done:active {
    background: #d8e9df;
}

/* ---------- 空态 / 错误 ---------- */

.empty {
    margin-top: 40px;
    padding: 32px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow);
}

.empty__icon {
    font-size: 34px;
}

.empty__title {
    margin: 14px 0 6px;
    font-size: 16px;
    font-weight: 600;
}

.empty__desc {
    margin: 0 0 20px;
    color: var(--ink-faint);
    font-size: 13.5px;
    line-height: 1.7;
}

.empty__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.link-btn {
    padding: 8px;
    color: var(--green);
    font-size: 13.5px;
}

/* ---------- 详情 ---------- */

.detail__hero {
    position: relative;
    margin: 0 -18px;
    height: 200px;
    background: var(--green-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    overflow: hidden;
}

.detail__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar__leading {
    flex: 0 0 auto;
    margin-top: -2px;
}

.detail__head {
    margin-top: 16px;
}

.detail__name {
    margin: 0;
    font-size: 23px;
    font-weight: 600;
}

.detail__sub {
    margin: 6px 0 0;
    color: var(--ink-faint);
    font-size: 13.5px;
}

.quick-row {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

/* 快捷按钮现在是「点了就落记录」，得把规则说在前面，别让人以为又开了表单 */
.quick-hint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    padding: 0 2px;
    color: var(--ink-faint);
    font-size: 12px;
}

.quick-hint .link-btn {
    padding: 6px 2px;
    font-size: 12.5px;
}

.quick {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 0;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    font-size: 13px;
    color: var(--ink-soft);
}

.quick__icon {
    font-size: 20px;
}

.care-status {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 18px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.care-status__row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
}

.care-status__emoji {
    font-size: 17px;
}

.care-status__label {
    flex: 1;
    font-size: 14.5px;
}

.care-status__value {
    font-size: 13px;
    color: var(--ink-faint);
    text-align: right;
}

.care-status__value.is-overdue {
    color: var(--red);
    font-weight: 500;
}

.care-status__value.is-today {
    color: var(--amber);
    font-weight: 500;
}

/* ---------- 当前状态 ---------- */

.state {
    margin-top: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.state__top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
}

.state__pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 10px;
    background: #f1f4f1;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.state__pill--grow,
.state__pill--newleaf,
.state__pill--seedling,
.state__pill--bud {
    background: var(--green-soft);
    color: var(--green);
}

.state__pill--bloom {
    background: #fdeef3;
    color: #b23a63;
}

.state__pill--fruit,
.state__pill--ripe,
.state__pill--harvest {
    background: var(--amber-soft);
    color: var(--amber);
}

.state__pill--colored {
    background: #eaf2fb;
    color: #2b6cb0;
}

.state__pill--faded,
.state__pill--dormant,
.state__pill--yellow,
.state__pill--bolting,
.state__pill--etiolated {
    background: #f2f1ee;
    color: var(--ink-faint);
}

.state__time {
    flex: 1;
    min-width: 0;
    color: var(--ink-faint);
    font-size: 12px;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.state__edit {
    flex: none;
    padding: 4px 2px;
    font-size: 13px;
}

.state__photo {
    margin: 0 14px 14px;
    height: 160px;
    border-radius: 14px;
    background: var(--green-soft);
    overflow: hidden;
}

.state__photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- 时间线 ---------- */

.timeline {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.timeline__item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 0 0 18px 22px;
}

.timeline__item::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 16px;
    bottom: -4px;
    width: 1px;
    background: var(--line);
}

.timeline__item:last-child::before {
    display: none;
}

.timeline__dot {
    position: absolute;
    left: 0;
    top: 6px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--bg);
}

.timeline__body {
    flex: 1;
    min-width: 0;
}

.timeline__top {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.timeline__title {
    font-size: 14.5px;
    font-weight: 500;
}

.timeline__time {
    color: var(--ink-faint);
    font-size: 12px;
}

/* 「花多多2号 · 5g」：轻底色小标签，和自由备注区分开 */
.timeline__meta {
    display: inline-block;
    margin: 4px 0 0;
    padding: 2px 8px;
    border-radius: 7px;
    background: #f2f5f1;
    color: var(--ink-soft);
    font-size: 12.5px;
    word-break: break-word;
}

.timeline__note {
    margin: 3px 0 0;
    color: var(--ink-soft);
    font-size: 13px;
    word-break: break-word;
}

.timeline__more {
    flex: none;
    padding: 4px 6px;
    color: var(--ink-faint);
    font-size: 15px;
}

/* ---------- 表单 ---------- */

.form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 4px 18px calc(24px + var(--safe-bottom));
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field__label {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
}

.field__hint {
    color: var(--ink-faint);
    font-size: 12px;
}

.input,
.textarea {
    width: 100%;
    /* 只给 100% 不够：flex/grid 子项的 min-width 默认是 auto，
       内容（尤其原生日历控件）比容器宽时会把整行顶出去 */
    min-width: 0;
    max-width: 100%;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    outline: none;
    transition: border-color 0.15s ease;
}

.input:focus,
.textarea:focus {
    border-color: var(--green);
}

.textarea {
    min-height: 88px;
    resize: vertical;
}

/* 金额用数字键盘，但别让桌面端长出上下小箭头，跟其它输入框不一致 */
.input[type="number"] {
    -moz-appearance: textfield;
}

.input[type="number"]::-webkit-outer-spin-button,
.input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 原生 <input type="date|time"> 自带固有宽度，只写 width:100% 压不住它，
   会把表单撑出一截，整页就能左右滑。显式允许收缩后它才按容器宽度排版。
   ⚠️ 千万别给 date/time 加 appearance: none — iOS 上去掉原生外观后
   点击不再弹日期选择器（点了像卡死），并且会丢掉原生宽度约束，
   日期文本反过来把框撑得更宽。宽度靠下面这组收缩规则解决。 */
.input[type="date"],
.input[type="time"],
.input[type="datetime-local"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    /* 原生控件默认不吃全局的 input 字号。这里别用 font: inherit 简写，
       它会把字号拉回 body 的 15px —— iOS 上小于 16px 的输入框聚焦会整页放大 */
    font-family: inherit;
    font-size: 16px;
    line-height: normal;
    text-align: left;
    /* 某版内核若仍给固有宽度，这层兜住，别顶出卡片 */
    overflow: hidden;
}

/* 内部编辑区也要能收缩，否则日期文本会把控件自己撑宽 */
.input[type="date"]::-webkit-datetime-edit,
.input[type="time"]::-webkit-datetime-edit,
.input[type="datetime-local"]::-webkit-datetime-edit {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    line-height: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.input[type="date"]::-webkit-date-and-time-value,
.input[type="time"]::-webkit-date-and-time-value {
    text-align: left;
    margin: 0;
    min-width: 0;
}

/* 日历/时钟图标固定在右侧，不抢文字区宽度 */
.input[type="date"]::-webkit-calendar-picker-indicator,
.input[type="time"]::-webkit-calendar-picker-indicator {
    flex: none;
    margin-left: auto;
    opacity: 0.55;
}

.inline-group {
    display: flex;
    gap: 10px;
}

.inline-group > * {
    flex: 1;
    min-width: 0;
}

/* 四个动作 → 两行两列；三列会剩一个孤零零的打药卡挂在第二行 */
.interval-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.interval-card {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    text-align: left;
}

.interval-card__label {
    display: block;
    color: var(--ink-soft);
    font-size: 12.5px;
}

.interval-card__value {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 500;
}

.interval-card select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-top: 6px;
    padding: 4px 0;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    outline: none;
}

.photo-picker {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.photo-picker__preview {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 13px;
    background: var(--green-soft);
    font-size: 26px;
    overflow: hidden;
}

.photo-picker__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-picker__text {
    flex: 1;
    min-width: 0;
}

.photo-picker__title {
    font-size: 14px;
    font-weight: 500;
}

.photo-picker__hint {
    margin-top: 3px;
    color: var(--ink-faint);
    font-size: 12px;
}

.form__actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

/* ---------- 弹出层 ---------- */

.sheet {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    animation: slide-up 0.22s ease;
}

@keyframes slide-up {
    from {
        transform: translateY(14px);
        opacity: 0.6;
    }
}

.sheet__head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.sheet__title {
    margin: 0;
    font-size: 16.5px;
    font-weight: 600;
}

.sheet__close {
    padding: 6px 10px;
    color: var(--ink-soft);
    font-size: 14px;
}

.sheet__body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sheet--center {
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 32, 25, 0.42);
}

.dialog {
    width: 100%;
    max-width: 360px;
    padding: 22px;
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 18px 40px rgba(20, 32, 25, 0.24);
}

.dialog__title {
    margin: 0 0 8px;
    font-size: 16.5px;
    font-weight: 600;
}

.dialog__text {
    margin: 0 0 20px;
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.7;
}

.dialog__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---------- 底部标签栏 ---------- */

.tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    width: 100%;
    max-width: 560px;
    padding: 8px 12px calc(8px + var(--safe-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
}

.tab {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 0;
    color: var(--ink-faint);
    font-size: 11.5px;
}

.tab.is-active {
    color: var(--green);
    font-weight: 500;
}

.tab__icon {
    font-size: 18px;
    line-height: 1.2;
    filter: grayscale(0.55);
    opacity: 0.72;
}

.tab__label {
    font-size: 11.5px;
    line-height: 1.3;
}

.tab.is-active .tab__icon {
    filter: none;
    opacity: 1;
}

.tab__badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(22px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--red);
    color: #fff;
    font-size: 10.5px;
    line-height: 16px;
    text-align: center;
}

/* ---------- 轻提示 ---------- */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + var(--safe-bottom));
    transform: translateX(-50%);
    z-index: 80;
    max-width: 78vw;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(28, 40, 32, 0.92);
    color: #fff;
    font-size: 13.5px;
    text-align: center;
    animation: toast-in 0.2s ease;
}

/* 带「撤销」的提示：文字在左、按钮在右，按钮要够大好点 */
.toast__text {
    margin-right: 10px;
}

.toast__action {
    display: inline-block;
    vertical-align: middle;
    padding: 5px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, 8px);
    }
}

/* ---------- 我的 ---------- */

.profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 6px;
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--green-soft);
    font-size: 24px;
}

.profile__name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.profile__sub {
    margin: 3px 0 0;
    color: var(--ink-faint);
    font-size: 12.5px;
}

.stat-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.stat {
    flex: 1;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat__value {
    font-size: 22px;
    font-weight: 600;
}

.stat__label {
    margin-top: 2px;
    color: var(--ink-faint);
    font-size: 12px;
}

.menu {
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.menu__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 18px;
    font-size: 14.5px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.menu__item:last-child {
    border-bottom: none;
}

.menu__value {
    color: var(--ink-faint);
    font-size: 13px;
}

.footnote {
    margin: 22px 4px 0;
    color: #a6b0a9;
    font-size: 12px;
    line-height: 1.8;
    text-align: center;
}

/* ---------- 本地体验模式 ---------- */

.gate__demo {
    margin-top: 26px;
    padding-top: 20px;
    max-width: 340px;
    border-top: 1px dashed var(--line);
}

.gate__hint {
    margin: 0 0 12px;
    color: var(--ink-faint);
    font-size: 12px;
    line-height: 1.8;
    text-align: left;
}

.btn--text {
    width: auto;
    margin-top: 0;
    padding: 10px 18px;
    background: transparent;
    color: var(--green);
    border: 1px solid rgba(47, 125, 82, 0.28);
    font-size: 14px;
}

.btn--text:active {
    background: var(--green-soft);
}

.demo-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex: 0 0 auto;
    padding: 8px 16px;
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 12px;
    line-height: 1.5;
}

.demo-strip__text {
    flex: 1;
    min-width: 0;
}

.demo-strip__exit {
    flex: 0 0 auto;
    padding: 4px 12px;
    background: transparent;
    color: var(--amber);
    border: 1px solid rgba(183, 121, 31, 0.35);
    border-radius: 999px;
    font-size: 12px;
}

/* ---------- 养护日记：时间线 ---------- */

.section-label--flush {
    margin-top: 18px;
}

.tl-list {
    position: relative;
    padding-left: 22px;
}

/* 贯穿整条时间线的那根竖线，位置对齐圆点中心 */
.tl-list::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 26px;
    bottom: 18px;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
}

.tl-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin-bottom: 8px;
    padding: 11px 13px;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    font: inherit;
    color: inherit;
}

.tl-item:active {
    transform: scale(0.995);
}

/* 圆点在卡片外面，压在竖线上 */
.tl-item__dot {
    position: absolute;
    left: -21px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--bg);
}

.tl-item__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 15px;
}

.tl-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding-top: 1px;
}

.tl-item__title {
    color: var(--ink);
    font-size: 14.5px;
    line-height: 1.35;
}

.tl-item__time {
    margin-left: 6px;
    color: var(--ink-faint);
    font-size: 12.5px;
}

.tl-item__note {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

/* 购入是「档案事件」，视觉上比养护记录轻一档 */
.tl-item--purchase {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: none;
    border: 1px dashed var(--line);
}

.tl-item--purchase .tl-item__title {
    color: var(--ink-soft);
}

/* ---------- 账本 ---------- */

.ledger-sum {
    padding: 18px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.ledger-sum__label {
    margin: 0;
    color: var(--ink-faint);
    font-size: 12.5px;
    letter-spacing: 1px;
}

.ledger-sum__amount {
    margin: 6px 0 2px;
    color: var(--ink);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.ledger-sum__meta {
    margin: 0;
    color: var(--ink-faint);
    font-size: 12.5px;
}

/* 分类占比条：一段一段拼起来，宽度按百分比 */
.ledger-bar {
    display: flex;
    height: 8px;
    margin: 14px 0 10px;
    border-radius: 999px;
    overflow: hidden;
    background: var(--line);
}

.ledger-bar__part {
    display: block;
    height: 100%;
}

.ledger-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.ledger-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink-soft);
    font-size: 12.5px;
}

.ledger-legend__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.ledger-legend__pct {
    color: var(--ink-faint);
    font-size: 11.5px;
}

.expense-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.expense {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 13px;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    font: inherit;
    color: inherit;
}

.expense__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 15px;
}

.expense__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.expense__title {
    color: var(--ink);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.expense__sub {
    color: var(--ink-faint);
    font-size: 12px;
}

.expense__amount {
    flex: none;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* 派生自植物档案的那几笔不是真账目，颜色压暗一档 */
.expense__amount--soft {
    color: var(--ink-faint);
    font-weight: 500;
}

.input--money {
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}

.sheet__meta {
    margin: 0 0 14px;
    color: var(--ink-soft);
    font-size: 13px;
}

/* ---------- 后台管理 ---------- */

.admin-block {
    margin-top: 18px;
}

.admin-block__title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 10px 2px;
    font-size: 14px;
    font-weight: 600;
}

.admin-block__count {
    color: var(--ink-faint);
    font-size: 12px;
    font-weight: 400;
}

.admin-block__sum {
    margin-left: auto;
    color: var(--green);
    font-size: 13px;
    font-weight: 500;
}

.admin-note {
    margin: 10px 2px 0;
    color: var(--ink-faint);
    font-size: 12.5px;
    line-height: 1.6;
}

.admin-label {
    margin: 12px 2px 0;
    color: var(--ink-faint);
    font-size: 12px;
}

/* 后台的选项都换行铺开，横滑容易漏看后面的筛选项 */
.admin-block .chips {
    margin: 8px 0 0;
    padding: 0;
}

.admin-row {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.admin-row__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-row__tag {
    padding: 2px 8px;
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 500;
}

.admin-row__tag--plant {
    background: var(--green-soft);
    color: var(--green);
}

.admin-row__tag--record {
    background: var(--blue-soft);
    color: var(--blue);
}

.admin-row__tag--expense {
    background: var(--amber-soft);
    color: var(--amber);
}

.admin-row__user {
    color: var(--ink-faint);
    font-size: 12px;
}

.admin-row__date {
    margin-left: auto;
    color: var(--ink-faint);
    font-size: 12px;
}

.admin-row__title {
    margin: 7px 0 0;
    font-size: 14.5px;
    font-weight: 500;
}

.admin-row__summary {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.55;
}

.admin-row__amount {
    margin: 4px 0 0;
    color: var(--amber);
    font-size: 13.5px;
    font-weight: 500;
}

.admin-user {
    margin-bottom: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.admin-user__top {
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-user__name {
    font-size: 14.5px;
    font-weight: 500;
}

.admin-user__badge {
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
}

.admin-user__badge--demo {
    background: var(--blue-soft);
    color: var(--blue);
}

.admin-user__meta {
    margin: 5px 0 0;
    color: var(--ink-faint);
    font-size: 12px;
    line-height: 1.6;
}

.admin-banner {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 13px;
    line-height: 1.6;
}

/* 登录层里的说明文字：解释「为什么要登录」，不是报错 */
.gate__notice {
    margin: 16px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 12.5px;
    line-height: 1.6;
    text-align: left;
}

/* ---------- 首页：列表 / 大图切换 ---------- */

/* 和右侧「＋」同高，两个图标组成一个小开关 */
.view-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 40px;
    padding: 3px;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.view-switch__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: var(--ink-faint);
    font-size: 15px;
    line-height: 1;
}

.view-switch__item.is-active {
    background: var(--green-soft);
    color: var(--green);
}

/* ---------- 首页：大图模式（一行两张） ---------- */

.plant-grid {
    display: grid;
    /* minmax(0, 1fr) 不能省：默认的 auto 最小值会被内容顶宽，两列就挤出屏幕 */
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.plant-tile {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform 0.12s ease;
}

.plant-tile:active {
    transform: scale(0.98);
}

.plant-tile__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: var(--green-soft);
}

.plant-tile__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.plant-tile__emoji {
    font-size: 56px;
    line-height: 1;
}

/* 没照片时按分类给底色，一屏扫过去也能看出哪张是花、哪张是菜 */
.plant-tile__media--flower {
    background: #fdeef3;
}

.plant-tile__media--fruit {
    background: #fdf1e3;
}

.plant-tile__media--succulent {
    background: #e3f1ee;
}

.plant-tile__media--foliage {
    background: var(--green-soft);
}

.plant-tile__media--vegetable {
    background: #ecf3d9;
}

.plant-tile__media--other {
    background: #f1f4f1;
}

/* 压在图上，白底才看得清；状态颜色仍由 .pill--* 决定 */
.plant-tile__pill {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.92);
}

.plant-tile__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 9px 11px 11px;
}

.plant-tile__name {
    margin: 0;
    font-size: 14.5px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plant-tile__meta {
    margin: 0;
    color: var(--ink-faint);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plant-tile__status {
    align-self: flex-start;
    max-width: 100%;
    padding: 2px 8px;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- 后台：数据 / 养护手册 两个标签页 ---------- */

.admin-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    margin: 0 0 12px;
    background: var(--bg);
    border-radius: 12px;
}

.admin-tab {
    flex: 1;
    min-width: 0;
    padding: 9px 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink-soft);
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.admin-tab.is-active {
    background: var(--surface);
    color: var(--ink);
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(31, 58, 41, 0.08);
}

.hb-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.hb-toolbar .input {
    flex: 1;
    min-width: 0;
}

.btn.hb-new {
    flex: 0 0 auto;
    width: auto;
    padding: 0 16px;
}

.hb-group {
    margin: 12px 0 18px;
}

.hb-group__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 500;
}

.hb-group__count {
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
    font-weight: 400;
}

.hb-item {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 13px 14px;
    border: 0;
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.hb-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hb-item__name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 500;
}

.hb-item__diff {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
}

.hb-item__diff--4,
.hb-item__diff--5 {
    background: var(--amber-soft);
    color: var(--amber);
}

.hb-item__alias,
.hb-item__brief {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.5;
    word-break: break-word;
}

.hb-item__alias {
    color: var(--ink-faint);
}

.hb-item__brief {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn.hb-danger {
    color: var(--red);
    background: transparent;
    border-color: var(--red-soft);
}

.btn.hb-danger-solid {
    color: #fff;
    background: var(--red);
    border-color: transparent;
}

.confirm-text {
    margin: 0 0 16px;
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.6;
}

/* ---------------------------------------------------------------- 品种与养护指南 */

/* 表单里的品种候选：一行行 chip，和分类那排一样的视觉，但带小图标 */
.species-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 2px 18px 0;
    max-height: 168px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.species-chip {
    flex: 0 0 auto;
}

.species-empty {
    display: block;
    padding: 2px 18px;
    color: var(--ink-faint);
    font-size: 12.5px;
}

/* 选完品种后的即时预览：让人保存前就知道有没有指南 */
.species-guide {
    margin-top: 10px;
}

.species-guide__hint {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink-faint);
    font-size: 12.5px;
    line-height: 1.5;
}

.species-guide__hint--miss {
    background: var(--amber-soft);
    color: var(--amber);
}

.species-guide__card {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.species-guide__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.species-guide__icon {
    font-size: 22px;
    line-height: 1;
}

.species-guide__name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.species-guide__diff {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
}

.species-guide__row {
    margin: 0 0 4px;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.6;
}

.species-guide__row:last-child {
    margin-bottom: 0;
}

.species-guide__warn {
    margin: 8px 0 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 12px;
    line-height: 1.5;
}

/* 卡片上那一行指南摘要 */
.plant-card__guide,
.plant-tile__guide {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 11.5px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plant-card__guide--miss,
.plant-tile__guide--miss {
    color: var(--amber);
}

/* 详情页完整指南 */
.guide {
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.guide__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.guide__icon {
    font-size: 24px;
    line-height: 1;
}

.guide__name {
    color: var(--ink);
    font-size: 16px;
    font-weight: 600;
}

.guide__diff {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
}

.guide__row {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    border-top: 1px solid var(--line);
}

.guide__label {
    flex: 0 0 74px;
    color: var(--ink-faint);
    font-size: 12.5px;
    line-height: 1.6;
}

.guide__value {
    flex: 1;
    min-width: 0;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.65;
}

.guide__source {
    margin: 10px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--ink-faint);
    font-size: 11.5px;
    line-height: 1.5;
}

.guide--miss {
    background: var(--amber-soft);
    box-shadow: none;
}

.guide__miss {
    margin: 0;
    color: var(--amber);
    font-size: 13px;
    line-height: 1.6;
}

/* 后台「待补充品种」：唯一需要动手的地方，放最上面 */
.hb-pending {
    padding: 14px 16px;
    border: 1px solid var(--amber);
    background: var(--amber-soft);
    box-shadow: none;
}

.hb-pending__head {
    margin-bottom: 10px;
}

.hb-pending__title {
    display: block;
    color: var(--amber);
    font-size: 15px;
    font-weight: 600;
}

.hb-pending__sub {
    display: block;
    margin-top: 2px;
    color: var(--amber);
    font-size: 12px;
    opacity: 0.8;
}

.hb-pending__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(183, 121, 31, 0.22);
}

.hb-pending__info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.hb-pending__name {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hb-pending__count {
    flex: 0 0 auto;
    color: var(--amber);
    font-size: 11.5px;
}

/* .btn 默认是「整行大按钮」，这里要的是行尾的小按钮，三者都得覆盖 */
.hb-pending__btn {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid var(--amber);
    background: var(--surface);
    color: var(--amber);
    font-size: 13px;
}

/* ---------------------------------------------------------------- 药膳房 */

/* 我的药箱：横向滑动的小卡片，只放买过的药 */
.cabinet__strip {
    display: flex;
    gap: 10px;
    margin: 0 -18px 18px;
    padding: 2px 18px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cabinet__card {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 96px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
}

.cabinet__icon {
    font-size: 22px;
    line-height: 1.2;
}

.cabinet__name {
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
}

.cabinet__meta {
    color: var(--ink-faint);
    font-size: 11.5px;
}

/* 搜索与列表 */
.med-toolbar {
    margin: 0 0 10px;
}

.med-count {
    margin: 0 0 10px;
    color: var(--ink-faint);
    font-size: 12px;
}

.med-group {
    margin: 0 0 18px;
}

.med-group__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.med-group__count {
    padding: 0 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green);
    font-size: 11px;
    font-weight: 500;
    line-height: 18px;
}

.med-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    margin-bottom: 8px;
    text-align: left;
}

.med-item__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--bg);
    font-size: 18px;
    line-height: 34px;
    text-align: center;
}

.med-item__body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
    min-width: 0;
}

.med-item__head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.med-item__name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.med-item__alias {
    flex: 1;
    min-width: 0;
    color: var(--ink-faint);
    font-size: 11.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 防治对象是这一条最重要的信息，给两行，超出才截断 */
.med-item__target {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.5;
}

.med-empty {
    padding: 24px 0;
    color: var(--ink-faint);
    font-size: 13px;
    line-height: 1.6;
    text-align: center;
}

/* 详情页 */
.med-alias {
    margin: -4px 0 10px;
    color: var(--ink-faint);
    font-size: 12px;
    line-height: 1.5;
}

.med-mine {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.med-mine__title {
    margin: 0 0 6px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.med-mine__text {
    margin: 0 0 12px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.6;
}

.med-tip {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 12px;
    line-height: 1.6;
}
