:root {
  --bg: #EDEDEA; --surface: #F6F6F4; --ink: #161616; --muted: #62625C;
  --faint: #A6A6A1; --line: #D2D2CD; --inv: #F6F6F4; --accent: #F2C200;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414; --surface: #1C1C1B; --ink: #ECECE9; --muted: #93938C;
    --faint: #4E4E4B; --line: #2F2F2D; --inv: #141414;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Geist', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; height: 100dvh;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--muted); }
button { font-family: inherit; color: inherit; }
input::placeholder, textarea::placeholder { color: var(--faint); }
.mono { font-family: 'Geist Mono', monospace; }

/* ---------- frame ---------- */
#main { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page { max-width: 1120px; margin: 0 auto; padding: 28px 20px 40px; }
.topnav { display: none; }
.tabs {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--ink); background: var(--bg);
}
@media (min-width: 880px) {
  .page { padding: 44px 48px 80px; }
  .tabs { display: none; }
  .topnav {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 18px 48px; border-bottom: 1px solid var(--line);
  }
}
body.session-open .topnav, body.session-open .tabs { display: none; }

.brand { display: flex; align-items: baseline; gap: 16px; }
.brand-name { font-family: 'Geist Mono', monospace; font-size: 13px; font-weight: 500; letter-spacing: .18em; }
.brand-sub { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.navpill { display: flex; border: 1px solid var(--ink); border-radius: 999px; padding: 3px; }
.tabs .navpill { flex: 1; }
.navpill button {
  border: none; cursor: pointer; height: 36px; padding: 0 20px; border-radius: 999px;
  font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .1em;
  background: transparent; color: var(--ink); white-space: nowrap;
}
.tabs .navpill button { flex: 1; height: 42px; padding: 0 4px; font-size: 10px; letter-spacing: .06em; }
.navpill button.active { background: var(--ink); color: var(--inv); }
.addbtn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--ink);
  background: transparent; color: var(--ink); font-size: 20px; font-weight: 300; cursor: pointer; flex: none;
}
.tabs .addbtn { width: 50px; height: 50px; font-size: 22px; }

/* ---------- shared atoms ---------- */
.eyebrow { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.eyebrow.muted, .muted { color: var(--muted); }
.faint { color: var(--faint); }
.h-serif { margin: 0; font-family: 'Newsreader', serif; font-weight: 400; font-size: 36px; line-height: 1.02; letter-spacing: -.015em; }
.rule-ink { height: 1px; background: var(--ink); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.pill {
  height: 50px; border-radius: 999px; font-family: 'Geist Mono', monospace; font-size: 12px;
  letter-spacing: .06em; cursor: pointer; white-space: nowrap; padding: 0 10px;
}
.pill.primary { border: none; background: var(--ink); color: var(--inv); }
.pill.ghost { border: 1px solid var(--ink); background: transparent; color: var(--ink); letter-spacing: .1em; }
.pill.tall { height: 54px; font-size: 13px; letter-spacing: .12em; }
.chk {
  flex: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 13px; padding: 0;
  border: 1px solid var(--ink); background: transparent; color: var(--inv);
}
.chk.on { background: var(--ink); }
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; background: var(--ink); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
@media (min-width: 880px) {
  .grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
  .h-serif { font-size: 52px; }
}
.stack { display: flex; flex-direction: column; }
.list-ink { border-top: 1px solid var(--ink); }

.intro-dots { display: flex; gap: 8px; padding: 8px 0; }
.intro-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.intro-dots i.on { background: var(--accent); }
.setup-row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.setup-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.setup-t { font-size: 15px; font-weight: 500; }
.setup-s { font-size: 13px; line-height: 1.5; color: var(--muted); }
.setup-link { font-size: 13px; line-height: 1.5; }
.week-row { display: flex; gap: 10px; font-size: 14px; line-height: 1.5; }
.wk-mark { flex: none; width: 16px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.next-desc, .ses-sub, .setup-s { overflow-wrap: anywhere; }

/* ---------- today ---------- */
.today-head { display: flex; flex-direction: column; gap: 10px; }
.min-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.5;
}
.min-banner button {
  flex: none; border: none; background: transparent; color: var(--ink); cursor: pointer; padding: 0;
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em;
  text-decoration: underline; text-underline-offset: 3px;
}
.next-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.next-eyebrow { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .12em; }
.next-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.next-title { font-family: 'Newsreader', serif; font-size: 26px; line-height: 1.1; text-wrap: pretty; }
@media (min-width: 880px) { .next-title { font-size: 32px; } }
.next-meta { font-size: 14px; color: var(--muted); }
.next-desc { font-size: 15px; line-height: 1.5; }
.next-src { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
a.next-src { color: var(--muted); }
.next-btns { display: grid; gap: 8px; padding-top: 4px; }
.hours-card {
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left; width: 100%;
}
.hours-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; width: 100%; }
.hours-line .n { flex: none; font-family: 'Geist Mono', monospace; font-size: 12px; white-space: nowrap; }
.attn-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 0;
  border: none; border-top: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left;
}
.attn-mark { flex: none; width: 16px; font-size: 13px; color: var(--muted); }
.attn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.attn-title { font-size: 15px; }
.attn-meta { font-size: 13px; color: var(--muted); }
.attn-cta { flex: none; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em; }
.rest-row { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rest-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: none;
  background: transparent; color: var(--ink); cursor: pointer; text-align: left; padding: 0;
}
.rest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rest-title { font-size: 16px; font-weight: 500; }
.rest-title.done { color: var(--muted); text-decoration: line-through; }
.rest-sub { font-size: 13px; line-height: 1.45; color: var(--muted); }
.rest-min { flex: none; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--muted); }
.rest-chev { flex: none; color: var(--muted); font-size: 18px; }
.logbtns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.logbtns .pill { height: 46px; }
.logbtns .pill:hover { background: var(--ink); color: var(--inv); }
.log-line { font-size: 13px; color: var(--muted); }
.big-ghost {
  height: 52px; border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--ink); font-size: 15px; cursor: pointer; width: 100%;
}
.big-ghost:hover { border-color: var(--ink); }

/* ---------- session ---------- */
.ses-wrap { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.ses-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.ses-exit {
  min-height: 44px; border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
  font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em;
}
.ses-clock { display: flex; align-items: center; gap: 8px; font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em; }
.ses-clock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ses-label { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .1em; }
.ses-segs { display: flex; gap: 6px; }
.seg { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.seg i { display: block; height: 4px; border-radius: 2px; background: var(--line); }
.seg.cur i { background: var(--accent); }
.seg.done i { background: var(--ink); }
.seg span { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.seg.cur span, .seg.done span { color: var(--ink); }
.ses-kind { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .12em; color: var(--muted); }
.ses-text { font-family: 'Newsreader', serif; font-size: 26px; line-height: 1.15; letter-spacing: -.01em; text-wrap: pretty; }
@media (min-width: 880px) { .ses-text { font-size: 34px; } }
.ses-sub { font-size: 15px; line-height: 1.55; color: var(--muted); }
.hint-row { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.hint-label { flex: none; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); padding-top: 4px; width: 64px; }
.hint-text { font-family: 'Newsreader', serif; font-size: 19px; }
.hint-btn {
  align-self: flex-start; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; font-size: 14px;
}
.rate-btn {
  display: flex; justify-content: space-between; align-items: center; height: 52px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; font-size: 15px; width: 100%;
}
.rate-btn:hover { background: var(--ink); color: var(--inv); }
.rate-btn .sub { font-size: 13px; opacity: .7; }
.complete-title { font-family: 'Newsreader', serif; font-size: 36px; line-height: 1.05; }
@media (min-width: 880px) { .complete-title { font-size: 52px; } }
.fb-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.fb-mark { flex: none; width: 18px; }
.fb-mark.dim { color: var(--muted); }
.catch { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.catch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; }
.catch input {
  height: 44px; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  color: var(--ink); font-size: 15px; padding: 0 12px; outline: none; min-width: 0; font-family: inherit;
}
.catch .add { height: 44px; padding: 0 16px; border-radius: 999px; border: none; background: var(--ink); color: var(--inv); cursor: pointer; font-size: 14px; }
.caught-line { font-size: 13px; color: var(--muted); }
.ses-finish { align-self: flex-start; height: 48px; padding: 0 24px; }

/* ---------- listen ---------- */
.listen-head { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.listen-head p { margin: 0; font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.cat-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.cat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cat-title { font-family: 'Newsreader', serif; font-size: 26px; line-height: 1.1; }
.cat-tag { flex: none; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.cat-when { font-size: 14px; color: var(--muted); line-height: 1.5; }
.cat-tip { font-size: 14px; line-height: 1.55; }
.cat-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cat-item .chk { width: 24px; height: 24px; margin-top: 1px; font-size: 11px; }
.cat-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cat-item-title { font-size: 15px; font-weight: 500; }
.cat-item-sub { font-size: 13px; line-height: 1.5; color: var(--muted); }
.cat-item a { font-size: 14px; align-self: flex-start; }
.acc-btn {
  display: grid; grid-template-columns: minmax(0, 1fr) auto 14px; align-items: center; gap: 14px;
  width: 100%; padding: 18px 0; border: none; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer; text-align: left;
}
.acc-title { font-size: 16px; color: var(--muted); }
.acc-when { font-size: 13px; color: var(--faint); }
.acc-unlock { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.acc-chev { color: var(--muted); font-size: 18px; display: inline-block; }
.acc-chev.open { transform: rotate(90deg); }
.acc-body { display: flex; flex-direction: column; gap: 2px; padding: 0 0 18px; color: var(--muted); border-bottom: 1px solid var(--line); }
.acc-item { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); }
.acc-item-t { font-size: 14px; font-weight: 500; }
.acc-item-s { font-size: 13px; line-height: 1.5; }
.acc-note { font-size: 13px; font-style: italic; color: var(--faint); padding-top: 8px; }

/* ---------- words ---------- */
.rev-top { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); }
.rev-pos { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.rev-pos .n { font-family: 'Geist Mono', monospace; font-size: 12px; }
.flash {
  display: flex; flex-direction: column; gap: 22px; padding: 28px 24px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); min-height: 260px;
}
.flash-fr { font-family: 'Newsreader', serif; font-size: 48px; line-height: 1.05; }
.flash-from { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.flash-bottom { display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.flash-en { font-size: 24px; color: var(--muted); }
.flash-note { font-size: 14px; color: var(--muted); }
.grades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.grade {
  height: 52px; border-radius: 999px; cursor: pointer; font-size: 15px; border: 1px solid var(--ink);
  background: transparent; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
}
.grade .sub { font-family: 'Geist Mono', monospace; font-size: 9px; letter-spacing: .08em; opacity: .7; }
.grade.good { background: var(--ink); color: var(--inv); }
.no-due { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.add-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input {
  height: 46px; border: 1px solid var(--line); border-radius: 10px; background: transparent;
  color: var(--ink); font-size: 16px; padding: 0 14px; outline: none; font-family: inherit; width: 100%;
}
.cog-btn {
  display: flex; align-items: center; gap: 12px; border: none; background: transparent; color: var(--ink);
  cursor: pointer; padding: 2px 0; text-align: left; font-size: 14px;
}
.cog-box {
  flex: none; width: 20px; height: 20px; border-radius: 5px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; border: 1px solid var(--ink); background: transparent; color: var(--inv);
}
.cog-box.on { background: var(--ink); }
.wrow { display: flex; align-items: baseline; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.wrow .fr { font-size: 16px; font-weight: 500; flex: none; }
.wrow .en { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wrow .st { flex: none; font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .08em; color: var(--muted); }
.wrow .st.due { color: var(--ink); }
.wrow .x { flex: none; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 16px; padding: 0 2px; }

/* ---------- plan ---------- */
.skill-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.skill-title { font-size: 15px; }
.skill-meta { font-size: 12px; color: var(--muted); }
.skill-segs { display: flex; gap: 3px; margin-top: 8px; }
.skill-segs i { flex: 1; height: 5px; border-radius: 2px; background: var(--line); }
.skill-segs i.on { background: var(--ink); }
.skill-state { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .08em; text-align: right; color: var(--muted); }
.skill-state.on { color: var(--ink); }
.ev-row { display: flex; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.bang-btn {
  display: flex; align-items: center; gap: 16px; width: 100%; padding: 20px 0; border: none;
  border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; text-align: left;
}
.bang-num { font-family: 'Geist Mono', monospace; font-size: 13px; color: var(--muted); width: 24px; flex: none; }
.bang-title { flex: 1; font-family: 'Newsreader', serif; font-size: 20px; line-height: 1.15; }
@media (min-width: 880px) { .bang-title { font-size: 24px; } }
.bang-body { padding: 0 0 22px 40px; font-size: 15px; line-height: 1.6; max-width: 720px; text-wrap: pretty; border-bottom: 1px solid var(--line); }
.rules-card { padding: 24px; border-radius: 16px; border: 1px solid var(--line); }
.rule-row { display: flex; flex-direction: column; gap: 3px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rule-r { font-size: 15px; font-weight: 500; }
.rule-x { font-size: 13px; color: var(--muted); }
.linkish { align-self: flex-start; border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 0; font-size: 13px; }
.quiz-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.quiz-q { font-family: 'Newsreader', serif; font-size: 28px; line-height: 1.15; }
.quiz-opt {
  height: 48px; padding: 0 18px; border-radius: 999px; text-align: left; cursor: pointer; font-size: 16px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink);
}
.quiz-opt.wrong { border-color: var(--line); color: var(--faint); text-decoration: line-through; }
.quiz-opt.right { background: var(--ink); color: var(--inv); }
.quiz-hint { font-size: 14px; line-height: 1.5; padding: 10px 0; border-top: 1px solid var(--line); }
.quiz-hint .tag { font-family: 'Geist Mono', monospace; font-size: 10px; letter-spacing: .1em; color: var(--muted); }
.quiz-fb { font-size: 15px; line-height: 1.5; }
.habit-row {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 15px 0; border: none;
  border-bottom: 1px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; text-align: left; font-size: 15px; line-height: 1.4;
}
.habit-row .chk { width: 24px; height: 24px; font-size: 11px; }
.settings-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 20px; border-radius: 16px; border: 1px solid var(--line); }
.settings-card .span2 { grid-column: 1 / -1; }
.settings-card input { font-family: 'Geist Mono', monospace; font-size: 15px; }
.data-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.small-pill { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; font-size: 13px; }
.small-pill.danger { border-color: var(--line); color: var(--muted); }

.field textarea, .field select, .week-grid input {
  width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; padding: 12px;
}
.field textarea { resize: vertical; line-height: 1.5; }
.field select { text-overflow: ellipsis; }
.slot-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.small-pill.selected { background: var(--ink); color: var(--inv); }
.week-grid { display: grid; grid-template-columns: 44px minmax(0,1fr) minmax(0,1fr); align-items: center; gap: 10px; font-size: 13px; }
.progress-note { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.feedback-entry { display: flex; flex-direction: column; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--line); line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.feedback-entry ins { text-decoration: none; background: var(--surface); border-bottom: 2px solid var(--accent); }
.cloze-text { font-size: 27px; line-height: 1.4; }
#study-settings, #feedback-panel { scroll-margin-top: 20px; }
.no-due, .ses-label { overflow-wrap: anywhere; }
.settings-card details summary { padding: 10px 0; cursor: pointer; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(84px + var(--safe-bottom));
  background: var(--ink); color: var(--bg); font-size: 13px; padding: 8px 14px; border-radius: 20px;
  opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 50; max-width: 85%;
}
#toast.show { opacity: .92; }
