/* Taalbrug – Niederländisch lernen */
:root {
  --orange: #F26B1D;
  --orange-dark: #D4560E;
  --orange-soft: #FFE8D9;
  --navy: #14213D;
  --blue: #2B59C3;
  --blue-soft: #E6EDFB;
  --ink: #14213D;
  --muted: #5F6878;
  --bg: #FBF7F2;
  --card: #FFFFFF;
  --line: #ECE4DA;
  --green: #1E8E5A;
  --green-soft: #DDF3E7;
  --red: #C93A12;
  --red-soft: #FDE6DD;
  --yellow: #F4B400;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20,33,61,.06), 0 4px 16px rgba(20,33,61,.05);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }

/* ---------- Boot / Login ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 24px; justify-items: center; }
.boot-logo, .logo { font-weight: 800; font-size: 34px; letter-spacing: -.02em; color: var(--navy); }
.boot-logo span, .logo span { color: var(--orange); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--orange); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth { max-width: 420px; margin: 0 auto; padding: calc(48px + var(--safe-t)) 20px 40px; }
.auth .logo { text-align: center; }
.auth .tagline { text-align: center; color: var(--muted); margin: 6px 0 28px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input {
  width: 100%; padding: 13px 14px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  outline: none; transition: border-color .15s; font-size: 17px;
}
.input:focus { border-color: var(--blue); }
.check { display: flex; gap: 10px; align-items: center; margin: 4px 0 18px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--orange); }
.msg-error { background: var(--red-soft); color: var(--red); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 15px; }
.link-btn { background: none; border: 0; color: var(--blue); padding: 8px; font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 14px; padding: 14px 20px; font-weight: 700; font-size: 17px;
  background: var(--orange); color: #fff; box-shadow: 0 3px 0 var(--orange-dark);
  transition: transform .06s, box-shadow .06s, opacity .15s; text-decoration: none; user-select: none;
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--orange-dark); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.secondary { background: #fff; color: var(--navy); box-shadow: 0 3px 0 var(--line); border: 2px solid var(--line); }
.btn.blue { background: var(--blue); box-shadow: 0 3px 0 #1E3F8F; }
.btn.green { background: var(--green); box-shadow: 0 3px 0 #146B43; }
.btn.red { background: var(--red); box-shadow: 0 3px 0 #8E290C; }
.btn.small { padding: 9px 14px; font-size: 15px; border-radius: 12px; }
.btn.ghost { background: transparent; color: var(--muted); box-shadow: none; }

.speak-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--blue-soft); color: var(--blue); display: inline-grid; place-items: center;
  transition: transform .1s, background .15s;
}
.speak-btn:active { transform: scale(.92); }
.speak-btn.playing { background: var(--blue); color: #fff; }
.speak-btn svg { width: 20px; height: 20px; }
.speak-btn.big { width: 64px; height: 64px; }
.speak-btn.big svg { width: 30px; height: 30px; }
.speak-btn.slow { width: 44px; height: 44px; font-size: 20px; }

/* ---------- Layout ---------- */
.shell { max-width: 760px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 16px calc(var(--nav-h) + 28px + var(--safe-b)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 14px; }
.topbar .logo { font-size: 24px; }
.pill { white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 15px; }
.pill.fire { color: var(--orange); }
.pills { display: flex; gap: 8px; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
.nav-inner { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--nav-h); }
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: 11.5px; font-weight: 600; position: relative;
}
.nav a .ico { font-size: 22px; line-height: 1; filter: grayscale(.7); opacity: .75; }
.nav a.active { color: var(--orange); }
.nav a.active .ico { filter: none; opacity: 1; }
.nav .badge { position: absolute; top: 6px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 19px; margin-bottom: 8px; }
.card h3 { font-size: 16px; margin-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 22px 4px 10px; }

/* ---------- Dashboard ---------- */
.hello h1 { font-size: 26px; }
.hello p { margin: 4px 0 0; color: var(--muted); }
.goal { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--orange) calc(var(--p) * 1%), var(--orange-soft) 0); }
.ring::before { content: ""; grid-area: 1/1; width: 66px; height: 66px; border-radius: 50%; background: #fff; }
.ring b { grid-area: 1/1; font-size: 17px; z-index: 1; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 70px; margin-top: 12px; }
.week .bar { display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.week .bar i { display: block; width: 100%; max-width: 26px; border-radius: 6px 6px 3px 3px; background: var(--orange-soft); min-height: 4px; }
.week .bar.hit i { background: var(--orange); }
.week .bar span { font-size: 11px; color: var(--muted); font-weight: 600; }
.week .bar.today span { color: var(--ink); }

.cta-card { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.cta-card .emoji { font-size: 34px; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--orange-soft); flex: none; }
.cta-card .emoji.blue { background: var(--blue-soft); }
.cta-card .grow { flex: 1; min-width: 0; }
.cta-card .arrow { font-size: 22px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12.5px; color: var(--muted); }
.wotd { display: flex; align-items: center; gap: 12px; }
.wotd .nl { font-size: 22px; font-weight: 800; }

/* ---------- Lektionsliste ---------- */
.path { position: relative; }
.lesson-item { display: flex; align-items: center; gap: 14px; padding: 14px; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; box-shadow: var(--shadow); }
.lesson-item .lico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; background: var(--orange-soft); flex: none; position: relative; }
.lesson-item.done .lico { background: var(--green-soft); }
.lesson-item.done .lico::after { content: "✓"; position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.lesson-item.next { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.lesson-item .num { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.lesson-item h3 { font-size: 17px; margin: 1px 0 2px; }
.lesson-item p { margin: 0; font-size: 14px; color: var(--muted); }
.lesson-item .grow { flex: 1; min-width: 0; }
.score-chip { font-size: 13px; font-weight: 700; color: var(--green); white-space: nowrap; }

/* ---------- Lektion ---------- */
.lesson-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.back { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 20px; flex: none; text-decoration: none; color: var(--ink); }
.lesson-head h1 { font-size: 21px; }
.lesson-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px; scrollbar-width: none; position: sticky; top: 0; z-index: 5; background: var(--bg); padding-top: 8px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; color: var(--muted); }
.tab.active { border-color: var(--orange); color: var(--orange); background: var(--orange-soft); }
.intro { font-size: 17px; }
.gram h3 { font-size: 17px; margin-bottom: 8px; }
.gram p { margin: 0 0 10px; }
.tip { background: #FFF7E0; border-left: 4px solid var(--yellow); padding: 10px 14px; border-radius: 10px; font-size: 15px; margin-top: 10px; }
.tbl { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 15px; }
.tbl td, .tbl th { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl-wrap { overflow-x: auto; }
.ex-list { display: flex; flex-direction: column; gap: 2px; }
.ex { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-bottom: 1px dashed var(--line); }
.ex:last-child { border-bottom: 0; }
.ex .t { flex: 1; min-width: 0; }
.ex .nl { font-weight: 700; font-size: 17px; }
.ex .de { color: var(--muted); font-size: 15px; }
.ex .note { display: inline-block; font-size: 12px; font-weight: 700; color: var(--red); background: var(--red-soft); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }
.art { color: var(--blue); font-weight: 600; }
.art.het { color: var(--orange-dark); }

.dialog { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 86%; background: #fff; border: 1px solid var(--line); border-radius: 18px 18px 18px 6px; padding: 10px 14px; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.bubble.right { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: var(--blue-soft); border-color: #D2DDF6; }
.bubble.active { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.bubble .who { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.bubble .nl { font-weight: 600; font-size: 17px; }
.bubble .de { color: var(--muted); font-size: 14.5px; }
.dialog.hide-de .bubble .de { display: none; }
.bubble button { background: none; border: 0; padding: 0; text-align: left; width: 100%; }

.start-bar { position: sticky; bottom: calc(var(--nav-h) + 12px + var(--safe-b)); z-index: 4; margin-top: 18px; }

/* ---------- Übungs-Session (Vollbild) ---------- */
.session { position: fixed; inset: 0; background: var(--bg); z-index: 50; display: flex; flex-direction: column; }
.session-top { display: flex; align-items: center; gap: 12px; padding: calc(12px + var(--safe-t)) 16px 8px; max-width: 760px; width: 100%; margin: 0 auto; }
.close-x { width: 40px; height: 40px; border: 0; background: none; font-size: 26px; color: var(--muted); flex: none; }
.progress { flex: 1; height: 16px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), #FF9A52); border-radius: 999px; transition: width .35s ease; }
.session-body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; max-width: 760px; width: 100%; margin: 0 auto; }
.session-foot { border-top: 1px solid var(--line); background: #fff; padding: 14px 16px calc(14px + var(--safe-b)); transition: background .2s; }
.session-foot .inner { max-width: 760px; margin: 0 auto; }
.session-foot.ok { background: var(--green-soft); border-color: #BFE6D0; }
.session-foot.bad { background: var(--red-soft); border-color: #F6C6B4; }
.feedback { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.feedback .big { font-size: 30px; line-height: 1; }
.feedback h3 { font-size: 19px; }
.session-foot.ok h3 { color: var(--green); }
.session-foot.bad h3 { color: var(--red); }
.feedback .sol { font-size: 16px; margin-top: 2px; }
.feedback .sol b { font-weight: 800; }

.task-label { font-size: 14px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 8px; }
.prompt { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; }
.prompt .text { font-size: 26px; font-weight: 800; line-height: 1.25; }
.prompt .sub { color: var(--muted); font-size: 16px; margin-top: 4px; }
.prompt.q .text { font-size: 22px; }
.prompt.listen { justify-content: center; gap: 18px; margin: 18px 0 28px; }

.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  text-align: left; width: 100%; background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px;
  font-size: 18px; font-weight: 600; box-shadow: 0 2px 0 var(--line); transition: border-color .12s, background .12s, transform .06s;
  display: flex; align-items: center; gap: 12px;
}
.opt:active { transform: translateY(1px); }
.opt .k { flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--muted); }
.opt.sel { border-color: var(--blue); background: var(--blue-soft); }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt:disabled { cursor: default; }

.answer-input { width: 100%; min-height: 110px; resize: none; border: 2px solid var(--line); border-radius: 16px; padding: 14px; font-size: 19px; background: #fff; outline: none; }
.answer-input:focus { border-color: var(--blue); }
.hint-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip-key { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; font-weight: 700; }

.build { min-height: 64px; border-bottom: 2px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 14px; margin-bottom: 18px; align-content: flex-start; }
.bank { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.tile { border: 2px solid var(--line); background: #fff; border-radius: 12px; padding: 9px 14px; font-size: 18px; font-weight: 600; box-shadow: 0 2px 0 var(--line); transition: opacity .15s; }
.tile.used { opacity: 0; pointer-events: none; }

.match { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.match .col { display: flex; flex-direction: column; gap: 10px; }
.mitem { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; font-size: 16px; font-weight: 600; min-height: 56px; box-shadow: 0 2px 0 var(--line); transition: all .15s; }
.mitem.sel { border-color: var(--blue); background: var(--blue-soft); }
.mitem.done { opacity: .25; pointer-events: none; border-color: var(--green); }
.mitem.err { border-color: var(--red); background: var(--red-soft); animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; font-size: 40px; display: grid; place-items: center; margin: 10px auto; box-shadow: 0 4px 0 var(--orange-dark); }
.mic.listening { animation: pulse 1.2s infinite; background: var(--red); box-shadow: 0 4px 0 #8E290C; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201,58,18,.45); } 70% { box-shadow: 0 0 0 22px rgba(201,58,18,0); } 100% { box-shadow: 0 0 0 0 rgba(201,58,18,0); } }
.heard { text-align: center; color: var(--muted); min-height: 24px; margin-top: 6px; }

.flash { text-align: center; padding: 26px 18px; min-height: 220px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; }
.flash .front { font-size: 30px; font-weight: 800; line-height: 1.25; }
.flash .flip-back { font-size: 22px; color: var(--muted); margin-top: 6px; width: 100%; }
.flash .flip-back::before { content: ""; display: block; width: 70%; margin: 0 auto 14px; border-top: 2px dashed var(--line); }
.flash .back b { color: var(--ink); }
.grades { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.grades .btn { padding: 12px 6px; font-size: 15px; flex-direction: column; gap: 0; }
.grades .btn small { font-weight: 600; opacity: .85; font-size: 12px; }

.result { text-align: center; padding: 30px 10px; }
.result .trophy { font-size: 72px; }
.result h2 { font-size: 28px; margin: 8px 0 6px; }
.result .xp { display: inline-flex; gap: 10px; margin: 16px 0 24px; }
.result .xp .pill { font-size: 17px; padding: 10px 16px; }

/* ---------- Üben & Wörter ---------- */
.practice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: left; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.pcard .e { font-size: 30px; }
.pcard b { font-size: 16px; }
.pcard span { font-size: 13.5px; color: var(--muted); }
.pcard:disabled { opacity: .5; }

.search { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 6px 0 10px; }
.word-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.word-row .t { flex: 1; min-width: 0; }
.word-row .nl { font-weight: 700; }
.word-row .de { color: var(--muted); font-size: 14.5px; }
.lvl { font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.lvl.new { background: #EEF0F3; color: var(--muted); }
.lvl.learn { background: var(--orange-soft); color: var(--orange-dark); }
.lvl.good { background: var(--blue-soft); color: var(--blue); }
.lvl.master { background: var(--green-soft); color: var(--green); }
.filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

/* ---------- Einstellungen ---------- */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row .t { flex: 1; }
.set-row .t small { display: block; color: var(--muted); font-size: 13.5px; }
.select { padding: 10px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; max-width: 190px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::before { transform: translateX(22px); }
input[type=range] { accent-color: var(--orange); width: 150px; }

.banner { background: #FFF7E0; border: 1px solid #F6DE9A; border-radius: 14px; padding: 12px 14px; font-size: 14.5px; margin-bottom: 14px; }
.banner.offline { background: var(--blue-soft); border-color: #D2DDF6; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 22px + var(--safe-b)); transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 600; opacity: 0; transition: .25s; z-index: 100; max-width: 90vw; text-align: center; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.footer-note { text-align: center; color: var(--muted); font-size: 13px; margin: 26px 0 6px; }
.footer-note a { color: var(--muted); }

@media (min-width: 700px) {
  .options.grid { display: grid; grid-template-columns: 1fr 1fr; }
  .prompt .text { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- Mehrsprachigkeit ---------- */
.tt { display: inline; }
.rom { display: block; font-size: .62em; font-weight: 500; color: var(--muted); letter-spacing: .01em; margin-top: 2px; }
.ex .nl .rom, .word-row .nl .rom, .wotd .rom { font-size: 14px; }
.bubble .rom { font-size: 13.5px; color: var(--muted); font-style: italic; }
.prompt .text .rom { font-size: 17px; margin-top: 4px; }
.opt .rom { font-size: 13.5px; font-weight: 500; }
.mitem .rom { font-size: 12px; }
.feedback .rom, .tt.inl + .rom { display: inline; margin-left: 6px; font-size: 14px; }
.flash .front .rom { font-size: 17px; }
.back-t { font-size: 26px; }
.back-t .rom { font-size: 16px; }
.gap { display: inline-block; min-width: 46px; border-bottom: 3px solid var(--orange); }
.kanabig { font-size: 72px; line-height: 1.1; font-weight: 700; }
.romabig { font-size: 44px; font-weight: 800; }
.prompt:has(.kanabig), .prompt:has(.romabig) { justify-content: center; margin: 14px 0 26px; }
.options.kana .opt { justify-content: center; font-size: 30px; padding: 16px; }
.options.kana .opt .k { display: none; }
.kana-tbl td { padding: 4px; text-align: center; }
.kcell { width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 2px; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
.kcell:active { transform: scale(.95); }
.kcell span { font-size: 26px; font-weight: 700; line-height: 1.1; }
.kcell small { font-size: 12px; color: var(--muted); font-weight: 600; }
.session-flag { font-size: 22px; }
.pill-lbl { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.pill { cursor: pointer; }
.flags { text-align: center; font-size: 28px; letter-spacing: 6px; margin: -12px 0 22px; }
.link-row { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 8px 0; color: var(--blue); font-weight: 600; }

.sheet-wrap { position: fixed; inset: 0; background: rgba(20,33,61,.35); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.sheet { background: var(--bg); width: 100%; max-width: 560px; border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + var(--safe-b)); animation: slideup .2s ease; }
@keyframes slideup { from { transform: translateY(40px); } }
.sheet h2 { font-size: 20px; margin-bottom: 14px; }
.course-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.course-opt { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px; text-align: left; }
.course-opt.on { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.course-opt .cflag { font-size: 36px; }
.course-opt .grow { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.course-opt b { font-size: 17px; }
.course-opt .due { color: var(--red); }
.cbar { display: block; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.cbar i { display: block; height: 100%; background: var(--orange); border-radius: 999px; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { border-radius: 24px; } }
@media (max-width: 420px) { .pill-lbl { display: none; } .topbar .logo { font-size: 22px; } }
