/* 一课一练 pupil screens. The base (colours, buttons, top row, sign-in, PIN pad, sizes) is COPIED from 阅读伙伴 site/app.css
   (direction A, 3 Dec 2026), so the two apps look like one family (D7, D17). This app's own screens are in practice.css. */
:root {
  --desk: #DCE4EA; --desk-shadow: #C3CED8; --paper: #F6FAF1; --ink: #1B2330; --ink2: #3E4E46; --edge: #7F909E;
  --py: #33556B; --green: #1E7A34; --tab: #D2E4D6;
  --blue: #2456E0; --blue-edge: #1A3FA8;
  --yellow: #FFE45C; --added: #F9F0AF; --dash: #9A7300; --dock: #FFF6C4;
  --pink: #FFC4DD; --pink-soft: #FFE0EC; --pink-edge: #B0306A; --pink-py: #8E2152; --pink-line: #D9468A;
  --tang: #FF7A1A; --tang-edge: #D95E00;
  --book: #FBFCF8; --rule: #B7CBE3; --margin: #8FA9CF; --tabline: #5E6E7C;
  --red: #D8352A; --red-text: #C8302A; --teal: #2F7D74; --teal-dark: #23615A;
  --kai: "Kaiti SC", "STKaiti", "KaiTi", "BiauKai", "Kaiti TC", "AR PL UKai CN", serif;
  --ui: -apple-system, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --round: "Yuanti SC", "YuanTi SC", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --pitch: 2.875rem;   /* one ruled line in the 作业本 */
  /* text size (字− 字+, 3 Dec 2026): the passage and the 作业本 grow together by --fs; base sizes below */
  --fs: 1; --pb: 1.375rem; --pnl: 3.1rem; --qhf: 1.2rem; --qhl: 2.5rem; --anf: 1.3rem; --pef: 1.2rem; --pitch0: 2.875rem;
}
html { font-size: clamp(15px, min(1.356vw, 1.951vh), 22px); -webkit-text-size-adjust: 100%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--ui); overflow: hidden; height: 100vh; height: 100dvh; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
[hidden] { display: none !important; }
.kai { font-family: var(--kai); }

/* ---------- buttons ---------- */
.btn-blue { background: var(--blue); color: #fff; border: 0; border-radius: 0.6rem; box-shadow: 0 0.25rem 0 var(--blue-edge);
  font-weight: 700; font-size: 1.25rem; min-height: 3.6rem; padding: 0 1.6rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; }
.btn-blue:active { transform: translateY(0.15rem); box-shadow: 0 0.1rem 0 var(--blue-edge); }
.btn-blue[disabled] { opacity: 0.55; cursor: default; }
.btn-blue small { font-weight: 500; font-size: max(15px, 0.94rem); opacity: 0.95; }
.chev { width: 0.7em; height: 0.7em; border-right: 0.16em solid currentColor; border-top: 0.16em solid currentColor; transform: rotate(45deg); display: inline-block; margin-left: 0.2em; }
.chev.left { transform: rotate(-135deg); margin: 0 0.1em 0 0.25em; }
.btn-line { background: #fff; border: 0.125rem solid var(--ink); border-radius: 0.6rem; font-weight: 700; font-size: 1.125rem; min-height: 3.1rem; padding: 0 1.1rem;
  display: inline-flex; align-items: center; gap: 0.35rem; }
.btn-text { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 1.125rem; text-decoration: underline; text-underline-offset: 0.25em;
  text-decoration-thickness: 0.12em; min-height: 2.75rem; padding: 0 0.4rem; }

/* ---------- top row (every lesson screen) ---------- */
.top { display: flex; align-items: center; gap: 1.4rem; height: 5.25rem; padding: 0 1.4rem 0 1.5rem; }
.top .grow { flex: 1; }
.top .who { font-family: var(--kai); font-size: 1.25rem; margin-right: -0.4rem; }
.steps { display: flex; align-items: center; gap: 0.6rem; font-size: 1.25rem; }
.step { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--ink); background: none; border: 0.125rem solid transparent; border-radius: 0.6rem; padding: 0.35rem 0.7rem 0.35rem 0.4rem; }
.step.todo { color: var(--ink2); font-weight: 500; }
.step.now { background: var(--ink); color: #fff; border-color: var(--ink); padding-right: 0.9rem; }
.step.now i { background: #fff; color: var(--ink); }
.step.done { color: var(--ink2); font-weight: 500; font-size: 0.9em; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 0.08em; }
.step.done i { background: #7C8894; width: 1.45rem; height: 1.45rem; }
.step.done i.tick::after { width: 0.36rem; height: 0.66rem; }
.step i { width: 1.75rem; height: 1.75rem; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; font-size: 1rem; font-weight: 700; background: var(--ink); color: #fff; }
.step.todo i { background: none; color: var(--ink2); border: 0.1rem solid var(--ink2); }
.step i.tick::after { content: ""; width: 0.45rem; height: 0.8rem; border: solid #fff; border-width: 0 0.18rem 0.18rem 0; transform: translateY(-0.1rem) rotate(45deg); }
.steps .dots { width: 3rem; border-top: 0.15rem dotted var(--ink2); }
.steps .line { width: 3rem; border-top: 0.15rem solid var(--ink); }

.screen { position: fixed; inset: 0; display: flex; flex-direction: column; }
.toast { position: fixed; left: 4.4rem; top: 5.7rem; pointer-events: none; max-width: 30rem; background: var(--ink); color: #fff; padding: 0.8rem 1.4rem; border-radius: 0.6rem; font-size: 1.05rem; z-index: 20; }

/* login */
.login .top { justify-content: space-between; }
.login .cls { font-size: 1.15rem; display: flex; gap: 1rem; align-items: center; }
.login .cls b { font-size: 1.2rem; }
.login h1 { font-size: 2rem; margin: 0.6rem 0 1.2rem 2rem; }
.codebox { display: flex; gap: 0.9rem; margin: 2rem 0 0 2rem; position: relative; }
.codebox input { position: absolute; inset: 0; opacity: 0; font-size: 16px; width: 100%; }
.codebox b { width: 4.4rem; height: 5.2rem; background: #fff; border: 0.1rem solid var(--edge); border-radius: 0.3rem; display: grid; place-items: center; font-size: 2.2rem; font-weight: 700; }
.codebox b.cur { border: 0.16rem solid var(--ink); }
.codebox.bad b { border-color: var(--red); }
.sub { margin: 1.2rem 0 0 2rem; color: var(--ink2); font-size: 1.1rem; min-height: 1.6rem; }
.sub.bad { color: var(--red-text); font-weight: 700; }
.names { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.9rem 0.8rem; padding: 0 1.6rem 1.4rem 2rem; overflow-y: auto; align-content: start; flex: 1; }
.nbook { position: relative; aspect-ratio: 98 / 134; background: #E8C08A; border: 0.094rem solid var(--edge); color: var(--ink); border-radius: 0.2rem; box-shadow: 0.2rem 0.25rem 0 var(--desk-shadow);
  padding: 0; display: flex; align-items: center; justify-content: center; border-left: 0.9rem solid rgba(0,0,0,0.13); }
/* light covers like the shelf spines (teacher: dark covers too heavy): tan, sage, sky in turn */
.nbook.c1 { background-color: #AFD8AE; } .nbook.c2 { background-color: #A6D3E0; }
.nbook span { background: #fff; width: 74%; padding: 0.2rem 0.3rem 0.35rem; text-align: left; line-height: 1.1; }
.nbook em { font-style: normal; font-size: max(15px, 0.95rem); display: block; }
.nbook strong { display: block; font-family: var(--kai); font-size: 1.45rem; font-weight: 700; white-space: nowrap; text-align: center; overflow: hidden; }
.nbook strong.latin { font-family: var(--ui); font-size: 1.05rem; font-weight: 600; }
.nbook.pick { transform: translate(-0.2rem, -0.3rem); box-shadow: 0.45rem 0.55rem 0 #AFBBC6; outline: 0.16rem solid var(--ink); }
.nbook.pick::after { content: ""; position: absolute; right: -0.9rem; top: -0.9rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--ink); border: 0.16rem solid #fff;
  background-image: linear-gradient(45deg, transparent 0 0); }
.nohelp { align-self: center; color: var(--ink2); font-size: 1.05rem; line-height: 1.6; grid-column: span 2; }
.pinwrap { flex: 1; display: grid; grid-template-columns: 1fr 1.15fr; padding: 1rem 2.4rem 2rem 4.3rem; gap: 2rem; min-height: 0; }
.pinleft { display: flex; flex-direction: column; justify-content: center; }
.bigbook { display: flex; align-items: center; gap: 2.2rem; }
.bigbook .nbook { width: 13.3rem; aspect-ratio: auto; height: 18.3rem; border-left-width: 0.9rem; }
.bigbook .nbook span { width: 78%; padding: 0.4rem 0.5rem 1rem; }
.bigbook .nbook strong { font-size: 2.6rem; }
.bigbook .nbook strong.latin { font-size: 1.8rem; }
.pinleft h1 { margin: 3.6rem 0 0; font-size: 2.1rem; }
.pinleft .sub { margin-left: 0; }
.pinright { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.pinboxes { display: flex; gap: 1.6rem; margin-bottom: 2.4rem; }
.pinboxes b { width: 5.8rem; height: 5.8rem; background: #fff; border: 0.094rem solid var(--edge); border-radius: 0.2rem; display: grid; place-items: center; }
.pinboxes b.on::after { content: ""; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--ink); }
.pinboxes b.cur { border: 0.16rem solid var(--ink); }
.pinboxes b.cur::after { content: ""; width: 0.12rem; height: 2.6rem; background: var(--blue); animation: blink 1s steps(1) infinite; }
.pinboxes.shake { animation: shake 0.4s; }
@keyframes shake { 25% { transform: translateX(-0.6rem); } 75% { transform: translateX(0.6rem); } }
@keyframes blink { 50% { opacity: 0; } }
.pad { display: grid; grid-template-columns: repeat(3, 10rem); gap: 1.2rem; }
.pad button { height: 6.2rem; background: #fff; border: 0.094rem solid #8C99A4; border-radius: 0.5rem; box-shadow: 0 0.25rem 0 #A5B1BC; font-size: 2.1rem; font-weight: 600; }
.pad button:active { transform: translateY(0.15rem); box-shadow: 0 0.1rem 0 #A5B1BC; }
.pad .del { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.pad .del svg { width: 3.6rem; height: 2.2rem; }
.pad .blank { visibility: hidden; }

@media (max-height: 560px) {
  .nbook span { width: 94%; padding-left: 0.15rem; padding-right: 0.15rem; } .nbook strong.latin { font-size: 15px; letter-spacing: -0.04em; }   /* 一课一练 build review M8: Daniel, Danish fit */
  .top { height: 3.4rem; gap: 0.8rem; padding: 0 0.8rem 0 1rem; }
  .btn-line { min-height: 2.6rem; font-size: 1rem; padding: 0 0.7rem; }
  .steps { font-size: 1rem; gap: 0.3rem; } .steps .dots, .steps .line { width: 1.2rem; }
  .step i { width: 1.4rem; height: 1.4rem; font-size: max(15px, 0.85rem); }
  .login h1 { font-size: 1.5rem; margin: 0.2rem 0 0.6rem 1.4rem; }
  .names { grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 0.5rem; padding: 0 1rem 1rem 1.4rem; }
  .nbook strong { font-size: 1.1rem; } .nbook em { font-size: max(15px, 0.8rem); } .nbook { border-left-width: 0.5rem; }
  .pinwrap { padding: 0.3rem 1rem 0.6rem 1.6rem; gap: 1rem; }
  .bigbook .nbook { width: 7rem; height: 9.6rem; } .bigbook .nbook strong { font-size: 1.6rem; } .bigbook { gap: 1rem; }
  .pinleft h1 { margin-top: 1rem; font-size: 1.4rem; } .pinleft .sub { margin-top: 0.4rem; font-size: 1rem; }
  .pinboxes { gap: 0.7rem; margin-bottom: 0.7rem; } .pinboxes b { width: 3rem; height: 3rem; } .pinboxes b.on::after { width: 0.8rem; height: 0.8rem; }
  .pinboxes b.cur::after { height: 1.4rem; }
  .pad { grid-template-columns: repeat(3, 6.4rem); gap: 0.45rem; } .pad button { height: 3rem; font-size: 1.4rem; }
  .pad .del svg { width: 2rem; height: 1.3rem; }
  .codebox { margin: 0.6rem 0 0 1.4rem; } .codebox b { width: 3rem; height: 3.6rem; font-size: 1.6rem; } .sub { margin: 0.6rem 0 0 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* phone held upright: ask to turn it (the screens are made for landscape) */
.turn { display: none; }
@media (orientation: portrait) and (max-width: 600px) {
  .turn { display: grid; place-items: center; position: fixed; inset: 0; background: var(--desk); z-index: 50; font-size: 1.4rem; font-weight: 700; padding: 2rem; text-align: center; }
}
