/* brushfang.com. Wide screens place every region of the approved comp (karuta cards on tatami) at its measured box,
   in % of a 2560x1440 frame; phones stack the same pieces. */

@font-face { font-family: 'Klee One'; src: url('/assets/fonts/klee-one-regular.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Klee One'; src: url('/assets/fonts/klee-one-semibold.woff') format('woff'); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f8efe2;
  --paper-deep: #efe1d0;
  --nav: #f3ecdd;
  --rule: #cdbaa7;
  --ink: #15130f;
  --ink-soft: #5f5348;
  --vermilion: #b94a37;
  --vermilion-deep: #9a3a2a;
  --field: #fdfaf4;
  --tatami: #6e6440;
  --tatami-deep: #4f4830;
  --ghost: #ddd3c3;
  --hp: #d4513a;
  --hp-track: #43403b;
  --dojo: #8fa6bb;
  --forge: #cf8a52;
  --library: #b8574b;
  --shadow: 0 0.35em 0.9em rgb(40 30 10 / 0.28);
  --font: 'Klee One', 'Hiragino Maru Gothic ProN', 'Yu Gothic', sans-serif;

  /* Measured regions of the approved comp (from .impeccable/build/scaffold/layout.css). */
  --r-nav-bar-h: 8.190%;
  --r-logo-x: 16.410%; --r-logo-y: 0.690%; --r-logo-w: 12.890%; --r-logo-h: 6.600%;
  --r-nav-links-x: 62.300%; --r-nav-links-y: 1.940%; --r-nav-links-w: 19.920%; --r-nav-links-h: 4.170%;
  --r-dojo-card-x: 8.360%; --r-dojo-card-y: 13.890%; --r-dojo-card-w: 16.640%; --r-dojo-card-h: 24.860%;
  --r-forge-card-x: 8.910%; --r-forge-card-y: 40.970%; --r-forge-card-w: 15.630%; --r-forge-card-h: 22.920%;
  --r-library-card-x: 74.610%; --r-library-card-y: 13.890%; --r-library-card-w: 16.880%; --r-library-card-h: 26.670%;
  --r-arena-card-x: 74.610%; --r-arena-card-y: 40.630%; --r-arena-card-w: 15.630%; --r-arena-card-h: 22.920%;
  --r-hero-card-x: 26.250%; --r-hero-card-y: 15.830%; --r-hero-card-w: 47.190%; --r-hero-card-h: 49.170%;
  --r-writing-x: 29.490%; --r-writing-y: 26.390%; --r-writing-w: 17.500%; --r-writing-h: 24.650%;
  --r-ink-blob-x: 40.000%; --r-ink-blob-y: 48.960%; --r-ink-blob-w: 8.280%; --r-ink-blob-h: 10.000%;
  --r-hp-bar-x: 40.740%; --r-hp-bar-y: 57.640%; --r-hp-bar-w: 7.190%; --r-hp-bar-h: 2.080%;
  --r-headline-x: 50.310%; --r-headline-y: 20.690%; --r-headline-w: 17.190%; --r-headline-h: 11.250%;
  --r-subcopy-x: 50.310%; --r-subcopy-y: 33.190%; --r-subcopy-w: 18.550%; --r-subcopy-h: 6.940%;
  --r-email-label-x: 50.390%; --r-email-label-y: 42.920%;
  --r-email-field-x: 50.390%; --r-email-field-y: 45.560%; --r-email-field-w: 20.000%; --r-email-field-h: 5.970%;
  --r-cta-x: 50.390%; --r-cta-y: 52.850%; --r-cta-w: 20.000%; --r-cta-h: 6.810%;
  --r-how-heading-x: 41.560%; --r-how-heading-y: 69.310%; --r-how-heading-w: 16.560%; --r-how-heading-h: 6.110%;
  --r-how-card-1-x: 17.380%; --r-how-card-2-x: 39.770%; --r-how-card-3-x: 62.110%;
  --r-how-card-y: 78.130%; --r-how-card-w: 20.590%;
  /* The left paper sheet inside the hero card (comp pixels 690..1260 x 270..890). */
  --sheet-x: 26.950%; --sheet-y: 18.750%; --sheet-w: 22.250%; --sheet-h: 43.050%;
}

*, *::before, *::after { box-sizing: border-box; }
html { caret-color: var(--vermilion); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--tatami-deep) var(--paper-deep); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--tatami-deep); color: var(--ink); font-family: var(--font); font-weight: 400; line-height: 1.5; }
img { display: block; max-width: 100%; height: auto; }
picture { display: contents; }
::selection { background: var(--vermilion); color: var(--paper); }
:focus-visible { outline: 3px solid var(--vermilion); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
h1, h2, h3 { font-weight: 600; line-height: 1.12; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: 0.6rem 1rem; background: var(--paper); border-radius: 6px; }
.skip:focus { top: 1rem; }

/* ---------- Shared pieces ---------- */

.nav-bar { background: var(--nav); border-bottom: 1px solid var(--rule); box-shadow: 0 0.25rem 1rem rgb(40 30 10 / 0.18); z-index: 3; }
.logo { display: flex; align-items: center; gap: 0.35em; text-decoration: none; }
.logo-mark { width: auto; height: 100%; }
.logo-word { font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.nav-links { display: flex; justify-content: space-between; align-items: center; }
.nav-links a { text-decoration: none; padding: 0.15em 0; background: linear-gradient(var(--vermilion), var(--vermilion)) 0 100% / 0 2px no-repeat; transition: background-size 0.25s ease-out; }
.nav-links a:hover { background-size: 100% 2px; }

.keeper { margin: 0; position: relative; }
.keeper img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0.4em 0.6em rgb(30 22 6 / 0.35)); }
.keeper figcaption { position: absolute; inset: 0; pointer-events: none; }
.keeper .label { position: absolute; font-weight: 600; color: var(--ink); line-height: 1; }
.keeper .kana {
  position: absolute; display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%;
  border: 0.09em solid var(--vermilion); color: var(--ink); background: rgb(253 250 244 / 0.82); line-height: 1;
}
.keeper .soon { position: absolute; left: 0; right: 0; text-align: center; color: var(--ink); line-height: 1; }

.hero-card-paper { filter: drop-shadow(0 0.6em 1.2em rgb(30 22 6 / 0.4)); }
.sheet { background: #f5ecdd url('/assets/img/writing-sheet-1200.webp') center / 100% 100% no-repeat; box-shadow: 0 0.3em 0.8em rgb(60 40 10 / 0.22); rotate: -1.2deg; }
.ghost, .ink { position: absolute; rotate: 1.2deg; } /* undo the paper's tilt so pointer and ink line up */
.ghost path { fill: none; stroke: var(--ghost); stroke-linecap: round; stroke-linejoin: round; stroke-width: 7; }
.ghost .start { fill: var(--vermilion); opacity: 0.8; }
.ink { touch-action: none; cursor: crosshair; }
.fight-hint { position: absolute; left: 0; right: 0; text-align: center; color: var(--ink-soft); }
.blob { position: absolute; object-fit: contain; transform-origin: 50% 100%; }
.hp { position: absolute; background: var(--hp-track); border: 2px solid #1d1a17; border-radius: 99px; padding: 2px; z-index: 1; }
.hp span { display: block; height: 100%; width: var(--hp-left, 100%); background: linear-gradient(#e2664c, var(--hp)); border-radius: inherit; transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.slash { position: absolute; pointer-events: none; }

h1 { color: var(--ink); letter-spacing: -0.01em; }
.subcopy { color: var(--ink-soft); }

.how h2 { color: var(--ink); text-align: center; position: relative; isolation: isolate; }
.how h2::before { content: ''; position: absolute; inset: -35% -25%; z-index: -1; background: radial-gradient(closest-side, rgb(247 236 205 / 0.75), rgb(247 236 205 / 0)); }
.how-cards { list-style: none; margin: 0; padding: 0; }
.how-card {
  background: var(--paper); border: 1px solid #dac7ae; border-radius: 0.3em; box-shadow: var(--shadow);
  outline: 1px solid #c8ab86; outline-offset: -0.7em; display: grid; grid-template-columns: 1fr auto; gap: 0 1.2em; align-items: start;
}
.how-card h3 { grid-column: 1 / -1; }
.how-card p { color: var(--ink-soft); }
.how-card img { border-radius: 0.6em; border: 0.25em solid #2b2520; box-shadow: 0 0.3em 0.8em rgb(30 20 5 / 0.3); }

/* ---------- Wide: the comp frame ---------- */

@media (min-width: 1280px) {
  /* container-type makes the stage its own stacking context: lift it so its overflowing cards stay above the next section. */
  .stage { position: relative; z-index: 2; aspect-ratio: 2560 / 1440; container-type: inline-size; margin-bottom: 9cqw; }
  .ground { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-mask-image: linear-gradient(#000 84%, transparent); mask-image: linear-gradient(#000 84%, transparent); }
  /* Below the frame the tatami fades out so the How it plays cards finish on the same floor. */
  .stage, .stage::after { background: linear-gradient(rgb(34 30 14 / 0.62), rgb(34 30 14 / 0.62)), url('/assets/img/tatami-tile-1180.webp') center top / 1180px auto repeat; }
  .stage::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 9cqw; background-position: center -100%; }

  .nav-bar { position: absolute; left: 0; top: 0; width: 100%; height: var(--r-nav-bar-h); }
  /* Inside the nav bar (8.19% of the frame tall): vertical values are the comp's divided by 0.0819. */
  .logo { position: absolute; left: var(--r-logo-x); top: 8.4%; height: 80.6%; font-size: 2.6cqw; }
  .logo-mark { height: 92%; }
  .nav-links { position: absolute; left: var(--r-nav-links-x); top: 23.7%; width: var(--r-nav-links-w); height: 50.9%; font-size: max(15px, 1.484cqw); }

  .hero, .how { position: absolute; inset: 0; z-index: 1; }
  .how { pointer-events: none; }
  .how-card { pointer-events: auto; }
  .hero-card, .fight, .foe, .pitch, .stores { display: contents; }

  .keeper { position: absolute; }
  .dojo { left: var(--r-dojo-card-x); top: var(--r-dojo-card-y); width: var(--r-dojo-card-w); height: var(--r-dojo-card-h); }
  .forge { left: var(--r-forge-card-x); top: var(--r-forge-card-y); width: var(--r-forge-card-w); height: var(--r-forge-card-h); }
  .library { left: var(--r-library-card-x); top: var(--r-library-card-y); width: var(--r-library-card-w); height: var(--r-library-card-h); }
  .arena { left: var(--r-arena-card-x); top: var(--r-arena-card-y); width: var(--r-arena-card-w); height: var(--r-arena-card-h); }
  .keeper .label { font-size: max(16px, 1.6cqw); }
  .keeper .kana { font-size: max(15px, 1.45cqw); width: 2.3cqw; }
  .dojo .label { left: 52%; top: 9%; }
  .dojo .kana { left: 55%; top: 26%; }
  .forge .label { left: 8%; top: 9%; }
  .forge .kana { left: 8%; top: 27%; }
  .library .label { left: 10%; top: 10%; }
  .library .kana { left: 10%; top: 25%; }
  .arena .label { left: 0; right: 0; top: 60%; text-align: center; font-size: 2.1cqw; }
  .arena .soon { top: 79%; font-size: max(12px, 1cqw); }

  .hero-card-paper { position: absolute; left: var(--r-hero-card-x); top: var(--r-hero-card-y); width: var(--r-hero-card-w); height: var(--r-hero-card-h); object-fit: fill; }
  .sheet { position: absolute; left: var(--sheet-x); top: var(--sheet-y); width: var(--sheet-w); height: var(--sheet-h); }
  /* Writing box relative to the sheet: comp writing region minus the sheet origin. */
  /* The writing square uses most of the sheet so 人 reads at the comp's size. */
  .ghost, .ink { left: 4%; top: 11%; width: 92%; height: 72%; }
  .fight-hint { top: 5%; font-size: max(12px, 1cqw); }
  .blob { left: var(--r-ink-blob-x); top: calc(var(--r-ink-blob-y) - 0.6%); width: var(--r-ink-blob-w); height: 8.6%; }
  .hp { left: var(--r-hp-bar-x); top: var(--r-hp-bar-y); width: var(--r-hp-bar-w); height: var(--r-hp-bar-h); }
  .slash { left: calc(var(--r-ink-blob-x) - 1.5%); top: calc(var(--r-ink-blob-y) + 3%); width: calc(var(--r-ink-blob-w) + 3%); height: 1.4cqw; }

  .hero h1 { position: absolute; left: var(--r-headline-x); top: var(--r-headline-y); width: 19cqw; font-size: 2.969cqw; line-height: 1.12; }
  /* The store pair takes the comp's form boxes: label, field (App Store) and button (Google Play). */
  .stores-label { position: absolute; left: var(--r-email-label-x); top: var(--r-email-label-y); font-size: max(13px, 0.95cqw); line-height: 1; margin: 0; }
  .store-ios { position: absolute; left: var(--r-email-field-x); top: var(--r-email-field-y); width: var(--r-email-field-w); height: var(--r-email-field-h); font-size: max(15px, 1.35cqw); }
  .store-android { position: absolute; left: var(--r-cta-x); top: var(--r-cta-y); width: var(--r-cta-w); height: var(--r-email-field-h); font-size: max(15px, 1.35cqw); }
  .stores-note { position: absolute; left: var(--r-cta-x); top: 59.8%; width: var(--r-cta-w); font-size: max(12px, 0.78cqw); margin: 0; }
  .stores-close { display: flex; }
  .stores-close .store { position: static; }
  .subcopy { position: absolute; left: var(--r-subcopy-x); top: var(--r-subcopy-y); width: var(--r-subcopy-w); font-size: max(14px, 0.977cqw); line-height: 1.38; }

  /* Klee One's ascent sits the letters low in their box: lift the box so the cap line lands on the comp's. */
  .how h2 { position: absolute; left: var(--r-how-heading-x); top: calc(var(--r-how-heading-y) - 1.2%); width: var(--r-how-heading-w); font-size: 2.969cqw; white-space: nowrap; line-height: 1; padding: 0; }
  .how-card { position: absolute; top: var(--r-how-card-y); width: var(--r-how-card-w); padding: 1.7cqw 1.6cqw 1.8cqw; font-size: max(13px, 0.95cqw); }
  .how-card:nth-child(1) { left: var(--r-how-card-1-x); }
  .how-card:nth-child(2) { left: var(--r-how-card-2-x); }
  .how-card:nth-child(3) { left: var(--r-how-card-3-x); }
  .how-card h3 { font-size: max(16px, 1.48cqw); margin-bottom: 0.8cqw; }
  .how-card img { width: 6.4cqw; grid-row: 2; grid-column: 2; }
  .how-card p { grid-row: 2; grid-column: 1; line-height: 1.55; }
}

/* ---------- Narrow: stacked ---------- */

@media (max-width: 1279.98px) {
  .stage { position: relative; overflow: hidden; }
  .ground { display: none; }
  .stage { background: linear-gradient(rgb(34 30 14 / 0.25), rgb(34 30 14 / 0.25)), url('/assets/img/tatami-tile-1180.webp') center top / 900px auto repeat; }
  .nav-bar { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 1rem; }
  .logo { height: 2.4rem; font-size: 1.3rem; }
  .nav-links { gap: 0.9rem; font-size: 0.95rem; white-space: nowrap; }
  .hero { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.25rem 1rem 2rem; max-width: 760px; margin: 0 auto; }
  .hero-card { grid-column: 1 / -1; grid-row: 1; position: relative; background: var(--paper); border-radius: 0.5rem; box-shadow: 0 0.6rem 1.4rem rgb(30 22 6 / 0.45); padding: 1rem; display: grid; gap: 1.25rem; }
  .hero-card-paper { display: none; }
  .fight { position: relative; }
  .sheet { position: relative; aspect-ratio: 1 / 1.05; rotate: 0deg; border-radius: 0.3rem; background-image: url('/assets/img/writing-sheet-600.webp'); }
  .ghost, .ink { rotate: 0deg; }
  .ghost, .ink { left: 6%; top: 5%; width: 88%; height: 80%; }
  .fight-hint { top: 3%; font-size: 1rem; }
  .foe { position: absolute; right: 2%; bottom: 3%; width: 30%; }
  .blob { position: relative; width: 100%; }
  .hp { position: relative; height: 1rem; margin-top: 0.3rem; padding: 1px; border-width: 1.5px; }
  .slash { left: -10%; top: 40%; width: 120%; height: 1.2rem; }
  .pitch { display: grid; gap: 0.9rem; }
  .stores { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .stores-label, .stores-note { grid-column: 1 / -1; font-size: 0.95rem; margin: 0; }
  .stores .store { height: 3.6rem; font-size: 1.2rem; }
  .stores-close { display: flex; }
  h1 { font-size: clamp(2rem, 8vw, 3rem); }
  .subcopy { font-size: 1.05rem; max-width: 60ch; }
  .keeper { aspect-ratio: 4 / 3; }
  .keeper .label { font-size: 1.15rem; }
  .keeper .kana { font-size: 1rem; width: 1.9rem; }
  .dojo .label { left: 52%; top: 9%; } .dojo .kana { left: 55%; top: 26%; }
  .forge .label, .library .label { left: 8%; top: 8%; } .forge .kana, .library .kana { left: 8%; top: 25%; }
  .arena .label { left: 0; right: 0; top: 60%; text-align: center; font-size: 1.4rem; }
  .arena .soon { top: 79%; font-size: 0.85rem; }
  .how { padding: 2.5rem 1rem 3rem; max-width: 760px; margin: 0 auto; }
  .how h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); margin-bottom: 1.25rem; }
  .how-cards { display: grid; gap: 1rem; }
  .how-card { padding: 1.25rem; font-size: 1rem; }
  .how-card h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
  .how-card img { width: 34vw; max-width: 170px; grid-row: 2; grid-column: 2; }
  .how-card p { grid-row: 2; grid-column: 1; }
}

/* ---------- Fight feedback ---------- */

.slash { opacity: 0; background: var(--ink); border-radius: 50% 40% 50% 45% / 60% 50% 60% 40%; rotate: -14deg; transform-origin: 0 50%; transform: scaleX(0); }
.fight.is-hit .slash { animation: slash 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.fight.is-hit .blob { animation: recoil 0.45s ease-out 0.12s; }
.fight.is-miss .blob { animation: wobble 0.5s ease-out; }
.fight.is-beaten .blob { animation: sink 0.8s cubic-bezier(0.5, 0, 0.75, 0) 0.3s forwards; }
@keyframes slash { 0% { opacity: 1; transform: scaleX(0); } 45% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
@keyframes recoil { 0% { transform: none; filter: none; } 20% { transform: translateX(6%) scale(1.04, 0.94); filter: brightness(2.2); } 55% { transform: translateX(-3%); filter: none; } 100% { transform: none; } }
@keyframes wobble { 0%, 100% { transform: none; } 30% { transform: scale(1.06, 0.94); } 60% { transform: scale(0.96, 1.05); } }
@keyframes sink { to { transform: scale(1.3, 0.1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fight.is-hit .blob, .fight.is-miss .blob { animation: none; }
  .fight.is-beaten .blob { animation: none; opacity: 0.25; }
  .fight.is-hit .slash { animation-duration: 0.01s; }
}

/* ---------- Sections below the first screen: the same karuta cards on the tatami floor ---------- */

.town, .bosses, .path, .faq, .close {
  position: relative; padding: clamp(3.5rem, 7vw, 7rem) clamp(1rem, 4vw, 3rem);
  background: linear-gradient(rgb(34 30 14 / 0.62), rgb(34 30 14 / 0.62)), url('/assets/img/tatami-tile-1180.webp') center top / 1180px auto repeat;
}
.town h2, .path h2, .faq h2 { color: #f6ecd8; text-align: center; font-size: clamp(2rem, 4.2vw, 4.75rem); }
.section-lead { color: #e8dcc2; text-align: center; font-size: clamp(1.05rem, 1.3vw, 1.4rem); max-width: 46ch; margin: 0.8rem auto 0; }

.keepers { list-style: none; margin: clamp(5rem, 9vw, 9rem) auto 0; padding: 0; max-width: 1600px; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1rem, 2vw, 2.5rem); }
.keeper-card {
  position: relative; background: var(--paper); border-radius: 0.4rem; box-shadow: var(--shadow);
  border: 1px solid #dac7ae; outline: 2px solid var(--edge, #c8ab86); outline-offset: -0.6rem;
  padding: 0 1.4rem 1.6rem; display: flex; flex-direction: column; align-items: center;
}
.keeper-card:nth-child(odd) { rotate: -1deg; }
.keeper-card:nth-child(even) { rotate: 0.8deg; }
.k-dojo { --edge: var(--dojo); }
.k-library { --edge: var(--library); }
.k-forge { --edge: var(--forge); }
.k-arena { --edge: #9a958c; }
.keeper-card img { height: clamp(220px, 19vw, 340px); width: auto; margin-top: calc(clamp(220px, 19vw, 340px) * -0.42); filter: drop-shadow(0 0.5rem 0.6rem rgb(30 22 6 / 0.3)); }
.k-arena img { filter: grayscale(0.55) drop-shadow(0 0.5rem 0.6rem rgb(30 22 6 / 0.3)); }
.say { margin-top: 1rem; text-align: center; }
.say h3 { font-size: clamp(1.35rem, 1.7vw, 1.9rem); }
.where { display: block; font-size: 0.62em; font-weight: 400; color: var(--ink-soft); letter-spacing: 0.04em; margin-top: 0.15em; }
.say p { margin-top: 0.7rem; color: var(--ink-soft); font-size: clamp(1rem, 1.1vw, 1.2rem); }
.keeper-card .kana {
  position: absolute; top: 1.1rem; right: 1.1rem; display: grid; place-items: center; width: 2.3rem; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--vermilion); background: var(--field); font-size: 1.2rem; line-height: 1;
}

.boss-card {
  max-width: 1400px; margin: 0 auto; border-radius: 0.4rem; box-shadow: var(--shadow);
  outline: 2px solid var(--library); outline-offset: -0.8rem; border: 1px solid #dac7ae;
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: end; overflow: hidden;
  background: radial-gradient(circle at 25% 60%, #f3dfc6, var(--paper) 60%);
}
.boss-art { height: clamp(320px, 38vw, 640px); width: auto; justify-self: center; margin-top: 2rem; object-fit: contain; filter: drop-shadow(0 0.6rem 0.8rem rgb(30 22 6 / 0.3)); transition: opacity 0.3s ease-out, translate 0.3s ease-out; }
.boss-card.is-swapping .boss-art { opacity: 0; translate: 0 1rem; }
.boss-text { padding: clamp(2rem, 4vw, 4.5rem) clamp(1.5rem, 4vw, 4.5rem); align-self: center; }
.boss-text h2 { font-size: clamp(2rem, 3.6vw, 4rem); }
.boss-text > p { margin-top: 1rem; color: var(--ink-soft); font-size: clamp(1.05rem, 1.25vw, 1.35rem); max-width: 42ch; }
.boss-word { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #dac7ae; }
.boss-name { font-weight: 600; font-size: 1.15rem; }
.boss-where { font-weight: 400; color: var(--ink-soft); font-size: 0.9em; margin-left: 0.4em; }
.boss-say { font-size: clamp(1.9rem, 3vw, 3.2rem); font-weight: 600; margin-top: 0.4rem; line-height: 1.2; }
.boss-meaning { color: var(--ink-soft); }
.boss-next {
  margin-top: 1.5rem; font: inherit; font-weight: 600; font-size: 1.05rem; color: var(--ink); background: none; cursor: pointer;
  border: 2px solid currentColor; border-radius: 0.35em; padding: 0.55em 1.1em; transition: background-color 0.15s ease-out;
}
.boss-next:hover { background: rgb(21 19 15 / 0.06); }

.steps { list-style: none; padding: 0; margin: clamp(2.5rem, 5vw, 4rem) auto 0; max-width: 1300px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2.5vw, 3rem); }
.step { position: relative; background: var(--paper); border-radius: 0.4rem; box-shadow: var(--shadow); border: 1px solid #dac7ae; outline: 1px solid #c8ab86; outline-offset: -0.6rem; padding: 2rem 1.8rem 2.2rem; text-align: center; }
.step + .step::before { content: ''; position: absolute; left: calc(-1 * clamp(1rem, 2.5vw, 3rem)); top: 50%; width: clamp(1rem, 2.5vw, 3rem); height: 3px; background: #e8dcc2; border-radius: 3px; }
.glyph { display: block; font-size: clamp(4rem, 6vw, 6rem); line-height: 1.1; font-weight: 600; }
.step h3 { font-size: clamp(1.4rem, 1.8vw, 2rem); margin-top: 0.4rem; }
.step p { margin-top: 0.6rem; color: var(--ink-soft); font-size: clamp(1rem, 1.1vw, 1.2rem); }
.path-notes { max-width: 1300px; margin: 2rem auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.5rem; color: #f2e7d1; font-size: clamp(1rem, 1.15vw, 1.25rem); }
.path-notes strong { font-weight: 600; color: #fff7e8; }

.faq-sheet { max-width: 900px; margin: 2.5rem auto 0; background: var(--paper); border-radius: 0.4rem; box-shadow: var(--shadow); border: 1px solid #dac7ae; padding: 0.6rem clamp(1.2rem, 3vw, 2.6rem); }
.faq details { border-bottom: 1px solid #e3d4bf; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; padding: 1.15rem 2rem 1.15rem 0; font-weight: 600; font-size: clamp(1.1rem, 1.3vw, 1.35rem); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 0.3rem; top: 50%; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--vermilion); border-bottom: 2px solid var(--vermilion); translate: 0 -70%; rotate: 45deg; transition: rotate 0.2s ease-out; }
.faq details[open] summary::after { rotate: 225deg; translate: 0 -20%; }
.faq details p { padding: 0 0 1.2rem; color: var(--ink-soft); font-size: clamp(1rem, 1.1vw, 1.15rem); max-width: 65ch; }

.close { padding-bottom: 4rem; }
.crowd { list-style: none; margin: 0 auto; padding: 0; display: flex; justify-content: center; align-items: flex-end; gap: clamp(0.3rem, 1.5vw, 1.5rem); max-width: 1100px; }
.crowd img { height: clamp(70px, 9vw, 150px); width: auto; filter: drop-shadow(0 0.4rem 0.4rem rgb(20 14 2 / 0.35)); }
.crowd li:nth-child(even) img { height: clamp(60px, 7.5vw, 125px); }
.close-card { max-width: 820px; margin: -0.6rem auto 0; background: var(--paper); border-radius: 0.4rem; box-shadow: var(--shadow); border: 1px solid #dac7ae; outline: 1px solid #c8ab86; outline-offset: -0.6rem; padding: clamp(1.8rem, 4vw, 3.2rem); text-align: center; position: relative; }
.close-card h2 { font-size: clamp(2rem, 3.6vw, 3.6rem); }
.close-card > p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 1.15rem; }

.site-footer { background: #3d3825; color: #e2d6bd; text-align: center; padding: 2.5rem 1rem 3rem; font-size: 0.98rem; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.8rem; margin-bottom: 1rem; font-size: 1.05rem; }
.site-footer a { color: #f6ecd8; }
.site-footer .credit { margin-top: 0.4rem; color: #c7b99c; font-size: 0.9rem; }

@media (max-width: 1279.98px) {
  .keepers { grid-template-columns: 1fr 1fr; row-gap: 7rem; margin-top: 7rem; }
  .boss-card { grid-template-columns: 1fr; }
  .boss-art { height: 300px; order: -1; }
  .steps { grid-template-columns: 1fr; }
  .step + .step::before { left: 50%; top: calc(-1 * clamp(1rem, 2.5vw, 3rem)); width: 3px; height: clamp(1rem, 2.5vw, 3rem); }
}
@media (max-width: 560px) {
  .keepers { grid-template-columns: 1fr; }
  .crowd li:nth-child(n+6) { display: none; }
  .stores-close { flex-direction: column; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .boss-art { transition: none; } }

/* Dealt cards: they start a little low and turned, fully visible, and settle with an exponential ease-out. */
.deal .keeper-card, .deal .step { transition: translate 0.8s cubic-bezier(0.16, 1, 0.3, 1), rotate 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.deal .keeper-card:not(.dealt), .deal .step:not(.dealt) { translate: 0 2.5rem; rotate: -3deg; }

.fight-strike {
  font: inherit; font-size: max(12px, 0.85cqw); color: var(--ink-soft); background: none; border: 0; padding: 0.4em 0.6em; cursor: pointer; z-index: 2;
  text-decoration: underline; text-underline-offset: 0.2em; position: absolute; left: 3%; bottom: 1%; width: max-content; min-height: 44px;
}
.fight-strike:hover { color: var(--ink); }
@media (max-width: 1279.98px) {
  .fight-strike { font-size: 0.95rem; }
  .fight-hint { left: 8%; right: 8%; font-size: 0.95rem; }
}

/* Won: Sumidama is beaten and the card is yours, stamped with a vermilion seal until you fight again. */
.won-stamp {
  position: absolute; right: 7%; top: 14%; width: 18%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center;
  border: 0.12em solid var(--vermilion); color: var(--vermilion); background: rgb(253 250 244 / 0.6); font-weight: 600;
  font-size: max(22px, 2.2cqw); line-height: 1; rotate: -12deg; opacity: 0; scale: 1.6; pointer-events: none; z-index: 2;
  transition: opacity 0.25s ease-out, scale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.fight.is-won .won-stamp { opacity: 1; scale: 1; }
@media (max-width: 1279.98px) { .won-stamp { font-size: 1.8rem; width: 22%; } }
@media (prefers-reduced-motion: reduce) { .won-stamp { transition: none; } }

/* Store buttons, "coming soon" until launch. Not links yet; at launch they become the official App Store and
   Google Play badges (the stores only allow their badges for released apps). */
.store {
  display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; border-radius: 0.45em; padding: 0.4em 1em;
  background: #1d1a17; color: #f6ecd8; border: 2px solid #3a332b; box-shadow: 0 0.2em 0.5em rgb(40 25 10 / 0.3); line-height: 1.1;
}
.store-small { font-size: 0.62em; letter-spacing: 0.04em; color: #d8c9ad; }
.store-name { font-weight: 600; }
.stores-label { color: var(--ink-soft); font-weight: 600; }
.stores-note { color: var(--ink-soft); }
.stores-close { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.6rem; }
.stores-close .store { width: min(100%, 15rem); height: 4rem; font-size: 1.35rem; }
