/* ============================================================
   恋爱空间 — shared tokens & app shell
   Pages: index.html (redesigned), use.html / admin.html (legacy
   pages read the tokens and the shared icon rules below)
   ============================================================ */

@font-face {
    font-family: 'Ma Shan Zheng';
    src: url('../assets/fonts/mashanzheng-subset.woff2?v=20261029-04') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Noto Serif SC';
    src: url('../assets/fonts/notoserifsc-bold-subset.woff2?v=20261029-04') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #fbf6ec;
    --paper-soft: #fffdf8;
    --ink: #2b2231;
    --ink-2: #453a4b;
    --muted: #72656f;
    --stamp: #df5f7e;
    --stamp-deep: #c44766;
    --route: #2f9b98;
    --petal: #ffd9e2;
    --mint: #ddf1e8;
    --lemon: #f6d478;
    --line: rgba(43, 34, 49, 0.1);
    --line-strong: rgba(43, 34, 49, 0.2);
    --shadow: 0 30px 70px -34px rgba(77, 48, 61, 0.5);
    --shadow-soft: 0 18px 40px -26px rgba(77, 48, 61, 0.42);
    --radius: 18px;
    --radius-s: 12px;
    --radius-l: 26px;
    --font-cute: 'Ma Shan Zheng', 'Noto Serif SC', 'Songti SC', 'STSong', serif;
    --font-display: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
    --font-soft: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', sans-serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', sans-serif;
    --font-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans', 'Microsoft YaHei', sans-serif;
    --header-h: 56px;
    --tab-h: 60px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --page-x: 20px;
    --max-w: 1120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

html.is-locked {
    overflow: hidden;
    height: 100%;
}

body {
    min-height: 100vh;
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.65;
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* paper grain + soft colour washes, behind every page */
body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

body::before {
    background: url('../assets/texture-noise.png?v=20261029-04') repeat;
    opacity: 0.06;
    mix-blend-mode: multiply;
}

body::after {
    background:
        radial-gradient(900px 520px at 8% -6%, rgba(255, 217, 226, 0.7), transparent 65%),
        radial-gradient(820px 480px at 102% 12%, rgba(221, 241, 232, 0.66), transparent 62%),
        radial-gradient(700px 420px at 50% 108%, rgba(246, 212, 120, 0.24), transparent 60%);
}

button,
a,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: 0;
    cursor: pointer;
    touch-action: manipulation;
}

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

img {
    max-width: 100%;
    display: block;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 3px;
}

::selection {
    background: var(--petal);
    color: var(--ink);
}

/* ---------- app header ---------- */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    height: calc(var(--header-h) + var(--safe-top));
    padding: var(--safe-top) max(var(--page-x), calc((100vw - var(--max-w)) / 2 + var(--page-x))) 0;
    background: transparent;
    transition: background 0.28s ease, box-shadow 0.28s ease;
}

.app-header.is-scrolled {
    background: rgba(251, 246, 236, 0.82);
    -webkit-backdrop-filter: saturate(1.25) blur(16px);
    backdrop-filter: saturate(1.25) blur(16px);
    box-shadow: 0 1px 0 var(--line);
}

.brand {
    display: grid;
    gap: 0;
    margin-right: auto;
    line-height: 1.1;
}

.brand-title {
    font-family: var(--font-cute);
    font-size: 1.18rem;
    letter-spacing: 0.02em;
}

.brand-sub {
    font-family: var(--font-ui);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--muted);
}

.top-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

.top-nav-item {
    position: relative;
    min-height: 40px;
    padding: 0 18px;
    color: var(--muted);
    font-size: 0.92rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.top-nav-item:hover {
    color: var(--ink);
    background: rgba(43, 34, 49, 0.05);
}

.top-nav-item.is-active {
    color: var(--ink);
    font-weight: 600;
}

.top-nav-item.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 2px;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--stamp);
    transform: translateX(-50%);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    color: var(--ink);
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
    background: rgba(43, 34, 49, 0.06);
}

.icon-btn:active {
    transform: scale(0.94);
}

.icon-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-btn[hidden] {
    display: none;
}

.refresh-btn.is-loading svg {
    animation: spin 0.9s linear infinite;
}

/* music equaliser button */
.music-btn {
    background: var(--ink);
    color: var(--paper-soft);
}

.music-btn:hover {
    background: var(--ink-2);
}

.music-btn.is-playing {
    background: var(--stamp);
}

.music-btn .music-note {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.music-btn .eq {
    display: none;
}

.music-btn.is-playing .music-note {
    display: none;
}

.music-btn.is-playing .eq {
    display: flex;
}

.eq {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}

.eq i {
    display: block;
    width: 3px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.66;
    transition: height 0.2s ease;
}

.music-btn.is-playing .eq i {
    opacity: 1;
    animation: eq 0.9s ease-in-out infinite;
}

.music-btn.is-playing .eq i:nth-child(2) {
    animation-delay: 0.22s;
}

.music-btn.is-playing .eq i:nth-child(3) {
    animation-delay: 0.44s;
}

/* ---------- page frame ---------- */

.app-main {
    padding: calc(var(--header-h) + var(--safe-top) + 14px) var(--page-x)
        calc(var(--tab-h) + var(--safe-bottom) + 34px);
}

.page {
    display: none;
}

.page.is-active {
    display: block;
    animation: pageIn 0.42s cubic-bezier(0.22, 0.7, 0.28, 1) both;
}

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 6px max(var(--page-x), calc((100vw - var(--max-w)) / 2))
        calc(6px + var(--safe-bottom));
    background: rgba(251, 246, 236, 0.9);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    border-top: 1px solid var(--line);
}

.tab {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 2px;
    min-height: 48px;
    color: var(--muted);
    border-radius: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.tab:active {
    background: rgba(43, 34, 49, 0.05);
}

.tab-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
}

.tab-icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tab-label {
    font-family: var(--font-ui);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
}

.tab.is-active {
    color: var(--stamp);
}

.tab.is-active .tab-icon::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -5px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--stamp);
}

/* ---------- shared type ---------- */

.eyebrow {
    font-family: var(--font-ui);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.section {
    padding: 40px 0 6px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.section-index {
    display: block;
    margin-bottom: 2px;
    font-family: var(--font-ui);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--stamp);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 6.6vw, 2.15rem);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: 0.02em;
}

.section-note {
    max-width: 34em;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.section-more {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 40px;
    padding: 0 15px;
    color: var(--ink);
    font-size: 0.8rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
}

.section-more span {
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--stamp);
}

.section-badge {
    flex: 0 0 auto;
    padding: 5px 11px;
    color: var(--route);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(47, 155, 152, 0.1);
    border-radius: 999px;
}

/* ---------- hero ---------- */

.hero {
    padding: 16px 0 4px;
}

.hero-title {
    margin: 12px 0 0;
    font-family: var(--font-cute);
    font-size: clamp(3.5rem, 17.5vw, 5.4rem);
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-wrap: balance;
}

.hero-title::after {
    content: '';
    display: block;
    width: min(64%, 320px);
    height: 12px;
    margin-top: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='12' viewBox='0 0 320 12' fill='none'%3E%3Cpath d='M3 8.6C52 3.7 118 2.6 176 5.3c46 2.1 87 4 138 1.2' stroke='%23df5f7e' stroke-width='3.2' stroke-linecap='round' opacity='.62'/%3E%3C/svg%3E") no-repeat left center / contain;
}

.hero-copy {
    max-width: 26em;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.75;
}

/* timer — the dark ticket that anchors the page */
.timer-card {
    position: relative;
    margin-top: 26px;
    padding: 20px 22px 16px;
    overflow: hidden;
    color: var(--paper-soft);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(223, 95, 126, 0.34), transparent 56%),
        linear-gradient(148deg, #372a3c 0%, #241b2a 72%);
    border-radius: var(--radius-l);
    box-shadow: 0 28px 60px -30px rgba(43, 34, 49, 0.75);
}

.timer-card::before {
    content: '∞';
    position: absolute;
    top: -34px;
    right: 6px;
    font-family: var(--font-display);
    font-size: 9.5rem;
    line-height: 1;
    color: rgba(255, 253, 248, 0.06);
    pointer-events: none;
}

.timer-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url('../assets/texture-noise.png?v=20261029-04') repeat;
    opacity: 0.1;
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.timer-head,
.timer-main,
.timer-sub {
    position: relative;
    z-index: 1;
}

.timer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.timer-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: rgba(255, 253, 248, 0.72);
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--stamp);
    box-shadow: 0 0 0 0 rgba(223, 95, 126, 0.7);
    animation: pulse 2.2s ease-out infinite;
}

.timer-since {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    color: rgba(255, 253, 248, 0.5);
}

.timer-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 6px;
}

.timer-days {
    font-family: var(--font-display);
    font-size: clamp(3.4rem, 17vw, 4.8rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

.timer-days-unit {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: rgba(255, 253, 248, 0.7);
}

.timer-sub {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 253, 248, 0.18);
}

.timer-unit {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.timer-unit + .timer-unit {
    padding-left: 14px;
    border-left: 1px solid rgba(255, 253, 248, 0.12);
}

.timer-unit span {
    font-family: var(--font-ui);
    font-size: 1.18rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    transition: color 0.3s ease;
}

.timer-unit span.updated {
    color: var(--lemon);
}

.timer-unit small {
    font-size: 0.7rem;
    color: rgba(255, 253, 248, 0.55);
}

/* ---------- milestone carousel ---------- */

.carousel {
    position: relative;
    margin: 18px calc(-1 * var(--page-x)) 0;
}

.carousel-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px var(--page-x) 10px;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--page-x);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.memory-card {
    position: relative;
    flex: 0 0 min(76vw, 300px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-align: left;
    scroll-snap-align: start;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.memory-card:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 3px;
}

.memory-card:active {
    transform: scale(0.985);
}

.memory-cover {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3ead9;
}

.memory-cover.v0 { background: linear-gradient(145deg, #ffe4ea, #ffc8d6); }
.memory-cover.v1 { background: linear-gradient(145deg, #e4f5ed, #c9ebdd); }
.memory-cover.v2 { background: linear-gradient(145deg, #fbeec4, #f5d585); }
.memory-cover.v3 { background: linear-gradient(145deg, #efe7f6, #ded2ec); }

.memory-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(36, 27, 42, 0.34) 100%);
    pointer-events: none;
}

.memory-cover-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    color: var(--ink);
    pointer-events: none;
}

.memory-year {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    color: rgba(43, 34, 49, 0.22);
}

.memory-motif {
    align-self: flex-end;
    display: block;
    width: 42px;
    height: 42px;
    color: rgba(43, 34, 49, 0.28);
}

.memory-motif svg {
    display: block;
    width: 100%;
    height: 100%;
}

.memory-date-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 2;
    padding: 4px 9px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: rgba(255, 253, 248, 0.92);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.memory-body {
    display: grid;
    gap: 4px;
    padding: 14px 16px 16px;
}

.memory-kicker {
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--stamp);
}

.memory-title {
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.memory-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.carousel-arrow {
    display: none;
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 44px;
    height: 44px;
    margin-top: -26px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.6rem;
    line-height: 1;
    background: rgba(255, 253, 248, 0.94);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    transform: translateY(-50%);
    transition: color 0.2s ease, background 0.2s ease;
}

.carousel-arrow:hover {
    color: var(--paper-soft);
    background: var(--ink);
}

.carousel-arrow.is-prev { left: -16px; }
.carousel-arrow.is-next { right: -16px; }

.carousel-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.carousel-progress {
    flex: 1;
    height: 2px;
    overflow: hidden;
    background: var(--line);
    border-radius: 999px;
}

.carousel-progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--stamp);
    border-radius: 999px;
    transition: width 0.15s linear;
}

.carousel-counter {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.carousel-counter b {
    color: var(--ink);
    font-weight: 700;
}

/* ---------- goals ---------- */

.goals-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.goal-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 170px;
    padding: 20px 16px;
    overflow: hidden;
    text-align: center;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
}

.goal-card.v0 { background: linear-gradient(160deg, #fffdf8, #fff0f3); }
.goal-card.v1 { background: linear-gradient(160deg, #fffdf8, #eef8f3); }
.goal-card.v2 { background: linear-gradient(160deg, #fffdf8, #fff6dd); }

.goal-card::after {
    content: '待兑现';
    position: absolute;
    right: 10px;
    top: 12px;
    padding: 6px 2px;
    color: rgba(223, 95, 126, 0.28);
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    border: 1px solid rgba(223, 95, 126, 0.28);
    border-radius: 6px;
    transform: rotate(8deg);
    writing-mode: vertical-rl;
    pointer-events: none;
}

.goal-emoji {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    font-size: 1.75rem;
    background: rgba(255, 253, 248, 0.8);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.goal-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
}

.goal-tag {
    display: block;
    margin-bottom: 3px;
    font-family: var(--font-ui);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--stamp);
}

/* ---------- map ---------- */

.map-card {
    position: relative;
    margin-top: 18px;
    padding: 8px;
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
}

.asia-map {
    width: 100%;
    height: min(46vh, 380px);
    min-height: 260px;
    overflow: hidden;
    background: #f7efdf;
    border-radius: 20px;
    touch-action: pan-y;
}

.map-loading {
    position: absolute;
    inset: 8px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.82rem;
    background: rgba(247, 239, 223, 0.92);
    border-radius: 20px;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.map-card.is-ready .map-loading {
    opacity: 0;
    visibility: hidden;
}

.map-loading-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--stamp);
    animation: pulse 1.4s ease-out infinite;
}

.map-guard {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 3;
    display: none;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 11px;
    color: var(--paper-soft);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    background: rgba(43, 34, 49, 0.82);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 30px -14px rgba(43, 34, 49, 0.72);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.map-guard svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.map-guard:hover {
    background: rgba(43, 34, 49, 0.92);
}

.map-guard:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 2px;
}

.map-card.is-ready:not(.is-active) .map-guard {
    display: inline-flex;
}

.map-card.is-active .map-guard {
    display: none;
}

.map-card.is-active .asia-map {
    touch-action: none;
}

.map-lock {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 3;
    min-height: 34px;
    padding: 0 11px;
    color: var(--paper-soft);
    font-size: 0.72rem;
    background: rgba(43, 34, 49, 0.72);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.map-lock[hidden] {
    display: none;
}

.city-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin: 16px 2px 0;
    color: var(--muted);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.city-head span:last-child {
    color: var(--muted);
    font-size: 0.6rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.city-grid {
    display: flex;
    gap: 0;
    margin-top: 7px;
    padding-bottom: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.city-grid::-webkit-scrollbar {
    display: none;
}

.city-page {
    flex: 0 0 100%;
    display: grid;
    grid-template-rows: repeat(2, auto);
    gap: 6px;
    scroll-snap-align: start;
}

.city-cell {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
    margin: 0;
    min-width: 0;
    padding: 6px 8px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.78rem;
    line-height: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: 0 8px 20px -18px rgba(77, 48, 61, 0.4);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.city-cell b {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 0.78rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.city-cell > span:last-child {
    flex: 0 0 auto;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.62rem;
}

.city-cell-mark {
    flex: 0 0 auto;
    color: var(--stamp-deep);
    font-size: 0.66rem;
    line-height: 1;
}

.city-cell:hover,
.city-cell:focus-visible {
    border-color: rgba(223, 95, 126, 0.45);
}

.city-cell:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 1px;
}

.city-cell.is-active {
    background: var(--stamp-soft);
    border-color: rgba(223, 95, 126, 0.6);
}

.overseas-stamp {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 4;
    width: 84px;
    height: 62px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    background: rgba(255, 253, 248, 0.84);
    border: 2px solid rgba(185, 74, 99, 0.55);
    border-radius: 50%;
    color: var(--stamp-deep);
    cursor: pointer;
    transform: rotate(-7deg);
    box-shadow: 0 8px 18px -14px rgba(43, 34, 49, 0.55);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.overseas-stamp::before {
    content: "";
    position: absolute;
    inset: 3.5px;
    border: 1px dashed rgba(185, 74, 99, 0.55);
    border-radius: 50%;
}

.overseas-stamp:hover {
    transform: rotate(-3deg) scale(1.04);
    background: rgba(251, 227, 233, 0.94);
}

.overseas-stamp.is-focus {
    animation: stamp-pulse 0.7s ease 2;
}

@keyframes stamp-pulse {
    50% {
        transform: rotate(-3deg) scale(1.1);
        background: rgba(251, 227, 233, 0.98);
    }
}

.overseas-stamp .stamp-top {
    position: relative;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
}

.overseas-stamp .stamp-name {
    position: relative;
    font-family: var(--font-display);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.04em;
}

.overseas-stamp .stamp-foot {
    position: relative;
    font-size: 0.5rem;
    letter-spacing: 0.04em;
}

/* ---------- footer ---------- */

.app-footer {
    padding: 64px 0 8px;
    text-align: center;
}

.footer-script {
    font-family: var(--font-cute);
    font-size: 1.5rem;
    color: var(--ink);
}

.footer-sub {
    margin-top: 4px;
    font-family: var(--font-ui);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    color: var(--muted);
}

/* ---------- coupons ---------- */

.page-head {
    padding: 14px 0 2px;
}

.page-title {
    margin-top: 6px;
    font-family: var(--font-cute);
    font-size: clamp(2.7rem, 12vw, 3.6rem);
    font-weight: 400;
    line-height: 1.05;
}

.coupon-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.stat-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    padding: 7px 13px;
    color: var(--stamp-deep);
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(223, 95, 126, 0.1);
    border-radius: 999px;
}

.stat-chip b {
    font-family: var(--font-ui);
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.stat-chip.is-muted {
    color: var(--muted);
    background: rgba(43, 34, 49, 0.06);
}

.coupon-toolbar {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top));
    z-index: 30;
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin: 18px 0 4px;
}

.coupon-tabs {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 4px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 14px 30px -24px rgba(77, 48, 61, 0.5);
}

.coupon-refresh-btn {
    flex: 0 0 auto;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 14px;
    color: var(--ink);
    font-size: 0.8rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 999px;
    box-shadow: 0 14px 30px -24px rgba(77, 48, 61, 0.5);
}

.coupon-refresh-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 480px) {
    .coupon-refresh-btn {
        width: 50px;
        padding: 0;
    }

    .coupon-refresh-label {
        display: none;
    }
}

.coupon-tab {
    min-height: 42px;
    padding: 0 8px;
    color: var(--muted);
    font-size: 0.88rem;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.coupon-tab.is-active {
    color: var(--paper-soft);
    font-weight: 600;
    background: var(--ink);
}

.coupons-body {
    display: grid;
    gap: 18px;
    padding: 16px 0 8px;
}

.coupon-group {
    display: grid;
    gap: 12px;
}

.coupon-group-items {
    display: grid;
    gap: 12px;
}

.coupon-group-title {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-transform: uppercase;
}

.coupon-group-title span {
    color: var(--stamp);
}

.ticket {
    position: relative;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.ticket-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 0;
}

.ticket-no {
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.ticket-state {
    padding: 4px 10px;
    color: var(--route);
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(47, 155, 152, 0.11);
    border-radius: 999px;
}

.ticket-main {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 16px;
}

.ticket-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    font-size: 1.9rem;
    background: linear-gradient(145deg, rgba(255, 217, 226, 0.75), rgba(246, 212, 120, 0.45));
    border: 1px solid rgba(223, 95, 126, 0.16);
    border-radius: 18px;
}

.ticket-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.ticket-title {
    font-family: var(--font-display);
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ticket-duration {
    width: fit-content;
    padding: 3px 10px;
    color: var(--stamp-deep);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(223, 95, 126, 0.1);
    border-radius: 999px;
}

.ticket-foot {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px 16px;
    border-top: 1px dashed var(--line-strong);
}

.ticket-date {
    color: var(--muted);
    font-size: 0.74rem;
}

.ticket-use {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    padding: 0 17px;
    color: var(--paper-soft);
    font-size: 0.86rem;
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.ticket-use:active {
    transform: scale(0.97);
}

.ticket-use:hover {
    background: var(--stamp);
}

.ticket-use svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(255, 253, 248, 0.66);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.history-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
    background: rgba(43, 34, 49, 0.05);
    border-radius: 12px;
    filter: grayscale(0.5);
}

.history-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.history-main b {
    font-size: 0.9rem;
    font-weight: 600;
}

.history-main small {
    color: var(--muted);
    font-size: 0.72rem;
}

.history-stamp {
    flex: 0 0 auto;
    padding: 4px 2px;
    color: rgba(223, 95, 126, 0.55);
    font-family: var(--font-display);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    border: 1px solid rgba(223, 95, 126, 0.35);
    border-radius: 5px;
    transform: rotate(-8deg);
    writing-mode: vertical-rl;
}

.coupon-empty {
    display: grid;
    justify-items: center;
    gap: 3px;
    padding: 44px 20px;
    text-align: center;
    background: rgba(255, 253, 248, 0.55);
    border: 1px dashed var(--line-strong);
    border-radius: 24px;
}

.coupon-empty span {
    font-family: var(--font-cute);
    font-size: 2.2rem;
    color: var(--stamp);
}

.coupon-empty p {
    font-size: 0.9rem;
    font-weight: 600;
}

.coupon-empty small {
    color: var(--muted);
    font-size: 0.78rem;
}

/* ---------- sheets ---------- */

.sheet {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.sheet.is-open {
    opacity: 1;
    visibility: visible;
}

.sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 18, 30, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

#memory-sheet {
    z-index: 410;
}

.sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--paper);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -20px 60px -24px rgba(24, 18, 30, 0.5);
    transform: translateY(104%);
    transition: transform 0.34s cubic-bezier(0.22, 0.7, 0.28, 1);
}

.sheet.is-open .sheet-panel {
    transform: translateY(0);
}

.sheet-panel-tall {
    max-height: 92vh;
    max-height: 92dvh;
}

.sheet-panel-full {
    height: 94vh;
    height: 94dvh;
}


.sheet-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--ink);
    font-size: 0.9rem;
    background: rgba(255, 253, 248, 0.86);
    border: 1px solid var(--line);
    border-radius: 999px;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.sheet-close.is-inline {
    position: static;
    flex: 0 0 auto;
}

.sheet-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.sheet-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 10px;
    border-bottom: 1px solid var(--line);
}

.sheet-head h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
}

.sheet-head h2 span {
    margin-left: 4px;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    color: var(--stamp);
}

/* memory detail */
.memory-detail-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe4ea, #ffc8d6);
}

.memory-detail-cover.v0 { background: linear-gradient(145deg, #ffe4ea, #ffc8d6); }
.memory-detail-cover.v1 { background: linear-gradient(145deg, #e4f5ed, #c9ebdd); }
.memory-detail-cover.v2 { background: linear-gradient(145deg, #fbeec4, #f5d585); }
.memory-detail-cover.v3 { background: linear-gradient(145deg, #efe7f6, #ded2ec); }

.memory-detail-cover .memory-cover-text {
    padding: 24px;
}

.memory-detail-cover .memory-year {
    font-size: 4rem;
}

.memory-detail-cover .memory-motif {
    width: 56px;
    height: 56px;
}

.memory-detail-body {
    padding: 20px 22px calc(28px + var(--safe-bottom));
}

.memory-detail-date {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--stamp);
}

.memory-detail-title {
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.35;
}

.memory-detail-desc {
    margin-top: 10px;
    color: var(--ink-2);
    font-size: 0.98rem;
    line-height: 1.85;
    white-space: pre-wrap;
}

.memory-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 28px;
}

.memory-nav button {
    min-height: 46px;
    color: var(--ink);
    font-size: 0.86rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.memory-nav button:disabled {
    opacity: 0.35;
}

/* timeline */
.timeline-list {
    padding: 8px 22px calc(40px + var(--safe-bottom));
}

.timeline-year {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -22px;
    padding: 14px 22px 8px;
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
    background: var(--paper);
}

.timeline-year::after {
    content: '';
    display: block;
    width: 34px;
    height: 3px;
    margin-top: 6px;
    background: var(--stamp);
    border-radius: 999px;
}

.timeline-item {
    position: relative;
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 0 0 20px 18px;
    text-align: left;
    border-left: 1px solid var(--line-strong);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 6px;
    width: 7px;
    height: 7px;
    background: var(--stamp);
    border-radius: 999px;
}

.timeline-item-date {
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--stamp);
}

.timeline-item-title {
    font-family: var(--font-display);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
}

.timeline-item-desc {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.55;
}

/* QR */
.sheet-panel-center {
    align-self: center;
    width: min(380px, calc(100% - 32px));
    max-height: 92vh;
    max-height: 92dvh;
    margin-bottom: 16px;
    border-radius: 28px;
    transform: translateY(24px) scale(0.97);
}

.sheet.is-open .sheet-panel-center {
    transform: translateY(0) scale(1);
}

.qr-body {
    padding: 24px 24px calc(24px + var(--safe-bottom));
    text-align: center;
}

.qr-title {
    margin-top: 4px;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
}

.qr-coupon {
    margin-top: 2px;
    color: var(--stamp);
    font-size: 0.88rem;
    font-weight: 600;
}

.qr-code {
    width: min(64vw, 236px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin: 18px auto 12px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: inset 0 0 0 5px #fff, 0 12px 30px -20px rgba(77, 48, 61, 0.5);
}

.qr-code img,
.qr-code canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.qr-serial {
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.qr-hint {
    margin-top: 8px;
    font-size: 0.82rem;
    color: var(--ink-2);
}

.qr-tip {
    margin-top: 2px;
    font-size: 0.72rem;
    color: var(--muted);
}

.qr-done {
    width: 100%;
    min-height: 48px;
    margin-top: 18px;
    color: var(--paper-soft);
    font-size: 0.92rem;
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
}

/* ---------- boot error & toast ---------- */

.boot-error {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--paper);
}

.boot-error[hidden] {
    display: none;
}

.boot-error-card {
    width: min(340px, 100%);
    padding: 32px 24px;
    text-align: center;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}

.boot-error-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    color: var(--stamp);
    font-family: var(--font-display);
    font-size: 1.6rem;
    border: 2px solid var(--stamp);
    border-radius: 999px;
}

.boot-error-card h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
}

.boot-error-card p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.86rem;
}

.boot-error-card button {
    min-height: 46px;
    margin-top: 20px;
    padding: 0 28px;
    color: var(--paper-soft);
    background: var(--ink);
    border-radius: 999px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(var(--tab-h) + var(--safe-bottom) + 18px);
    z-index: 600;
    padding: 9px 18px;
    color: var(--paper-soft);
    font-size: 0.8rem;
    background: rgba(43, 34, 49, 0.9);
    border-radius: 999px;
    box-shadow: 0 14px 30px -14px rgba(43, 34, 49, 0.7);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------- dinner entry (home) ---------- */

.dinner-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    margin: 30px 0 4px;
    padding: 15px;
    overflow: hidden;
    text-align: left;
    background: linear-gradient(135deg, rgba(255, 253, 248, 0.98), rgba(255, 239, 243, 0.92));
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dinner-card::after {
    content: '小灶';
    position: absolute;
    right: 70px;
    top: 3px;
    font-family: var(--font-cute);
    font-size: 4.4rem;
    line-height: 1;
    color: rgba(223, 95, 126, 0.06);
    pointer-events: none;
}

.dinner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.dinner-body {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.dinner-kicker {
    font-family: var(--font-ui);
    font-size: 0.56rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--muted);
}

.dinner-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.dinner-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dinner-side {
    flex: 0 0 auto;
    display: grid;
    justify-items: end;
    gap: 8px;
}

.coin-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px 4px 4px;
    color: var(--stamp-deep);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 800;
    background: rgba(223, 95, 126, 0.1);
    border-radius: 999px;
}

.coin-dot {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: #fff;
    font-size: 0.52rem;
    line-height: 1;
    background: var(--stamp);
    border-radius: 999px;
}

.dinner-cta {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}

/* ---------- order page ---------- */

.order-wallet-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.wallet-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px 0 8px;
    color: var(--paper-soft);
    background: var(--ink);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wallet-pill:hover {
    background: var(--ink-2);
}

.wallet-pill:active {
    transform: scale(0.97);
}

.wallet-pill b {
    font-family: var(--font-ui);
    font-size: 1.06rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.wallet-pill .coin-dot {
    width: 20px;
    height: 20px;
    background: var(--stamp);
}

.wallet-unit {
    font-size: 0.66rem;
    color: rgba(255, 253, 248, 0.6);
}

.wallet-credit {
    font-size: 0.72rem;
    color: var(--muted);
}

.order-status-wrap {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.order-card {
    position: relative;
    padding: 18px;
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
}

.order-card.status-pending { background: linear-gradient(160deg, #fffdf8, #fff7e4); }
.order-card.status-prepping { background: linear-gradient(160deg, #fffdf8, #eef8f2); }
.order-card.status-cooking { background: linear-gradient(160deg, #fffdf8, #fff0e4); }
.order-card.status-served { background: linear-gradient(160deg, #fffdf8, #ffeef3); }
.order-card.status-completed { background: linear-gradient(160deg, #fffdf8, #eff7f4); }
.order-card.status-cancelled { opacity: 0.82; }

.order-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.order-no {
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--muted);
}

.order-badge {
    padding: 4px 10px;
    color: var(--route);
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(47, 155, 152, 0.12);
    border-radius: 999px;
}

.status-served .order-badge,
.status-completed .order-badge {
    color: var(--stamp-deep);
    background: rgba(223, 95, 126, 0.13);
}

.status-cancelled .order-badge {
    color: var(--muted);
    background: rgba(43, 34, 49, 0.07);
}

.order-card-title {
    margin-top: 8px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
}

.order-card-sub {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}

.order-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    margin: 18px 0 4px;
    padding: 0;
    list-style: none;
}

.order-steps li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.66rem;
    text-align: center;
}

.order-steps li::before {
    content: '';
    position: absolute;
    top: 5px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--line);
}

.order-steps li:first-child::before {
    display: none;
}

.order-step-dot {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    background: var(--paper-soft);
    border: 2px solid var(--line-strong);
    border-radius: 999px;
}

.order-steps li.is-done {
    color: var(--ink);
}

.order-steps li.is-done::before {
    background: var(--stamp);
}

.order-steps li.is-done .order-step-dot {
    background: var(--stamp);
    border-color: var(--stamp);
}

.order-steps li.is-current {
    color: var(--stamp-deep);
    font-weight: 600;
}

.order-steps li.is-current::before {
    background: var(--stamp);
}

.order-steps li.is-current .order-step-dot {
    border-color: var(--stamp);
    box-shadow: 0 0 0 4px rgba(223, 95, 126, 0.14);
}

.order-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    color: var(--muted);
    font-size: 0.7rem;
    border-top: 1px dashed var(--line-strong);
}

.order-eta {
    margin-top: 6px;
    color: var(--stamp-deep);
    font-size: 0.78rem;
    font-weight: 600;
}

.order-card-items {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.86rem;
}

.order-item-icon {
    width: 24px;
    text-align: center;
}

.order-item-photo {
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    overflow: hidden;
    font-size: 1rem;
    background: rgba(43, 34, 49, 0.05);
    border-radius: 9px;
}

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

.order-item-emoji {
    font-size: 1rem;
    line-height: 1;
}

.order-item-qty {
    margin-left: 5px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-style: normal;
}

.order-item-name {
    flex: 1;
}

.order-item-price {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.76rem;
}

.order-user-note {
    margin-top: 12px;
    padding: 9px 12px;
    color: var(--ink-2);
    font-size: 0.8rem;
    background: rgba(43, 34, 49, 0.04);
    border-radius: 10px;
}

.order-thanks {
    margin-top: 10px;
    color: var(--stamp-deep);
    font-size: 0.8rem;
}

.order-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.order-action {
    flex: 1 1 auto;
    min-height: 42px;
    padding: 0 14px;
    color: var(--ink);
    font-size: 0.82rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.order-action.is-primary {
    color: var(--paper-soft);
    background: var(--ink);
    border-color: var(--ink);
}

.order-action:disabled {
    opacity: 0.45;
}

/* ---------- menu ---------- */

.menu-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.menu-head .section-title {
    font-size: 1.5rem;
}

.menu-count {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.7rem;
}

.menu-cat.menu-cat-wish {
    margin-left: auto;
    color: var(--muted);
    background: transparent;
    border-style: dashed;
}

.menu-cat.menu-cat-wish:active {
    transform: scale(0.97);
}

.sheet-panel-wish {
    max-height: 88vh;
    max-height: 88dvh;
}

.wish-body {
    display: grid;
    gap: 10px;
    padding: 6px 20px calc(24px + var(--safe-bottom));
}

.wish-intro {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.65;
}

.wish-label {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
}

.wish-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 1rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.wish-input:focus {
    outline: 2px solid var(--stamp);
    outline-offset: 2px;
}

.wish-photo-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wish-photo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.wish-status {
    color: var(--muted);
    font-size: 0.7rem;
}

.wish-status.is-error {
    color: var(--stamp-deep);
}

.wish-preview {
    width: min(52vw, 180px);
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
}

.wish-preview[hidden] {
    display: none;
}

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

.wish-hint {
    color: var(--muted);
    font-size: 0.68rem;
}

.wish-submit {
    min-height: 48px;
    margin-top: 6px;
    color: var(--paper-soft);
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
}

.wish-submit:disabled {
    opacity: 0.5;
}

.menu-categories {
    display: flex;
    gap: 8px;
    margin: 12px calc(-1 * var(--page-x)) 0;
    padding: 2px var(--page-x) 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.menu-categories::-webkit-scrollbar {
    display: none;
}

.menu-cat {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 38px;
    padding: 0 14px;
    color: var(--muted);
    font-size: 0.8rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.menu-cat.is-active {
    color: var(--paper-soft);
    background: var(--ink);
    border-color: var(--ink);
}

.menu-list {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.menu-locked {
    grid-column: 1 / -1;
    padding: 10px 14px;
    color: var(--stamp-deep);
    font-size: 0.78rem;
    background: rgba(223, 95, 126, 0.08);
    border-radius: 12px;
}

.dish-card {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
}

.dish-cover {
    position: relative;
    display: grid;
    place-items: center;
    width: 74px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 16px;
}

.dish-cover.v0 { background: linear-gradient(145deg, #ffe4ea, #ffc8d6); }
.dish-cover.v1 { background: linear-gradient(145deg, #e4f5ed, #c9ebdd); }
.dish-cover.v2 { background: linear-gradient(145deg, #fbeec4, #f5d585); }
.dish-cover.v3 { background: linear-gradient(145deg, #efe7f6, #ded2ec); }

.dish-emoji {
    font-size: 2rem;
    line-height: 1;
}

.dish-special {
    position: absolute;
    top: 5px;
    left: 5px;
    padding: 2px 5px;
    color: #fff;
    font-size: 0.5rem;
    font-style: normal;
    background: var(--stamp);
    border-radius: 5px;
}

.dish-body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.dish-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.dish-name {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dish-price {
    color: var(--stamp-deep);
    font-family: var(--font-ui);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.dish-price i {
    margin-left: 1px;
    color: var(--muted);
    font-size: 0.6rem;
    font-style: normal;
    font-weight: 600;
}

.dish-desc {
    display: -webkit-box;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.dish-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--muted);
    font-size: 0.64rem;
}

.dish-meta span {
    padding: 2px 6px;
    background: rgba(43, 34, 49, 0.04);
    border-radius: 999px;
}

.dish-time {
    font-family: var(--font-ui);
}

.dish-add {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--paper-soft);
    font-size: 1.15rem;
    background: var(--ink);
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.dish-add:active {
    transform: scale(0.92);
}

.dish-add.is-added {
    background: var(--stamp);
}

.dish-add:disabled {
    opacity: 0.28;
}

.dish-card.is-soldout .dish-cover,
.dish-card.is-soldout .dish-body {
    opacity: 0.45;
}

.dish-soldout {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--stamp-deep);
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(251, 246, 236, 0.34);
    border-radius: 20px;
    pointer-events: none;
}

.menu-empty {
    grid-column: 1 / -1;
}

.menu-footnote {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}

/* ---------- cart bar & cart sheet ---------- */

.cart-bar {
    position: fixed;
    left: 50%;
    bottom: calc(var(--tab-h) + var(--safe-bottom) + 10px);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: min(calc(100% - 32px), 520px);
    min-height: 58px;
    padding: 7px 8px 7px 18px;
    color: var(--paper-soft);
    background: var(--ink);
    border-radius: 999px;
    box-shadow: 0 20px 44px -20px rgba(43, 34, 49, 0.7);
    transform: translateX(-50%);
}

.cart-bar[hidden] {
    display: none;
}

.cart-bar-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.cart-bar-count {
    color: rgba(255, 253, 248, 0.65);
    font-size: 0.7rem;
}

.cart-bar-total {
    font-family: var(--font-ui);
    font-size: 0.88rem;
    font-weight: 700;
}

.cart-bar-btn {
    min-height: 44px;
    padding: 0 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--stamp);
    border-radius: 999px;
}

.cart-items {
    display: grid;
    gap: 2px;
    padding: 8px 20px 4px;
}

.cart-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.cart-line-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #f3eee7;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.cart-line-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-line-name {
    flex: 1;
    font-size: 0.9rem;
}

.cart-line-price {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.8rem;
}

.cart-line-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 28px;
    padding: 0 9px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    background: rgba(43, 34, 49, 0.04);
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
}

.cart-line-remove:hover {
    color: var(--stamp-deep);
    background: rgba(223, 95, 126, 0.08);
    border-color: rgba(223, 95, 126, 0.25);
}

.cart-summary {
    display: grid;
    gap: 6px;
    margin: 14px 20px 0;
    padding: 14px;
    background: rgba(43, 34, 49, 0.035);
    border-radius: 14px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.8rem;
}

.cart-summary-row b {
    color: var(--ink);
    font-family: var(--font-ui);
    font-size: 1rem;
}

.cart-summary-row .is-negative {
    color: var(--stamp-deep);
    font-weight: 600;
}

.cart-credit-note {
    margin: 10px 20px 0;
    color: var(--stamp-deep);
    font-size: 0.76rem;
}

.cart-note-label {
    display: block;
    margin: 16px 20px 6px;
    color: var(--muted);
    font-size: 0.76rem;
}

.cart-note {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 0.86rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
    resize: none;
}

.cart-note:focus {
    outline: 2px solid var(--stamp);
    outline-offset: 2px;
}

.cart-confirm {
    display: block;
    width: calc(100% - 40px);
    min-height: 48px;
    margin: 16px 20px 0;
    color: var(--paper-soft);
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
}

.cart-confirm:disabled {
    opacity: 0.45;
}

.cart-hint {
    margin: 8px 20px calc(20px + var(--safe-bottom));
    color: var(--muted);
    font-size: 0.68rem;
    text-align: center;
}

/* ---------- wallet sheet ---------- */

.sheet-panel-cart,
.sheet-panel-wallet {
    max-height: 88vh;
    max-height: 88dvh;
}

.wallet-body {
    padding: 0 20px calc(24px + var(--safe-bottom));
}

.wallet-hero {
    margin-top: 12px;
    padding: 20px;
    color: var(--paper-soft);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(223, 95, 126, 0.3), transparent 56%),
        linear-gradient(145deg, #372a3c, #241b2a);
    border-radius: 20px;
}

.wallet-hero-label {
    color: rgba(255, 253, 248, 0.6);
    font-size: 0.72rem;
}

.wallet-hero-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 4px;
}

.wallet-hero-value b {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.wallet-hero-value b.is-negative {
    color: var(--petal);
}

.wallet-hero-value span {
    color: rgba(255, 253, 248, 0.6);
    font-size: 0.8rem;
}

.wallet-hero-credit {
    margin-top: 8px;
    color: rgba(255, 253, 248, 0.55);
    font-size: 0.72rem;
}

.wallet-entries-title {
    margin: 20px 0 8px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wallet-entries {
    display: grid;
    align-content: start;
    gap: 2px;
}

.wallet-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
}

.wallet-entry-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--ink-2);
}

.wallet-entry-icon svg {
    width: 19px;
    height: 19px;
}

.wallet-entry-icon.grant {
    color: var(--stamp);
}

.wallet-entry-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 1px;
}

.wallet-entry-main b {
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-entry-main small {
    color: var(--muted);
    font-size: 0.66rem;
}

.wallet-entry-amount {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 800;
}

.wallet-entry-amount.is-plus {
    color: var(--route);
}

.wallet-entry-amount.is-minus {
    color: var(--stamp-deep);
}

.wallet-tip {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.7rem;
    text-align: center;
}

.wallet-empty {
    padding: 20px;
    color: var(--muted);
    font-size: 0.8rem;
    text-align: center;
}


/* ---------- weekend slots ---------- */

.slot-picker {
    display: flex;
    gap: 8px;
    margin: 18px calc(-1 * var(--page-x)) 0;
    padding: 2px var(--page-x) 8px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.slot-picker::-webkit-scrollbar {
    display: none;
}

.slot-card {
    flex: 0 0 108px;
    display: grid;
    gap: 1px;
    padding: 11px 12px;
    text-align: left;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 16px;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.slot-card:active {
    transform: scale(0.97);
}

.slot-card.is-active {
    color: var(--paper-soft);
    background: var(--ink);
    border-color: var(--ink);
}

.slot-date {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.64rem;
}

.slot-label {
    font-size: 0.8rem;
    font-weight: 600;
}

.slot-time {
    font-family: var(--font-ui);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.slot-state {
    margin-top: 3px;
    color: var(--stamp-deep);
    font-size: 0.6rem;
    font-weight: 600;
}

.slot-card.is-active .slot-date,
.slot-card.is-active .slot-state {
    color: rgba(255, 253, 248, 0.65);
}

.slot-card.is-booked .slot-state {
    color: var(--route);
}

.slot-card.is-booked.is-active .slot-state {
    color: var(--lemon);
}

.slot-card.is-closed {
    opacity: 0.5;
}

.slot-card.is-past {
    opacity: 0.88;
    border-color: rgba(223, 95, 126, 0.45);
}

.slot-card.is-past .slot-state {
    color: var(--stamp-deep);
}

.slot-card.is-past.is-active .slot-state {
    color: var(--lemon);
}

.slot-empty {
    padding: 16px 2px;
    color: var(--muted);
    font-size: 0.8rem;
}

/* ---------- order cards: scheduled copy ---------- */

.order-slot-line {
    margin-top: 4px;
    color: var(--stamp-deep);
    font-size: 0.76rem;
    font-weight: 600;
}

.order-card.status-accepted {
    background: linear-gradient(160deg, #fffdf8, #eef8f2);
}

.order-closed,
.order-loading {
    padding: 24px 18px;
    text-align: center;
    background: var(--paper-soft);
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-l);
    color: var(--muted);
}

.order-closed h3 {
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.08rem;
}

.order-closed p {
    margin-top: 4px;
    font-size: 0.8rem;
}

.order-closed-btn {
    min-height: 42px;
    margin-top: 14px;
    padding: 0 18px;
    color: var(--paper-soft);
    font-size: 0.82rem;
    background: var(--ink);
    border-radius: 999px;
}

.order-loading {
    font-size: 0.8rem;
}

/* ---------- dish photos & detail ---------- */

.dish-card {
    cursor: pointer;
}

.dish-card:focus-visible {
    outline: 2px solid var(--stamp);
    outline-offset: 3px;
}

.dish-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheet-panel-dish {
    max-height: 92vh;
    max-height: 92dvh;
}

.dish-detail-image {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(145deg, #ffe4ea, #ffc8d6);
}

.dish-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dish-gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
}

.dish-gallery-track::-webkit-scrollbar {
    display: none;
}

.dish-gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: start;
}

.dish-gallery-count {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 2;
    padding: 3px 8px;
    background: rgba(43, 34, 49, 0.55);
    border-radius: 999px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-variant-numeric: tabular-nums;
}

.dish-gallery-dots {
    position: absolute;
    right: 56px;
    bottom: 12px;
    left: 56px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.dish-gallery-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    border: 0;
    border-radius: 999px;
    transition: width 0.2s ease, background 0.2s ease;
}

.dish-gallery-dot.is-active {
    width: 18px;
    background: #fff;
}

.dish-detail-emoji {
    font-size: 6.5rem;
    line-height: 1;
}

.dish-detail-body {
    padding: 18px 22px calc(24px + var(--safe-bottom));
}

.dish-detail-category {
    color: var(--stamp);
    font-family: var(--font-ui);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.dish-detail-name {
    margin-top: 3px;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
}

.dish-detail-meta {
    margin-top: 3px;
    color: var(--stamp-deep);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
}

.dish-detail-desc {
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.75;
}

.dish-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.dish-detail-tags span {
    padding: 3px 8px;
    color: var(--muted);
    font-size: 0.66rem;
    background: rgba(43, 34, 49, 0.05);
    border-radius: 999px;
}

.dish-detail-add {
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    color: var(--paper-soft);
    font-size: 0.92rem;
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
}

.dish-detail-add.is-added {
    background: var(--stamp);
}

.dish-detail-add:disabled {
    opacity: 0.45;
}

/* ---------- me page ---------- */

.me-wallet {
    display: grid;
    gap: 1px;
    width: 100%;
    margin-top: 22px;
    padding: 20px;
    text-align: left;
    color: var(--paper-soft);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(223, 95, 126, 0.3), transparent 56%),
        linear-gradient(145deg, #372a3c, #241b2a);
    border-radius: var(--radius-l);
    box-shadow: 0 26px 56px -30px rgba(43, 34, 49, 0.7);
}

.me-wallet-label {
    color: rgba(255, 253, 248, 0.6);
    font-size: 0.7rem;
}

.me-wallet-value {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.me-wallet-value b {
    font-family: var(--font-display);
    font-size: 2.3rem;
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.me-wallet-value b.is-negative {
    color: var(--petal);
}

.me-wallet-value i {
    color: rgba(255, 253, 248, 0.55);
    font-size: 0.72rem;
    font-style: normal;
}

.me-wallet-credit {
    color: rgba(255, 253, 248, 0.5);
    font-size: 0.68rem;
}

.me-section {
    margin-top: 30px;
}

.me-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.me-section-head h2 {
    font-family: var(--font-display);
    font-size: 1.18rem;
    font-weight: 700;
}

.me-section-head span,
.me-section-head a {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.68rem;
}

.me-orders {
    display: grid;
    align-content: start;
    gap: 8px;
}

.me-order {
    display: grid;
    gap: 2px;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 10px 26px -24px rgba(77, 48, 61, 0.4);
}

.me-order-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.me-order-top b {
    font-family: var(--font-ui);
    font-size: 0.76rem;
    letter-spacing: 0.04em;
}

.me-order-status {
    padding: 3px 8px;
    color: var(--route);
    font-size: 0.62rem;
    font-weight: 600;
    background: rgba(47, 155, 152, 0.1);
    border-radius: 999px;
}

.me-order-status.status-served {
    color: var(--stamp-deep);
    background: rgba(223, 95, 126, 0.12);
}

.me-order-status.status-completed {
    color: var(--route);
    background: rgba(47, 155, 152, 0.1);
}

.me-order-status.status-cancelled {
    color: var(--muted);
    background: rgba(43, 34, 49, 0.06);
}

.me-order-slot {
    color: var(--ink-2);
    font-size: 0.8rem;
}

.me-order-meta {
    color: var(--muted);
    font-size: 0.72rem;
}

.me-order-time {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.62rem;
}

.me-order-photos {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.me-order-photos img,
.me-order-photo-fallback {
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    font-size: 1rem;
    background: rgba(43, 34, 49, 0.05);
    border-radius: 9px;
    object-fit: cover;
}

.me-order-photo-count {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.66rem;
    white-space: nowrap;
}

.me-order-items {
    display: grid;
    gap: 6px;
    margin-top: 3px;
}

.me-order-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.me-order-item-name {
    flex: 1;
    min-width: 0;
    color: var(--ink-2);
    font-size: 0.84rem;
}

.me-order-item-name i {
    margin-left: 4px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-style: normal;
}

.me-order-item-price {
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 600;
}

.me-empty {
    padding: 18px;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
    background: rgba(255, 253, 248, 0.5);
    border: 1px dashed var(--line-strong);
    border-radius: 14px;
}

.me-coupons {
    display: grid;
    align-content: start;
    gap: 6px;
    padding-right: 2px;
}

.me-coupon {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.me-coupon small {
    color: var(--muted);
    font-size: 0.66rem;
    text-align: right;
}

/* ---------- 我们 page: menu + sub pages ---------- */

body.me-subpage .tab-bar {
    display: none;
}

body.me-subpage .app-main {
    padding-bottom: calc(30px + var(--safe-bottom));
}

.me-menu-view[hidden],
.me-sub-view[hidden] {
    display: none;
}

.me-menu-view {
    display: grid;
    gap: 14px;
}

.me-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
}

.me-avatar {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    overflow: hidden;
    background: linear-gradient(145deg, var(--petal), var(--lemon));
    border-radius: 999px;
}

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

.me-profile-text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.me-profile-text b {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.me-profile-text small {
    color: var(--muted);
    font-size: 0.72rem;
}

.me-menu-group {
    overflow: hidden;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
}

.me-menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 62px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.me-menu-row:last-child {
    border-bottom: 0;
}

.me-menu-row:active {
    background: rgba(43, 34, 49, 0.03);
}

.me-menu-icon {
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    color: var(--stamp-deep);
    font-family: var(--font-cute);
    font-size: 1rem;
    background: rgba(223, 95, 126, 0.1);
    border-radius: 10px;
}

.me-menu-text {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.me-menu-text b {
    font-size: 0.95rem;
    font-weight: 600;
}

.me-menu-text small {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-menu-value {
    color: var(--stamp-deep);
    font-family: var(--font-ui);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.me-menu-badge {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.66rem;
    font-weight: 700;
    background: var(--stamp);
    border-radius: 999px;
}

.me-menu-badge[hidden] {
    display: none;
}

.me-menu-chev {
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
}

.me-menu-hint {
    padding: 8px 4px 0;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}

/* sub pages */

.me-sub-head {
    position: sticky;
    top: calc(var(--header-h) + var(--safe-top));
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 calc(-1 * var(--page-x));
    padding: 8px var(--page-x);
}

.me-back {
    padding: 4px 8px 4px 0;
    color: var(--ink);
    font-size: 1.5rem;
    line-height: 1;
    background: none;
    border: 0;
}

.me-sub-head strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}

.me-sub-body {
    padding-top: 18px;
}

.me-sub-body .order-detail {
    padding: 0 0 calc(30px + var(--safe-bottom));
}

.me-list-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 0.72rem;
}

.me-list-summary b {
    color: var(--ink);
    font-family: var(--font-ui);
}

.me-link {
    color: var(--stamp-deep);
    font-size: 0.72rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.me-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    margin-bottom: 14px;
    padding: 3px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.me-filters.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.me-filter {
    min-height: 34px;
    padding: 0 3px;
    color: var(--muted);
    font-size: 0.68rem;
    border-radius: 999px;
    white-space: nowrap;
}

.me-filter.is-active {
    color: var(--paper-soft);
    background: var(--ink);
}

/* Me sub-views: lock to the viewport; only the record list scrolls */
body.me-fixed-view {
    overflow: hidden;
}

body.me-fixed-view .app-main {
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
}

body.me-fixed-view #page-me,
body.me-fixed-view .me-sub-view {
    height: 100%;
}

body.me-fixed-view .me-sub-view {
    display: flex;
    flex-direction: column;
}

body.me-fixed-view .me-sub-head {
    flex: 0 0 auto;
}

body.me-fixed-view .me-sub-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.me-fixed-view .me-list-summary,
body.me-fixed-view .me-filters,
body.me-fixed-view .wallet-hero,
body.me-fixed-view .me-section-head,
body.me-fixed-view .me-note {
    flex: 0 0 auto;
}

body.me-fixed-view .me-orders,
body.me-fixed-view .me-coupons,
body.me-fixed-view .wallet-entries.me-ledger {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.me-note {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.6;
    text-align: center;
}

.me-order-foot {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding-top: 7px;
    margin-top: 2px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.62rem;
    border-top: 1px dashed var(--line);
}

.me-order-action {
    color: var(--stamp-deep);
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
}

.me-coupon-event {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.me-coupon-icon {
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    background: rgba(43, 34, 49, 0.05);
    border-radius: 10px;
}

.me-coupon-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.me-coupon-main b {
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.me-coupon-main small {
    color: var(--muted);
    font-size: 0.66rem;
}

.me-coupon-type {
    padding: 2px 7px;
    font-size: 0.62rem;
    border-radius: 999px;
    white-space: nowrap;
}

.me-coupon-type.acquired {
    color: var(--route);
    background: rgba(47, 155, 152, 0.1);
}

.me-coupon-type.used {
    color: var(--stamp-deep);
    background: rgba(223, 95, 126, 0.1);
}

/* ---------- order detail sheet ---------- */

.order-detail {
    padding: 2px 22px calc(30px + var(--safe-bottom));
}

.order-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.order-detail-id {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.order-detail-slot {
    margin-top: 6px;
    color: var(--stamp-deep);
    font-size: 0.78rem;
    font-weight: 600;
}

.order-detail-items {
    display: grid;
    gap: 6px;
    margin-top: 16px;
}

.order-served {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--line-strong);
}

.order-served-head {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
}

.order-served-head h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.order-served-head span {
    margin-left: auto;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.66rem;
}

.order-served-list {
    display: grid;
    gap: 10px;
}

.order-served-photo {
    position: relative;
    overflow: hidden;
    margin: 0;
    background: #f3eee7;
    border-radius: 14px;
}

.order-served-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.order-served-photo figcaption {
    position: absolute;
    bottom: 9px;
    left: 10px;
    padding: 3px 8px;
    color: #fff;
    font-family: var(--font-ui);
    font-size: 0.66rem;
    background: rgba(43, 34, 49, 0.58);
    border-radius: 999px;
}

.order-detail-total {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    font-size: 0.86rem;
    border-top: 1px dashed var(--line-strong);
}

.order-detail-total b {
    font-family: var(--font-ui);
}

.order-detail-payment {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.72rem;
}

.order-detail-history-title {
    margin-top: 20px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
}

.order-history {
    display: grid;
    gap: 6px;
    margin-top: 8px;
    padding: 0;
    list-style: none;
}

.order-history li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-left: 12px;
    font-size: 0.76rem;
    border-left: 1px solid var(--line-strong);
}

.order-history small {
    color: var(--muted);
}

.order-detail-progress {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    color: var(--paper-soft);
    font-size: 0.86rem;
    font-weight: 600;
    background: var(--ink);
    border-radius: 999px;
}

/* ---------- confirm dialog ---------- */

.dialog {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.dialog.is-open {
    opacity: 1;
    visibility: visible;
}

.dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 18, 30, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.dialog-panel {
    position: relative;
    z-index: 1;
    width: min(340px, 100%);
    padding: 24px;
    text-align: center;
    background: var(--paper);
    border-radius: 22px;
    box-shadow: 0 30px 70px -24px rgba(24, 18, 30, 0.55);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease;
}

.dialog.is-open .dialog-panel {
    transform: translateY(0) scale(1);
}

.dialog-panel h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}

.dialog-panel p {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.65;
}

.dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
}

.dialog-btn {
    min-height: 46px;
    color: var(--ink);
    font-size: 0.86rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
    border-radius: 999px;
}

.dialog-btn.is-primary {
    color: var(--paper-soft);
    background: var(--ink);
    border-color: var(--ink);
}

.dialog-btn.is-danger {
    color: #fff;
    background: var(--stamp-deep);
    border-color: var(--stamp-deep);
}

.cart-slot {
    margin: 12px 20px 0;
    color: var(--stamp-deep);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ---------- shared decorative icon rules (use.html / admin.html) ---------- */

.coupon-flat-icon::before,
.coupon-flat-icon::after,
.use-icon::before,
.use-icon::after,
.error-icon-flat::before,
.error-icon-flat::after,
.title-flat-icon::before,
.title-flat-icon::after {
    content: '';
    position: absolute;
}

.coupon-flat-icon::before {
    width: 32px;
    height: 24px;
    background: var(--lemon);
    border: 2px solid var(--stamp);
    border-radius: 7px;
    box-shadow: inset 0 -6px 0 rgba(239, 122, 149, 0.18);
}

.coupon-flat-icon::after {
    width: 15px;
    height: 15px;
    border-radius: 999px;
    background: var(--route);
    box-shadow: -17px 0 0 -5px var(--paper-soft), 17px 0 0 -5px var(--paper-soft);
}

/* ---------- keyframes ---------- */

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes eq {
    0%, 100% { height: 5px; }
    50% { height: 15px; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(223, 95, 126, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(223, 95, 126, 0); }
    100% { box-shadow: 0 0 0 0 rgba(223, 95, 126, 0); }
}

/* ---------- tablet / desktop ---------- */

@media (min-width: 820px) {
    :root {
        --header-h: 64px;
        --page-x: 40px;
    }

    .app-main {
        max-width: var(--max-w);
        margin: 0 auto;
        padding-top: calc(var(--header-h) + 46px);
        padding-bottom: 90px;
    }

    .tab-bar {
        display: none;
    }

    .top-nav {
        display: flex;
        margin-right: 8px;
    }

    .brand-title {
        font-size: 1.3rem;
    }

    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        grid-template-areas:
            'kicker timer'
            'title timer'
            'copy timer';
        column-gap: 56px;
        align-items: center;
        padding: 40px 0 24px;
    }

    .hero .eyebrow { grid-area: kicker; }
    .hero-title { grid-area: title; font-size: clamp(4rem, 7.2vw, 6.2rem); }
    .hero-copy { grid-area: copy; }
    .timer-card { grid-area: timer; margin-top: 0; padding: 26px 28px 20px; }

    .timer-days {
        font-size: clamp(4.4rem, 6.2vw, 5.6rem);
    }

    .section {
        padding-top: 56px;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .carousel {
        margin-left: 0;
        margin-right: 0;
    }

    .carousel-track {
        padding-left: 0;
        padding-right: 0;
        scroll-padding-inline: 0;
    }

    .memory-card {
        flex-basis: 300px;
    }

    .carousel-arrow {
        display: grid;
        place-items: center;
    }

    .goals-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }

    .goal-card {
        min-height: 176px;
    }

    .dinner-card {
        margin-top: 36px;
        padding: 20px 24px;
    }

    .dinner-title {
        font-size: 1.35rem;
    }

    .dinner-desc {
        font-size: 0.84rem;
    }

    .menu-categories {
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .me-wallet {
        max-width: 520px;
    }

    .me-section {
        max-width: 780px;
    }

    .menu-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .menu-locked,
    .menu-empty {
        grid-column: 1 / -1;
    }

    .dish-card {
        grid-template-columns: 84px minmax(0, 1fr) 44px;
        padding: 14px;
    }

    .dish-cover {
        width: 84px;
    }

    .sheet-panel-cart,
    .sheet-panel-wallet {
        width: min(560px, calc(100% - 48px));
    }

    .cart-bar {
        bottom: 28px;
    }

    .page-head {
        padding-top: 24px;
    }

    .page-title {
        font-size: 3.4rem;
    }

    .coupon-toolbar {
        max-width: 560px;
        top: calc(var(--header-h) + 18px);
    }

    .coupons-body {
        padding-top: 20px;
        gap: 22px;
    }

    .coupon-group-items {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .sheet {
        align-items: center;
        justify-content: center;
    }

    .sheet-panel {
        width: min(720px, calc(100% - 48px));
        max-height: 88dvh;
        border-radius: 28px;
        transform: translateY(20px) scale(0.98);
    }

    .sheet.is-open .sheet-panel {
        transform: translateY(0) scale(1);
    }

    .sheet-panel-full {
        width: min(760px, calc(100% - 48px));
        height: 86dvh;
    }

    .sheet-panel-tall {
        width: min(680px, calc(100% - 48px));
        height: auto;
        max-height: 90dvh;
    }

    .sheet-panel-center {
        width: 400px;
        margin-bottom: 0;
    }

    .toast {
        bottom: 28px;
    }

    .app-footer {
        padding-top: 80px;
    }
}

@media (max-width: 359px) {
    :root {
        --page-x: 16px;
    }

    .hero-title {
        font-size: clamp(3.1rem, 16.5vw, 3.6rem);
    }

    .timer-days {
        font-size: 3.2rem;
    }

    .ticket-use {
        padding: 0 13px;
        font-size: 0.8rem;
    }

    .history-stamp {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* iOS Safari zooms the page when a focused form control is under 16px. */
@media (max-width: 899px) {
    body input[type="text"],
    body input[type="search"],
    body input[type="number"],
    body input[type="password"],
    body input[type="email"],
    body input[type="url"],
    body input[type="tel"],
    body textarea,
    body select {
        font-size: 16px;
    }

    body .cart-note {
        font-size: 16px;
    }
}
