:root {
  --paper: #f2eee4;
  --paper-deep: #e7dfd0;
  --ink: #171714;
  --muted: #69665e;
  --line: #c9c1b3;
  --jp: #d74831;
  --kr: #2358a6;
  --acid: #d6f044;
  --danger: #321410;
  --display: "Newsreader", Georgia, serif;
  --mono: "DM Mono", monospace;
  --jp-font: "Noto Serif JP", serif;
  --kr-font: "Noto Serif KR", serif;
  --accent: var(--jp);
  --accent-soft: #efd6cc;
}

body[data-country="korea"] { --accent: var(--kr); --accent-soft: #ccdaef; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--display); font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .17; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E"); }
body.dialog-open { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
button { font: inherit; color: inherit; }
.skip-link { position: fixed; top: -5rem; left: 1rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: white; }
.skip-link:focus { top: 1rem; }
.progress { position: fixed; z-index: 80; top: 0; left: 0; right: 0; height: 3px; }
.progress span { display: block; width: 0; height: 100%; background: var(--accent); }

.site-header { height: 82px; padding: 0 clamp(1rem, 3vw, 3rem); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid var(--line); background: rgba(242,238,228,.92); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 60; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; justify-self: start; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font: 500 .7rem var(--mono); }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .1em; }
.brand-copy small { color: var(--muted); font: .55rem var(--mono); }
.header-nav { display: flex; gap: clamp(1rem, 2.8vw, 2.8rem); }
.header-nav a { text-decoration: none; font: .62rem var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.header-nav a:hover { color: var(--accent); }
.country-picker-trigger { justify-self: end; min-width: 190px; display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: center; padding: .55rem .75rem; border: 1px solid var(--ink); background: transparent; cursor: pointer; text-align: left; }
.country-picker-trigger:hover { background: var(--ink); color: var(--paper); }
.picker-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.country-picker-trigger > span:nth-child(2) { display: flex; flex-direction: column; }
.country-picker-trigger small { color: var(--muted); font: .5rem var(--mono); text-transform: uppercase; }
.country-picker-trigger:hover small { color: #aaa69c; }
.country-picker-trigger strong { font: 500 .72rem var(--mono); }
.picker-arrow { font: .8rem var(--mono); }

.guide-hero { min-height: calc(100svh - 82px); padding: clamp(2rem, 4vw, 4rem) clamp(1rem, 5vw, 5rem) 2rem; position: relative; display: flex; overflow: hidden; }
.guide-hero .guide-view { width: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.hero-orbit { position: absolute; right: -11rem; top: 50%; width: 30rem; height: 30rem; border: 1px solid var(--line); border-radius: 50%; opacity: .55; }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; border: 1px solid var(--line); border-radius: 50%; }
.hero-orbit::before { inset: 4rem; }
.hero-orbit::after { inset: 9rem; background: var(--accent-soft); }
.hero-orbit span { position: absolute; left: -2rem; top: 50%; font: .48rem var(--mono); letter-spacing: .2em; transform: rotate(-90deg); }
.hero-edition { display: flex; justify-content: space-between; padding-bottom: .8rem; border-bottom: 1px solid var(--line); font: .6rem var(--mono); text-transform: uppercase; letter-spacing: .11em; }
.hero-edition span { color: var(--muted); }
.hero-grid { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 6vw; align-items: end; position: relative; z-index: 1; }
.hero-title { align-self: center; }
.local-name { margin: 0 0 1rem .5rem; color: var(--accent); font-size: clamp(1.2rem, 2vw, 2rem); }
body[data-country="japan"] .local-name { font-family: var(--jp-font); }
body[data-country="korea"] .local-name { font-family: var(--kr-font); }
.hero-title h1 { margin: 0; font-size: clamp(7rem, 18vw, 17rem); font-weight: 300; line-height: .68; letter-spacing: -.07em; }
.hero-statement { padding: 2rem 1rem 2rem 0; }
.hero-number { font: .55rem var(--mono); color: var(--muted); }
.hero-statement h2 { margin: 3rem 0 1.5rem; font-size: clamp(3rem, 5.5vw, 6rem); font-weight: 300; line-height: .85; letter-spacing: -.045em; }
.hero-statement h2 em { color: var(--accent); font-weight: 500; }
.hero-statement > p:last-child { max-width: 520px; font-size: 1.25rem; }
.hero-footer { display: flex; justify-content: space-between; gap: 2rem; padding-top: .8rem; border-top: 1px solid var(--line); font: .57rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero-footer a { color: var(--ink); }
.reveal { opacity: 0; transform: translateY(16px); animation: reveal .75s cubic-bezier(.22,.7,.24,1) forwards; }
.hero-grid.reveal { animation-delay: .1s; }
.hero-footer.reveal { animation-delay: .22s; }
@keyframes reveal { to { opacity: 1; transform: none; } }

.section-pad { padding: clamp(5rem, 9vw, 10rem) clamp(1rem, 5vw, 5rem); }
.section-label, .eyebrow { font: .64rem var(--mono); text-transform: uppercase; letter-spacing: .13em; }
.section-label { padding-top: .75rem; margin-bottom: clamp(3rem, 6vw, 6rem); border-top: 1px solid var(--line); color: var(--muted); }
.eyebrow { margin: 0 0 1rem; color: var(--muted); }
h2 { margin: 0; font-size: clamp(3.2rem, 7vw, 7rem); font-weight: 300; line-height: .87; letter-spacing: -.045em; }

.mindset { color: var(--paper); background: var(--ink); }
.mindset .section-label { color: #9b978e; border-color: #484740; }
.mindset .eyebrow { color: var(--accent-soft); }
.mindset-layout { display: grid; grid-template-columns: .9fr 1.4fr; gap: 8vw; }
.principle-list { border-top: 1px solid #484740; }
.principle-list article { display: grid; grid-template-columns: 50px 160px 1fr; gap: 1rem; align-items: baseline; padding: 1.8rem 0 2.2rem; border-bottom: 1px solid #484740; }
.principle-list span { color: var(--accent-soft); font: .62rem var(--mono); }
.principle-list h3 { margin: 0; font-size: 1.7rem; font-weight: 500; }
.principle-list p { max-width: 640px; margin: 0; color: #bbb7ae; }
.nuance-note { max-width: 920px; display: grid; grid-template-columns: 55px 1fr; margin: 6rem 0 0 auto; font-size: clamp(1.25rem, 2vw, 1.7rem); }
.nuance-note span { color: var(--accent-soft); font-size: 2rem; }
.nuance-note p { margin: 0; }

.guide-heading { display: grid; grid-template-columns: 1.5fr .7fr; gap: 4rem; align-items: end; }
.guide-heading-note { max-width: 400px; margin: 0; color: var(--muted); }
.situation-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin: 4rem 0 2rem; }
.filter-chip { padding: .55rem .95rem; border: 1px solid var(--line); border-radius: 100px; background: transparent; cursor: pointer; font: .64rem var(--mono); }
.filter-chip:hover, .filter-chip.active { color: white; border-color: var(--accent); background: var(--accent); }
.note-grid { display: grid; grid-template-columns: repeat(2,1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.field-card { min-height: 480px; display: flex; flex-direction: column; padding: clamp(1.5rem,3vw,3rem); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s; }
.field-card:hover { background: rgba(255,255,255,.32); }
.field-card.filtered-out { display: none; }
.card-meta { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font: .59rem var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.priority { color: var(--accent); }
.field-card h3 { max-width: 550px; margin: 3rem 0 1.5rem; font-size: clamp(2rem,3vw,3.25rem); font-weight: 500; line-height: 1; letter-spacing: -.025em; }
.field-card ul { margin: 0 0 2rem; padding: 0; list-style: none; }
.field-card li { position: relative; padding: .65rem 0 .65rem 1.25rem; border-top: 1px solid rgba(105,102,94,.28); }
.field-card li::before { content: "→"; position: absolute; left: 0; top: .85rem; font: .65rem var(--mono); color: var(--accent); }
.source-link { align-self: start; margin-top: auto; color: var(--muted); font: .61rem var(--mono); }
.phrase-strip { display: grid; grid-template-columns: 1fr repeat(3,1.35fr); background: var(--accent-soft); }
.phrase-strip > * { padding: 1.5rem; border-right: 1px solid rgba(23,23,20,.18); }
.phrase-strip > span { font: .62rem var(--mono); text-transform: uppercase; }
.phrase-strip div { display: flex; flex-direction: column; gap: .3rem; }
.phrase-strip strong { font-size: 1.25rem; font-weight: 600; }
body[data-country="japan"] .phrase-strip strong { font-family: var(--jp-font); }
body[data-country="korea"] .phrase-strip strong { font-family: var(--kr-font); }
.phrase-strip small { color: var(--muted); font: .55rem var(--mono); }
.empty-state { padding: 4rem; text-align: center; color: var(--muted); }

.red-lines { color: #f4e9dc; background: var(--danger); }
.section-label.light { color: #bd8e84; border-color: #78463e; }
.eyebrow.light { color: #bd8e84; }
.red-heading { display: grid; grid-template-columns: 1.35fr .65fr; gap: 8vw; align-items: end; }
.red-heading h2 { color: #ff684f; }
body[data-country="korea"] .red-heading h2 { color: #76a7ef; }
.red-heading > p { margin: 0; color: #c8a99f; }
.red-grid { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 5rem; border-top: 1px solid #78463e; border-left: 1px solid #78463e; }
.red-grid article { min-height: 420px; display: flex; flex-direction: column; padding: clamp(2rem,3.5vw,3.5rem); border-right: 1px solid #78463e; border-bottom: 1px solid #78463e; }
.risk-label { align-self: start; padding: .35rem .65rem; border-radius: 100px; color: var(--ink); background: var(--accent-soft); font: .57rem var(--mono); text-transform: uppercase; }
.red-grid h3 { margin: 2rem 0 1rem; font-size: clamp(2rem,2.8vw,3rem); font-weight: 500; line-height: 1; }
.red-grid p { color: #d2b9b1; }
.red-grid a { align-self: start; margin-top: auto; color: white; font: .61rem var(--mono); }
.verification-callout { display: grid; grid-template-columns: .5fr 2fr; gap: 2rem; margin-top: 3rem; padding: 2rem 0; border-top: 1px solid #78463e; border-bottom: 1px solid #78463e; }
.verification-callout strong { color: var(--accent-soft); font: .66rem var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.verification-callout ol { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin: 0; padding: 0; list-style-position: inside; color: #d2b9b1; }

.help-heading { display: flex; justify-content: space-between; align-items: end; gap: 3rem; margin-bottom: 4rem; }
.help-heading button, .footer-switch { padding: .7rem 1rem; border: 1px solid currentColor; border-radius: 100px; background: transparent; cursor: pointer; font: .62rem var(--mono); }
.help-heading button:hover { color: var(--paper); background: var(--ink); }
.help-card { display: grid; grid-template-columns: 1.2fr .7fr .7fr 1.2fr; color: white; background: var(--accent); }
.help-identity, .help-card > a:not(.help-source) { min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.5rem,3vw,3rem); border-right: 1px solid rgba(255,255,255,.4); }
.help-identity > span, .help-card small { font: .58rem var(--mono); text-transform: uppercase; }
.help-identity strong { font-size: clamp(2.2rem,4vw,4rem); font-weight: 400; }
body[data-country="japan"] .help-identity strong { font-family: var(--jp-font); }
body[data-country="korea"] .help-identity strong { font-family: var(--kr-font); }
.help-identity small { color: rgba(255,255,255,.68); }
.help-card > a:not(.help-source) { text-decoration: none; }
.help-card > a > strong { font-size: clamp(2rem,3.4vw,3.6rem); font-weight: 300; line-height: .95; }
.help-source { grid-column: 1/-1; padding: 1rem 1.5rem; color: rgba(255,255,255,.82); font: .58rem var(--mono); }
.help-footnote { max-width: 900px; margin: 2rem 0 0; color: var(--muted); }

.sources { background: var(--paper-deep); }
.sources-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 8vw; }
.sources-layout > .guide-view > p { max-width: 720px; margin: 0 0 3rem; font-size: 1.25rem; }
.source-list { border-top: 1px solid var(--ink); }
.source-list a { display: grid; grid-template-columns: 50px 1fr; padding: .9rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.source-list span { color: var(--accent); font: .6rem var(--mono); }
.source-list a:hover { color: var(--accent); }

footer { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding: 3rem clamp(1rem,5vw,5rem); color: var(--paper); background: var(--ink); }
footer > div { display: flex; align-items: center; gap: 1rem; }
.brand-mark.inverse { color: var(--ink); background: var(--paper); }
footer > div > span:last-child { font-size: 1.15rem; line-height: 1.1; }
.footer-switch { color: var(--paper); }
.footer-switch:hover { color: var(--ink); background: var(--paper); }
footer > a { color: #969289; font: .58rem var(--mono); }

.country-dialog { width: min(1000px,calc(100vw - 2rem)); max-height: calc(100svh - 2rem); padding: 0; border: 0; color: var(--ink); background: var(--paper); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.country-dialog::backdrop { background: rgba(23,23,20,.68); backdrop-filter: blur(5px); }
.country-dialog[open] { animation: dialogIn .28s ease-out; }
@keyframes dialogIn { from { opacity: 0; transform: translateY(18px) scale(.985); } }
.dialog-head { display: flex; justify-content: space-between; align-items: start; padding: clamp(2rem,5vw,5rem); }
.dialog-head h2 { font-size: clamp(3rem,6vw,6rem); }
.dialog-close { width: 48px; height: 48px; border: 1px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer; font: 300 1.8rem var(--display); }
.dialog-close:hover { color: var(--paper); background: var(--ink); }
.dialog-region { display: flex; justify-content: space-between; padding: .75rem clamp(2rem,5vw,5rem); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font: .6rem var(--mono); text-transform: uppercase; }
.country-options { padding: 0 clamp(2rem,5vw,5rem); }
.country-option { width: 100%; display: grid; grid-template-columns: 60px 1fr auto 40px; gap: 1rem; align-items: center; padding: 1.6rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; text-align: left; }
.country-option:hover .option-name strong { color: var(--accent); transform: translateX(5px); }
.option-index, .option-status, .option-arrow { color: var(--muted); font: .58rem var(--mono); text-transform: uppercase; }
.option-name { display: flex; align-items: baseline; gap: 1.2rem; }
.option-name small { min-width: 100px; color: var(--muted); font-size: 1rem; }
.country-option[data-country-option="japan"] .option-name small { font-family: var(--jp-font); }
.country-option[data-country-option="korea"] .option-name small { font-family: var(--kr-font); }
.option-name strong { font-size: clamp(1.7rem,3vw,2.6rem); font-weight: 500; transition: transform .2s,color .2s; }
.country-option.active .option-status { color: var(--accent); }
.country-option.future { cursor: default; opacity: .38; }
.dialog-note { max-width: 650px; margin: 2rem clamp(2rem,5vw,5rem) 3rem; color: var(--muted); font-size: .95rem; }
.toast { position: fixed; z-index: 90; bottom: 1.5rem; left: 50%; transform: translate(-50%,150%); padding: .8rem 1rem; border-radius: 3px; color: var(--paper); background: var(--ink); font: .64rem var(--mono); transition: transform .3s; }
.toast.show { transform: translate(-50%,0); }

@media (max-width: 980px) {
  .site-header { grid-template-columns: 1fr auto; }
  .header-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .guide-hero { min-height: auto; }
  .hero-title { margin: 8rem 0 2rem; }
  .hero-title h1 { font-size: clamp(7rem,25vw,14rem); }
  .hero-statement { max-width: 650px; }
  .hero-orbit { right: -17rem; }
  .mindset-layout, .guide-heading, .red-heading, .sources-layout { grid-template-columns: 1fr; }
  .principle-list { margin-top: 3rem; }
  .red-grid { grid-template-columns: 1fr; }
  .red-grid article { min-height: 0; }
  .help-card { grid-template-columns: 1fr 1fr; }
  .help-identity { grid-column: 1/-1; }
  .help-card > a:nth-of-type(3) { grid-column: 1/-1; }
}

@media (max-width: 650px) {
  body { font-size: 16px; }
  .site-header { height: 68px; }
  .brand-copy small { display: none; }
  .country-picker-trigger { min-width: 148px; padding: .45rem .55rem; }
  .country-picker-trigger small { display: none; }
  .guide-hero { padding-top: 1.2rem; }
  .hero-edition span { display: none; }
  .hero-title { margin: 6rem 0 1rem; }
  .hero-title h1 { font-size: clamp(6rem,27vw,9rem); }
  .hero-statement h2 { margin-top: 1.5rem; }
  .hero-footer { display: grid; gap: .55rem; }
  .principle-list article { grid-template-columns: 35px 1fr; }
  .principle-list p { grid-column: 2; }
  .nuance-note { grid-template-columns: 35px 1fr; }
  .note-grid { grid-template-columns: 1fr; }
  .field-card { min-height: 0; }
  .phrase-strip { grid-template-columns: 1fr; }
  .phrase-strip > * { border-right: 0; border-bottom: 1px solid rgba(23,23,20,.18); }
  .verification-callout { grid-template-columns: 1fr; }
  .verification-callout ol { grid-template-columns: 1fr; }
  .help-heading { align-items: start; flex-direction: column; }
  .help-card { grid-template-columns: 1fr; }
  .help-identity, .help-card > a:not(.help-source), .help-card > a:nth-of-type(3) { min-height: 180px; grid-column: 1; }
  footer { align-items: start; flex-direction: column; }
  .country-dialog { max-height: calc(100svh - 1rem); }
  .dialog-head { padding: 1.5rem; }
  .country-options { padding: 0 1.5rem; }
  .country-option { grid-template-columns: 35px 1fr 20px; }
  .option-status { display: none; }
  .option-name { align-items: start; flex-direction: column; gap: .15rem; }
  .option-name small { min-width: 0; }
  .dialog-note { margin: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  :root { --paper: #fff; --paper-deep: #f5f2ec; }
  body::before,.progress,.site-header,.situation-filter,.toast,footer,.country-dialog { display: none !important; }
  .guide-hero { min-height: auto; padding: 2rem 0 4rem; }
  .hero-title h1 { font-size: 90pt; }
  .section-pad { padding: 3rem 0; }
  .field-card,.red-grid article,.help-card { break-inside: avoid; }
  .red-lines { color-adjust: exact; -webkit-print-color-adjust: exact; }
}
