:root {
  --sky: #0865f5;
  --panel: #0a1028;
  --card: #111b3b;
  --ink: #f5f6ff;
  --muted: #a2b4d9;
  --lime: #cefa09;
  --cyan: #35c5ff;
  --pink: #f36cc8;
  --purple: #9d62ec;
  --line: #35467c;
  --pixel-cut: polygon(0 12px,6px 12px,6px 6px,12px 6px,12px 0,calc(100% - 12px) 0,calc(100% - 12px) 6px,calc(100% - 6px) 6px,calc(100% - 6px) 12px,100% 12px,100% calc(100% - 12px),calc(100% - 6px) calc(100% - 12px),calc(100% - 6px) calc(100% - 6px),calc(100% - 12px) calc(100% - 6px),calc(100% - 12px) 100%,12px 100%,12px calc(100% - 6px),6px calc(100% - 6px),6px calc(100% - 12px),0 calc(100% - 12px));
  color-scheme: dark;
  font-family: -apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  color: var(--ink);
  background: var(--sky);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button,input,select,textarea { font: inherit; color: inherit; border-radius: 0; }
button,a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button,a { -webkit-user-select: none; user-select: none; }
a { color: inherit; }
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible { outline: 3px solid var(--lime); outline-offset: 4px; }
[hidden] { display: none !important; }
h1,h2,h3,p { overflow-wrap: anywhere; }
h1,h2,h3 { color: var(--ink); }
.mono { font-family: "Courier New",ui-monospace,monospace; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.arcade-landscape { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; image-rendering: pixelated; pointer-events: none; }
.page-shell { position: relative; z-index: 1; max-width: 920px; padding: 0 28px; margin: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; border-bottom: 1px solid #b7e8ff55; }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; font-weight: 800; font-size: 17px; text-shadow: 1px 2px #183f99; }
.brand img { image-rendering: pixelated; flex-shrink: 0; }
.brand small { border-left: 1px solid #a8d9ff80; padding-left: 12px; margin-left: 2px; font-size: 9px; letter-spacing: 1.2px; color: #d9f3ff; white-space: nowrap; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; padding: 0; color: var(--lime); border: 2px solid var(--purple); background: var(--panel); box-shadow: 2px 2px 0 #141b4e; font: 700 21px "Courier New",monospace; }
.icon-button::after { content: ""; position: absolute; inset: -5px; }
.connection-bar { display: flex; align-items: center; gap: 7px; min-height: 34px; color: #e7f6ff; font-size: 11px; text-shadow: 0 1px 1px #164ca5; }
.connection-bar.failed { background: #3e153e; padding: 9px; margin-top: 8px; border: 1px solid var(--pink); text-shadow: none; }
.status-dot { width: 5px; height: 5px; flex-shrink: 0; background: #c9e8fa; box-shadow: 0 0 0 2px #1543a8; }
.connected .status-dot { background: var(--lime); }
.failed .status-dot { background: var(--pink); }
.connection-bar button { margin-left: auto; }
.text-button { background: transparent; color: var(--lime); border: 0; min-height: 36px; padding: 5px; font-size: 11px; white-space: nowrap; }
.preview-banner { padding: 10px 12px; margin-top: 10px; border: 1px solid #849bff; background: #101c46; color: #e2e8ff; font-size: 11px; line-height: 1.7; }
.view-panel { animation: appear .2s ease; }
.greeting { position: relative; padding: 6px 0 30px; text-align: center; }
.hero-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #e0f3ff; font-size: 10px; }
.hero-meta .mono { color: var(--lime); font-size: 9px; font-weight: bold; text-shadow: 1px 1px #245aad; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 10px; font-weight: bold; letter-spacing: 1.5px; color: var(--cyan); }
.greeting .eyebrow { justify-content: center; color: #e2f4ff; margin: 24px 0 9px; font-size: 9px; letter-spacing: 1.8px; text-shadow: 1px 1px #174da4; }
.pixel-spark { display: inline-block; width: 4px; height: 4px; flex-shrink: 0; margin: 4px; background: var(--pink); box-shadow: 0 -4px var(--pink),0 4px var(--pink),-4px 0 var(--pink),4px 0 var(--pink); }
h1 { margin: 0; font-size: 38px; line-height: 1.35; letter-spacing: -1px; font-weight: 900; }
h1 span { color: var(--lime); }
.greeting h1 { display: flex; flex-direction: column; align-items: center; transform: skew(-7deg); }
.title-top { color: #fff; font-size: 62px; line-height: 1.12; letter-spacing: 3px; -webkit-text-stroke: 1px #0e1c45; text-shadow: 2px 0 #0e1c45,-2px 0 #0e1c45,0 -2px #0e1c45,0 3px #0e1c45,3px 5px #0e1c45,5px 7px #8b4ae4; }
.title-bottom { margin-top: 4px; color: var(--lime); font-size: 34px; line-height: 1.28; letter-spacing: 5px; text-shadow: 2px 0 #10234b,-2px 0 #10234b,0 -2px #10234b,0 3px #10234b,3px 5px #10234b; }
.intro-copy { font-size: 12px; line-height: 1.8; color: #e0f1ff; margin: 12px 0 0; }
.greeting .intro-copy { margin-top: 13px; text-shadow: 1px 1px #1959a5; }
.hero-decoration { position: absolute; color: var(--pink); font: 700 34px "Courier New",monospace; text-shadow: 2px 2px #3444a5; }
.decor-left { left: 15%; top: 82px; transform: rotate(-12deg); }
.decor-right { right: 12%; top: 133px; color: var(--lime); transform: rotate(10deg); }
.pixel-box { --frame: var(--purple); position: relative; isolation: isolate; padding: 24px; filter: drop-shadow(0 5px 0 #221447); }
.pixel-box::before,.pixel-box::after { content: ""; position: absolute; clip-path: var(--pixel-cut); pointer-events: none; }
.pixel-box::before { z-index: -2; inset: 0; background: var(--frame); }
.pixel-box::after { z-index: -1; inset: 5px; background: var(--panel); border: 1px solid #35bdfb; }
.dashboard-grid { display: grid; grid-template-columns: .85fr 1.3fr; align-items: center; gap: 32px; padding: 28px; }
.world-card { min-width: 0; text-align: center; }
.world-scene { position: relative; width: 172px; margin: 0 auto 16px; }
.world-scene img { display: block; width: 160px; height: 160px; margin: auto; image-rendering: pixelated; }
.level-badge { display: inline-block; background: var(--lime); color: #0a1028; padding: 5px 8px; border: 2px solid #090f29; box-shadow: 3px 3px var(--purple); font-size: 12px; font-weight: bold; }
.world-scene .level-badge { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.player-progress { min-width: 0; }
.xp-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.xp-label>span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.xp-label b { color: var(--lime); }
.meter { height: 12px; padding: 2px; border: 1px solid #66749a; background: #050b20; margin-top: 11px; }
.meter>span { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg,var(--lime) 0 8px,#6a862b 8px 10px); transition: width .25s; }
.player-progress p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 9px 0 0; }
.daily-board { min-width: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 21px; letter-spacing: 2px; }
.section-heading .eyebrow { font-size: 8px; margin-bottom: 5px; letter-spacing: 1.2px; }
.count-badge { border: 1px solid #5c5bb0; padding: 7px 8px; font-size: 11px; color: var(--lime); background: #192044; white-space: nowrap; }
.daily-meter { height: 3px; background: #253155; margin-bottom: 14px; }
.daily-meter>span { display: block; width: 0; height: 100%; background: var(--cyan); transition: width .25s; }
.quest-card { width: 100%; color: var(--ink); text-align: left; border: 1px solid #454b9c; background: #101b3a; box-shadow: 3px 3px 0 #211846; transition: background .15s,transform .15s,border-color .15s; }
.quest-card:not(:disabled):hover { background: #192b52; border-color: var(--cyan); transform: translateY(-2px); }
.speed-quest { display: flex; align-items: center; gap: 15px; padding: 15px; border-left: 3px solid var(--cyan); }
.quest-icon { position: relative; display: block; flex-shrink: 0; width: 31px; height: 35px; }
.calculator-icon { background: #163c63; border: 2px solid var(--cyan); box-shadow: 3px 3px #062143; }
.calculator-icon::before { content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 8px; background: var(--cyan); }
.calculator-icon i { position: absolute; left: 4px; top: 17px; width: 4px; height: 4px; background: var(--cyan); box-shadow: 8px 0 var(--cyan),16px 0 var(--cyan),0 7px var(--cyan),8px 7px var(--cyan),16px 7px var(--cyan); }
.quest-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.quest-copy small,.mini-quest>small { font-size: 8px; color: var(--cyan); letter-spacing: .6px; }
.quest-copy strong { font-size: 16px; }
.quest-copy>span { font-size: 10px; color: #b1c2e6; line-height: 1.5; }
.quest-end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--cyan); }
.quest-end b { font: 11px "Courier New",monospace; }
.quest-end>span { font-size: 20px; }
.quest-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.mini-quest { position: relative; padding: 12px; display: flex; flex-direction: column; gap: 5px; border-top: 2px solid #a57cff; }
.word-quest { border-top-color: var(--pink); }
.mini-quest-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; gap: 6px; }
.mini-quest-top>.mono { font-size: 10px; color: #c2b8f3; }
.mini-quest strong { font-size: 15px; }
.mini-quest>span:last-child { font-size: 10px; color: #a9b8da; line-height: 1.6; }
.book-icon { width: 27px; height: 22px; margin: 2px 0; border: 2px solid #b591ff; background: linear-gradient(90deg,#593b8d 0 46%,#b591ff 46% 54%,#342856 54%); box-shadow: 2px 2px #201b3c; }
.book-icon::after { content: ""; position: absolute; width: 5px; height: 1px; top: 5px; left: 3px; background: #dac3ff; box-shadow: 0 4px #dac3ff,12px 0 #dac3ff,12px 4px #dac3ff; }
.word-icon { display: grid; place-items: center; width: 26px; height: 26px; color: var(--pink); border: 2px solid var(--pink); background: #3f2046; font-size: 15px; font-weight: bold; box-shadow: 2px 2px #231535; }
.word-quest>small { color: var(--pink); }
.primary-button,.secondary-button,.small-button,.checkin-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 11px 15px; color: #0a1129; background: var(--lime); border: 2px solid #0b1130; box-shadow: 3px 3px 0 #7862ba; font-size: 15px; font-weight: 800; text-decoration: none; line-height: 1.5; transition: transform .12s,background .12s; }
.primary-button { width: 100%; }
.primary-button:not(:disabled):hover { background: #e3ff61; }
.primary-button:not(:disabled):active,.secondary-button:not(:disabled):active,.small-button:not(:disabled):active,.checkin-button:not(:disabled):active { transform: translate(2px,2px); box-shadow: 1px 1px 0 #7862ba; }
.primary-button>span:last-child { margin-left: auto; }
.primary-button>span:first-child { font-size: 12px; }
.daily-board>.primary-button { margin-top: 18px; }
.board-note { text-align: center; margin: 12px 0 0; color: #a7b5d6; font-size: 10px; line-height: 1.7; }
.board-note b { font-family: "Courier New",monospace; color: var(--lime); }
.checkin-card { --frame: #c268e4; margin-top: 23px; padding: 19px 23px; }
.checkin-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.checkin-flag { display: flex; align-items: center; gap: 7px; color: var(--pink); font-size: 9px; font-weight: bold; letter-spacing: 1.4px; }
.checkin-flag .pixel-spark { transform: scale(.7); margin: 2px; }
.ready-label { display: flex; align-items: center; gap: 5px; color: #b6cc9e; font-size: 10px; }
.ready-label i { width: 4px; height: 4px; background: var(--lime); }
.ready-label.has-error { color: #ffb0cf; }
.checkin-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
.checkin-row h2 { font-size: 19px; margin: 0 0 6px; letter-spacing: 1px; }
.checkin-row p { font-size: 11px; margin: 0; color: var(--muted); line-height: 1.6; }
.checkin-button { min-width: 100px; min-height: 44px; padding: 8px 13px; background: var(--cyan); font-size: 14px; white-space: nowrap; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.checkin-button:not(:disabled):hover { background: #80dfff; }
.is-disabled { cursor: wait; }
.checkin-footer { margin-top: 13px; padding-top: 8px; border-top: 1px dashed #354269; }
.checkin-footer p { margin: 0; color: #9aaccf; font-size: 10px; line-height: 1.6; }
.return-note { display: flex; gap: 10px; align-items: flex-start; background: #1a2a4b; border-left: 2px solid var(--cyan); padding: 10px; margin-top: 12px; }
.return-note p { flex: 1; margin: 0; font-size: 12px; line-height: 1.8; }
.return-note button { border: 0; background: transparent; font-size: 23px; min-width: 32px; min-height: 32px; }
.error-note { color: #ffacc8; font-size: 12px; line-height: 1.8; }
.practice-card { padding: 24px; margin-top: 23px; }
.practice-card .eyebrow { color: var(--lime); font-size: 9px; }
.practice-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.practice-heading h2 { margin: 0; font-size: 22px; }
.subtle-note { font-size: 12px; line-height: 1.9; color: #b3c1df; }
.practice-card .subtle-note { margin: 12px 0 0; }
.practice-actions { display: flex; gap: 14px; margin-top: 17px; }
.practice-actions select { min-width: 130px; width: 38%; border: 1px solid #6279a8; background: #142344; padding: 9px; font-size: 16px; }
.practice-actions button { min-width: 0; flex: 1; font-size: 14px; }
.travel-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; background: #111a35; border: 2px solid #6799c3; padding: 19px; box-shadow: 4px 4px 0 #264275; }
.travel-strip>div { position: relative; padding-left: 25px; }
.strip-spark { position: absolute; left: 2px; top: 5px; }
.travel-strip strong { font-size: 15px; }
.travel-strip p { font-size: 11px; line-height: 1.7; margin: 7px 0 0; color: var(--muted); }
.travel-strip b { color: var(--pink); }
.small-button { min-height: 40px; background: #1a294c; border: 1px solid #6886be; box-shadow: 2px 2px 0 #253057; color: var(--cyan); font-size: 12px; padding: 8px 11px; white-space: nowrap; }
.secondary-button { width: 100%; background: #17264c; border: 1px solid #7791bd; color: #e0eaff; box-shadow: 3px 3px 0 #392a64; }
.mini-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; padding: 22px 9px; margin-top: 23px; background: #0b1530; border: 1px solid #7272c1; box-shadow: 4px 4px #3e356e; }
.mini-stats>div { display: flex; flex-direction: column; align-items: center; gap: 7px; border-right: 1px dashed #4b557b; }
.mini-stats>div:last-child { border-right: 0; }
.mini-stats strong { font: 700 25px "Courier New",monospace; color: var(--lime); }
.mini-stats span { font-size: 10px; color: var(--muted); text-align: center; }
.site-footer { display: flex; justify-content: space-between; gap: 15px; padding: 28px 0 120px; font-size: 10px; color: #f5ffe1; text-shadow: 1px 1px #235523; }
.site-footer>.mono { font-size: 9px; letter-spacing: .6px; }
.bottom-nav { position: fixed; z-index: 8; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%,620px); display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: #080f26; border: 2px solid var(--purple); border-bottom: 0; box-shadow: 0 -4px 0 #102459,0 -5px 0 #35c5ff; }
.bottom-nav button { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 7px; min-height: 50px; padding: 7px 3px; border: 0; background: transparent; color: #a2b3da; font-size: 10px; }
.bottom-nav .active { color: var(--lime); background: #1b2840; box-shadow: inset 0 -2px var(--lime); }
.bottom-nav i { position: absolute; top: 4px; right: 29%; width: 5px; height: 5px; background: var(--pink); }
.nav-icon { position: relative; display: block; width: 20px; height: 19px; color: inherit; }
.nav-home::before { content: ""; position: absolute; inset: 0; background: currentColor; clip-path: polygon(0 9px,3px 9px,3px 6px,6px 6px,6px 3px,9px 3px,9px 0,12px 0,12px 3px,15px 3px,15px 6px,18px 6px,18px 9px,20px 9px,20px 12px,17px 12px,17px 19px,12px 19px,12px 13px,8px 13px,8px 19px,3px 19px,3px 12px,0 12px); }
.nav-book { border: 2px solid currentColor; box-shadow: 0 2px currentColor; }
.nav-book::before { content: ""; position: absolute; width: 2px; height: 15px; left: 7px; top: 0; background: currentColor; }
.nav-book::after { content: ""; position: absolute; width: 3px; height: 2px; top: 3px; left: 2px; background: currentColor; box-shadow: 9px 0 currentColor,0 5px currentColor,9px 5px currentColor; }
.nav-replay { border: 3px solid currentColor; border-left-color: transparent; }
.nav-replay::before { content: ""; position: absolute; left: -5px; top: -5px; width: 8px; height: 8px; border-bottom: 3px solid currentColor; border-left: 3px solid currentColor; }
.nav-save { background: currentColor; clip-path: polygon(0 0,16px 0,20px 4px,20px 19px,0 19px); }
.nav-save::before { content: ""; position: absolute; top: 0; left: 4px; width: 9px; height: 6px; background: #101a32; }
.nav-save::after { content: ""; position: absolute; bottom: 2px; left: 4px; width: 12px; height: 6px; background: #101a32; }
/* Collection, spaced review and the player's save all use the same arcade panels. */
.view-heading { padding: 26px 0 25px; }
.view-heading .eyebrow { color: #dcf5ff; font-size: 9px; text-shadow: 1px 1px #174591; }
.view-heading h1 { text-shadow: 3px 3px 0 #101946,5px 5px 0 #6b40bb; letter-spacing: 2px; }
.filter-tabs { display: flex; gap: 8px; margin: 0 0 16px; }
.filter-tabs button { flex: 1; min-height: 44px; padding: 8px 5px; border: 2px solid #8e71d6; background: var(--panel); color: #c4d3ed; font-size: 13px; box-shadow: 2px 2px 0 #303d7f; }
.filter-tabs .active { background: var(--lime); border-color: #192a47; color: #0c1632; font-weight: bold; }
.subject-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.subject-filters button { min-height: 38px; padding: 7px 11px; border: 1px solid #a0c2ee; background: #103267; color: #e6f2ff; font-size: 12px; }
.subject-filters .active { border-color: var(--cyan); background: #10213e; color: var(--cyan); box-shadow: inset 0 -2px var(--cyan); }
.search-box { display: flex; gap: 0; border: 2px solid #7762bd; background: var(--panel); padding: 4px; }
.search-box input { min-width: 0; flex: 1; border: 0; background: transparent; font-size: 16px; padding: 10px; }
input::placeholder,textarea::placeholder { color: #a0b0d0; opacity: 1; }
.search-box button { border: 0; background: #24355c; padding: 9px 14px; color: var(--lime); font-size: 13px; }
.view-panel>.subtle-note { background: #12234a; border-left: 2px solid var(--cyan); padding: 9px 12px; font-size: 11px; }
.library-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.library-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; min-height: 174px; padding: 17px; text-align: left; border: 1px solid #9273cd; background: #0d1834; color: var(--ink); box-shadow: 3px 3px 0 #242250; transition: border-color .15s,transform .15s; }
.library-card:hover { border-color: var(--lime); transform: translateY(-2px); }
.library-card small { font-size: 10px; color: var(--pink); }
.library-card strong { margin: 13px 0 8px; font-size: 21px; line-height: 1.5; overflow-wrap: anywhere; }
.library-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; color: #b5c4e0; line-height: 1.85; margin: 0 0 15px; }
.card-foot { font-size: 10px; line-height: 1.7; margin-top: auto; padding-top: 11px; color: var(--cyan); border-top: 1px solid #374264; width: 100%; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 24px 0; }
.pagination>.mono { padding: 7px 9px; background: #101d3b; font-size: 12px; }
.review-summary { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; padding: 32px; }
.big-sprout { margin: 16px; transform: scale(2); }
.review-summary>p { font-size: 13px; color: var(--muted); }
.review-summary>strong { font: 700 56px "Courier New",monospace; color: var(--lime); }
.review-summary>span:not(.big-sprout) { font-size: 12px; color: var(--muted); }
.review-summary>.primary-button { max-width: 330px; margin-top: 16px; }
.review-summary .subtle-note { max-width: 400px; font-size: 11px; line-height: 1.9; }
.review-list { display: grid; gap: 9px; margin-top: 23px; }
.review-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; background: #0e1b39; border: 1px solid #7b76ba; font-size: 13px; }
.review-row small { color: var(--cyan); font-size: 11px; white-space: nowrap; }
.empty-state { text-align: center; padding: 25px 20px; background: #0e1937; border: 1px solid #7564aa; }
.empty-state>.mono { color: var(--lime); font-size: 11px; letter-spacing: 1px; }
.empty-state h2 { font-size: 19px; }
.empty-state p { font-size: 12px; line-height: 1.9; color: var(--muted); }
.empty-state button { margin: 20px auto 0; }
.save-summary { display: flex; gap: 21px; align-items: center; padding: 27px; }
.save-mark { flex-shrink: 0; display: grid; place-items: center; width: 62px; height: 65px; border: 3px solid var(--purple); background: #25395a; color: var(--lime); box-shadow: 4px 4px #18203b; text-align: center; font-size: 13px; font-weight: bold; line-height: 1.8; letter-spacing: 1px; }
.save-summary h2 { font-size: 19px; margin: 7px 0; }
.save-summary p { font-size: 11px; line-height: 1.8; color: var(--muted); margin-bottom: 0; }
.info-card { padding: 23px; margin-top: 23px; background: #0e1935; border: 1px solid #8d71be; box-shadow: 4px 4px #2e2860; }
.info-card h2 { font-size: 18px; margin-top: 0; }
.info-card p { font-size: 13px; line-height: 1.95; color: #b6c7e6; }
.save-actions { display: flex; gap: 17px; margin-top: 23px; }
.save-actions>button { flex: 1; font-size: 13px; }
.source-info p { font-size: 12px; }
.source-info .subtle-note { font-size: 10px; }
/* Practice uses readable text, large answer fields and persistent progress. */
dialog { color: var(--ink); color-scheme: dark; background: var(--panel); border: 3px solid var(--purple); box-shadow: 0 0 0 2px #111632,inset 0 0 0 1px var(--cyan),6px 7px 0 #21183b; max-height: 90vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain; }
dialog::backdrop { background: #050c27c9; backdrop-filter: blur(4px); }
.card-dialog { width: min(560px,calc(100% - 30px)); padding: 26px; }
.dialog-header,.session-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.dialog-header .eyebrow { margin: 0; font-size: 9px; }
.card-dialog h2 { font-size: 27px; line-height: 1.5; margin: 25px 0 15px; }
.card-dialog h3 { font-size: 13px; }
.card-dialog p,.card-dialog li { font-size: 14px; line-height: 1.95; color: #c2cde8; }
.card-dialog .primary-button { margin-top: 23px; }
.card-dialog .secondary-button { margin-top: 13px; }
.guide-steps { padding-left: 22px; }
.guide-steps li { padding-left: 3px; margin-bottom: 13px; }
.guide-tip { background: #172342; border: 1px dashed #697dad; padding: 16px; margin-top: 22px; font-size: 14px; color: var(--cyan); }
.guide-tip p { font-size: 13px; margin-bottom: 0; }
textarea { width: 100%; border: 1px solid #7583ae; padding: 12px; background: #162242; font-size: 16px; line-height: 1.8; resize: vertical; }
.session-dialog { width: min(570px,calc(100% - 26px)); padding: 26px; margin: auto; }
.session-header>.mono { color: var(--cyan); font-size: 10px; letter-spacing: 1.4px; }
.session-progress { height: 6px; background: #28304f; margin: 24px 0 21px; }
.session-progress>span { display: block; width: 0; height: 100%; background: var(--lime); transition: width .2s; }
.session-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tag { display: inline-block; padding: 5px 8px; background: #172c4b; border: 1px solid #436f9d; color: var(--cyan); font-size: 11px; line-height: 1.6; }
.session-top>.mono { font-size: 12px; color: var(--pink); white-space: nowrap; }
.task-title { font-size: 25px; line-height: 1.6; margin: 27px 0 15px; }
.task-prompt { font-size: 17px; line-height: 1.95; margin: 23px 0; white-space: pre-line; color: #e0e8fa; }
.task-hint { font-size: 12px; line-height: 1.9; color: #aebfde; }
.answer-row { display: flex; align-items: center; gap: 12px; padding: 12px 0 5px; }
.answer-row input { min-width: 0; width: 100%; padding: 14px 17px; background: #17274b; border: 2px solid var(--cyan); color: var(--lime); font: 700 30px "Courier New",monospace; box-shadow: 3px 3px #182b53; }
.answer-row>span { font-size: 13px; color: #c4cfea; white-space: nowrap; }
.session-actions { display: flex; gap: 14px; margin-top: 23px; }
.session-actions button { flex: 1; font-size: 14px; }
.session-dialog #sessionActions>.primary-button { margin-top: 26px; }
.session-footnote { font-size: 11px; line-height: 1.9; color: #a4b4d8; margin: 22px 0 0; text-align: center; }
.formula-block { font-size: 19px; font-weight: 750; line-height: 1.9; padding: 19px; background: #162b40; border: 1px solid #62a58e; border-left: 3px solid var(--lime); color: #e0ff9c; margin: 23px 0; overflow-wrap: anywhere; }
.note-part { margin: 20px 0; }
.note-part h3 { color: var(--cyan); font-size: 12px; margin: 0 0 7px; }
.note-part p { font-size: 14px; line-height: 1.95; color: #bfcee9; margin: 0; white-space: pre-line; }
.note-part.warning { padding: 15px; background: #37233e; border-left: 3px solid var(--pink); }
.note-part.warning h3 { color: #ffb4dd; }
.word-title { margin: 35px 0 24px; font-size: 39px; letter-spacing: 6px; text-align: center; color: var(--lime); }
.word-definition { font-size: 19px; text-align: center; line-height: 1.95; padding: 20px 4px; margin: 0; }
.question-material { padding: 15px; background: #172644; border: 1px solid #59779e; margin: 23px 0; }
.question-material summary { cursor: pointer; font-size: 13px; color: var(--cyan); }
.question-material p { font-size: 14px; line-height: 1.95; max-height: 290px; overflow: auto; white-space: pre-line; }
.choice-list { display: grid; gap: 12px; margin-top: 23px; }
.choice-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #6374a3; background: #15213e; font-size: 15px; line-height: 1.85; cursor: pointer; }
.choice-option:has(input:checked) { border-color: var(--lime); background: #243b3a; box-shadow: 2px 2px #576135; }
.choice-option input { width: 17px; height: 17px; margin: 5px 0 0; flex-shrink: 0; accent-color: var(--lime); }
.choice-option>span { min-width: 0; overflow-wrap: anywhere; }
.choice-option>span:first-of-type { font-family: "Courier New",monospace; color: var(--cyan); font-weight: bold; }
.session-feedback { background: #13392f; border: 1px solid #6bba82; border-left: 3px solid var(--lime); padding: 17px; margin-top: 24px; font-size: 13px; line-height: 1.95; }
.session-feedback.is-wrong { background: #382039; border-color: #d378b2; border-left-color: var(--pink); }
.session-feedback strong { color: #e2ffae; font-size: 16px; }
.session-feedback.is-wrong strong { color: #ffc2e8; }
.session-feedback p { margin: 9px 0; white-space: pre-line; }
.session-dialog #nextTask { margin-top: 24px; }
.source-details { margin-top: 25px; padding-top: 16px; border-top: 1px dashed #556081; }
.source-details summary { cursor: pointer; color: var(--cyan); font-size: 12px; line-height: 1.8; min-height: 34px; }
.source-details p { font-size: 12px; overflow-wrap: anywhere; }
.source-excerpt { max-height: 250px; overflow: auto; padding: 14px; background: #131f38; white-space: pre-wrap; font-size: 12px; line-height: 1.95; color: #b7c6e2; }
.complete-panel { text-align: center; padding: 30px 6px; }
.complete-panel .mono { font-size: 10px; color: var(--pink); letter-spacing: 1px; }
.complete-panel h2 { font-size: 28px; line-height: 1.6; }
.complete-panel p { font-size: 14px; color: #becde5; line-height: 1.9; }
.completion-xp { padding: 20px 0; font: 700 45px "Courier New",monospace; color: var(--lime); text-shadow: 3px 3px #4a3475; }
.no-script { position: relative; z-index: 2; padding: 18px; background: #0b1531; font-size: 14px; text-align: center; }
.loading-state { grid-column: 1/-1; text-align: center; color: #d7e4f9; background: #112244; padding: 35px 15px; font-size: 13px; line-height: 1.8; }
@keyframes appear { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 700px) {
  .greeting { padding-top: 12px; padding-bottom: 34px; }
  .checkin-card,.practice-card,.travel-strip,.mini-stats { max-width: 700px; margin-left: auto; margin-right: auto; }
  .view-heading { padding: 36px 0 30px; }
  .world-card { padding-right: 26px; border-right: 1px dashed #4c426e; }
  .world-scene { margin-bottom: 24px; }
}
@media (max-width: 699px) {
  .page-shell { max-width: 480px; padding: 0 18px; }
  .site-header { min-height: 60px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand img { width: 28px; height: 28px; }
  .brand small { font-size: 8px; padding-left: 9px; letter-spacing: .8px; }
  .site-header .icon-button { width: 32px; height: 32px; font-size: 19px; }
  .connection-bar { min-height: 31px; font-size: 10px; }
  .greeting { padding: 4px 0 26px; }
  .hero-meta { font-size: 9px; gap: 5px; }
  .hero-meta .mono { font-size: 8px; }
  .greeting .eyebrow { margin-top: 18px; font-size: 8px; letter-spacing: 1.5px; }
  .title-top { font-size: 48px; letter-spacing: 3px; }
  .title-bottom { font-size: 28px; letter-spacing: 4px; }
  .greeting .intro-copy { font-size: 11px; margin-top: 11px; }
  .decor-left { left: 3%; top: 71px; font-size: 29px; }
  .decor-right { right: 1%; top: 113px; font-size: 26px; }
  .dashboard-grid { display: block; padding: 21px 18px 18px; }
  .world-card { display: flex; align-items: center; gap: 13px; padding-bottom: 17px; margin-bottom: 17px; border-bottom: 1px dashed #454678; text-align: left; }
  .world-scene { flex-shrink: 0; width: 55px; height: 61px; margin: 0; }
  .world-scene img { width: 49px; height: 49px; margin: -2px auto 0; }
  .world-scene .level-badge { bottom: -2px; padding: 2px 4px; font-size: 9px; border-width: 1px; box-shadow: 2px 2px var(--purple); }
  .player-progress { flex: 1; }
  .xp-label { font-size: 12px; gap: 5px; }
  .xp-label>span { font-size: 10px; }
  .meter { margin-top: 8px; height: 10px; }
  .player-progress p { font-size: 10px; margin-top: 6px; }
  .section-heading { margin-bottom: 10px; }
  .section-heading h2 { font-size: 19px; letter-spacing: 1px; }
  .section-heading .eyebrow { font-size: 7px; letter-spacing: 1px; }
  .count-badge { font-size: 10px; padding: 6px 7px; }
  .daily-meter { margin-bottom: 11px; }
  .speed-quest { gap: 12px; padding: 12px 10px; }
  .quest-copy { gap: 5px; }
  .quest-copy strong { font-size: 14px; }
  .quest-copy small { font-size: 7px; }
  .quest-copy>span { font-size: 10px; }
  .quest-end b { font-size: 10px; }
  .quest-pair { gap: 10px; margin-top: 10px; }
  .mini-quest { padding: 10px; gap: 5px; }
  .mini-quest-top { margin-bottom: 2px; }
  .mini-quest>small { font-size: 7px; }
  .mini-quest strong { font-size: 14px; }
  .mini-quest>span:last-child { font-size: 9px; }
  .daily-board>.primary-button { min-height: 49px; margin-top: 15px; font-size: 15px; }
  .board-note { margin-top: 10px; font-size: 9px; }
  .checkin-card { margin-top: 20px; padding: 17px 19px 15px; }
  .checkin-flag { font-size: 8px; }
  .ready-label { font-size: 9px; }
  .checkin-row { margin-top: 10px; gap: 8px; }
  .checkin-row h2 { font-size: 17px; }
  .checkin-row p { font-size: 10px; }
  .checkin-button { min-width: 90px; min-height: 44px; font-size: 13px; }
  .checkin-footer { margin-top: 11px; padding-top: 7px; }
  .checkin-footer p { font-size: 9px; }
  .practice-card { padding: 21px; margin-top: 20px; }
  .practice-card .eyebrow { font-size: 8px; }
  .practice-heading h2 { font-size: 20px; }
  .practice-heading .tag { font-size: 10px; padding: 4px 6px; white-space: nowrap; }
  .practice-card .subtle-note { font-size: 11px; }
  .practice-actions { gap: 11px; }
  .practice-actions select { min-width: 0; width: 42%; font-size: 16px; padding: 7px; }
  .practice-actions button { font-size: 13px; padding: 9px 6px; }
  .travel-strip { padding: 16px 12px; margin-top: 20px; }
  .travel-strip>div { padding-left: 21px; }
  .travel-strip strong { font-size: 14px; }
  .travel-strip p { font-size: 10px; }
  .travel-strip .small-button { font-size: 11px; min-height: 40px; padding: 8px; }
  .mini-stats { margin-top: 20px; padding: 19px 5px; }
  .mini-stats strong { font-size: 23px; }
  .mini-stats span { font-size: 9px; }
  .site-footer { padding: 24px 0 110px; font-size: 8px; gap: 8px; }
  .site-footer>.mono { font-size: 7px; letter-spacing: 0; }
  .bottom-nav { border-left: 0; border-right: 0; }
  h1 { font-size: 33px; }
  .view-heading { padding: 23px 0 25px; }
  .view-heading .intro-copy { font-size: 11px; }
  .view-heading .eyebrow { font-size: 8px; }
  .filter-tabs { gap: 6px; }
  .filter-tabs button { font-size: 12px; }
  .subject-filters { gap: 7px; }
  .subject-filters button { font-size: 11px; padding: 7px 9px; }
  .search-box input { padding: 10px 7px; }
  .search-box button { font-size: 12px; padding: 9px 10px; }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
  .library-card { min-height: 172px; padding: 13px; }
  .library-card strong { font-size: 19px; margin: 10px 0 8px; }
  .library-card p { font-size: 11px; }
  .card-foot { font-size: 9px; }
  .save-summary { gap: 15px; padding: 23px 20px; }
  .save-summary h2 { font-size: 15px; }
  .save-summary p { font-size: 10px; }
  .save-summary .subtle-note { font-size: 11px; }
  .save-mark { width: 51px; height: 59px; font-size: 12px; }
  .save-actions { flex-direction: column; gap: 15px; }
  .info-card { padding: 20px; }
  .info-card h2 { font-size: 17px; }
  .info-card p { font-size: 12px; }
  .session-dialog { width: calc(100% - 24px); padding: 22px 20px; max-height: 92dvh; }
  .session-header>.mono { font-size: 9px; }
  .session-progress { margin: 20px 0; }
  .session-top .tag { font-size: 10px; padding: 4px 6px; }
  .session-top>.mono { font-size: 11px; }
  .task-title { font-size: 23px; margin-top: 24px; }
  .task-prompt { font-size: 16px; }
  .word-title { font-size: 34px; letter-spacing: 4px; }
  .card-dialog { padding: 22px; }
  .card-dialog h2 { font-size: 24px; }
  .choice-option { padding: 12px; font-size: 14px; gap: 9px; }
  .source-excerpt { max-height: 210px; }
}
@media (max-width: 350px) {
  .page-shell { padding: 0 13px; }
  .brand small { display: none; }
  .hero-meta .mono { font-size: 7px; }
  .title-top { font-size: 43px; }
  .title-bottom { font-size: 25px; }
  .hero-decoration { display: none; }
  .dashboard-grid { padding: 20px 16px 17px; }
  .xp-label { font-size: 11px; }
  .xp-label>span { font-size: 9px; }
  .speed-quest { gap: 9px; padding: 11px 8px; }
  .quest-copy strong { font-size: 13px; }
  .quest-copy>span { font-size: 8px; }
  .quest-copy small { font-size: 6px; }
  .quest-end b { font-size: 9px; }
  .mini-quest>span:last-child { font-size: 8px; }
  .mini-quest strong { font-size: 13px; }
  .travel-strip p { max-width: 160px; }
  .checkin-card { padding-left: 17px; padding-right: 17px; }
  .checkin-row p { font-size: 9px; }
  .checkin-button { min-width: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
