#grade-four-practice {
    color-scheme: light dark;
    --paper: light-dark(#fffdfa, #1d2421);
    --ground: light-dark(#f7f6ef, #191f1b);
    --ink: light-dark(#1d2e25, #e9f0e9);
    --muted: light-dark(#51625a, #b5c3b8);
    --line: light-dark(#dbe2d9, #3d4b41);
    --green: light-dark(#1d6248, #a6dfbf);
    --on-green: light-dark(#ffffff, #14291e);
    --mint: light-dark(#e4f1e7, #243d2f);
    --warm: light-dark(#f7ead7, #443122);
    --warning: light-dark(#7b411e, #ffcfa6);
    --orange: light-dark(#b46135, #e9a279);
    color: var(--ink);
    font: 400 15px/1.55 "Inter", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    width: 100%;
    container-type: inline-size;
  }
  #grade-four-practice *, #grade-four-practice *::before, #grade-four-practice *::after { box-sizing: border-box; }
  #grade-four-practice [hidden] { display: none !important; }
  #grade-four-practice :is(h1, h2, h3, p, ol, ul, dl, dd, fieldset) { margin: 0; }
  #grade-four-practice :is(h1, h2, h3) { line-height: 1.3; }
  #grade-four-practice h1 { font-size: 28px; letter-spacing: -.035em; }
  #grade-four-practice h2 { font-size: 19px; }
  #grade-four-practice h3 { font-size: 16px; }
  #grade-four-practice small, #grade-four-practice .small { font-size: 12px; color: var(--muted); }
  #grade-four-practice .muted { color: var(--muted); }
  #grade-four-practice .app-head, #grade-four-practice .brand, #grade-four-practice .row {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  }
  #grade-four-practice .app-head { justify-content: space-between; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px 16px 0 0; }
  #grade-four-practice .brand { font-weight: 700; }
  #grade-four-practice .brand-icon { width: 31px; height: 31px; display: grid; place-items: center; background: var(--green); color: var(--on-green); border-radius: 9px; font: 600 25px/1 system-ui; }
  #grade-four-practice .demo { background: var(--mint); color: var(--green); border-radius: 5px; padding: 2px 7px; font-size: 12px; font-weight: 600; white-space: nowrap; }
  #grade-four-practice :is(button, input, select) { font: inherit; color: inherit; min-width: 0; }
  #grade-four-practice button { min-height: 38px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-weight: 600; }
  #grade-four-practice button:hover { background: var(--mint); }
  #grade-four-practice button.primary { background: var(--green); color: var(--on-green); border-color: var(--green); }
  #grade-four-practice button.primary:hover { filter: brightness(.94); }
  #grade-four-practice button.ghost { background: transparent; border-color: transparent; color: var(--green); }
  #grade-four-practice button.ghost:hover { background: var(--mint); }
  #grade-four-practice button:disabled { opacity: .55; }
  #grade-four-practice .role-switch { display: flex; gap: 3px; background: var(--ground); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
  #grade-four-practice .role-switch button { min-height: 32px; border-color: transparent; background: transparent; padding: 3px 10px; }
  #grade-four-practice .role-switch button[aria-pressed="true"] { background: var(--paper); border-color: var(--line); color: var(--green); }
  #grade-four-practice .student-shell, #grade-four-practice .teacher-shell { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 16px 16px; }
  #grade-four-practice .student-shell { display: grid; grid-template-columns: minmax(175px, .84fr) minmax(300px, 1fr); align-items: start; gap: clamp(14px, 5cqw, 54px); background: var(--ground); padding: clamp(14px, 4cqw, 38px); }
  #grade-four-practice .lesson { display: grid; gap: 14px; padding-top: 14px; }
  #grade-four-practice .lesson h1 { font-size: clamp(24px, 4.2cqw, 37px); }
  #grade-four-practice .eyebrow { font-size: 13px; font-weight: 650; color: var(--green); }
  #grade-four-practice .week { font-variant-numeric: tabular-nums; }
  #grade-four-practice .steps { display: grid; gap: 10px; padding: 6px 0 0; list-style: none; }
  #grade-four-practice .steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); }
  #grade-four-practice .steps li span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); font-size: 12px; }
  #grade-four-practice .steps li[aria-current="step"] { color: var(--green); font-weight: 700; }
  #grade-four-practice .steps li[aria-current="step"] span { background: var(--green); border-color: var(--green); color: var(--on-green); }
  #grade-four-practice .phone { width: 100%; max-width: 430px; justify-self: center; background: var(--paper); border: 1px solid var(--line); border-radius: 15px; overflow-wrap: anywhere; }
  #grade-four-practice .phone-top { min-height: 53px; display: flex; justify-content: space-between; align-items: center; gap: 5px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding: 8px 16px; }
  #grade-four-practice .phone-body, #grade-four-practice .stack { display: grid; gap: 14px; min-width: 0; }
  #grade-four-practice .phone-body { padding: clamp(12px, 2.5cqw, 22px); }
  #grade-four-practice .phone-body .primary { width: 100%; }
  #grade-four-practice .phone-body .row .primary { width: auto; }
  #grade-four-practice .choice-list { display: grid; gap: 7px; padding: 0; border: 0; min-width: 0; }
  #grade-four-practice .choice-list legend { margin-bottom: 7px; padding: 0; }
  #grade-four-practice .choice { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); }
  #grade-four-practice .choice:has(input:checked) { border-color: var(--green); background: var(--mint); }
  #grade-four-practice input[type="radio"] { accent-color: var(--green); }
  #grade-four-practice input:not([type="radio"]), #grade-four-practice select { width: 100%; min-height: 40px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 16px; }
  #grade-four-practice .field { display: grid; gap: 5px; }
  #grade-four-practice .exercise { background: var(--mint); padding: 17px 14px; border-radius: 10px; }
  #grade-four-practice .equation { font-size: clamp(21px, 4cqw, 29px); font-weight: 680; margin-top: 4px; overflow-wrap: anywhere; }
  #grade-four-practice .feedback { border-radius: 8px; padding: 10px 12px; background: var(--mint); color: var(--green); }
  #grade-four-practice .feedback.wrong { background: var(--warm); color: var(--warning); }
  #grade-four-practice .error { color: var(--warning); font-weight: 600; }
  #grade-four-practice .teacher-shell { background: var(--paper); padding: clamp(12px, 3cqw, 26px); overflow-wrap: anywhere; }
  #grade-four-practice .teacher-nav { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  #grade-four-practice .teacher-nav button { border-color: transparent; background: transparent; }
  #grade-four-practice .teacher-nav button[aria-pressed="true"] { color: var(--green); background: var(--mint); }
  #grade-four-practice .between { justify-content: space-between; }
  #grade-four-practice .status { color: var(--green); font-weight: 650; }
  #grade-four-practice .needs-work { color: var(--warning); font-weight: 650; }
  #grade-four-practice .rows { display: grid; gap: 0; list-style: none; padding: 0; }
  #grade-four-practice .rows > li { padding: 8px 0; border-top: 1px solid var(--line); }
  #grade-four-practice details { border-top: 1px solid var(--line); padding: 9px 0; }
  #grade-four-practice summary { font-weight: 650; padding: 5px 0; }
  #grade-four-practice .login-duration { display: inline-block; margin-inline-start: 8px; color: var(--green); font-size: 13px; font-variant-numeric: tabular-nums; }
  #grade-four-practice .detail { display: grid; gap: 8px; margin: 8px 0 0 16px; }
  #grade-four-practice .split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #grade-four-practice .comparison { padding: 13px; background: var(--ground); border-radius: 10px; }
  #grade-four-practice .comparison strong { font-size: 23px; font-variant-numeric: tabular-nums; }
  #grade-four-practice .bar { height: 7px; border-radius: 10px; background: var(--line); overflow: hidden; margin: 5px 0; }
  #grade-four-practice .bar span { display: block; height: 100%; background: var(--green); border-radius: inherit; }
  #grade-four-practice .errors-bar span { background: var(--orange); }
  #grade-four-practice .unit { border: 1px solid var(--line); background: var(--ground); padding: 13px; border-radius: 10px; }
  #grade-four-practice .metrics { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
  #grade-four-practice .metrics strong { font-size: 26px; }
  #grade-four-practice .announcement { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  @container (max-width: 570px) {
    #grade-four-practice .student-shell { grid-template-columns: minmax(0, 1fr); }
    #grade-four-practice .lesson { padding-top: 0; gap: 6px; }
    #grade-four-practice .steps { display: flex; flex-wrap: wrap; column-gap: 12px; row-gap: 4px; }
    #grade-four-practice .steps li { font-size: 12px; gap: 4px; }
    #grade-four-practice .steps li span { width: 19px; height: 19px; }
  }
  @container (max-width: 380px) {
    #grade-four-practice .app-head { padding: 9px 10px; }
    #grade-four-practice .student-shell, #grade-four-practice .teacher-shell { padding: 10px; }
    #grade-four-practice .teacher-nav { gap: 1px; }
    #grade-four-practice .teacher-nav button { padding-inline: 7px; }
    #grade-four-practice .split.form-fields { grid-template-columns: minmax(0, 1fr); }
  }
  @media (pointer: coarse) {
    #grade-four-practice :is(button, .role-switch button, .choice, input:not([type="radio"]), select, summary) { min-height: 44px; }
  }
