/* Zanshin — marketing site */
:root {
  --ink: #0d1117; --ink2: #14182b; --ink3: #1a1f35; --ink4: #232a44;
  --line: rgba(243, 234, 215, .10); --line2: rgba(243, 234, 215, .18);
  --cream: #f3ead7; --text: #ece4d2; --muted: #a39d90; --dim: #7a7668;
  --red: #d63428; --red2: #ef4a3c; --gold: #c9aa70; --gold2: #e2c792;
  --win: #6cbf8f; --loss: #e0574b; --lucky: #e2b04a; --good: #6aa9e6;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --jp: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Yu Gothic", "Meiryo", serif;
  --radius: 16px; --gutter: 16px; --max: 1160px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--text);
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink2) 45%, var(--ink) 100%) fixed, var(--ink);
  font: 16px/1.6 var(--sans);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--gold2); text-decoration: none; }
a:hover { color: var(--cream); }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--cream); line-height: 1.15; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 7vw, 4.6rem); }
h2 { font-size: clamp(1.8rem, 4.6vw, 2.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.jp { font-family: var(--jp); }
.red { color: var(--red); }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--red); color: var(--cream); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
section { position: relative; }
.section { padding: 88px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow .jp { letter-spacing: .1em; font-size: 1rem; color: var(--red); }
.lede { font-size: 1.12rem; color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.sec-head { margin-bottom: 44px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line2); background: rgba(243, 234, 215, .04); color: var(--cream); font-weight: 600; cursor: pointer;
  transition: transform .15s, background .15s, border-color .15s, box-shadow .2s; white-space: nowrap; }
.btn:hover { color: var(--cream); border-color: var(--gold); transform: translateY(-1px); }
.btn-primary { background: var(--red); border-color: var(--red); box-shadow: 0 8px 30px rgba(214, 52, 40, .35); }
.btn-primary:hover { background: var(--red2); border-color: var(--red2); box-shadow: 0 10px 36px rgba(214, 52, 40, .5); }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn .arrow { transition: transform .15s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, border-color .25s, backdrop-filter .25s; border-bottom: 1px solid transparent; }
.site-header.scrolled, .site-header.open, .site-header.solid { background: rgba(13, 17, 23, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--cream); margin-right: auto; }
.brand:hover { color: var(--cream); }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand-name { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: .02em; }
.brand-name .jp { color: var(--red); margin-left: 6px; font-weight: 700; }
.nav-links { display: none; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 12px; color: var(--muted); font-size: .95rem; border-radius: 8px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--cream); }
.nav-cta { display: none; align-items: center; gap: 8px; }
.menu-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line2); border-radius: 12px; background: transparent; cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 2px; background: var(--cream); border-radius: 2px; position: relative; transition: transform .2s, background .2s; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.open .menu-btn span { background: transparent; }
.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { display: none; padding: 8px var(--gutter) 22px; border-top: 1px solid var(--line); }
.open .mobile-menu { display: block; }
.mobile-menu a:not(.btn) { display: block; padding: 13px 4px; color: var(--text); border-bottom: 1px solid var(--line); font-size: 1.05rem; }
.mobile-menu .row { display: flex; gap: 10px; margin-top: 18px; }
.mobile-menu .row .btn { flex: 1; }
@media (min-width: 960px) {
  .nav-links, .nav-cta { display: flex; }
  .menu-btn, .mobile-menu, .open .mobile-menu { display: none; }
}

/* ---------- hanko seal ---------- */
.hanko { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 8px; background: var(--red); color: var(--cream);
  font-family: var(--jp); font-weight: 700; font-size: 1.3rem; line-height: 1.05; writing-mode: vertical-rl; letter-spacing: .05em;
  transform: rotate(-6deg); box-shadow: inset 0 0 0 3px rgba(243, 234, 215, .9), inset 0 0 0 5px var(--red), 0 6px 20px rgba(214, 52, 40, .35); }
.hanko.sm { width: 46px; height: 46px; font-size: .95rem; border-radius: 6px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; }
.hero-stage, .hero-fallback, .hero-shade { position: absolute; inset: 0; }
.hero-stage { z-index: -2; }
.hero-stage canvas { width: 100% !important; height: 100% !important; }
.hero-fallback { z-index: -3; background: url("../img/hero-fallback.svg") 62% 50% / cover no-repeat, var(--ink2); transition: opacity .8s; }
.hero.is-3d .hero-fallback { opacity: 0; }
.hero-shade { z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(13, 17, 23, .85) 0%, rgba(13, 17, 23, .45) 50%, rgba(13, 17, 23, 0) 75%),
              linear-gradient(0deg, var(--ink) 0%, rgba(13, 17, 23, 0) 30%); }
.hero-inner { padding-top: 120px; padding-bottom: 96px; }
.hero-copy { max-width: 640px; }
.hero h1 { text-shadow: 0 4px 40px rgba(0, 0, 0, .5); }
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede { color: #cfc7b6; font-size: clamp(1.05rem, 2.4vw, 1.22rem); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .9rem; color: var(--muted); list-style: none; padding: 0; margin: 0; }
.hero-meta li::before { content: "◆"; color: var(--gold); font-size: .6rem; margin-right: 8px; vertical-align: 2px; }
.hero-seal { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.hero-seal small { color: var(--muted); letter-spacing: .2em; text-transform: uppercase; font-size: .72rem; line-height: 1.5; }
.scroll-cue { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); color: var(--muted); font-size: .72rem; letter-spacing: .25em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }
@media (max-width: 720px) {
  .hero { align-items: flex-end; }
  .hero-shade { background: linear-gradient(0deg, var(--ink) 8%, rgba(13, 17, 23, .7) 45%, rgba(13, 17, 23, .1) 75%); }
  .hero-fallback { background: url("../img/hero-fallback.svg") 80% 8% / auto 62% no-repeat, var(--ink); }
  .hero-inner { padding-bottom: 48px; }
  .hero-seal, .hero-meta { display: none; }
  .hero .lede { font-size: 1rem; line-height: 1.55; }
  .hero-ctas { margin: 22px 0 0; flex-wrap: nowrap; gap: 10px; }
  .hero-ctas .btn { flex: 1 1 auto; padding: 0 14px; }
  .scroll-cue { display: none; }
}

/* ---------- pattern band ---------- */
.seigaiha { position: relative; }
.seigaiha::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/seigaiha.svg") 0 0 / 80px 40px repeat; opacity: .06;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.divider { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, transparent, var(--line2), transparent); }

/* ---------- cards / panels ---------- */
.panel { background: linear-gradient(180deg, rgba(26, 31, 53, .75), rgba(20, 24, 43, .75)); border: 1px solid var(--line); border-radius: var(--radius); }
.grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- quadrant ---------- */
.quad-layout { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .quad-layout { grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: end; } }
.quad-wrap { position: relative; padding: 0 0 30px 30px; }
.quad-axis-y, .quad-axis-x { position: absolute; color: var(--dim); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; }
.quad-axis-y { left: 0; top: calc(50% - 15px); transform: translate(-50%, -50%) rotate(-90deg); transform-origin: center; margin-left: 9px; }
.quad-axis-x { bottom: 4px; left: calc(50% + 15px); transform: translateX(-50%); }
.quad-cols, .quad-rows { position: absolute; display: flex; color: var(--muted); font-size: .78rem; font-weight: 600; }
.quad { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
@media (min-width: 640px) { .quad-cell { min-height: 0; aspect-ratio: 1 / .66; } }
.quad-cell { position: relative; min-width: 0; min-height: 132px; padding: 14px; border-radius: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--ink3); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.quad-cell:hover { transform: translateY(-2px); border-color: var(--line2); }
.quad-cell .q-tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.quad-cell .q-name { font-family: var(--serif); font-size: clamp(1.05rem, 3.4vw, 1.45rem); color: var(--cream); line-height: 1.15; }
.quad-cell .q-kanji { position: absolute; right: 10px; top: 4px; font-family: var(--jp); font-size: clamp(2.4rem, 8vw, 3.6rem); opacity: .12; color: var(--cream); line-height: 1; }
.quad-cell .q-verdict { font-size: .78rem; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.quad-cell .q-verdict::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.q-earned .q-verdict { color: var(--win); }
.q-good .q-verdict { color: var(--good); }
.q-lucky .q-verdict { color: var(--lucky); }
.q-lesson .q-verdict { color: var(--loss); }
.quad-cell[aria-pressed="true"] { border-color: currentColor; }
.q-earned[aria-pressed="true"] { color: var(--win); background: linear-gradient(160deg, rgba(108, 191, 143, .18), var(--ink3)); box-shadow: 0 10px 40px rgba(108, 191, 143, .12); }
.q-good[aria-pressed="true"] { color: var(--good); background: linear-gradient(160deg, rgba(106, 169, 230, .18), var(--ink3)); box-shadow: 0 10px 40px rgba(106, 169, 230, .12); }
.q-lucky[aria-pressed="true"] { color: var(--lucky); background: linear-gradient(160deg, rgba(226, 176, 74, .2), var(--ink3)); box-shadow: 0 10px 40px rgba(226, 176, 74, .14); }
.q-lesson[aria-pressed="true"] { color: var(--loss); background: linear-gradient(160deg, rgba(224, 87, 75, .18), var(--ink3)); box-shadow: 0 10px 40px rgba(224, 87, 75, .12); }
.quad-cell.pulse { animation: pulse .9s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(226, 199, 146, .6); } 100% { box-shadow: 0 0 0 18px rgba(226, 199, 146, 0); } }
.quad-detail { padding: 26px; }
.quad-detail h3 { font-size: 1.6rem; margin-bottom: .35em; }
.quad-detail .q-sub { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.quad-detail .q-what { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; font-size: .95rem; }
.quad-detail .q-what strong { color: var(--cream); }
.deal { margin-top: 22px; padding: 16px; border-radius: 12px; border: 1px dashed var(--line2); }
.deal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.deal-trade { margin-top: 12px; font-size: .95rem; }
.deal-trade .pnl { font-weight: 700; font-variant-numeric: tabular-nums; }
.pnl.pos { color: var(--win); } .pnl.neg { color: var(--loss); }
.deal-trade ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }

/* ---------- council ---------- */
.council { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .council { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .council { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.tile { display: block; width: 100%; color: inherit; font: inherit; perspective: 1000px; height: 250px; border: 0; padding: 0; background: none; cursor: pointer; text-align: left; }
@media (min-width: 640px) { .tile { height: 270px; } }
.tile-inner { display: block; position: relative; width: 100%; height: 100%; transition: transform .7s cubic-bezier(.2, .7, .2, 1); transform-style: preserve-3d; }
.tile.flipped .tile-inner { transform: rotateY(180deg); }
@media (hover: hover) and (pointer: fine) { .tile:hover .tile-inner { transform: rotateY(180deg); } .tile.flipped:hover .tile-inner { transform: rotateY(180deg); } }
.tile-face { position: absolute; inset: 0; border-radius: var(--radius); border: 1px solid var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 18px; display: flex; flex-direction: column; overflow: hidden; }
.tile-front { background: radial-gradient(120% 90% at 50% 0%, rgba(214, 52, 40, .14), transparent 60%), var(--ink3); justify-content: space-between; }
.tile-front::after { content: ""; position: absolute; inset: auto 0 0 0; height: 48%; background: url("../img/seigaiha.svg") 0 0 / 56px 28px repeat; opacity: .07;
  -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.tile-kanji { font-family: var(--jp); font-size: clamp(3.4rem, 12vw, 4.6rem); line-height: 1; color: var(--cream); margin-top: 6px; }
.tile-front .tile-name { font-family: var(--serif); font-size: 1.25rem; color: var(--cream); }
.tile-front .tile-role { font-size: .82rem; color: var(--gold); letter-spacing: .04em; }
.tile-front .tile-hint { position: absolute; top: 14px; right: 14px; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.tile-back { transform: rotateY(180deg); background: linear-gradient(170deg, var(--ink4), var(--ink3)); gap: 8px; }
.tile-back .tb-head { display: flex; align-items: center; gap: 10px; }
.tile-back .tb-kanji { font-family: var(--jp); font-size: 1.6rem; color: var(--red); }
.tile-back .tile-name { font-family: var(--serif); color: var(--cream); font-size: 1.05rem; }
.tile-back p { font-size: .87rem; color: #cfc7b6; margin: 0; line-height: 1.5; }
.tile-back .tb-ex { margin-top: auto; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; font-style: italic; }
.tile-seal { display: grid; place-items: center; text-align: center; border: 1px dashed var(--line2); border-radius: var(--radius); padding: 18px; height: 250px; color: var(--muted); font-size: .9rem; }
@media (min-width: 640px) { .tile-seal { height: 270px; } }
.tile-seal .hanko { display: grid; margin: 0 auto 16px; }

/* ---------- demo ---------- */
.demo-grid { display: grid; gap: 22px; align-items: start; }
@media (min-width: 960px) { .demo-grid { grid-template-columns: 380px 1fr; } }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; min-height: 260px; padding: 24px;
  border: 1.5px dashed var(--line2); border-radius: var(--radius); background: rgba(26, 31, 53, .5); cursor: pointer; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(201, 170, 112, .07); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .drop-icon { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: rgba(214, 52, 40, .14); color: var(--red); font-size: 1.6rem; font-family: var(--jp); }
.drop strong { color: var(--cream); font-size: 1.05rem; }
.drop small { color: var(--muted); }
.drop canvas { max-height: 220px; width: auto; border-radius: 10px; border: 1px solid var(--line); }
.drop.has-img .drop-icon, .drop.has-img .drop-copy { display: none; }
.demo-side { display: flex; flex-direction: column; gap: 12px; }
.demo-side .row { display: flex; gap: 10px; flex-wrap: wrap; }
.demo-side .row .btn { flex: 1; }
.demo-note { font-size: .82rem; color: var(--dim); }
.result { padding: 22px; min-height: 260px; }
.result-empty { display: grid; place-items: center; text-align: center; color: var(--muted); min-height: 216px; }
.result-empty .jp { font-size: 2.6rem; color: var(--line2); display: block; }
.result-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 16px; }
.score-ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--ink3) 78%, transparent 80% 100%), conic-gradient(var(--ring, var(--gold)) calc(var(--p) * 1%), rgba(243, 234, 215, .08) 0); }
.score-ring b { font-family: var(--serif); font-size: 1.7rem; color: var(--cream); line-height: 1; }
.score-ring small { display: block; font-size: .65rem; color: var(--muted); text-align: center; }
.result-title { flex: 1; min-width: 180px; }
.result-title h3 { margin: 0 0 4px; font-size: 1.3rem; }
.badge { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--muted); }
.badge.sample { color: var(--lucky); border-color: rgba(226, 176, 74, .4); }
.badge.live { color: var(--win); border-color: rgba(108, 191, 143, .4); }
.result-notes { margin: 0 0 16px; padding: 12px 14px 12px 32px; border-radius: 10px; background: rgba(243, 234, 215, .04); font-size: .9rem; color: #cfc7b6; }
.bot-cards { display: grid; gap: 10px; }
@media (min-width: 640px) { .bot-cards { grid-template-columns: 1fr 1fr; } }
.bot-card { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 17, 23, .45); opacity: 0; transform: translateY(8px); animation: rise .45s ease forwards; }
.bot-card.skipped { opacity: .55; }
@keyframes rise { to { opacity: 1; transform: none; } }
.bot-card.skipped { animation-name: rise-dim; }
@keyframes rise-dim { to { opacity: .55; transform: none; } }
.bc-head { display: flex; align-items: center; gap: 10px; }
.bc-kanji { font-family: var(--jp); font-size: 1.5rem; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: rgba(214, 52, 40, .13); color: var(--red); flex: none; }
.bc-name { font-weight: 700; color: var(--cream); line-height: 1.2; }
.bc-role { font-size: .76rem; color: var(--muted); }
.bc-score { margin-left: auto; font-family: var(--serif); font-size: 1.25rem; color: var(--cream); font-variant-numeric: tabular-nums; }
.bc-score small { font-size: .7rem; color: var(--muted); }
.bc-bar { height: 4px; border-radius: 4px; background: rgba(243, 234, 215, .08); margin: 10px 0 8px; overflow: hidden; }
.bc-bar i { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--gold); transition: width .8s ease .2s; }
.bc-bar i.hi { background: var(--win); } .bc-bar i.mid { background: var(--lucky); } .bc-bar i.lo { background: var(--loss); }
.bc-verdict { font-size: .9rem; color: var(--text); margin: 0 0 6px; }
.bc-findings { margin: 0; padding-left: 18px; font-size: .82rem; color: var(--muted); }
.bc-findings li + li { margin-top: 2px; }

/* ---------- features ---------- */
.features { display: grid; gap: 18px; }
@media (min-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
.feature { padding: 24px; overflow: hidden; position: relative; }
.feature .f-kanji { position: absolute; right: 18px; top: 8px; font-family: var(--jp); font-size: 4.4rem; color: var(--cream); opacity: .06; line-height: 1; }
.feature h3 { font-size: 1.4rem; display: flex; align-items: baseline; gap: 10px; }
.feature h3 .jp { color: var(--red); font-size: 1.1rem; }
.feature > p { color: var(--muted); }
.mock { margin-top: 18px; border-radius: 12px; border: 1px solid var(--line); background: rgba(13, 17, 23, .55); padding: 14px; }
.goal { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.goal:last-of-type { border-bottom: 0; }
.goal .check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line2); flex: none; display: grid; place-items: center; font-size: .75rem; color: var(--ink); }
.goal.done .check { background: var(--win); border-color: var(--win); }
.goal.done span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(163, 157, 144, .5); }
.streak { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }
.streak-dots { display: flex; gap: 5px; }
.streak-dots i { width: 14px; height: 14px; border-radius: 4px; background: rgba(243, 234, 215, .08); }
.streak-dots i.on { background: var(--red); }
.sensei-say { margin-top: 12px; padding: 10px 12px; border-left: 2px solid var(--gold); background: rgba(201, 170, 112, .06); font-size: .88rem; color: #d8cfbd; border-radius: 0 8px 8px 0; }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: .9rem; }
.cal-head b { color: var(--cream); font-family: var(--serif); font-size: 1.05rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .dow { font-size: .62rem; color: var(--dim); text-align: center; letter-spacing: .08em; padding-bottom: 2px; }
.cal .day { aspect-ratio: 1; border-radius: 6px; background: rgba(243, 234, 215, .03); font-size: .6rem; padding: 3px; color: var(--dim); display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.cal .day b { font-size: .6rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow: hidden; }
.cal .day.win { background: rgba(108, 191, 143, .16); color: var(--win); }
.cal .day.loss { background: rgba(224, 87, 75, .15); color: var(--loss); }
.cal .day.flat { background: rgba(243, 234, 215, .06); }
.cal .day.empty { background: transparent; }
@media (max-width: 420px) { .cal .day b { display: none; } }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; font-size: .82rem; color: var(--muted); }
.cal-foot b { color: var(--win); }
.pod { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.pod:last-child { border-bottom: 0; }
.pod-art { width: 44px; height: 44px; border-radius: 10px; flex: none; display: grid; place-items: center; font-family: var(--jp); color: var(--cream); font-size: 1.2rem; background: linear-gradient(135deg, var(--red), #7c1d17); }
.pod-art.b { background: linear-gradient(135deg, var(--gold), #6f5a33); }
.pod-art.c { background: linear-gradient(135deg, #3b4a78, var(--ink4)); }
.pod-t { font-size: .92rem; color: var(--cream); line-height: 1.3; }
.pod-s { font-size: .78rem; color: var(--muted); }
.pod-play { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line2); display: grid; place-items: center; color: var(--gold); font-size: .7rem; flex: none; }
.quote-card { position: relative; margin: 18px 0 0; padding: 18px 18px 16px; }
.quote-card blockquote { margin: 0; font-family: var(--serif); font-size: 1.25rem; line-height: 1.45; color: var(--cream); }
.quote-card blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--red); margin-bottom: 8px; }
.quote-card figcaption { margin-top: 12px; color: var(--gold); font-size: .9rem; }
.quote-card figcaption a { color: var(--muted); font-size: .8rem; margin-left: 8px; }

/* ---------- pricing ---------- */
.price-cards { display: grid; gap: 18px; max-width: 880px; margin: 0 auto; }
@media (min-width: 760px) { .price-cards { grid-template-columns: 1fr 1fr; } }
.price { padding: 28px; position: relative; display: flex; flex-direction: column; }
.price.featured { border-color: rgba(214, 52, 40, .55); box-shadow: 0 20px 60px rgba(214, 52, 40, .14); }
.price .ribbon { position: absolute; top: 18px; right: 18px; }
.price h3 { font-size: 1.35rem; }
.price .amount { font-family: var(--serif); font-size: 3rem; color: var(--cream); line-height: 1; margin: 6px 0 4px; }
.price .amount small { font-size: 1rem; color: var(--muted); font-family: var(--sans); }
.price .soon { color: var(--gold); font-size: .9rem; margin-bottom: 18px; }
.ticks { list-style: none; padding: 0; margin: 0 0 24px; }
.ticks li { padding: 7px 0 7px 28px; position: relative; font-size: .95rem; border-bottom: 1px solid var(--line); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 13px; width: 12px; height: 7px; border-left: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(-45deg); }
.price .btn { margin-top: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.compare th { color: var(--muted); font-weight: 600; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; }
.compare .yes { color: var(--win); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* ---------- download ---------- */
.dl-cards { display: grid; gap: 18px; }
@media (min-width: 900px) { .dl-cards { grid-template-columns: repeat(3, 1fr); } }
.dl { padding: 26px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.dl.mine { border-color: rgba(201, 170, 112, .55); }
.dl.mine::after { content: "Your device"; position: absolute; top: 18px; right: 18px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.dl-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: rgba(243, 234, 215, .06); margin-bottom: 8px; }
.dl-icon svg { width: 28px; height: 28px; fill: var(--cream); }
.dl h3 { margin-bottom: .2em; }
.dl p { color: var(--muted); font-size: .95rem; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 4px 0 18px; }
.steps li { counter-increment: s; position: relative; padding: 6px 0 6px 34px; font-size: .93rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 6px; width: 22px; height: 22px; border-radius: 50%; background: rgba(214, 52, 40, .16); color: var(--red2); font-size: .75rem; font-weight: 700; display: grid; place-items: center; }
.dl .btn { margin-top: auto; }
.kbd { display: inline-block; padding: 0 6px; border-radius: 5px; border: 1px solid var(--line2); font-size: .85em; color: var(--cream); background: rgba(243, 234, 215, .05); }

/* ---------- teasers ---------- */
.teasers { display: grid; gap: 18px; }
@media (min-width: 900px) { .teasers { grid-template-columns: repeat(3, 1fr); } }
.teaser { padding: 26px; display: flex; flex-direction: column; }
.teaser h3 { font-size: 1.4rem; }
.teaser p { color: var(--muted); }
.teaser .big { font-family: var(--serif); font-size: 2.6rem; color: var(--cream); line-height: 1; margin: 4px 0 6px; }
.teaser .btn, .teaser .t-link { margin-top: auto; align-self: flex-start; }
.t-link { font-weight: 600; }
.platforms { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font-size: .8rem; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line2); color: var(--text); }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative; font-family: var(--serif); font-size: 1.15rem; color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 1.5rem; color: var(--gold); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: #cfc7b6; }
.faq details > div p:last-child { margin-bottom: 0; }
.faq-group { margin-top: 44px; }
.faq-group:first-child { margin-top: 0; }
.faq-group h2 { font-size: 1.3rem; color: var(--gold); letter-spacing: .04em; margin-bottom: 4px; }

/* ---------- final cta ---------- */
.cta-band { text-align: center; padding: 72px 24px; border-radius: 24px; overflow: hidden; position: relative; isolation: isolate;
  background: radial-gradient(60% 120% at 50% 120%, rgba(214, 52, 40, .38), transparent 70%), var(--ink3); border: 1px solid var(--line); }
.cta-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("../img/seigaiha.svg") 0 0 / 80px 40px repeat; opacity: .07; }
.cta-band .sun { width: 90px; height: 90px; border-radius: 50%; background: var(--red); margin: 0 auto 22px; box-shadow: 0 0 80px rgba(214, 52, 40, .6); }
.cta-band .lede { margin: 0 auto 26px; }
.cta-band .row { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; }

/* ---------- page hero (sub-pages) ---------- */
.page-hero { padding: 140px 0 48px; text-align: center; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; left: 50%; top: 60px; width: 360px; height: 360px; transform: translateX(-50%); border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(214, 52, 40, .32), transparent); }
.page-hero .lede { margin: 0 auto; }

/* ---------- footer ---------- */
.site-footer { margin-top: 40px; border-top: 1px solid var(--line); padding: 56px 0 36px; font-size: .92rem; color: var(--muted); position: relative; }
.foot-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.foot-brand { grid-column: 1 / -1; }
@media (min-width: 860px) { .foot-brand { grid-column: auto; } }
.foot-brand .brand { margin-bottom: 14px; }
.foot-brand p { max-width: 340px; }
.site-footer h4 { margin: 0 0 12px; font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--cream); }
.foot-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--dim); }
.foot-bottom p { margin: 0; max-width: 640px; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .tile-inner { transition: none; }
}

/* ---------- plans & community (Free / Pro) ---------- */
.plan-tag { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.plan-tag.red { color: var(--red2); }
.badge.recommended { color: var(--cream); background: var(--red); border-color: var(--red); }
.feature h3 .badge { font-family: var(--sans); font-size: .62rem; vertical-align: middle; }
.price.featured { background: radial-gradient(120% 70% at 100% 0%, rgba(214, 52, 40, .16), transparent 60%), linear-gradient(180deg, rgba(26, 31, 53, .85), rgba(20, 24, 43, .85)); }
.ticks li.hl { margin: 2px 0 6px; padding: 10px 12px 10px 38px; border: 1px solid rgba(201, 170, 112, .4); border-radius: 10px; background: rgba(201, 170, 112, .08); }
.ticks li.hl::before { left: 14px; top: 16px; }
.ticks li.hl strong { color: var(--cream); display: block; }
.ticks li.hl span { display: block; font-size: .85rem; color: var(--muted); }
.teasers.two { max-width: 880px; margin: 0 auto; }
@media (min-width: 900px) { .teasers.two { grid-template-columns: 1fr 1fr; } }
.compare td:not(:first-child) { white-space: nowrap; }
.feature-wide { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .feature-wide { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; padding: 32px; } }
.community { border-color: rgba(214, 52, 40, .45); background: radial-gradient(90% 120% at 0% 100%, rgba(214, 52, 40, .18), transparent 60%), linear-gradient(180deg, rgba(26, 31, 53, .85), rgba(20, 24, 43, .85)); }
.community .badge { margin-bottom: 12px; }
.community h3 { font-size: 1.6rem; }
.community .mock { margin-top: 0; }
.dc-chan { font-size: .8rem; color: var(--muted); padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); font-weight: 600; }
.dc-msg { display: flex; gap: 10px; padding: 8px 0; font-size: .88rem; line-height: 1.45; }
.dc-msg b { color: var(--cream); font-weight: 600; margin-right: 4px; }
.dc-av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: var(--cream); background: #5865f2; }
.dc-av.b { background: var(--red); }
.dc-av.c { background: var(--gold); color: var(--ink); }
.community .f-kanji { display: none; }

/* yearly option on the Pro card */
.price .yearly { color: var(--cream); font-size: .95rem; margin: 2px 0 6px; }
.price .yearly span { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 6px; background: var(--red, #d63428); color: #fff; font-size: .75rem; font-weight: 700; }
.price .yearly-btn { margin-top: 8px; }

.foot-a11y a { text-decoration: underline; }
:focus-visible { outline: 3px solid #f2b134; outline-offset: 2px; }

[hidden] { display: none !important; }

.price-cards.three { max-width: 1180px; }
@media (min-width: 980px) { .price-cards.three { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 760px) and (max-width: 979px) { .price-cards.three { grid-template-columns: 1fr 1fr; } .price-cards.three .featured { grid-column: 1 / -1; } }
.plan-tag.gold { color: #c9aa70; }

/* decorative characters removed: hide their now-empty holders */
.jp:empty, .bc-kanji:empty, .hanko:empty, .kanji:empty, .bk:empty { display: none; }

/* "The idea" quadrant: all four boxes in one brand colour */
.q-earned .q-verdict, .q-good .q-verdict, .q-lucky .q-verdict, .q-lesson .q-verdict { color: var(--red2); }
.q-earned[aria-pressed="true"], .q-good[aria-pressed="true"], .q-lucky[aria-pressed="true"], .q-lesson[aria-pressed="true"] {
  color: var(--red2); background: linear-gradient(160deg, rgba(214, 52, 40, .18), var(--ink3)); box-shadow: 0 10px 40px rgba(214, 52, 40, .12); }

/* Cloudflare Turnstile human check (usually invisible) */
.human { margin: 10px 0; display: flex; justify-content: center; }
.human:empty { margin: 0; }
