:root {
    --bg: #f4f7f6;
    --surface: #ffffff;
    --surface-2: #fbfcfc;
    --ink: #102a2e;
    --ink-2: #33484c;
    --muted: #6f8285;
    --line: #e3ebea;
    --primary: #0f766e;
    --primary-strong: #0b5d57;
    --primary-soft: #e6f4f1;
    --amber: #f59e0b;
    --amber-soft: #fff7e6;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --radius: 20px;
    --shadow-xs: 0 1px 2px rgba(16, 42, 46, .04);
    --shadow-sm: 0 8px 24px rgba(16, 42, 46, .06);
    --shadow-md: 0 16px 40px rgba(16, 42, 46, .10);
    --shadow-lg: 0 24px 60px rgba(16, 42, 46, .16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body.modal-open {
    overflow: hidden;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(15, 118, 110, .18);
}

:focus-visible {
    outline: 2px solid rgba(15, 118, 110, .5);
    outline-offset: 2px;
}

.ambient {
    position: fixed;
    z-index: -1;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.ambient-a {
    top: -240px;
    left: -160px;
    width: 560px;
    height: 560px;
    background: rgba(20, 184, 166, .18);
}

.ambient-b {
    top: 240px;
    right: -220px;
    width: 480px;
    height: 480px;
    background: rgba(245, 158, 11, .12);
}

/* ---------- 顶部导航 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid rgba(16, 42, 46, .06);
    background: rgba(244, 247, 246, .82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0b5d57, #14b8a6);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 118, 110, .25);
}

.brand-text strong {
    display: block;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.25;
}

.brand-text small {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .2em;
}

.main-nav {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}

.nav-link {
    padding: 9px 15px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    transition: background .18s ease, color .18s ease;
}

.nav-link:hover {
    background: rgba(15, 118, 110, .06);
    color: var(--ink);
}

.nav-link.is-active {
    background: var(--primary-soft);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #2dd4bf);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}

.badge-amber {
    background: var(--amber-soft);
    color: #b45309;
    border: 1px solid #fde7b0;
}

.badge-red {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid #fecaca;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease, transform .12s ease, box-shadow .18s ease;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 118, 110, .2);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-strong);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
    background: #f1f6f5;
}

.btn-soft {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-soft:hover:not(:disabled) {
    background: #d8eee9;
}

.btn-danger {
    background: var(--danger-soft);
    border-color: #fecaca;
    color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: #fee2e2;
}

.btn-light {
    background: #fff;
    color: #0b3f3b;
}

.btn-light:hover:not(:disabled) {
    background: #ecfdf9;
    transform: translateY(-1px);
}

.btn-ghost-light {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .25);
    color: #fff;
}

.btn-ghost-light:hover:not(:disabled) {
    background: rgba(255, 255, 255, .2);
}

.btn-sm {
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* ---------- 页面与视图 ---------- */
.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 24px 72px;
}

.view {
    display: none;
}

.view.is-active {
    display: block;
    animation: fadeUp .35s ease both;
}

.eyebrow {
    display: inline-block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .24em;
    text-transform: uppercase;
}

.muted {
    color: var(--muted);
}

/* ---------- 首页 Hero ---------- */
.hero {
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    gap: 22px;
    margin-bottom: 26px;
}

.hero-copy {
    position: relative;
    overflow: hidden;
    padding: clamp(28px, 4vw, 46px);
    border-radius: 28px;
    background: linear-gradient(135deg, #0b3f3b 0%, #0f766e 58%, #14b8a6 100%);
    color: #fff;
    box-shadow: 0 24px 60px rgba(11, 63, 59, .22);
}

.hero-copy::after {
    position: absolute;
    right: -90px;
    bottom: -140px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%);
    content: "";
}

.hero-copy .eyebrow {
    color: rgba(255, 255, 255, .6);
}

.hero-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(32px, 4.2vw, 50px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.12;
}

.hero-copy p {
    max-width: 430px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-stats {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.stat-card strong {
    font-size: clamp(25px, 3vw, 33px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.1;
}

.stat-card span {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
}

.stat-card.is-accent {
    border-color: #fde7b0;
    background: linear-gradient(135deg, #fff9ec, #fff);
}

.stat-card.is-accent strong {
    color: #b45309;
}

/* ---------- 主体布局 ---------- */
.layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.sidebar {
    position: sticky;
    top: 92px;
    min-width: 0;
    padding: 18px;
}

.sidebar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.sidebar-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.sidebar-head .muted {
    font-size: 11px;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: min(58vh, 520px);
    overflow: auto;
    padding-right: 2px;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    text-align: left;
    transition: background .16s ease, color .16s ease;
}

.category-btn .cat-dot {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: .65;
}

.category-btn .cat-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-btn .cat-count {
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: #f1f5f5;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.category-btn:hover {
    background: #f2f7f6;
    color: var(--ink);
}

.category-btn.is-active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 700;
}

.category-btn.is-active .cat-count {
    background: rgba(15, 118, 110, .12);
    color: var(--primary);
}

.sidebar-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
}

.dot {
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .12);
}

.content {
    min-width: 0;
}

.content-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.content-head h2 {
    margin: 0;
    font-size: clamp(21px, 2.4vw, 26px);
    font-weight: 800;
    letter-spacing: -.02em;
}

.content-head p {
    margin: 2px 0 0;
    font-size: 12.5px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 280px;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: border-color .18s ease, box-shadow .18s ease;
}

.search-box:focus-within {
    border-color: rgba(15, 118, 110, .45);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}

.search-box svg {
    flex: none;
    color: var(--muted);
}

.search-box input {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    font-size: 13.5px;
}

/* ---------- 档口目录：分组 + 紧凑列表 ---------- */
.list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 11.5px;
}

.sort-control select {
    width: auto;
    height: 34px;
    padding: 0 28px 0 10px;
    border-radius: 9px;
    background-color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.directory {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-block {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.category-block.is-single {
    border-color: #dce8e5;
    box-shadow: var(--shadow-sm);
}

.category-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border: 0;
    border-bottom: 1px solid #f1f5f5;
    background: #fbfcfc;
    color: var(--ink);
    text-align: left;
    transition: background .16s ease;
}

.category-head:hover {
    background: #f4f9f7;
}

.category-head.is-static {
    cursor: default;
}

.category-head.is-static:hover {
    background: #fbfcfc;
}

.category-head .cat-dot {
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.category-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-stats {
    margin-left: auto;
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    white-space: nowrap;
}

.category-chevron {
    flex: none;
    margin-left: 2px;
    color: #9fb0b2;
    font-size: 12px;
}

.stall-list {
    display: flex;
    flex-direction: column;
}

.stall-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 9px 16px;
    border: 0;
    border-top: 1px solid #f3f7f6;
    background: var(--surface);
    color: var(--ink);
    text-align: left;
    transition: background .14s ease;
}

.stall-list .stall-row:first-child {
    border-top: 0;
}

.stall-row:hover {
    background: #f8fbfa;
}

.slot-badge {
    display: grid;
    place-items: center;
    flex: none;
    width: 56px;
    height: 27px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.slot-badge.is-empty {
    background: #f1f5f5;
    color: #9aa9ab;
    font-weight: 500;
}

.stall-row-main {
    flex: 1;
    min-width: 0;
}

.stall-row-name {
    display: block;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stall-row-score {
    flex: none;
    width: 72px;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.stall-row-score.is-empty {
    color: #a7b4b6;
    font-weight: 500;
}

.stall-row-reviews {
    flex: none;
    width: 44px;
    color: var(--muted);
    font-size: 10.5px;
    text-align: right;
    white-space: nowrap;
}

.stall-row-arrow {
    flex: none;
    width: 12px;
    color: #b8c6c7;
    font-size: 16px;
    line-height: 1;
    text-align: right;
}

.category-more {
    width: 100%;
    padding: 10px 16px;
    border: 0;
    border-top: 1px dashed var(--line);
    background: #fbfcfc;
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
    text-align: center;
    transition: background .15s ease;
}

.category-more:hover {
    background: #f2f8f6;
}

.skeleton-section {
    height: 132px;
    border-radius: 16px;
}

/* ---------- 档口卡片（保留旧样式，当前目录视图不再使用） ---------- */
.canteen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 14px;
}

.stall-card {
    display: flex;
    flex-direction: column;
    min-height: 188px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.stall-card:hover {
    transform: translateY(-3px);
    border-color: #cfe3df;
    box-shadow: var(--shadow-md);
}

.stall-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 13px;
}

.stall-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    box-shadow: 0 6px 14px rgba(15, 118, 110, .22);
}

.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border: 1px solid #fde7b0;
    border-radius: 999px;
    background: #fff8e8;
    color: #b45309;
    font-size: 12px;
    font-weight: 800;
}

.score-pill.is-empty {
    border-color: var(--line);
    background: #f4f7f7;
    color: var(--muted);
    font-weight: 600;
}

.stall-card h3 {
    display: -webkit-box;
    overflow: hidden;
    min-height: 44px;
    margin: 0 0 4px;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.stall-category {
    margin: 0 0 14px;
    color: var(--muted);
    font-size: 11.5px;
}

.stall-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f5;
}

.stall-card-foot .muted {
    font-size: 11px;
}

/* ---------- 排行榜 ---------- */
.section-heading {
    margin: 4px 0 26px;
}

.section-heading h1 {
    margin: 8px 0 6px;
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.15;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
    margin-bottom: 24px;
}

@media (min-width: 761px) {
    .podium.is-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 720px;
        margin-right: auto;
        margin-left: auto;
    }

    .podium.is-one {
        grid-template-columns: minmax(0, 360px);
        justify-content: center;
    }
}

.podium-card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.podium-card.is-first {
    padding-top: 28px;
    padding-bottom: 28px;
    border-color: #fde68a;
    background: linear-gradient(180deg, #fffbeb, #fff);
    box-shadow: 0 18px 40px rgba(180, 83, 9, .12);
    transform: translateY(-14px);
}

.podium-medal {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #f1f5f5;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.podium-card.is-first .podium-medal {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    box-shadow: 0 6px 16px rgba(245, 158, 11, .35);
}

.podium-card h3 {
    margin: 0 0 4px;
    font-size: 15.5px;
    line-height: 1.4;
}

.podium-card .muted {
    font-size: 11.5px;
}

.podium-score {
    margin-top: 10px;
    color: #b45309;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1;
}

.podium-score small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.podium-card .btn {
    margin-top: 14px;
}

.ranking-layout {
    display: grid;
    grid-template-columns: 1.35fr .65fr;
    gap: 18px;
    align-items: start;
}

.ranking-card,
.category-best-card {
    padding: 22px;
}

.card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.card-head .muted {
    font-size: 11.5px;
}

.ranking-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.mode-switch {
    display: flex;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: #f1f5f5;
}

.mode-btn {
    padding: 5px 10px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 600;
}

.mode-btn:hover {
    color: var(--ink);
}

.mode-btn.is-active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.ranking-group + .ranking-group {
    margin-top: 16px;
}

.ranking-group-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 700;
}

.ranking-group-title .muted {
    font-size: 11px;
    font-weight: 400;
}

.ranking-group:first-child .ranking-group-title {
    padding-top: 0;
    border-top: 0;
}

.ranking-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid #f1f5f5;
}

.ranking-row:last-child {
    border-bottom: 0;
}

.rank-num {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #f3f7f7;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.rank-num.is-top {
    background: var(--amber-soft);
    color: #b45309;
}

.ranking-main {
    min-width: 0;
}

.ranking-name {
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-meta {
    color: var(--muted);
    font-size: 11.5px;
}

.ranking-score {
    margin-left: auto;
    color: #b45309;
    font-size: 15px;
    font-weight: 800;
}

.ranking-open {
    flex: none;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
}

.ranking-open:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.best-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid #f1f5f5;
}

.best-row:last-child {
    border-bottom: 0;
}

.best-row-main {
    min-width: 0;
}

.best-row-main strong {
    display: block;
    overflow: hidden;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.best-row-main span {
    color: var(--muted);
    font-size: 11px;
}

.best-score {
    margin-left: auto;
    color: #b45309;
    font-size: 13px;
    font-weight: 800;
}

/* ---------- 管理后台 ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.admin-shell {
    overflow: hidden;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: #fbfcfc;
    scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar {
    display: none;
}

.admin-tab {
    padding: 9px 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-tab:hover {
    color: var(--ink);
}

.admin-tab.is-active {
    background: #fff;
    color: var(--primary);
    box-shadow: var(--shadow-xs);
}

.admin-body {
    padding: 24px;
}

.admin-section {
    display: none;
}

.admin-section.is-active {
    display: block;
    animation: fadeUp .25s ease both;
}

.admin-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.admin-section-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.admin-section-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12.5px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.inline-form input,
.inline-form select {
    flex: 1 1 220px;
    height: 42px;
}

.inline-form .btn {
    height: 42px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 540px;
    overflow: auto;
    padding-right: 2px;
}

.admin-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fcfdfd;
}

.admin-row-main {
    flex: 1;
    min-width: 0;
}

.admin-row-main strong {
    font-size: 13.5px;
    font-weight: 600;
}

.admin-row-main p {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 11.5px;
}

.admin-comment {
    margin-top: 5px !important;
    color: var(--ink-2) !important;
    font-size: 12.5px !important;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.admin-row-actions {
    display: flex;
    flex: none;
    gap: 8px;
}

.admin-empty {
    padding: 30px 16px;
    border: 1px dashed var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 14px;
}

.chip {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.chip:hover {
    color: var(--ink);
}

.chip.is-active {
    border-color: #b9e3dc;
    background: var(--primary-soft);
    color: var(--primary);
}

.maintenance-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 14px;
    background: var(--surface-2);
}

.maintenance-box strong {
    font-size: 14px;
}

.maintenance-box p {
    margin: 3px 0 0;
    font-size: 12px;
}

.form-hint {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--primary);
    font-size: 12.5px;
}

/* ---------- 通用表单 ---------- */
input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: 0;
    background: var(--surface-2);
    font-size: 14px;
    font-weight: 400;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(15, 118, 110, .55);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(15, 118, 110, .08);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
}

.field > span {
    color: var(--ink-2);
    font-size: 12.5px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-error {
    margin: 0;
    padding: 9px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger);
    font-size: 12.5px;
}

/* ---------- 弹层 ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.is-open {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 24, 26, .55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn .2s ease both;
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    padding: 28px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    animation: popIn .26s cubic-bezier(.2, .8, .2, 1) both;
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    font-size: 21px;
    line-height: 1;
}

.icon-btn:hover {
    background: #f3f7f7;
    color: var(--ink);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
}

.modal-head {
    margin-bottom: 20px;
}

.modal-head h2 {
    margin: 0 0 5px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.03em;
}

.modal-head p {
    margin: 0;
    color: var(--muted);
    font-size: 12.5px;
}

.modal-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 12px;
    border-radius: 13px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
}

.modal-footnote {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 11.5px;
    text-align: center;
}

.auth-card {
    width: min(420px, 100%);
}

/* ---------- 详情抽屉 ---------- */
.modal-detail {
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
}

.detail-sheet {
    position: relative;
    z-index: 1;
    width: min(740px, 100%);
    height: 100%;
    overflow: auto;
    background: var(--bg);
    box-shadow: -20px 0 60px rgba(0, 0, 0, .18);
    animation: slideIn .3s cubic-bezier(.2, .8, .2, 1) both;
}

.detail-close {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
}

.detail-content {
    padding-bottom: 36px;
}

.detail-photo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.dish-photo-row + .dish-photo-row {
    margin-top: 12px;
}

.detail-photo,
.review-photo {
    display: block;
    border-radius: 10px;
}

.detail-photo {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.review-photo {
    max-width: min(100%, 360px);
    max-height: 320px;
    margin-top: 8px;
    object-fit: contain;
}

.photo-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
    margin-top: 6px;
}

.photo-controls input {
    max-width: 220px;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 38px clamp(22px, 4.5vw, 44px) 30px;
    background: linear-gradient(135deg, #0b3f3b, #0f766e 65%, #14b8a6);
    color: #fff;
}

.detail-hero::after {
    position: absolute;
    pointer-events: none;
    right: -80px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 70%);
    content: "";
}

.detail-hero h2 {
    position: relative;
    margin: 9px 0 5px;
    font-size: clamp(24px, 3.2vw, 34px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.detail-meta {
    color: rgba(255, 255, 255, .68);
    font-size: 12.5px;
}

.detail-score-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 22px;
}

.detail-score {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -.05em;
    line-height: 1;
}

.detail-score small {
    color: rgba(255, 255, 255, .58);
    font-size: 15px;
    font-weight: 500;
}

.detail-score-row .btn {
    margin-left: auto;
}

.stars {
    display: inline-flex;
    gap: 1px;
    color: #fbbf24;
    font-size: 15px;
    letter-spacing: .5px;
}

.stars .is-empty {
    color: #dbe4e4;
}

.detail-hero .stars .is-empty {
    color: rgba(255, 255, 255, .25);
}

.stars-sm {
    font-size: 12px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.tag-light {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

.detail-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px clamp(16px, 4vw, 34px);
}

.detail-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}

.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.panel-head h3,
.detail-panel > h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 800;
}

.panel-head h3 {
    margin: 0;
}

.panel-head .muted {
    font-size: 11.5px;
}

.chart-wrap {
    position: relative;
    height: 220px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid #f1f5f5;
}

.comment-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.comment-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.comment-main {
    flex: 1;
    min-width: 0;
}

.comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-user {
    font-size: 13.5px;
    font-weight: 700;
}

.comment-time {
    color: var(--muted);
    font-size: 11px;
}

.comment-text {
    margin: 6px 0 7px;
    color: var(--ink-2);
    font-size: 13.5px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    gap: 12px;
}

.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
}

.link-btn:hover {
    color: var(--danger);
}

/* ---------- 星级输入 ---------- */
.star-input {
    display: flex;
    align-items: center;
    gap: 4px;
}

.star-btn {
    padding: 0;
    border: 0;
    background: none;
    color: #dbe4e4;
    font-size: 30px;
    line-height: 1;
    transition: color .12s ease, transform .12s ease;
}

.star-btn.is-active {
    color: var(--amber);
}

.star-btn:hover {
    transform: scale(1.08);
}

.star-value {
    margin-left: 8px;
    color: #b45309;
    font-size: 17px;
    font-weight: 800;
}

/* ---------- Toast ---------- */
.toast-stack {
    position: fixed;
    top: 82px;
    right: 22px;
    z-index: 110;
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: min(340px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 12px;
    background: #0f2b2d;
    color: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .22);
    font-size: 12.5px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .22s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: none;
}

.toast-success {
    background: #065f46;
}

.toast-error {
    background: #7f1d1d;
}

.toast-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    font-size: 11px;
    font-weight: 800;
}

/* ---------- 空状态 / 骨架屏 ---------- */
.empty-state {
    grid-column: 1 / -1;
    padding: 52px 20px;
    border: 1px dashed var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

.empty-icon {
    margin-bottom: 8px;
    font-size: 30px;
}

.empty-state h3 {
    margin: 0 0 4px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.empty-state p {
    margin: 0;
    font-size: 12.5px;
}

.skeleton {
    border-radius: 12px;
    background: linear-gradient(90deg, #eef3f2 25%, #e4ecea 37%, #eef3f2 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
}

.skeleton-card {
    height: 188px;
    border-radius: 18px;
}

.skeleton-line {
    height: 38px;
    margin-bottom: 7px;
    border-radius: 10px;
}

.file-tip {
    max-width: 1180px;
    margin: 16px auto 0;
    padding: 13px 16px;
    border: 1px solid #fde68a;
    border-radius: 14px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    line-height: 1.6;
}

.file-tip code {
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(146, 64, 14, .09);
}

.file-tip a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: underline;
}

/* ---------- 动画 ---------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(36px); opacity: .4; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .ranking-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-rows: auto;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        padding: 14px;
    }

    .sidebar-note {
        display: none;
    }

    .category-nav {
        flex-direction: row;
        gap: 8px;
        max-height: none;
        padding-bottom: 3px;
        overflow-x: auto;
    }

    .category-btn {
        flex: 0 0 auto;
        width: auto;
        padding: 8px 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #fff;
        font-size: 12.5px;
    }

    .category-btn .cat-dot {
        display: none;
    }

    .category-btn .cat-count {
        margin-left: 0;
    }

    .category-btn.is-active {
        border-color: #b9e3dc;
    }

    .podium {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 760px) {
    body {
        padding-bottom: 86px;
    }

    /* backdrop-filter 会让 header 成为 fixed 子元素的包含块，移动端底栏必须脱离它 */
    .site-header {
        background: rgba(244, 247, 246, .96);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .header-inner {
        gap: 12px;
        padding: 12px 16px;
    }

    .brand-text small {
        display: none;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .brand-text strong {
        font-size: 16px;
    }

    .main-nav {
        position: fixed;
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        left: 12px;
        z-index: 60;
        justify-content: space-around;
        margin: 0;
        padding: 6px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: rgba(255, 255, 255, .95);
        box-shadow: var(--shadow-lg);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .nav-link {
        flex: 1;
        padding: 10px 8px;
        font-size: 12.5px;
    }

    .page {
        padding: 18px 16px 24px;
    }

    .hero {
        gap: 14px;
    }

    .hero-copy {
        padding: 26px 22px;
        border-radius: 22px;
    }

    .hero-copy h1 {
        font-size: 34px;
    }

    .hero-copy p {
        font-size: 13.5px;
    }

    .hero-stats {
        gap: 8px;
    }

    .stat-card {
        padding: 12px 10px;
        border-radius: 14px;
    }

    .stat-card strong {
        font-size: 21px;
    }

    .stat-card span {
        margin-top: 3px;
        font-size: 10.5px;
    }

    .content-head {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .search-box {
        flex-basis: auto;
    }

    .podium {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .podium-card.is-first {
        order: -1;
        transform: none;
    }

    .ranking-card,
    .category-best-card {
        padding: 17px;
    }

    .admin-body {
        padding: 17px;
    }

    .admin-row {
        flex-wrap: wrap;
    }

    .admin-row-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .maintenance-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .modal-detail {
        padding: 0;
    }

    .detail-sheet {
        width: 100%;
    }

    .detail-hero {
        padding-top: 34px;
    }

    .detail-score-row .btn {
        margin-left: 0;
    }

    .field-row {
        grid-template-columns: 1fr;
    }

    .toast-stack {
        top: 76px;
        right: 16px;
    }
}

@media (max-width: 520px) {
    .stat-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-copy {
        padding: 22px;
    }

    .hero-copy .eyebrow,
    .hero-copy p {
        display: none;
    }

    .hero-copy h1 {
        margin: 0 0 18px;
        font-size: 30px;
    }

    .modal.modal-detail {
        padding: 0;
    }

    .user-name {
        display: none;
    }

    .canteen-grid {
        grid-template-columns: 1fr;
    }

    .list-toolbar {
        align-items: center;
        flex-wrap: nowrap;
        gap: 8px;
        margin-bottom: 10px;
    }

    .toolbar-left {
        flex: 1 1 auto;
    }

    #expand-all,
    #collapse-all {
        display: none !important;
    }

    .sort-control {
        flex: none;
        margin-left: 0;
    }

    .category-head {
        padding: 12px 13px;
    }

    .category-stats {
        font-size: 10.5px;
    }

    .stall-row {
        gap: 9px;
        padding: 9px 12px;
    }

    .slot-badge {
        width: 50px;
    }

    .stall-row-score {
        width: 64px;
        font-size: 11.5px;
    }

    .stall-row-reviews {
        display: none;
    }

    .category-more {
        padding: 10px 12px;
    }

    .admin-tabs {
        padding: 7px;
    }

    .admin-tab {
        padding: 8px 11px;
        font-size: 12px;
    }

    .modal {
        padding: 12px;
    }

    .modal-card {
        padding: 22px;
        border-radius: 20px;
    }

    .detail-body {
        padding: 14px;
    }

    .detail-panel {
        padding: 16px;
    }

    .chart-wrap {
        height: 190px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
