body { min-height: 100vh; background: #faf8f0; }
.header { border-bottom: 1px solid #dfddd2; }
.header-home { margin-left: auto; border: 0; padding: .65rem .8rem; border-radius: 8px; background: transparent; color: var(--ink); font-family:inherit; font-weight:650; font-size:.92rem; line-height:1.2; }
.header-home:hover,.text-button:hover { background: #eeeae0; }
.account-layout,.trial-layout { width: min(960px, calc(100% - 42px)); margin: clamp(28px,6vw,76px) auto; }
.account-layout { display: grid; grid-template-columns: minmax(240px,.86fr) minmax(300px,1.14fr); gap: clamp(20px,5vw,64px); align-items: start; }
.tour-card { background: #171d46; color: white; border-radius: 24px; padding: clamp(24px,4vw,42px); overflow: hidden; }
.mascot-window { height: clamp(130px,17vw,205px); display: grid; place-items:center; margin: -4px 0 26px; }
.mascot-window img { width: min(88%,230px); height:100%; object-fit:contain; }
.tour-card h2 { font-size:clamp(1.35rem,2.3vw,1.85rem); }
.tour-card p,.tour-card li { line-height:1.7; color:#edf0ff; }
.tour-card p { margin-top: .7rem; }
.tour-card ul { padding-left:1.25rem; margin-bottom:0; }
.form-panel h1,.trial-layout h1 { font-size:clamp(2.05rem,4.2vw,3.15rem); line-height:1.23; }
.form-panel h1 + p,.trial-lead { color:var(--subtle); margin:10px 0 23px; line-height:1.65; }
.form-panel form { margin-top:24px; }
.form-panel label,.lesson-card label { display:block; font-weight:720; margin:18px 0 6px; }
.form-panel input:not([type=checkbox]),.lesson-card input { width:100%; min-height:48px; border:1px solid #979aa7; border-radius:8px; padding:10px 12px; font:inherit; color:var(--ink); background:#fff; }
input:focus-visible { outline:3px solid #505ca3; outline-offset:2px; }
.field-note,.account-note,.scope-note { font-size:.87rem; color:#4c5268; line-height:1.55; }
.field-note { margin:6px 0 0; }
.account-note,.scope-note { margin-top:24px; padding-top:18px; border-top:1px solid #d8d5c9; }
.form-panel label.check-line { display:flex; gap:9px; align-items:flex-start; font-weight:550; cursor:pointer; }
.check-line input { width:19px; height:19px; flex:none; margin:.2rem 0 0; accent-color:var(--ink); }
.action { display:inline-flex; align-items:center; justify-content:center; min-height:46px; margin-top:10px; padding:12px 22px; border:0; border-radius:9px; background:var(--ink); color:white; font-weight:750; }
.action:hover:enabled { background:#384480; }
.action:disabled { opacity:.53; cursor:default; }
#access-error { color:#9b321d; margin-top:10px; }
.action-links { margin-top:15px; display:flex; flex-wrap:wrap; gap:8px 18px; }
.action-links a { display:inline-flex; align-items:center; min-height:44px; font-size:.9rem; }
#save-code p { margin:14px 0; line-height:1.6; }
#saved-code { display:block; padding:14px; border:1px dashed #696e84; border-radius:10px; color:#202864; background:#fff; font:650 1rem/1.7 ui-monospace,monospace; overflow-wrap:anywhere; user-select:all; }
.course-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin:24px 0; }
.course-card { text-align:left; border:1px solid #d5d2c5; border-radius:18px; padding:clamp(22px,3vw,34px); display:grid; gap:12px; line-height:1.45; }
.english-card { background:#d7e6fa; }
.maths-card { background:#c2ecd7; }
.course-card:hover { border-color:#39456a; }
.course-symbol { font:bold 2.8rem/1.1 system-ui,sans-serif; }
.course-card strong { font-size:1.35rem; }
.course-card b { font-size:.9rem; margin-top:12px; }
.lesson-card { border:1px solid #d9d5c8; background:white; padding:clamp(22px,4vw,42px); border-radius:18px; margin-top:13px; max-width:760px; }
.lesson-card h2 { font-size:clamp(1.4rem,3.2vw,2rem); line-height:1.5; }
.lesson-card p:not(.step) { margin-top:14px; line-height:1.6; }
.step { font-weight:750; font-size:.86rem; color:#535c78; margin-bottom:8px; }
.text-button { border:0; background:transparent; padding:8px 6px; min-height:44px; text-decoration:underline; text-underline-offset:4px; }
.options,.done-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; align-items:baseline; }
.options button { min-width:72px; min-height:48px; background:#f4f2e9; color:var(--ink); border:1px solid #a9acb6; border-radius:8px; padding:8px 16px; font-weight:700; }
.options button:hover:enabled { border-color:var(--ink); background:#ebeefa; }
.options button:disabled { cursor:default; }
#answer-feedback { min-height:1.65em; font-weight:600; }
#answer-feedback[data-correct=true] { color:#216847; }
.fraction-strip,.number-line { display:flex; max-width:360px; margin:22px 0; }
.fraction-strip { height:44px; color:#354066; border:2px solid currentColor; }
.fraction-strip span { flex:1; border-right:2px solid currentColor; }
.fraction-strip span:last-child { border:0; }
.fraction-strip .filled { background:repeating-linear-gradient(125deg,#badfca 0 7px,#72ad91 7px 9px); }
.number-line { align-items:center; gap:0; border-top:2px solid #354066; padding-top:6px; }
.number-line span { position:relative; flex:1; text-align:center; }
.number-line span::before { display:block; content:""; position:absolute; width:2px; height:9px; top:-12px; left:50%; background:#354066; }
@media(max-width:700px){
  .account-layout { display:flex; flex-direction:column; gap:24px; }
  .form-panel { order:-1; width:100%; }
  .tour-card { width:100%; }
  .mascot-window { display:none; }
  .course-grid { grid-template-columns:1fr; gap:12px; }
  .course-card { gap:7px; }
  .trial-layout,.account-layout { width:calc(100% - 32px); }
}
