/* =====================================================================
   Jared's Ultimate Japanese Guide — 瑠璃色 ruri-iro
   Layout: chapter list on the left (a drawer on phones), one readable
   column of text, widgets that break out a little wider. Things move as
   you scroll (.g-reveal), but never when reduced motion is asked for.
   ===================================================================== */
:root {
  --page-color: #2a62b0;
  --page-ink: #22528f;
  --g-c1: #2a62b0;          /* chart series 1 (validated with --g-c2, light) */
  --g-c2: #c0661e;          /* chart series 2 */
  --g-good: #3d7a3a;
  --g-warn: #a8641a;
  --g-bad:  #a83a32;
  --g-col: 40rem;           /* text column */
  --g-wide: 50rem;          /* widgets */
}
:root[data-theme="dark"] {
  --page-ink: #8fb2e8;
  --g-c1: #5b8ed8;
  --g-c2: #c47a32;
  --g-good: #7fbf72;
  --g-warn: #e0a250;
  --g-bad:  #e08a80;
}

/* --- Reading progress -------------------------------------------------- */
.g-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200; pointer-events: none; }
.g-progress span { display: block; height: 100%; width: 100%; background: var(--page-color); transform-origin: 0 50%; transform: scaleX(0); }

/* --- Scroll reveal ------------------------------------------------------- */
.g-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i, 0) * 40ms); }
.g-reveal.is-in { opacity: 1; transform: none; }
.g-reveal-left { transform: translateX(-24px); }
.g-reveal-pop { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) {
  .g-reveal, .g-reveal-left, .g-reveal-pop { opacity: 1 !important; transform: none !important; transition: none !important; }
}
html.no-js .g-reveal { opacity: 1; transform: none; }

/* --- Layout ------------------------------------------------------------- */
.g-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1100px) {
  .g-wrap { grid-template-columns: 220px minmax(0, 1fr); gap: clamp(40px, 5vw, 88px); }
}
.g-side { font-size: 13px; }
@media (min-width: 1100px) {
  .g-side { position: sticky; top: 24px; align-self: start; max-height: calc(100vh - 48px); overflow-y: auto; padding: 4px 8px 24px 0; scrollbar-width: thin; }
}
@media (max-width: 1099px) {
  .g-side { position: fixed; z-index: 150; inset: 0 auto 0 0; width: min(320px, 86vw); background: var(--paper); border-right: 1px solid var(--rule); padding: 72px 22px 32px; overflow-y: auto; transform: translateX(-102%); transition: transform .3s ease; }
  .g-side.is-open { transform: none; box-shadow: 0 0 0 100vmax var(--scrim, rgba(31,28,24,.35)); }
}
.g-side-toggle { display: none; }
@media (max-width: 1099px) {
  .g-side-toggle { display: inline-flex; position: fixed; z-index: 160; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); align-items: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 14px var(--font-gothic); cursor: pointer; }
  .g-side-toggle .g-ring { width: 18px; height: 18px; }
}
.g-side-home { display: block; font-family: var(--font-mincho); font-weight: 600; font-size: 15px; line-height: 1.4; color: var(--ink); margin-bottom: 14px; }
.g-side-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-side-bar { flex: 1; height: 3px; background: var(--rule); }
.g-side-bar span { display: block; height: 100%; width: 0; background: var(--page-color); transition: width .5s ease; }
.g-toc { list-style: none; border-top: 1px solid var(--rule); }
.g-toc a { display: grid; grid-template-columns: 22px 1fr 14px; gap: 8px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--rule); color: var(--ink-soft); }
.g-toc a:hover { color: var(--ink); }
.g-toc a[aria-current="page"] { color: var(--ink); font-weight: 700; }
.g-toc a[aria-current="page"] .g-toc-n { color: var(--page-ink); }
.g-toc-n { font-family: var(--font-mincho); font-weight: 600; font-size: 15px; color: var(--muted); }
.g-toc-check { width: 12px; height: 12px; border: 1px solid var(--rule-strong); border-radius: 50%; align-self: center; }
.g-toc li.is-done .g-toc-check { background: var(--page-color); border-color: var(--page-color); box-shadow: inset 0 0 0 2px var(--paper); }
.g-side-onpage-label { margin: 24px 0 8px; font-size: 12px; letter-spacing: .06em; color: var(--muted); }
.g-onpage { list-style: none; border-left: 1px solid var(--rule); }
.g-onpage a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); line-height: 1.45; }
.g-onpage a.is-cur { color: var(--ink); border-left-color: var(--page-color); }

/* --- Chapter hero ------------------------------------------------------- */
.g-main { padding-top: clamp(8px, 3vh, 32px); }
.g-hero { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(16px, 5vh, 56px) 0 clamp(28px, 5vh, 48px); border-bottom: 1px solid var(--rule); margin-bottom: clamp(28px, 5vh, 48px); max-width: var(--g-wide); }
.g-hero-kicker { font-size: 13px; letter-spacing: .04em; color: var(--muted); margin-bottom: 18px; }
.g-hero-kicker a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.g-hero-title { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.2; margin-bottom: 10px; max-width: 16em; }
.g-hero-ja { font-family: var(--font-mincho); font-size: clamp(1rem, 1.6vw, 1.2rem); letter-spacing: .14em; color: var(--page-ink); margin-bottom: 22px; }
.g-hero-lede { font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--ink-soft); max-width: var(--g-col); line-height: 1.85; }
.g-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.g-hero-meta span + span::before { content: "·"; margin-right: 18px; }
.g-hero-done { color: var(--page-ink) !important; font-weight: 700; }
.g-hero-kanji { position: absolute; z-index: -1; right: -0.05em; top: -0.12em; font-family: var(--font-mincho); font-weight: 500; font-size: clamp(9rem, 22vw, 17rem); line-height: 1; color: color-mix(in srgb, var(--page-color) 9%, transparent); pointer-events: none; user-select: none; animation: g-float 9s ease-in-out infinite alternate; }
@keyframes g-float { from { transform: translateY(0) rotate(0); } to { transform: translateY(14px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .g-hero-kanji { animation: none; } }

/* --- Body text ---------------------------------------------------------- */
.g-body { max-width: var(--g-wide); }
.g-body > p, .g-body > ul, .g-body > ol, .g-body > h2, .g-body > h3, .g-body > blockquote, .g-body > .g-narrow { max-width: var(--g-col); }
.g-body p, .g-body li { line-height: 1.9; color: var(--ink-soft); }
.g-body p { margin-bottom: 1.15em; }
.g-body strong { color: var(--ink); }
.g-body a:not(.btn):not(.g-pn-card) { color: var(--ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--page-color) 55%, transparent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.g-body a:not(.btn):hover { text-decoration-color: var(--page-color); }
.g-body ul, .g-body ol { padding-left: 1.2em; margin-bottom: 1.2em; }
.g-body li { margin-bottom: .35em; }
.g-body li::marker { color: var(--page-ink); }
.g-body h2 { position: relative; font-size: clamp(1.5rem, 2.8vw, 2.05rem); line-height: 1.35; margin: clamp(56px, 9vh, 96px) 0 18px; scroll-margin-top: 24px; }
.g-body h2 .g-h2-n { display: block; font-size: 13px; letter-spacing: .1em; color: var(--page-ink); font-family: var(--font-gothic); font-weight: 500; margin-bottom: 8px; }
.g-body h3 { font-size: 1.15rem; margin: 2.2em 0 .6em; }
.g-body code, .g-body kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86em; background: var(--paper-deep); padding: 1px 5px; }
.g-body kbd { border: 1px solid var(--rule-strong); border-bottom-width: 2px; }
.g-jp { font-family: var(--font-mincho); color: var(--ink); }
.g-mark { background: linear-gradient(transparent 62%, color-mix(in srgb, var(--page-color) 22%, transparent) 62%); color: var(--ink); background-size: 0 100%; background-repeat: no-repeat; transition: background-size 1s ease .2s; }
.g-mark.is-in, .is-in .g-mark { background-size: 100% 100%; }
@media (prefers-reduced-motion: reduce) { .g-mark { background-size: 100% 100%; transition: none; } }

/* --- Callouts ------------------------------------------------------------ */
.g-callout { position: relative; max-width: var(--g-col); margin: 2em 0; padding: 20px 22px 18px; border: 1px solid var(--rule); background: var(--paper-light); }
.g-callout > :last-child { margin-bottom: 0; }
.g-callout-label { display: flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.g-callout-label .g-stamp { display: inline-flex; align-items: center; justify-content: center; flex: none; box-sizing: border-box; width: 26px; height: 26px; padding: 0; border: 1.5px solid var(--page-color); color: var(--page-ink); border-radius: 50%; font-family: var(--font-mincho); font-weight: 700; font-size: 13px; line-height: 1; text-indent: 0; text-transform: none; letter-spacing: 0; }
.g-story { border-left: 3px solid var(--page-color); }
.g-story .g-callout-label { color: var(--page-ink); }
.g-tldr { background: transparent; border: 2px solid var(--ink); }
.g-tldr ul { margin: 0; }
.g-try { border-style: dashed; border-color: var(--rule-strong); background: transparent; }
.g-friend { border-left: 3px solid var(--g-c2); }
.g-friend .g-callout-label { color: var(--ink-soft); }
.g-warn { border-left: 3px solid var(--g-warn); }
.g-quote { max-width: var(--g-wide); margin: clamp(40px, 7vh, 72px) 0; padding: 0; border: 0; }
.g-quote p { font-family: var(--font-mincho); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2.2rem); line-height: 1.5; color: var(--ink); max-width: 22em; margin: 0; }
.g-quote p::before { content: "「"; color: var(--page-ink); margin-left: -0.6em; }
.g-quote p::after { content: "」"; color: var(--page-ink); }
.g-quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 13px; color: var(--muted); }

/* --- Widgets ------------------------------------------------------------- */
.g-widget { max-width: var(--g-wide); margin: 2.4em 0; border: 1px solid var(--rule-strong); background: var(--paper-light); padding: clamp(18px, 3vw, 28px); }
.g-widget-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.g-widget-title { font-family: var(--font-mincho); font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.g-widget-tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--page-ink); border: 1px solid currentColor; padding: 2px 7px; }
.g-widget p { line-height: 1.7; }
.g-widget-note { font-size: 13px; color: var(--muted); margin-top: 12px; margin-bottom: 0 !important; }
.g-btn { font: 500 14px var(--font-gothic); padding: 9px 16px; min-height: 40px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; transition: background .15s, color .15s; }
.g-btn:hover { background: var(--ink); color: var(--paper); }
.g-btn.is-on, .g-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.g-btn-primary { background: var(--page-color); border-color: var(--page-color); color: #fff; }
.g-btn-primary:hover { background: var(--ink); border-color: var(--ink); }
.g-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.g-seg { display: inline-flex; border: 1px solid var(--rule-strong); flex-wrap: wrap; }
.g-seg button { font: 500 13px var(--font-gothic); padding: 8px 14px; min-height: 38px; border: 0; border-left: 1px solid var(--rule-strong); background: transparent; color: var(--ink-soft); cursor: pointer; }
.g-seg button:first-child { border-left: 0; }
.g-seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.g-range { display: grid; gap: 6px; margin: 10px 0 14px; font-size: 14px; color: var(--ink-soft); }
.g-range-top { display: flex; justify-content: space-between; gap: 12px; }
.g-range output { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-range input[type="range"] { width: 100%; accent-color: var(--page-color); }
.g-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 14px 0; }
.g-stat { background: var(--paper-light); padding: 12px 14px; }
.g-stat-v { display: block; font-family: var(--font-mincho); font-weight: 700; font-size: 1.6rem; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.g-stat-l { font-size: 12px; color: var(--muted); }
.g-verdict { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--page-color); background: var(--page-color-soft); color: var(--ink); line-height: 1.7; }
.g-verdict.is-good { border-left-color: var(--g-good); }
.g-verdict.is-warn { border-left-color: var(--g-warn); }
.g-verdict.is-bad { border-left-color: var(--g-bad); }

/* Chart */
.g-chart { width: 100%; height: auto; display: block; overflow: visible; font-family: var(--font-gothic); }
.g-chart .grid line { stroke: var(--rule); stroke-width: 1; }
.g-chart .axis text { fill: var(--muted); font-size: 11px; }
.g-chart .lbl { fill: var(--ink-soft); font-size: 12px; }
.g-chart .lbl-strong { fill: var(--ink); font-size: 12px; font-weight: 700; }
.g-chart .s1 { stroke: var(--g-c1); fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-chart .s2 { stroke: var(--g-c2); fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.g-chart .a1 { fill: var(--g-c1); opacity: .1; }
.g-chart .d1 { fill: var(--g-c1); stroke: var(--paper-light); stroke-width: 2; }
.g-chart .d2 { fill: var(--g-c2); stroke: var(--paper-light); stroke-width: 2; }
.g-chart .cross { stroke: var(--rule-strong); stroke-width: 1; }
.g-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-soft); margin: 4px 0 10px; }
.g-legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--g-c1); border-radius: 2px; }
.g-legend span.k2::before { background: var(--g-c2); }
.g-legend span.dot::before { width: 10px; height: 10px; border-radius: 50%; }
.g-tip { position: absolute; pointer-events: none; z-index: 5; background: var(--ink); color: var(--paper); font-size: 12px; line-height: 1.5; padding: 8px 10px; max-width: 240px; transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap; }
.g-chart-wrap { position: relative; }
.g-table-toggle { margin-top: 8px; font-size: 13px; }
.g-table-toggle summary { cursor: pointer; color: var(--muted); }
.g-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.g-table th, .g-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule); color: var(--ink-soft); vertical-align: top; }
.g-table th { color: var(--muted); font-weight: 500; }
.g-table td.num, .g-table th.num { text-align: right; }

/* --- Screenshot / photo placeholders ------------------------------------ */
.g-shot { max-width: var(--g-wide); margin: 2em 0; }
.g-shot-ph { aspect-ratio: var(--r, 16/9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px; border: 2px dashed var(--rule-strong); background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--faint) 10%, transparent) 14px 15px); color: var(--muted); }
.g-shot-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--page-ink); }
.g-shot-what { max-width: 30em; color: var(--ink-soft); line-height: 1.6; }
.g-shot-ph code { font-size: 11px; background: none; color: var(--muted); }
.g-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.g-shot figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }
.g-shot:not(.has-img) figcaption { display: none; }

/* --- YouTube --------------------------------------------------------------- */
.g-yt { max-width: var(--g-wide); margin: 2em 0; }
.g-yt-btn { position: relative; display: block; width: 100%; aspect-ratio: 16/9; padding: 0; border: 1px solid var(--rule); background: #000; cursor: pointer; overflow: hidden; }
.g-yt-btn img { width: 100%; height: 100%; object-fit: cover; opacity: .9; transition: transform .5s ease, opacity .3s; }
.g-yt-btn:hover img { transform: scale(1.03); opacity: 1; }
.g-yt-play { position: absolute; left: 50%; top: 50%; width: 72px; height: 50px; margin: -25px 0 0 -36px; background: var(--page-color); border-radius: 12px; transition: transform .2s; }
.g-yt-play::after { content: ""; position: absolute; left: 29px; top: 15px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.g-yt-btn:hover .g-yt-play { transform: scale(1.08); }
.g-yt iframe { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.g-yt-cap { font-size: 13px; color: var(--muted) !important; margin-top: 8px !important; }
.g-yt-tag { display: inline-block; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--page-ink); border: 1px solid currentColor; padding: 0 5px; margin-right: 6px; }

/* --- Chapter end --------------------------------------------------------- */
.g-chapter-end { max-width: var(--g-wide); margin-top: clamp(64px, 10vh, 120px); padding-top: 32px; border-top: 1px solid var(--rule); }
.g-done-btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 700 15px var(--font-gothic); cursor: pointer; }
.g-done-box { width: 20px; height: 20px; border: 2px solid currentColor; display: grid; place-items: center; }
.g-done-btn.is-done { background: var(--page-color); border-color: var(--page-color); color: #fff; }
.g-done-btn.is-done .g-done-box::after { content: "✓"; font-size: 14px; line-height: 1; }
.g-done-btn.is-pop { animation: g-pop .5s ease; }
@keyframes g-pop { 40% { transform: scale(1.06); } }
.g-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.g-pn-card { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--rule-strong); color: var(--ink); transition: border-color .2s, transform .2s; }
.g-pn-card:hover { border-color: var(--page-color); transform: translateY(-2px); }
.g-pn-card:last-child { text-align: right; }
.g-pn-label { font-size: 12px; color: var(--muted); }
.g-pn-k { font-family: var(--font-mincho); font-size: 1.6rem; color: var(--page-ink); line-height: 1; }
.g-pn-card strong { font-family: var(--font-mincho); font-weight: 600; }
.g-pn-card.is-home { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .g-pn { grid-template-columns: 1fr; } .g-pn-card:last-child { text-align: left; } }

/* --- Hub ------------------------------------------------------------------ */
.g-hub-hero { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(28px, 8vh, 96px) 0 clamp(32px, 6vh, 64px); }
.g-hub-title { font-size: clamp(2.4rem, 6.4vw, 5rem); line-height: 1.12; max-width: 12em; margin-bottom: 18px; }
.g-hub-title em { font-style: normal; color: var(--page-ink); }
.g-hub-ja { font-family: var(--font-mincho); letter-spacing: .3em; color: var(--page-ink); margin-bottom: 26px; }
.g-hub-lede { font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.9; color: var(--ink-soft); max-width: 36rem; }
.g-hub-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.g-hub-actions .btn { font-size: 15px; }
.g-resume { display: none; font-size: 14px; color: var(--ink-soft); }
.g-resume.is-on { display: inline-block; }
.g-hub-stamp { position: absolute; z-index: -1; right: 0; top: 10px; font-family: var(--font-mincho); font-weight: 600; font-size: clamp(8rem, 22vw, 19rem); line-height: .9; color: color-mix(in srgb, var(--page-color) 10%, transparent); writing-mode: vertical-rl; pointer-events: none; user-select: none; }
.g-hub-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 2px solid var(--page-color); border-bottom: 1px solid var(--rule); margin: clamp(24px, 5vh, 48px) 0; }
.g-hub-stat { padding: 18px 16px 16px 0; }
.g-hub-stat b { display: block; font-family: var(--font-mincho); font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-hub-stat > span { font-size: 13px; color: var(--muted); }
.g-cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 20px; }
.g-card a { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 20px 18px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); overflow: hidden; isolation: isolate; transition: border-color .2s, transform .25s cubic-bezier(.2,.7,.2,1); }
.g-card a:hover { border-color: var(--page-color); transform: translateY(-3px); }
.g-card-k { position: absolute; z-index: -1; right: 10px; top: -6px; font-family: var(--font-mincho); font-size: 5.6rem; line-height: 1; color: color-mix(in srgb, var(--page-color) 13%, transparent); transition: transform .4s ease, color .3s; }
.g-card a:hover .g-card-k { transform: translateY(6px) rotate(-6deg); color: color-mix(in srgb, var(--page-color) 24%, transparent); }
.g-card-n { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.g-card-t { font-family: var(--font-mincho); font-weight: 600; font-size: 1.22rem; line-height: 1.35; }
.g-card-l { font-size: 13.5px; line-height: 1.65; color: var(--ink-soft); flex: 1; }
.g-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.g-card-done { display: none; color: var(--page-ink); font-weight: 700; margin-left: auto; }
.g-card.is-done .g-card-done { display: inline; }
.g-card.is-done a { border-color: color-mix(in srgb, var(--page-color) 45%, var(--rule)); }
.g-ring { width: 64px; height: 64px; transform: rotate(-90deg); }
.g-ring circle { fill: none; stroke-width: 4; }
.g-ring .bg { stroke: var(--rule); }
.g-ring .fg { stroke: var(--page-color); stroke-linecap: round; transition: stroke-dashoffset .8s ease; }
.g-hub-progress { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--ink-soft); }
.g-credits { columns: 2 18rem; column-gap: 40px; font-size: 14px; }
.g-credits li { break-inside: avoid; margin-bottom: 10px; line-height: 1.7; color: var(--ink-soft); }
.g-disclosure { font-size: 12.5px; color: var(--muted); max-width: var(--g-col); line-height: 1.7; }

/* --- Specific widgets -------------------------------------------------- */
/* The loop (scrollytelling) */
.g-loop { position: relative; max-width: var(--g-wide); margin: 2.4em 0; display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; }
.g-loop-stage { grid-column: 2; grid-row: 1; position: sticky; top: calc(50vh - 150px); height: 300px; display: grid; place-items: center; align-self: start; }
.g-loop-steps { grid-column: 1; grid-row: 1; }
@media (max-width: 760px) {
  .g-loop { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .g-loop-stage { grid-column: 1; top: 64px; height: 230px; z-index: 0; }
  .g-loop-stage svg { width: 210px; }
  .g-loop-steps { grid-row: 2; margin-top: -40vh; }
  .g-loop-step { align-items: flex-end; padding-bottom: 8vh; }
}
.g-loop svg { width: 280px; height: auto; overflow: visible; }
.g-loop .node circle { fill: var(--paper-light); stroke: var(--rule-strong); stroke-width: 1.5; transition: fill .4s, stroke .4s; }
.g-loop .node text { font-family: var(--font-mincho); font-weight: 600; font-size: 22px; fill: var(--muted); text-anchor: middle; dominant-baseline: central; transition: fill .4s; }
.g-loop .node .en { font-family: var(--font-gothic); font-size: 10px; font-weight: 500; letter-spacing: .06em; }
.g-loop .node.is-on circle { fill: var(--page-color); stroke: var(--page-color); }
.g-loop .node.is-on text { fill: #fff; }
.g-loop .arc { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; stroke-dasharray: 4 5; }
.g-loop .spin { transform-origin: 170px 170px; animation: g-spin 24s linear infinite; }
@keyframes g-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .g-loop .spin { animation: none; } }
.g-loop-steps { position: relative; z-index: 1; }
.g-loop-step { min-height: 70vh; display: flex; align-items: center; }
.g-loop-step > div { max-width: 30rem; background: var(--paper); border: 1px solid var(--rule); padding: 18px 20px; box-shadow: 0 0 0 10px var(--paper); }
.g-loop-step:last-child { min-height: 40vh; }
.g-loop-step h3 { margin: 0 0 6px !important; }
.g-loop-step p { margin: 0 !important; }

/* Mountain */
.g-mountain { position: relative; max-width: 440px; margin: 2.4em auto 2.4em 0; }
.g-mountain-svg { width: 100%; height: auto; display: block; }
.g-mountain-svg text { font-family: var(--font-mincho); font-weight: 600; text-anchor: middle; dominant-baseline: central; fill: var(--ink); transition: opacity .35s ease, transform .5s cubic-bezier(.2,.9,.3,1.3); transform-box: fill-box; transform-origin: center; }
.g-mountain-svg text.off { opacity: 0; transform: translateY(-40px); }
.g-mountain-svg text.peak { fill: var(--page-ink); }
.g-mountain-cap { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--ink); padding-top: 8px; }
.g-mountain-cap b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Timeline (draws as you scroll) */
.g-timeline { position: relative; max-width: var(--g-col); margin: 2.4em 0; padding-left: 34px; list-style: none; }
.g-timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.g-timeline-line { position: absolute; left: 9px; top: 6px; width: 2px; height: calc(100% - 12px); background: var(--page-color); transform-origin: top; transform: scaleY(var(--p, 0)); }
.g-timeline li { position: relative; margin-bottom: 26px !important; }
.g-timeline li::before { content: ""; position: absolute; left: -30px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--rule-strong); transition: background .3s, border-color .3s; }
.g-timeline li.is-in::before { background: var(--page-color); border-color: var(--page-color); }
.g-timeline-y { display: block; font-size: 12px; letter-spacing: .06em; color: var(--page-ink); font-weight: 700; }
.g-timeline b { color: var(--ink); }

/* Gibberish */
.g-gib-text { font-family: var(--font-mincho); font-size: 1.08rem; line-height: 2; color: var(--ink); padding: 16px 18px; background: var(--paper); border: 1px solid var(--rule); }
.g-gib-text .w-x { color: var(--page-ink); text-decoration: underline wavy color-mix(in srgb, var(--page-color) 50%, transparent); text-underline-offset: 4px; }

/* Bob vs Ross */
.g-br-sent { font-family: var(--font-mincho); font-size: clamp(1.25rem, 3vw, 1.7rem); line-height: 2.2; color: var(--ink); margin: 12px 0; }
.g-br-sent span { display: inline-block; padding: 0 2px; transition: filter .3s, background .3s, color .3s; }
.g-br-sent span.unk { filter: blur(5px); background: var(--page-color-soft); }
.g-br-sent span.unk.peek { filter: none; color: var(--page-ink); }
.g-br-gloss { font-size: 14px; color: var(--muted); }

/* Mine or skip */
.g-mine-card { display: grid; gap: 4px; padding: 18px; border: 1px solid var(--rule); background: var(--paper); }
.g-mine-word { font-family: var(--font-mincho); font-size: 2rem; color: var(--ink); line-height: 1.2; }
.g-mine-meta { font-size: 13px; color: var(--muted); }
.g-mine-ctx { font-size: 14px; color: var(--ink-soft); }
.g-mine-freq { display: inline-block; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-mine-bar { height: 6px; background: var(--rule); margin: 6px 0 2px; position: relative; }
.g-mine-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--page-color); }
.g-mine-score { font-size: 13px; color: var(--muted); }

/* Kakeru web */
.g-web { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.g-web .spoke { stroke: var(--rule-strong); stroke-width: 1.5; stroke-dasharray: 220; stroke-dashoffset: 220; transition: stroke-dashoffset .9s ease; }
.g-web.is-in .spoke { stroke-dashoffset: 0; }
.g-web .hub circle { fill: var(--page-color); }
.g-web .hub text { fill: #fff; font-family: var(--font-mincho); font-size: 26px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.g-web .leaf { cursor: pointer; }
.g-web .leaf rect { fill: var(--paper); stroke: var(--rule-strong); rx: 4; transition: fill .2s, stroke .2s; }
.g-web .leaf text { fill: var(--ink); font-size: 13px; text-anchor: middle; dominant-baseline: central; font-family: var(--font-gothic); pointer-events: none; }
.g-web .leaf:hover rect, .g-web .leaf.is-on rect { stroke: var(--page-color); fill: var(--page-color-soft); }
.g-web .leaf:focus-visible rect { stroke: var(--ink); stroke-width: 2; }
.g-web-out { min-height: 3.4em; text-align: center; margin-top: 10px; }
.g-web-out .jp { display: block; font-family: var(--font-mincho); font-size: 1.15rem; color: var(--ink); }
.g-web-out .en { font-size: 13px; color: var(--muted); }

/* Pitch */
.g-pitch-svg { width: 100%; max-width: 520px; height: auto; display: block; margin: 8px auto; overflow: visible; }
.g-pitch-svg .pl { fill: none; stroke: var(--g-c1); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.g-pitch-svg .pd { fill: var(--g-c1); stroke: var(--paper-light); stroke-width: 2; }
.g-pitch-svg .pd.particle { fill: var(--paper-light); stroke: var(--g-c1); stroke-width: 2; }
.g-pitch-svg .mora { font-family: var(--font-mincho); font-size: 22px; fill: var(--ink); text-anchor: middle; }
.g-pitch-svg .mora.particle { fill: var(--muted); }
.g-pitch-svg .hl { font-size: 10px; fill: var(--muted); }
.g-pitch-name { text-align: center; color: var(--ink-soft); font-size: 14px; }
.g-pitch-name b { color: var(--ink); }

/* Conversation sim */
.g-chat { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; padding: 4px; }
.g-msg { max-width: 82%; padding: 10px 14px; line-height: 1.6; font-size: 14.5px; animation: g-msg .35s ease; }
@keyframes g-msg { from { opacity: 0; transform: translateY(8px); } }
.g-msg.them { background: var(--paper); border: 1px solid var(--rule); justify-self: start; }
.g-msg.you { background: var(--page-color); color: #fff; justify-self: end; }
.g-msg .jp { display: block; font-family: var(--font-mincho); font-size: 1.05rem; }
.g-msg .en { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.g-msg.note { max-width: 100%; justify-self: stretch; background: transparent; border: 1px dashed var(--rule-strong); color: var(--ink-soft); font-size: 13.5px; }
.g-chat-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.g-vibe { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.g-vibe-bar { flex: 1; height: 8px; background: var(--rule); position: relative; overflow: hidden; }
.g-vibe-bar span { position: absolute; inset: 0 auto 0 0; background: var(--page-color); transition: width .5s ease; }

/* Flip cards (mistake museum) */
.g-flips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; max-width: var(--g-wide); margin: 2em 0; }
.g-flip { perspective: 900px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; min-height: 230px; }
.g-flip-in { position: relative; display: block; width: 100%; height: 100%; min-height: 230px; transition: transform .6s cubic-bezier(.3,.7,.2,1); transform-style: preserve-3d; }
.g-flip.is-flipped .g-flip-in { transform: rotateY(180deg); }
.g-flip-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--rule-strong); background: var(--paper-light); backface-visibility: hidden; }
.g-flip-back { transform: rotateY(180deg); border-color: var(--page-color); }
.g-flip-tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.g-flip-big { font-family: var(--font-mincho); font-size: 1.28rem; color: var(--ink); line-height: 1.3; }
.g-flip-small { font-size: 13.5px; line-height: 1.6; color: var(--ink-soft); }
.g-flip-hint { margin-top: auto; font-size: 12px; color: var(--page-ink); }
@media (prefers-reduced-motion: reduce) { .g-flip-in { transition: none; } }

/* Tier list */
.g-tiers { max-width: var(--g-wide); margin: 2em 0; border-top: 1px solid var(--rule-strong); }
.g-tier { display: grid; grid-template-columns: 64px 1fr; border-bottom: 1px solid var(--rule); }
.g-tier-l { display: grid; place-items: center; font-family: var(--font-mincho); font-weight: 700; font-size: 1.5rem; color: #fff; background: var(--page-color); }
.g-tier[data-t="SSS"] .g-tier-l { background: #8a3d8f; }
.g-tier[data-t="A"] .g-tier-l { background: #2a62b0; }
.g-tier[data-t="B"] .g-tier-l { background: #3d7a3a; }
.g-tier[data-t="C"] .g-tier-l { background: #a8641a; }
.g-tier[data-t="F"] .g-tier-l { background: #6b6358; }
.g-tier-r { padding: 12px 16px; }
.g-tier-r h4 { font-size: 1rem; margin-bottom: 4px; }
.g-tier-r p { font-size: 14px; margin: 0 0 6px !important; line-height: 1.7 !important; }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.g-chip { font-size: 12.5px; padding: 3px 9px; border: 1px solid var(--rule-strong); color: var(--ink-soft); background: var(--paper); }

/* Tabs (manga by level) */
.g-tabs [role="tablist"] { margin-bottom: 14px; }
.g-manga { list-style: none; display: grid; gap: 10px; padding: 0 !important; }
.g-manga li { padding: 12px 14px; border: 1px solid var(--rule); background: var(--paper); margin: 0 !important; animation: g-msg .35s ease both; animation-delay: calc(var(--i, 0) * 50ms); }
.g-manga b { font-family: var(--font-mincho); color: var(--ink); font-size: 1.05rem; }
.g-manga .jp { font-family: var(--font-mincho); color: var(--muted); margin-left: 6px; font-size: .92rem; }
.g-manga p { font-size: 14px; margin: 4px 0 0 !important; line-height: 1.65 !important; }

/* Checklists */
.g-checks { list-style: none; padding: 0 !important; display: grid; gap: 2px; }
.g-checks li { margin: 0 !important; }
.g-checks label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 4px; border-bottom: 1px solid var(--rule); cursor: pointer; line-height: 1.6; color: var(--ink-soft); }
.g-checks input { accent-color: var(--page-color); width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.g-checks input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.g-stage-h { font-family: var(--font-mincho); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 18px 0 6px; display: flex; justify-content: space-between; gap: 12px; }
.g-stage-h span { font-family: var(--font-gothic); font-weight: 500; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Why pin */
.g-why textarea { width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); font: 16px/1.7 var(--font-gothic); }
.g-why-card { display: none; margin-top: 14px; padding: 22px; border: 2px solid var(--page-color); background: var(--paper); position: relative; }
.g-why-card.is-on { display: block; animation: g-pop .5s ease; }
.g-why-card q { font-family: var(--font-mincho); font-size: 1.25rem; line-height: 1.6; color: var(--ink); quotes: "「" "」"; }
.g-why-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 12px; }
.g-hub-why { margin-top: 26px; padding: 16px 18px; border-left: 3px solid var(--page-color); max-width: 36rem; display: none; }
.g-hub-why.is-on { display: block; }
.g-hub-why small { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: .06em; }
.g-hub-why q { font-family: var(--font-mincho); font-size: 1.1rem; color: var(--ink); quotes: "「" "」"; }

/* Kana check */
.g-kana-big { font-family: var(--font-mincho); font-size: clamp(4rem, 12vw, 6rem); line-height: 1.1; text-align: center; color: var(--ink); margin: 6px 0; }
.g-kana-big.ok { color: var(--g-good); }
.g-kana-big.no { color: var(--g-bad); animation: g-shake .4s; }
@keyframes g-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.g-kana-in { display: flex; gap: 8px; justify-content: center; }
.g-kana-in input { width: 9em; text-align: center; font: 18px var(--font-gothic); padding: 8px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); }

/* Reading car */
.g-car-stage { position: relative; height: 120px; overflow: hidden; border-bottom: 2px solid var(--ink); margin: 6px 0 16px; }
.g-car { position: absolute; bottom: 4px; left: 4%; width: 120px; transition: left 2.4s cubic-bezier(.4,0,.2,1); }
.g-car.go { left: calc(100% - 130px); }
.g-car svg { width: 100%; height: auto; display: block; overflow: visible; }
.g-car .part { fill: var(--rule); stroke: var(--ink); stroke-width: 1.5; transition: fill .3s; }
.g-car .part.on { fill: var(--page-color); }
.g-car .wheel { transform-box: fill-box; transform-origin: center; }
.g-car.go .wheel { animation: g-spin .5s linear infinite; }
.g-car-road { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, var(--ink) 0 20px, transparent 20px 34px); }
.g-car-odo { position: absolute; right: 8px; top: 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-car-parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.g-car-parts button { text-align: left; display: grid; gap: 2px; padding: 12px; border: 1px solid var(--rule-strong); background: var(--paper); color: var(--ink); cursor: pointer; font: inherit; }
.g-car-parts button[aria-pressed="true"] { border-color: var(--page-color); background: var(--page-color-soft); }
.g-car-parts .k { font-family: var(--font-mincho); font-size: 1.3rem; }
.g-car-parts .d { font-size: 12.5px; color: var(--muted); }

/* Count-up ledger */
.g-ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); max-width: var(--g-wide); margin: 2em 0; }
.g-ledger div { background: var(--paper); padding: 16px; }
.g-ledger b { display: block; font-family: var(--font-mincho); font-size: clamp(1.6rem, 3.4vw, 2.3rem); color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.g-ledger span { font-size: 12.5px; color: var(--muted); line-height: 1.5; display: block; }

/* Picture it */
.g-pic-scene { height: 120px; display: grid; place-items: center; font-size: 3rem; letter-spacing: .3em; border: 1px dashed var(--rule-strong); margin: 10px 0; background: var(--paper); transition: filter .6s, opacity .6s; }
.g-pic-scene.hidden { filter: blur(12px); opacity: .25; }

/* Quick quiz (yes / no) */
.g-quiz-q { font-size: 1.05rem; color: var(--ink); line-height: 1.7; min-height: 3.4em; }
.g-quiz-count { font-size: 12px; color: var(--muted); }

/* Hub roadmap path */
.g-path { position: relative; max-width: var(--g-wide); }
.g-path svg { width: 100%; height: auto; display: block; }
.g-path .road { fill: none; stroke: var(--rule-strong); stroke-width: 2; stroke-dasharray: 6 7; }
.g-path .road-on { fill: none; stroke: var(--page-color); stroke-width: 3; stroke-linecap: round; }
.g-path .stop circle { fill: var(--paper); stroke: var(--ink); stroke-width: 1.5; }
.g-path .stop text { font-size: 12px; fill: var(--ink-soft); text-anchor: middle; font-family: var(--font-gothic); }
.g-path .stop .k { font-family: var(--font-mincho); font-size: 18px; fill: var(--ink); dominant-baseline: central; }

/* Small screens */
@media (max-width: 640px) {
  .g-widget { margin-left: calc(var(--gutter) * -0.4); margin-right: calc(var(--gutter) * -0.4); }
  .g-tier { grid-template-columns: 48px 1fr; }
  .g-tier-l { font-size: 1.05rem; }
  .g-msg { max-width: 92%; }
}

/* Bonus easter egg at the end of the roadmap */
.g-bonus { margin: 2.5em 0 0; border-top: 1px dashed var(--rule); padding-top: 16px; }
.g-bonus summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.g-bonus summary:hover { color: var(--ink); }
.g-bonus figure { margin: 16px 0 0; max-width: 420px; }
.g-bonus img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); background: #fff; }
.g-bonus figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* --- Listen: Jared reading the chapter, words lit as he says them ------ */
.g-listen { margin-top: 20px; }
.g-listen-btn { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; min-height: 44px; border: 1px solid var(--page-color); background: transparent; color: var(--page-ink); font: 500 14px var(--font-gothic); cursor: pointer; transition: background .15s, color .15s; }
.g-listen-btn:hover, .g-listen-btn.is-playing { background: var(--page-color); color: #fff; }
.g-listen-min { color: var(--muted); font-size: 13px; }
.g-listen-btn:hover .g-listen-min, .g-listen-btn.is-playing .g-listen-min { color: inherit; opacity: .85; }
.g-listen-ic { position: relative; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--page-color); }
.g-listen-ic::after { content: ""; position: absolute; left: 9px; top: 7px; border: 5px solid transparent; border-left: 8px solid #fff; border-right: 0; }
.g-listen-btn.is-playing .g-listen-ic, .g-listen-btn:hover .g-listen-ic { background: #fff; }
.g-listen-btn.is-playing .g-listen-ic::after, .g-listen-btn:hover .g-listen-ic::after { border-left-color: var(--page-color); }
.g-listen-btn.is-playing .g-listen-ic::after { left: 8px; top: 7px; width: 8px; height: 10px; border: 0; border-left: 3px solid var(--page-color); border-right: 3px solid var(--page-color); }

.g-lb { position: fixed; z-index: 170; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--rule-strong); box-shadow: var(--shadow-md); }
.g-lb[hidden] { display: none; }
.g-lb-in { max-width: 54rem; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.g-lb button { flex: none; min-width: 40px; min-height: 40px; padding: 0 8px; border: 1px solid var(--rule); background: transparent; color: var(--ink); font: 500 13px var(--font-gothic); cursor: pointer; }
.g-lb button:hover { border-color: var(--ink); }
.g-lb .g-lb-play { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--page-color); }
.g-lb .g-lb-play::after { content: ""; position: absolute; left: 17px; top: 14px; border: 8px solid transparent; border-left: 12px solid #fff; border-right: 0; }
.g-lb .g-lb-play.is-playing::after { left: 15px; top: 14px; width: 14px; height: 16px; border: 0; border-left: 4px solid #fff; border-right: 4px solid #fff; box-sizing: border-box; }
.g-lb-seek { flex: 1; min-width: 60px; accent-color: var(--page-color); }
.g-lb-time { flex: none; font: 500 12px var(--font-gothic); color: var(--muted); font-variant-numeric: tabular-nums; }
.g-lb .g-lb-follow { border-color: var(--page-color); color: var(--page-ink); }
.g-lb .g-lb-close { border: 0; font-size: 22px; line-height: 1; color: var(--muted); }
@media (max-width: 640px) {
  .g-lb-in { flex-wrap: wrap; gap: 8px; }
  .g-lb-seek { order: -1; flex-basis: 100%; }
  .g-lb-time { margin-right: auto; }
}
body.g-listening { padding-bottom: 120px; }
@media (max-width: 1099px) { body.g-listening .g-side-toggle { bottom: calc(120px + env(safe-area-inset-bottom)); } }

.g-w { border-radius: 2px; transition: background-color .12s, box-shadow .12s; }
.g-listening .g-has-words .g-w { cursor: pointer; }
.g-w.is-now { background: color-mix(in srgb, var(--page-color) 24%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--page-color) 24%, transparent); }
@media (prefers-reduced-motion: reduce) { .g-w { transition: none; } }
:root[data-theme="dark"] .g-w.is-now { background: color-mix(in srgb, var(--page-color) 45%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--page-color) 45%, transparent); }
