:root {
  color-scheme: light;
  --paper: #f2f4ef;
  --surface: #fff;
  --ink: #192b24;
  --muted: #4f6156;
  --line: #dce4dc;
  --deep: #102d25;
  --forest: #1a5945;
  --lime: #d8f5a8;
  --tint: #e8f1e8;
  --radius: 20px;
  font-family: Geist, Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
h1,h2,p { margin: 0; }

.top { position: sticky; top: 0; z-index: 3; border-bottom: 1px solid var(--line); background: var(--surface); }
.top-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 72px; max-width: 1250px; margin: auto; padding: 0 32px; }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 12px; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--lime); background: var(--deep); }
.brand-mark i { width: 19px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transform: rotate(-28deg); }
.brand-mark i::before, .brand-mark i::after { content: ''; position: absolute; width: 3px; height: 12px; top: -5px; border-radius: 2px; background: currentColor; }
.brand-mark i::before { left: 2px; }
.brand-mark i::after { right: 2px; }
.navigation { display: flex; gap: 4px; }
.navigation a { display: grid; place-items: center; min-height: 44px; padding: 0 17px; border-radius: 9px; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.navigation a[aria-current] { color: var(--deep); background: var(--tint); font-weight: 750; }
.nav-symbol { display: none; }
.profile-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 160px; padding: 0 10px 0 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: .82rem; font-weight: 650; }
.profile-button:hover { background: var(--paper); }
.profile-avatar { display: grid; flex: 0 0 28px; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--tint); color: var(--forest); }
#profile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.layout { max-width: 1250px; margin: 0 auto; padding: 28px 32px 28px; display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(274px, 1fr); gap: 18px; align-items: start; }
.layout section { scroll-margin-top: 89px; }
.hero { grid-column: 1; grid-row: 1; position: relative; isolation: isolate; display: flex; align-items: end; min-height: 290px; overflow: hidden; border-radius: var(--radius); background: var(--deep); color: white; }
.hero img { z-index: -2; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero::before { content: ''; z-index: -1; position: absolute; inset: 0; background: linear-gradient(92deg, #0d241ded 0%, #142e23b8 42%, #142e2310 93%), linear-gradient(0deg,#0b211e66, transparent 64%); }
.hero-content { padding: 35px; }
.hero h1 { font-size: clamp(2.15rem, 4vw, 3.8rem); letter-spacing: -.04em; line-height: 1.08; }
.hours { margin-top: 13px; color: #e5f2e4; font-size: .91rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.hero-button { min-height: 44px; padding: 0 16px; border: 1px solid transparent; border-radius: 9px; background: var(--lime); color: #1c3429; font-size: .9rem; font-weight: 750; }
.hero-secondary { background: #11271ccc; border-color: #a9baad; color: white; }
.hero-button:focus-visible, .session-leave:focus-visible { outline-color: var(--lime); }
.panel { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.panel-head h2, .rail h2 { font-size: 1.15rem; font-weight: 750; line-height: 1.35; }
.panel-head p { margin-top: 6px; color: var(--muted); font-size: .84rem; }

.occupancy { grid-column: 2; grid-row: 1; min-height: 290px; border: 0; padding: 25px; background: var(--deep); color: #f0f6ef; }
.open-badge { padding: 6px 9px; border: 1px solid #5c7669; border-radius: 999px; color: #e7f0e5; font-size: .73rem; white-space: nowrap; }
.open-badge.open { background: var(--lime); color: #22351f; border-color: transparent; }
.count { display: flex; align-items: baseline; gap: 8px; margin-top: 15px; color: #c2d5c5; font-size: .93rem; }
.count strong { color: var(--lime); font-size: 4rem; line-height: 1; letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.meter { display: flex; gap: 4px; margin: 13px 0 14px; }
.meter span { flex: 1; height: 7px; background: #456257; border-radius: 999px; }
.meter .filled { background: var(--lime); }
.occupancy-note { font-size: .85rem; }
.live-clock { margin-top: 9px; color: #b6c9bb; font-size: .76rem; }
.session-row { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; }
.session-row:has(:not([hidden])) { margin-top: 9px; }
.session-note { color: var(--lime); font-size: .8rem; }
.session-leave { min-height: 42px; border: 0; background: transparent; color: white; text-decoration: underline; text-underline-offset: 3px; font-size: .8rem; }

.schedule { grid-column: 1; grid-row: 2; --status: 132px; --action: 84px; }
.rail { grid-column: 2; grid-row: 2; }
.rail p { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.6; }
.text-button { border: 0; min-height: 42px; color: var(--forest); background: transparent; font-size: .84rem; font-weight: 750; white-space: nowrap; }
.dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 19px 0 16px; }
.date { display: grid; justify-items: center; gap: 5px; min-width: 0; min-height: 58px; padding: 7px 0; border: 1px solid var(--line); border-radius: 9px; background: #f8faf7; color: var(--ink); }
.date span { font-size: .75rem; color: var(--muted); }
.date strong { font-size: 1.15rem; line-height: 1; font-variant-numeric: tabular-nums; }
.date[aria-pressed="true"] { border-color: var(--deep); background: var(--deep); color: white; }
.date[aria-pressed="true"] span { color: #d7e8d8; }
.slot-heading, .slot { display: grid; grid-template-columns: minmax(0, 1fr) var(--status) var(--action); align-items: center; gap: 8px; padding-inline: 8px; }
.slot-heading { border-radius: 7px; padding-block: 9px; background: #f0f4ef; color: var(--muted); font-size: .78rem; }
.slot { min-height: 59px; padding-block: 7px; border-bottom: 1px solid var(--line); }
.slot:last-child { border-bottom: 0; }
.slot-time { font-weight: 750; font-size: .98rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot-time span { color: var(--muted); font-weight: 600; }
.slot-actions { display: contents; }
.slot-status-heading, .slot-actions .badge { justify-self: end; }
.badge { padding: 5px 8px; border-radius: 999px; background: #e9ece8; color: #45564a; font-size: .74rem; font-weight: 650; white-space: nowrap; }
.badge.free, .badge.onsite { background: #e2f3dd; color: #264c37; }
.badge.limited { background: #f9edcf; color: #6c4f13; }
.badge.mine, .badge.reserved { background: #e3efe8; color: #254f3d; }
.primary, .quiet, .slot-button { border: 1px solid transparent; border-radius: 8px; min-height: 41px; padding: 8px 12px; font-size: .84rem; font-weight: 700; white-space: nowrap; }
.primary, .slot-button { background: var(--forest); color: white; }
.primary:hover, .slot-button:not(:disabled):hover { background: var(--deep); }
.quiet, .primary:disabled, .slot-button:disabled { background: #edf0eb; color: #526359; }
.quiet:hover, .primary:disabled:hover { background: #e5ebe5; }
.slot-button { width: 100%; padding-inline: 0; }

.subpage { display: block; max-width: 786px; }
.subpage .panel-head { align-items: center; }
.subpage h1, #status-title { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; }
.mine-count, footer { color: var(--muted); font-size: .8rem; }
footer { grid-column: 1 / -1; }
.empty { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.55; }
.booking { margin-top: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; }
.booking-active { background: #f6f9f5; }
.booking-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.booking-time { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.booking-time span { color: var(--muted); font-size: .82rem; }
.booking-time strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.booking-hint { margin-top: 8px; color: var(--muted); font-size: .83rem; }
.booking-primary { width: 100%; margin-top: 10px; }
.booking-actions, .bookings-cta { margin-top: 10px; }
.location-mark { display: none; }
.location strong { display: block; margin-top: 10px; }
.location p { margin-top: 8px; color: var(--muted); line-height: 1.55; }
.equipment { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.equipment span { padding: 5px 8px; border-radius: 6px; background: var(--tint); color: var(--forest); font-size: .78rem; }

dialog { width: min(430px, calc(100% - 28px)); padding: 22px; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; box-shadow: 0 16px 60px #061e1940; }
dialog::backdrop { background: #132d25aa; }
dialog h2 { font-size: 1.24rem; }
.dialog-head, .dialog-actions { display: flex; gap: 8px; align-items: center; }
.dialog-head { justify-content: space-between; }
.dialog-actions { justify-content: flex-end; margin-top: 13px; }
.close { width: 40px; height: 40px; border: 0; border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 1.28rem; }
.dialog-copy, .nickname-copy { margin-top: 12px; color: var(--muted); line-height: 1.55; white-space: pre-line; font-size: .9rem; }
#nickname-form label { display: block; margin-top: 14px; margin-bottom: 5px; font-size: .83rem; font-weight: 700; }
.nickname-input { display: flex; gap: 7px; }
.nickname-input input { min-width: 0; flex: 1; min-height: 43px; padding: 0 9px; border: 1px solid #a4b7ab; border-radius: 8px; color: var(--ink); font-size: 16px; }
.nickname-error { margin-top: 6px; color: #a7322c; font-size: .84rem; }
.nickname-error:empty { display: none; }
.toast { position: fixed; z-index: 5; bottom: 20px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 20px); width: max-content; padding: 11px 14px; border-radius: 9px; color: #fff; background: var(--deep); font-size: .85rem; }

@media (max-width: 740px) {
  .top-inner { padding: 0 14px; min-height: 57px; }
  .brand { gap: 8px; font-size: .95rem; }
  .brand-mark { width: 33px; height: 33px; border-radius: 8px; }
  .profile-button { max-width: 49%; }
  .navigation { position: fixed; inset: auto 0 0; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 3px; padding: 4px 9px calc(5px + env(safe-area-inset-bottom)); background: white; border-top: 1px solid var(--line); }
  .navigation a { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 52px; padding: 2px 4px; gap: 3px; font-size: 12px; }
  .navigation a[aria-current] { background: transparent; }
  .navigation a:active { background: var(--tint); }
  .navigation a:focus-visible { outline-offset: -2px; }
  .nav-symbol { display: grid; place-items: center; width: 39px; height: 25px; border-radius: 999px; }
  .nav-symbol::before { content: ''; display: block; width: 19px; height: 19px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
  .navigation a[aria-current] .nav-symbol { background: #e7f4e5; color: var(--forest); }
  [data-route="home"] { --icon: url("../miniprogram/assets/nav/home.png"); }
  [data-route="my"] { --icon: url("../miniprogram/assets/nav/booking.png"); }
  [data-route="location"] { --icon: url("../miniprogram/assets/nav/location.png"); }
  .layout { display: flex; flex-direction: column; gap: 12px; padding: 12px 11px calc(76px + env(safe-area-inset-bottom)); }
  .layout > * { width: 100%; }
  .layout section { scroll-margin-top: 68px; }
  .hero { min-height: 211px; border-radius: 16px; }
  .hero-content { padding: 19px 17px; }
  .hero h1 { font-size: clamp(1.95rem, 8vw, 2.3rem); }
  .hours { margin-top: 9px; font-size: .8rem; }
  .hero-actions { margin-top: 14px; }
  .panel { padding: 15px; border-radius: 16px; }
  .occupancy { min-height: 0; padding: 16px; }
  .count { margin-top: 10px; }
  .count strong { font-size: 3rem; }
  .meter { margin: 9px 0; }
  .live-clock { margin-top: 6px; }
  .dates { margin-block: 13px; gap: 4px; }
  .date { min-height: 51px; }
  .schedule { --status: 72px; --action: 64px; }
  .slot-heading, .slot { padding-inline: 3px; gap: 5px; }
  .slot-time { font-size: .86rem; }
  .badge { padding-inline: 6px; }
  .slot .badge { font-size: .69rem; }
  .bookings-cta { width: 100%; }
  .toast { bottom: calc(70px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
