:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #182536;
  background: #f2f6fa;
  font-size: 100%;
  line-height: 1.5;
  --surface: #fff;
  --muted: #4e6071;
  --line: #dce5ed;
  --blue: #1555a6;
  --dark: #112c4b;
  --radius: 1.125rem;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, select, input { font: inherit; }
a { color: var(--blue); }
:focus-visible { outline: 0.16rem solid #2471cd; outline-offset: 0.2rem; }
[hidden] { display: none !important; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.28; }
h1 { font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.8rem); letter-spacing: -0.035em; }
h2 { font-size: 1.16rem; }
h3 { font-size: 1rem; }
p { overflow-wrap: anywhere; }

.site-header { background: var(--surface); border-block-end: 1px solid var(--line); }
.wrap, .header-inner { max-inline-size: 73rem; margin-inline: auto; padding-inline: clamp(1rem, 3.4vw, 2rem); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 1.5rem; min-block-size: 4.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; min-block-size: 3rem; color: inherit; font-weight: 760; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; inline-size: 2.1rem; block-size: 2.1rem; border-radius: 0.65rem; background: var(--dark); color: #fff; }
nav { display: flex; flex-wrap: wrap; gap: 0.25rem; }
nav a, .section-tabs button { display: grid; place-items: center; padding: 0.5rem 0.8rem; min-block-size: 3rem; border-radius: 0.65rem; color: var(--muted); font-weight: 660; text-decoration: none; white-space: nowrap; }
nav a:hover, .section-tabs button:hover { background: #f0f5fb; }
nav a[aria-current="page"], .section-tabs button[aria-pressed="true"] { color: #154a8a; background: #eaf2fc; box-shadow: inset 0 -2px #286abd; }

main { padding-block-start: clamp(1.55rem, 5vw, 3rem); }
.page-heading { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.9rem 1.5rem; margin-block-end: 1.3rem; }
.page-heading p, .panel-description { margin-block-start: 0.4rem; color: var(--muted); }
.actions, .period-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.55rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-block-size: 3rem; max-inline-size: 100%; padding: 0.5rem 0.95rem; border: 1px solid #b7c9da; border-radius: 0.7rem; background: var(--surface); color: #124883; font-weight: 680; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover { background: #eaf3fd; }
.button.primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.button.primary:hover { background: #0d4287; }
.button.quiet { border-color: transparent; background: transparent; padding-inline: 0.4rem; }
.button.quiet:hover { background: #eef5fd; }

.metric-grid, .dashboard-grid { display: grid; gap: 0.9rem; }
.metric-grid { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); }
.dashboard-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); margin-block-start: 0.9rem; align-items: start; }
.metric, .panel { min-inline-size: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.metric { padding: clamp(1rem, 2.4vw, 1.5rem); }
.metric.featured { color: #fff; background: var(--dark); border-color: var(--dark); }
.metric .label { color: var(--muted); font-size: 0.94rem; font-weight: 640; }
.featured .label, .featured .detail { color: #d0e0f2; }
.metric-value { display: block; margin-block: 0.4rem; font-size: clamp(1.4rem, 1.1rem + 1.6vw, 2.15rem); line-height: 1.18; font-variant-numeric: tabular-nums; font-weight: 740; overflow-wrap: anywhere; }
.detail, .muted { color: var(--muted); font-size: 0.9rem; }
.voucher-list { display: flex; flex-wrap: wrap; gap: 0.35rem 0.85rem; margin-block: 0.45rem; }
.voucher-list strong { font-variant-numeric: tabular-nums; }
.panel { padding: clamp(0.95rem, 2.4vw, 1.4rem); }
.panel-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 0.85rem; }
.rows { padding: 0; list-style: none; margin-block-start: 0.5rem; }
.rows > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.25rem 0.85rem; padding-block: 0.7rem; border-block-end: 1px solid var(--line); }
.rows > li:last-child { border-block-end: 0; }
.rows p { margin-block-start: 0.2rem; }
.row-title { font-weight: 680; }
.number { font-variant-numeric: tabular-nums; font-weight: 670; }
.tag { display: inline-block; color: #354b60; background: #edf3fa; padding: 0.2rem 0.55rem; border-radius: 0.4rem; font-size: 0.86rem; white-space: normal; }
.tag.warn { color: #7a430b; background: #fff1d9; }
.tag.good { color: #205742; background: #e7f5ee; }
.callout { margin-block-start: 0.75rem; padding: 0.8rem; border-radius: 0.75rem; background: #f1f6fc; }
.callout p + p { margin-block-start: 0.3rem; }
.empty { padding-block: 0.8rem 0.25rem; color: var(--muted); }

.section-tabs { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-block-end: 0.9rem; }
.section-tabs button { background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.entry-panel { max-inline-size: 46rem; }
.form { display: grid; gap: 0.85rem; margin-block-start: 0.85rem; }
.form-grid, .course-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 0.8rem; }
.course-values { grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.75rem), 1fr)); margin-block-start: 0.65rem; }
.course-values div { padding: 0.55rem 0.65rem; background: #f3f7fc; border-radius: 0.55rem; }
.course-values dt { font-size: 0.88rem; color: var(--muted); }
.course-values dd { overflow-wrap: anywhere; }
.course-row { display: block !important; }
.field { display: grid; align-content: start; gap: 0.3rem; min-inline-size: 0; }
.field label, legend { font-weight: 680; }
.field input, .field select { inline-size: 100%; min-inline-size: 0; min-block-size: 3rem; padding: 0.55rem 0.65rem; border: 1px solid #7b8d9e; border-radius: 0.6rem; background: #fff; color: inherit; }
.field input:user-invalid, .field select:user-invalid { border-color: #a33a20; }
fieldset { min-inline-size: 0; margin: 0; padding: 0.55rem 0.8rem 0.8rem; border: 1px solid var(--line); border-radius: 0.75rem; }
legend { padding-inline: 0.25rem; }
details { margin-block-start: 0.4rem; }
summary { min-block-size: 3rem; padding-block-start: 0.65rem; color: var(--blue); cursor: pointer; }
.choices { display: flex; flex-wrap: wrap; column-gap: 0.85rem; }
.choices label { display: inline-flex; align-items: center; gap: 0.4rem; min-block-size: 3rem; cursor: pointer; }
.choices input { margin: 0; accent-color: var(--blue); }
.preview-charge { display: block; padding: 0.7rem 0.75rem; border-radius: 0.65rem; background: #edf5ff; }
.price-note { color: var(--blue); font-weight: 650; }
.coach-chip { min-block-size: 2.75rem; border-radius: 2rem; }
#coach-picker { width: min(26rem, 96%); border: 1px solid var(--line); border-radius: 1rem; padding: 1.25rem; color: var(--dark); background: white; }
#coach-picker::backdrop { background: rgb(18 35 56 / 45%); }
#coach-picker .actions { justify-content: flex-end; }
.wheel-frame { --row: 3rem; position: relative; margin-block: 0.85rem; }
.wheel-frame::after { content: ""; position: absolute; inset: var(--row) 0; border-block: 1px solid #b7c9da; pointer-events: none; }
#coach-wheel { height: calc(3 * var(--row)); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; }
#coach-wheel::before, #coach-wheel::after { content: ""; display: block; height: var(--row); }
#coach-wheel [role="option"] { display: grid; place-items: center; height: var(--row); scroll-snap-align: center; cursor: pointer; }
#coach-wheel [aria-selected="true"] { color: var(--blue); font-weight: 700; background: #edf5ff; }
@media (max-width: 45rem) {
  #coach-picker { margin: auto 0 0; width: 100%; max-width: none; border-radius: 1rem 1rem 0 0; padding-bottom: max(1.25rem, env(safe-area-inset-bottom)); }
}
.period-label { display: flex; flex-wrap: wrap; align-items: center; gap: 0.55rem; color: var(--muted); }
.period-label select { min-block-size: 3rem; padding: 0.4rem; border-radius: 0.6rem; border: 1px solid #7b8d9e; background: #fff; }
.site-note { margin-block: 1.25rem; padding-block-end: 0.75rem; color: var(--muted); font-size: 0.86rem; }
.feedback { position: fixed; inset-inline: 0.9rem; inset-block-end: max(0.85rem, env(safe-area-inset-bottom)); z-index: 2; max-inline-size: 24rem; margin-inline: auto; pointer-events: none; }
.feedback:not(:empty) { padding: 0.65rem 0.9rem; border-radius: 0.7rem; background: var(--dark); color: #fff; text-align: center; }

@media (max-width: 45rem) {
  .header-inner { display: block; padding-block: 0.25rem 0.45rem; }
  .site-header nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  nav a { white-space: normal; text-align: center; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric.featured { grid-column: 1 / -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .page-heading .actions { inline-size: 100%; }
  .page-heading .actions .button { flex: 1 1 auto; }
}

@media (max-width: 23rem) {
  .metric-grid { grid-template-columns: 1fr; }
}
