
@font-face { font-family: "Shippori Mincho B1"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/shippori-mincho-b1-600.woff2") format("woff2"); }
@font-face { font-family: "Shippori Mincho B1"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/shippori-mincho-b1-800.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-variable.woff2") format("woff2"); }
@font-face { font-family: "SN Kanji"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/kanji-subset.woff2") format("woff2"); unicode-range: U+3000-30FF, U+4E00-9FFF, U+FF00-FFEF; }

:root {
  --ink: #12343F;
  --ink-900: #0A2028;
  --ink-800: #0E2A33;
  --ink-700: #164150;
  --ink-600: #1F5464;
  --gold: #FFC72C;
  --gold-600: #F0B10F;
  --gold-soft: #FFE7A3;
  --washi: #F6F1E6;
  --washi-2: #EFE7D6;
  --paper: #FFF9FB;
  --crimson: #B3261E;
  --text: #12343F;
  --muted: #47616A;
  --line: rgba(18, 52, 63, .12);
  --line-strong: rgba(18, 52, 63, .22);
  --on-ink: #F6F1E6;
  --on-ink-muted: #B9CBCF;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(10, 32, 40, .06), 0 2px 8px rgba(10, 32, 40, .05);
  --shadow: 0 10px 30px -12px rgba(10, 32, 40, .22), 0 2px 6px rgba(10, 32, 40, .05);
  --shadow-lg: 0 30px 60px -24px rgba(10, 32, 40, .42);
  --font-display: "Shippori Mincho B1", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-jp: "SN Kanji", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Noto Serif CJK JP", serif;
  --container: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%23FFC72C' stroke-opacity='.09' stroke-width='1.5'%3E%3Cpath d='M0 40a40 40 0 0 1 80 0M10 40a30 30 0 0 1 60 0M20 40a20 20 0 0 1 40 0M30 40a10 10 0 0 1 20 0'/%3E%3Cpath d='M-40 20a40 40 0 0 1 80 0M-30 20a30 30 0 0 1 60 0M-20 20a20 20 0 0 1 40 0M40 20a40 40 0 0 1 80 0M50 20a30 30 0 0 1 60 0M60 20a20 20 0 0 1 40 0'/%3E%3C/g%3E%3C/svg%3E");
  --wave-ink: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='40' viewBox='0 0 80 40'%3E%3Cg fill='none' stroke='%2312343F' stroke-opacity='.06' stroke-width='1.5'%3E%3Cpath d='M0 40a40 40 0 0 1 80 0M10 40a30 30 0 0 1 60 0M20 40a20 20 0 0 1 40 0M30 40a10 10 0 0 1 20 0'/%3E%3Cpath d='M-40 20a40 40 0 0 1 80 0M-30 20a30 30 0 0 1 60 0M-20 20a20 20 0 0 1 40 0M40 20a40 40 0 0 1 80 0M50 20a30 30 0 0 1 60 0M60 20a20 20 0 0 1 40 0'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body { margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7; color: var(--text); background: var(--washi); overflow-x: hidden; overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .6em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); }
h3 { font-size: clamp(1.2rem, 1.8vw, 1.42rem); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.3em; }
.jp, [lang="ja"] { font-family: var(--font-jp); font-weight: 700; letter-spacing: .02em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .page-hero :focus-visible, .post-hero :focus-visible, .section--ink :focus-visible, .cta-band :focus-visible,
.site-footer :focus-visible, .aside-card--ink :focus-visible { outline-color: var(--gold); }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: 820px; }

.btn { --b: var(--gold); display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: .75em 1.45em; border-radius: 999px; border: 2px solid transparent; font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; transition: transform .2s var(--ease), background-color .2s, box-shadow .2s, color .2s, border-color .2s; white-space: nowrap; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--primary { background: var(--gold); color: var(--ink-900); box-shadow: 0 8px 22px -10px rgba(255, 199, 44, .9); }
.btn--primary:hover { background: #FFD457; transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(255, 199, 44, .95); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-700); transform: translateY(-2px); }
.btn--outline { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--outline:hover { border-color: var(--ink); background: rgba(18, 52, 63, .04); }
.btn--ghost-light { border-color: rgba(246, 241, 230, .35); color: var(--on-ink); }
.btn--ghost-light:hover { border-color: var(--gold); color: var(--gold); }
.btn--sm { min-height: 42px; padding: .55em 1.1em; font-size: .94rem; }
.btn:active { transform: translateY(0); }

.site-header { position: relative; z-index: 100; border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(246, 241, 230, .86); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: background-color .3s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(10, 32, 40, .45); }
.site-header.is-scrolled::before { background: rgba(246, 241, 230, .95); }
.nav { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; }
.brand__mark { width: 44px; height: 44px; border-radius: 10px; box-shadow: 0 6px 16px -8px rgba(179, 38, 30, .7); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; letter-spacing: -.01em; }
.brand__name b { color: var(--crimson); font-weight: 800; }
.brand__sub { font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 5px; font-weight: 600; }
.nav__menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .97rem; color: var(--ink); transition: background-color .2s, color .2s; position: relative; }
.nav__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .75; display: none; }
.nav__link:hover { background: rgba(18, 52, 63, .07); }
.nav__link[aria-current="page"], .nav__link[aria-current="location"] { background: var(--ink); color: var(--paper); }
.nav__menu-head, .nav__menu-cta { display: none; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--paper); align-items: center; justify-content: center; }
.nav__toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.nav__toggle span::before { top: -6px; }
.nav__toggle span::after { top: 6px; }
.nav__backdrop { position: fixed; inset: 0; background: rgba(7, 26, 32, .55); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; z-index: 99; }

.hero { position: relative; background: var(--ink); color: var(--on-ink); overflow: hidden; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; opacity: .9; z-index: -1; -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.hero::after { content: ""; position: absolute; width: 900px; height: 900px; right: -260px; top: -320px; background: radial-gradient(circle, rgba(255, 199, 44, .16), transparent 62%); z-index: -1; }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--crimson); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero .eyebrow, .section--ink .eyebrow { color: var(--gold); }
.hero h1 { color: var(--paper); margin-bottom: .45em; }
.hero h1 .accent { color: var(--gold); display: block; }
.hero__lead { font-size: clamp(1.06rem, 1.4vw, 1.2rem); color: var(--on-ink-muted); max-width: 36em; margin-bottom: 30px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 34px; }

.hero--tool::before { -webkit-mask-image: linear-gradient(180deg, transparent, #000 320px); mask-image: linear-gradient(180deg, transparent, #000 320px); }
.hero--tool .hero__intro { max-width: 900px; text-align: center; padding-block: 52px 36px; }
.hero__intro .eyebrow { justify-content: center; margin-bottom: 14px; }
.hero__intro .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; }
.hero--tool h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); margin-bottom: .4em; }
.hero--tool .hero__lead { max-width: 46em; margin: 0 auto; }
.hero__tool { position: relative; color: var(--text); padding: 0 0 clamp(64px, 8vw, 100px); background: linear-gradient(180deg, transparent 0, transparent 120px, var(--washi) 120px); }
@media (max-width: 680px) {
  .hero--tool .hero__intro { padding-block: 32px 26px; }
  .hero__tool { background: linear-gradient(180deg, transparent 0, transparent 90px, var(--washi) 90px); }
}

.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: var(--on-ink); isolation: isolate; overflow: hidden; }
.section--ink::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; z-index: -1; opacity: .7; }
.section--ink h2, .section--ink h3 { color: var(--paper); }
.section--pattern { background-color: var(--washi); background-image: var(--wave-ink); background-size: 80px 40px; }
.section-head { max-width: 760px; margin: 0 auto 52px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section--ink .section-head p { color: var(--on-ink-muted); }
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::after { content: ""; width: 28px; height: 2px; background: currentColor; }
.kw { color: var(--crimson); }
.section--ink .kw { color: var(--gold); }

.tool-section { position: relative; padding: 0 0 clamp(64px, 8vw, 100px); background: linear-gradient(180deg, var(--ink) 0, var(--ink) 120px, var(--washi) 120px); }
.tool { background: var(--paper); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.tool__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 34px 40px 26px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, #fffdfb, var(--paper)); }
.tool__head h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-bottom: .3em; }
.tool__head p { margin: 0; color: var(--muted); }
.tool__live { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(18, 52, 63, .06); font-size: .82rem; font-weight: 700; color: var(--ink); }
.tool__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #2E9E6A; box-shadow: 0 0 0 4px rgba(46, 158, 106, .18); }
.tool__body { padding: 32px 40px 40px; }
.gen-label { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.gen-label b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--gold); font-size: .75rem; letter-spacing: 0; }
.gen-types { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
.gen-type { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 92px; padding: 12px 8px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--washi); font-weight: 700; font-size: .88rem; line-height: 1.2; text-align: center; color: var(--ink); transition: border-color .2s, background-color .2s, transform .2s var(--ease), box-shadow .2s; }
.gen-type svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gen-type:hover { border-color: var(--ink); transform: translateY(-2px); }
.gen-type.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); box-shadow: 0 10px 20px -12px rgba(18, 52, 63, .8); }
.gen-type.is-active svg { stroke: var(--gold); }
.gen-controls { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr; gap: 18px; margin-bottom: 28px; align-items: start; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field__label { font-weight: 700; font-size: .94rem; }
.field__hint { font-weight: 500; color: var(--muted); font-size: .84rem; }
.field__note { font-size: .82rem; color: var(--muted); line-height: 1.45; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: #fff; font-size: 1rem; transition: border-color .2s, box-shadow .2s; }
.field select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2312343F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(255, 199, 44, .45); }
.seg { display: flex; padding: 4px; border-radius: var(--radius-sm); background: var(--washi); border: 1.5px solid var(--line); }
.seg__btn { flex: 1; min-height: 42px; border: 0; background: transparent; border-radius: 9px; font-weight: 700; font-size: .92rem; color: var(--ink); transition: background-color .2s, color .2s; }
.seg__btn.is-active { background: var(--ink); color: var(--paper); }
.seg__btn:disabled { cursor: not-allowed; }
.is-disabled .seg { opacity: .45; }
.gen-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.gen-msg { min-height: 1.4em; margin: 12px 0 0; font-size: .92rem; color: var(--crimson); font-weight: 600; }
.gen-results { margin-top: 26px; padding-top: 28px; border-top: 1px dashed var(--line-strong); min-height: 420px; }
.gen-results__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.gen-results__title { margin: 0; font-size: 1.5rem; }
.gen-results__title svg { display: inline-block; width: 22px; height: 22px; margin-right: 10px; vertical-align: -3px; fill: none; stroke: var(--crimson); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.gen-results__count { font-weight: 700; font-size: .9rem; color: var(--muted); background: var(--washi); padding: 4px 12px; border-radius: 999px; }
.gen-empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.name-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.nm-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 14px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; animation: cardIn .45s var(--ease) both; animation-delay: calc(var(--i) * 28ms); overflow: hidden; }
.nm-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 199, 44, .22), transparent 70%); pointer-events: none; }
.nm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.nm-card--mine { border: 2px solid var(--gold); background: linear-gradient(180deg, #FFFCF0, #fff); }
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.nm-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.nm-tag { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.nm-mine { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: var(--ink-900); padding: 3px 9px; border-radius: 999px; }
.nm-card__kanji { font-size: 1.85rem; line-height: 1.2; color: var(--crimson); margin: 0 0 6px; word-break: keep-all; overflow-wrap: anywhere; }
.nm-card__kanji--none { opacity: .18; color: var(--ink); }
.nm-card__name { font-family: var(--font-display); font-weight: 800; font-size: 1.32rem; line-height: 1.25; margin: 0 0 4px; color: var(--ink); overflow-wrap: anywhere; }
.nm-card__say { font-size: .84rem; color: var(--muted); letter-spacing: .02em; margin: 0 0 10px; }
.nm-card__mean { font-size: .88rem; line-height: 1.55; margin: 0 0 8px; color: var(--ink); }
.nm-card__mean .jp { color: var(--crimson); font-size: .95rem; }
.nm-card__mean .dot { color: var(--muted); }
.nm-card__sub { font-size: .82rem; line-height: 1.5; color: var(--muted); margin: 0 0 14px; }
.nm-card__actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.icon-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; font-size: .84rem; font-weight: 700; color: var(--ink); transition: background-color .2s, border-color .2s, color .2s; }
.icon-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--ink); background: var(--washi); }
.icon-btn--fav.is-on { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.icon-btn--fav.is-on svg { fill: currentColor; }
.btn.is-copied, .btn.is-copied:hover, .icon-btn.is-copied, .icon-btn.is-copied:hover { background: #2E9E6A; border-color: #2E9E6A; color: #fff; }
.is-copied svg { stroke-width: 2.8; animation: copiedPop .35s var(--ease); }
@keyframes copiedPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.gen-results__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.favourites { margin-top: 32px; padding: 24px; border-radius: var(--radius); background: var(--washi); border: 1px solid var(--line); }
.favourites__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.favourites__title { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 1.2rem; }
.favourites__title svg { width: 20px; height: 20px; fill: var(--crimson); }
.favourites__count { background: var(--ink); color: var(--gold); font-family: var(--font-body); font-size: .78rem; padding: 2px 9px; border-radius: 999px; }
.fav-empty { margin: 0; color: var(--muted); font-size: .94rem; }
.fav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.fav { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 16px; font-weight: 700; max-width: 100%; }
.fav__name { overflow-wrap: anywhere; }
.fav__kanji { color: var(--crimson); font-size: .95rem; }
.fav__remove { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--washi); display: grid; place-items: center; flex: none; }
.fav__remove svg { width: 14px; height: 14px; stroke: var(--ink); stroke-width: 2.4; fill: none; stroke-linecap: round; }
.fav__remove:hover { background: var(--crimson); }
.fav__remove:hover svg { stroke: #fff; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px); background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s var(--ease), visibility .25s; z-index: 150; max-width: calc(100% - 32px); text-align: center; }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
#print-sheet { display: none; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 34px 30px 30px; box-shadow: var(--shadow-sm); }
.step__num { font-family: var(--font-display); font-size: 3.4rem; line-height: 1; font-weight: 800; color: transparent; -webkit-text-stroke: 1.5px var(--ink); opacity: .25; position: absolute; right: 24px; top: 20px; background: linear-gradient(135deg, var(--gold) 15%, var(--crimson) 90%) no-repeat left bottom / 100% 0; -webkit-background-clip: text; background-clip: text; transition: background-size .45s var(--ease), opacity .3s, -webkit-text-stroke-color .3s; }
.step:hover .step__num, .step:focus-within .step__num { background-size: 100% 100%; opacity: 1; -webkit-text-stroke-color: var(--gold-600); }
.step__icon { width: 58px; height: 58px; border-radius: 16px; background: var(--ink); display: grid; place-items: center; margin-bottom: 20px; }
.step__icon svg { width: 28px; height: 28px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.step p { color: var(--muted); margin: 0; }

.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.style-card { display: flex; flex-direction: column; background: rgba(246, 241, 230, .05); border: 1px solid rgba(246, 241, 230, .13); border-radius: var(--radius); padding: 24px 22px; text-decoration: none; color: var(--on-ink); transition: transform .25s var(--ease), background-color .25s, border-color .25s; }
.style-card:hover { transform: translateY(-4px); background: rgba(246, 241, 230, .09); border-color: rgba(255, 199, 44, .55); }
.style-card__kanji { font-family: var(--font-jp); font-size: 1.7rem; color: var(--gold); line-height: 1; margin-bottom: 14px; }
.style-card__label { font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--on-ink-muted); }
.style-card h3 { font-size: 1.2rem; margin: 6px 0 8px; }
.style-card p { font-size: .93rem; color: var(--on-ink-muted); margin-bottom: 14px; }
.style-card__ex { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.style-card__ex span { font-size: .8rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255, 199, 44, .12); color: var(--gold-soft); }
.style-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; font-weight: 700; font-size: .88rem; color: var(--gold); }
.style-card__go svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; transition: transform .2s; }
.style-card:hover .style-card__go svg { transform: translateX(4px); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split__media { position: relative; isolation: isolate; }
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; }
.split__media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--gold); border-radius: var(--radius-lg); z-index: -1; }
.split--rev .split__media { order: 2; }
.checklist { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 38px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 2px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFC72C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 15px no-repeat; }
.anatomy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); margin: 24px 0; }
.anatomy__part { padding: 18px; text-align: center; border-right: 1px solid var(--line); }
.anatomy__part:last-child { border-right: 0; }
.anatomy__kanji { font-family: var(--font-jp); font-size: 2rem; color: var(--crimson); line-height: 1.1; }
.anatomy__romaji { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; }
.anatomy__role { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }

.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tab { min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--paper); font-weight: 700; color: var(--ink); transition: all .2s; }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.tab:hover { border-color: var(--ink); }
.name-table-wrap, .table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--ink); color: var(--paper); font-weight: 700; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: rgba(246, 241, 230, .55); }
td .jp, td[lang="ja"] { color: var(--crimson); font-size: 1.1rem; white-space: nowrap; }
.name-table td:first-child { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; }

.notice { display: flex; gap: 18px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-sm); }
.notice svg { width: 28px; height: 28px; flex: none; stroke: var(--crimson); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 2px; }
.notice p { margin: 0; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s; position: relative; }
.post-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-800); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.post-card__cat { align-self: flex-start; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--crimson); background: rgba(179, 38, 30, .08); padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; text-decoration: none; }
.post-card__title { font-size: 1.24rem; line-height: 1.3; margin: 0 0 10px; }
.post-card__title a { text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card__title a:hover { color: var(--ink-600); }
.post-card__excerpt { color: var(--muted); font-size: .96rem; margin: 0 0 18px; }
.post-card__meta { margin-top: auto; display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--muted); font-weight: 600; }
.post-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-card__meta svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.center-cta { text-align: center; margin-top: 46px; }

.faq { max-width: 880px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 24px; font-family: var(--font-display); font-weight: 800; font-size: 1.12rem; line-height: 1.35; color: var(--ink); border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--washi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312343F' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 16px no-repeat; transition: transform .3s var(--ease), background-color .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--gold); }
.faq__a { padding: 0 24px 22px; color: var(--muted); }
.faq__a p:last-child { margin: 0; }

.cta-band { position: relative; border-radius: var(--radius-lg); background: var(--ink); color: var(--on-ink); padding: clamp(40px, 6vw, 72px); overflow: hidden; isolation: isolate; display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: center; }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; z-index: -1; }
.cta-band::after { content: "侍"; position: absolute; right: 4%; top: 50%; transform: translateY(-50%); font-family: var(--font-jp); font-size: 15rem; line-height: 1; color: rgba(255, 199, 44, .07); z-index: -1; }
.cta-band h2 { color: var(--paper); margin-bottom: .3em; }
.cta-band p { color: var(--on-ink-muted); margin: 0; max-width: 36em; }

.page-hero { position: relative; background: var(--ink); color: var(--on-ink); padding: 70px 0 76px; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; z-index: -1; }
.page-hero::after { content: attr(data-kanji); position: absolute; right: 5%; bottom: -40px; font-family: var(--font-jp); font-size: 13rem; line-height: 1; color: rgba(255, 199, 44, .08); z-index: -1; }
.page-hero h1 { color: var(--paper); font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 18ch; }
.page-hero p { color: var(--on-ink-muted); font-size: 1.12rem; max-width: 40em; margin: 0; }
.breadcrumb { margin-bottom: 22px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .88rem; font-weight: 600; }
.breadcrumb li { display: inline-flex; align-items: center; gap: 6px; color: var(--on-ink-muted); }
.breadcrumb li + li::before { content: "/"; opacity: .5; }
.breadcrumb a { color: var(--gold); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; margin-bottom: 18px; }
.card__icon svg { width: 26px; height: 26px; stroke: var(--gold); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.18rem; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.prose-block { max-width: 760px; }
.prose-block p, .prose-block li { color: #2A4650; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 36px 0 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat strong { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1.1; color: var(--ink); }
.stat span { font-size: .86rem; color: var(--muted); font-weight: 600; }

.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 32px; align-items: start; }
.contact-info { display: grid; gap: 16px; }
.info-card { display: flex; gap: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.info-card h2, .info-card h3 { font-size: 1.12rem; margin-bottom: .3em; }
.info-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.info-card a { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.form-card h2 { font-size: 1.7rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-card .field { margin-bottom: 16px; }
.field textarea { min-height: 150px; resize: vertical; }
.field__error { color: var(--crimson); font-size: .85rem; font-weight: 600; min-height: 1.2em; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--crimson); }
.form-status { margin-top: 14px; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; display: none; }
.form-status.is-ok { display: block; background: rgba(46, 158, 106, .1); color: #1D6B47; border: 1px solid rgba(46, 158, 106, .3); }
.form-status.is-err { display: block; background: rgba(179, 38, 30, .07); color: var(--crimson); border: 1px solid rgba(179, 38, 30, .25); }

.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.cat-btn { min-height: 42px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--paper); font-weight: 700; font-size: .92rem; color: var(--ink); transition: all .2s; }
.cat-btn:hover { border-color: var(--ink); }
.cat-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.blog-status { color: var(--muted); font-weight: 600; margin: -14px 0 24px; min-height: 1.5em; }
.featured-post { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--paper); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); margin-bottom: 34px; position: relative; }
.featured-post__media { min-height: 100%; }
.featured-post__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }
.featured-post__body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.featured-post__body h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.featured-post__body h2 a { text-decoration: none; }
.featured-post__body h2 a::after { content: ""; position: absolute; inset: 0; }
.featured-post__label { font-size: .74rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 52px; }
.pagination a, .pagination span { min-width: 46px; height: 46px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--paper); font-weight: 700; text-decoration: none; color: var(--ink); transition: all .2s; }
.pagination a:hover { border-color: var(--ink); transform: translateY(-2px); }
.pagination [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.pagination .is-disabled { color: var(--muted); border-style: dashed; pointer-events: none; }
.pagination svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.post-hero { background: var(--ink); color: var(--on-ink); padding: 56px 0 160px; position: relative; isolation: isolate; overflow: hidden; }
.post-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; z-index: -1; }
.post-hero h1 { color: var(--paper); font-size: clamp(2rem, 4.4vw, 3.3rem); max-width: 22ch; }
.post-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: .92rem; color: var(--on-ink-muted); font-weight: 600; }
.post-hero__meta .post-card__cat { margin: 0; background: rgba(255, 199, 44, .14); color: var(--gold); }
.post-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.post-hero__meta svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.post-hero__lead { color: var(--on-ink-muted); font-size: 1.14rem; max-width: 44em; margin: 0 0 20px; }
.post-cover { margin: -128px auto 0; position: relative; z-index: 2; }
.post-cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding-block: 56px 30px; align-items: start; }
.post-aside { position: sticky; top: 24px; display: grid; gap: 18px; }
.post-toc, .aside-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.post-toc h2, .aside-card h2 { font-size: .8rem; font-family: var(--font-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.post-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; counter-reset: toc; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: .92rem; font-weight: 600; line-height: 1.4; color: var(--ink); transition: background-color .2s; }
.post-toc a::before { content: counter(toc, decimal-leading-zero); color: var(--crimson); font-weight: 800; font-size: .8rem; padding-top: 2px; }
.post-toc a:hover, .post-toc a.is-active { background: var(--washi); }
.aside-card p { font-size: .94rem; color: var(--muted); }
.aside-card--ink { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.aside-card--ink h2 { color: var(--gold); }
.aside-card--ink p { color: var(--on-ink-muted); }
.prose { font-size: 1.09rem; line-height: 1.8; color: #213F49; min-width: 0; }
.prose > * { max-width: 72ch; }
.prose .lead { font-size: 1.24rem; line-height: 1.7; color: var(--ink); font-weight: 500; }
.prose h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); margin: 1.8em 0 .6em; padding-top: .2em; }
.prose h3 { font-size: 1.32rem; margin: 1.6em 0 .5em; }
.prose a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose a:hover { background: var(--gold-soft); }
.prose ul li, .prose ol li { margin-bottom: .5em; }
.prose ul li::marker { color: var(--crimson); }
.prose ol li::marker { color: var(--crimson); font-weight: 800; }
.prose strong { color: var(--ink); }
.prose .jp { color: var(--crimson); }
.prose blockquote { margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--gold); background: var(--paper); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.prose .table-wrap { margin: 1.6em 0; max-width: 100%; }
.prose table { font-size: .95rem; }
.post-callout { margin: 1.8em 0; padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); border-left: 5px solid var(--crimson); border-radius: var(--radius-sm); }
.post-callout p { margin: 0; }
.post-faq { margin-top: 2.4em; }
.post-faq h2 { margin-top: 0; }
.post-faq h3 { font-size: 1.15rem; margin: 1.2em 0 .4em; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 20px; padding-top: 26px; border-top: 1px solid var(--line); }
.post-tags span { font-size: .84rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); }
.author-box { display: flex; gap: 18px; align-items: flex-start; padding: 24px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 20px 0; max-width: 72ch; }
.author-box img { width: 60px; height: 60px; border-radius: 14px; flex: none; }
.author-box h2 { font-size: 1.1rem; margin-bottom: .2em; font-family: var(--font-display); }
.author-box p { margin: 0; font-size: .94rem; color: var(--muted); }
.post-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.post-share > span { font-weight: 700; font-size: .92rem; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); text-decoration: none; font-weight: 700; font-size: .86rem; color: var(--ink); transition: all .2s; }
.share-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.share-btn svg { width: 16px; height: 16px; fill: currentColor; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 30px 0 0; max-width: 72ch; }
.post-nav a { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; transition: border-color .2s, transform .2s; }
.post-nav a:hover { border-color: var(--ink); transform: translateY(-2px); }
.post-nav small { display: block; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.post-nav strong { font-family: var(--font-display); font-size: 1.02rem; line-height: 1.35; display: block; }
.post-nav a:last-child { text-align: right; }
.related { padding: 60px 0 90px; }
.reading-progress { position: fixed; left: 0; top: 0; height: 3px; width: 100%; background: var(--gold); transform-origin: 0 50%; transform: scaleX(0); z-index: 120; }

.legal { max-width: 820px; }
.legal h2 { font-size: 1.6rem; margin-top: 1.8em; }
.legal p, .legal li { color: #2A4650; }
.legal .updated { display: inline-block; font-size: .9rem; font-weight: 700; color: var(--muted); background: var(--paper); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin-bottom: 20px; }
.legal a { color: var(--ink); font-weight: 600; text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }

.error-page { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.error-page__kanji { font-family: var(--font-jp); font-size: clamp(6rem, 18vw, 11rem); line-height: 1; color: var(--crimson); margin-bottom: 10px; }
.error-page p { color: var(--muted); max-width: 34em; margin: 0 auto 28px; }
.error-page .hero__cta { justify-content: center; }

.site-footer { background: var(--ink-900); color: var(--on-ink-muted); padding: 72px 0 0; position: relative; isolation: isolate; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; inset: 0; background-image: var(--wave); background-size: 80px 40px; opacity: .5; z-index: -1; }
.footer__grid { display: grid; grid-template-columns: minmax(240px, 320px) repeat(4, auto); justify-content: space-between; gap: 36px 40px; padding-bottom: 50px; }
.site-footer .brand { color: var(--paper); }
.site-footer .brand__sub { color: var(--on-ink-muted); }
.site-footer .brand__name b { color: var(--gold); }
.footer__desc { margin: 18px 0 18px; font-size: .95rem; max-width: 30em; }
.footer__mail { display: inline-flex; align-items: center; gap: 8px; color: var(--gold); font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.footer__mail svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex: none; }
.footer__mail:hover { text-decoration: underline; }
.footer__heading { font-family: var(--font-body); font-size: .78rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--paper); margin-bottom: 18px; }
.footer__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer__list a { color: var(--on-ink-muted); text-decoration: none; font-size: .95rem; transition: color .2s; display: inline-block; padding: 2px 0; }
.footer__list a:hover { color: var(--gold); }
.footer__bottom { border-top: 1px solid rgba(246, 241, 230, .1); padding: 22px 0; display: flex; justify-content: center; text-align: center; flex-wrap: wrap; gap: 12px; font-size: .88rem; }
.footer__bottom p { margin: 0; }
.footer__bottom a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.scroll-top { position: fixed; right: 22px; bottom: 22px; width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--gold); color: var(--ink-900); display: grid; place-items: center; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(14px); transition: all .3s var(--ease); z-index: 90; }
.scroll-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.scroll-top svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .gen-types { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .style-grid, .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; grid-template-columns: 1fr; order: -1; }
  .post-aside .aside-card--ink { display: none; }
  .post-layout { gap: 32px; }
  .gen-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav__toggle { display: inline-flex; }
  .nav__cta { display: none; }
  .nav__menu { position: fixed; top: 0; right: 0; bottom: 0; width: min(340px, 86vw); flex-direction: column; align-items: stretch; gap: 4px; padding: 18px 18px 28px; background: var(--paper); box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .35s var(--ease); z-index: 120; overflow-y: auto; visibility: hidden; }
  .nav-open .nav__menu { transform: none; visibility: visible; }
  .nav-open .nav__backdrop { opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav__menu-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
  .nav__menu-title { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; }
  .nav__close { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--washi); display: grid; place-items: center; }
  .nav__close svg { width: 20px; height: 20px; stroke: var(--ink); stroke-width: 2.2; fill: none; stroke-linecap: round; }
  .nav__link { padding: 14px 14px; border-radius: 12px; font-size: 1.04rem; }
  .nav__link svg { display: block; }
  .nav__menu-cta { display: block; margin-top: 14px; }
  .nav__menu-cta .btn { width: 100%; }

  .steps { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split--rev .split__media { order: 0; }
  .split__media::before { inset: 12px -12px -12px 12px; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-post { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .cta-band { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  body { font-size: 1rem; }
  .container { padding: 0 16px; }
  .brand__mark { width: 40px; height: 40px; }
  .brand__name { font-size: 1.16rem; }
  .brand__sub { letter-spacing: .2em; font-size: .6rem; }
  .tool__head { padding: 24px 20px 20px; flex-direction: column; }
  .tool__body { padding: 22px 20px 26px; }
  .gen-types { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .gen-type { min-height: 80px; font-size: .8rem; padding: 10px 4px; }
  .gen-controls { grid-template-columns: 1fr; gap: 16px; }
  .gen-actions .btn { flex: 1 1 auto; }
  .gen-actions .btn--primary { flex-basis: 100%; }
  .name-grid { grid-template-columns: 1fr; }
  .style-grid, .card-grid, .post-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 30px 20px; }
  .form-row { grid-template-columns: 1fr; }
  .anatomy { grid-template-columns: 1fr; }
  .anatomy__part { border-right: 0; border-bottom: 1px solid var(--line); }
  .anatomy__part:last-child { border-bottom: 0; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav a:last-child { text-align: left; }

  .post-hero { padding: 40px 0 120px; }
  .post-cover { margin-top: -96px; }
  .prose { font-size: 1.03rem; }
  .prose .lead { font-size: 1.12rem; }
  th, td { padding: 11px 13px; }
  .cta-band::after { font-size: 9rem; }
  .page-hero::after { font-size: 8rem; }
  .faq summary { padding: 18px; font-size: 1.04rem; }
  .faq__a { padding: 0 18px 18px; }
  .notice { flex-direction: column; gap: 10px; padding: 20px; }
}
@media (max-width: 380px) {
  .gen-types { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr; }
  .brand__sub { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

.gen-type__k { font-family: var(--font-jp); font-weight: 700; font-size: 1.55rem; line-height: 1; color: var(--crimson); transition: color .2s; }
.gen-type.is-active .gen-type__k { color: var(--gold); }
@media (max-width: 680px) { .gen-type__k { font-size: 1.35rem; } }
[hidden] { display: none !important; }

.section--notice { padding: 56px 0 0; }

.info-card .card__icon { flex: none; margin-bottom: 0; }
.tool :focus-visible { outline-color: var(--ink); }

@media (min-width: 961px) and (min-height: 540px) {
  .split--sticky { align-items: start; }
  .split--sticky .split__media { position: sticky; top: 24px; align-self: start; }
}

/* ---------- generators dropdown ---------- */
.nav__item--drop { position: relative; }
.nav__drop-btn { border: 0; background: transparent; cursor: pointer; }
.nav__link .nav__chev { display: block; width: 14px; height: 14px; opacity: .7; stroke-width: 2.4; transition: transform .2s; }
.nav__drop-btn[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }
.nav__drop-btn.is-current { background: var(--ink); color: var(--paper); }
.nav__sub { position: absolute; top: calc(100% + 10px); left: 50%; min-width: 320px; list-style: none; margin: 0; padding: 8px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translate(-50%, 6px); transition: opacity .2s, transform .2s var(--ease), visibility 0s linear .2s; z-index: 130; }
.nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
/* visibility switches instantly on open so keyboard focus can move into the menu right away */
.nav__item--drop.is-open .nav__sub { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition-delay: 0s; }
.nav__sublink { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .94rem; line-height: 1.3; white-space: nowrap; transition: background-color .2s; }
.nav__sublink:hover { background: var(--washi); }
.nav__sublink .k { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--washi); font-family: var(--font-jp); font-weight: 700; font-size: .98rem; color: var(--crimson); }
.nav__sublink[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav__sublink[aria-current="page"] .k { background: rgba(255, 199, 44, .14); color: var(--gold); }
.nav__sub-all { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.nav__sub-all .nav__sublink { color: var(--crimson); font-weight: 700; }
.nav__sub-all svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-left: 2px; }
@media (min-width: 961px) and (max-width: 1180px) {
  .nav__menu { gap: 0; }
  .nav__menu .nav__link { padding: 9px 10px; font-size: .93rem; }
}
@media (min-width: 961px) and (max-width: 1060px) {
  .nav { gap: 12px; }
  .nav__menu .nav__link { padding: 9px 7px; }
  .nav__cta { padding-inline: .9em; }
}
@media (max-width: 960px) {
  .nav__drop-btn { width: 100%; text-align: left; }
  .nav__drop-btn .nav__chev { margin-left: auto; }
  .nav__sub { position: static; display: none; min-width: 0; margin: 2px 0 6px; padding: 4px 0 4px 12px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: none; box-shadow: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav__sub::before { display: none; }
  .nav__item--drop.is-open .nav__sub { display: block; transform: none; }
  .nav__sublink { min-height: 44px; padding: 7px 10px; white-space: normal; }
}

/* ---------- dedicated generator pages ---------- */
/* clip, not hidden: a hidden box can still be scrolled sideways by scrollIntoView, which would shift the tool */
.hero--tool { overflow: clip; }
.hero--tool .breadcrumb { margin-bottom: 16px; }
.hero--tool .breadcrumb ol { justify-content: center; }
.tool-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; list-style: none; padding: 0; margin: 18px 0 0; font-size: .9rem; font-weight: 600; color: var(--on-ink); }
.tool-trust li { display: inline-flex; align-items: center; gap: 7px; }
.tool-trust svg { width: 16px; height: 16px; stroke: var(--gold); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.gen-types--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gen-types--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.gen-types--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gen-types--7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gen-controls--2 { grid-template-columns: 2fr 1fr; }
.gen-controls--3 { grid-template-columns: 1fr 1fr .6fr; }
.gen-controls--4 { grid-template-columns: 1.2fr 1fr 1fr .6fr; }
.check { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line-strong); background: #fff; font-weight: 600; font-size: .95rem; cursor: pointer; }
.field .check input { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none; accent-color: var(--ink); }
#tool .nm-card__top { flex-wrap: wrap; }
.nm-badge { font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.nm-badge--hist { background: var(--ink); color: var(--gold); }
.nm-badge--fict { background: rgba(18, 52, 63, .08); color: var(--ink); }
.nm-badge--fantasy { background: rgba(179, 38, 30, .09); color: var(--crimson); }
.nm-badge--creative { background: var(--gold-soft); color: var(--ink-900); }
.nm-note { margin: 0 0 8px; font-size: .85rem; line-height: 1.5; color: var(--ink); }
.nm-note b { color: var(--muted); font-weight: 700; }
.nm-note--creative { padding-left: 10px; border-left: 3px solid var(--gold); }
.section-head--gap { margin-top: 72px; }
.hero--hub .tool-list { margin-bottom: 8px; }
.tool-content { padding-block: clamp(56px, 8vw, 96px); }
.tool-content .prose { margin: 0 auto; max-width: 820px; }
.tool-content .prose > * { max-width: none; }
.tool-content .prose h2:first-child { margin-top: 0; }
.tool-content .notice { margin: 1.8em 0; }

/* ---------- generator link lists (homepage, hub, related tools) ---------- */
.tool-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.tool-list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-item { position: relative; display: flex; gap: 16px; align-items: flex-start; height: 100%; padding: 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.tool-item:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-3px); }
.tool-item__k { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: var(--ink); color: var(--gold); font-family: var(--font-jp); font-weight: 700; font-size: 1.4rem; line-height: 1; }
.tool-item h3 { font-size: 1.14rem; margin: 2px 0 6px; }
.tool-item h3 a { text-decoration: none; color: var(--ink); }
.tool-item h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.tool-item p { margin: 0 0 10px; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.tool-item__go { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--crimson); }
.tool-item__go svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.tool-item:hover .tool-item__go svg { transform: translateX(3px); }
.tool-item--current { border-color: var(--ink); }
.section--ink .style-more { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; margin: 36px 0 0; padding: 0; list-style: none; }
.style-more__label { width: 100%; text-align: center; color: var(--on-ink-muted); font-weight: 600; margin-bottom: 4px; }
.style-more a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(246, 241, 230, .22); color: var(--paper); text-decoration: none; font-weight: 600; font-size: .94rem; transition: border-color .2s, color .2s, background-color .2s; }
.style-more a:hover { border-color: var(--gold); color: var(--gold); }
.style-more .k { font-family: var(--font-jp); font-weight: 700; color: var(--gold); }

@media (max-width: 1100px) {
  .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gen-types--7 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gen-types--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gen-controls--3, .gen-controls--4 { grid-template-columns: 1fr 1fr; }
  .gen-controls--2 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .tool-list, .tool-list--2 { grid-template-columns: 1fr; }
  .gen-types--4, .gen-types--7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gen-types--3, .gen-types--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gen-controls--2, .gen-controls--3, .gen-controls--4 { grid-template-columns: 1fr; }
  .tool-item { padding: 18px; }
  .tool-trust { font-size: .84rem; gap: 4px 14px; }
}
@media (max-width: 380px) {
  .gen-types--3, .gen-types--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- footer: brand + four balanced link columns (six links each) ---------- */
.footer__list { gap: 12px; }
.footer__list a { white-space: nowrap; }
.footer__bottom { align-items: center; gap: 8px 22px; }
.footer__files { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; list-style: none; margin: 0; padding: 0; }
.footer__files a { color: var(--on-ink-muted); text-decoration: none; }
.footer__files a:hover { color: var(--gold); }
@media (max-width: 1180px) {
  .footer__grid { grid-template-columns: repeat(4, auto); }
  .footer__brand { grid-column: 1 / -1; max-width: 560px; }
}
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; gap: 32px 24px; }
  .footer__list a { white-space: normal; }
}
@media (max-width: 380px) {
  .footer__grid { grid-template-columns: 1fr; }
}@media (max-width: 480px) {
  .footer__list { gap: 10px; }
  .footer__list a { font-size: .9rem; }
}
