:root {
    --ink: #14241c;
    --forest: #1b3328;
    --forest-2: #2a4a3a;
    --gold: #9c7b4a;
    --gold-2: #c6aa78;
    --cream: #f3eee4;
    --paper: #faf6ef;
    --card: #fffdf8;
    --line: rgba(27, 51, 40, 0.12);
    --muted: #7c7368;
    --text: #2a2622;
    --danger: #8d3d34;
    --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
    --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    min-height: 100vh;
    color: var(--text);
    font-family: var(--sans);
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(156, 123, 74, 0.28), transparent 55%),
        #101a15;
}
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }

#app {
    width: min(440px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 8%, rgba(156, 123, 74, 0.1), transparent 28%),
        var(--cream);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 30px 80px rgba(0, 0, 0, 0.35);
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
}

.boot, .fail {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--forest);
}
.boot p, .fail p { margin: 8px 0 0; font-family: var(--serif); font-size: 28px; letter-spacing: 0.18em; }
.boot span, .fail span { color: var(--muted); font-size: 13px; letter-spacing: 0.12em; }
.mark { width: 54px; height: 54px; }
.mark.lite { width: 28px; height: 28px; }

.brandbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px 10px;
}
.brandbar .en {
    font-size: 10px;
    letter-spacing: 0.34em;
    color: var(--gold);
}
.brandbar strong {
    font-family: var(--serif);
    font-weight: 500;
    letter-spacing: 0.32em;
    font-size: 22px;
    padding-left: 0.32em;
}

.hero {
    position: relative;
    margin: 8px 16px 0;
    height: 430px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--forest);
}
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 26, 21, 0.05) 20%, rgba(16, 26, 21, 0.78) 100%);
}
.vtext {
    position: absolute;
    top: 18px;
    right: 14px;
    margin: 0;
    writing-mode: vertical-rl;
    letter-spacing: 0.35em;
    color: #f6f0e4;
    font-family: var(--serif);
    font-size: 13px;
}
.hero-copy {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 22px;
    color: #f7f2e8;
}
.hero-copy em {
    font-style: normal;
    letter-spacing: 0.42em;
    font-size: 12px;
    color: var(--gold-2);
}
.hero-copy h1 {
    margin: 8px 0 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 32px;
    letter-spacing: 0.08em;
    line-height: 1.35;
}

.notice {
    margin: 14px 16px 0;
    padding: 12px 14px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--forest);
    font-size: 13px;
    line-height: 1.7;
}

.section { padding: 22px 16px 4px; }
.sec-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.sec-head h2, .story h2, .subbar h1 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 22px;
    letter-spacing: 0.12em;
}
.sec-head button, .text-btn {
    border: 0;
    background: none;
    color: var(--gold);
    letter-spacing: 0.14em;
    font-size: 12px;
    padding: 0;
}

.rail {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
    margin-right: -16px;
    padding-right: 16px;
}
.rail::-webkit-scrollbar { display: none; }
.rcard {
    flex: 0 0 210px;
    scroll-snap-align: start;
    background: var(--card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    text-align: left;
    padding: 0;
    color: inherit;
}
.rcard .pic, .mrow .pic, .sheet .pic {
    position: relative;
    background: #d9d0c3;
}
.rcard .pic { height: 148px; }
.rcard img, .mrow img, .sheet img { width: 100%; height: 100%; object-fit: cover; }
.rcard .body, .mrow .meta { padding: 12px 12px 14px; }
.rcard h3, .mrow h3, .sheet h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.price { color: var(--forest); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.rcard .price { display: block; margin-top: 6px; font-size: 14px; }
.tag, .sold {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 7px;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: #f6f1e6;
    background: rgba(27, 51, 40, 0.82);
}
.sold { left: auto; right: 10px; background: rgba(80, 40, 32, 0.82); }

.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat {
    text-align: left;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 14px 14px;
    color: inherit;
}
.cat small { color: var(--gold); letter-spacing: 0.18em; font-size: 10px; }
.cat strong { display: block; margin-top: 8px; font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: 0.08em; }
.cat em { display: block; margin-top: 6px; font-style: normal; color: var(--muted); font-size: 12px; }

.story {
    margin: 22px 16px 12px;
    padding: 20px 18px 16px;
    background: var(--forest);
    color: #f4eee4;
    border-radius: 18px;
}
.story h2 { color: #f4eee4; }
.story p { margin: 12px 0 0; font-size: 14px; line-height: 1.85; color: rgba(244, 238, 228, 0.88); }
.story ul { list-style: none; margin: 14px 0 0; padding: 0; }
.story li { font-size: 13px; line-height: 1.7; color: var(--gold-2); }
.story a { color: rgba(244, 238, 228, 0.55); font-size: 12px; letter-spacing: 0.12em; text-decoration: none; }

.subbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    background: rgba(243, 238, 228, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.subbar h1 { font-size: 18px; }

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 16px;
    position: sticky;
    top: 56px;
    z-index: 4;
    background: rgba(243, 238, 228, 0.94);
}
.chips::-webkit-scrollbar { display: none; }
.chips button, .seg button {
    border: 1px solid var(--line);
    background: transparent;
    color: var(--forest);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    white-space: nowrap;
}
.chips button.on, .seg button.on {
    background: var(--forest);
    color: #f6f1e6;
    border-color: var(--forest);
}

.menu-list { padding: 0 16px 12px; }
.order-card .danger, .order-card .primary { width: 100%; margin: 12px 0 0; }
.mrow {
    width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    text-align: left;
    color: inherit;
}
.mrow .pic { height: 92px; border-radius: 12px; overflow: hidden; }
.mrow .meta { padding: 0; display: flex; flex-direction: column; }
.mrow p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mrow .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; }
.add, .stepper button, .primary, .ghost, .danger {
    border: 0;
    border-radius: 999px;
}
.add, .stepper button {
    width: 30px;
    height: 30px;
    background: var(--forest);
    color: #f6f1e6;
    font-size: 18px;
    line-height: 30px;
    padding: 0;
}
.add:disabled, .primary:disabled { opacity: 0.45; }

.cart-list, .panel, .order-card { margin: 12px 16px; }
.cline {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}
.cline img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: #d9d0c3; }
.cline h3 { font-size: 15px; }
.cline .price { font-size: 13px; margin-top: 4px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper b { min-width: 16px; text-align: center; font-weight: 500; }
.stepper button { width: 26px; height: 26px; line-height: 26px; font-size: 16px; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 8px 14px 14px;
}
.field { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field span { font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }
.field input, .field select, .field textarea {
    border: 0;
    background: transparent;
    font-size: 16px;
    color: var(--text);
    outline: none;
    padding: 0;
    width: 100%;
}
.field textarea { min-height: 64px; resize: vertical; }
.seg { display: flex; gap: 8px; }
.total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 8px 16px 0;
    font-family: var(--serif);
}
.total b { font-size: 28px; font-weight: 500; }
.primary, .ghost, .danger {
    display: block;
    width: calc(100% - 32px);
    margin: 14px 16px;
    height: 48px;
    letter-spacing: 0.2em;
    font-size: 15px;
}
.primary { background: var(--forest); color: #f6f1e6; }
.ghost { background: transparent; color: var(--forest); border: 1px solid var(--forest); }
.danger { background: transparent; color: var(--danger); border: 1px solid rgba(141, 61, 52, 0.35); }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty h3 { font-family: var(--serif); color: var(--forest); font-weight: 500; letter-spacing: 0.12em; }

.order-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}
.order-card + .order-card { margin-top: 10px; }
.oh { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.oh b { font-size: 13px; letter-spacing: 0.04em; }
.badge { font-size: 12px; color: var(--gold); letter-spacing: 0.08em; }
.steps { display: flex; align-items: center; margin: 12px 0; color: #b7aea3; font-size: 10px; letter-spacing: 0.04em; }
.steps span.on { color: var(--forest); font-weight: 650; }
.steps i { flex: 1; height: 1px; background: #e3dacd; margin: 0 4px; }
.mini { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; color: var(--muted); }
.mini b { color: var(--text); font-weight: 500; }
.done-no {
    margin: 28px 16px 0;
    text-align: center;
}
.done-no small { letter-spacing: 0.28em; color: var(--gold); }
.done-no strong { display: block; margin-top: 8px; font-family: var(--serif); font-size: 22px; letter-spacing: 0.06em; font-weight: 500; }

.mask {
    position: fixed;
    inset: 0;
    background: rgba(16, 26, 21, 0.46);
    z-index: 20;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sheet {
    width: min(440px, 100%);
    background: var(--paper);
    border-radius: 22px 22px 0 0;
    max-height: 92vh;
    overflow: auto;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.sheet .pic { height: 260px; }
.sheet .body { padding: 16px 18px 0; }
.sheet .desc { color: var(--muted); line-height: 1.75; font-size: 14px; }
.sheet .row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }

.tabbar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(440px, 100%);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(250, 246, 239, 0.96);
    border-top: 1px solid var(--line);
    padding: 6px 6px calc(8px + env(safe-area-inset-bottom));
    z-index: 15;
    backdrop-filter: blur(12px);
}
.tabbar button {
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.12em;
    padding: 8px 0 4px;
    position: relative;
}
.tabbar button.on { color: var(--forest); }
.tabbar i {
    position: absolute;
    top: 2px;
    margin-left: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 99px;
    background: var(--gold);
    color: #fff;
    font-style: normal;
    font-size: 10px;
    line-height: 16px;
    padding: 0 4px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    transform: translateX(-50%);
    background: rgba(20, 36, 28, 0.92);
    color: #f6f1e6;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    letter-spacing: 0.06em;
    z-index: 40;
    max-width: 80%;
}

@media (max-width: 440px) {
    .hero { height: 78vw; min-height: 320px; margin-left: 0; margin-right: 0; border-radius: 0; }
}
