:root {
  --court: #0c3b24;
  --court-2: #072a18;
  --brand: #127a43;
  --brand-strong: #0e5f34;
  --spark: #d6f24a;
  --spark-ink: #20340a;
  --ink: #132019;
  --muted: #5c6b61;
  --bg: #f5faf6;
  --card: #ffffff;
  --surface: #f0f6f1;
  --line: #e2eae4;
  --nav-bg: rgba(255,255,255,0.82);
  --ring: rgba(18,122,67,0.30);
  --shadow: 0 1px 2px rgba(16,40,28,0.06), 0 10px 30px -14px rgba(16,40,28,0.22);
  --shadow-hover: 0 2px 6px rgba(16,40,28,0.08), 0 18px 44px -18px rgba(16,40,28,0.32);
  --radius: 16px;
  --radius-sm: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --court: #0a2f1d;
    --court-2: #05200f;
    --brand: #2ba862;
    --brand-strong: #1f8b4f;
    --ink: #e9f1eb;
    --muted: #97ab9e;
    --bg: #0b1310;
    --card: #131e18;
    --surface: #18241e;
    --line: #26332b;
    --nav-bg: rgba(15,24,19,0.82);
    --ring: rgba(43,168,98,0.35);
    --shadow: 0 1px 2px rgba(0,0,0,0.4), 0 12px 32px -16px rgba(0,0,0,0.6);
    --shadow-hover: 0 2px 6px rgba(0,0,0,0.5), 0 20px 48px -18px rgba(0,0,0,0.7);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; }
button, .chips button, nav.menu a, .card, input, select, .step, .review, .pkg {
  transition: background-color 0.18s ease, border-color 0.18s ease,
    box-shadow 0.2s ease, transform 0.15s ease, color 0.18s ease;
}

nav.menu { position: sticky; top: 0; z-index: 40; background: var(--nav-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
nav.menu .inner { max-width: 900px; margin: 0 auto; display: flex; gap: 0.1rem; padding: 0 0.5rem; overflow-x: auto; }
nav.menu a { padding: 0.9rem 0.95rem; color: var(--muted); text-decoration: none; font-size: 0.86rem; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; }
nav.menu a:hover { color: var(--ink); border-bottom-color: var(--spark); }
.card[id], section[id] { scroll-margin-top: 64px; }

header { background: radial-gradient(120% 140% at 85% -20%, rgba(214,242,74,0.16), transparent 55%), linear-gradient(160deg, var(--court), var(--court-2)); color: #fff; padding: 1.5rem 1rem; }
header .inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: 0.7rem; }
header .brand { display: flex; align-items: center; gap: 0.7rem; }
header .logo { width: 40px; height: 40px; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3)); }
header h1 { margin: 0; font-size: 1.4rem; font-weight: 800; color: #fff; }
header .tag { margin: 0.15rem 0 0; opacity: 0.8; font-size: 0.85rem; letter-spacing: 0.01em; }
header .auth { margin-left: auto; display: flex; gap: 0.5rem; }
header .auth button { font-size: 0.85rem; padding: 0.5rem 0.95rem; }
header .auth .ghost { background: transparent; border: 1px solid rgba(255,255,255,0.55); color: #fff; }
header .auth .ghost:hover { background: rgba(255,255,255,0.14); }
header .auth .solid { background: var(--spark); color: var(--spark-ink); }
header .auth .solid:hover { background: #e4ff63; transform: translateY(-1px); }
#user-badge { margin-left: auto; display: none; align-items: center; gap: 0.7rem; }
#user-badge .who { font-size: 0.88rem; font-weight: 600; }
#user-badge button { font-size: 0.8rem; padding: 0.4rem 0.75rem; background: transparent; border: 1px solid rgba(255,255,255,0.55); color: #fff; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(6,16,11,0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 1rem; z-index: 50; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; width: 100%; max-width: 380px; box-shadow: var(--shadow-hover); }
.modal h2 { margin: 0 0 1rem; font-size: 1.2rem; }
.modal label { display: block; font-size: 0.8rem; font-weight: 600; margin: 0.85rem 0 0.3rem; }
.modal input { width: 100%; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.9rem; font-family: inherit; background: var(--card); color: var(--ink); }
.modal input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
.modal .actions { margin-top: 1.5rem; display: flex; gap: 0.6rem; }
.modal .actions button { flex: 1; }
.modal .cancel { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.modal .cancel:hover { background: var(--line); }
.modal .switch { margin: 1rem 0 0; font-size: 0.82rem; color: var(--muted); text-align: center; }
.modal .switch a { color: var(--brand); cursor: pointer; font-weight: 600; }
.modal .note { margin: 0.85rem 0 0; font-size: 0.78rem; color: var(--muted); background: var(--surface); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; }

.hero { position: relative; background: linear-gradient(160deg, var(--court), var(--court-2)); overflow: hidden; }
.hero svg.court { display: block; width: 100%; height: 380px; }
.hero .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero .scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.25) 52%, rgba(0,0,0,0) 100%); }
.hero .overlay { position: absolute; inset: 0; max-width: 900px; margin: 0 auto; padding: 0 1.5rem; display: flex; flex-direction: column; justify-content: center; }
.hero h2 { margin: 0; color: #fff; font-size: 2.4rem; font-weight: 800; line-height: 1.08; max-width: 20ch; text-shadow: 0 2px 14px rgba(0,0,0,0.4); }
.hero h2::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 1rem; background: var(--spark); border-radius: 2px; }
.hero p { margin: 0.9rem 0 0; color: #eafff0; font-size: 1.05rem; max-width: 36ch; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
@media (max-width: 900px) { .hero svg.court { height: 300px; } .hero h2 { font-size: 1.9rem; } }
@media (max-width: 560px) { .hero h2 { font-size: 1.55rem; } .hero svg.court { height: 220px; } }

main { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-hover); }
.card h2 { margin: 0 0 0.3rem; font-size: 1.25rem; font-weight: 700; }
.card > p { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.92rem; }

button {
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12), 0 8px 18px -10px var(--brand);
}
button:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.15), 0 12px 24px -10px var(--brand); }
button:active { transform: translateY(0); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
input[type=text], select {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
}
input[type=text]:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
input[type=file] { font-size: 0.9rem; color: var(--muted); }
.upload-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

#status { margin-top: 1rem; color: var(--muted); font-size: 0.9rem; }
#report { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--surface); border-left: 3px solid var(--brand); border-radius: var(--radius-sm); line-height: 1.65; white-space: pre-line; display: none; font-size: 0.92rem; }
#chart-wrap { display: none; }
#chart-intro { margin: 1.25rem 0 0; color: var(--muted); font-size: 0.88rem; }
.chart-block { margin-top: 1.75rem; }
.chart-title { margin: 0 0 0.15rem; font-weight: 700; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand-strong); }
.chart-cap { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

#coach { display: none; margin-top: 1.75rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
#coach h3 { margin: 0 0 0.25rem; font-size: 1.1rem; font-weight: 700; }
#coach .sub { margin: 0 0 1rem; color: var(--muted); font-size: 0.9rem; }
.qa { margin-top: 1rem; padding: 0.85rem 1.1rem; background: var(--surface); border-radius: var(--radius-sm); border-left: 3px solid var(--spark); }
.qa .q { font-weight: 700; }
.qa .a { margin-top: 0.4rem; white-space: pre-line; }
.chat-form { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chat-form input[type=text] { flex: 1; min-width: 200px; }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.chips button {
  background: var(--card); border: 1px solid var(--line); color: var(--brand-strong);
  border-radius: 999px; padding: 0.4rem 0.85rem; font-size: 0.82rem; font-weight: 600;
  box-shadow: none;
}
.chips button:hover { background: var(--surface); border-color: var(--brand); transform: translateY(-1px); }

#ask-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
#ask-tabs button { background: var(--card); border: 1px solid var(--line); color: var(--ink); font-weight: 600; box-shadow: none; }
#ask-tabs button:hover { border-color: var(--brand); }
#ask-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px -10px var(--brand); }
.rec-label { margin: 1.1rem 0 0; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }

.field-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.field.grow { flex: 1; min-width: 200px; }
.field.grow input { width: 100%; }
#schedule-out { margin-top: 1.25rem; padding: 1rem 1.25rem; background: var(--surface); border-left: 3px solid var(--spark); border-radius: var(--radius-sm); white-space: pre-line; line-height: 1.7; font-size: 0.92rem; font-variant-numeric: tabular-nums; display: none; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.step { position: relative; padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.step .num { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: linear-gradient(180deg, var(--brand), var(--brand-strong)); color: #fff; font-size: 0.85rem; font-weight: 800; margin-bottom: 0.65rem; box-shadow: 0 4px 10px -4px var(--brand); }
.step h3 { margin: 0 0 0.25rem; font-size: 0.98rem; font-weight: 700; }
.step p { margin: 0; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.review { padding: 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.review:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.review .stars { color: #f5b301; font-size: 0.9rem; letter-spacing: 2px; }
.review .quote { margin: 0.5rem 0 0.85rem; font-size: 0.9rem; line-height: 1.55; }
.review .who { display: flex; align-items: center; gap: 0.6rem; }
.review .avatar { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: linear-gradient(180deg, var(--brand), var(--brand-strong)); color: #fff; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; flex-shrink: 0; }
.review .avatar svg { width: 74%; height: 74%; }
.review .avatar.v1 { background: linear-gradient(180deg, #2ba862, #1f8b4f); }
.review .avatar.v2 { background: linear-gradient(180deg, #14b8a6, #0f766e); }
.review .avatar.v3 { background: linear-gradient(180deg, #f59e0b, #d97706); }
.review .avatar.v4 { background: linear-gradient(180deg, #6366f1, #4f46e5); }
.review .name { font-size: 0.85rem; font-weight: 700; }
.review .meta { font-size: 0.78rem; color: var(--muted); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-top: 0.5rem; }
.pkg { position: relative; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1.5rem 1.25rem; text-align: center; background: var(--surface); }
.pkg:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pkg.popular { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.pkg .badge { display: inline-block; background: var(--spark); color: var(--spark-ink); font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.6rem; border-radius: 999px; margin-bottom: 0.6rem; }
.pkg .tokens { font-size: 2rem; font-weight: 800; color: var(--ink); line-height: 1; font-variant-numeric: tabular-nums; }
.pkg .unit { color: var(--muted); font-size: 0.78rem; }
.pkg .price { margin: 0.7rem 0 0.1rem; font-size: 1.2rem; font-weight: 800; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.pkg .per { color: var(--muted); font-size: 0.74rem; }
.pkg button { margin-top: 1rem; width: 100%; }
.shop-balance { font-weight: 800; color: var(--brand-strong); font-variant-numeric: tabular-nums; }
.shop-note { margin: 1.1rem 0 0; font-size: 0.78rem; color: var(--muted); background: var(--surface); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
