/* Sumo Grammar's web pages: generated by tools/website/build.mjs from tools/website/product/product.css */
/* The study apps' web pages (tools/website/product): the family's look (sumojapanese.app: warm paper, M PLUS Rounded, round
   buttons, light and dark), each app in its own colours (body.app-kanji, body.app-words). Motion is an extra: everything reads
   without it, and under prefers-reduced-motion nothing moves unless the visitor asks for it. */
@font-face { font-family: 'Sumo Rounded'; font-weight: 400; font-display: swap; src: url(assets/fonts/rounded-400.woff2) format('woff2'); }
@font-face { font-family: 'Sumo Rounded'; font-weight: 700; font-display: swap; src: url(assets/fonts/rounded-700.woff2) format('woff2'); }
@font-face { font-family: 'Sumo Rounded'; font-weight: 800; font-display: swap; src: url(assets/fonts/rounded-800.woff2) format('woff2'); }
@font-face { font-family: 'Sumo Hand'; font-weight: 600; font-display: swap; src: url(assets/fonts/klee-600.woff2) format('woff2'); }

:root {
  color-scheme: light dark;
  --bg: #FBF7F0; --bg-soft: #F4EDE2; --card: #FFFFFF; --line: #ECE3D6; --ink: #2A2420; --ink2: #6F645C; --ink3: #9A8F85;
  --shu: #D9412E; --shu-soft: #FCE6E1; --gold: #F2B233; --focus: #2B4C9B;
  --shadow: 0 18px 50px rgba(42, 36, 32, 0.13); --shadow-sm: 0 6px 18px rgba(42, 36, 32, 0.08);
  --radius: 22px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16120F; --bg-soft: #1E1915; --card: #221C18; --line: #332B25; --ink: #F6EFE6; --ink2: #BFB3A6; --ink3: #8D8277;
    --shu: #F0634E; --shu-soft: #3A1E17; --focus: #8AA4EC;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45); --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  }
}
/* Sumo Kanji: indigo ink and the red of a teacher's pen */
.app-kanji { --brand: #2B4C9B; --brand-ink: #24407F; --brand-soft: #E8EDF8; --brand-glow: #DCE4F7; --hand: #2A2420; }
/* Sumo Words & Verbs: its green, and wisteria for the verbs */
.app-words { --brand: #18805F; --brand-ink: #126B4F; --brand-soft: #E3F2EB; --brand-glow: #D6EDE2; --verb: #7C5CC9; --verb-soft: #EFE9FA; --hand: #2A2420; }
/* Sumo Grammar: the purple of the old court's books (紫), with the app's own marks: jade ○, crimson ×, the indigo of its speakers */
.app-grammar { --brand: #884898; --brand-ink: #6E3480; --brand-soft: #F4EAF6; --brand-glow: #EEDFF3; --hand: #2A2420; --line-strong: #DDD1C0; --ribbon: #E8573F;
  --ok: #1E9E78; --ok-ink: #137A5C; --ok-soft: #E1F5EE; --no: #D93A5B; --no-ink: #B0243F; --no-soft: #FCE6EB; --ai: #2B4C9B; --ai-soft: #E6ECF8; --wood: #C9B79F; }
@media (prefers-color-scheme: dark) {
  .app-kanji { --brand: #7E9BE6; --brand-ink: #A9BDF2; --brand-soft: #1C2440; --brand-glow: #1F2A4D; --hand: #F6EFE6; }
  .app-words { --brand: #4CC39A; --brand-ink: #8BDDBF; --brand-soft: #14302A; --brand-glow: #173A31; --verb: #B39CF0; --verb-soft: #2A2240; --hand: #F6EFE6; }
  .app-grammar { --brand: #BE8AD0; --brand-ink: #DDB8EA; --brand-soft: #2C1C33; --brand-glow: #33203D; --hand: #F6EFE6; --line-strong: #3D352E; --ribbon: #F06A52;
    --ok: #22A57E; --ok-ink: #34B88F; --ok-soft: #11291F; --no: #EE5C79; --no-ink: #F28AA0; --no-soft: #3A1820; --ai: #8AA4EC; --ai-soft: #1B2440; --wood: #4A3F35; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
  font: 400 1.0625rem/1.65 'Sumo Rounded', ui-rounded, system-ui, -apple-system, 'Hiragino Maru Gothic ProN', 'Segoe UI', Roboto, sans-serif; }
[lang='ja'] { font-feature-settings: 'palt' 0; }
img, svg { max-width: 100%; }
a { color: var(--brand-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 14px; border-radius: 10px; z-index: 40; }
.skip:focus { left: 12px; }
.wrap-wide { max-width: 72rem; margin: 0 auto; padding: 0 20px; }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
h1, h2, h3 { font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); line-height: 1.08; letter-spacing: -0.015em; margin: 0 0 0.8rem; }
h2 em, h3 em { font-style: normal; color: var(--brand); }
h3 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 0.35rem; }
.lead { color: var(--ink2); font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem); max-width: 40rem; margin: 0 0 1rem; }
.eyebrow { margin: 0 0 0.5rem; color: var(--brand); font-weight: 800; font-size: 0.92rem; letter-spacing: 0.08em; text-transform: uppercase; }
.mini { margin: 0 0 0.35rem; color: var(--ink3); font-weight: 800; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
ruby rt { font-size: 0.5em; font-weight: 700; color: var(--ink2); }
mark { background: none; color: var(--brand); }
.app-words mark { color: var(--verb); }

/* ------------------------------------------------------------------------------------ buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0.7rem 1.4rem; border: 0; border-radius: 999px;
  background: var(--brand); color: #FFFFFF; font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease; }
.button:hover { background: var(--brand-ink); color: #FFFFFF; text-decoration: none; }
@media (prefers-color-scheme: dark) { .button { color: #10141F; } .button:hover { color: #10141F; } }
.button:active { transform: scale(0.97); }
.button.ghost { background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.button.ghost:hover { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--brand); }
.button.small { min-height: 42px; padding: 0.45rem 1.05rem; font-size: 0.98rem; }
.pill.soon { display: inline-flex; align-items: center; min-height: 48px; padding: 0.7rem 1.3rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 1.3rem; }

/* ------------------------------------------------------------------------------------ header and footer */
/* the header's see-through backdrop is a layer of its own (::before): a backdrop-filter on the header itself would hold the menu's
   page-wide tap area (a fixed box, below) inside the header */
.top { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: border-color 0.3s ease; }
.top::before { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); transition: background 0.3s ease; }
.top.is-solid { border-bottom-color: var(--line); }
.top.is-solid::before { background: color-mix(in srgb, var(--bg) 92%, transparent); }
/* one row: the brand, the page's links and, past a hairline, the family's other two apps (page.mjs, siteNav); up to 64em (1024 px,
   and more with a bigger text size) a menu button instead, whose panel lists both */
.top .wrap-wide, .top .wrap { display: flex; align-items: center; gap: 0 18px; min-height: 62px; }
/* the legal pages' header as wide as the app's page's (four of the family in it): the same place on every page of an app */
.top .wrap { max-width: 72rem; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.1rem; margin-right: auto; white-space: nowrap; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top .links { display: flex; gap: 18px; white-space: nowrap; }
.top .links a, .foot nav a { color: var(--ink2); text-decoration: none; font-weight: 700; font-size: 0.95rem; }
.top .links a:hover, .foot nav a:hover { color: var(--ink); text-decoration: underline; }
/* the other apps: the icon and the short name; hovered, a soft tile with the same space on every side of the icon, its corners the
   icon's own plus that space (as sumojapanese.app's header) */
.top .apps { display: flex; gap: 2px; align-items: center; padding-left: 12px; border-left: 1px solid var(--line); }
.top .apps a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 11px; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 0.95rem; white-space: nowrap; transition: background-color 0.15s ease; }
.top .apps a:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.top .apps a:focus-visible { border-radius: 11px; }
.top .apps img { width: 24px; height: 24px; border-radius: 6px; flex: none; }
.menu { display: none; }
@media (max-width: 64em) {
  .top .links, .top .apps { display: none; }
  .menu { display: block; }
}
.menu > summary { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; border-radius: 14px; list-style: none; cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent; transition: background-color 0.15s ease; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.menu > summary:focus-visible { border-radius: 14px; }
/* while open, the button reaches over the whole page (invisibly), so a tap anywhere outside the panel closes it, script or not */
.menu[open] > summary::before { content: ''; position: fixed; inset: 0; z-index: 25; cursor: default; }
/* three bars that turn into a cross while the menu is open */
.menu-bars, .menu-bars::before, .menu-bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.2s ease, background-color 0.2s ease; }
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ''; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu[open] .menu-bars { background-color: transparent; }
.menu[open] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu[open] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }
/* the panel: a card under the header, the page's links and then the other apps, rows big enough for a thumb */
.menu-panel { position: absolute; z-index: 30; top: calc(100% + 8px); left: 12px; right: 12px; max-width: 420px; margin-left: auto; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.menu[open] .menu-panel { animation: menu-in 0.18s ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
.menu-panel nav { display: grid; gap: 2px; }
.menu-panel a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 14px; border-radius: 14px; color: var(--ink); text-decoration: none;
  font-weight: 700; font-size: 1.05rem; }
.menu-panel a:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.menu-panel a:focus-visible { border-radius: 14px; outline-offset: -3px; }
.menu-label { margin: 6px 14px 4px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink2); font-size: 0.8rem; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; }
.menu-apps a { padding-left: 6px; }
.menu-apps img { width: 32px; height: 32px; border-radius: 8px; flex: none; }
@media (prefers-reduced-motion: reduce) {
  .menu[open] .menu-panel { animation: none; }
  .menu-bars, .menu-bars::before, .menu-bars::after { transition: none; }
}
.foot { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--ink2); font-size: 0.92rem; }
.foot p { margin: 0.3rem 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0.4rem 0; }
.foot .credits { color: var(--ink3); font-size: 0.82rem; max-width: 52rem; }
.foot .credits a { color: inherit; }

/* ------------------------------------------------------------------------------------ sections */
.band { padding: clamp(64px, 9vw, 120px) 0; }
.band.soft { background: var(--bg-soft); }

/* ------------------------------------------------------------------------------------ hero */
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: -63px; padding: calc(63px + clamp(28px, 6vh, 72px)) 0 clamp(48px, 8vh, 96px); }
.hero-sky { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 80% at 85% 10%, var(--brand-glow) 0%, transparent 55%), linear-gradient(to bottom, var(--bg) 0%, var(--bg-soft) 100%); }
.hero-sun { position: absolute; right: max(4vw, calc(50vw - 34rem)); top: 70px; width: clamp(220px, 30vw, 420px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--shu) 32%, var(--bg)) 0%, color-mix(in srgb, var(--shu) 16%, var(--bg)) 60%, transparent 72%); opacity: 0.7; }
.app-words .hero-sun { background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--brand) 30%, var(--bg)) 0%, color-mix(in srgb, var(--brand) 14%, var(--bg)) 60%, transparent 72%); }
.float { position: absolute; font-family: 'Sumo Hand', serif; font-weight: 600; color: var(--brand); opacity: 0.1; font-size: clamp(2.4rem, 4vw, 4.4rem); animation: drift 16s ease-in-out infinite; }
.float.f1 { left: 6%; top: 18%; } .float.f2 { left: 44%; top: 8%; animation-delay: -4s; } .float.f3 { left: 3%; top: 72%; animation-delay: -8s; }
.float.f4 { left: 52%; top: 84%; animation-delay: -2s; } .float.f5 { right: 3%; top: 58%; animation-delay: -11s; }
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-4deg); } 50% { transform: translate3d(10px, -16px, 0) rotate(5deg); } }
.hero-grid { display: grid; gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (min-width: 940px) { .hero-grid { grid-template-columns: 1fr 1.05fr; } }
.hero h1 { font-size: clamp(2.2rem, 1.25rem + 3vw, 3.6rem); line-height: 1.05; letter-spacing: -0.025em; margin: 0 0 1rem; max-width: 18ch; }
.hero .lead { color: var(--ink); opacity: 0.86; }
.hero-note { margin: 1rem 0 0; color: var(--ink2); font-size: 0.95rem; font-weight: 700; }
.hero-art { position: relative; }

/* the notebook (Sumo Kanji's hero) */
.nb { display: block; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(42, 36, 32, 0.16)); }
.nb-shadow { fill: rgba(42, 36, 32, 0.12); }
.nb-cover { fill: var(--brand); }
.nb-page { fill: var(--card); }
.nb-gutter { fill: color-mix(in srgb, var(--ink) 8%, var(--card)); }
.nb-head { fill: var(--brand-soft); }
.nb-title, .nb-name, .nb-mark { font-family: 'Sumo Hand', serif; font-weight: 600; fill: var(--brand-ink); font-size: 19px; }
.nb-name { font-size: 14px; fill: var(--ink3); }
.nb-name-line { stroke: var(--ink3); stroke-width: 1.2; }
.nb-mark { fill: var(--shu); font-size: 20px; opacity: 0; }
.sq { fill: color-mix(in srgb, var(--shu) 4%, var(--card)); stroke: color-mix(in srgb, var(--shu) 40%, var(--card)); stroke-width: 1.6; }
.sq-guide { fill: none; stroke: color-mix(in srgb, var(--shu) 28%, var(--card)); stroke-width: 1.2; stroke-dasharray: 4 4; }
.nb .model { fill: none; stroke: var(--hand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.nb .model.faint { stroke: color-mix(in srgb, var(--ink) 16%, var(--card)); }
.hk-s { fill: none; stroke: var(--hand); stroke-width: 6.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.hanamaru { fill: none; stroke: var(--shu); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pencil-body { fill: #F2B233; } .pencil-shine { fill: #F8CC63; } .pencil-wood { fill: #F3D9B1; } .pencil-lead { fill: #3A332E; } .pencil-band { fill: #B9B3AC; } .pencil-eraser { fill: #F08BA0; }
/* the writing, again and again (the script restarts it); still under reduced motion */
/* a stroke, then a moment for the pencil to go to the next one (kanji.js reads these times to move it) */
.is-writing .hk-s { stroke-dashoffset: 1; opacity: 0; animation: write 0.52s cubic-bezier(0.4, 0.1, 0.45, 1) forwards; }
.is-writing .hk-s.d1 { animation-delay: 0.7s; } .is-writing .hk-s.d2 { animation-delay: 1.42s; } .is-writing .hk-s.d3 { animation-delay: 2.14s; }
.is-writing .hk-s.d4 { animation-delay: 2.86s; } .is-writing .hk-s.d5 { animation-delay: 3.58s; } .is-writing .hk-s.d6 { animation-delay: 4.3s; }
.is-writing .hanamaru { stroke-dashoffset: 1; opacity: 0; animation: write 1.1s ease-in-out 5.25s forwards; }
.is-writing .nb-mark { animation: appear 0.5s ease 6.1s forwards; }
.nb-mark { opacity: 1; }
.is-writing .nb-mark { opacity: 0; }
@keyframes write { from { stroke-dashoffset: 1; opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes appear { to { opacity: 1; } }

/* the deck (Sumo Words & Verbs' hero) */
.deck { position: relative; width: min(100%, 520px); aspect-ratio: 1.05; margin: 0 auto; perspective: 1400px; }
.card { position: absolute; left: 50%; top: 50%; width: min(64%, 300px); aspect-ratio: 0.72; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(.2, .8, .2, 1), opacity 0.6s ease; }
.card-face { position: absolute; inset: 0; display: grid; justify-items: center; align-content: center; gap: 10px; padding: 18px; border-radius: 26px; background: var(--card);
  box-shadow: var(--shadow); border: 1px solid var(--line); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-back { transform: rotateY(180deg); }
.card-tag { position: absolute; left: 18px; top: 16px; color: var(--brand); font-weight: 800; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
.card-front img { width: 78%; height: auto; border-radius: 18px; }
.card-word { font-family: 'Sumo Hand', serif; font-weight: 600; font-size: clamp(2rem, 4vw, 2.7rem); line-height: 1.1; }
.card-reading { color: var(--ink2); font-weight: 700; font-size: 1.1rem; }
.card-meaning { color: var(--brand-ink); font-weight: 800; font-size: 1.2rem; }
.card-0 { z-index: 5; transform: translate(-50%, -50%) rotate(-2deg); }
.card-1 { z-index: 4; transform: translate(-30%, -46%) rotate(7deg) scale(0.94); }
.card-2 { z-index: 3; transform: translate(-70%, -47%) rotate(-10deg) scale(0.92); }
.card-3 { z-index: 2; transform: translate(-18%, -52%) rotate(13deg) scale(0.88); opacity: 0.9; }
.card-4 { z-index: 1; transform: translate(-82%, -52%) rotate(-16deg) scale(0.86); opacity: 0.8; }
.card.is-flipped { transform: translate(-50%, -50%) rotate(-2deg) rotateY(180deg); }

/* ------------------------------------------------------------------------------------ chips */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 0.4rem 0 1.2rem; }
.chip { display: inline-grid; justify-items: center; gap: 2px; min-width: 64px; min-height: 48px; padding: 8px 14px; border-radius: 16px; border: 2px solid var(--line);
  background: var(--card); color: var(--ink); font: inherit; cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease; }
.chip:hover { border-color: var(--brand); }
.chip:active { transform: scale(0.96); }
.chip.is-on { border-color: var(--brand); background: var(--brand-soft); }
.chip-ja { font-family: 'Sumo Hand', serif; font-weight: 600; font-size: 1.6rem; line-height: 1.15; }
.chip-en { color: var(--ink2); font-size: 0.78rem; font-weight: 700; line-height: 1.1; }
.form-chip { min-width: 0; min-height: 40px; padding: 6px 12px; font-size: 0.92rem; font-weight: 700; border-radius: 999px; }
.app-words .chips.forms .chip.is-on { border-color: var(--verb); background: var(--verb-soft); }

/* ------------------------------------------------------------------------------------ the kanji demo */
.try-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 980px) { .try-grid { grid-template-columns: 0.9fr 1.1fr; } }
.try-card { display: grid; gap: 22px; padding: clamp(18px, 2.6vw, 28px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 640px) { .try-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.try-pad { display: grid; gap: 12px; align-content: start; }
.try-square { display: block; width: 100%; aspect-ratio: 1; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default; }
.try-square.is-tracing { cursor: crosshair; }
.try-square .sq { stroke-width: 0.8; }
.try-square .sq-guide { stroke-width: 0.6; stroke-dasharray: 2 2; }
.art-line { fill: none; stroke: var(--brand); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.art-fill { fill: var(--brand-soft); stroke: none; }
.try-art { transition: opacity 0.8s ease; }
.try-art.is-faded { opacity: 0.16; }
.ink { fill: none; stroke: var(--hand); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.ghost-stroke { fill: none; stroke: color-mix(in srgb, var(--ink) 12%, var(--card)); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.next-stroke { fill: none; stroke: color-mix(in srgb, var(--brand) 45%, var(--card)); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }
.start-dot { fill: var(--brand); }
.num { font-family: 'Sumo Rounded', sans-serif; font-weight: 800; font-size: 7px; fill: var(--brand); }
.pen { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
.try-square .hanamaru { stroke-width: 2.2; }
.try-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.try-hint { margin: 0; min-height: 2.9em; color: var(--ink2); font-size: 0.95rem; }
.try-hint.is-good { color: var(--shu); font-weight: 800; }
.try-info { display: grid; align-content: start; gap: 10px; }
.try-char { margin: 0; font-family: 'Sumo Hand', serif; font-weight: 600; font-size: clamp(4.2rem, 8vw, 5.6rem); line-height: 1; }
.try-meaning { margin: 0; font-weight: 800; font-size: 1.5rem; line-height: 1.2; }
.try-readings p { display: flex; align-items: center; gap: 10px; margin: 0.25rem 0; flex-wrap: wrap; }
.tag { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 800; font-size: 0.95rem; }
.tag.kun { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.reading { font-weight: 800; font-size: 1.15rem; margin-right: 8px; }
button.reading { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; margin: 0; padding: 4px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 1.12rem; cursor: pointer; }
button.reading::after { content: '♪'; color: var(--brand); font-size: 0.8em; }
button.reading:hover { border-color: var(--brand); }
button.reading:disabled { cursor: default; }
button.reading:disabled::after { content: none; }
.is-saying { box-shadow: 0 0 0 3px var(--brand); }
.say { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink);
  font: inherit; font-weight: 800; cursor: pointer; }
.say:hover { background: var(--brand-glow); }
.say[hidden] { display: none; }
.try-say { margin: 0; }
.try-story { padding: 12px 14px; border-radius: 16px; background: var(--bg-soft); }
.try-story p { margin: 0; }
.try-story p + p { margin-top: 4px; }
.try-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.try-words li { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.w-ja { font-weight: 800; font-size: 1.25rem; }
.w-en { color: var(--ink2); }
.try-words button { all: unset; cursor: pointer; display: inline-flex; gap: 12px; align-items: baseline; border-radius: 8px; }
.try-words button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

/* ------------------------------------------------------------------------------------ the verb demo */
.try-head { max-width: 46rem; }
.verb-demo { display: grid; gap: clamp(20px, 3vw, 40px); padding: clamp(18px, 2.6vw, 32px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
@media (min-width: 900px) { .verb-demo { grid-template-columns: 1.05fr 0.95fr; align-items: center; } }
.verb-out { display: grid; gap: 6px; justify-items: start; padding: clamp(16px, 2.5vw, 28px); border-radius: 22px; background: var(--verb-soft); }
.verb-from { margin: 0; color: var(--ink2); font-weight: 700; font-size: 1.05rem; }
.verb-from .arrow { color: var(--verb); }
.verb-form-name { color: var(--verb); font-weight: 800; }
.verb-big { margin: 0.2rem 0 0; font-weight: 800; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1.15; letter-spacing: 0.02em; }
.verb-big rt { font-size: 0.38em; }
.verb-romaji { margin: 0; color: var(--ink2); font-weight: 700; font-size: 1.1rem; }
.verb-en { margin: 0; font-weight: 800; font-size: 1.35rem; }
.verb-rule { margin-top: 8px; padding: 12px 14px; border-radius: 16px; background: var(--card); width: 100%; }
.verb-rule p { margin: 0; }
.verb-rule[hidden] { display: none; }
.verb-say { display: flex; align-items: center; gap: 12px; margin: 8px 0 0; flex-wrap: wrap; }
.verb-free { color: var(--ink2); font-size: 0.9rem; font-weight: 700; }
.verb-big.is-new { animation: pop 0.45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes pop { 0% { transform: translateY(6px) scale(0.96); opacity: 0.2; } 100% { transform: none; opacity: 1; } }

/* ------------------------------------------------------------------------------------ the picture wall and the topics */
.wall { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wall-card { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 12px 10px 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.wall-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.wall-card img { width: 100%; height: auto; border-radius: 16px; }
.wall-ja { font-weight: 800; font-size: 1.3rem; line-height: 1.5; }
.wall-ja rt { font-size: 0.45em; }
.wall-en { color: var(--ink2); font-size: 0.9rem; font-weight: 700; }
.wall-card.is-saying { box-shadow: 0 0 0 3px var(--brand), var(--shadow); }
.topics { list-style: none; margin: 1.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topics li { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.topic-ja { display: inline-grid; place-items: center; min-width: 46px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 0.85rem; }
.topic-name { font-weight: 800; }
.topic-count { color: var(--ink3); font-size: 0.85rem; font-weight: 700; }

/* ------------------------------------------------------------------------------------ the notebooks */
.shelf { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
.cover { position: relative; display: grid; align-content: start; gap: 4px; min-height: 172px; padding: 14px 14px 12px; border-radius: 10px 18px 18px 10px;
  background: var(--cover, var(--brand)); color: #FFFFFF; box-shadow: var(--shadow-sm), inset 7px 0 0 rgba(0, 0, 0, 0.12); overflow: hidden; }
.cover::after { content: ''; position: absolute; right: -30px; bottom: -40px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); }
.cover-label { justify-self: start; max-width: 100%; padding: 6px 10px; border-radius: 10px; background: #FFFFFF; color: var(--cover, var(--brand)); font-family: 'Sumo Hand', serif; font-weight: 600; font-size: 1.35rem; line-height: 1.1; white-space: nowrap; }
.cover-label.is-long { font-size: 1.05rem; padding: 7px 8px; }
.cover-title { margin-top: 8px; font-weight: 800; font-size: 1.05rem; }
.cover-count { font-weight: 700; font-size: 0.88rem; opacity: 0.92; }
.cover-free { position: absolute; left: 14px; bottom: 12px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #2A2420; font-weight: 800; font-size: 0.74rem; }

/* ------------------------------------------------------------------------------------ Sumo Grammar (body.app-grammar, grammar.mjs) */
.app-grammar ruby { ruby-align: center; }
.app-grammar [hidden] { display: none !important; }
.app-grammar [lang='ja'] ruby rt, .app-grammar ruby rt { font-weight: 500; letter-spacing: 0; }
.gr-link { padding: 0; border: 0; background: none; color: var(--brand-ink); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }

/* the hero: the purple sun, the app's icon over the title, and a page of Book 1 on its book */
.app-grammar .hero-sun { background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--brand) 28%, var(--bg)) 0%, color-mix(in srgb, var(--brand) 13%, var(--bg)) 60%, transparent 72%); }
.gr-hero-brand { display: flex; align-items: center; gap: 14px; margin: 0 0 1.1rem; }
.gr-hero-brand img { width: 64px; height: 64px; border-radius: 15px; box-shadow: var(--shadow-sm); }
.gr-hero-brand .eyebrow { margin: 0; }
.gr-hero-book { position: relative; width: min(100%, 580px); margin: 0 auto; padding: 0 16px 18px 0; }
/* the book under the page: its purple cover, a few leaves of paper between */
.gr-hero-cover { position: absolute; left: 14px; right: 0; top: 18px; bottom: 0; border-radius: 22px; background: var(--brand);
  box-shadow: var(--shadow), inset -6px 0 0 color-mix(in srgb, #000000 12%, var(--brand)); }
.gr-hero-page { position: relative; container-type: inline-size; padding: clamp(18px, 3vw, 30px) clamp(16px, 3vw, 30px) clamp(18px, 2.6vw, 26px); border-radius: 18px; background: var(--bg); border: 1px solid var(--line);
  box-shadow: 3px 4px 0 -1px var(--card), 3px 4px 0 0 var(--line), 6px 8px 0 -1px var(--card), 6px 8px 0 0 var(--line), var(--shadow-sm); }
.gr-ribbon { position: absolute; top: -10px; right: 70px; width: 24px; height: 104px; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.15)); }
.gr-page-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.4rem; }
.gr-page-meta span { padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-weight: 800; font-size: 0.78rem; }
.gr-page-title { margin: 0; font-family: 'Sumo Hand', serif; font-weight: 600; font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.5rem); line-height: 1.85; }
.gr-page-en { margin: 0 0 0.6rem; color: var(--ink2); font-weight: 700; font-size: 0.95rem; }
/* the sentence taken apart (the app's `parts` block): each phrase in a box, its job under it, arrows over the boxes to the phrase it goes with */
.gr-diagram { position: relative; padding: 46px 0 0; }
.gr-arcs { position: absolute; left: 0; top: 0; width: 100%; overflow: visible; pointer-events: none; }
.gr-arcs path { fill: none; stroke: var(--brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gr-arcs .gr-arc { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 0.7s ease; }
.gr-arcs .gr-head { transition: opacity 0.25s ease 0.55s; }
.gr-phrases { display: flex; flex-wrap: wrap; align-items: flex-start; row-gap: 12px; margin: 0; font-size: clamp(1.05rem, 5.6cqw, 1.75rem); }
.gr-phrase { position: relative; display: inline-grid; justify-items: center; gap: 4px; margin-right: 0.42em; transition: margin 0.45s cubic-bezier(.2, .8, .2, 1); }
.gr-phrase:last-child { margin-right: 0; }
.gr-box { padding: 0 0.32em; border: 1.5px solid var(--line-strong); border-radius: 10px; line-height: 1.95; white-space: nowrap; transition: border-color 0.4s ease, background-color 0.4s ease; }
.gr-box.is-labelled { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, transparent); }
.gr-job { color: var(--brand); font-weight: 800; font-size: max(0.5em, 10.5px); line-height: 1.7; transition: opacity 0.4s ease, transform 0.4s ease; }
.gr-job rt { color: var(--brand); }
.gr-ne { position: absolute; top: 0.1em; right: -0.55em; z-index: 1; padding: 0 0.3em; border-radius: 999px; background: var(--brand); color: #FFFFFF; font-size: 0.55em; font-weight: 800; line-height: 1.5;
  opacity: 0; pointer-events: none; }
@media (prefers-color-scheme: dark) { .gr-ne { color: #10141F; } }
.gr-diagram-en { margin: 0.7rem 0 0; color: var(--ink2); }
/* the steps the script plays (without it, or with less motion, the page shows the sentence taken apart) */
.gr-phrase.is-tight { margin-right: 0; }
.gr-diagram.no-boxes .gr-box { border-color: transparent; background-color: transparent; }
.gr-diagram.no-jobs .gr-job { opacity: 0; transform: translateY(-5px); }
.gr-diagram.no-arcs .gr-arc { stroke-dashoffset: 1; transition: none; }
.gr-diagram.no-arcs .gr-head { opacity: 0; transition: none; }
.gr-arcs.is-off { display: none; }
.gr-phrase.is-ne .gr-ne { animation: ne-pop 1.3s ease forwards; }
@keyframes ne-pop { 0% { opacity: 0; transform: translateY(6px) scale(0.6); } 18% { opacity: 1; transform: translateY(-4px) scale(1.08); } 30% { transform: translateY(-3px) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }

/* read a page: the lesson on its paper, white cards for the examples, as the app has them */
.gr-try { background: var(--bg-soft); }
.gr-try-grid { display: grid; gap: clamp(18px, 3vw, 32px); margin-top: 1.6rem; align-items: start; }
@media (min-width: 980px) { .gr-try-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); } }
.gr-lesson, .gr-practice-card { position: relative; min-width: 0; padding: clamp(18px, 2.6vw, 30px); border-radius: 28px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gr-lesson-meta { margin: 0 0 0.2rem; color: var(--brand); font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; }
.gr-lesson-title { display: grid; gap: 0; margin: 0 0 1rem; font-size: 1rem; }
.gr-lesson-title [lang='ja'] { font-family: 'Sumo Hand', serif; font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); line-height: 1.75; }
.gr-lesson-en { color: var(--ink2); font-size: 1.05rem; font-weight: 800; }
.gr-point { padding: 12px 16px; border-radius: 16px; background: var(--brand-soft); }
.gr-point .mini { color: var(--brand-ink); margin: 0; }
.gr-point p { margin: 0; line-height: 1.9; }
.gr-examples { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.gr-ex { display: flex; align-items: flex-start; gap: 10px; padding: 10px 16px 12px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.gr-ex-text { min-width: 0; }
.gr-ja { margin: 0; font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.5rem); line-height: 2.05; }
.gr-ex-en { margin: -0.25rem 0 0; color: var(--ink2); }
/* the speaker: an indigo round button, as the app's */
.gr-say { flex: none; display: grid; place-items: center; width: 40px; height: 40px; margin-top: 0.55em; padding: 0; border: 0; border-radius: 50%; background: var(--ai-soft); color: var(--ai); cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease; }
.gr-say:hover { background: color-mix(in srgb, var(--ai) 18%, var(--ai-soft)); }
.gr-say:active { transform: scale(0.94); }
.gr-say:disabled { opacity: 0.4; cursor: default; }
.gr-say svg { width: 22px; height: 22px; }
.gr-say svg path { fill: currentColor; }
.gr-say svg .gr-wave { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.gr-say.is-saying { box-shadow: 0 0 0 3px var(--ai); }
.gr-say.is-saying .gr-wave { animation: wave 0.9s ease-in-out infinite; }
.gr-say.is-saying .gr-wave2 { animation-delay: 0.15s; }
@keyframes wave { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
/* a word to tap: dotted under, as in the app */
.gr-w { padding: 0 1px; margin: 0; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; line-height: inherit; cursor: pointer;
  text-decoration: underline dotted color-mix(in srgb, var(--brand) 70%, transparent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: background-color 0.15s ease; }
.gr-w:hover, .gr-w.is-open { background: var(--brand-soft); }
.gr-w.is-open { text-decoration-color: var(--brand); }
.gr-w.is-saying { box-shadow: none; color: var(--brand-ink); }
.gr-tip { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; color: var(--ink3); font-size: 0.88rem; font-weight: 700; }
.gr-tip-dot { width: 22px; height: 0; border-bottom: 2px dotted var(--brand); flex: none; }
/* the bubble a tap opens: the word with its reading, what it means, its kind, its dictionary form */
.gr-bubble { position: absolute; z-index: 6; left: 0; top: 0; width: max-content; min-width: 120px; max-width: min(320px, calc(100% - 20px)); padding: 10px 14px 12px; border-radius: 18px;
  background: var(--card); border: 1px solid var(--line-strong); box-shadow: var(--shadow); --arrow: 50%; animation: bubble-in 0.15s ease-out; }
.gr-bubble[hidden] { display: none; }
.gr-bubble::after { content: ''; position: absolute; left: calc(var(--arrow) - 6px); bottom: -7px; width: 12px; height: 12px; border-radius: 2px; background: var(--card);
  border: 1px solid var(--line-strong); border-top: 0; border-left: 0; transform: rotate(45deg); }
.gr-bubble.is-below::after { top: -7px; bottom: auto; border: 1px solid var(--line-strong); border-right: 0; border-bottom: 0; }
@keyframes bubble-in { from { opacity: 0; transform: scale(0.94); } }
.gr-bubble p { margin: 0; }
.gr-bubble-w { font-size: 1.55rem; font-weight: 700; line-height: 1.9; }
.gr-bubble-g { line-height: 1.5; }
.gr-bubble-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px !important; }
.gr-bubble-chips span { padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); color: var(--ink2); font-size: 0.8rem; font-weight: 700; }
.gr-bubble-chips span.is-kind { background: var(--ai-soft); color: var(--ai); }
.gr-bubble-base { display: flex; align-items: baseline; gap: 8px; margin-top: 4px !important; color: var(--ink3); font-size: 0.82rem; font-weight: 700; }
.gr-bubble-base [lang='ja'] { color: var(--ink); font-size: 1.15rem; line-height: 1.9; }

/* the practice of a page (練習問題): one task a card, its number in a round badge (the accent, then ○ jade or × crimson) */
.gr-practice-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 0.8rem; font-weight: 800; color: var(--ink2); }
.gr-practice-head [lang='ja'] { font-family: 'Sumo Hand', serif; font-weight: 600; color: var(--brand); font-size: 1.35rem; line-height: 1.8; }
.gr-prompt { display: flex; align-items: flex-start; gap: 12px; }
.gr-prompt p { margin: 0; font-weight: 800; font-size: 1.07rem; line-height: 1.85; }
.gr-badge { flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin-top: 0.42rem; border-radius: 50%; background: var(--brand); color: #FFFFFF; font-weight: 800; font-size: 0.88rem;
  transition: background-color 0.2s ease; }
@media (prefers-color-scheme: dark) { .gr-badge { color: #10141F; } }
.gr-badge.is-right { background: var(--ok); }
.gr-badge.is-wrong { background: var(--no); }
.gr-how { margin: 0.4rem 0 0; color: var(--ink2); font-size: 0.95rem; line-height: 1.85; }
.gr-en { margin: 0.2rem 0 0.6rem; color: var(--ink2); }
.gr-en-strong { color: var(--ink); font-weight: 800; }
.gr-q-ja { margin-top: 0.6rem; }
.gr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 0.4rem; }
.gr-actions [hidden] { display: none; }
.gr-from { margin: 0.9rem 0 0; color: var(--ink3); font-size: 0.85rem; font-weight: 700; }
.gr-next { margin: 0.9rem 0 0; }
.gr-cut-slide[hidden] { display: none; }
/* a sentence to cut: its units, a gap between each two that cuts on a tap (with the ね that tests it) */
.gr-cut-row { display: flex; flex-wrap: wrap; align-items: flex-end; row-gap: 6px; margin: 0.6rem 0 0.2rem; padding-top: 14px; font-size: clamp(1.3rem, 1.15rem + 0.5vw, 1.5rem); }
.gr-unit { padding-bottom: 4px; line-height: 2.05; }
.gr-gap { position: relative; display: grid; place-items: end center; width: 24px; height: 3.1rem; margin: 0; padding: 0 0 0.35rem; border: 0; border-radius: 8px; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; }
.gr-gap:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.gr-gap:disabled { cursor: default; background: none; }
.gr-gap i { display: block; width: 1.5px; height: 1.3rem; border-radius: 2px; background: color-mix(in srgb, var(--ink3) 55%, transparent); transition: height 0.15s ease, width 0.15s ease, background-color 0.15s ease; }
.gr-gap[aria-pressed='true'] i { width: 3px; height: 2.1rem; background: var(--brand); }
.gr-gap b { position: absolute; top: -0.65rem; left: 50%; padding: 0 0.32em; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 0.85rem; font-weight: 800; line-height: 1.55;
  opacity: 0; transform: translate(-50%, 5px) scale(0.7); transition: opacity 0.18s ease, transform 0.18s ease; pointer-events: none; }
.gr-gap[aria-pressed='true'] b { opacity: 1; transform: translate(-50%, 0) scale(1); }
.gr-gap.is-ok i { width: 3px; height: 2.1rem; background: var(--ok); }
.gr-gap.is-missed i { width: 3px; height: 2.1rem; background: var(--no); }
.gr-gap.is-extra i { background: var(--no); }
.gr-gap.is-ok b { background: var(--ok-soft); color: var(--ok-ink); }
.gr-gap.is-missed b { background: var(--no-soft); color: var(--no-ink); }
/* the result under an answered task: ○ or ×, the right answer when it was missed, and why */
.gr-result { margin-top: 0.9rem; padding: 14px 16px; border-radius: 16px; background: var(--ok-soft); }
.gr-result[hidden] { display: none; }
.gr-result.is-wrong { background: var(--no-soft); }
.gr-result p { margin: 0; }
.gr-result-head { display: flex; align-items: center; gap: 8px; color: var(--ok-ink); font-weight: 800; }
.gr-result.is-wrong .gr-result-head { color: var(--no-ink); }
.gr-result-label { margin-top: 0.5rem !important; color: var(--ink2); font-size: 0.85rem; font-weight: 700; }
.gr-result-answer { font-size: 1.25rem; line-height: 1.95; }
.gr-why { margin-top: 0.5rem !important; line-height: 1.85; }
.gr-said { display: flex; align-items: flex-start; gap: 10px; margin-top: 0.6rem !important; }
.gr-said .gr-say { margin-top: 0.35em; width: 36px; height: 36px; }
.gr-said-ja { display: grid; }
.gr-said-ja small { color: var(--ink2); font-size: 0.8rem; font-weight: 700; }
.gr-said-ja [lang='ja'] { font-size: 1.25rem; line-height: 1.95; }
.gr-again { margin-top: 0.7rem !important; }
/* ○ and ×, drawn */
.gr-maru, .gr-batsu { position: relative; flex: none; display: inline-block; width: 18px; height: 18px; }
.gr-maru { border: 3px solid currentColor; border-radius: 50%; }
.gr-batsu::before, .gr-batsu::after { content: ''; position: absolute; left: 50%; top: -1px; width: 3px; height: 20px; margin-left: -1.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.gr-batsu::after { transform: rotate(-45deg); }
/* options, pieces and phrases to tap */
.gr-opts { display: grid; gap: 8px; margin: 0.7rem 0 0.2rem; }
.gr-opts.is-ja { display: flex; flex-wrap: wrap; }
.gr-opt, .gr-tile { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 16px; border: 1.5px solid var(--line-strong); border-radius: 14px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 800; text-align: left; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.2s ease, transform 0.15s ease; }
.gr-opt:hover:not(:disabled), .gr-tile:hover:not(:disabled) { border-color: var(--brand); }
.gr-opt:active:not(:disabled), .gr-tile:active:not(:disabled) { transform: scale(0.97); }
.gr-opt:disabled, .gr-tile:disabled { cursor: default; }
.gr-opts.is-ja .gr-opt, .gr-tile { padding: 2px 14px; font-size: 1.3rem; font-weight: 500; line-height: 1.95; border-radius: 12px; }
.gr-opt.is-right, .gr-tile.is-right { border: 2px solid var(--ok); background: var(--ok-soft); }
.gr-opt.is-wrong, .gr-tile.is-wrong { border: 2px solid var(--no); background: var(--no-soft); }
.gr-opt.is-dim { opacity: 0.5; }
.gr-opt.is-right::before, .gr-opt.is-wrong::before, .gr-tile.is-right::before, .gr-tile.is-wrong::before { content: ''; flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid var(--ok); }
.gr-opt.is-wrong::before, .gr-tile.is-wrong::before { border: 0; border-radius: 0;
  background: linear-gradient(45deg, transparent 41%, var(--no) 41% 59%, transparent 59%), linear-gradient(-45deg, transparent 41%, var(--no) 41% 59%, transparent 59%); }
.gr-slot { display: inline-block; min-width: 2.6em; height: 1.35em; margin: 0 0.12em; border-bottom: 2.5px solid var(--brand); color: var(--brand); text-align: center; vertical-align: -0.12em; line-height: 1.2; }
.gr-order-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 62px; margin: 0.4rem 0 0.7rem; padding: 6px 0; border-bottom: 2px solid var(--line); }
.gr-order-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0.7rem; }
.gr-tile.is-used { opacity: 0.25; pointer-events: none; }
.gr-judge { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0.7rem 0 0.2rem; }
.gr-judge .gr-opt { justify-content: center; min-height: 56px; }
.gr-judge .gr-yes .gr-maru { color: var(--ok); }
.gr-judge .gr-no .gr-batsu { color: var(--no); }
.gr-judge .gr-opt.is-right::before, .gr-judge .gr-opt.is-wrong::before { content: none; }

/* the eight books, standing on a shelf: a spine each (its number, its title written top to bottom, its level); the picked one's card under them */
.gr-shelf { margin-top: 2.4rem; }
.gr-spines { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: clamp(3px, 0.8vw, 9px); padding: 34px 6px 0; }
.gr-spines::after { content: ''; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; border-radius: 3px 3px 8px 8px; background: linear-gradient(var(--wood), color-mix(in srgb, #000000 18%, var(--wood)));
  box-shadow: 0 10px 18px rgba(42, 36, 32, 0.12); }
.gr-spine { --h: 236px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 0 1 76px; min-width: 0; height: calc(var(--h) * var(--k, 1)); padding: 12px 2px 10px;
  border: 0; border-radius: 7px 7px 3px 3px; color: #FFFFFF; font: inherit; cursor: pointer; transform-origin: bottom center;
  background: linear-gradient(90deg, var(--book-deep) 0, var(--book) 16%, color-mix(in srgb, #FFFFFF 10%, var(--book)) 50%, var(--book) 84%, var(--book-deep) 100%);
  box-shadow: inset 0 -12px 0 -9px rgba(255, 255, 255, 0.35), inset 0 14px 0 -11px rgba(255, 255, 255, 0.35); transition: transform 0.25s cubic-bezier(.2, .8, .2, 1), box-shadow 0.25s ease; }
.gr-spine:hover { transform: translateY(-6px); }
.gr-spine[aria-selected='true'] { transform: translateY(-16px); box-shadow: inset 0 -12px 0 -9px rgba(255, 255, 255, 0.35), inset 0 14px 0 -11px rgba(255, 255, 255, 0.35), 0 16px 24px rgba(42, 36, 32, 0.22); }
.gr-spine:focus-visible { outline-offset: 4px; border-radius: 7px 7px 3px 3px; }
.gr-spine-no { font-weight: 800; font-size: 1.2rem; line-height: 1; }
.gr-spine-title { flex: 1; min-height: 0; overflow: hidden; writing-mode: vertical-rl; font-family: 'Sumo Hand', serif; font-weight: 600; font-size: clamp(0.92rem, 0.72rem + 0.75vw, 1.3rem); letter-spacing: 0.06em; line-height: 1; }
.gr-spine-level { padding: 2px 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.2); font-size: clamp(0.62rem, 0.55rem + 0.3vw, 0.78rem); font-weight: 800; white-space: nowrap; }
.gr-spine-free { position: absolute; left: 50%; top: -30px; padding: 1px 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok-ink); font-size: 0.72rem; font-weight: 800; transform: translateX(-50%); }
.gr-book-card { max-width: 58rem; margin: 40px auto 0; padding: clamp(18px, 2.6vw, 28px); border-radius: 26px; background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--book); box-shadow: var(--shadow-sm); }
.gr-book-top { display: flex; align-items: center; gap: 16px; }
.gr-book-badge { flex: none; display: grid; place-items: center; align-content: center; gap: 4px; width: 58px; height: 74px; border-radius: 8px 12px 12px 8px; background: var(--book); color: #FFFFFF;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.14); }
.gr-book-badge b { font-size: 1.6rem; line-height: 1; }
.gr-book-badge span { font-size: 0.72rem; font-weight: 800; }
.gr-book-meta { margin: 0; color: var(--ink2); font-weight: 700; font-size: 0.9rem; }
.gr-free { color: var(--ok-ink); }
.gr-book-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 0; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem); }
.gr-book-title [lang='ja'] { font-family: 'Sumo Hand', serif; font-weight: 600; line-height: 1.8; }
.gr-book-en { font-size: 0.8em; }
.gr-book-blurb { margin: 0.8rem 0 0; color: var(--ink2); }
.gr-chapters { columns: 2 16rem; column-gap: 32px; margin: 0.9rem 0 0; padding-left: 1.6rem; font-size: 0.95rem; }
.gr-chapters li { break-inside: avoid; margin: 0 0 4px; padding-left: 2px; }
.gr-chapters li::marker { color: var(--ink3); font-weight: 700; font-size: 0.85em; }
@media (max-width: 40em) { .gr-spine { --k: 0.8; } .gr-spines { padding-top: 30px; } }

/* the school way: three steps, each a card (a sentence taken apart, the ten parts of speech, the conjugation table) */
.gr-steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: clamp(18px, 2.6vw, 28px); }
.gr-step { display: grid; gap: clamp(18px, 3vw, 40px); align-items: center; padding: clamp(18px, 3vw, 34px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
@media (min-width: 900px) { .gr-step { grid-template-columns: minmax(250px, 0.78fr) minmax(0, 1.22fr); } .gr-step-table { grid-template-columns: minmax(0, 1fr); } }
.gr-step-copy { min-width: 0; }
.gr-step-copy p { margin: 0.4rem 0 0; color: var(--ink2); line-height: 1.85; }
.gr-step-no { display: inline-grid; place-items: center; width: 34px; height: 34px; margin-bottom: 0.5rem; border-radius: 50%; background: var(--brand); color: #FFFFFF; font-weight: 800; }
@media (prefers-color-scheme: dark) { .gr-step-no { color: #10141F; } }
.gr-step h3 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); margin: 0; }
.gr-step-copy .gr-step-note { margin-top: 0.8rem; padding: 10px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--ink); }
.gr-step-copy .gr-step-from { margin-top: 0.8rem; color: var(--ink3); font-size: 0.82rem; font-weight: 700; }
.gr-ladder { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.gr-rung { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center; padding: 8px 12px 8px 8px; border-radius: 18px; background: var(--bg); }
.gr-rung-name { display: grid; justify-items: center; text-align: center; }
.gr-rung-name [lang='ja'] { font-family: 'Sumo Hand', serif; font-weight: 600; font-size: 1.35rem; line-height: 1.6; color: var(--brand); }
.gr-rung-name [lang='ja'] rt { color: var(--brand); }
.gr-rung-name span:last-child { color: var(--ink3); font-size: 0.78rem; font-weight: 800; }
.gr-rung-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: clamp(1.15rem, 0.95rem + 0.9vw, 1.55rem); line-height: 1.95; }
.gr-row-whole { padding: 0 6px; }
.gr-chunk { padding: 0 0.32em; border: 1.5px solid var(--brand); border-radius: 10px; background: color-mix(in srgb, var(--brand) 6%, var(--card)); white-space: nowrap; }
.gr-word { border-color: var(--line-strong); border-style: dashed; background: var(--card); }
.gr-word-gap { width: 0.6em; }
.gr-word-end { display: inline-flex; align-items: center; white-space: nowrap; }
.gr-punct { margin-left: 2px; }
@media (max-width: 40em) {
  .gr-rung { grid-template-columns: 54px minmax(0, 1fr); gap: 8px; padding: 6px 10px 6px 4px; }
  .gr-rung-name [lang='ja'] { font-size: 1.15rem; }
  .gr-rung-line { gap: 5px; font-size: 1.12rem; }
  .gr-kind { gap: 8px; padding: 6px 10px; font-size: 0.92rem; }
  .gr-kind-icon { width: 26px; height: 26px; }
}
.js .gr-step-cut .gr-rung { opacity: 0; transform: translateX(-10px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .gr-step-cut.is-in .gr-rung { opacity: 1; transform: none; }
.js .gr-step-cut.is-in .gr-rung-1 { transition-delay: 0.35s; }
.js .gr-step-cut.is-in .gr-rung-2 { transition-delay: 0.7s; }
.gr-pos-groups { display: grid; gap: 14px; min-width: 0; }
.gr-pos-group .mini { margin-bottom: 0.4rem; }
.gr-pos-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.gr-pos { position: relative; display: grid; align-content: start; padding: 4px 12px 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.gr-pos-attached .gr-pos { background: var(--brand-soft); border-color: transparent; }
.gr-pos-term { font-weight: 800; font-size: 1.12rem; line-height: 1.85; }
.gr-pos-en { color: var(--ink2); font-size: 0.8rem; font-weight: 800; line-height: 1.3; }
.gr-pos-ex { margin-top: 2px; color: var(--ink3); font-size: 0.88rem; line-height: 1.8; white-space: nowrap; }
.gr-pos.changes::after, .gr-pos-mark { content: ''; position: absolute; top: 12px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.gr-pos-key { position: relative; margin: 0; padding-left: 18px; color: var(--ink2); font-size: 0.88rem; font-weight: 700; }
.gr-pos-key .gr-pos-mark { left: 0; top: 0.55em; right: auto; }
.gr-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--card); overscroll-behavior-x: contain; }
.gr-table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 0.92rem; }
.gr-table th, .gr-table td { padding: 6px 12px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
.gr-table tr > :first-child { border-left: 0; }
.gr-table thead th { border-top: 0; background: var(--bg-soft); font-weight: 800; color: var(--ink2); }
.gr-table [lang='ja'] { font-size: 1.12rem; line-height: 1.95; font-weight: 500; }
.gr-table thead [lang='ja'] { font-size: 1rem; color: var(--ink); font-weight: 800; }
.gr-table tbody th { font-weight: 800; }
.gr-table .gr-t-follows > * { background: color-mix(in srgb, var(--brand-soft) 60%, var(--card)); color: var(--ink2); }
.gr-table .gr-t-follows [lang='ja'] { font-size: 1rem; }

/* a question of each kind: the kinds as tabs, the question in a card */
.gr-quiz { display: grid; gap: 18px; margin-top: 1.6rem; align-items: start; }
@media (min-width: 900px) { .gr-quiz { grid-template-columns: 240px minmax(0, 1fr); } }
.gr-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
@media (min-width: 900px) { .gr-kinds { grid-template-columns: 1fr; } }
.gr-kind { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink);
  font: inherit; font-weight: 800; font-size: 0.98rem; text-align: left; cursor: pointer; transition: border-color 0.15s ease, background-color 0.15s ease; }
.gr-kind:hover { border-color: var(--brand); }
.gr-kind[aria-selected='true'] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.gr-kind-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--bg-soft); color: var(--brand); font-size: 0.8rem; font-weight: 800; }
.gr-kind[aria-selected='true'] .gr-kind-icon { background: var(--card); }
.gr-kind-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gr-quiz-card { min-width: 0; padding: clamp(18px, 2.6vw, 30px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gr-q[hidden] { display: none; }
/* the days a question comes back on */
.gr-days-wrap { display: grid; gap: 18px; margin-top: clamp(28px, 4vw, 48px); padding: clamp(18px, 3vw, 34px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.gr-days-copy h3 { margin: 0; font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); }
.gr-days-copy p { margin: 0.4rem 0 0; color: var(--ink2); max-width: 46rem; }
.gr-days { position: relative; list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.gr-days::before { content: ''; position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 13px; height: 3px; border-radius: 2px; background: var(--line); }
.gr-day { position: relative; display: grid; justify-items: center; gap: 2px; text-align: center; padding: 0 2px; }
.gr-day-dot { position: relative; z-index: 1; width: 29px; height: 29px; margin-bottom: 6px; border-radius: 50%; background: var(--card); border: 3px solid var(--brand); }
.gr-day b { font-size: 1rem; line-height: 1.2; }
.gr-day span:last-child { color: var(--ink3); font-size: 0.78rem; font-weight: 700; line-height: 1.3; }
.gr-day-0 .gr-day-dot { background: var(--brand); }
.js .gr-days-wrap .gr-day-dot { transition: background-color 0.3s ease, transform 0.3s ease; }
.js .gr-days-wrap.is-in .gr-day-dot { animation: day-hop 0.5s ease both; }
.js .gr-days-wrap.is-in .gr-day-1 .gr-day-dot { animation-delay: 0.3s; } .js .gr-days-wrap.is-in .gr-day-2 .gr-day-dot { animation-delay: 0.55s; }
.js .gr-days-wrap.is-in .gr-day-3 .gr-day-dot { animation-delay: 0.8s; } .js .gr-days-wrap.is-in .gr-day-4 .gr-day-dot { animation-delay: 1.05s; }
.js .gr-days-wrap.is-in .gr-day-5 .gr-day-dot { animation-delay: 1.3s; } .js .gr-days-wrap.is-in .gr-day-6 .gr-day-dot { animation-delay: 1.55s; }
@keyframes day-hop { 0% { transform: scale(0.6); } 60% { transform: scale(1.18); background: var(--brand-soft); } 100% { transform: none; } }
.gr-days-missed { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink2); font-weight: 700; }
.gr-days-missed .gr-batsu { color: var(--no); }
@media (max-width: 40em) {
  .gr-days { grid-template-columns: 1fr; gap: 10px; }
  .gr-days::before { left: 13px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; }
  .gr-day { grid-template-columns: 29px auto 1fr; justify-items: start; align-items: center; gap: 12px; text-align: left; }
  .gr-day-dot { margin: 0; }
}

/* the Index: a search and what it finds */
.gr-index-grid { display: grid; gap: clamp(24px, 4vw, 56px); align-items: center; }
@media (min-width: 940px) { .gr-index-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.gr-index-note { margin: 0; color: var(--ink3); font-size: 0.85rem; font-weight: 700; }
.gr-index-card { min-width: 0; padding: clamp(14px, 2vw, 20px); border-radius: 28px; background: var(--bg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.gr-search { display: flex; align-items: center; gap: 10px; min-height: 52px; margin: 0 0 14px; padding: 0 16px; border-radius: 16px; background: var(--card); border: 1.5px solid var(--line-strong); font-weight: 700; font-size: 1.1rem; }
.gr-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink3); stroke-width: 2; stroke-linecap: round; }
.gr-caret { width: 2px; height: 1.25em; margin-left: -6px; background: var(--brand); animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.gr-index-card .mini { margin: 0 4px 6px; }
.gr-rows { list-style: none; margin: 0; padding: 0; border-radius: 18px; background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.gr-rows li { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); }
.gr-rows li:first-child { border-top: 0; }
.gr-row-main { flex: 1; min-width: 0; display: grid; }
.gr-row-ja { font-size: 1.15rem; line-height: 1.9; }
.gr-row-en { color: var(--ink2); font-size: 0.92rem; line-height: 1.5; }
.gr-row-at { flex: none; color: var(--ink3); font-size: 0.8rem; font-weight: 800; white-space: nowrap; }
.gr-rows.is-new { animation: rows-in 0.35s ease; }
@keyframes rows-in { from { opacity: 0; transform: translateY(6px); } }

/* iPhone, iPad and Mac: drawn until the screens are made (grammar.mjs, TODO); each screen sized in its own width (cqw) */
.gr-devices-art { display: block; padding: 0 0 9%; }
.gr-laptop { width: min(86%, 540px); margin: 0 6% 0 auto; }
.gr-screen { display: flex; overflow: hidden; background: #FBF7F0; color: #2A2420; container-type: inline-size; box-shadow: var(--shadow); }
.gr-laptop-screen { aspect-ratio: 16 / 10.4; border: 11px solid #1D1A18; border-bottom-width: 15px; border-radius: 18px 18px 6px 6px; }
.gr-laptop-base { display: block; height: 14px; margin: 0 -7%; border-radius: 2px 2px 16px 16px; background: linear-gradient(#DAD4CD, #ABA39A); box-shadow: 0 10px 18px rgba(42, 36, 32, 0.16); }
.gr-tab { position: absolute; left: 0; bottom: 0; width: 37%; }
.gr-tab-screen { aspect-ratio: 3 / 4; border: 8px solid #1D1A18; border-radius: 20px; }
.gr-phone { position: absolute; left: 31%; bottom: -4%; width: 19%; }
.gr-phone-screen { flex-direction: column; aspect-ratio: 9 / 19.5; border: 5px solid #1D1A18; border-radius: 20px; }
.gr-screen i, .gr-screen b { display: block; font-style: normal; }
/* the sidebar: the app's mark, then its four tabs (Books on) */
.gr-side { flex: none; display: flex; flex-direction: column; gap: 2cqw; width: 19cqw; padding: 4cqw 2.6cqw; background: #F3ECE1; border-right: 1px solid #ECE3D6; }
.gr-side-logo { width: 6cqw; height: 6cqw; margin-bottom: 2cqw; border-radius: 1.6cqw; background: #884898; }
.gr-side i { height: 3.6cqw; border-radius: 99px; background: #E7DFD3; }
.gr-side i.is-on { background: #E8D6EE; }
.gr-tab-screen .gr-side { width: 17cqw; gap: 3cqw; padding: 6cqw 3cqw; }
.gr-tab-screen .gr-side-logo { width: 9cqw; height: 9cqw; border-radius: 2.4cqw; }
.gr-tab-screen .gr-side i { height: 5cqw; }
.gr-pane { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2.2cqw; padding: 4.5cqw 4.5cqw; }
.gr-pane-title { font-weight: 800; font-size: 4.2cqw; line-height: 1.1; }
.gr-pane-go { display: flex; flex-direction: column; gap: 1.2cqw; padding: 2.4cqw 3cqw; border-radius: 2cqw; background: #FFFFFF; border: 1px solid #ECE3D6; }
.gr-pane-go i, .gr-mini-book i, .gr-mini-point i, .gr-mini-line { height: 1.3cqw; border-radius: 99px; background: #E7DFD3; }
.gr-pane-go i { width: 52%; background: #E8D6EE; }
.gr-pane-go i.short, .gr-mini-book i.short, .gr-mini-point i.short, .gr-mini-line.short { width: 40%; }
.gr-pane-shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw; }
.gr-mini-book { display: flex; align-items: stretch; height: 9.2cqw; overflow: hidden; border-radius: 1.6cqw; background: #FFFFFF; border: 1px solid #ECE3D6; }
.gr-mini-book b { flex: none; display: grid; place-items: center; width: 6cqw; background: var(--book); color: #FFFFFF; font-size: 2.4cqw; font-weight: 800; }
.gr-mini-book span { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 1.2cqw; padding: 0 2.4cqw; }
.gr-mini-book i { width: 70%; }
/* a lesson page: its number, its title with the readings, the point, two examples on white cards */
.gr-pane-page { gap: 3.4cqw; padding: 7cqw 6cqw; }
.gr-mini-meta { color: #884898; font-size: 3.6cqw; font-weight: 800; line-height: 1; }
.gr-mini-title { font-family: 'Sumo Hand', serif; font-weight: 600; font-size: 7.2cqw; line-height: 1.75; white-space: nowrap; }
.gr-mini-title rt, .gr-mini-ja rt { font-size: 0.45em; color: #6F645C; }
.gr-mini-point { display: flex; flex-direction: column; gap: 1.6cqw; padding: 3cqw 3.6cqw; border-radius: 3cqw; background: #F4EAF6; }
.gr-mini-point i { background: #E3CFE9; }
.gr-mini-card { display: flex; align-items: center; gap: 3cqw; padding: 2.4cqw 3.6cqw; border-radius: 3.4cqw; background: #FFFFFF; border: 1px solid #ECE3D6; }
.gr-mini-say { flex: none; width: 7.4cqw; height: 7.4cqw; border-radius: 50%; background: #E6ECF8; }
.gr-mini-ja { font-size: 6.2cqw; line-height: 1.85; white-space: nowrap; }
.gr-phone-screen .gr-pane-page { gap: 4cqw; padding: 15cqw 7cqw 4cqw; }
.gr-phone-screen .gr-mini-meta { font-size: 5.4cqw; }
.gr-phone-screen .gr-mini-title { font-size: 10cqw; }
.gr-phone-screen .gr-mini-ja { font-size: 8.4cqw; }
.gr-phone-screen .gr-mini-say { width: 10cqw; height: 10cqw; }
.gr-phone-screen .gr-mini-point { gap: 2.4cqw; padding: 4cqw 5cqw; }
.gr-phone-screen .gr-mini-point i, .gr-phone-screen .gr-mini-line { height: 2.2cqw; }
/* the iPhone's tab bar: four tabs, Books on */
.gr-tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; height: 15cqw; padding: 0 6cqw 3cqw; border-top: 1px solid #ECE3D6; background: #FFFFFF; }
.gr-tabbar i { width: 7cqw; height: 7cqw; border-radius: 2cqw; background: #E7DFD3; }
.gr-tabbar i.is-on { background: #884898; }

@media (prefers-reduced-motion: reduce) {
  .gr-phrase, .gr-box, .gr-job, .gr-arcs .gr-arc, .gr-arcs .gr-head, .gr-spine, .gr-gap i, .gr-gap b { transition: none; }
  .gr-phrase.is-ne .gr-ne, .gr-say.is-saying .gr-wave, .gr-caret, .gr-bubble, .gr-rows.is-new { animation: none; }
  .js .gr-step-cut .gr-rung { opacity: 1; transform: none; transition: none; }
  .js .gr-days-wrap.is-in .gr-day-dot { animation: none; }
}

/* ------------------------------------------------------------------------------------ numbers */
.numbers { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.numbers li { display: grid; gap: 2px; padding: 14px 16px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.numbers b { color: var(--brand); font-weight: 800; font-size: 1.8rem; line-height: 1.15; }
.numbers span { color: var(--ink2); font-weight: 700; font-size: 0.92rem; line-height: 1.35; }

/* ------------------------------------------------------------------------------------ the phone and the tablet */
.phone { position: relative; width: min(100%, 300px); padding: 11px; border-radius: 48px; background: #1D1A18; box-shadow: var(--shadow), inset 0 0 0 2px #3A3532; }
.phone::before { content: ''; position: absolute; left: 50%; top: 21px; z-index: 2; width: 30%; height: 22px; border-radius: 999px; background: #0D0B0A; transform: translateX(-50%); }
/* the screen: an iPhone's status bar (59 points), then the app as it was shot (393 x 852); sized in the screen's own width (cqw) */
.phone-screen { position: relative; aspect-ratio: 393 / 911; overflow: hidden; border-radius: 38px; background: #FBF8F0; container-type: inline-size; }
.phone-screen img { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; display: block; }
.phone-bar { position: absolute; inset: 0 0 auto; z-index: 1; height: 15cqw; display: flex; align-items: center; gap: 1.5cqw; padding: 0 7.6cqw 0 11.6cqw; color: #1D1A18; }
.phone-bar b { margin-right: auto; font-weight: 800; font-size: 4.1cqw; line-height: 1; letter-spacing: 0.01em; }
.phone-signal { width: 4.7cqw; height: 2.9cqw;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0.9cqw 40% no-repeat, linear-gradient(currentColor, currentColor) 1.26cqw 100% / 0.9cqw 60% no-repeat,
    linear-gradient(currentColor, currentColor) 2.52cqw 100% / 0.9cqw 80% no-repeat, linear-gradient(currentColor, currentColor) 3.78cqw 100% / 0.9cqw 100% no-repeat; }
.phone-battery { position: relative; width: 6.3cqw; height: 3cqw; margin-right: 0.7cqw; border-radius: 0.95cqw; background: currentColor; }
.phone-battery::after { content: ''; position: absolute; left: calc(100% + 0.35cqw); top: 50%; width: 0.55cqw; height: 1.1cqw; border-radius: 0 0.4cqw 0.4cqw 0; background: currentColor; opacity: 0.4; transform: translateY(-50%); }
.tablet { position: relative; width: min(100%, 440px); aspect-ratio: 1032 / 1376; padding: 14px; border-radius: 34px; background: #1D1A18; box-shadow: var(--shadow), inset 0 0 0 2px #3A3532; }
.tablet-screen { width: 100%; height: 100%; overflow: hidden; border-radius: 22px; background: #FBF7F0; }
.tablet-screen img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* the tour: the phone stays while its steps go by (wide screens); each step with its own phone on narrow ones */
.tour-grid { display: grid; gap: 28px; margin-top: 1.6rem; }
.tour-stage { display: none; }
.tour-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; }
.tour-step { display: grid; gap: 18px; justify-items: center; text-align: center; }
.tour-step .tour-text { max-width: 30rem; }
.tour-step h3 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 2.1rem); line-height: 1.15; letter-spacing: -0.01em; }
.tour-step p { color: var(--ink2); margin: 0; }
.tour-phone-inline { width: min(78%, 280px); }
@media (min-width: 900px) {
  .tour-grid { grid-template-columns: minmax(280px, 0.8fr) 1fr; gap: clamp(32px, 6vw, 96px); }
  .tour-stage { display: block; position: sticky; top: max(84px, calc(50vh - 330px)); align-self: start; height: fit-content; }
  .tour-phone { width: min(100%, 320px, calc((100vh - 120px) * 0.42)); margin: 0 auto; }
  .tour-shot { opacity: 0; transition: opacity 0.5s ease; }
  .tour-shot.is-on { opacity: 1; }
  .tour-phone-inline { display: none; }
  .tour-steps { gap: 0; }
  .tour-step { justify-items: start; text-align: left; min-height: min(70vh, 640px); align-content: center; opacity: 0.32; transition: opacity 0.4s ease; }
  .tour-step.is-on { opacity: 1; }
}

/* iPhone, iPad and Mac */
.devices { display: grid; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) { .devices { grid-template-columns: 1.1fr 0.9fr; } }
.devices-art { position: relative; display: flex; justify-content: center; padding-bottom: 6%; }
.devices-phone { position: absolute; right: max(0px, calc(50% - 300px)); bottom: 0; width: min(36%, 170px); padding: 7px; border-radius: 30px; }
.devices-phone::before { top: 13px; height: 13px; }
.devices-phone .phone-screen { border-radius: 24px; }

/* ------------------------------------------------------------------------------------ promises, plans, questions, last call */
.promises { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.promises li { padding: 22px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.promise-icon { display: inline-grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-ink); }
.promise-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.promises p { margin: 0; color: var(--ink2); }
.plans-band { background: var(--bg-soft); }
.plans { display: grid; gap: 18px; margin: 2rem auto 0; max-width: 56rem; text-align: left; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; } }
.plan { padding: 24px 26px; border-radius: 26px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.plan-pro { border: 2px solid var(--brand); box-shadow: var(--shadow); background: linear-gradient(160deg, var(--brand-soft), var(--card) 46%); }
.plan ul { margin: 0.6rem 0 0; padding-left: 1.2rem; }
.plan li { margin: 0.5rem 0; }
.price { display: grid; margin: 0.2rem 0 0; }
.price b { color: var(--brand); font-size: 1.9rem; line-height: 1.15; }
.price span { color: var(--ink2); font-weight: 800; }
.fine { color: var(--ink3); font-size: 0.82rem; margin: 1rem 0 0; }
.faq-wrap { max-width: 50rem; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.12rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--brand); font-weight: 800; font-size: 1.4rem; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0.6rem 0 0; color: var(--ink2); }
.final { background: linear-gradient(to bottom, var(--bg-soft), var(--bg)); }
.final-inner { display: grid; gap: 24px; align-items: center; justify-items: center; text-align: center; }
.final-inner .cta-row { justify-content: center; }
@media (min-width: 760px) { .final-inner { grid-template-columns: auto 1fr; justify-items: start; text-align: left; } .final-inner .cta-row { justify-content: flex-start; } }
.final-icon { width: 112px; height: 112px; border-radius: 26px; box-shadow: var(--shadow); }

/* ------------------------------------------------------------------------------------ in on scroll */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .float { animation: none; }
  .card, .tour-shot, .tour-step, .try-art { transition: none; }
  .is-writing .hk-s, .is-writing .hanamaru { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .is-writing .nb-mark { animation: none; opacity: 1; }
  .verb-big.is-new { animation: none; }
}

/* ------------------------------------------------------------------------------------ the privacy policy, terms and support */
.doc { padding: 36px 0 64px; }
.doc h1 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.5rem); line-height: 1.15; margin: 0 0 0.4rem; }
.doc h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.2rem 0 0.6rem; letter-spacing: 0; }
.doc .muted { color: var(--ink2); font-size: 0.95rem; margin-top: 0; }
.doc ul { padding-left: 1.3rem; }
.doc li { margin: 0.5rem 0; }
.doc details { border-top: 1px solid var(--line); padding: 12px 0; }
.doc summary { cursor: pointer; font-weight: 800; }
.try-square .hanamaru { stroke-dasharray: none; stroke-dashoffset: 0; }

.gr-book-n5{--book:#884898;--book-deep:#6E3480}
.gr-spine.gr-book-n5{--h:210px}
.gr-book-n4{--book:#3F5FA8;--book-deep:#2F4A8A}
.gr-spine.gr-book-n4{--h:222px}
.gr-book-n3{--book:#2E7D6E;--book-deep:#225F54}
.gr-spine.gr-book-n3{--h:260px}
.gr-book-n2{--book:#A8641F;--book-deep:#874E14}
.gr-spine.gr-book-n2{--h:226px}
.gr-book-n1{--book:#A4343A;--book-deep:#83262C}
.gr-spine.gr-book-n1{--h:226px}
.gr-book-cho{--book:#33415C;--book-deep:#242F44}
.gr-spine.gr-book-cho{--h:240px}
.gr-book-kobun{--book:#7A4F3A;--book-deep:#5E3B2B}
.gr-spine.gr-book-kobun{--h:232px}
.gr-book-kanbun{--book:#2F5D50;--book-deep:#22463C}
.gr-spine.gr-book-kanbun{--h:218px}
