/* Smart Student Planner — styles.
   Colours, dark mode, accent colour and text size are all driven by variables set in sync.js (from Settings). */
:root {
  --bg: #f1f4fa; --card: #ffffff; --text: #14203a; --muted: #5d6a82; --line: #dfe5f0;
  --accent: #3b5bdb; --accent-text: var(--accent); --on-accent: #ffffff;
  --soft: color-mix(in srgb, var(--accent) 11%, #ffffff);
  --ok: #1b8a4b; --warn: #b87500; --bad: #cf3f3f;
  --ok-bg: #e3f5ea; --warn-bg: #fff2d6; --bad-bg: #fde6e6;
  --shadow: 0 1px 2px rgba(20, 32, 58, .06), 0 6px 18px rgba(20, 32, 58, .05);
  --fs: 16px; --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e1322; --card: #171e33; --text: #e9edf8; --muted: #9aa5bf; --line: #2a3452;
  --accent-text: color-mix(in srgb, var(--accent) 55%, #ffffff);
  --soft: color-mix(in srgb, var(--accent) 24%, #171e33);
  --ok: #55d28a; --warn: #f0b94a; --bad: #ff8585;
  --ok-bg: #12331f; --warn-bg: #3a2c0c; --bad-bg: #3d1818;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: var(--fs); }
body { margin: 0; font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: var(--accent-text); }
h1, h2, h3 { line-height: 1.2; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 2px; }
input, textarea, select, button { font-family: inherit; font-size: 1rem; }
input, textarea, select { background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: .55rem .7rem; min-width: 0; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
textarea { width: 100%; resize: vertical; }
::placeholder { color: var(--muted); opacity: .8; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 236px; background: var(--card); border-right: 1px solid var(--line); padding: 18px 12px; position: fixed; inset: 0 auto 0 0; overflow-y: auto; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; font-size: .98rem; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: .6rem .8rem; margin-bottom: 3px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .95rem; }
.sidebar nav a:hover { background: var(--bg); }
.sidebar nav a.active { background: var(--soft); color: var(--accent-text); font-weight: 600; }
.side-bottom { margin-top: auto; padding: 10px 8px 0; border-top: 1px solid var(--line); }
.side-bottom p { margin: 0 0 8px; }
.side-bottom button { width: 100%; padding: .55rem; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--text); cursor: pointer; }
.side-bottom button:hover { border-color: var(--accent); }
.content { margin-left: 236px; width: calc(100% - 236px); min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; height: 66px; padding: 0 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-date { font-weight: 600; margin-right: auto; }
.top-right { display: flex; align-items: center; gap: 10px; }
.save-status { font-size: .8rem; color: var(--muted); text-align: right; max-width: 260px; line-height: 1.25; }
.save-status[data-kind="unsaved"], .save-status[data-kind="local"] { color: var(--warn); }
.save-status[data-kind="error"] { color: var(--bad); }
.save-btn { background: var(--accent); color: var(--on-accent); border: 0; border-radius: 10px; padding: .55rem 1rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.save-btn.dirty { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 28%, transparent); }
.save-btn:disabled { opacity: .7; cursor: wait; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 1.05rem; }
.icon-btn:hover { border-color: var(--accent); }
.menu-btn { display: none; }
.avatar { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; border: 2px solid var(--card); box-shadow: 0 0 0 2px var(--accent); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.class-chip { font-size: .78rem; font-weight: 600; background: var(--soft); color: var(--accent-text); border-radius: 99px; padding: .25rem .6rem; }
.class-chip:empty { display: none; }
main { padding: 26px 28px 60px; max-width: 1120px; }
.page-title { margin: 0 0 4px; font-size: 1.7rem; }
.lead { margin: 0 0 20px; color: var(--muted); max-width: 62ch; }
.scrim { display: none; }

.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 14px 0; box-shadow: var(--shadow); }
.box h2 { margin: 0 0 10px; font-size: 1.1rem; }
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.btn, .main-btn { display: inline-block; background: var(--accent); color: var(--on-accent); padding: .65rem 1.2rem; border: 0; border-radius: 10px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover, .main-btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent-text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); }
.btn.small { padding: .35rem .75rem; font-size: .85rem; }
button:disabled { opacity: .65; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { color: var(--text); font-weight: 400; }
.row-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.row-form .grow { flex: 1 1 200px; }
.badge { display: inline-block; font-size: .76rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; background: var(--soft); color: var(--accent-text); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); } .badge.warn { background: var(--warn-bg); color: var(--warn); } .badge.bad { background: var(--bad-bg); color: var(--bad); }
.progress { height: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .35s ease; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; border: 2px dashed var(--line); border-radius: var(--radius); }

/* ---------- home ---------- */
.hello { margin: 0; font-size: 1.9rem; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.tile:hover { transform: translateY(-2px); border-color: var(--accent); }
.tile .k { font-size: .82rem; color: var(--muted); }
.tile .v { font-size: 1.9rem; font-weight: 700; line-height: 1.2; margin: 4px 0; }
.tile .s { font-size: .82rem; color: var(--muted); }
.tile.hot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile.hot .k, .tile.hot .s { color: color-mix(in srgb, var(--on-accent) 85%, transparent); }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; gap: 12px; padding: .55rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.agenda li:last-child { border-bottom: 0; }
.agenda .when { min-width: 5.2rem; font-weight: 600; color: var(--accent-text); font-size: .9rem; }

/* ---------- homework (list with priority stripe) ---------- */
.hw-top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 99px; padding: .35rem .9rem; cursor: pointer; font-size: .88rem; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.hw-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hw-item { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.hw-item.p-high { border-left-color: var(--bad); } .hw-item.p-medium { border-left-color: var(--warn); } .hw-item.p-low { border-left-color: var(--ok); }
.hw-item input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.hw-item .subj { font-size: .78rem; font-weight: 600; color: var(--accent-text); }
.hw-item .task { overflow-wrap: anywhere; }
.hw-item.done .task { text-decoration: line-through; opacity: .55; }
.x-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1.1rem; border-radius: 8px; width: 34px; height: 34px; }
.x-btn:hover { background: var(--bad-bg); color: var(--bad); }

/* ---------- exams (countdown cards) ---------- */
.next-exam { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; background: var(--accent); color: var(--on-accent); border-radius: 20px; padding: 22px 26px; margin: 14px 0 20px; }
.next-exam .big { font-size: 4.2rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.next-exam .big small { display: block; font-size: .95rem; font-weight: 500; letter-spacing: 0; opacity: .9; }
.next-exam h2 { margin: 0 0 4px; font-size: 1.35rem; }
.next-exam p { margin: 0; opacity: .92; }
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.exam-card { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); }
.exam-card.soon { border-top-color: var(--warn); } .exam-card.urgent { border-top-color: var(--bad); } .exam-card.over { border-top-color: var(--line); opacity: .92; }
.exam-card .head { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.exam-card h3 { margin: 0; font-size: 1.02rem; overflow-wrap: anywhere; }
.exam-card .days { font-size: 1.6rem; font-weight: 700; }
.exam-card textarea { margin: 0; font-size: .9rem; min-height: 3.4rem; }
.exam-card .score { display: flex; gap: 8px; align-items: center; font-size: .88rem; }
.exam-card .score input { width: 5.5rem; }

/* ---------- daily checklist ---------- */
.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; background: var(--warn-bg); color: var(--warn); border-radius: 99px; padding: .3rem .8rem; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-item { display: flex; align-items: center; gap: 14px; padding: .8rem .4rem; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--ok); flex: none; }
.check-item label { flex: 1; font-size: 1.05rem; cursor: pointer; }
.check-item.locked label { text-decoration: line-through; color: var(--muted); cursor: default; }
.lock { display: none; font-size: .78rem; color: var(--ok); font-weight: 600; margin-left: 8px; }
.check-item.locked .lock { display: inline-block; text-decoration: none; }
.allclear { background: var(--ok-bg); color: var(--ok); border-radius: 12px; padding: .8rem 1rem; font-weight: 600; margin-top: 12px; }

/* ---------- maths ---------- */
.mq { max-width: 640px; }
.mq-meta { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dots { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 20px; padding-left: 3px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); display: block; }
.dots i.cur { outline: 2px solid var(--accent); outline-offset: 2px; } .dots i.right { background: var(--ok); } .dots i.wrong { background: var(--bad); }
.mq-q { font-size: 2rem; font-weight: 700; margin: 6px 0 4px; overflow-wrap: anywhere; }
.mq-hint { color: var(--muted); margin: 0 0 14px; min-height: 1.4em; }
.mq-answer { display: flex; gap: 10px; flex-wrap: wrap; }
.mq-answer input { font-size: 1.5rem; width: 10rem; text-align: center; font-weight: 600; }
.feedback { margin-top: 16px; padding: .9rem 1rem; border-radius: 12px; font-weight: 600; }
.feedback.right { background: var(--ok-bg); color: var(--ok); } .feedback.wrong { background: var(--bad-bg); color: var(--bad); } .feedback.info { background: var(--warn-bg); color: var(--warn); }
.feedback small { display: block; font-weight: 400; margin-top: 4px; color: var(--text); opacity: .85; }
.score-big { font-size: 3rem; font-weight: 800; margin: 0; }

/* ---------- focus timer ---------- */
.timer-box { max-width: 520px; text-align: center; margin-inline: auto; }
.mode-tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 99px; padding: 4px; margin-bottom: 14px; }
.mode-tabs button { border: 0; background: transparent; color: var(--text); padding: .45rem 1.2rem; border-radius: 99px; cursor: pointer; font-weight: 500; }
.mode-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.ring { position: relative; width: min(320px, 78vw); aspect-ratio: 1; margin: 0 auto 14px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: var(--line); }
.ring .arc { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .3s linear; }
.ring .digits { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .time { font-size: clamp(2.8rem, 15vw, 4.4rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1; }
.ring .label { color: var(--muted); margin-top: 6px; }
.timer-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 520px; margin: 16px auto 0; text-align: center; }
.stats b { display: block; font-size: 1.5rem; }

.music-switch { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px 0 4px; font-size: .9rem; color: var(--muted); cursor: pointer; }

/* ---------- timetable ---------- */
.scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.sheet { width: 100%; border-collapse: collapse; background: var(--card); min-width: 760px; }
.sheet th { background: var(--soft); color: var(--accent-text); text-align: left; padding: .6rem .7rem; border: 1px solid var(--line); font-size: .9rem; }
.sheet td { border: 1px solid var(--line); padding: 4px; }
.sheet td input { width: 100%; border: 1px solid color-mix(in srgb, var(--text) 22%, var(--line)); border-radius: 6px; background: transparent; padding: .6rem .6rem; font-size: .9rem; }
.sheet td input::placeholder { font-size: .8rem; font-style: italic; opacity: .6; }
.sheet td input:hover { border-color: var(--accent); }
.sheet td input:focus { outline-offset: 0; border-color: transparent; }
.sheet th.today { background: var(--accent); color: var(--on-accent); }
.sheet td.today { background: color-mix(in srgb, var(--accent) 7%, var(--card)); }
.sheet td:first-child input { font-weight: 600; }

/* ---------- diary ---------- */
.moods { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }
.moods button { border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: .15rem .6rem; cursor: pointer; font-size: 1.1rem; }
.moods button:hover { border-color: var(--accent); }
.moods button[aria-pressed="true"] { background: var(--soft); border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 35%, transparent); }
.entry textarea { margin-top: 10px; }
.add-entry { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin: 14px 0 30px; padding: .9rem; border: 2px dashed var(--line); border-radius: var(--radius); background: transparent; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; }
.add-entry span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 1.4rem; line-height: 1; }
.add-entry:hover { border-color: var(--accent); background: var(--soft); }
.entry-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.entry-head b { margin-right: auto; }
.entry.today { border-color: var(--accent); }

/* ---------- sudoku ---------- */
.sudoku { border-collapse: collapse; background: var(--card); margin: 10px 0; border: 3px solid var(--text); }
.sudoku td { width: 48px; height: 48px; border: 1px solid var(--line); text-align: center; padding: 0; font-size: 1.3rem; }
.sudoku td input { width: 100%; height: 100%; border: 0; border-radius: 0; text-align: center; font-size: 1.3rem; padding: 0; background: transparent; color: var(--accent-text); font-weight: 600; }
.sudoku td.given { background: var(--soft); font-weight: 700; }
.sudoku td.bad input { background: var(--bad-bg); color: var(--bad); }
.sudoku tr:nth-child(3n) td { border-bottom: 3px solid var(--text); }
.sudoku td:nth-child(3n) { border-right: 3px solid var(--text); }

/* ---------- settings ---------- */
.set-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.photo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.photo-big { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 2.4rem; font-weight: 700; flex: none; }
.photo-big img { width: 100%; height: 100%; object-fit: cover; }
.stack { display: grid; gap: 12px; }
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--text); padding: .4rem .9rem; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--text); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- toasts + modal ---------- */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--text); color: var(--bg); padding: .65rem 1rem; border-radius: 10px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); display: flex; gap: 14px; align-items: center; }
.toast button { background: transparent; border: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.modal { position: fixed; inset: 0; background: rgba(8, 12, 24, .6); display: grid; place-items: center; z-index: 90; padding: 16px; }
.modal-card { background: var(--card); border-radius: 16px; padding: 24px; width: min(420px, 100%); display: grid; gap: 14px; }
.modal-card h2 { margin: 0; }

/* ---------- sign in page ---------- */
.auth { min-height: 100vh; display: flex; background: var(--bg); }
.auth-left { width: 52%; padding: 90px 64px; background: var(--accent); color: var(--on-accent); display: flex; flex-direction: column; justify-content: center; }
.auth-left img { background: #fff; border-radius: 18px; padding: 8px; }
.auth-left h1 { font-size: 2.6rem; margin: 18px 0 10px; line-height: 1.1; }
.auth-left p { font-size: 1.1rem; max-width: 34ch; opacity: .95; }
.auth-card { background: var(--card); width: 430px; margin: auto; padding: 30px; border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.auth-card input:not([type=radio]), .auth-card select { width: 100%; margin: 6px 0; padding: .75rem; }
.auth-card .main-btn { width: 100%; margin-top: 10px; }
.auth-card h2 { margin: 6px 0 12px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.link { background: none; border: 0; color: var(--accent-text); text-decoration: underline; cursor: pointer; padding: 8px 0; }
.error { color: var(--bad); min-height: 20px; margin: 6px 0 0; }
.error.success { color: var(--ok); }
.tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.tabs label { flex: 1; text-align: center; padding: .6rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.tabs label:hover { background: var(--soft); }
#tabLogin:checked ~ .tabs label[for=tabLogin], #tabRegister:checked ~ .tabs label[for=tabRegister] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }
#tabLogin:checked ~ .only-register, #tabLogin:checked ~ * .only-register, #tabRegister:checked ~ .only-login, #tabRegister:checked ~ * .only-login { display: none; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 260px; box-shadow: 8px 0 30px rgba(0, 0, 0, .25); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8, 12, 24, .5); z-index: 25; }
  .content { margin-left: 0; width: 100%; }
  .menu-btn { display: inline-block; }
  .topbar { padding: 0 14px; gap: 8px; }
  .top-date { display: none; }
  .top-right { margin-left: auto; }
  .save-status { display: none; }
  main { padding: 18px 14px 50px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .grid.two, .grid.three, .set-grid { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth { padding: 18px; align-items: center; }
  .auth-card { width: 100%; max-width: 440px; }
  .sudoku td { width: 36px; height: 36px; font-size: 1.1rem; }
  .hw-item { grid-template-columns: auto 1fr auto; }
  .hw-item .badge { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
