:root {
  --bg: #f5f8fc;
  --bg-soft: #edf3fa;
  --card: #ffffff;
  --card-2: #f0f5fb;
  --line: rgba(28, 62, 104, 0.11);
  --line-strong: rgba(28, 62, 104, 0.20);
  --text: #14243a;
  --muted: #526781;
  --faint: #7d90a8;
  --accent: #0a7d92;
  --accent-2: #2a63d6;
  --hot: #e0563c;
  --d1: #e79420;
  --d2: #e4543c;
  --d3: #8250e0;
  --radius: 16px;
  --shadow: 0 18px 48px rgba(23, 55, 95, 0.09);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1100px 520px at 82% -12%, rgba(10, 125, 146, 0.075), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0; }
.wrap { width: min(1240px, calc(100% - 48px)); margin-inline: auto; }

.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
.skip-link:focus { left: 12px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, 0.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 17px; letter-spacing: -0.02em; flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); display: block; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-accent { color: var(--accent); }
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 14px; font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.header-badge { font-size: 12px; color: var(--accent); border: 1px solid rgba(10, 125, 146, 0.25); background: rgba(10, 125, 146, 0.07); padding: 5px 12px; border-radius: 999px; white-space: nowrap; }

/* hero */
.hero { padding: 72px 0 46px; max-width: 940px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; margin: 0 0 20px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(10, 125, 146, 0.5); }
.hero h1 { font-size: clamp(36px, 5.4vw, 64px); font-weight: 750; letter-spacing: -0.045em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(16px, 1.5vw, 19px); max-width: 780px; margin: 22px 0 0; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.hero-chips span { font-size: 12.5px; color: var(--muted); background: var(--card); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; box-shadow: 0 1px 2px rgba(23, 55, 95, 0.03); }

/* tool shell */
.tool-section { scroll-margin-top: 84px; padding-bottom: 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { font-size: 25px; }
.section-head p { color: var(--muted); font-size: 13.5px; margin: 0; }
.tool-shell { display: grid; grid-template-columns: minmax(0, 1fr) 356px; gap: 18px; align-items: start; }
.stage-col, .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stage-col { overflow: hidden; }

.stage-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.view-buttons { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.view-btn { border: 0; background: transparent; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 12px; border-radius: 7px; }
.view-btn:hover { color: var(--text); }
.view-btn.is-active { background: var(--card); color: var(--accent); box-shadow: 0 1px 4px rgba(23, 55, 95, 0.12), inset 0 0 0 1px var(--line); }
.model-switch { display: flex; gap: 3px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.model-btn { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; padding: 6px 11px; border-radius: 7px; white-space: nowrap; }
.model-btn:hover { color: var(--text); }
.model-btn.is-active { background: var(--card); color: var(--accent-2); box-shadow: 0 1px 4px rgba(23, 55, 95, 0.12), inset 0 0 0 1px rgba(42, 99, 214, 0.28); }
.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--text); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 21px; border-radius: 999px; background: #ccd9e8; border: 1px solid var(--line-strong); position: relative; transition: background .2s; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23, 55, 95, 0.3); transition: transform .2s, background .2s; }
.switch input:checked + .switch-track { background: var(--accent); border-color: var(--accent); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(17px); background: #fff; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.stage { position: relative; width: 100%; aspect-ratio: 4 / 3; min-height: 420px; overflow: hidden; background: radial-gradient(ellipse 70% 60% at 50% 42%, #ffffff 0%, #edf4fb 60%, #dce9f6 100%); }
.stage-grid { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: .8; background-image: linear-gradient(rgba(40, 90, 145, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(40, 90, 145, 0.06) 1px, transparent 1px); background-size: 42px 42px; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 78%); }
#canvas-host { position: absolute; inset: 0; z-index: 1; }
#canvas-host canvas { display: block; width: 100%; height: 100%; outline: none; touch-action: none; cursor: crosshair; }
.labels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.marker-label { position: absolute; transform: translate(-50%, -50%); width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(23, 55, 95, 0.35); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.stage-corner { position: absolute; z-index: 3; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--muted); pointer-events: none; display: flex; align-items: center; gap: 8px; }
.stage-corner--tl { top: 16px; left: 18px; }
.stage-corner--tr { top: 16px; right: 18px; }
.rec-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 9px rgba(224, 86, 60, 0.55); }
.axis-line { display: block; width: 34px; height: 1px; background: linear-gradient(90deg, var(--faint), var(--accent), var(--faint)); }
.stage-hint { position: absolute; z-index: 3; bottom: 16px; left: 50%; transform: translateX(-50%); margin: 0; white-space: nowrap; font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(23, 55, 95, 0.08); padding: 7px 14px; border-radius: 999px; pointer-events: none; }
.loading { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; gap: 12px; background: rgba(245, 248, 252, 0.92); color: var(--muted); font-size: 14px; }
.loading[hidden] { display: none; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.file-warning { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; justify-content: center; padding: 32px; background: rgba(245, 248, 252, 0.97); text-align: center; }
.file-warning[hidden] { display: none; }
.file-warning code { background: var(--card-2); padding: 2px 6px; border-radius: 5px; color: var(--accent-2); }

.stage-footer { display: flex; gap: 9px; padding: 13px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px; padding: 9px 15px; font-size: 13px; font-weight: 650; border: 1px solid var(--line-strong); background: var(--card); color: var(--text); transition: transform .15s, background .15s, border-color .15s; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); border-color: var(--accent); background: var(--card-2); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: transparent; }
.btn-primary { margin-left: auto; background: linear-gradient(135deg, #0a7d92, #2a63d6); border-color: transparent; color: #fff; padding-inline: 20px; box-shadow: 0 4px 14px rgba(42, 99, 214, 0.22); }
.btn-primary:hover { border-color: transparent; background: linear-gradient(135deg, #0a7d92, #2a63d6); filter: brightness(1.07); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.toast { margin: 0; padding: 0 16px; height: 0; overflow: hidden; color: var(--accent); font-size: 13px; transition: height .2s; }
.toast.show { height: 30px; }

/* panel */
.panel { max-height: calc(100vh - 100px); min-height: 560px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #bdcde0 transparent; }
.panel-block { padding: 18px 18px 20px; border-bottom: 1px solid var(--line); }
.panel-block:last-child { border-bottom: 0; }
.panel-block h3 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; letter-spacing: -0.01em; }
.step { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 6px; background: rgba(10, 125, 146, 0.11); color: var(--accent); font-size: 11px; font-weight: 800; }
.count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.panel-note { color: var(--faint); font-size: 12px; margin: 8px 0 18px; }
.field { margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field label, .field legend, .field-row label { display: block; font-size: 12.5px; font-weight: 650; color: #33465e; margin-bottom: 8px; padding: 0; }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-row output { font-size: 12px; color: var(--accent); font-weight: 650; white-space: nowrap; }
.muted { color: var(--faint); font-weight: 400; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--d1), var(--d2) 50%, var(--d3)); outline: none; margin: 6px 0 4px; }
input[type="range"]#intensity { background: linear-gradient(90deg, #cbd9e8, var(--accent)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); box-shadow: 0 1px 5px rgba(23, 55, 95, 0.3); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: #fff; border: 3px solid var(--accent); cursor: pointer; }
.ticks, .legend-ticks { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { margin: 0; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 0; height: 0; }
.chips span { display: inline-block; font-size: 12px; font-weight: 550; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 6px 11px; border-radius: 8px; transition: all .15s; }
.chips span:hover { border-color: var(--accent); }
.chips input:checked + span { color: #fff; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.chips input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.chips-small span { padding: 5px 10px; font-size: 11.5px; }
input[type="text"] { width: 100%; background: #fff; border: 1px solid var(--line-strong); color: var(--text); border-radius: 9px; padding: 9px 11px; font-size: 13px; outline: none; }
input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(10, 125, 146, 0.12); }
input[type="text"]::placeholder { color: var(--faint); }

.marker-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.marker-item { display: flex; align-items: flex-start; gap: 10px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 10px 10px 12px; }
.marker-item .badge { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.marker-item .body { min-width: 0; flex: 1; }
.marker-item .region { font-size: 12.5px; font-weight: 700; }
.marker-item .meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.marker-item .note { font-size: 11px; color: var(--faint); font-style: italic; margin-top: 3px; overflow-wrap: anywhere; }
.marker-item .del { flex: none; border: 0; background: transparent; color: var(--faint); font-size: 17px; line-height: 1; padding: 0 3px; }
.marker-item .del:hover { color: var(--hot); }
.empty { color: var(--faint); font-size: 12.5px; margin: 14px 0 0; }
.empty[hidden] { display: none; }
.check { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #33465e; margin-bottom: 10px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.privacy { font-size: 11.5px; color: var(--faint); margin: 14px 0 0; line-height: 1.55; }
.linklike { border: 0; background: none; padding: 0; color: var(--accent-2); font-size: inherit; text-decoration: underline; }

/* content */
.content-section { padding: 62px 0 0; scroll-margin-top: 84px; }
.content-section h2 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 14px; }
.content-section > p { color: var(--muted); max-width: 820px; margin: 0 0 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps article { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 4px 16px rgba(23, 55, 95, 0.04); }
.step-num { font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--accent); }
.steps h3 { font-size: 17px; margin: 12px 0 8px; }
.steps p { color: var(--muted); font-size: 13.5px; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; min-width: 780px; font-size: 13.5px; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); }
thead th { background: var(--card-2); color: var(--accent); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
tbody th { font-weight: 650; color: var(--text); }
tbody td { color: var(--muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(10, 125, 146, 0.045); }
.caution { margin-top: 18px !important; font-size: 13px; color: #9b3f24; background: rgba(224, 86, 60, 0.06); border: 1px solid rgba(224, 86, 60, 0.24); border-radius: 10px; padding: 12px 16px; max-width: none !important; }
.two-col { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.two-col p { color: var(--muted); margin: 0 0 14px; }
.legend-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: 0 4px 16px rgba(23, 55, 95, 0.04); }
.legend-card h3 { font-size: 15px; margin-bottom: 18px; }
.legend-bar { height: 12px; border-radius: 99px; background: linear-gradient(90deg, var(--d1), var(--d2) 50%, var(--d3)); }
.legend-ticks { margin-top: 9px; text-align: center; line-height: 1.4; }
.legend-card p { font-size: 12.5px; color: var(--muted); margin: 18px 0 0; }
.faq-list { display: grid; gap: 9px; max-width: 900px; }
.faq-list details { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 0 18px; }
.faq-list summary { cursor: pointer; font-weight: 650; font-size: 14.5px; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; font-weight: 400; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list p { color: var(--muted); font-size: 13.5px; margin: 0 0 17px; }
.disclaimer { margin-top: 58px; padding: 18px 22px; background: rgba(42, 99, 214, 0.05); border: 1px solid rgba(42, 99, 214, 0.16); border-radius: 12px; color: var(--muted); font-size: 12.5px; }
.disclaimer strong { color: var(--text); }
.site-footer { margin-top: 54px; border-top: 1px solid var(--line); padding: 28px 0 44px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; color: var(--faint); font-size: 12px; }
.footer-inner p { margin: 0; }
.footer-inner strong { color: var(--text); }
.credits { max-width: 620px; text-align: right; }

/* table of contents */
.toc { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-block: 0 8px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 4px 16px rgba(23, 55, 95, 0.04); }
.toc-label { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-right: 6px; }
.toc a { font-size: 12.5px; font-weight: 600; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 5px 11px; border-radius: 999px; }
.toc a:hover { color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; }

/* location chart links */
.area-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 8px; margin: -6px 0 16px !important; font-size: 12.5px; color: var(--faint) !important; }
.area-jump strong { color: var(--muted); font-size: 12px; margin-right: 4px; }
.area-jump a { color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.area-jump a:hover { color: #fff; background: var(--accent); border-color: var(--accent); text-decoration: none; }
.map-link { font-size: 12.5px; font-weight: 650; white-space: nowrap; }
table td:last-child { white-space: nowrap; }
tr[id] { scroll-margin-top: 84px; }

/* headache types */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.type-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: 0 4px 16px rgba(23, 55, 95, 0.04); }
.type-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); background: rgba(10, 125, 146, 0.09); padding: 4px 9px; border-radius: 999px; }
.type-card h3 { font-size: 16px; margin: 12px 0 6px; }
.type-where { font-size: 12.5px; font-weight: 650; color: var(--accent-2); margin: 0 0 10px; }
.type-card p:last-child { font-size: 13px; color: var(--muted); margin: 0; }
.rule-card { margin-top: 18px; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--accent-2); border-radius: 14px; padding: 22px 24px; }
.rule-card h3 { font-size: 17px; margin-bottom: 8px; }
.rule-card > p { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.rule-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 22px; }
.rule-list li { font-size: 13px; color: var(--text); display: flex; gap: 10px; align-items: baseline; }
.rule-list strong { flex: none; min-width: 44px; color: var(--accent-2); font-size: 14px; }
.rule-card > .rule-note { font-size: 13px; margin: 0; }

/* red flags */
.flag-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; }
.flag-col { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.flag-col--urgent { border-color: rgba(224, 86, 60, 0.3); background: rgba(224, 86, 60, 0.035); }
.flag-col h3 { font-size: 16px; margin-bottom: 14px; }
.flag-col--urgent h3 { color: #9b3f24; }
.flag-col ul { margin: 0; padding-left: 20px; }
.flag-col li { font-size: 13px; color: var(--text); margin-bottom: 8px; }
.flag-col p { font-size: 13px; color: var(--muted); margin: 14px 0 0; }

/* diary + sources */
.diary-steps { margin-top: 24px; }
.content-section > .diary-note { margin: 20px 0 0; font-size: 13px; color: var(--faint); }
.sources { padding-top: 48px; }
.sources h2 { font-size: 20px; }
.sources > p { font-size: 13px; }
.sources ul { margin: 0; padding-left: 20px; display: grid; gap: 7px; }
.sources li { font-size: 13px; color: var(--muted); }

@media (max-width: 1080px) {
  .type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .flag-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .type-grid, .rule-list { grid-template-columns: 1fr; }
  .toc { padding: 12px; }
}

@media (max-width: 1080px) {
  .tool-shell { grid-template-columns: minmax(0, 1fr) 320px; }
  .hero { padding-top: 54px; }
}
@media (max-width: 900px) {
  .tool-shell { grid-template-columns: 1fr; }
  .panel { max-height: none; min-height: 0; }
  .stage { aspect-ratio: 1 / 1; min-height: 0; }
  .steps, .two-col { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .header-badge { margin-left: auto; }
}
@media (max-width: 600px) {
  .wrap { width: min(100% - 28px, 1240px); }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 34px; }
  .credits { text-align: left; }
  .view-btn { padding: 6px 8px; font-size: 11.5px; }
  .model-btn { padding: 6px 8px; font-size: 11.5px; }
  .stage-hint { white-space: normal; text-align: center; width: 88%; font-size: 11px; }
  .btn { padding: 9px 11px; font-size: 12px; }
  .btn-primary { margin-left: 0; width: 100%; order: -1; }
  .stage-footer { display: grid; grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
