/* The app's palette (Design.swift): paper, ink in four tones, akane red for the one mark. */
:root {
  --paper: #F4F2EE; --card: #FCFBF8; --ink: #1B1A17; --muted: #756F66; --red: #C03A2B;
  --cell: #E3E1DE; --cell-active: #D3D1CD;
  --reading: rgba(27,26,23,.66); --secondary: rgba(27,26,23,.56); --label: rgba(27,26,23,.42);
  --hairline: rgba(27,26,23,.12); --tile: rgba(27,26,23,.06); --prose: rgba(27,26,23,.82);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: 24px; --max: 1200px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141311; --card: #211F1C; --ink: #EDE9E0; --muted: #9A9182; --red: #E36A5F;
    --cell: #1E1B17; --cell-active: #2B2822;
    --reading: rgba(237,233,224,.66); --secondary: rgba(237,233,224,.56); --label: rgba(237,233,224,.46);
    --hairline: rgba(237,233,224,.12); --tile: rgba(237,233,224,.07); --prose: rgba(237,233,224,.82);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --paper: #141311; --card: #211F1C; --ink: #EDE9E0; --muted: #9A9182; --red: #E36A5F;
    --cell: #1E1B17; --cell-active: #2B2822;
    --reading: rgba(237,233,224,.66); --secondary: rgba(237,233,224,.56); --label: rgba(237,233,224,.46);
    --hairline: rgba(237,233,224,.12); --tile: rgba(237,233,224,.07); --prose: rgba(237,233,224,.82);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[lang="ja"] { font-family: var(--jp); }
a { color: inherit; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; }
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px;
  text-decoration: none; letter-spacing: -.01em; }
.brand .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.brand.small { font-size: 14px; }
.topbar-cta { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--secondary); }
.topbar-cta:hover { color: var(--ink); }

/* labels in the app's "place" style */
.place, .list-head h2, .count, .note-label, .pager-dir, .tag, .stage-head .count, .points .num {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--label); }
.place a { text-decoration: none; }
.place a:hover { color: var(--ink); }

/* buttons */
.button { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px;
  border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px;
  text-decoration: none; white-space: nowrap; }
.button.is-large { height: 54px; padding: 0 28px; font-size: 16px; }
.button.is-soon { background: var(--tile); color: var(--secondary); box-shadow: inset 0 0 0 1px var(--hairline); cursor: default; }
.text-link { font-weight: 500; color: var(--secondary); text-decoration: underline;
  text-decoration-color: var(--hairline); text-underline-offset: 4px; }
.text-link:hover { color: var(--ink); }

/* ---------------- home */
.hero { padding: 48px 0 40px; }
.hero-in { display: grid; gap: 40px; }
.hero h1 { font-size: clamp(40px, 7vw, 68px); line-height: 1.02; letter-spacing: -.035em; font-weight: 600;
  margin-top: 14px; max-width: 12ch; }
.hero .lead { font-size: 18px; line-height: 1.55; color: var(--secondary); margin-top: 20px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 30px; }

.hero-card { background: var(--card); border-radius: 26px; padding: 26px 24px 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 18px 50px -18px rgba(40,30,20,.18); max-width: 440px; width: 100%; justify-self: center; }
.hc-place { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); }
.hc-place span { font-size: 14px; letter-spacing: 0; margin-right: 6px; color: var(--secondary); }
.hc-jp { font-family: var(--jp); font-weight: 500; font-size: clamp(40px, 9vw, 54px); line-height: 1.15; margin-top: 46px; letter-spacing: -.01em; }
.hc-romaji { font-weight: 500; color: var(--reading); font-size: 17px; letter-spacing: .02em; margin-top: 8px; }
.hc-pad { margin-top: 40px; background: var(--cell); border-radius: 14px; padding: 18px 20px; }
.hc-meaning { font-size: 18px; }
.hc-note { font-size: 14px; line-height: 1.55; color: var(--prose); margin-top: 10px; }

.intro-points { padding: 8px 0 56px; }
.points { display: grid; gap: 26px; }
.points li { display: grid; align-content: start; grid-template-columns: 34px 1fr; column-gap: 6px; }
.points .num { grid-row: 1 / span 2; padding-top: 4px; }
.points h3 { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.points p { color: var(--secondary); font-size: 15px; line-height: 1.55; margin-top: 4px; }

.all-topics { padding: 40px 0 72px; border-top: 1px solid var(--hairline); }
.section-head h2 { font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -.03em; font-weight: 600; line-height: 1.1; }
.section-head p { color: var(--secondary); margin-top: 10px; }
.stage { margin-top: 44px; scroll-margin-top: 80px; }
.stage-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--hairline); padding-bottom: 10px; }
.stage-head h3 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }

/* topic tiles, as in the app's Topics tab */
.tiles { display: grid; gap: 0 32px; }
.tiles li { border-bottom: 1px solid var(--hairline); }
.tile { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 14px 0;
  text-decoration: none; }
.tile-glyph { width: 44px; height: 44px; border-radius: 10px; background: var(--tile); display: grid; place-items: center;
  font-size: 22px; font-weight: 500; }
.tile-text { min-width: 0; }
.tile-name { display: block; font-weight: 600; font-size: 16px; letter-spacing: -.01em; }
.tile-can { display: block; font-size: 13.5px; color: var(--secondary); line-height: 1.4; margin-top: 2px;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile-count { font-family: var(--mono); font-size: 12px; color: var(--label); }
.tile:hover .tile-glyph { background: var(--cell-active); }
.tile:hover .tile-name { text-decoration: underline; text-decoration-color: var(--hairline); text-underline-offset: 3px; }

/* ---------------- topic */
.topic { display: grid; gap: 36px; padding-top: 28px; padding-bottom: 64px; }
.topic-head { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.glyph { flex: none; width: 56px; height: 56px; border-radius: 12px; background: var(--tile); display: grid; place-items: center;
  font-size: 30px; font-weight: 500; }
.topic h1 { font-size: clamp(32px, 6vw, 48px); line-height: 1.05; letter-spacing: -.03em; font-weight: 600; }
.cando { font-size: 18px; line-height: 1.5; color: var(--secondary); margin-top: 18px; }
.scene { font-size: 16px; line-height: 1.65; color: var(--prose); margin-top: 18px; }
.scene [lang="ja"], .note [lang="ja"], .hc-note [lang="ja"] { font-size: 1.04em; }
a.jl { text-decoration: underline dotted; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, var(--ink) 55%, transparent); color: var(--ink); }
a.jl:hover { background: var(--tile); border-radius: 3px; }
.intro-cta { margin-top: 28px; background: var(--card); border-radius: 22px; padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 36px -16px rgba(40,30,20,.16); display: grid; gap: 14px; }
.intro-cta p { font-size: 15px; color: var(--secondary); line-height: 1.5; }
.intro-cta .button { justify-self: start; }

.list-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.list-head h2 { font-size: 11px; }

.items > li { padding: 20px 0 20px; border-bottom: 1px solid var(--hairline); scroll-margin-top: 80px; }
.items > li:target, .signs > li:target { background: linear-gradient(var(--tile), var(--tile)); }
.tag { display: inline-block; font-family: var(--sans); font-size: 10px; letter-spacing: .08em; padding: 3px 7px 2px;
  border-radius: 5px; background: var(--tile); color: var(--secondary); margin-bottom: 8px; }
.jp { font-family: var(--jp); font-weight: 500; font-size: 26px; line-height: 1.3; letter-spacing: .01em; }
.romaji { font-weight: 500; font-size: 15px; color: var(--reading); margin-top: 4px; letter-spacing: .01em; }
.kana { font-size: 13px; color: var(--label); margin-top: 2px; letter-spacing: .08em; }
.meaning { font-size: 17px; margin-top: 10px; }
.m1 { font-weight: 600; }
.m2 { color: var(--secondary); }
.m2-wrap { white-space: nowrap; }
.m2-wrap .m2 { white-space: normal; }
.sep { color: var(--label); }
.note { font-size: 14.5px; line-height: 1.6; color: var(--prose); margin-top: 8px; max-width: 40em; }
.note-label { font-size: 10px; margin-right: 4px; }
.filler { display: inline-block; border: 1px dashed color-mix(in srgb, var(--ink) 40%, transparent); border-radius: 6px;
  padding: 0 .25em; line-height: 1.2; margin: 0 .08em; }
.romaji .filler, .kana .filler { border-radius: 4px; }

/* signs: a grid of tiles, as the app's Signs sheet */
.signs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; padding-top: 16px; }
.sign { background: var(--cell); border-radius: 14px; padding: 18px 14px 16px; text-align: center; scroll-margin-top: 80px; }
.sign-jp { font-family: var(--jp); font-weight: 500; font-size: 26px; line-height: 1.25; }
.sign .kana { margin-top: 6px; }
.sign .romaji { font-size: 13px; }
.sign .meaning { font-size: 14px; margin-top: 4px; }
.sign .note { font-size: 12.5px; text-align: left; margin-top: 10px; color: var(--secondary); }
.sign .note-label { display: none; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
.pager-link { display: grid; gap: 6px; padding: 16px; border-radius: 14px; background: var(--tile); text-decoration: none; }
.pager-link.next { text-align: right; }
.pager-link:hover { background: var(--cell-active); }
.pager-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.pg { font-weight: 500; color: var(--secondary); margin-right: 7px; }
.pager-link.next .pg { margin-right: 7px; }

.more { padding: 8px 0 64px; }
.more h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; padding-bottom: 10px; border-bottom: 1px solid var(--hairline); }

/* the app band */
.band { border-top: 1px solid var(--hairline); padding: 56px 0 64px; scroll-margin-top: 60px; }
.band-in { display: grid; gap: 36px; }
.band-text h2:last-child { margin-bottom: 0; }
.band h2 { font-size: clamp(28px, 4.5vw, 40px); line-height: 1.1; letter-spacing: -.03em; font-weight: 600; margin-bottom: 28px; max-width: 16ch; }
.band-cta { display: grid; gap: 10px; justify-items: start; }
.fine { font-size: 13px; color: var(--label); }

.footer { border-top: 1px solid var(--hairline); padding: 22px 0 calc(28px + env(safe-area-inset-bottom)); }
.footer-in { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.footer-note { font-size: 13px; color: var(--label); }

/* ---------------- wider screens */
@media (min-width: 720px) {
  :root { --gutter: 40px; }
  .points { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .jp { font-size: 28px; }
}
@media (min-width: 1000px) {
  :root { --gutter: 56px; }
  .hero { padding: 72px 0 64px; }
  .hero-in { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 64px; }
  .tiles { grid-template-columns: 1fr 1fr 1fr; }
  .topic { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; padding-top: 48px; align-items: start; }
  .topic-intro { position: sticky; top: 92px; }
  .band-in { grid-template-columns: 1fr auto; align-items: end; gap: 64px; }
  .band-cta { justify-items: center; }
}
@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .pager { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; }
}

/* the card that opens over prose, as in the app: under the word, never over it, no dimming */
a.jl.is-open { background: var(--tile); border-radius: 3px; text-decoration-color: var(--ink); }
.pop { position: absolute; z-index: 20; background: var(--card); border-radius: 18px; padding: 18px 18px 14px;
  box-shadow: 0 0 0 1px var(--hairline), 0 2px 6px rgba(0,0,0,.06), 0 18px 44px -12px rgba(30,22,14,.28);
  animation: pop-in .14s ease-out; }
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pop .tag { margin-bottom: 6px; }
.pop-jp { font-family: var(--jp); font-weight: 500; font-size: 24px; line-height: 1.3; }
.pop .romaji { font-size: 14px; }
.pop .kana { font-size: 12px; }
.pop .meaning { font-size: 15px; margin-top: 8px; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px;
  padding-top: 10px; border-top: 1px solid var(--hairline); }
.pop-topic { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--label);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-topic [lang="ja"] { font-size: 13px; letter-spacing: 0; margin-right: 6px; color: var(--secondary); }
.pop-more { font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 6px 0 6px 8px; }
.pop-more:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 3px; }

/* footer links */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.footer-links a { color: var(--secondary); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------------- alphabets on the home page */
.alphabets { padding: 40px 0 56px; border-top: 1px solid var(--hairline); }
.atiles { display: grid; gap: 14px; margin-top: 24px; }
.atile { display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center; padding: 18px; border-radius: 18px;
  background: var(--card); text-decoration: none; box-shadow: 0 0 0 1px var(--hairline); }
.atile:hover { box-shadow: 0 0 0 1px var(--hairline), 0 12px 30px -16px rgba(30,22,14,.25); }
.atile-glyph { width: 72px; height: 72px; border-radius: 14px; background: var(--tile); display: grid; place-items: center;
  font-family: var(--jp); font-size: 40px; font-weight: 500; }
.atile-text { display: grid; gap: 4px; min-width: 0; }
.atile-name { font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.atile-name [lang="ja"] { font-weight: 500; font-size: 15px; color: var(--secondary); margin-left: 6px; }
.atile .tile-can { -webkit-line-clamp: unset; display: block; }
.atile-go { font-size: 14px; font-weight: 500; color: var(--secondary); margin-top: 4px; }

/* ---------------- alphabet pages */
.alpha { display: grid; gap: 32px; padding-top: 28px; padding-bottom: 24px; }
.alpha-practice { min-width: 0; }
.charts { padding-bottom: 64px; }
.chart-block { margin-top: 40px; }
.chart-head { border-bottom: 1px solid var(--hairline); padding-bottom: 10px; }
.chart-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.chart-head p { color: var(--secondary); font-size: 15px; margin-top: 4px; }
.chart { display: grid; gap: 8px; margin-top: 16px; max-width: 640px; }
.chart.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.chart.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 420px; }
.kcell { display: grid; justify-items: center; gap: 2px; padding: 12px 4px 10px; border: 0; border-radius: 12px;
  background: var(--cell); color: var(--ink); font: inherit; cursor: pointer; }
.kcell:hover, .kcell.is-open { background: var(--cell-active); }
.kcell.is-blank { background: transparent; cursor: default; }
.kc-kana { font-family: var(--jp); font-size: clamp(24px, 6vw, 32px); line-height: 1.2; font-weight: 500; }
.kcell.is-pair .kc-kana { font-size: clamp(20px, 5vw, 28px); }
.kc-romaji { font-size: 12px; color: var(--secondary); letter-spacing: .02em; }
.pop-extra { font-size: 13.5px; line-height: 1.6; color: var(--prose); margin-top: 6px; }
.pager.one { grid-template-columns: 1fr; max-width: 640px; margin-top: 40px; }

/* the practice card: the app's practice screen, in a frame of its own */
.kp { position: relative; display: grid; grid-template-rows: auto 1fr auto; height: 540px; max-width: 460px;
  margin: 0 auto; padding: 14px 14px 14px; border-radius: 30px; background: var(--paper);
  box-shadow: 0 0 0 1px var(--hairline), 0 24px 60px -24px rgba(30,22,14,.28); outline: none; overflow: hidden; }
.kp:focus-visible { box-shadow: 0 0 0 2px var(--ink), 0 24px 60px -24px rgba(30,22,14,.28); }
.kp-top { display: flex; justify-content: center; padding-top: 4px; }
.kp-chip { font-family: var(--jp); font-size: 13px; padding: 4px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline); color: var(--secondary); }
.kp-stage { position: relative; display: grid; align-content: center; justify-items: center; padding: 8px 10px; min-height: 0; }
.kp-label { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--label); min-height: 1.4em; }
.kp-hero { font-family: var(--jp); font-weight: 500; font-size: 132px; line-height: 1.15; margin-top: 4px; }
.kp-hero.is-pair { font-size: 104px; }
.kp-rest, .kp-nudge { display: none; text-align: center; max-width: 34ch; }
.kp-rest-glyph { font-family: var(--jp); font-size: 96px; line-height: 1.1; font-weight: 500; color: var(--label); }
.kp-rest-text { font-size: 15px; line-height: 1.55; color: var(--secondary); margin-top: 14px; }
.kp-nudge-text { font-size: 17px; line-height: 1.5; }
.kp-nudge-actions { display: grid; justify-items: center; gap: 14px; margin-top: 22px; }
.kp-keep { background: none; border: 0; font: inherit; cursor: pointer; padding: 6px; }

.kp-pad { position: relative; height: 128px; border-radius: 26px; background: var(--card); overflow: hidden; touch-action: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 10px 30px -14px rgba(30,22,14,.25); user-select: none; -webkit-user-select: none; }
.kp-pad.is-down, .kp.is-miss .kp-pad { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.kp.is-miss .kp-pad { background: color-mix(in srgb, var(--card) 86%, var(--red)); }
.kp-answer { position: absolute; inset: 0; display: grid; align-content: center; gap: 4px; padding: 0 64px 0 24px; }
.kp-romaji { font-size: 30px; font-weight: 600; letter-spacing: -.01em; line-height: 1.1; }
.kp-as { font-size: 13.5px; color: var(--secondary); line-height: 1.5; }
.kp-mask { position: absolute; inset: 0; background: var(--card); border-left: 2.5px solid var(--red); display: flex; align-items: center;
  padding-left: 16px; cursor: grab; will-change: transform; }
.kp-pad.is-down .kp-mask { background: color-mix(in srgb, var(--card) 92%, var(--ink)); cursor: grabbing; }
.kp-mask.is-back { transition: transform .2s ease-out; }
.kp-hint { font-size: 13px; color: var(--secondary); padding: 5px 10px; border-radius: 999px; background: var(--tile); }
.kp-o, .kp-x, .kp-next { position: absolute; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; display: none;
  place-items: center; font: 500 26px/1 var(--sans); cursor: pointer; color: var(--ink); background: var(--tile); }
.kp-o { top: 12px; }
.kp-x { bottom: 12px; }
.kp-next { top: 50%; margin-top: -22px; background: var(--ink); color: var(--paper); font-size: 22px; }
.kp-o:hover, .kp-x:hover { background: var(--cell-active); }
.kp-restbar { position: absolute; inset: 0; display: none; align-items: center; justify-content: space-between; padding: 0 18px 0 24px; }
.kp-restname { display: grid; gap: 2px; font-family: var(--jp); font-size: 20px; font-weight: 500; }
.kp-note { font-size: 13px; color: var(--label); text-align: center; margin: 12px auto 0; max-width: 40ch; line-height: 1.5; }
.kp-note a { color: var(--secondary); }

/* what each moment shows */
.kp[data-mode="rest"] .kp-label, .kp[data-mode="rest"] .kp-hero, .kp[data-mode="rest"] .kp-answer, .kp[data-mode="rest"] .kp-mask { display: none; }
.kp[data-mode="rest"] .kp-rest { display: block; }
.kp[data-mode="rest"] .kp-restbar { display: flex; }
.kp[data-mode="new"] .kp-next { display: grid; }
.kp[data-mode="new"] .kp-mask { display: none; }
.kp[data-mode="revealed"] .kp-o, .kp[data-mode="revealed"] .kp-x { display: grid; }
.kp[data-mode="revealed"] .kp-mask { display: none; }
.kp[data-mode="nudge"] .kp-label, .kp[data-mode="nudge"] .kp-hero, .kp[data-mode="nudge"] .kp-pad { display: none; }
.kp[data-mode="nudge"] { grid-template-rows: auto 1fr; }
.kp[data-mode="nudge"] .kp-nudge { display: block; }

@media (min-width: 720px) {
  .atiles { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .alpha { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; padding-top: 48px; align-items: start; }
  .charts { display: block; }
}
@media (max-width: 380px) {
  .kp { height: 500px; }
  .kp-hero { font-size: 112px; }
}

.atile .tile-can [lang="ja"] { white-space: nowrap; }

/* ---------------- dialogues: in the app only (home block, and the list under a topic's words) */
.dialogues { padding: 48px 0 64px; border-top: 1px solid var(--hairline); scroll-margin-top: 60px; }
.dialogues-in { display: grid; gap: 36px; }
.dialogues h2 { font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -.03em; font-weight: 600; line-height: 1.1; margin-top: 10px; }
.dialogues-lead { color: var(--secondary); font-size: 16px; line-height: 1.55; margin-top: 14px; max-width: 34em; }
.dialogues-cta { margin-top: 24px; }
.dsample { margin: 0; background: var(--paper); border-radius: 26px; padding: 22px 18px 24px;
  box-shadow: 0 0 0 1px var(--hairline), 0 24px 60px -32px rgba(30,22,14,.35); max-width: 440px; }
.dsample-head { display: flex; align-items: center; gap: 12px; }
.dsample-head .glyph { width: 40px; height: 40px; border-radius: 10px; font-size: 20px; }
.dsample-name { font-weight: 600; font-size: 19px; letter-spacing: -.01em; margin-top: 2px; }
.dsample-about { color: var(--secondary); font-size: 14px; line-height: 1.5; margin: 12px 0 16px; }
.dlines { list-style: none; display: grid; gap: 10px; }
.dl { padding: 10px 14px 12px; border-radius: 5px 18px 18px 18px; background: var(--tile); margin-right: 36px; justify-self: start; }
.dl.is-you { border-radius: 18px 5px 18px 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--hairline);
  margin-right: 0; margin-left: 36px; justify-self: end; }
.dl.is-asking { background: none; box-shadow: none; outline: 1.2px dashed color-mix(in srgb, var(--ink) 40%, transparent); outline-offset: -1.2px; }
.dl-who { display: block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--label); margin-bottom: 4px; }
.dl-jp { font-family: var(--jp); font-size: 17px; line-height: 1.5; }
.dl-en { font-size: 15px; font-weight: 500; line-height: 1.45; }

.tdialogues { margin-top: 40px; border-radius: 22px; border: 1px solid var(--hairline); padding: 22px 0 22px 20px;
  display: grid; gap: 18px; overflow: hidden; }
.td-text { padding-right: 20px; }
.td-lead { font-size: 15px; line-height: 1.5; margin-top: 8px; }
.td-find { font-size: 14px; color: var(--secondary); line-height: 1.5; margin-top: 8px; }
.td-shelf { position: relative; overflow: hidden; pointer-events: none; user-select: none; }
.td-shelf::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 36px;
  background: linear-gradient(to right, transparent, var(--paper)); }
.dcards { list-style: none; display: flex; gap: 12px; width: max-content; padding-right: 36px; }
.dcard { width: 200px; min-height: 128px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px;
  background: var(--card); border-radius: 6px 20px 20px 20px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 7%, transparent); }
.dcard-topic { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 50%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dcard-name { font-weight: 600; font-size: 17px; letter-spacing: -.01em; line-height: 1.25; }
.dcard-about { font-size: 13px; line-height: 1.4; color: color-mix(in srgb, var(--ink) 62%, transparent);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 720px) {
  .tdialogues { grid-template-columns: minmax(170px, 1fr) minmax(0, 1.5fr); align-items: center; gap: 20px; padding: 24px 0 24px 24px; }
}
@media (min-width: 1000px) {
  .dialogues-in { grid-template-columns: 1fr minmax(0, 440px); gap: 72px; align-items: center; }
}
