:root {
  font: 16px/1.55 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color-scheme: light;
  --page: #eaf1ed;
  --panel: #fbfefa;
  --soft: #edf4ef;
  --stroke: #c8d9cf;
  --text: #162f29;
  --muted: #496359;
  --primary: #106a59;
  --on-primary: #fff;
  --accent: #106453;
  --header: #f8fdf9;
  --shadow: 0 12px 34px #1b543213;
}
:root[data-site="27"] {
  color-scheme: dark;
  --page: #151325;
  --panel: #241c34;
  --soft: #2d2340;
  --stroke: #514165;
  --text: #f8f2ff;
  --muted: #cdbddd;
  --primary: #e2c0ff;
  --on-primary: #2a193c;
  --accent: #e9cfff;
  --header: #1e172d;
  --shadow: 0 12px 36px #0d081b55;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--page); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1,h2,h3,p,dl,dd { margin: 0; }
h1,h2,h3 { line-height: 1.22; text-wrap: balance; }
h1 { font-size: clamp(1.85rem, 5.8vw, 3rem); font-weight: 830; }
h2 { font-size: clamp(1.2rem, 3vw, 1.52rem); font-weight: 790; }
h3 { font-size: 1.05rem; font-weight: 750; }
small { font-size: .86rem; line-height: 1.4; color: var(--muted); }
.shell-width { width: min(100% - 36px, 920px); margin-inline: auto; }
.shell-header { border-bottom: 1px solid var(--stroke); background: var(--header); }
.shell-header > div { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.brand { display: flex; align-items: center; gap: .65rem; letter-spacing: .07em; white-space: nowrap; font-size: .95rem; }
.brand img { display: block; width: 36px; height: 36px; object-fit: contain; }
.site-label { padding: .27rem .62rem; border: 1px solid var(--stroke); border-radius: 99px; color: var(--muted); font-size: .82rem; text-align: center; }
main { display: grid; gap: 1rem; padding-block: 1rem calc(100px + env(safe-area-inset-bottom)); }
main:focus { outline: none; }
.skip-link { position: fixed; top: .3rem; left: .3rem; padding: .5rem; z-index: 10; transform: translateY(-160%); background: var(--panel); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.dock {
  position: fixed;
  z-index: 4;
  bottom: max(.65rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 20px), 640px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  align-items: stretch;
  gap: .35rem;
  padding: .35rem;
  border: 1px solid var(--stroke);
  border-radius: 1.05rem;
  background: var(--header);
  box-shadow: var(--shadow);
}
.dock a { display: grid; align-content: center; justify-items: center; min-height: 51px; border-radius: .72rem; color: var(--muted); font-size: .82rem; font-weight: 720; }
.dock a span { font-size: 1.05rem; line-height: 1; }
.dock a[aria-current] { color: var(--on-primary); background: var(--primary); }
.message {
  position: fixed;
  z-index: 8;
  inset: auto auto calc(83px + env(safe-area-inset-bottom)) 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90%,550px);
  padding: .75rem 1rem;
  border: 1px solid var(--stroke);
  border-radius: .75rem;
  background: var(--header);
  color: var(--text);
  box-shadow: var(--shadow);
}
.message:empty { display: none; }
.button, .back-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: .61rem .9rem;
  border: 1px solid var(--stroke);
  border-radius: .68rem;
  text-align: center;
  font-weight: 730;
  line-height: 1.25;
}
.button.primary { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.button.secondary, .back-link { background: var(--soft); color: var(--text); }
.button:hover:not(:disabled), .back-link:hover { filter: brightness(1.07); }
.panel, .wallet, .tile, .product, .seat {
  min-width: 0;
  padding: clamp(.9rem, 2.8vw, 1.45rem);
  border: 1px solid var(--stroke);
  border-radius: 1.12rem;
  background: var(--panel);
}
.panel > p + p { margin-top: .65rem; }
.panel > p + .button, .panel > .stats + .button { margin-top: .8rem; }
.section-top, .wallet-top, .log-row, .row-link, .rank-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
}
.section-top { min-height: 1.65rem; margin-bottom: .82rem; }
.section-top h2 { min-width: 0; }
.section-top .button { flex-shrink: 0; }
.page-title { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem .9rem; padding-block: .25rem; }
.page-title p { flex-basis: 100%; color: var(--muted); }
.empty { padding: .6rem 0; color: var(--muted); }
.rows { display: grid; gap: .55rem; }
.row-link, .log-row {
  min-height: 57px;
  padding: .63rem .75rem;
  border: 1px solid var(--stroke);
  border-radius: .74rem;
  background: var(--soft);
}
.row-link strong, .row-link small, .log-row small, .log-row strong { display: block; }
.row-link:hover { border-color: var(--accent); }
.row-link span, .log-row span { min-width: 0; }
.log-row b { flex: 0 0 auto; color: var(--accent); }
.tiles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; }
.tile { display: grid; align-content: start; gap: .2rem; color: var(--text); text-align: start; }
.tile:hover { border-color: var(--accent); }
.tile-icon {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  border: 1px solid var(--stroke); border-radius: .55rem;
  color: var(--accent); background: var(--soft); font-weight: 800;
  margin-bottom: .3rem;
}
.hero {
  position: relative;
  padding: clamp(1.3rem, 5vw, 2.7rem);
  min-height: 230px;
  display: flex;
  align-items: center;
  border: 1px solid var(--stroke);
  border-radius: 1.25rem;
  overflow: hidden;
}
.hero p { margin-top: .52rem; }
.hero h1 { margin-block: .12rem .45rem; }
.hero .button { margin-top: .78rem; }
.hero-actions { display: flex; gap: .55rem; flex-wrap: wrap; }
.lounge-hero {
  color: #fff5ff;
  background: linear-gradient(93deg,#211733 12%,#321f47e6 50%,#251d4d4d), url("assets/monthly-crown-stage.webp") 65% center/cover;
  box-shadow: var(--shadow);
}
.service-hero {
  color: #f0fff8;
  background: radial-gradient(ellipse at 115% 12%,#a8d4a440, transparent 64%),
    repeating-linear-gradient(123deg,transparent 0 22px,#d5f2d112 22px 24px),
    linear-gradient(132deg,#173b34,#206a58 76%);
}
.service-hero .button { background: #e4f5e6; color: #193829; }
.venue-hero { display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr); gap: .85rem; }
.venue-hero > .tiles { grid-template-columns: minmax(0,1fr); }
.venue-hero .tile { grid-template-columns: 2rem minmax(0,1fr); align-content: center; }
.venue-hero .tile-icon { grid-row: span 2; margin-bottom: 0; }
.wallet-top { margin-bottom: .9rem; }
.wallet-top > div > span { color: var(--muted); font-size: .88rem; }
.wallet-hero { background: linear-gradient(105deg,var(--soft),var(--panel) 75%); }
.stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(77px,1fr)); gap: .6rem; }
.stats > div { min-width: 0; padding: .53rem .65rem; border-radius: .65rem; background: var(--soft); border: 1px solid var(--stroke); }
.stats dt { color: var(--muted); font-size: .84rem; }
.stats dd { margin-top: .14rem; font-weight: 800; font-size: clamp(1.01rem,3vw,1.35rem); word-break: break-word; font-variant-numeric: tabular-nums; }
.form { display: grid; justify-items: start; align-content: start; gap: .78rem; }
.form > label { width: min(100%,31rem); display: grid; gap: .28rem; color: var(--muted); font-size: .91rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: .45rem .63rem;
  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: .58rem;
  background: var(--soft);
}
.form .stats { width: 100%; }
.form textarea { resize: vertical; }
dialog { width: min(calc(100% - 30px), 530px); max-height: 84dvh; padding: 0; border: 1px solid var(--stroke); border-radius: 1.15rem; background: var(--panel); color: var(--text); }
dialog::backdrop { background: #0907109e; }
.dialog-content { padding: 1.15rem; }
.copy-value { user-select: all; padding-block: .5rem; }

.segments { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.segments button, .stepper button {
  min-height: 44px;
  padding: .52rem .7rem;
  border: 1px solid var(--stroke);
  border-radius: .58rem;
  background: var(--soft);
  color: var(--text);
  font-weight: 720;
}
.segments [aria-pressed="true"], .table-grid [aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.order-tools, .inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.inline-form { flex: 1 1 15rem; }
.inline-form input { flex: 1 1 8rem; width: auto; }
.menu-layout { display: grid; grid-template-columns: clamp(76px,20vw,130px) minmax(0,1fr); gap: .65rem; }
.menu-layout .segments { flex-direction: column; align-content: stretch; }
.menu-layout .segments button { width: 100%; }
.product-list { display: grid; gap: .55rem; }
.product { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: .72rem; padding: .72rem; }
.product p { color: var(--muted); font-size: .89rem; }
.product .price { color: var(--accent); font-size: .9rem; font-weight: 760; }
.product .price small { display: inline-block; margin-left: .32rem; }
.product-mark { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .7rem; color: var(--accent); background: var(--soft); border: 1px solid var(--stroke); }
.stepper { display: flex; align-items: center; gap: .3rem; }
.stepper button { width: 44px; padding: 0; font-size: 1.15rem; }
.stepper output { min-width: 1em; text-align: center; }
.cart-bar {
  position: sticky; bottom: calc(69px + env(safe-area-inset-bottom)); z-index: 2;
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .62rem .85rem; background: var(--header); box-shadow: var(--shadow); border: 1px solid var(--stroke); border-radius: .9rem;
}
.cart-bar span { color: var(--muted); font-size: .88rem; }
.cart-bar strong { margin-right: auto; }

.table-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .65rem; }
.seat { display: grid; gap: .45rem; align-content: start; background: var(--soft); }
.seat p, .status-label { font-size: .87rem; color: var(--muted); }
.status-label { width: fit-content; padding: .13rem .4rem; border: 1px solid var(--stroke); border-radius: .36rem; background: var(--panel); }
.rank-panel .segments { margin-bottom: .6rem; }
.rank-heading { padding: .33rem 0 .9rem; align-items: baseline; }
.rank-heading p { color: var(--muted); font-size: .87rem; }
.leaders { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .55rem; margin-bottom: .75rem; }
.leaders > div { display: grid; justify-items: center; gap: .2rem; text-align: center; padding: .65rem .35rem; border: 1px solid var(--stroke); border-radius: .8rem; background: var(--soft); }
.leaders > div:first-child { border-color: var(--accent); }
.leaders > div > span:nth-child(2) { font-size: .81rem; color: var(--muted); }
.leaders b, .rank-list b { color: var(--accent); }
.face { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #d7f2e7; color: #174033; font-weight: 800; }
.face.tone-1 { background: #e9dafa; color: #482464; }
.face.tone-2 { background: #f7dcc4; color: #663921; }
.face.tone-3 { background: #c5e2f8; color: #17395c; }
.face.tone-4 { background: #f6d4df; color: #671d3b; }
.rank-list { margin: 0; padding: 0; list-style: none; }
.rank-list li { display: grid; grid-template-columns: 1.45rem 2rem minmax(0,1fr) auto; gap: .58rem; align-items: center; border-top: 1px solid var(--stroke); padding: .53rem .25rem; }
.rank-number { color: var(--muted); font-variant-numeric: tabular-nums; }
.definition { display: grid; gap: .65rem; margin-bottom: .75rem; }
.definition > div { display: grid; grid-template-columns: minmax(7rem,1fr) minmax(0,2fr); gap: .55rem; padding-bottom: .45rem; border-bottom: 1px solid var(--stroke); }
.definition dt { color: var(--muted); }
.definition dd { overflow-wrap: anywhere; font-weight: 700; }
.member-code { display: grid; justify-items: center; gap: .65rem; }
.member-code img { width: min(100%,200px); height: auto; border-radius: .6rem; background: #fff; }
.plain-list { padding-left: 1.35rem; }

@media (max-width: 590px) {
  .shell-width { width: calc(100% - 24px); }
  .venue-hero { grid-template-columns: minmax(0,1fr); }
  .venue-hero > .tiles { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .venue-hero .tile { grid-template-columns: minmax(0,1fr); padding: .7rem; }
  .venue-hero .tile-icon { grid-row: auto; }
  .table-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .product { grid-template-columns: minmax(0,1fr) auto; gap: .35rem; }
  .product-mark { display: none; }
}
@media (max-width: 390px) {
  .stepper { display: grid; grid-template-columns: 44px; justify-items: center; align-self: center; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rank-list li { gap: .35rem; }
  .venue-hero > .tiles { gap: .38rem; }
  .venue-hero .tile { padding: .5rem; }
}

:root[data-site="86"] .rank-heading {
  padding: 1.1rem;
  margin-bottom: .5rem;
  border-radius: .72rem;
  color: #f6fffb;
  background: linear-gradient(90deg, #183c35f5, #23594ebc), url("assets/champion-arena.webp") center/cover;
}
:root[data-site="86"] .rank-heading p { color: #dbf2e9; }
