:root {
  --bg: #f6f1e4;
  --surface: #fffdf6;
  --surface-2: #efe8d6;
  --ink: #12302e;
  --ink-2: #3d5553;
  --muted: #687a77;
  --line: #e2dac6;
  --accent: #1f6f68;
  --accent-ink: #ffffff;
  --accent-soft: #e0eee8;
  --hl: #f3d34a;
  --hl-ink: #12302e;
  --teal: #2c5f5c;
  --teal-deep: #1d4644;
  --cream: #f5efe0;
  --blue: #1f6f68;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18, 48, 46, .05), 0 8px 28px rgba(18, 48, 46, .08);
  --font: 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Anton', 'Black Han Sans', 'Noto Sans KR', Impact, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e2321; --surface: #14302e; --surface-2: #1b3b39; --ink: #f5efe0; --ink-2: #c8d3cf;
    --muted: #8fa39f; --line: #24423f; --accent: #f3d34a; --accent-ink: #12302e; --accent-soft: #2a3d28;
    --teal: #1f4a47; --teal-deep: #133331; --blue: #f3d34a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.28);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; }
code, pre, kbd { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; padding: 0 .35em; border-radius: 5px; background: var(--surface); }
pre { background: var(--surface-2); padding: 16px; border-radius: var(--radius); overflow-x: auto; }
pre code { background: none; padding: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.center { text-align: center; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -.02em; }
.logo b { font-weight: 900; color: var(--accent); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 900; font-size: 19px; }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 15px; font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }
@media (max-width: 1080px) {
  .menu-btn { display: block; }
  .nav { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
}
.crumbs { font-size: 14px; color: var(--muted); padding-top: 16px; }
.crumbs a { color: var(--muted); }

/* hero */
.hero { padding: 56px 0 28px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: '한글'; position: absolute; top: -40px; right: -30px; font-size: clamp(140px, 28vw, 280px); font-weight: 900; color: var(--accent); opacity: .05; pointer-events: none; line-height: 1; }
.hero.sm { padding: 40px 0 16px; }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px; }
.hero h1 { font-size: clamp(34px, 6vw, 60px); font-weight: 900; margin: 0 0 12px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 720px; margin: 0 auto 24px; }
.gen-input { display: flex; gap: 8px; max-width: 720px; margin: 0 auto; }
.hint { font-size: 14px; margin-top: 12px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* inputs & buttons */
.input { width: 100%; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 12px; padding: 10px 14px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.lg { font-size: 18px; padding: 12px 16px; }
.input.xl { font-size: clamp(18px, 3vw, 24px); padding: 14px 18px; border-radius: 16px; box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 12px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .1s, background .15s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink-2); }
.btn.sm { font-size: 13px; padding: 6px 12px; border-radius: 9px; }
.btn.done { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* sections */
.section { padding: 32px 16px; }
@media (min-width: 720px) { .section { padding: 40px 24px; } }
.section-head { margin-bottom: 18px; }
.section-head h2 { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 4px; font-weight: 900; }
.section-head p { margin: 0; }

/* copy-paste styles */
.styles { display: grid; gap: 10px; }
@media (min-width: 900px) { .styles { grid-template-columns: 1fr 1fr; } }
.srow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'label btn' 'out btn'; align-items: center; gap: 2px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; transition: border-color .15s; }
.srow:hover { border-color: var(--accent); }
.srow-label { grid-area: label; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.srow-label em { font-style: normal; background: var(--accent); color: #fff; padding: 1px 7px; border-radius: 999px; margin-left: 6px; text-transform: none; letter-spacing: 0; }
.srow-out { grid-area: out; font-size: 20px; white-space: pre-wrap; min-height: 1.5em; overflow-wrap: anywhere; }
.srow .btn { grid-area: btn; }
.srow[data-style="vertical"] .srow-out { font-size: 18px; line-height: 1.3; }

/* toolbar */
.toolbar { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 18px; box-shadow: var(--shadow); position: sticky; top: 72px; z-index: 10; }
.controls { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 14px; color: var(--ink-2); }
.toolbar > .controls:first-child { margin-top: 0; }
.ctl { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ctl input[type=range] { width: 120px; accent-color: var(--accent); }
.ctl input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }
.ctl input[type=color] { width: 32px; height: 26px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.chips { display: flex; gap: 6px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.chip span { color: var(--muted); font-size: 12px; margin-left: 2px; }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip.active span { color: inherit; opacity: .7; }
@media (max-width: 720px) { .toolbar { position: static; } }

/* font cards */
.font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 360px) { .font-grid { grid-template-columns: 1fr; } }
.fcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; scroll-margin-top: 160px; transition: border-color .15s, box-shadow .15s; }
.fcard:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); }
.fcard:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fcard[hidden] { display: none; }
.fcard-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fcard h3 { font-size: 16px; margin: 0; font-weight: 700; }
.fcard h3 .ko { font-weight: 400; color: var(--muted); font-size: 14px; margin-left: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.tag { font-size: 11px; font-weight: 700; text-decoration: none; color: var(--ink-2); background: var(--surface-2); padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag:hover { color: var(--accent); }
.sample { font-size: var(--size, 34px); line-height: 1.35; margin: 14px 0 10px; min-height: 1.4em; flex: 1; color: var(--sample-color, var(--ink)); overflow-wrap: anywhere; word-break: keep-all; }
.desc { font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }
.fcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border-top: 1px dashed var(--line); padding-top: 12px; }
.license { font-size: 12px; color: #1a7f4b; font-weight: 700; }
@media (prefers-color-scheme: dark) { .license { color: #5fd49a; } }
.actions { display: flex; gap: 6px; }

/* categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: transform .15s, border-color .15s; }
.cat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.cat-ko { font-size: 34px; line-height: 1.2; color: var(--accent); }
.cat-name { font-weight: 700; }
.cat-card .muted { font-size: 14px; }

/* prose */
.prose { max-width: 860px; }
.prose.narrow { max-width: 680px; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); margin: 36px 0 12px; font-weight: 900; }
.prose h2:first-child { margin-top: 0; }
.prose li { margin: 6px 0; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 10px 0 10px 48px; border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 10px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.note { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 12px 16px; border-radius: 10px; margin-bottom: 24px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; font-size: 15px; }
.toc b { width: 100%; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table th { white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
.table td.big { font-size: 30px; font-weight: 700; color: var(--accent); width: 64px; }
.table td.ex { font-size: 22px; white-space: nowrap; }
.table.names td[lang="ko"] { font-size: 19px; font-weight: 700; }
.speak { background: var(--surface-2); border: 0; border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; }
.speak:hover { background: var(--accent-soft); }

/* name generator */
.name-result { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
#name-out { font-size: clamp(40px, 8vw, 72px); font-weight: 900; color: var(--accent); min-width: 2em; line-height: 1.2; }

/* faq */
.faq { max-width: 860px; }
.faq h2 { font-size: clamp(22px, 3vw, 28px); font-weight: 900; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 32px 16px 0; font-weight: 700; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 12px; font-size: 22px; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

/* footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); }
.foot-grid { display: grid; gap: 24px; padding-top: 40px; padding-bottom: 24px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1.2fr; } }
.foot-grid h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.foot-grid a:not(.logo) { display: block; color: var(--ink-2); text-decoration: none; padding: 3px 0; font-size: 15px; }
.foot-grid a:not(.logo):hover { color: var(--accent); }
.foot-bottom { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; padding-bottom: 32px; font-size: 13px; border-top: 1px solid var(--line); }
.foot-bottom a { color: var(--ink-2); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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

/* search & detail pages */
.input.search { margin-top: 10px; }
.no-results { margin: 10px 0 0; }
.more { margin-top: 24px; }
.btn.xl { font-size: 18px; padding: 14px 24px; border-radius: 14px; white-space: normal; max-width: 100%; text-align: center; flex-wrap: wrap; }
.btn.xl small, .btn small { font-weight: 500; opacity: .85; font-size: .8em; }
.btn.block { display: flex; width: 100%; margin-top: 16px; }
.fcard h3 a { color: inherit; text-decoration: none; }
.fcard h3 a:hover { color: var(--accent); text-decoration: underline; }
.detail-hero .eyebrow a { color: inherit; text-decoration: none; }
.h1-ko { display: block; font-size: .5em; font-weight: 500; color: var(--muted); margin-top: 6px; }
.dl-cta { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dl-cta .muted { font-size: 14px; }
.font-grid.single { grid-template-columns: 1fr; }
.fcard.big .sample { font-size: var(--size, 56px); min-height: 2.6em; display: flex; align-items: center; }
.weights { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.weight-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.weight-row:last-child { border-bottom: 0; }
.weight-row .muted { font-size: 13px; }
.weight-sample { font-size: 24px; overflow-wrap: anywhere; }
.detail-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }
.detail-grid h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 900; margin: 28px 0 12px; }
.detail-grid > div > h2:first-child { margin-top: 0; }
.specimen { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; font-size: clamp(20px, 3vw, 30px); line-height: 1.5; overflow-wrap: anywhere; }
.specimen p { margin: 0; }
.story { margin: 0; padding: 16px 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 10px; }
.story p { margin: 0 0 8px; font-size: 18px; }
.story footer { font-size: 13px; color: var(--ink-2); }
.perms { list-style: none; padding: 0; margin: 0; }
.perms li { padding: 6px 0 6px 30px; position: relative; }
.perms li::before { position: absolute; left: 0; top: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.perms li.ok::before { content: '✓'; background: #dcf3e6; color: #1a7f4b; }
.perms li.no::before { content: '✕'; background: var(--accent-soft); color: var(--accent); }
.info-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
@media (min-width: 900px) { .info-card { position: sticky; top: 84px; } }
.info-card h2 { margin: 0 0 12px !important; }
.info-card dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.files { margin-top: 14px; font-size: 13px; }
.files summary { cursor: pointer; color: var(--ink-2); font-weight: 700; }
.files ul { padding-left: 18px; max-height: 200px; overflow: auto; }


/* ================= Typefree-style redesign ================= */
.btn { background: var(--hl); border-color: var(--hl); color: var(--hl-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:hover { filter: brightness(1.04); }
.srow-label em { background: var(--hl); color: var(--hl-ink); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--hl) 45%, transparent); }
.mono-label, .eyebrow, .strip-label, .lnote, .nav a, .nav-cta, .pill, .srow-label, .chip, .tag, .crumbs { font-family: var(--mono); }

/* header: teal bar like the design */
.site-header { background: var(--teal); border-bottom: 1px solid rgba(243, 211, 74, .18); backdrop-filter: none; -webkit-backdrop-filter: none; }
.logo { color: var(--hl); gap: 8px; }
.logo-word { font-family: var(--display); font-size: 24px; letter-spacing: .01em; line-height: 1; }
.logo-word b { font-weight: 400; color: var(--cream); }
.logo-mark { background: var(--hl); color: var(--teal-deep); border-radius: 8px; width: 30px; height: 30px; font-size: 17px; }
.nav { align-items: center; gap: 2px; }
.nav a { color: color-mix(in srgb, var(--cream) 82%, transparent); font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: var(--cream); }
.nav a[aria-current="page"] { background: transparent; color: var(--hl); box-shadow: inset 0 -2px 0 var(--hl); border-radius: 0; }
.nav .nav-cta { margin-left: 10px; border: 1.5px solid var(--hl); color: var(--hl); border-radius: 999px; padding: 7px 16px; }
.nav .nav-cta:hover { background: var(--hl); color: var(--teal-deep); }
.menu-btn span { background: var(--cream); }
@media (max-width: 1080px) {
  .nav { background: var(--teal); border-bottom-color: rgba(243, 211, 74, .2); }
  .nav .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* sub-page hero: teal band, yellow display title */
.hero { background: var(--teal); color: var(--cream); }
.hero::before { content: none; }
.hero .eyebrow { background: transparent; color: var(--hl); border: 1px solid rgba(243, 211, 74, .5); font-weight: 400; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; }
.hero h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; color: var(--hl); font-size: clamp(42px, 7.5vw, 88px); line-height: .98; letter-spacing: .005em; }
.hero .lead { color: color-mix(in srgb, var(--cream) 86%, transparent); }
.hero.sm { padding: 48px 0 40px; margin-bottom: 8px; }
.h1-ko { color: var(--cream); font-family: var(--font); text-transform: none; font-weight: 500; opacity: .8; }
.dl-cta .muted { color: color-mix(in srgb, var(--cream) 75%, transparent); }
.hero .name-result .btn.ghost { color: var(--cream); border-color: rgba(245, 239, 224, .35); }
#name-out { color: var(--hl); }
.crumbs { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; background: var(--teal); padding: 14px 16px 0; max-width: none; color: color-mix(in srgb, var(--cream) 70%, transparent); }
.crumbs a { color: color-mix(in srgb, var(--cream) 85%, transparent); }
@media (min-width: 720px) { .crumbs { padding-left: max(24px, calc((100% - 1160px) / 2 + 24px)); } }

/* display headings */
.section-head h2, .display-h, .prose h2, .faq h2, .detail-grid h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1.05; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 52px); }
.mono-label { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; }
.wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; margin-bottom: -.06em; }
.wd > span { display: inline-block; will-change: transform; }

/* yellow accents in content */
.cat-ko { color: var(--accent); }
.steps li::before { background: var(--hl); color: var(--hl-ink); }
.faq summary::after { color: var(--accent); }
.table td.big { color: var(--accent); }
.chip.active { background: var(--teal); border-color: var(--teal); color: var(--hl); }

/* ================= landing hero ================= */
.landing {
  position: relative; overflow: hidden; isolation: isolate;
  height: clamp(620px, calc(100svh - 64px), 900px);
  background: var(--teal); color: var(--cream);
}
.landing-bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(255, 255, 255, .13), transparent 70%),
    radial-gradient(120% 80% at 50% 120%, rgba(0, 0, 0, .28), transparent 60%); }
.landing-bg::after { content: ''; position: absolute; inset: 0; opacity: .14; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.landing-photo { position: absolute; z-index: 1; left: 50%; bottom: 52px; translate: -50% 0; height: calc(100% - 40px); aspect-ratio: 2 / 3; display: block; }
.landing-photo img { width: 100%; height: 100%; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .25)); }
/* the sweater runs off the photo's edges: fade the sides and bottom into the teal */
.landing-photo { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%); }
.landing-photo img { filter: none; }
.landing-title { position: absolute; z-index: 2; inset: auto 0 clamp(236px, 34%, 300px) 0; margin: 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 2.5vw; pointer-events: none;
  font-family: var(--display); font-weight: 400; color: var(--hl); font-size: clamp(84px, 15.5vw, 270px); line-height: .82; letter-spacing: -.005em; }
.landing-title .w { display: inline-flex; overflow: hidden; padding-top: .04em; text-shadow: 0 10px 40px rgba(0, 0, 0, .12); }
.landing-title .ch { display: inline-block; will-change: transform; }
.lnote { position: absolute; z-index: 3; font-size: 11px; line-height: 1.6; text-transform: uppercase; letter-spacing: .08em; color: var(--hl); max-width: 260px; }
.lnote p { margin: 0; }
.lnote.tl { top: 28px; left: 2.5vw; }
.lnote.tr { top: 28px; right: 2.5vw; text-align: right; }
.lnote.bl { bottom: 78px; left: 2.5vw; color: var(--cream); max-width: 360px; }
.lnote.br { bottom: 78px; right: 2.5vw; text-align: right; color: var(--cream); }
.lnote-cta { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 10px; background: var(--hl); color: var(--teal-deep); text-decoration: none; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 11px 18px; border-radius: 999px; transition: transform .15s, background .15s; }
.pill:hover { transform: translateY(-1px); }
.pill.ghost { background: transparent; color: var(--cream); border: 1px solid rgba(245, 239, 224, .45); }
.cycle-line { margin-top: 14px !important; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.cycle { display: inline-grid; min-width: 4.2em; height: 1.45em; overflow: hidden; text-align: right; font-size: 26px; line-height: 1.4; text-transform: none; letter-spacing: 0; color: var(--cream); }
.cycle-word { grid-area: 1 / 1; display: inline-block; white-space: nowrap; }
.landing-strip { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 52px; display: flex; align-items: center; gap: 18px; padding: 0 2.5vw; border-top: 1px solid rgba(243, 211, 74, .55); background: color-mix(in srgb, var(--teal-deep) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.strip-label, .strip-all { color: var(--hl); white-space: nowrap; text-decoration: none; }
.strip-all:hover { text-decoration: underline; }
.marquee { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 22px; width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee a { color: var(--cream); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.marquee a span { font-family: var(--font); font-size: 17px; letter-spacing: 0; text-transform: none; color: var(--hl); }
.marquee a:hover { color: var(--hl); }
.marquee i { color: var(--hl); font-style: normal; opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

@media (max-width: 900px) {
  .lnote.tl, .lnote.br { display: none; }
  .landing-title { inset: 54px 0 auto 0; flex-direction: column; align-items: stretch; height: calc(100% - 330px); justify-content: space-between; font-size: clamp(76px, 24vw, 170px); line-height: .85; }
  .landing-title .w-left { align-self: flex-start; }
  .landing-title .w-right { align-self: flex-end; }
  .lnote.tr { top: 18px; right: 16px; }
  .lnote.tr > p:first-child { display: none; }
  .cycle-line { margin-top: 0 !important; }
  .cycle { font-size: 22px; }
  .lnote.bl { left: 16px; right: 16px; bottom: 66px; max-width: none; }
  .landing-photo { height: calc(100% - 60px); bottom: 52px; }
}
@media (max-width: 900px) {
  .landing::after { content: ''; position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none;
    background: linear-gradient(to top, color-mix(in srgb, var(--teal-deep) 92%, transparent) 18%, transparent); }
  .pill.ghost { background: rgba(18, 48, 46, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  .lnote.tr { background: rgba(18, 48, 46, .45); padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
}
@media (max-width: 520px) {
  .landing { height: 700px; }
  .lnote.bl p { font-size: 10px; text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
  .lnote.tr { top: 12px; }
  .landing-strip { gap: 10px; }
  .strip-label { display: none; }
}

/* generator card under the hero */
.generator { padding-top: 48px; }
.gen-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: clamp(22px, 4vw, 44px); text-align: center; box-shadow: var(--shadow); }
.gen-card .display-h { font-size: clamp(36px, 6vw, 72px); margin: 0 0 10px; color: var(--ink); }
.gen-card .lead { margin-bottom: 22px; }

/* initial hidden states for motion (failsafe reveals after 2.5s if the motion script can't load) */
.motion .landing [data-anim], .motion .hero h1, .motion .section-head h2, .motion .display-h { opacity: 0; animation: failsafe 0s 2.5s forwards; }
@keyframes failsafe { to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ================= language ================= */
:root:lang(ja) { --font: 'Noto Sans JP', 'Noto Sans KR', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif; }
:lang(ja) body { line-break: strict; word-break: normal; }
:lang(ja) .hero h1, :lang(ja) .section-head h2, :lang(ja) .display-h, :lang(ja) .prose h2, :lang(ja) .faq h2, :lang(ja) .detail-grid h2 {
  font-family: 'Anton', 'Noto Sans JP', sans-serif; font-weight: 900; letter-spacing: .02em; }
:lang(ja) .hero h1 { font-size: clamp(32px, 5.6vw, 64px); line-height: 1.2; }
:lang(ja) .section-head h2 { font-size: clamp(24px, 3.6vw, 40px); }
:lang(ja) .gen-card .display-h { font-size: clamp(28px, 4.6vw, 54px); }
:lang(ja) .lnote { letter-spacing: .04em; }
.lang-switch { display: inline-flex; border: 1px solid rgba(243, 211, 74, .45); border-radius: 999px; padding: 2px; margin-left: auto; font-family: var(--mono); font-size: 11px; }
.lang-switch a { color: color-mix(in srgb, var(--cream) 80%, transparent); text-decoration: none; padding: 5px 10px; border-radius: 999px; letter-spacing: .05em; line-height: 1; }
.lang-switch a[lang="ja"] { font-family: 'Noto Sans JP', sans-serif; font-size: 11px; }
.lang-switch a:hover { color: var(--cream); }
.lang-switch a[aria-current] { background: var(--hl); color: var(--teal-deep); }
.site-header .bar { gap: 12px; }
.site-header .nav { order: 3; }
.foot-bottom .lang-switch { margin-left: 0; border-color: var(--line); }
.foot-bottom .lang-switch a { color: var(--ink-2); }
.foot-bottom .lang-switch a[aria-current] { color: var(--hl-ink); }
@media (min-width: 1081px) { .site-header .lang-switch { order: 4; margin-left: 4px; } }
@media (max-width: 1080px) { .site-header .lang-switch { margin-left: auto; } .menu-btn { order: 5; } }

h1, h2, h3 { text-wrap: balance; }

/* ================= blog ================= */
.section-head.row { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.post-card[hidden] { display: none; }
.post-cover { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--teal); overflow: hidden; }
.post-cover::after { content: ''; position: absolute; inset: 0; background: radial-gradient(70% 70% at 50% 40%, rgba(255,255,255,.12), transparent 70%); }
.post-cover span { position: relative; z-index: 1; color: var(--hl); font-size: clamp(54px, 9vw, 84px); line-height: 1; letter-spacing: -.01em; transition: transform .3s; }
.post-card:hover .post-cover span { transform: scale(1.06) rotate(-2deg); }
.post-card:nth-child(3n+2) .post-cover { background: var(--hl); }
.post-card:nth-child(3n+2) .post-cover span { color: var(--teal-deep); }
.post-card:nth-child(3n+3) .post-cover { background: var(--teal-deep); }
.post-card:nth-child(3n+3) .post-cover span { color: var(--cream); }
.post-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.post-meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.post-title { font-weight: 800; font-size: 18px; line-height: 1.35; }
.post-desc { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-chips { margin: 0 0 18px; }

.post-hero { text-align: left; }
.post-hero .wrap { max-width: 980px; display: grid; gap: 4px; position: relative; }
.post-hero h1 { font-size: clamp(34px, 5.4vw, 64px); max-width: 15em; }
.post-hero .lead { margin: 6px 0 12px; max-width: 40em; }
.post-hero .eyebrow { justify-self: start; }
.post-hero .eyebrow a { color: inherit; text-decoration: none; }
.post-byline { margin: 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--cream) 70%, transparent); }
.post-hero-cover { position: absolute; right: 16px; top: -10px; color: var(--hl); opacity: .16; font-size: clamp(90px, 16vw, 200px); line-height: 1; pointer-events: none; }
@media (max-width: 720px) { .post-hero-cover { display: none; } }
:lang(ja) .post-hero h1 { font-size: clamp(28px, 4.6vw, 48px); line-height: 1.3; }

.post-layout { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 8px; }
@media (min-width: 1000px) { .post-layout { grid-template-columns: 220px minmax(0, 760px); justify-content: center; } }
.post-toc { display: none; }
@media (min-width: 1000px) {
  .post-toc { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 90px; align-self: start; font-size: 14px; border-left: 2px solid var(--line); padding-left: 14px; }
  .post-toc b { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
  .post-toc a { color: var(--ink-2); text-decoration: none; padding: 4px 0; line-height: 1.4; }
  .post-toc a:hover { color: var(--accent); }
}
.post-body { font-size: 17px; line-height: 1.8; }
.post-body h2 { scroll-margin-top: 90px; margin-top: 44px; }
.post-body h3 { font-size: 20px; margin: 28px 0 8px; scroll-margin-top: 90px; }
.post-body blockquote { margin: 20px 0; padding: 4px 20px; border-left: 4px solid var(--hl); background: var(--surface); border-radius: 0 12px 12px 0; }
.post-body .post-fonts { margin: 18px 0 26px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.post-body .post-fonts .fcard { padding: 14px; }
.post-body .post-fonts .sample { font-size: 30px; margin: 10px 0 6px; }
.post-body .post-fonts .desc { display: none; }
.post-body .post-fonts .fcard-foot { padding-top: 10px; }
.post-body .post-fonts .license { display: none; }
.post-copy { margin: 10px 0; }
.post-body .srow-out { font-size: 19px; }
.post-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 28px 0; padding: 20px 22px; border-radius: 18px; background: var(--teal); color: var(--cream); }
.post-cta b { color: var(--hl); font-size: 18px; }
.post-cta p { margin: 4px 0 0; font-size: 15px; color: color-mix(in srgb, var(--cream) 85%, transparent); }
.post-body .table-wrap { margin: 16px 0 24px; }
.mini-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mini-fonts a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mini-fonts a:hover { border-color: var(--accent); }
.mini-fonts span { font-size: 22px; line-height: 1.3; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-fonts small { color: var(--muted); font-size: 12px; }
.featured-in { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.featured-in b { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.2fr 1fr 1.2fr 1.2fr; } }
.foot-grid h3 a { color: inherit !important; padding: 0 !important; display: inline !important; }

.logo { white-space: nowrap; flex-shrink: 0; }
.nav a { white-space: nowrap; }
@media (min-width: 1081px) { .nav a { padding: 8px 10px; } }

/* ================= floating header ================= */
.site-header { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; padding: 0 16px; background: none; border: 0; pointer-events: none; }
.site-header .bar {
  pointer-events: auto; position: relative; max-width: 1180px; height: 64px; margin: 0 auto; padding: 0 10px 0 20px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.5); backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 18px;
  box-shadow: 0 12px 34px rgba(18, 48, 46, .14), inset 0 1px 0 rgba(255, 255, 255, .5);
}
.logo { color: var(--ink); }
.logo-word { font-size: 22px; }
.logo-word b { color: var(--accent); }
.site-header .nav { justify-self: center; display: flex; gap: 2px; order: 0; }
.site-header .nav a { font-family: var(--font); font-size: 14.5px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--ink); padding: 8px 14px; border-radius: 999px; box-shadow: none; }
.site-header .nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-header .nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); box-shadow: none; border-radius: 999px; }
.site-header .nav .nav-cta { display: none; }
.bar-right { display: flex; align-items: center; gap: 8px; }
.site-header .lang-switch { margin: 0; order: 0; border-color: var(--line); }
.site-header .lang-switch a { color: var(--ink-2); }
.site-header .lang-switch a:hover { color: var(--ink); }
.site-header .lang-switch a[aria-current] { color: var(--hl-ink); }
.bar-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--teal); color: var(--cream); text-decoration: none; font-weight: 700; font-size: 14px; padding: 11px 18px; border-radius: 12px; white-space: nowrap; transition: background .15s, transform .1s; }
.bar-cta svg { color: var(--hl); }
.bar-cta:hover { background: var(--teal-deep); }
.bar-cta:active { transform: scale(.97); }
.site-header .menu-btn { order: 0; margin: 0; }
.site-header .menu-btn span { background: var(--ink); }
@media (max-width: 1080px) {
  .site-header .bar { grid-template-columns: auto 1fr; padding: 0 8px 0 16px; }
  .bar-right { justify-self: end; }
  .site-header .menu-btn { display: block; }
  .site-header .nav {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; gap: 2px; padding: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 40px rgba(18, 48, 46, .18);
  }
  .site-header .nav.open { display: flex; }
  .site-header .nav a { padding: 12px 14px; font-size: 16px; border-radius: 12px; }
  .site-header .nav .nav-cta { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 6px; background: var(--teal); color: var(--cream); }
}
@media (max-width: 600px) {
  .bar-cta { display: none; }
  .logo-word { font-size: 19px; }
  .site-header { top: 10px; padding: 0 10px; }
  .site-header .bar { height: 58px; gap: 8px; }
}

/* page tops sit under the floating header */
.crumbs { padding-top: 100px; }
.site-header + main > section:first-child:not(.landing) { padding-top: 140px; }
.landing { height: clamp(700px, 100svh, 980px); }
.lnote.tl, .lnote.tr { top: 104px; }
@media (max-width: 900px) {
  .landing-title { top: 132px; height: calc(100% - 410px); }
  .lnote.tr { top: 92px; }
}
@media (max-width: 520px) { .landing { height: 760px; } }

/* ================= card footer ================= */
.site-footer { margin-top: 72px; padding: 0 16px 16px; background: none; border: 0; }
.foot-shell { position: relative; max-width: 1240px; margin: 0 auto; padding: 28px 28px 0; border-radius: 32px; overflow: hidden;
  background: linear-gradient(to bottom, transparent, var(--surface-2) 30%); }
.foot-card { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 44px 48px 26px; box-shadow: 0 20px 50px rgba(18, 48, 46, .10); }
.foot-top { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.6fr); gap: 48px; }
.foot-brand p { margin: 18px 0 20px; max-width: 420px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.foot-social { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.foot-social > a { color: var(--ink); display: inline-flex; transition: color .15s, transform .15s; }
.foot-social > a:hover { color: var(--accent); transform: translateY(-1px); }
.foot-social .lang-switch { margin: 0; border-color: var(--line); }
.foot-social .lang-switch a { color: var(--ink-2); }
.foot-social .lang-switch a[aria-current] { color: var(--hl-ink); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.foot-cols h3 { margin: 0 0 14px; font-family: var(--font); font-size: 15px; font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }
.foot-cols a { display: block; padding: 5px 0; font-size: 14px; color: var(--ink-2); text-decoration: none; line-height: 1.45; }
.foot-cols a:hover { color: var(--accent); }
.site-footer .foot-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; margin-top: 36px; padding: 22px 0 0; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-legal a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--ink-2) 45%, transparent); }
.foot-legal a:hover { color: var(--accent); }
.foot-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.foot-giant {
  font-family: var(--display); font-size: clamp(64px, 15.2vw, 228px); line-height: .78; text-align: center; white-space: nowrap; letter-spacing: -.005em;
  padding-top: 26px; margin-bottom: -.12em; user-select: none; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 10%, transparent) 10%, transparent 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 900px) {
  .foot-top { grid-template-columns: 1fr; gap: 32px; }
  .foot-card { padding: 32px 24px 22px; border-radius: 22px; }
  .foot-shell { padding: 16px 12px 0; border-radius: 24px; }
}
@media (max-width: 560px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:last-child { grid-column: 1 / -1; }
  .site-footer { padding: 0 8px 8px; }
}
/* sticky elements clear the floating header */
.toolbar { top: 92px; }
@media (min-width: 900px) { .info-card { top: 100px; } }
@media (min-width: 1000px) { .post-toc { top: 104px; } }
.post-body h2, .post-body h3, .prose h2[id] { scroll-margin-top: 104px; }
html { scroll-padding-top: 96px; }
@media (max-width: 1080px) {
  .site-header .nav { grid-column: 1 / -1; grid-row: 1; justify-self: stretch; }
  .site-header .nav a:not(.nav-cta) { text-align: left; }
  .site-header .nav .nav-cta { border: 0; }
}
@media (max-width: 1080px) { .site-header .nav { align-items: stretch; } }

/* ================= full-width layout ================= */
:root { --gutter: max(16px, 2.5vw); --edge: max(var(--gutter), calc((100vw - 1840px) / 2 + var(--gutter))); }
.wrap { max-width: none; padding-left: var(--edge); padding-right: var(--edge); }
.section { padding-left: var(--edge); padding-right: var(--edge); }
.crumbs, .crumbs.wrap { padding-left: var(--edge) !important; padding-right: var(--edge); }
/* hero, header and footer share the same edges */
.lnote.tl, .lnote.bl { left: var(--edge); }
.lnote.tr, .lnote.br { right: var(--edge); }
.landing-strip, .landing-title { padding-left: var(--edge); padding-right: var(--edge); }
.site-header { padding: 0 var(--edge); }
.site-header .bar { max-width: none; }
.site-footer { padding: 0 var(--edge) 16px; }
.foot-shell { max-width: none; }
@media (max-width: 900px) { .lnote.bl { left: var(--edge); right: var(--edge); } }
/* long-form reading stays in a comfortable column */
.wrap.prose, .wrap.faq, .section.prose, .section.faq { max-width: none; padding-left: max(var(--edge), calc((100% - 920px) / 2)); padding-right: max(var(--edge), calc((100% - 920px) / 2)); }
.wrap.prose.narrow { padding-left: max(var(--edge), calc((100% - 720px) / 2)); padding-right: max(var(--edge), calc((100% - 720px) / 2)); }
.hero .lead { max-width: 820px; }

/* generator: wide two-column card */
.gen-card { display: grid; gap: 28px; text-align: left; padding: clamp(24px, 3.4vw, 56px); }
.gen-card .lead { margin: 0; max-width: 640px; }
.gen-card .display-h { margin: 4px 0 14px; }
.gen-form { display: flex; flex-direction: column; gap: 14px; justify-content: center; }
.gen-form .gen-input { max-width: none; margin: 0; }
.gen-form .hint { margin: 0; }
.gen-live { display: flex; align-items: baseline; gap: 14px; min-height: 64px; padding: 14px 20px; border-radius: 16px; background: var(--teal); overflow: hidden; }
.gen-live-label { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--cream) 70%, transparent); white-space: nowrap; }
#gen-live { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.2; color: var(--hl); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 1000px) {
  .gen-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 4vw, 80px); }
  .gen-card .display-h { font-size: clamp(48px, 5vw, 92px); }
}
@media (max-width: 999px) { .gen-card { text-align: center; } .gen-card .lead { margin: 0 auto; } .gen-live { justify-content: center; } }

/* grids use the extra room on large screens */
@media (min-width: 1400px) {
  .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .font-grid { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
  .post-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (min-width: 1000px) { .post-layout { grid-template-columns: 240px minmax(0, 780px); justify-content: center; } }

/* no stacked sticky bars: the toolbar scrolls with the page, the header is nearly opaque */
.toolbar { position: relative; top: auto; z-index: 1; }
.site-header .bar { background: color-mix(in srgb, var(--surface) 96%, transparent); }
/* soft fade behind the floating header so scrolled content doesn't collide with it */
.site-header::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 104px; pointer-events: none; z-index: -1;
  background: linear-gradient(to bottom, var(--bg) 55%, color-mix(in srgb, var(--bg) 0%, transparent)); opacity: 0; transition: opacity .2s; }
.scrolled .site-header::before { opacity: 1; }

/* ================= footer wordmark glow ================= */
@property --gx { syntax: '<length-percentage>'; inherits: true; initial-value: 50%; }
@property --gy { syntax: '<length-percentage>'; inherits: true; initial-value: 40%; }
.foot-giant { position: relative; pointer-events: auto; cursor: default; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; --gx: 50%; --gy: 40%; }
.fg-base, .fg-glow { display: block; }
.fg-base {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--ink) 10%, transparent) 10%, transparent 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  transition: filter .4s;
}
.fg-glow {
  position: absolute; inset: 0; padding-top: inherit; color: var(--hl);
  text-shadow: 0 0 12px rgba(243, 211, 74, .9), 0 0 36px rgba(243, 211, 74, .6), 0 0 80px rgba(243, 211, 74, .4);
  -webkit-mask-image: radial-gradient(circle 320px at var(--gx) var(--gy), #000 0%, #000 22%, rgba(0,0,0,.5) 50%, transparent 76%), linear-gradient(to bottom, #000 45%, rgba(0,0,0,.35) 100%);
  mask-image: radial-gradient(circle 320px at var(--gx) var(--gy), #000 0%, #000 22%, rgba(0,0,0,.5) 50%, transparent 76%), linear-gradient(to bottom, #000 45%, rgba(0,0,0,.35) 100%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  opacity: 0; transition: opacity .35s ease;
}
.foot-giant:hover .fg-glow, .foot-giant.is-hover .fg-glow, .foot-giant.sweeping .fg-glow { opacity: 1; }
.foot-giant:hover .fg-base, .foot-giant.is-hover .fg-base { filter: brightness(1.6); }
.foot-giant.sweeping { animation: fg-sweep 2.4s cubic-bezier(.45, 0, .2, 1) forwards; }
@keyframes fg-sweep {
  0% { --gx: -10%; --gy: 45%; }
  100% { --gx: 110%; --gy: 35%; }
}
@media (prefers-reduced-motion: reduce) { .foot-giant.sweeping { animation: none; } .foot-giant.sweeping .fg-glow { opacity: 0; } }
/* three-language switch: full names on wide screens, EN · JA · KO on phones */
.lang-switch a { white-space: nowrap; }
.lang-switch .ls-short { display: none; }
.lang-switch a[lang="ko"] { font-family: 'Noto Sans KR', sans-serif; }
@media (max-width: 600px) {
  .site-header .lang-switch .ls-long { display: none; }
  .site-header .lang-switch .ls-short { display: inline; font-family: var(--mono); }
  .site-header .lang-switch a { padding: 5px 7px; }
}
