:root {
  --green: #0e6b3c;
  --green-dark: #0b4d2c;
  --ink: #17241c;
  --muted: #5d6f64;
  --line: #e2ebe4;
  --bg: #f3f6f2;
  --card: #ffffff;
  --ball: #e5f07a;
  --danger: #b42318;
  --amber: #8a5a00;
  --shadow: 0 10px 30px rgba(18, 48, 32, 0.08);
  --sans: "PingFang SC", "HarmonyOS Sans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #d7e4da;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
a { color: inherit; }
button, input, select { font-family: inherit; font-size: 16px; }
button { cursor: pointer; }
.stage { min-height: 100vh; }
.phone {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.helper {
  position: fixed;
  top: 18vh;
  right: 12px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 84px;
  touch-action: none;
  text-decoration: none;
  animation: helper-pop 0.5s ease both;
}
.helper-label {
  display: block;
  padding: 4px 10px 5px;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  box-shadow: 0 6px 14px rgba(14, 107, 60, 0.28);
}
.helper-label:after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: -2px auto -8px;
  background: var(--green);
  transform: rotate(45deg);
}
.helper-ball {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.95) 0 7px, transparent 8px),
    radial-gradient(circle at 72% 38%, #143024 0 4px, transparent 5px),
    radial-gradient(circle at 58% 74%, #143024 0 4px, transparent 5px),
    var(--ball);
  box-shadow: 0 12px 20px rgba(18, 40, 28, 0.24), inset 0 -8px 0 rgba(20, 48, 36, 0.08);
  animation: helper-float 2.4s ease-in-out infinite;
}
.helper-ball:before,
.helper-ball:after {
  content: "";
  position: absolute;
  top: 26px;
  width: 8px;
  height: 10px;
  border-radius: 50%;
  background: #143024;
}
.helper-ball:before { left: 18px; }
.helper-ball:after { right: 18px; }
.helper-smile {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 16px;
  height: 10px;
  border-bottom: 3px solid #143024;
  border-radius: 0 0 12px 12px;
}
.helper.dragging .helper-ball { animation: none; }
@keyframes helper-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
@keyframes helper-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (min-width: 900px) {
  .helper { right: calc(50vw - 210px + 16px); top: 16vh; }
}
.screen { flex: 1; padding: 0 16px 28px; }
.demo {
  background: #183226;
  color: var(--ball);
  font-size: 12px;
  text-align: center;
  padding: 7px 12px;
}
.tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  padding: 6px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 5;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
}
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.tabbar a.on { color: var(--green); font-weight: 700; }
.hero {
  position: relative;
  overflow: hidden;
  margin: 0 -16px 18px;
  padding: 22px 18px 20px;
  background: var(--green);
  color: white;
  border-radius: 0 0 28px 28px;
}
.hero:before,
.hero:after {
  content: "";
  position: absolute;
  border-radius: 50%;
}
.hero:before {
  width: 190px;
  height: 190px;
  border: 16px solid rgba(229, 240, 122, 0.28);
  right: -48px;
  top: -58px;
}
.hero:after {
  width: 72px;
  height: 72px;
  background: rgba(229, 240, 122, 0.16);
  left: -18px;
  bottom: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; position: relative; }
.mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ball);
  box-shadow: inset 0 0 0 8px rgba(20, 48, 36, 0.18);
}
.brand strong { display: block; font-size: 16px; }
.brand em { display: block; font-style: normal; font-size: 12px; opacity: 0.8; }
.hero h1 { position: relative; margin: 22px 0 6px; font-size: 30px; letter-spacing: -0.04em; }
.hero .slogan { margin: 26px 0 10px; font-size: 38px; line-height: 1.08; letter-spacing: 0.06em; font-weight: 800; }
.hero .slogan span { display: block; }
.hero .slogan span:last-child { color: var(--ball); }
.hero p { position: relative; margin: 0; color: rgba(255, 255, 255, 0.84); font-size: 14px; }
.hero-meta { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.hero-meta div { background: rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 10px 8px; }
.hero-meta b { display: block; font-size: 14px; }
.hero-meta span { font-size: 12px; opacity: 0.75; }
.cta, .ghost {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
}
.cta { background: var(--ball); color: #17240b; }
.hero .cta { position: relative; margin-top: 4px; box-shadow: 0 8px 18px rgba(14, 30, 18, 0.18); }
.gallery { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0 4px; scroll-snap-type: x mandatory; }
.shot {
  flex: none;
  width: 78%;
  scroll-snap-align: start;
  border: 0;
  padding: 0;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  text-align: left;
  color: inherit;
}
.shot img { display: block; width: 100%; height: 168px; object-fit: cover; background: #d7e4da; }
.shot span { display: block; padding: 8px 12px 10px; font-size: 13px; font-weight: 700; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(10, 20, 14, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 78vh; border-radius: 12px; background: #d7e4da; }
.lightbox-close {
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  padding: 8px 16px;
  font-weight: 700;
}
.cta.slim { margin-top: 12px; }
.ghost { background: white; color: var(--ink); border: 1px solid var(--line); margin-top: 10px; }
.ghost.danger { color: var(--danger); }
.page-head { padding: 18px 0 8px; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.back { color: var(--green); text-decoration: none; font-size: 14px; font-weight: 700; }
.block { margin-top: 8px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; }
.block-head h2, .summary h2 { margin: 0; font-size: 18px; }
.block-head a { color: var(--green); font-size: 14px; font-weight: 700; text-decoration: none; }
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 12px; }
.dates a {
  flex: none;
  width: 64px;
  text-align: center;
  text-decoration: none;
  background: white;
  border-radius: 16px;
  padding: 8px 0;
  border: 1px solid transparent;
}
.dates small { display: block; color: var(--muted); font-size: 12px; }
.dates b { display: block; font-size: 18px; }
.dates a.on { background: var(--green); color: white; }
.dates a.on small { color: rgba(255, 255, 255, 0.8); }
.filters { display: flex; gap: 8px; margin-bottom: 8px; }
.filters.wrap { flex-wrap: wrap; }
.filters a {
  text-decoration: none;
  background: white;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  color: var(--muted);
}
.filters a.on { background: #173226; color: white; }
a.court { display: block; text-decoration: none; color: inherit; }
.row-actions { display: flex; gap: 8px; margin-top: 8px; }
.row-actions form { flex: 1; }
.cta.mini, .ghost.mini { margin-top: 0; padding: 10px 8px; }
.court, .summary, .info, .notice, .order-card, .upcoming, .profile, .menu {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.court, .notice, .order-card { padding: 14px; margin: 10px 0; }
.court h3, .notice h3 { margin: 8px 0 4px; font-size: 18px; }
.court p, .notice p, .hint, .full, .empty, .ops { color: var(--muted); font-size: 14px; }
.court-top, .order-top, .court-foot, .order-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tag { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 8px; background: #e7f6ee; color: var(--green-dark); }
.tag.outdoor { background: #fff4d8; color: var(--amber); }
.remain { color: var(--muted); font-size: 12px; }
.price b { font-size: 20px; }
.price span { display: block; color: var(--muted); font-size: 12px; }
.court-foot a {
  text-decoration: none;
  background: var(--green);
  color: white;
  border-radius: 12px;
  padding: 8px 14px;
  font-weight: 700;
}
.upcoming { display: block; text-decoration: none; padding: 14px; margin: 12px 0; }
.upcoming span, .voucher span { color: var(--green); font-size: 12px; font-weight: 700; }
.upcoming strong, .voucher strong { display: block; margin-top: 4px; font-size: 18px; }
.upcoming em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 13px; }
.info { padding: 4px 14px; }
.info p, .info.plain p { display: flex; gap: 12px; margin: 12px 0; }
.info span { width: 42px; flex: none; color: var(--muted); }
.notice-text { white-space: normal; }
.hint { margin: 8px 0 14px; }
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.slot { position: relative; }
.slot input { position: absolute; opacity: 0; }
.slot span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  padding: 12px 10px;
}
.slot b { font-size: 15px; letter-spacing: 0; }
.slot small { color: var(--muted); font-size: 13px; }
.slot input:checked + span { background: var(--green); color: white; border-color: var(--green); }
.slot input:checked + span small { color: rgba(255, 255, 255, 0.8); }
.slot.off span { background: #eef2ef; color: #9aa79e; }
.book-court .cta { margin-top: 4px; }
.court-picks { display: flex; gap: 8px; margin: 4px 0 12px; }
.court-picks .pick {
  flex: 1;
  border: 0;
  background: white;
  border-radius: 14px;
  padding: 12px 0;
  font-weight: 700;
  color: var(--ink);
}
.court-picks .pick.on { background: var(--green); color: white; }
.sheet[hidden] { display: none; }
.sheet-name { margin: 0 0 8px; font-size: 15px; font-weight: 700; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 4px; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.swatch.open { background: white; border: 1px solid var(--line); }
.swatch.mine { background: var(--green); }
.swatch.taken { background: #d5ddd8; }
.swatch.held { background: #f3d48a; }
.matrix-wrap { overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 4px; }
.matrix { border-collapse: separate; border-spacing: 4px; min-width: 100%; }
.matrix th, .matrix td { padding: 0; }
.matrix thead th, .matrix tbody th {
  position: sticky;
  left: 0;
  background: var(--bg);
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  min-width: 72px;
  max-width: 92px;
}
.matrix thead th { font-weight: 600; color: var(--muted); min-width: 36px; text-align: center; position: static; }
.matrix thead th:first-child { position: sticky; left: 0; text-align: left; min-width: 72px; }
.cell { display: grid; place-items: center; width: 42px; height: 36px; border-radius: 8px; font-size: 11px; font-weight: 700; }
.cell.open { position: relative; background: white; border: 1px solid var(--line); color: var(--ink); }
.cell input { position: absolute; opacity: 0; }
.cell.open:has(input:checked) { background: var(--green); color: white; border-color: var(--green); }
.cell.taken { background: #d5ddd8; color: #66756c; }
.cell.held { background: #f3d48a; color: #6d4b00; }
.cell.past { background: transparent; }
.matrix-bar {
  position: sticky;
  bottom: 64px;
  background: white;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.live-total {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #eef6f0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.live-total.on { background: #173226; color: white; }
.promises { list-style: none; padding: 0; margin: 0 0 12px; }
.promises li {
  background: white;
  border-radius: 14px;
  padding: 10px 12px;
  margin: 8px 0;
  font-size: 14px;
}
.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 14px; }
.steps li {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  background: white;
  border-radius: 999px;
  padding: 7px 0;
}
.steps li.on { background: var(--green); color: white; font-weight: 700; }
.summary { padding: 16px; margin-bottom: 14px; }
.summary ul { list-style: none; padding: 0; margin: 12px 0; }
.summary li, .total { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.total strong { font-size: 24px; }
.form label, .login-card label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0; }
.form input, .form select, .login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  padding: 12px;
  color: var(--ink);
}
.form .check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 15px; }
.form .check input { width: auto; margin: 0; }
.pay-card { text-align: center; }
.pay-amount { display: block; font-size: 40px; margin-top: 8px; }
.order-card { display: block; text-decoration: none; }
.order-foot { margin-top: 8px; color: var(--muted); font-size: 12px; }
.order-foot b { color: var(--ink); font-size: 16px; }
.pill { border-radius: 999px; padding: 3px 8px; font-size: 12px; background: #eef2ef; color: var(--muted); }
.st-pending { background: #fff4d8; color: var(--amber); }
.st-reserved { background: #e7f0ff; color: #1d4e89; }
.st-paid { background: #e7f6ee; color: var(--green-dark); }
.st-used { background: #eef2ef; color: #526158; }
.st-noshow { background: #fff4d8; color: var(--amber); }
.st-cancelled, .st-refunded { background: #fdeceb; color: var(--danger); }
.voucher { text-align: center; background: #173226; color: white; border-radius: 18px; padding: 18px; margin-bottom: 12px; }
.voucher strong { font-size: 40px; letter-spacing: 0.18em; }
.voucher p { margin: 4px 0 0; opacity: 0.75; }
.profile { display: flex; gap: 12px; align-items: center; padding: 16px; }
.profile p { margin: 2px 0 0; color: var(--muted); }
.avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: white;
  display: grid; place-items: center; font-size: 22px; font-weight: 700;
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.stats div { background: white; border-radius: 16px; padding: 14px; }
.stats b { display: block; font-size: 22px; }
.stats span, .menu { color: var(--muted); }
.menu { display: block; text-decoration: none; padding: 14px; margin: 10px 0; font-weight: 700; color: var(--ink); }
.empty { text-align: center; padding: 28px 10px; }
.ops { text-align: center; margin-top: 28px; }
.ops a { color: var(--muted); }
.msgs { display: grid; gap: 8px; margin-top: 12px; }
.msg { border-radius: 12px; padding: 10px 12px; background: #e7f6ee; color: var(--green-dark); font-size: 14px; }
.msg.error { background: #fdeceb; color: var(--danger); }
.chat { display: grid; gap: 8px; margin: 8px 0 12px; }
.bubble { margin: 0; padding: 10px 12px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; }
.bubble.user { background: var(--green); color: white; justify-self: end; max-width: 86%; }
.bubble.assistant { background: white; color: var(--ink); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .stage { padding: 28px 0; }
  .phone {
    width: 420px;
    min-height: calc(100vh - 56px);
    margin: 0 auto;
    border-radius: 32px;
    overflow: clip;
    border: 8px solid #12261c;
    box-shadow: 0 24px 70px rgba(18, 40, 28, 0.18);
  }
}
.banner-row { display: flex; gap: 8px; overflow-x: auto; margin: 12px 0; padding-bottom: 4px; }
.banner-row a {
  flex: 0 0 78%; text-decoration: none; color: white; background: var(--green);
  border-radius: 16px; padding: 14px 16px; display: grid; gap: 4px;
}
.banner-row a:nth-child(2n) { background: #1d4e89; }
.banner-row a span { font-size: 13px; opacity: 0.85; }
.entries { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.entries a {
  display: block; text-align: center; text-decoration: none; background: white;
  border-radius: 14px; padding: 14px 4px; font-weight: 700; color: var(--green-dark);
}
.sign-pad { width: 100%; height: 140px; background: white; border: 1px dashed var(--line); border-radius: 12px; touch-action: none; }
.sku { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.sku label { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; color: var(--ink); }
