@import url('./trainers.css');
@import url('./trainer-word-results.css');

:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  color: #292d31;
  background: #f7f6f3;
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.6;
  --ink: #292d31;
  --muted: #70746f;
  --line: #e7e7e1;
  --surface: #ffffff;
  --soft: #f5f5f1;
  --brand: #d52b39;
  --focus: #547c99;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; padding: 28px 24px calc(142px + env(safe-area-inset-bottom, 0px)); min-height: 100vh; background: radial-gradient(ellipse at 88% 0%, #e9ece680, transparent 48%), #f7f6f3; }
body > header, main, .test-note { max-width: 880px; margin: auto; }
body > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 74px; margin-bottom: 34px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.brand { color: var(--brand); font-size: 29px; font-weight: 800; letter-spacing: -1.3px; line-height: 1; text-decoration: none; }
.login { color: var(--muted); font-size: 14px; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button, summary { cursor: pointer; }
button { touch-action: manipulation; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
h1 { margin: 8px 0 12px; font-size: 34px; font-weight: 680; line-height: 1.25; letter-spacing: -1.1px; }
h2 { margin: 0 0 14px; font-size: 19px; font-weight: 650; line-height: 1.45; letter-spacing: -.45px; }
h3 { margin: 0 0 6px; font-size: 18px; font-weight: 650; }
p { margin: 8px 0 18px; }
.intro, .muted, .crumb { color: var(--muted); }
.intro { margin: 0 0 28px; font-size: 16px; line-height: 1.7; }
.crumb { margin: 0 0 10px; font-size: 13px; }
.page-heading { margin: 0 0 28px; }
.page-heading h1 { margin-top: 7px; }
.page-heading .intro { margin-bottom: 0; }
.eyebrow { margin: 0; color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
/* Home introduction: a glass surface and a decorative study motif, without invented stats. */
.home-hero { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) 210px; align-items: center; gap: 24px; min-height: 246px; margin: 0 0 24px; padding: 32px 36px; overflow: hidden; border: 1px solid #ffffffd9; border-radius: 24px; background: radial-gradient(ellipse at 87% 38%, #dce5ed61, transparent 58%), linear-gradient(120deg, #ffffff80, #ffffff1f); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: inset 0 1px 0 #fff, 0 8px 32px #293f5210; }
.home-hero::before { position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #ffffff42, transparent 55%); pointer-events: none; content: ''; }
.home-hero-copy { position: relative; z-index: 1; min-width: 0; }
.home-hero-label { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #697780; font-size: 9px; font-weight: 650; letter-spacing: 1.6px; }
.home-hero-label > span { width: 5px; height: 5px; flex-shrink: 0; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px #d52b390a; }
.home-hero h1 { margin: 0 0 16px; font-size: clamp(30px, 3.4vw, 40px); font-weight: 650; line-height: 1.35; letter-spacing: -1.5px; text-wrap: initial; word-break: keep-all; }
.home-hero h1 > span { color: #566571; }
.home-hero-intro { margin: 0; color: #6d767d; font-size: 13px; line-height: 1.8; word-break: keep-all; }
.home-hero-art { position: relative; display: grid; place-items: center; width: 210px; height: 190px; pointer-events: none; }
.home-hero-orbit { position: absolute; width: 168px; height: 168px; border: 1px solid #7a8d9e21; border-radius: 50%; }
.home-hero-orbit::before { position: absolute; inset: 15px; border: 1px solid #ffffffa8; border-radius: 50%; content: ''; }
.home-hero-orbit::after { position: absolute; inset: -19px; border: 1px dashed #7a8d9e16; border-radius: 50%; content: ''; }
.home-hero-tile { position: relative; display: grid; justify-items: center; width: 106px; height: 126px; padding: 14px; transform: rotate(-9deg); border: 1px solid #ffffffe6; border-radius: 21px; background: linear-gradient(140deg, #ffffffb3, #e5edf14d); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); box-shadow: 9px 15px 25px #314a6021, inset 0 1px 0 #fff, inset 0 -1px 0 #ffffff80; }
.home-hero-stamp { justify-self: start; color: #8c9aa4; font-size: 8px; font-weight: 650; letter-spacing: 1.3px; }
.home-hero-kanji { color: #354b5a; font-family: 'Hiragino Mincho ProN', 'Yu Mincho', serif; font-size: 58px; line-height: 1.1; }
.home-hero-tile-line { width: 24px; height: 2px; margin-top: 5px; border-radius: 2px; background: #d52b398a; }
.home-hero-spark { position: absolute; top: 25px; right: 27px; width: 11px; height: 11px; border: 3px solid #f7f7f4; border-radius: 50%; background: #ce3c47; box-shadow: 0 2px 7px #9e293120; }
.home-hero-art-label { position: absolute; bottom: -6px; color: #8a98a1; font-size: 7px; font-weight: 550; letter-spacing: 1.8px; }
.test-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--muted); font-size: 11px; }
.test-note button, .text-button { padding: 0; border: 0; background: none; color: var(--muted); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.test-note[hidden] { display: none; }
.test-note button { flex-shrink: 0; min-height: 32px; }
.text-button:hover { color: var(--ink); }
.card { margin: 16px 0; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 4px 16px #262b2e03; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.bar-title { padding: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { padding: 0; }
legend.bar-title { margin-bottom: 14px; font-size: 16px; font-weight: 650; letter-spacing: -.25px; }

/* Saved level context and the two training choices share a quiet surface. */
.level-context { display: flex; align-items: center; gap: 14px; margin: 0 0 24px; padding: 17px 20px; border: 1px solid #e1e3dc; border-radius: 14px; background: #eeefe980; }
.current-level { display: grid; place-items: center; flex: 0 0 46px; min-height: 46px; border: 1px solid #dbcfd0; border-radius: 12px; background: #fffaf8; color: var(--brand); font-size: 19px; font-weight: 700; letter-spacing: -.5px; }
.level-context > div { flex: 1; min-width: 0; }
.level-context > div > strong { display: block; margin-bottom: 2px; font-size: 13px; font-weight: 650; }
.level-context p { margin: 0; color: #767e70; font-size: 12px; font-weight: 400; }
.level-context .text-button { flex-shrink: 0; min-height: 32px; display: flex; align-items: center; }
.level-context-status { color: var(--muted); font-size: 13px; }
.level-context a { color: #5d655c; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.level-context > a { margin-left: auto; white-space: nowrap; }
.training-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); margin: 16px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.training-grid .training-options { min-width: 0; margin: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.training-grid .training-options + .training-options { border-left: 1px solid var(--line); }
.step-number { margin-right: 7px; color: #929b8c; font-size: 11px; font-weight: 500; }
.training-start { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; gap: 12px 24px; padding: 24px 28px; }
.training-start > div > .muted { margin: 0 0 4px; }
.training-start h2 { margin: 0; font-size: 18px; }
.training-start > div > .hint { margin-top: 5px; text-align: left; }
.training-start .primary { margin: 0; }
.training-start > .quota, .training-start > .hint { grid-column: 1 / -1; margin: 4px 0 0; padding-top: 15px; border-top: 1px solid var(--line); }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.home-grid .card { display: flex; flex-direction: column; margin: 0; }
.home-grid .card .primary, .home-grid .card .secondary { margin-top: auto; }
.home-grid .card > .eyebrow { margin-bottom: 22px; }
.home-grid .card h2 { margin-bottom: 13px; font-size: 29px; font-weight: 600; line-height: 1.4; letter-spacing: -.9px; }
.home-grid .card > p:not(.eyebrow) { margin-bottom: 25px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.home-training { background: #fff; }
.home-words { background: #f0f2ec; }
.segments { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 7px; }
.segments.areas { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segment { position: relative; min-width: 0; }
.segment input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.segment span { display: block; padding: 13px 3px; border: 1px solid var(--line); border-radius: 10px; background: #fafaf7; font-size: 15px; font-weight: 550; text-align: center; transition: background .16s, border-color .16s; }
.segment input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.segment input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.segment input:disabled + span { opacity: .55; }
.training-options .segments.areas { grid-template-columns: 1fr; gap: 9px; }
.training-options .segments.areas span { padding: 13px 16px; text-align: left; }
.choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 51px; margin: 7px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 15px; font-weight: 500; cursor: pointer; transition: border-color .16s, background .16s; }
.choice input { order: 2; flex-shrink: 0; width: 18px; height: 18px; margin: 0 0 0 auto; accent-color: var(--ink); }
.choice:has(input:checked) { border-color: #838a81; background: #f0f2ed; box-shadow: inset 0 0 0 .5px #838a81; }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.choice:has(input:disabled) { opacity: .55; }
.group-label { margin: 20px 0 8px; color: var(--muted); font-size: 12px; font-weight: 550; }
details.types { margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--line); }
details.types summary { min-height: 42px; padding: 9px 0; border-radius: 6px; font-size: 14px; font-weight: 550; }
details.types summary .muted { font-size: 12px; }
.example-card { border-color: #e2e3dc; background: transparent; box-shadow: none; }
.example-card > summary { display: flex; align-items: center; gap: 10px; color: #545c55; font-size: 14px; font-weight: 550; list-style: none; }
.example-card > summary::-webkit-details-marker { display: none; }
.example-card > summary::before { width: 6px; height: 6px; border: solid #7a8472; border-width: 0 1px 1px 0; transform: rotate(-45deg); content: ''; }
.example-card[open] > summary::before { transform: rotate(45deg); }
.example-card > summary > .small { margin-left: auto; white-space: nowrap; }
.example-card[open] > summary { margin-bottom: 16px; }
.example-card > p { color: var(--muted); font-size: 13px; }
.example-card .primary, .example-card .secondary { width: auto; min-height: 44px; padding: 10px 16px; font-size: 14px; }

.primary, .secondary { display: block; width: 100%; min-height: 50px; padding: 13px 18px; border: 1px solid var(--ink); border-radius: 10px; font-size: 15px; font-weight: 600; line-height: 1.5; text-align: center; text-decoration: none; transition: background .16s, border-color .16s, box-shadow .16s; }
.primary { background: var(--ink); color: white; box-shadow: 0 3px 5px #20252a0a; }
.secondary { border-color: #d5d8d1; background: #fff; color: var(--ink); }
.primary:hover:not(:disabled) { border-color: #414941; background: #414941; }
.secondary:hover:not(:disabled) { border-color: #b8c0b4; background: #f5f6f1; }
.small { font-size: 12px; }
.center { text-align: center; }
.no-bottom { margin-bottom: 0; }
.hint { margin: 11px 0 0; color: var(--muted); font-size: 12px; text-align: center; line-height: 1.7; }
.hint a { color: #515f50; text-underline-offset: 3px; }
.quota { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 11px; }
.quota strong { color: var(--ink); font-weight: 600; }
.progress-row, .spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-row { margin: 26px 0 9px; color: var(--muted); font-size: 13px; }
.progress-row strong { color: var(--ink); font-weight: 600; }
progress { display: block; width: 100%; height: 5px; overflow: hidden; border: 0; border-radius: 20px; appearance: none; background: #e5e8df; }
progress::-webkit-progress-bar { background: #e5e8df; }
progress::-webkit-progress-value { border-radius: 20px; background: #697661; }
progress::-moz-progress-bar { background: #697661; }
.sentence { margin: 28px 0 4px; font-size: 27px; font-weight: 500; line-height: 1.9; overflow-wrap: anywhere; word-break: normal; }
.slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 4px 0 14px; }
.slot { height: 46px; border-bottom: 1px solid #7f897a; font-size: 27px; line-height: 1.2; text-align: center; }
.number { display: grid; place-items: center; flex-shrink: 0; width: 29px; height: 29px; border-radius: 7px; background: #f0f1eb; color: #73796e; font-size: 13px; font-weight: 500; }
.option-text { font-size: 19px; font-weight: 400; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.dots button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 12px; }
.dots button.answered { border-color: #dce2d4; background: #edf1e7; }
.dots button[aria-current] { border-color: var(--ink); background: var(--ink); color: #fff; }
.divider { margin: 24px 0; border: 0; border-top: 1px solid var(--line); }
.pill { padding: 4px 9px; border-radius: 6px; background: #f0f2eb; color: #636e5c; font-size: 12px; }
.checkpoint-title { font-size: 38px; line-height: 1.3; }
.checkpoint-total { font-size: 22px; font-weight: 650; }
.score-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.score { font-size: 52px; font-weight: 650; letter-spacing: -2px; white-space: nowrap; }
.score small { color: #8e9588; font-size: 26px; font-weight: 400; letter-spacing: -.5px; }
.stats { display: flex; gap: 24px; padding-left: 24px; border-left: 1px solid var(--line); text-align: center; }
.stats strong { display: block; font-size: 26px; font-weight: 600; }
.review-item { margin-top: 18px; padding: 21px 0 2px; border-top: 1px solid var(--line); }
.review-item p[lang=ja] { font-size: 22px; line-height: 1.75; }
.review-item .primary, .review-item .secondary { margin-top: 16px; }
.answer-info { color: var(--muted); font-size: 14px; }
.notice, .record-status { margin: 16px 0; padding: 14px 17px; border: 1px solid #dfe3d7; border-radius: 12px; background: #eef1e7; color: #5e6a54; font-size: 13px; line-height: 1.7; }
.notice .text-button { flex-shrink: 0; }
.record-status .text-button { margin-left: 10px; }
.success { color: #4b7155; }
.empty { padding: 36px 0; color: var(--muted); text-align: center; }
.result-actions { display: grid; gap: 10px; }
main:is([data-route=quiz], [data-route=checkpoint], [data-route=results], [data-route^="review:"]) { max-width: 760px; }

/* Translucent glass dock and the existing single moving lens. */
#message:empty { display: none; }
#message { position: fixed; z-index: 40; bottom: calc(112px + env(safe-area-inset-bottom, 0px)); left: 50%; width: min(680px, calc(100% - 32px)); margin: 0; padding: 14px 20px; transform: translateX(-50%); border-radius: 12px; background: var(--ink); box-shadow: 0 8px 30px #0002; color: white; font-size: 14px; text-align: center; }
#bottom-nav { position: fixed; z-index: 10; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; isolation: isolate; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); width: min(908.4px, calc(100% - 24px)); padding: 8px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.76); border-radius: 32px; background: linear-gradient(135deg,rgba(255,255,255,.24),rgba(246,249,252,.07) 55%,rgba(255,255,255,.16)); backdrop-filter: blur(12px) saturate(160%); -webkit-backdrop-filter: blur(12px) saturate(160%); box-shadow: 0 12px 40px #2434431c,0 2px 8px #2434430a,inset 0 1px 0 #ffffffed,inset 0 -1px 0 #ffffff70; }
#bottom-nav::before { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(115deg,#ffffff28,transparent 35%,transparent 70%,#ffffff18); pointer-events: none; content: ''; }
#bottom-nav .nav-lens { position: absolute; top: 0; left: 0; border: 1px solid #ffffff70; border-radius: 24px; background: linear-gradient(145deg,rgba(125,141,158,.20),rgba(102,120,141,.29)); box-shadow: inset 0 1px 1px #ffffff80,inset 0 -1px 1px #53677e12,0 3px 10px #1c293912; pointer-events: none; will-change: transform; }
#bottom-nav.glass-ready .nav-lens { transition: transform .38s cubic-bezier(.22,1,.36,1),width .38s cubic-bezier(.22,1,.36,1),height .2s ease; }
#bottom-nav a { position: relative; z-index: 1; display: grid; justify-items: center; gap: 3px; min-width: 0; padding: 8px 0 6px; border-radius: 24px; background: transparent; color: #202c39; font-size: 13px; font-weight: 650; line-height: 1.5; text-align: center; white-space: nowrap; text-decoration: none; text-shadow: 0 1px 2px #ffffffed,0 0 5px #ffffffb3; transition: color .18s ease; }
#bottom-nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#bottom-nav a.is-highlighted { color: #142333; font-weight: 750; }
#bottom-nav a:focus-visible { outline: 2px solid #427aad; outline-offset: 2px; }

/* The trainer icon and account pill share a 44px center line. */
.account-actions { position: relative; z-index: 30; display: flex; align-items: center; min-width: 0; gap: 8px; font-size: 13px; }
.account-actions [hidden] { display: none !important; }
.account-actions button { border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; }
.account-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.account-actions .account-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 17px; border: 1px solid #ffffffc9; border-radius: 999px; background: linear-gradient(140deg,#ffffff66,#e6edf326); backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); box-shadow: inset 0 1px 0 #ffffffe0,0 5px 18px #26384d12; color: #202c39; font-size: 14px; font-weight: 650; text-decoration: none; text-shadow: 0 1px 1px #ffffffb3; transition: background .2s ease,box-shadow .2s ease; }
.account-actions .account-pill:hover, .account-actions .account-pill[aria-expanded=true] { background: linear-gradient(140deg,#ffffff80,#dce5ee70); box-shadow: inset 0 1px 0 #fff,0 6px 20px #26384d1a; }
.account-pill svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.account-pill .account-chevron { width: 13px; height: 13px; }
.account-user-label { display: inline-flex; min-width: 0; max-width: 180px; white-space: nowrap; }
#account-toggle { min-width: 0; }
#account-toggle-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.account-pill .account-chevron { flex-shrink: 0; }
.account-popover { position: absolute; top: calc(100% + 29px); right: 0; width: min(292px, calc(100vw - 32px)); max-height: calc(100dvh - 130px); padding: 10px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid #ffffffdb; border-radius: 20px; background: linear-gradient(145deg,#fffffff2,#f1f3efeb); backdrop-filter: blur(22px) saturate(145%); -webkit-backdrop-filter: blur(22px) saturate(145%); box-shadow: 0 16px 44px #26384d24,inset 0 1px 0 #fff; color: #202c39; }
.account-identity { display: grid; gap: 4px; margin-bottom: 5px; padding: 12px 12px 16px; border-bottom: 1px solid #d9e1e980; }
.account-identity strong { font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
#account-email { color: #596b7b; font-size: 12px; overflow-wrap: anywhere; }
.account-popover a, .account-popover #sign-out { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 44px; padding: 11px 12px; border: 0; border-radius: 10px; background: none; color: #2c3c4d; font: inherit; font-weight: 550; text-align: left; text-decoration: none; }
.account-popover a:hover, .account-popover #sign-out:hover { background: #7e90a31c; }
.account-popover #sign-out { margin-top: 6px; color: #636d78; font-weight: 500; }
.account-trainer { position: relative; display: grid; place-items: center; align-content: center; flex: 0 0 64px; width: 64px; height: 44px; min-height: 44px; color: #526579; text-decoration: none; }
#account-trainer-icon { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ffffffc9; border-radius: 50%; background: linear-gradient(140deg,#ffffff66,#e6edf326); box-shadow: inset 0 1px 0 #fff,0 4px 16px #26384d12; font-size: 25px; }
#account-trainer-label { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); color: #405267; font-size: 11px; font-weight: 650; line-height: 1.3; white-space: nowrap; text-shadow: 0 1px 1px #fff; }
.account-avatar { display: grid; place-items: center; flex-shrink: 0; overflow: hidden; border: 1px solid #ffffffc9; border-radius: 50%; background: #dfe6ec70; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-avatar-small { width: 28px; height: 28px; margin-left: -5px; }
.account-avatar-large { width: 62px; height: 62px; }
.account-avatar-large svg { width: 29px; height: 29px; fill: none; stroke: #536575; stroke-width: 1.6; stroke-linecap: round; }
.avatar-fallback { display: grid; place-items: center; }
.account-photo-row { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.account-photo-actions { min-width: 0; }
.account-photo-picker { position: relative; display: grid; align-content: center; gap: 5px; min-height: 44px; color: #25384c; font-weight: 650; cursor: pointer; }
.account-photo-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.account-photo-picker:focus-within { outline: 2px solid #427aad; outline-offset: 3px; border-radius: 6px; }
.account-photo-hint { color: #647587; font-size: 10px; font-weight: 400; }
.account-photo-confirm { display: flex; gap: 10px; }
.account-photo-confirm button, .account-actions #account-appearance-retry { min-height: 38px; color: #315877; font-size: 12px; font-weight: 650; text-decoration: none; }
.account-actions #account-photo-save { color: #21496b; }
#account-photo-status, #account-nickname-status { margin: 0; color: #526579; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
#account-photo-status:empty, #account-nickname-status:empty { display: none; }
#account-trainer-name { margin-top: 4px; color: #526579; font-size: 12px; }
.account-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.account-name-row strong { min-width: 0; line-height: 1.5; }
.account-actions .account-nickname-edit { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 8px; border: 1px solid transparent; border-radius: 50%; color: #526579; text-decoration: none; }
.account-actions .account-nickname-edit:hover { border-color: #ffffffd9; background: #dfe7ee88; color: #203449; }
.account-nickname-edit svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-nickname-form { display: grid; gap: 7px; margin: 0 0 4px; }
.account-nickname-form > label { color: #34495e; font-size: 12px; font-weight: 650; }
.account-nickname-row { display: flex; align-items: center; gap: 8px; }
.account-nickname-row input { min-width: 0; width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #d4dfe7; border-radius: 10px; background: #ffffffa6; color: #203449; font: inherit; font-size: 16px; }
.account-actions #account-nickname-save { flex-shrink: 0; min-height: 42px; padding: 0 13px; border: 1px solid #ffffffd9; border-radius: 10px; background: #d7e3ec88; color: #21496b; font-size: 13px; font-weight: 650; text-decoration: none; }
#account-nickname-hint { color: #637586; font-size: 11px; }
.account-nickname-help { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.account-actions #account-nickname-cancel { min-height: 32px; padding: 3px 5px; color: #526579; font-size: 12px; text-decoration: none; }

dialog { width: calc(100% - 36px); max-width: 460px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 24px 80px #18221d24; }
dialog::backdrop { background: #202b2566; backdrop-filter: blur(4px); }
dialog label { display: grid; gap: 8px; margin: 18px 0; }
select { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
dialog button + button { margin-top: 12px; }
dialog .actions button + button { margin-top: 0; }
.login-form label { display: grid; gap: 8px; margin: 22px 0; color: #51584e; font-size: 13px; font-weight: 550; }
.login-form input { width: 100%; min-height: 50px; padding: 13px 14px; border: 1px solid #d9ddd3; border-radius: 10px; background: #fafbf8; color: var(--ink); font-size: 16px; }
.login-form input:focus { background: #fff; }
.auth-entry { max-width: 480px; padding-top: 18px; }
.auth-entry .page-heading { text-align: center; }
.auth-entry h1 { font-size: 30px; }
.auth-entry .card { padding: 28px 32px; }
.auth-entry .auth-back { display: block; margin-top: 22px; font-size: 13px; text-align: center; }
.login-form > label:first-child { margin-top: 0; }
.login-form + .secondary { margin-top: 12px; }
.skip { position: absolute; top: -60px; }
.skip:focus { z-index: 99; top: 0; background: white; }
main:focus { outline: 0; }

@media (hover: hover) {
  .segment input:not(:checked):not(:disabled):hover + span { border-color: #b7c0b0; background: #f2f4ed; }
  .choice:not(:has(input:checked)):not(:has(input:disabled)):hover { border-color: #b7c0b0; background: #fafbf7; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  #bottom-nav { background: rgba(245,248,251,.97); }
}
@media (min-width: 900px) {
  body { padding-top: 36px; }
  body > header { margin-bottom: 40px; }
  h1 { font-size: 38px; }
  .page-heading { margin-bottom: 30px; }
  .brand { font-size: 31px; }
}
@media (max-width: 640px) {
  body { padding-inline: 20px; }
  body > header { margin-bottom: 28px; }
  .card { padding: 23px; }
  .training-grid { grid-template-columns: 1fr; }
  .training-grid .training-options + .training-options { border-left: 0; border-top: 1px solid var(--line); }
  .training-options .segments.areas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .training-options .segments.areas span { padding: 13px 3px; text-align: center; }
  .home-grid { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: minmax(0, 1fr); min-height: 230px; padding: 30px 26px; }
  .home-hero-art { position: absolute; top: -55px; right: -55px; opacity: .28; transform: rotate(12deg); pointer-events: none; }
  .home-hero-art-label { display: none; }
  .home-hero h1 { font-size: 32px; }
  .home-hero-label { margin-bottom: 20px; font-size: 8px; letter-spacing: 1.4px; }
  .level-context { padding: 15px 17px; }
  .training-start { grid-template-columns: 1fr; gap: 18px; padding: 21px 23px; }
  .training-start > .quota, .training-start > .hint { margin: 0; padding-top: 13px; }
  .brand { font-size: 27px; }
}
@media (max-width: 420px) {
  body { padding: 20px 16px calc(124px + env(safe-area-inset-bottom, 0px)); }
  body > header { gap: 8px; min-height: 72px; padding-bottom: 28px; }
  .brand { font-size: 25px; }
  h1 { font-size: 30px; }
  .intro { font-size: 14px; }
  .page-heading { margin-bottom: 23px; }
  .home-hero { min-height: 226px; margin-bottom: 20px; padding: 28px 22px; border-radius: 20px; }
  .home-hero h1 { font-size: 29px; letter-spacing: -1px; }
  .home-hero-intro { max-width: 230px; font-size: 12px; }
  .card { padding: 20px; border-radius: 15px; }
  .training-grid { border-radius: 15px; }
  .training-grid .card { border-radius: 0; }
  .segment span { padding: 13px 2px; font-size: 14px; }
  .level-context { gap: 12px; padding: 14px; }
  .level-context p { font-size: 11px; }
  .level-context > a { font-size: 11px; }
  .auth-entry .card { padding: 24px; }
  .auth-entry h1 { font-size: 27px; }
  .current-level { flex-basis: 42px; min-height: 42px; font-size: 18px; }
  .choice { gap: 10px; padding: 12px; font-size: 14px; }
  .sentence { font-size: 24px; }
  .option-text { font-size: 18px; }
  .score { font-size: 42px; }
  .score small { font-size: 22px; }
  .stats { gap: 14px; padding-left: 18px; }
  .stats strong { font-size: 23px; }
  .checkpoint-title { font-size: 34px; }
  .quota { gap: 8px; font-size: 10px; }
  #bottom-nav { bottom: calc(10px + env(safe-area-inset-bottom, 0px)); border-radius: 28px; }
  #bottom-nav a { font-size: 12px; }
  .account-actions .account-pill { gap: 7px; padding: 0 13px; font-size: 13px; }
  .account-user-label { max-width: 90px; }
  dialog { padding: 22px; }
}
@media (max-width: 380px) {
  #bottom-nav { width: calc(100% - 8px); padding-inline: 4px; }
  body > header .brand { font-size: 23px; }
  .account-actions { gap: 5px; }
  .account-trainer { width: 60px; flex-basis: 60px; }
  .account-actions .account-pill { gap: 5px; padding: 0 10px; }
  .account-pill .account-chevron { display: none; }
}
@media (max-width: 360px) {
  body > header .brand { font-size: 21px; }
  .account-trainer { width: 52px; flex-basis: 52px; }
  .account-avatar-small { width: 24px; height: 24px; }
  .card { padding: 17px; }
  .quota { flex-wrap: wrap; }
  .score-row { gap: 9px; }
  .stats { gap: 10px; padding-left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

/* Word mistake review shares the existing review destination and button styles. */
#word-mistakes .gym-word-card { padding: 20px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
#word-mistakes .gym-word-card:last-child { padding-bottom: 0; }
#word-mistakes .answers { display: grid; gap: 10px; }
#word-mistakes .micro { color: var(--muted); font-size: 13px; }
#word-mistakes .gym-small-button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; cursor: pointer; }

.mistake-modes { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px;border:1px solid #ffffffb3;border-radius:22px;background:linear-gradient(135deg,#eef1f1,#f7f8f6);box-shadow:inset 0 1px 2px #ffffff; }
.mistake-modes button { min-height:54px;border:0;border-radius:17px;background:transparent;color:var(--muted);font:inherit;font-size:14px;font-weight:650;cursor:pointer; }
.mistake-modes button[aria-pressed=true] { background:linear-gradient(145deg,#e0e5e9,#ced7df);color:var(--ink);box-shadow:0 3px 10px #24344314,inset 0 1px 1px #fff; }
.mistake-modes span { margin-left:5px;font-size:12px; }
.mistake-modes button:focus-visible { outline:2px solid #427aad;outline-offset:2px; }
.mistake-body { padding-top:28px; }
.mistake-body h3 { margin:22px 0 32px;text-align:center;font-size:clamp(26px,5vw,42px);line-height:1.5;overflow-wrap:anywhere; }
.mistake-progress,.mistake-instruction { text-align:center;color:var(--muted);font-size:13px; }
#word-mistakes .answers { grid-template-columns:repeat(2,minmax(0,1fr)); }
#word-mistakes .answers button { min-height:66px;white-space:normal;overflow-wrap:anywhere; }
#word-mistakes .answers .is-correct { background:#edf5ee;border-color:#88b796;color:#295f38;opacity:1; }
#word-mistakes .answers .is-incorrect { background:#fbefec;border-color:#d6a092;color:#9c4433;opacity:1; }
.mistake-feedback { font-weight:650; }
.mistake-save { color:var(--muted);font-size:13px; }
.mistake-next { margin-top:16px; }
#problem-mistakes[hidden],.mistake-body[hidden] { display:none; }
@media(max-width:420px){#word-mistakes .answers{grid-template-columns:1fr}.mistake-modes button{font-size:12px}}

.mistake-sections { display:flex;gap:24px;margin-bottom:22px;border-bottom:1px solid var(--line); }
.mistake-sections button { padding:8px 2px 14px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-weight:650;cursor:pointer; }
.mistake-sections button[aria-pressed=true] { color:var(--ink);border-bottom-color:var(--ink); }
.mistake-modes[hidden] { display:none; }

/* Compact heading and shared selection cards, scoped to problem-training setup. */
.selection-heading { margin-bottom: 26px; }
.selection-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.selection-title-row h1 { margin: 4px 0; }
.selection-level-badge { display: inline-flex; align-items: center; border: 1px solid #e4e9e5; border-radius: 9px; background: #edf2ee; }
.selection-level-badge .current-level { display: block; flex: none; min-height: 0; padding: 3px 9px; border: 0; background: none; color: #52665a; font-size: 12px; line-height: 1.6; letter-spacing: 0; }
.selection-setup-link { display: inline-flex; align-items: center; min-height: 36px; margin-top: 8px; color: var(--muted); font-size: 12px; text-underline-offset: 4px; }
.training-grid { align-items: start; gap: 18px; margin: 0 0 18px; border: 0; border-radius: 0; background: none; }
.training-grid .training-options { padding: 26px; border: 1px solid #e9ecea; border-radius: 22px; background: #fff; box-shadow: 0 4px 18px #243b2a03; }
.training-grid .training-options + .training-options { border: 1px solid #e9ecea; }
.training-grid legend.bar-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 17px; font-weight: 700; }
.training-grid .step-number { display: inline-grid; place-items: center; width: 25px; height: 25px; margin: 0; border-radius: 8px; background: #f1f4f2; color: #68776f; font-size: 10px; font-weight: 650; letter-spacing: 0; }
.training-grid fieldset > .muted { margin: 0 0 22px; color: #68776f; font-size: 12px; line-height: 1.6; }
.training-area-list { display: grid; gap: 10px; }
.training-pick { position: relative; display: block; min-width: 0; margin: 8px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.training-area-list .training-pick { margin: 0; }
.training-pick > input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.training-pick-surface { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 14px 16px; border: 1px solid transparent; border-radius: 14px; overflow: hidden; background: #f5f6f7; color: #50595f; transition: background .18s, border-color .18s, transform .12s; }
.training-pick-surface > :not(.training-ripple) { position: relative; z-index: 1; }
.training-pick-label { font-size: 14px; font-weight: 550; line-height: 1.5; word-break: keep-all; }
.training-pick-icon { display: inline-grid; place-items: center; flex: 0 0 32px; height: 32px; color: #78857f; }
.training-pick-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.training-pick-check { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; margin-left: auto; border: 1.5px solid #d6dcda; border-radius: 50%; background: #fff; color: #fff; }
.training-pick-check svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.training-pick input:checked + .training-pick-surface { border-color: #d4e5d9; background: #eef5f0; color: #253b2f; }
.training-pick input:checked + .training-pick-surface .training-pick-label { font-weight: 650; }
.training-pick input:checked + .training-pick-surface .training-pick-icon { color: #50735d; }
.training-pick input:checked + .training-pick-surface .training-pick-check { border-color: #528363; background: #528363; }
.training-pick input:checked + .training-pick-surface .training-pick-check svg { visibility: visible; }
.training-pick:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 14px; }
.training-pick:has(input:disabled) { opacity: .5; cursor: default; }
.training-pick:has(input:enabled):active .training-pick-surface { transform: scale(.985); }
.training-ripple { position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; background: #729a82; transform: translate(-50%, -50%) scale(0); animation: training-pick-ripple .48s cubic-bezier(.2,.7,.2,1) both; }
@keyframes training-pick-ripple { from { transform: translate(-50%, -50%) scale(0); opacity: .23; } to { transform: translate(-50%, -50%) scale(1); opacity: 0; } }
.training-grid .group-label { margin: 22px 0 9px; padding-left: 3px; color: #64736a; font-size: 11px; font-weight: 650; }
.training-grid details.types { margin-top: 16px; padding-top: 8px; border-color: #edf0ed; }
.training-grid details.types summary { display: flex; align-items: center; min-height: 44px; gap: 8px; padding: 8px 3px; color: #58675e; list-style: none; }
.training-grid details.types summary::-webkit-details-marker { display: none; }
.training-grid details.types summary::after { content: ''; width: 6px; height: 6px; margin: 0 3px 3px auto; border: solid #8b9990; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.training-grid details.types[open] summary::after { transform: rotate(225deg); margin-bottom: -3px; }
.training-grid details.types summary .muted { color: #68776f; font-size: 11px; font-weight: 400; }
@media(hover:hover) and (pointer:fine) {
  .training-pick:has(input:enabled):hover .training-pick-surface { background: #ecefed; }
  .training-pick:has(input:checked):hover .training-pick-surface { background: #e5efe8; }
}
@media(max-width:640px) {
  .selection-heading { margin-bottom: 22px; }
  .training-grid { gap: 14px; }
  .training-grid .training-options { padding: 21px; border-radius: 20px; }
  .training-grid fieldset > .muted { margin-bottom: 17px; }
  .training-area-list { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .training-area-list .training-pick-surface { flex-direction: column; justify-content: center; gap: 8px; min-height: 104px; padding: 15px 3px 12px; }
  .training-area-list .training-pick-label { font-size: 12px; white-space: nowrap; }
  .training-area-list .training-pick-icon { flex-basis: 28px; height: 28px; }
  .training-area-list .training-pick-check { position: absolute; top: 7px; right: 7px; width: 15px; height: 15px; }
  .training-area-list .training-pick-check svg { width: 9px; height: 9px; }
}
@media(prefers-reduced-motion:reduce) {
  .training-pick-surface { transition: none; }
  .training-pick:has(input:enabled):active .training-pick-surface { transform: none; }
  .training-ripple { display: none; animation: none; }
}

/* Shared two-line brand mark: preserve its aspect ratio on every route. */
body > header .brand{display:inline-flex;flex:0 0 auto;align-items:center;line-height:0}
body > header .brand-mark{display:block;width:104px;height:auto;max-width:none;filter:none}
@media(max-width:640px){body > header .brand-mark{width:86px}}
@media(max-width:360px){body > header .brand-mark{width:76px}}

/* Sidebar navigation, shared across the existing learning routes. */
body.has-side-navigation { padding-bottom: 48px; }
body.side-menu-open { overflow: hidden; }
.site-side-menu { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 28px 20px; border: 0; border-right: 1px solid #eceef2; border-radius: 0; background: #fff; color: #242733; box-shadow: none; overflow-y: auto; overscroll-behavior: contain; }
.site-side-menu[open] { display: flex; flex-direction: column; }
.site-side-menu::backdrop { background: #1b22365c; backdrop-filter: none; }
.side-menu-heading { display: flex; align-items: center; justify-content: space-between; min-height: 44px; margin-bottom: 20px; padding-left: 12px; }
.side-menu-heading strong { font-size: 18px; font-weight: 700; }
.side-menu-close,.side-menu-toggle { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 44px; padding: 8px; border: 0; border-radius: 10px; background: transparent; color: #303440; }
.side-menu-close { font-size: 30px; font-weight: 400; }
.side-menu-toggle svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.side-menu-close:hover,.side-menu-toggle:hover { background: #f3f4f7; }
.side-menu-label { margin: 0 12px 14px; color: #818695; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.site-side-menu #bottom-nav { position: static; inset: auto; display: flex; flex-direction: column; width: 100%; margin: 0; padding: 0; transform: none; border: 0; border-radius: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; gap: 6px; }
.site-side-menu #bottom-nav::before { display: none; }
.site-side-menu #bottom-nav a { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 54px; padding: 14px 16px; border-radius: 12px; color: #555d6b; font-size: 14px; font-weight: 600; text-align: left; text-shadow: none; }
.site-side-menu #bottom-nav svg { width: 21px; height: 21px; stroke-width: 1.7; }
.site-side-menu #bottom-nav a:hover { background: #f6f7f9; color: #232936; }
.site-side-menu #bottom-nav a[aria-current=page] { color: #cc2939; background: #fff0f2; font-weight: 750; }
.site-side-menu #bottom-nav a[data-route=reviews] { margin-top: 18px; }
.side-menu-note { margin: auto 12px 0; padding-top: 48px; color: #999eaa; font-size: 9px; letter-spacing: 1.3px; }
body.has-side-navigation { padding-top: 136px; }
body.has-side-navigation > header { position: fixed; z-index: 40; top: 0; left: 0; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 16px; width: 100%; max-width: none; height: 104px; min-height: 0; margin: 0; padding: 10px 28px 16px; border-bottom: 1px solid var(--line); background: #fff; }
body.has-side-navigation > header .brand { display: inline-flex; grid-column: 2; grid-row: 1; justify-self: center; margin: 0; }
body.has-side-navigation > header .brand-mark { width: 100px; }
body.has-side-navigation > header .side-menu-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
body.has-side-navigation > header .account-actions { grid-column: 3; grid-row: 1; justify-self: end; max-width: 100%; }
@media(min-width:1100px) {
  body.has-side-navigation { padding-left: 280px; padding-right: 40px; }
  .site-side-menu { z-index: 15; top: 104px; width: 240px; height: calc(100dvh - 104px); }
  .side-menu-toggle,.side-menu-close { display: none; }
}
@media(max-width:640px) {
  body.has-side-navigation > header { gap: 8px; padding-inline: 16px; }
  body.has-side-navigation > header .brand-mark { width: 80px; }
  body.has-side-navigation .account-actions { gap: 6px; }
  body.has-side-navigation .account-trainer { flex-basis: 40px; width: 40px; }
  body.has-side-navigation #account-toggle { width: 40px; min-height: 44px; padding: 4px; }
  body.has-side-navigation #account-toggle .account-avatar { margin: 0; }
  body.has-side-navigation #account-toggle .account-chevron { display: none; }
  body.has-side-navigation #account-toggle .account-user-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media(max-width:359px) {
  body.has-side-navigation > header .brand-mark { width: 72px; }
  body.has-side-navigation .side-menu-toggle { width: 32px; padding: 4px; }
}
/* Home only: broad introduction banner, centered heading, service cards. */
body:has(#app[data-route=home]) { background: #fff; }
#app[data-route=home] { max-width: 1120px; }
#app[data-route=home] .home-hero { min-height: 340px; grid-template-columns: minmax(0,1fr) 240px; gap: 20px; padding: 44px 48px; margin: 0; border: 0; border-radius: 24px; background: #fcf0f1; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
#app[data-route=home] .home-hero::before { display: none; }
#app[data-route=home] .home-hero-label { display: block; margin-bottom: 16px; color: #8a6168; font-size: 13px; font-weight: 600; letter-spacing: 0; }
#app[data-route=home] .home-hero h1 { font-size: clamp(30px,3vw,44px); font-weight: 780; line-height: 1.35; letter-spacing: -1.5px; }
#app[data-route=home] .home-hero h1 > span { color: #cc2939; }
#app[data-route=home] .home-hero-intro { color: #79707a; font-size: 14px; line-height: 1.8; }
.home-hero-cta { display: inline-flex; gap: 24px; align-items: center; min-height: 46px; margin-top: 24px; padding: 11px 20px; border-radius: 10px; background: #d52b39; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.home-hero-cta:hover { background: #bd2231; }
#app[data-route=home] .home-hero-art { width: 240px; height: 248px; }
#app[data-route=home] .home-hero-orbit { width: 214px; height: 214px; border: 0; background: #f7dfe3; }
#app[data-route=home] .home-hero-orbit::before,#app[data-route=home] .home-hero-orbit::after { display: none; }
#app[data-route=home] .home-hero-tile { width: 126px; height: 154px; padding: 18px; border: 1px solid #fff; background: #fff; box-shadow: 8px 14px 24px #9543521c; backdrop-filter: none; -webkit-backdrop-filter: none; }
#app[data-route=home] .home-hero-kanji { color: #ca3443; font-size: 70px; }
#app[data-route=home] .home-hero-art-label { bottom: 0; color: #a26f78; }
#app[data-route=home] .home-hero-art.has-trainer .home-hero-tile { left: 8px; top: 42px; opacity: .5; }
.home-section-heading { margin: 64px 0 32px; text-align: center; }
.home-section-heading > p { margin: 0 0 10px; color: #8b8f9a; font-size: 14px; font-weight: 550; }
.home-section-heading h2 { margin: 0; font-size: 29px; font-weight: 750; line-height: 1.5; letter-spacing: -1px; }
.home-services > .level-context { margin: 0 0 20px; padding: 14px 18px; border-color: #eceef2; background: #fafafb; }
#app[data-route=home] .home-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 0; }
.home-service { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid transparent; border-radius: 20px; background: #f7f7fa; color: #2d313e; text-decoration: none; transition: border-color .18s,transform .18s; }
.home-service:hover { border-color: #d9dce4; transform: translateY(-3px); }
.home-service.home-training { background: #f8f3f4; }
.home-service.home-words { background: #f0f5fc; }
.home-service.home-review { background: #f4f1fa; }
.home-service-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 22px; border-radius: 14px; background: #fff; color: #cb3646; }
.home-words .home-service-icon { color: #4977bb; }
.home-review .home-service-icon { color: #8a65b6; }
.home-service-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.home-service .eyebrow { margin-bottom: 10px; color: #787582; font-size: 12px; letter-spacing: 0; }
.home-service h3 { margin: 0 0 14px; font-size: 23px; font-weight: 750; line-height: 1.45; letter-spacing: -.8px; }
.home-service > p:not(.eyebrow) { margin: 0 0 26px; color: #7b7d89; font-size: 12px; line-height: 1.8; word-break: keep-all; }
.home-service-link { display: flex; justify-content: space-between; margin-top: auto; font-size: 13px; font-weight: 650; }
.home-record-banner { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 40px; padding: 32px; border-radius: 20px; background: #f7f8fa; }
.home-record-banner p { margin: 0 0 8px; color: #858a97; font-size: 12px; }
.home-record-banner h2 { margin: 0 0 8px; font-size: 21px; }
.home-record-banner div > span { color: #7f8490; font-size: 13px; }
.home-record-banner a { display: flex; gap: 18px; flex-shrink: 0; align-items: center; min-height: 44px; color: #414958; font-size: 13px; font-weight: 650; text-decoration: none; }
@media(max-width:1280px) and (min-width:1100px) {
  #app[data-route=home] .home-hero { padding: 36px; grid-template-columns: minmax(0,1fr) 200px; }
  #app[data-route=home] .home-hero-art { width: 200px; }
  .home-service { padding: 22px; }
  .home-service h3 { font-size: 21px; }
}
@media(max-width:700px) {
  #app[data-route=home] .home-hero { grid-template-columns: minmax(0,1fr); min-height: 330px; padding: 30px 26px; }
  #app[data-route=home] .home-hero h1 { font-size: 31px; }
  #app[data-route=home] .home-hero-art { position: absolute; top: auto; right: -54px; bottom: -40px; width: 190px; height: 190px; opacity: .2; transform: rotate(10deg); }
  #app[data-route=home] .home-hero-art.has-trainer { right: -14px; bottom: 0; width: 110px; height: 146px; opacity: .6; transform: none; }
  #app[data-route=home] .home-hero-trainer { width: 110px; }
  #app[data-route=home] .home-grid { grid-template-columns: 1fr; gap: 14px; }
  .home-section-heading { margin: 44px 0 26px; }
  .home-section-heading h2 { font-size: 25px; }
  .home-section-heading > p { font-size: 12px; }
  .home-service { position: relative; padding: 26px; }
  .home-service-icon { position: absolute; top: 26px; right: 26px; }
  .home-service h3 { max-width: calc(100% - 60px); font-size: 23px; }
  .home-service > p:not(.eyebrow) { margin-bottom: 20px; }
  .home-record-banner { align-items: flex-start; flex-direction: column; gap: 12px; margin-top: 24px; padding: 26px; }
  .home-record-banner h2 { font-size: 19px; }
}
