:root {
  font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172438;
  background: #f4f6fa;
  font-synthesis: none;
  --ink: #172438;
  --muted: #5c6b7c;
  --line: #dce3ed;
  --navy: #142339;
  --gold: #f3cb75;
  --width: 1120px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { text-decoration: none; color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #3e82ce; outline-offset: 4px; }
.topbar {
  min-height: 76px; padding: 12px max(22px, calc((100% - var(--width)) / 2));
  display: flex; align-items: center; gap: clamp(22px, 4vw, 64px);
  background: #fff; border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img, .footer img, .period-brand img { border-radius: 50%; }
.brand strong { display: block; font-size: 21px; letter-spacing: .1em; line-height: 1.2; }
.brand small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.main-nav { display: flex; gap: 26px; align-items: center; }
.main-nav a { color: var(--muted); padding: 11px 0; border-bottom: 2px solid transparent; font-size: 15px; white-space: nowrap; }
.main-nav a[aria-current] { color: var(--ink); border-color: #ac7c25; font-weight: 700; }
.wallet-button { margin-left: auto; border: 1px solid #b3c1d2; border-radius: 10px; background: #fff; color: var(--navy); padding: 10px 15px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.wallet-button:hover, .outline:hover { background: #edf3fa; }
main { flex: 1; width: min(var(--width), calc(100% - 44px)); margin: 0 auto; padding: 30px 0 56px; }
.hero {
  position: relative; isolation: isolate; display: grid; grid-template-columns: 1.35fr 1fr; align-items: center;
  min-height: 354px; overflow: hidden; padding: clamp(28px, 6vw, 70px); border-radius: 22px;
  background: radial-gradient(ellipse at 78% 35%, #274368 0%, #182d4a 33%, #121f34 63%, #101a2b 100%); color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .3;
  background-image: radial-gradient(circle, #ebd6a3 1px, transparent 1.5px),
    radial-gradient(circle, #84bfff 1px, transparent 1.6px);
  background-size: 103px 89px, 149px 113px; background-position: 13px 8px, 77px 27px;
  mask-image: linear-gradient(90deg, transparent 15%, black 65%);
}
.hero-copy { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(31px, 4.65vw, 53px); margin: 12px 0 15px; letter-spacing: -.045em; line-height: 1.15; }
.hero-copy > p:not(.eyebrow) { color: #d3dfef; margin-bottom: 26px; line-height: 1.7; }
.hero-art { position: absolute; width: min(49%, 500px); aspect-ratio: 1; right: .5%; top: 50%; translate: 0 -50%; display: grid; place-items: center; }
.hero-art i { position: absolute; width: 93%; height: 67%; border: 1px solid #e6b86a4a; border-radius: 50%; transform: rotate(-27deg); }
.hero-art i:nth-child(2) { width: 77%; height: 83%; border-color: #79bcf44b; transform: rotate(40deg); }
.hero-art i:nth-child(3) { width: 87%; height: 43%; border-color: #78b8ff42; transform: rotate(16deg); }
.hero-art img {
  position: relative; width: 53%; height: auto; border-radius: 50%; border: 1px solid #eac4779c;
  box-shadow: 0 17px 56px #071221aa, 0 0 65px #6ea6e646; clip-path: circle(49.8%);
}
.button { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; padding: 11px 17px; font-weight: 700; font-size: 15px; border: 1px solid transparent; }
.gold { background: var(--gold); color: #242118; }
.gold:hover { background: #ffdc8a; }
.dark { background: var(--navy); color: #fff; }
.dark:hover { background: #223b5b; }
.outline { background: #fff; border-color: #bccadb; color: var(--ink); }
.services { margin-top: 32px; }
h2 { font-size: 22px; margin: 0 0 16px; }
.service-card {
  display: flex; align-items: center; max-width: 585px; gap: 16px; padding: 22px;
  background: #fff; border: 1px solid var(--line); border-radius: 15px;
}
.service-card:hover { border-color: #a6b9d1; }
.service-card strong { display: block; font-size: 18px; }
.service-card small { display: block; color: var(--muted); font-size: 14px; margin-top: 5px; }
.service-icon { width: 50px; height: 50px; border-radius: 11px; background: #eaf0f8; display: flex; gap: 4px; align-items: end; justify-content: center; padding-bottom: 12px; flex: 0 0 auto; }
.service-icon i { height: 9px; width: 5px; background: #295585; border-radius: 2px; }
.service-icon i:nth-child(2) { height: 16px; }
.service-icon i:nth-child(3) { height: 24px; }
.service-action { color: #365780; font-size: 14px; font-weight: 700; margin-left: auto; white-space: nowrap; }
.footer { border-top: 1px solid var(--line); color: var(--muted); background: #fff; }
.footer-inner { width: min(var(--width), calc(100% - 44px)); margin: 0 auto; padding: 20px 0; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-inner span { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14px; }
.footer-inner small { font-size: 13px; }
.market-heading { padding: 27px 30px; border-radius: 16px; color: #fff; background: linear-gradient(117deg, #142339, #244a70); }
.market-heading h1 { margin: 13px 0 4px; font-size: 32px; }
.market-heading p { margin: 0; color: #d5e4f5; }
.back { font-size: 14px; color: #f3cb75; }
.back:hover { text-decoration: underline; }
.shortcuts, .stage-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0; }
.shortcuts button, .stage-tabs button { border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; color: var(--muted); background: #fff; }
.shortcuts button[aria-pressed="true"] { color: #fff; background: var(--navy); border-color: var(--navy); }
.stage-tabs { padding-bottom: 10px; margin-bottom: 13px; border-bottom: 1px solid var(--line); }
.stage-tabs button[aria-pressed="true"] { color: var(--ink); background: #e6edf8; border-color: #c7d5e8; font-weight: 700; }
.period-list { display: grid; gap: 13px; }
.period, .panel { border: 1px solid var(--line); border-radius: 15px; background: #fff; padding: 22px; }
.period-head, .period-brand, .period-foot { display: flex; align-items: center; gap: 11px; }
.period-head, .period-foot { justify-content: space-between; }
.period-brand h3 { margin: 0; font-size: 18px; }
.period-brand p, .period-foot span { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.phase { border-radius: 6px; background: #ecf1f7; color: #355173; padding: 5px 9px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.phase-2 { background: #e4f4ea; color: #246042; }
.phase-4 { background: #eaf0fc; color: #2b5189; }
.facts { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 13px; padding: 15px 0; margin: 17px 0 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
dt { color: var(--muted); font-size: 14px; }
dd { margin: 5px 0 0; font-weight: 700; overflow-wrap: anywhere; }
dd small { font-size: 12px; color: var(--muted); }
.empty { display: grid; justify-items: center; gap: 13px; color: var(--muted); padding: 36px 16px; }
.rules p, dialog p { color: var(--muted); line-height: 1.65; }
.rule-rows { margin: 16px 0; }
.rule-rows > div { display: grid; grid-template-columns: minmax(95px, 1fr) 3fr; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rule-rows dd { margin: 0; }
.address { font-family: ui-monospace, monospace; font-size: 14px; }
.teacher-form { display: grid; gap: 8px; max-width: 530px; }
.teacher-form label { font-size: 14px; font-weight: 700; }
.teacher-form input, .teacher-form textarea { font: inherit; border: 1px solid #aebed0; border-radius: 8px; padding: 9px 10px; }
.teacher-form textarea { min-height: 105px; resize: vertical; }
.teacher-form button { justify-self: start; margin-top: 4px; }
.teacher-fee { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; }
dialog { width: min(515px, calc(100% - 34px)); max-height: 85dvh; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); padding: 24px; }
dialog::backdrop { background: #0b1529a8; }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal-head h2 { margin: 0; }
.close { border: 0; border-radius: 8px; padding: 0 10px; font-size: 23px; background: #edf2f8; color: var(--ink); }
dialog form label { display: block; font-size: 14px; font-weight: 700; }
dialog input { width: 100%; border: 1px solid #aebed0; border-radius: 8px; padding: 9px 10px; margin: 6px 0 13px; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.form-error { color: #a13f32; margin-bottom: 0; }
.form-error:empty { display: none; }
#toast { position: fixed; bottom: 22px; right: 22px; border-radius: 9px; background: var(--navy); color: #fff; opacity: 0; pointer-events: none; }
#toast.visible { padding: 12px 18px; opacity: 1; }
@media (max-width: 640px) {
  .topbar { flex-wrap: wrap; gap: 12px; padding: 12px 16px 0; }
  .brand img { width: 36px; height: 36px; }
  .brand strong { font-size: 19px; }
  .main-nav { margin: 0; width: 100%; order: 2; }
  .main-nav a { padding: 8px 0; }
  .wallet-button { padding: 8px 10px; }
  main { width: calc(100% - 32px); padding: 20px 0 40px; }
  .hero { min-height: 0; display: block; padding: 26px 23px; }
  .hero h1 { font-size: clamp(29px, 9vw, 39px); }
  .hero h1 span { display: block; }
  .hero-copy > p:not(.eyebrow) { max-width: 217px; }
  .hero-art { right: -17%; width: 70%; opacity: .55; }
  .hero-art img { width: 61%; }
  .services { margin-top: 24px; }
  .service-card, .period, .panel { padding: 16px; }
  .service-icon { width: 40px; height: 40px; padding-bottom: 8px; }
  .service-action { display: none; }
  .footer-inner { width: calc(100% - 32px); }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts > div:first-child { grid-column: 1 / -1; }
  .market-heading { padding: 20px; }
}
