/* Shared base for every skin. Brand colours come from the Brand English logo + Toby. */
:root {
  --tb-navy: #1d3d9a;
  --tb-navy-dark: #142b6e;
  --tb-lime: #8cc63f;
  --tb-lime-dark: #5f9a1c;
  /* buttons with white text: deeper green and orange so the text is easy to read (Derek 09/11/2026, option B) */
  --tb-btn-green: #4f8f17;
  --tb-btn-green-dark: #376a0c;
  --tb-btn-orange: #c85f00;
  --tb-btn-orange-dark: #8f4400;
  --tb-orange: #f28c1e;
  --tb-yellow: #ffd23f;
  --tb-teal: #1fb5ad;
  --tb-purple: #b45dd9;
  --tb-pink: #f06292;
  --tb-red: #e53935;
  --tb-ink: #1f2937;
  --tb-muted: #555e6e;
  --tb-bg: #f5f9ff;
  --tb-card: #ffffff;
  --tb-line: #dbe4f3;
  --tb-radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--tb-bg);
  color: var(--tb-ink);
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; }
a { color: var(--tb-navy); }

.tb-wrap { max-width: 1040px; margin: 0 auto; padding: 16px; }

/* top bar */
.tb-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 16px; background: #fff; border-bottom: 3px solid var(--tb-lime);
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.tb-brand img { height: 44px; display: block; }
.tb-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 700; }
.tb-nav a { text-decoration: none; }
.tb-who { color: var(--tb-muted); font-weight: 600; margin: 0 8px; }
.tb-logout {
  padding: 8px 14px; border-radius: 999px; background: #eef2fb; min-height: 40px;
  display: inline-flex; align-items: center;
}
/* Vocabulary / Speaking buttons (includes/app_links.php) */
.tb-app-btn {
  /* Derek 28/11/2026: plain white like the other menu items; only the page you are on is highlighted */
  padding: 8px 14px; border-radius: 999px; background: #fff; color: var(--tb-navy) !important; min-height: 40px;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
}
.tb-nav > a:not(.tb-logout) { padding: 8px 9px; border-radius: 999px; }
.tb-nav > a:not(.tb-logout):hover { background: #f3f6fc; }
.tb-nav a.tb-nav-on { background: #eef2fb; }

/* cards, buttons, forms */
.tb-card { background: var(--tb-card); border-radius: var(--tb-radius); box-shadow: 0 4px 18px rgba(29, 61, 154, .08); padding: 20px; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--tb-btn-green); color: #fff; font: inherit; font-weight: 800; font-size: 1.1rem;
  text-decoration: none; box-shadow: 0 4px 0 var(--tb-btn-green-dark); transition: transform .08s;
}
.tb-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--tb-btn-green-dark); }
.tb-btn.navy { background: var(--tb-navy); box-shadow: 0 4px 0 var(--tb-navy-dark); }
.tb-btn.block { width: 100%; }

.tb-field { margin-bottom: 16px; }
.tb-field label { display: block; font-weight: 800; margin-bottom: 6px; }
.tb-field .vi { font-weight: 600; color: var(--tb-muted); font-size: .9em; }
.tb-input {
  width: 100%; min-height: 52px; padding: 10px 16px; font: inherit; font-size: 1.1rem;
  border: 2px solid var(--tb-line); border-radius: 14px; background: #fff;
}
.tb-input:focus { outline: none; border-color: var(--tb-navy); box-shadow: 0 0 0 4px rgba(29, 61, 154, .15); }

.tb-alert { padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; font-weight: 700; }
.tb-alert.err { background: #fdecea; color: #a12622; }
.tb-alert.ok { background: #eaf7e0; color: #2f6b12; }
.tb-alert.info { background: #e8f0ff; color: var(--tb-navy-dark); }

.vi-line { display: block; color: var(--tb-muted); font-size: .92em; }

/* login */
.tb-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tb-login-box { display: grid; grid-template-columns: 220px 1fr; gap: 8px; align-items: end; max-width: 720px; width: 100%; }
.tb-login-box .toby { align-self: end; }
.tb-login-box .toby img { display: block; width: 100%; height: auto; mix-blend-mode: multiply; }
.tb-login-box .tb-card { padding: 28px; }
.tb-login-logo { display: block; height: 72px; margin: 0 auto 8px; }
.tb-login h1 { text-align: center; margin: 0 0 4px; font-size: 1.6rem; }
.tb-login .sub { text-align: center; color: var(--tb-muted); margin: 0 0 20px; }
@media (max-width: 640px) {
  .tb-login-box { grid-template-columns: 1fr; }
  .tb-login-box .toby { max-width: 130px; margin: 0 auto -18px; position: relative; z-index: 1; }
}

/* tables (staff pages) */
.tb-table { width: 100%; border-collapse: collapse; background: #fff; }
.tb-table th, .tb-table td { padding: 10px 12px; border-bottom: 1px solid var(--tb-line); text-align: left; }
.tb-table th { background: #eef2fb; font-weight: 800; }
.tb-scroll { overflow-x: auto; }

/* ================================================================ stars */
.tb-stars { color: var(--tb-yellow); letter-spacing: 2px; font-size: 1.25rem; text-shadow: 0 1px 0 #c79a00; white-space: nowrap; }
.tb-stars .off { color: #d9dee8; text-shadow: none; }
.tb-big-stars .tb-stars { font-size: 2.6rem; }

/* ================================================================ homework list */
.tb-homework { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 26px; }
.tb-hw { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: #fff; border-radius: 20px; text-decoration: none; color: var(--tb-ink);
  border: 3px solid var(--tb-lime); box-shadow: 0 5px 0 var(--tb-line); }
.tb-hw.complete { border-color: var(--tb-line); opacity: .85; }
.tb-hw.overdue { border-color: var(--tb-red); }
.tb-hw .lbl { font-weight: 800; font-size: 1.15rem; color: var(--tb-navy); }
.tb-hw .unit-t { color: var(--tb-muted); font-weight: 600; }
.tb-hw .bar { height: 10px; background: #eef2fb; border-radius: 99px; overflow: hidden; }
.tb-hw .bar span { display: block; height: 100%; background: var(--tb-lime); border-radius: 99px; }
.tb-hw .meta { font-size: .92rem; color: var(--tb-muted); }
.tb-hw .meta b { color: #c62828; }
.tb-new { display: inline-block; padding: 2px 10px; border-radius: 99px; background: var(--tb-red); color: #fff; font-size: .8rem; font-weight: 800; vertical-align: middle; }
.tb-fb-card.is-new { border-color: var(--tb-red); }
.tb-hw .meta b.sc { color: var(--tb-navy); }
.tb-read-text { background: #f6f8fd; border-left: 4px solid var(--tb-lime); border-radius: 12px; padding: 10px 16px; margin: 0 0 12px; max-width: 720px; line-height: 1.6; }
.tb-hw .go { align-self: flex-end; font-weight: 800; color: var(--tb-lime-dark); }

/* ================================================================ unit page */
.tb-kicker { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; opacity: .85; }
.tb-trail-title { margin: 22px 0 10px; }
.tb-acts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tb-act { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 14px; background: #fff; border-radius: 20px;
  text-decoration: none; color: var(--tb-ink); box-shadow: 0 5px 0 var(--tb-line); border: 3px solid transparent; min-height: 84px; }
.tb-act:hover { border-color: var(--tb-lime); }
.tb-act .ic { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: #eef2fb; }
.tb-act .body { display: flex; flex-direction: column; min-width: 0; }
.tb-act .sk { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--tb-muted); }
.tb-act .t { font-weight: 800; font-size: 1.05rem; line-height: 1.25; }
.tb-act .meta { font-size: .85rem; color: var(--tb-muted); }
.tb-act .go { font-weight: 800; color: var(--tb-lime-dark); white-space: nowrap; }
.tb-act.state-done { background: #f6fbef; }
.skill-vocabulary .ic { background: #fff4d6; } .skill-phonics .ic { background: #fde7f0; } .skill-grammar .ic { background: #e6f7f6; }
.skill-reading .ic { background: #eaf1ff; } .skill-listening .ic { background: #f3e8fb; } .skill-speaking .ic { background: #ffece0; }
.skill-writing .ic { background: #eef7e3; } .skill-game .ic { background: #fff0c2; }

/* ================================================================ activity runner */
.tb-act-head { margin: 8px 0 14px; }
.tb-act-head h1 { margin: 6px 0 2px; }
.tb-skill-badge { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #eef2fb; font-weight: 800; font-size: .9rem; }
.tb-hw-badge, .tb-practice-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-weight: 800; font-size: .8rem; white-space: nowrap; }
.tb-hw-badge { background: var(--tb-red); color: #fff; }
.tb-hw-pulse { animation: tbPulse 1.1s ease-in-out infinite; box-shadow: 0 0 0 3px rgba(229, 57, 53, .2); }
.tb-practice-badge { background: #fdf0da; color: #8a5a00; }
.tb-act .meta .tb-hw-badge, .tb-act .meta .tb-practice-badge { margin-left: 4px; }
.tb-instr { font-weight: 700; }
.tb-progress { height: 12px; background: #e3e9f5; border-radius: 99px; overflow: hidden; margin-top: 10px; position: sticky; top: 64px; z-index: 5; }
.tb-progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, var(--tb-lime), var(--tb-teal)); transition: width .3s; }

.tb-group { margin-bottom: 18px; position: relative; overflow: hidden; }
.tb-group-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; flex-wrap: wrap; }
.tb-group-num { flex: 0 0 38px; height: 38px; border-radius: 12px; background: var(--tb-navy); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.tb-group-instr { flex: 1 1 200px; font-size: 1.05rem; }
.tb-passage, .tb-passage-card .tb-passage { background: #fffdf3; border: 2px dashed #f2d98a; border-radius: 16px; padding: 14px 16px; font-size: 1.12rem; line-height: 1.7; margin-bottom: 12px; }
.tb-passage p { margin: 0 0 10px; }
.tb-passage .hl, .tb-passage b { color: var(--tb-navy); }
/* Derek 11/11/2026: bold words say themselves when tapped (tb-runner.js) */
.tb-passage .tb-word { cursor: pointer; text-decoration: underline dotted 2px; text-underline-offset: 3px; border-radius: 4px; transition: background .2s; }
.tb-passage .said { background: #fff1a8; }
.tb-passage-card { margin-bottom: 18px; }

.tb-q { padding: 12px 0; border-top: 1px dashed var(--tb-line); }
.tb-q:first-of-type { border-top: 0; }
.tb-q-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tb-q-num { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #eef2fb; color: var(--tb-navy); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .95rem; }
.tb-q-text { font-size: 1.12rem; font-weight: 600; line-height: 1.6; }
.tb-q-text.big { font-size: 1.3rem; }
.tb-q-label { margin-right: 8px; }
.tb-q-img { display: block; max-width: min(100%, 260px); max-height: 200px; border-radius: 14px; margin: 8px 0; object-fit: cover; }

.tb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 10px; }
.tb-options.pics { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.tb-options.compact { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-options.long { grid-template-columns: 1fr; }
.tb-options.long .tb-opt { text-align: left; justify-content: flex-start; }
.tb-opt { position: relative; min-height: 52px; padding: 10px 12px; border-radius: 16px; border: 3px solid var(--tb-line); background: #fff; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 1.05rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--tb-ink); }
.tb-opt img { width: 100%; max-height: 130px; object-fit: cover; border-radius: 10px; }
.tb-opt.small { min-width: 52px; min-height: 48px; padding: 6px 14px; }
/* text matching: the answer is on the button ("A Sure.") */
.tb-match-text .tb-opt { flex-direction: row; align-items: center; justify-content: flex-start; padding-right: 26px; gap: 8px; text-align: left; }
.tb-match-letter { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tb-navy); color: #fff; font-size: .85rem; }
.tb-opt.picked { border-color: var(--tb-navy); background: #e8efff; box-shadow: 0 0 0 3px rgba(29, 61, 154, .2); }
.tb-opt.picked::after { content: '✓'; position: absolute; top: 4px; right: 8px; color: var(--tb-navy); font-weight: 800; }
.tb-opt .tb-audio-btn { position: absolute; left: 6px; top: 6px; }

.tb-audio-btn { min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 99px; border: 0; background: var(--tb-btn-orange); color: #fff; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 var(--tb-btn-orange-dark); }
.tb-audio-btn.playing { background: var(--tb-teal); box-shadow: 0 3px 0 #13817b; animation: tbPulse 1s infinite; }
@keyframes tbPulse { 50% { transform: scale(1.06); } }

.tb-gap { min-height: 46px; padding: 6px 10px; margin: 0 4px; font: inherit; font-size: 1.1rem; border: 0; border-bottom: 3px solid var(--tb-navy); background: #f2f6ff; border-radius: 8px 8px 0 0; text-align: center; max-width: 100%; }
.tb-gap:focus { outline: none; background: #e3ecff; }
.tb-word-bank { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.tb-chip { min-height: 46px; padding: 6px 16px; border-radius: 14px; border: 2px solid var(--tb-line); background: #fff; font: inherit; font-weight: 700; font-size: 1.05rem; cursor: pointer; }
.tb-chip.on { background: var(--tb-navy); color: #fff; border-color: var(--tb-navy); }
.tb-chip-pic { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 10px; }
.tb-chip-pic img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; }
.tb-built { min-height: 60px; padding: 8px; border: 3px dashed var(--tb-line); border-radius: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; background: #fbfcff; }
.tb-built-hint { color: var(--tb-muted); }
.tb-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 10px; }
.tb-legend-item { display: flex; gap: 8px; align-items: center; background: #f6f8fd; border-radius: 12px; padding: 8px; }
.tb-legend-item b { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--tb-navy); color: #fff; display: flex; align-items: center; justify-content: center; }
.tb-legend-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

.tb-writing { width: 100%; box-sizing: border-box; overflow: hidden; resize: none; min-height: 150px; font: inherit; font-size: 1.1rem; padding: 12px; border: 3px solid var(--tb-line); border-radius: 16px; margin-top: 8px; }
.tb-checklist { margin: 8px 0; padding-left: 22px; }
.tb-checklist li { margin: 4px 0; }

.tb-rec { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.tb-rec-btn { min-height: 60px; padding: 0 26px; border-radius: 99px; border: 0; background: var(--tb-red); color: #fff; font: inherit; font-weight: 800; font-size: 1.15rem; cursor: pointer; box-shadow: 0 4px 0 #a52724; }
.tb-rec-btn.recording { animation: tbPulse 1s infinite; background: #c62828; }
.tb-rec-btn:disabled { background: var(--tb-btn-green); box-shadow: 0 4px 0 var(--tb-btn-green-dark); cursor: default; }
.tb-rec-timer { font-weight: 800; }
.tb-rec-info { flex-basis: 100%; color: var(--tb-muted); font-weight: 600; }
.tb-rec audio { width: 100%; max-width: 360px; }

.tb-game-stage { margin-top: 12px; }
.tb-game-status { margin-top: 8px; font-weight: 800; color: var(--tb-lime-dark); }

/* Derek 12/11/2026: "I'm finished" tapped while recording: red line + the Stop button shakes (tb-runner.js) */
#tb-save-state.tb-save-warn { color: var(--tb-red); font-weight: 800; font-size: 1rem; animation: tbShake .4s 2; }
.tb-rec-btn.tb-rec-nudge { animation: tbShake .4s 3; }
.tb-submit-bar { position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 0; background: linear-gradient(to top, var(--tb-bg) 70%, transparent); }
.tb-modal { position: fixed; inset: 0; background: rgba(15, 25, 60, .45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.tb-modal[hidden] { display: none; }
.tb-modal-box { background: #fff; border-radius: 24px; padding: 22px; max-width: 420px; width: 100%; text-align: center; }
.tb-modal-box img { width: 110px; mix-blend-mode: multiply; }
.tb-modal-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.tb-confetti { pointer-events: none; position: absolute; inset: 0; overflow: hidden; }
.tb-confetti span { position: absolute; top: -10px; width: 10px; height: 14px; border-radius: 3px; animation: tbFall 1.6s ease-in forwards; }
@keyframes tbFall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }

/* ================================================================ results */
.tb-score { font-size: 1.5rem; font-weight: 800; margin: 4px 0 14px; }
.tb-pending { font-weight: 700; margin: 0 0 14px; }
.tb-q.res { display: flex; gap: 12px; align-items: flex-start; }
.tb-mark { flex: 0 0 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; }
.tb-q.right .tb-mark { background: var(--tb-lime); }
.tb-q.wrong .tb-mark { background: var(--tb-red); }
.tb-correct { color: #3d6b0c; }
.tb-expl { margin-top: 4px; background: #fff8e1; border-radius: 10px; padding: 6px 10px; }
.tb-part-score { display: inline-block; font-size: 1.4rem; font-weight: 800; color: var(--tb-navy); background: #eef2fb; border-radius: 12px; padding: 4px 14px; margin: 8px 0; }
.tb-feedback { white-space: normal; background: #f6fbef; border-radius: 14px; padding: 12px; }
.tb-writing-shown { margin: 8px 0; padding: 12px; background: #f8f9fc; border-left: 4px solid var(--tb-navy); border-radius: 8px; }
.tb-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 22px 0; }

/* ================================================================ games */
.tbg-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.tbg-count { font-weight: 800; color: var(--tb-muted); }
.tbg-pic { width: 110px; height: 110px; object-fit: cover; border-radius: 16px; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.tbg-pic.small { width: 70px; height: 70px; }
.tbg-vi { flex-basis: 100%; color: var(--tb-muted); font-weight: 700; }
.tbg-msg { min-height: 30px; font-weight: 800; margin-top: 8px; }
.tbg-msg.ok { color: var(--tb-lime-dark); }
.tbg-msg.no { color: var(--tb-red); }
.tbg-done { font-size: 2rem; font-weight: 800; text-align: center; padding: 20px; color: var(--tb-navy); }
.tbg-slots { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.tbg-slot { width: 40px; height: 48px; border-bottom: 4px solid var(--tb-navy); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800; text-transform: lowercase; }
.tbg-slot.space { border: 0; width: 18px; }
.tbg-tiles, .tbg-keys { display: flex; flex-wrap: wrap; gap: 8px; }
.tbg-tile { width: 52px; height: 52px; border-radius: 14px; border: 0; background: var(--tb-yellow); font: inherit; font-size: 1.5rem; font-weight: 800; cursor: pointer; box-shadow: 0 4px 0 #c79a00; }
.tbg-tile:disabled { opacity: .25; }
.tbg-tile.undo { background: #eef2fb; box-shadow: 0 4px 0 var(--tb-line); }
.tbg-key { width: 44px; height: 48px; border-radius: 10px; border: 2px solid var(--tb-line); background: #fff; font: inherit; font-size: 1.2rem; font-weight: 800; cursor: pointer; }
.tbg-key.ok { background: var(--tb-btn-green); color: #fff; border-color: var(--tb-btn-green); }
.tbg-key.no { background: #f3f3f3; color: #bbb; }
.tbg-balloons { font-size: 1.6rem; letter-spacing: 2px; }
.tbg-flash { max-width: 360px; margin: 0 auto; }
.tbg-flash-card { width: 100%; min-height: 280px; border-radius: 24px; border: 0; background: #fff; box-shadow: 0 8px 24px rgba(29,61,154,.15); cursor: pointer; font: inherit;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; transition: transform .3s; }
.tbg-flash-card.flipped { background: linear-gradient(135deg, #fff8dc, #ffe9a8); transform: rotateY(360deg); }
.tbg-flash-card img { max-width: 100%; max-height: 170px; border-radius: 14px; object-fit: cover; }
.tbg-word { font-size: 2rem; font-weight: 800; color: var(--tb-navy); }
.tbg-hint { color: var(--tb-muted); font-size: .9rem; }
.tbg-flash-card .tbg-vi { font-size: 1.5rem; color: var(--tb-orange); flex-basis: auto; }
.tbg-flash .tbg-row { justify-content: center; margin-top: 12px; }
/* 2026-11-19: flashcards rewrite -- picture + 3 word choices instead of a flip card */
.tbg-flash-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 10px; }
.tbg-opt { min-height: 50px; padding: 0 18px; border-radius: 14px; border: 2px solid var(--tb-line); background: #fff; color: var(--tb-ink);
  font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; }
.tbg-opt.ok { background: var(--tb-btn-green); color: #fff; border-color: var(--tb-btn-green-dark); }
.tbg-opt.no { background: #fdecea; color: #a12622; border-color: var(--tb-red); }
.tbg-opt:disabled { cursor: default; }
.tbg-track { position: relative; height: 54px; background: linear-gradient(90deg, #e8f1ff, #cdeecd); border-radius: 16px; margin: 10px 0 14px; overflow: visible;
  border-bottom: 4px solid #c9d6ee; transition: background .4s ease; box-shadow: inset 0 -4px 0 rgba(255,255,255,.5); }
.tbg-pad { position: absolute; right: 6px; bottom: 4px; font-size: 1.3rem; }
.tbg-rocket { position: absolute; top: 2px; left: 0; font-size: 1.9rem; transition: left .25s linear; z-index: 2; }
.tbg-rocket-flame { position: absolute; right: 100%; top: 50%; width: 16px; height: 8px; margin-right: 2px; transform: translateY(-50%);
  background: radial-gradient(circle, #ffd23f, #f28c1e 70%, transparent 100%); border-radius: 50%; opacity: .85; animation: tbg-flame-flicker .25s infinite alternate; }
@keyframes tbg-flame-flicker { from { transform: translateY(-50%) scaleX(1); } to { transform: translateY(-50%) scaleX(.6); } }
.tbg-rocket.tbg-urgent { animation: tbg-rocket-shake .18s infinite; }
@keyframes tbg-rocket-shake { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
.tbg-track.tbg-landed { animation: tbg-track-shake .4s ease; }
@keyframes tbg-track-shake { 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.tbg-speller .tb-input { flex: 1 1 180px; font-size: 1.3rem; }
.tbg-grid { display: grid; gap: 10px; }
.tbg-grid.cols3 { grid-template-columns: repeat(3, 1fr); }
.tbg-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.tbg-cell { aspect-ratio: 1; border-radius: 16px; border: 3px solid var(--tb-line); background: #fff; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; position: relative; overflow: hidden; padding: 4px; }
.tbg-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.tbg-cell.hit { border-color: var(--tb-lime); background: #eaf7dc; }
.tbg-cell.hit::after { content: '⭐'; position: absolute; top: 4px; right: 6px; font-size: 1.4rem; }
.tbg-cell.hit span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(140,198,63,.92); color: #fff; padding: 2px; }
/* Derek 11/11/2026 audit: a full bingo line lights up (bingo.js) */
.tbg-cell.line { border-color: #f5a623; box-shadow: 0 0 0 4px #ffd166; animation: tbg-line .5s ease 2; }
@keyframes tbg-line { 50% { transform: scale(1.06); } }
.shake { animation: tbShake .35s; }
@keyframes tbShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.tbg-sky { position: relative; height: 340px; border-radius: 20px; background: linear-gradient(#bfe3ff, #eaf6ff); overflow: hidden; }
.tbg-sky::before, .tbg-sky::after { content: ''; position: absolute; width: 90px; height: 34px; background: #fff; opacity: .55; border-radius: 99px;
  box-shadow: 30px 10px 0 -4px #fff, -24px 6px 0 -6px #fff; }
.tbg-sky::before { top: 8%; left: -10px; }
.tbg-sky::after { top: 42%; right: -30px; width: 70px; height: 26px; }
.tbg-bubble { position: absolute; min-width: 84px; min-height: 52px; padding: 6px 14px; border-radius: 99px; border: 3px solid #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.96), rgba(230,241,255,.9));
  font: inherit; font-weight: 800; font-size: 1.1rem; color: var(--tb-navy); cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.8); }
.tbg-bubble.pop { transform: scale(1.4); opacity: 0; transition: all .4s; }
/* 2026-11-19 memory redesign (Derek audit): real 3D flip + the site's own chunky offset-shadow
   tile chrome (matches .tbg-tile / .tb-audio-btn) instead of a flat bordered card, plus a
   pairs-found chip and a hard "listen before the 2nd flip" gate reusing .tbg-listening's pulse. */
.tbg-mem-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 520px; margin: 0 auto; }
.tbg-mem-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; min-height: 40px; }
.tbg-mem-pairs { background: var(--tb-navy); color: #fff; border-radius: 999px; padding: 9px 16px 9px 14px; font-weight: 800; font-size: .95rem; display: flex; align-items: center; gap: 7px; box-shadow: 0 3px 0 var(--tb-navy-dark); }
.tbg-mem-pairs svg { width: 16px; height: 16px; display: block; }
.tbg-mem-pairs b { color: var(--tb-yellow); font-variant-numeric: tabular-nums; }
.tb-mem-ear { display: flex; align-items: center; gap: 7px; background: var(--tb-teal); color: #fff; font-weight: 800; font-size: .85rem;
  border-radius: 999px; padding: 8px 14px; box-shadow: 0 3px 0 #13817b; opacity: 0; transform: scale(.85); transition: opacity .15s, transform .15s; pointer-events: none; }
.tb-mem-ear.playing { opacity: 1; transform: scale(1); animation: tbPulse 1s infinite; }
.tb-mem-ear .dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.tb-mem-tile { perspective: 700px; min-height: 90px; border: none; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.tb-mem-tile.locked { cursor: not-allowed; opacity: .5; }
.tb-mem-tile .inner { position: relative; width: 100%; height: 100%; min-height: 90px; transition: transform .45s cubic-bezier(.4,1.4,.6,1); transform-style: preserve-3d; }
.tb-mem-tile.flipped .inner { transform: rotateY(180deg); }
.tb-mem-tile.matched .inner { transform: rotateY(180deg) scale(.96); transition: transform .3s; }
.tb-mem-face { position: absolute; inset: 0; border-radius: 18px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; font-weight: 800; padding: 6px; text-align: center; overflow: hidden; }
.tb-mem-back { background: var(--tb-navy); box-shadow: 0 4px 0 var(--tb-navy-dark); }
.tb-mem-back.c1 { background: var(--tb-teal); box-shadow: 0 4px 0 #13817b; }
.tb-mem-back.c2 { background: var(--tb-orange); box-shadow: 0 4px 0 var(--tb-btn-orange); }
.tb-mem-back.c3 { background: var(--tb-yellow); box-shadow: 0 4px 0 #c79a00; }
.tb-mem-back::before { content: ''; position: absolute; top: -30%; left: -20%; width: 75%; height: 65%; border-radius: 50%; background: rgba(255,255,255,.22); transform: rotate(-18deg); }
.tb-mem-back svg { width: 32px; height: 32px; opacity: .85; position: relative; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.tb-mem-back.c3 svg { opacity: .65; }
.tb-mem-front { background: #fff; color: var(--tb-ink); transform: rotateY(180deg); font-size: 1.02rem; flex-direction: column; gap: 6px; box-shadow: 0 3px 0 var(--tb-line); position: relative; }
.tb-mem-tile.matched .tb-mem-front { background: #eaf7dc; box-shadow: 0 3px 0 var(--tb-lime); }
.tb-mem-tile.matched .tb-mem-front::after { content: '⭐'; position: absolute; top: 2px; right: 5px; font-size: 1.05rem; }
.tb-mem-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; overflow: hidden; }
.tb-mem-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tb-mem-vi { font-size: .78rem; font-weight: 700; color: var(--tb-navy); }
@media (max-width: 480px) { .tb-mem-tile, .tb-mem-tile .inner { min-height: 76px; } .tb-mem-front { font-size: .9rem; } .tb-mem-icon { width: 38px; height: 38px; } }
@media (max-width: 480px) { .tbg-tile { width: 46px; height: 46px; } .tbg-key { width: 38px; height: 44px; } .tbg-slot { width: 32px; } }

/* 2026-11-18 game polish pass: shared "paid game" chrome every engine opts into --------------- */
/* a soft card every game sits inside instead of floating loose on the page */
.tbg-stage { background: linear-gradient(180deg, #fbfdff, #f3f7ff); border-radius: 22px; padding: 16px; box-shadow: inset 0 0 0 2px #eef3fc; }
/* tactile press feedback on every tappable game control -- the thing that makes taps feel "real" */
.tbg-tile, .tbg-key, .tbg-cell, .tbg-bubble, .tb-audio-btn, .tb-btn, .tbg-flash-card, .tbg-balloon, .tbg-opt, .tb-mem-tile {
  transition: transform .1s ease, box-shadow .1s ease;
}
.tbg-tile:active, .tbg-key:active:not(:disabled), .tbg-cell:active:not(:disabled), .tbg-bubble:active,
.tb-audio-btn:active, .tbg-flash-card:active, .tbg-balloon:active, .tbg-opt:active:not(:disabled),
.tb-mem-tile:active:not(:disabled) { transform: scale(.93); }
/* confetti burst (JS: TBGames.confetti(el)) */
.tbg-confetti { position: absolute; top: 50%; width: 9px; height: 14px; border-radius: 2px; pointer-events: none; z-index: 5;
  animation-name: tbg-confetti-fall; animation-timing-function: cubic-bezier(.2,.7,.3,1); animation-fill-mode: forwards; }
@keyframes tbg-confetti-fall {
  0% { transform: translate(0,0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), calc(var(--dy) * -1 + 160px)) rotate(var(--rot)); opacity: 0; }
}
/* generic correct-answer "pop" (JS: TBGames.pop(node)) */
.tbg-pop-anim { animation: tbg-pop .36s ease; }
@keyframes tbg-pop { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
.tbg-done { position: relative; }
.tbg-done .sub { font-size: 1rem; font-weight: 700; color: var(--tb-muted); margin-top: 4px; }

/* 2026-11-18 Hangman rewrite: real balloons instead of emoji text ------------------------------ */
.tbg-hang-sky { position: relative; min-height: 130px; border-radius: 16px; background: linear-gradient(#cdeaff, #eef8ff); margin: 10px 0; overflow: visible; display: flex; align-items: flex-end; padding: 10px 6px 0; }
.tbg-balloon-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 14px; }
.tbg-balloon { position: relative; width: 46px; height: 60px; animation: tbg-balloon-float 2.6s ease-in-out infinite; animation-delay: var(--delay, 0s); }
.tbg-balloon-body { position: absolute; inset: 0 0 16px 0; background: var(--bc); border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  box-shadow: inset -6px -8px 10px rgba(0,0,0,.18), inset 5px 7px 9px rgba(255,255,255,.4); }
.tbg-balloon-knot { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--bc); }
.tbg-balloon-string { position: absolute; bottom: -14px; left: 50%; width: 2px; height: 16px; background: #a9b6cf; transform: translateX(-50%); }
@keyframes tbg-balloon-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-9px) rotate(2deg); } }
.tbg-balloon.popping .tbg-balloon-body, .tbg-balloon.popping .tbg-balloon-knot { animation: tbg-balloon-pop .3s ease forwards; }
.tbg-balloon.popping .tbg-balloon-string { opacity: 0; transition: opacity .2s .1s; }
.tbg-balloon.popped { visibility: hidden; }
@keyframes tbg-balloon-pop { 0% { transform: scale(1); opacity: 1; } 45% { transform: scale(1.35); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }

/* 2026-11-18 Bingo polish: a visible "listening" pulse while the clip plays */
.tbg-listening { font-size: 1.3rem; opacity: .3; transition: opacity .2s; }
.tbg-listening.playing { opacity: 1; animation: tbPulse 1s infinite; }

/* ================================================================ staff pages */
.skin-staff { background: linear-gradient(135deg, #e7f4ff 0%, #f1fbe6 55%, #fff6dc 100%) fixed; }
.skin-staff h1, .skin-staff h2 { color: var(--tb-navy-dark); }
.skin-staff .tb-card { margin-bottom: 16px; }
.tb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 8px; }
.tb-tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: #fff; border-radius: 16px; text-decoration: none; color: var(--tb-ink); font-weight: 800; box-shadow: 0 2px 10px rgba(20,43,110,.08); }
.tb-tile span { font-size: 1.8rem; }
.tb-tile b { color: var(--tb-muted); }
.tb-tile.hot { border: 3px solid var(--tb-orange); }
.tb-tile.hot b { color: #c25e00; }
.tb-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.tb-form-grid label, .tb-inline-form label, .tb-card > form label { display: flex; flex-direction: column; gap: 4px; font-weight: 700; }
.tb-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tb-inline-form .tb-input { min-width: 220px; }
select.tb-input { appearance: auto; }
.tb-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tb-found { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--tb-line); }
.tb-found span { flex: 1 1 220px; }
.tb-found .tb-input { width: auto; min-height: 44px; }
.tb-grid td.cell { text-align: center; }
.tb-grid .tb-stars { font-size: 1rem; }
.tb-table .tb-chip { min-height: 38px; padding: 4px 12px; font-size: .95rem; text-decoration: none; color: var(--tb-ink); display: inline-flex; align-items: center; }
.tb-grade-part audio { margin: 6px 0; }

/* ================================================================ content helpers */
.tb-pic-r { float: right; width: 42%; max-width: 240px; margin: 0 0 8px 12px; border-radius: 12px; }
@media (max-width: 480px) { .tb-pic-r { float: none; display: block; width: 100%; max-width: none; margin: 6px 0 10px; } }
.tb-passage p::after { content: ''; display: table; clear: both; }
.tb-passage h3 { margin: 0 0 10px; color: var(--tb-navy); font-size: 1.4rem; }
.tb-two-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tb-two-pics figure { margin: 0; text-align: center; font-weight: 800; }
.tb-two-pics img { width: 100%; border-radius: 12px; }
.tb-comic { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.tb-comic img { width: 100%; border-radius: 10px; border: 2px solid #333; }
.tb-letters { font-size: 1.3rem; font-weight: 800; letter-spacing: 1px; text-align: center; }

.tb-ans-img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; vertical-align: middle; margin: 2px 4px; }

@media (max-width: 600px) { .tb-topbar { position: static; } .tb-progress { top: 0; } .tb-brand img { height: 38px; } .tb-nav { gap: 10px; font-size: .95rem; } }

.tb-options.pics { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tb-options.pics .tb-opt { padding: 6px; }
.tb-options.pics .tb-opt img { max-height: 120px; aspect-ratio: 1; }

.tb-puzzle { font-family: ui-monospace, Consolas, monospace; font-size: 1.4rem; font-weight: 800; letter-spacing: .35em; line-height: 1.5; background: #fff; border-radius: 12px; padding: 10px 14px; overflow-x: auto; }
.tb-hw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tb-hw-actions form { margin: 0; }
.tb-hw-edit td { background: #f4f7ff; }

/* Level 2: grammar box inside a passage */
.tb-gbox { background: #eef6ff; border-left: 5px solid var(--tb-navy); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; }
.tb-gbox p { margin: 4px 0; }
/* video speaking (2026-10-10) */
.tb-vid-live, .tb-vid-play { display: block; flex-basis: 100%; width: 100%; max-width: 360px; border-radius: 12px; background: #000; }
.tb-vid-live { transform: scaleX(-1); }
.tb-rec.live .tb-vid-live { flex-basis: auto; width: 120px; }
/* while recording the camera, Stop and the timer stay on screen as the child scrolls the text (Derek 2026-10-30) */
.tb-rec-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; flex-basis: 100%; }
.tb-rec.live .tb-rec-bar { flex-wrap: nowrap; position: sticky; top: 8px; z-index: 6; background: #fff; padding: 8px; margin: 0 -8px; border-radius: 14px; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.tb-card.rec-live { overflow: visible; }
.tb-vid-script { flex-basis: 100%; background: #fffbe6; border-radius: 12px; padding: 12px 14px; font-size: 1.15rem; line-height: 1.55; }
.tb-vid-script[hidden] { display: none; }
.tb-vid-script p { margin: 0 0 8px; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tb-chip { padding: 4px 12px; border-radius: 99px; background: var(--tb-lime, #d9f99d); font-weight: 700; font-size: .95rem; }
.tb-starter { background: #fff8e1; border-left: 4px solid #f5b400; padding: 8px 12px; border-radius: 8px; margin: 8px 0; font-weight: 600; }
.tb-muted { color: var(--tb-muted); }
.tb-btn.small { padding: 4px 12px; font-size: .9rem; min-height: 0; }
.tb-vid-live[hidden], .tb-vid-play[hidden] { display: none; }
.tb-stamp { font-size: .95rem; opacity: .9; margin: 4px 0; }
.tb-pick { margin: 8px 0; }
.tb-pick-head { margin: 6px 0; }
.tb-pick-group { border: 1px solid var(--tb-line); border-radius: 14px; padding: 6px 14px 10px; margin: 8px 0; }
.tb-pick-group legend { font-weight: 800; color: var(--tb-navy); padding: 0 6px; }
.tb-pick-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-weight: 600; cursor: pointer; }
.tb-pick-item input { width: 20px; height: 20px; flex: none; }
.tb-pick-total { font-weight: 800; color: var(--tb-navy); }
.tb-hw-list { margin: 4px 0 0; padding-left: 18px; font-size: .9rem; }
.tb-hw-banner { font-weight: 700; }
.tb-hw-banner a { color: inherit; }
/* Derek 06/11/2026: practice = the next unit only, always green (homework = yellow) */
/* light green: the banner sits on the navy unit header (dark green was unreadable, Derek 09/11/2026) */
.tb-try-banner { color: #a8f0a0; }
.tb-try-next { display: flex; align-items: center; gap: 12px; margin: 18px 0; padding: 14px 16px; border-radius: 18px;
  background: #eafbea; border: 2px solid #3fb950; color: #11401a; text-decoration: none; }
.tb-try-next .em { font-size: 2rem; flex: none; }
.tb-try-next .tx { flex: 1; min-width: 0; }
.tb-try-next .tx b { display: block; font-size: 1.05rem; }
.tb-try-next .tx small { display: block; font-size: .9rem; margin-top: 2px; }
.tb-try-next .go { flex: none; font-weight: 800; background: #1f7a33; color: #fff; padding: 8px 14px; border-radius: 12px; }
.tb-practice-box { background: #eafbea; border: 1px solid #3fb950; color: #11401a; border-radius: 14px; padding: 12px 14px; margin: 12px 0; }
.tb-practice-box form { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.tb-pick-lesson { padding: 4px 0 6px; border-top: 1px dashed var(--tb-line); }
.tb-pick-lesson:first-of-type { border-top: 0; }
.tb-pick-lesson-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; color: var(--tb-navy); }
.tb-pick-lesson .tb-pick-item { padding-left: 14px; }
.tb-stats-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.tb-pill { display: inline-block; padding: 6px 14px; border-radius: 99px; font-weight: 800; background: #eef2fb; color: var(--tb-navy); }
.tb-pill.ok { background: #e6f6d9; color: #2f6b12; }
.tb-pill.warn { background: #fff4d6; color: #8a5a00; }
.tb-pill.bad { background: #fde7e7; color: #a11d1d; }
.tb-late { color: var(--tb-red); }
.tb-report-head { display: flex; align-items: center; gap: 18px; margin: 10px 0; }
.tb-report-head img { width: 110px; height: auto; }
.tb-report-head h1 { margin: 0; }
.tb-report-comment { border-left: 4px solid var(--tb-lime); background: #fff; border-radius: 10px; padding: 6px 14px; margin: 8px 0; }
.tb-report-comment p { margin: 4px 0; }
.tb-chip.on { background: var(--tb-navy); color: #fff; }
@media print {
  .tb-topbar, .tb-noprint, .tb-nav { display: none !important; }
  body { background: #fff !important; }
  .tb-report .tb-table { font-size: 11pt; }
  .tb-report-comment { break-inside: avoid; }
  .tb-wrap { max-width: none; padding: 0; }
}
.tb-due { padding: 12px 16px; border-radius: 16px; margin: 0 0 12px; font-size: 1.05rem; line-height: 1.6; }
.tb-due a { font-weight: 800; color: inherit; }
.tb-due-late { background: #fde7e7; color: #a11d1d; border: 2px solid #f3b4b4; }
.tb-due-today { background: #fff4d6; color: #7a4f00; border: 2px solid #f5d98a; }
.tb-due-tomorrow { background: #e8f1ff; color: #1d3f8a; border: 2px solid #b9cff5; }
.tb-audio-btn.tb-instr-audio { flex: none; align-self: flex-start; min-width: 44px; min-height: 44px; padding: 4px 10px; border-radius: 99px; font-size: 1.3rem; background: var(--tb-navy) !important; border-color: var(--tb-navy) !important; box-shadow: none; }
/* phones: keep the top bar on one line (the page itself greets the child by name) */
@media (max-width: 480px) {
  .tb-who { display: none; }
  .tb-nav { gap: 10px; font-size: .95rem; }
  .tb-brand img { height: 38px; }
}
/* picture cards: the exercise's own picture, with the skill icon as a small badge */
.tb-act { grid-template-columns: 72px 1fr auto; }
.tb-act .ic.pic { width: 72px; height: 72px; padding: 0; position: relative; overflow: visible; background: #fff; border: 2px solid #eef2fb; }
.tb-act .ic.pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; display: block; }
.tb-act .ic.pic .badge { position: absolute; right: -6px; bottom: -6px; width: 30px; height: 30px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.15); font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.tb-act .ic:not(.pic) { width: 72px; height: 72px; }
/* stickers (Derek 2026-10-12) */
.tb-sticker-count { display: inline-block; min-width: 30px; padding: 2px 10px; border-radius: 99px; background: #fff4d6; color: #7a4f00; font-size: .9rem; vertical-align: middle; }
.tb-stickers { margin-bottom: 26px; }
.tb-sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 10px; }
.tb-sticker { display: flex; align-items: center; justify-content: center; height: 58px; font-size: 2rem; border-radius: 50%; background: #fff8e1; border: 3px solid #ffd23f; box-shadow: 0 3px 0 #f2b705; animation: tbPop .4s ease-out both; }
.tb-sticker.locked { background: #f1f3f8; border: 3px dashed #d3d8e6; box-shadow: none; font-size: 1.2rem; opacity: .7; animation: none; }
.tb-trophies { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.tb-trophy { display: flex; flex-direction: column; align-items: center; font-size: 2.2rem; padding: 6px 12px; border-radius: 16px; background: #fff4d6; }
.tb-trophy small { font-size: .75rem; font-weight: 800; color: #7a4f00; }
@keyframes tbPop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.12); } 100% { transform: scale(1); opacity: 1; } }
/* celebration after sending (Derek 2026-10-12) */
.tb-cheer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(20, 43, 110, .35); pointer-events: none; }
.tb-cheer-box { background: #fff; border-radius: 28px; padding: 22px 34px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); animation: tbPop .45s ease-out both; }
.tb-cheer-box .stars { font-size: 2.6rem; letter-spacing: 4px; }
.tb-cheer-box .msg { font-size: 1.5rem; font-weight: 800; color: var(--tb-navy); margin-top: 4px; }
.tb-cheer .tb-confetti span { animation-duration: 2s; }
/* Derek 26/11/2026 (Starter improvements item 3): tiger mascot pop-up while working + in the stars celebration */
.tb-tiger-pop { position: fixed; left: 8px; bottom: 70px; z-index: 40; pointer-events: none; display: flex; align-items: flex-end; gap: 4px; animation: tbTigerIn .35s ease-out both; }
.tb-tiger-pop[hidden] { display: none; }
.tb-tiger-pop img { width: 84px; height: 126px; }
.tb-tiger-pop .tb-tiger-bubble { max-width: 170px; font-weight: 800; }
.tb-tiger-pop.out { animation: tbTigerOut .4s ease-in both; }
@keyframes tbTigerIn { from { transform: scale(.7); } to { transform: none; } }
@keyframes tbTigerOut { to { transform: translateX(-130%); opacity: 0; } }
.tb-cheer-tiger { display: flex; justify-content: center; margin: 0 auto 4px; }
.tb-cheer-tiger img { width: 96px; height: 144px; }
.tb-cheer-tiger .tb-tiger-bubble { display: none; }
.tb-new-stars { display: inline-block; margin-top: 8px; padding: 6px 16px; border-radius: 99px; background: #ffd23f; color: #5a3d00; font-weight: 800; animation: tbPop .5s ease-out both; }
.tb-new-sticker { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 16px; border-radius: 20px; background: #fff8e1; border: 3px solid #ffd23f; font-weight: 800; color: #5a3d00; }
.tb-new-sticker .tb-sticker { flex: none; width: 64px; height: 64px; }
.tb-sound-toggle { font: inherit; border: 0; cursor: pointer; color: inherit; }
.tb-sound-toggle.off { opacity: .75; }
/* buddies (Derek 2026-10-12) */
.tb-buddy-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; margin-bottom: 8px; border-radius: 99px; background: rgba(255,255,255,.18); color: inherit; text-decoration: none; font-weight: 800; }
.tb-buddy-chip .em { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; animation: tbPop .5s ease-out both; }
.tb-buddies { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin: 18px 0; }
.tb-buddy { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 22px; border: 3px solid #e3e8f4; background: #fff; cursor: pointer; }
.tb-buddy .em { font-size: 3rem; line-height: 1.1; }
.tb-buddy .nm { font-weight: 800; color: var(--tb-navy); }
.tb-buddy .need { font-size: .85rem; color: #7a4f00; font-weight: 700; }
.tb-buddy.mine { border-color: var(--tb-lime); background: #f3fbe9; }
.tb-buddy.locked { cursor: default; opacity: .55; filter: grayscale(.7); }
.tb-buddy:not(.locked):hover { transform: translateY(-2px); }
/* star board */
.tb-board { margin-bottom: 26px; }
.tb-board-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; margin-bottom: 6px; background: #f6f8fd; font-weight: 800; }
.tb-board-row .pos { width: 34px; text-align: center; font-size: 1.4rem; }
.tb-board-row .nm { flex: 1; color: var(--tb-navy); }
.tb-board-row.me { background: #fff4d6; border: 2px solid #ffd23f; }
/* unit trail map (Derek 2026-10-12) */
/* Unit trail (Derek 2026-10-13): everything visible left to right, no sideways scrolling.
   One leg per book part (its name on top); legs share one row on computers and wrap on phones. */
.tb-trailmap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 0; margin: 0 0 18px; padding: 4px 0; }
.tb-trailmap .leg { display: flex; flex-direction: column; min-width: 0; }
.tb-trailmap .leg.single::before { content: ""; display: block; height: 22px; }
.tb-trailmap .leg-t { display: block; height: 20px; box-sizing: border-box; margin: 0 6px 2px; padding-bottom: 3px; line-height: 15px; border-bottom: 2px solid #dfe5f2; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--tb-muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-trailmap ol { list-style: none; display: flex; margin: 0; padding: 40px 0 0; }
.tb-trailmap .stop { position: relative; flex: 1 1 0; min-width: 0; width: 84px; text-align: center; }
.tb-trailmap .stop::before { content: ""; position: absolute; top: 22px; left: -50%; width: 100%; border-top: 4px dashed #c9d3ea; z-index: 0; }
.tb-trailmap .leg:first-child .stop:first-child::before { display: none; }
.tb-trailmap .stop.done::before, .tb-trailmap .stop.current::before { border-top-style: solid; border-color: #8cc63f; }
.tb-trailmap a { text-decoration: none; color: inherit; display: block; }
.tb-trailmap .dot { position: relative; z-index: 1; width: 48px; height: 48px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #fff; border: 4px solid #c9d3ea; }
.tb-trailmap .done .dot { background: #8cc63f; border-color: #6fa52b; color: #fff; font-weight: 900; }
.tb-trailmap .current .dot { border-color: #f28c1e; box-shadow: 0 0 0 5px rgba(242, 140, 30, .2); }
.tb-trailmap .goal .dot { background: #fff4d6; border-color: #ffd23f; }
.tb-trailmap .lb { display: block; margin-top: 5px; font-weight: 800; font-size: .8rem; line-height: 1.15; color: var(--tb-navy); padding: 0 2px; overflow-wrap: break-word; hyphens: auto; }
.tb-trailmap .tiger { position: absolute; top: -42px; left: 50%; transform: translateX(-50%); height: 42px; z-index: 2; animation: tbPop .5s ease-out both; }
@media (min-width: 900px) {
  .tb-trailmap { flex-wrap: nowrap; }
  .tb-trailmap .leg { flex: var(--n, 1) 0 auto; }
  .tb-trailmap .stop { width: auto; min-width: 72px; } /* Derek 29/11/2026: 79 stops squashed the labels letter by letter; keep a minimum width and scroll */
  .tb-trailmap { overflow-x: auto; padding-bottom: 8px; }
}
@media (max-width: 899px) {
  .tb-trailmap ol { padding-top: 14px; }
  .tb-trailmap .leg.has-cur ol { padding-top: 44px; }
  .tb-trailmap .stop { width: 64px; flex: none; }
  .tb-trailmap .stop::before { top: 19px; }
  .tb-trailmap .leg .stop:first-child::before { display: none; }
  .tb-trailmap .dot { width: 42px; height: 42px; font-size: 1.1rem; }
  .tb-trailmap .lb { font-size: .72rem; }
}

/* Delete pop-up + red buttons (Derek 2026-10-12: "Did you inform admin before deleting?") */
.tb-chip.danger, .tb-table .tb-chip.danger { color: #b42318; border-color: #f3b6b0; background: #fff; }
.tb-btn.danger { background: #c0352b; color: #fff; box-shadow: 0 4px 0 #8f2119; }
.tb-del-dlg { border: 0; border-radius: 18px; padding: 22px 24px; max-width: min(440px, calc(100vw - 32px)); box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.tb-del-dlg::backdrop { background: rgba(20, 28, 50, .45); }
.tb-del-dlg .what { margin: 0 0 6px; color: #5d6784; }
.tb-del-dlg .q { margin: 0 0 18px; font-size: 1.2rem; font-weight: 800; color: #1b2442; }
.tb-del-dlg .btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.tb-del-dlg .btns .tb-btn:first-child { background: #eef1f7; color: #1b2442; box-shadow: 0 4px 0 #cfd6e6; }
.tb-note { color: #5d6784; font-size: .95rem; margin-top: 8px; }
.tb-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.tb-filters label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; }
.tb-filters .tb-input { min-height: 42px; width: auto; }
.tb-log td { vertical-align: top; }
.tb-log .when { white-space: nowrap; }
.tb-log .who small { display: block; color: #5d6784; font-weight: 600; }

/* Compact layout on laptops and desktops (Derek 2026-10-13: "the page is so big").
   Phones and tablets keep the big, easy-to-tap sizes. */
@media (min-width: 900px) {
  body { font-size: 16px; }
  html .tb-wrap { max-width: 1120px; padding-top: 10px; }
  /* Derek 28/11/2026: every teacher/admin page as wide as Homework (1500px); the homework grid stays full width */
  html .skin-staff .tb-wrap { max-width: 1500px; }
  html .skin-staff .tb-wrap.tb-hw-report { max-width: none; }
  html .skin-primary h2 { font-size: 1.4rem; margin: 18px 0 10px; }
  html .tb-hero { grid-template-columns: 1fr 124px; padding: 14px 20px 0; margin: 4px 0 14px; border-radius: 22px; }
  html .tb-hero h1 { font-size: 1.6rem; }
  html .tb-hero p { margin: 0 0 10px; font-size: 1rem; }
  html .tb-hero .toby { width: 124px; height: 138px; border-radius: 62px 62px 0 0; }
  html .tb-hero .toby img { height: 130px; }
  html .tb-stats { gap: 8px; margin-bottom: 14px; }
  html .tb-stat { padding: 4px 12px; font-size: .95rem; }
  html .tb-buddy-chip { padding: 4px 14px 4px 4px; margin-bottom: 6px; gap: 8px; }
  html .tb-buddy-chip .em { width: 38px; height: 38px; font-size: 1.45rem; }
  html .tb-due { padding: 8px 14px; font-size: .98rem; line-height: 1.5; margin-bottom: 8px; }
  html .tb-homework { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
  html .tb-hw { padding: 12px 14px; gap: 4px; border-radius: 16px; }
  html .tb-hw .lbl { font-size: 1.02rem; line-height: 1.25; }
  html .tb-hw .unit-t { font-size: .9rem; line-height: 1.3; }
  html .tb-hw .bar { height: 8px; }
  html .tb-hw .meta { font-size: .85rem; }
  html .tb-hw .go { font-size: .95rem; }
  html .tb-card { padding: 16px; }
  html .tb-sticker-grid { grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
  html .tb-sticker { height: 46px; font-size: 1.5rem; border-width: 2px; }
  html .tb-board { margin-bottom: 18px; }
  html .tb-board-row { padding: 6px 10px; }
  html .tb-units { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
  html .tb-unit { display: grid; grid-template-columns: 36px 1fr; column-gap: 10px; row-gap: 2px; align-content: start; min-height: 0; padding: 12px; border-radius: 18px; }
  html .tb-unit > * { grid-column: 2; }
  html .tb-unit .num { grid-column: 1; grid-row: 1 / span 4; width: 36px; height: 36px; font-size: 1.05rem; }
  html .tb-unit .t { font-size: .98rem; }
  html .tb-unit .stars { font-size: 1rem; }
}

/* Folded lists on the child's home page (Derek 2026-10-13): comments already read, finished homework. */
.tb-fold { margin: 0 0 18px; }
.tb-fold > summary { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; padding: 10px 18px; border-radius: 99px; background: #fff; border: 2px solid var(--tb-line); box-shadow: 0 3px 0 var(--tb-line); font-weight: 800; color: var(--tb-navy); }
.tb-fold > summary::-webkit-details-marker { display: none; }
.tb-fold > summary::after { content: "▾"; transition: transform .15s; }
.tb-fold[open] > summary { margin-bottom: 12px; }
.tb-fold[open] > summary::after { transform: rotate(180deg); }
.tb-done-list { display: grid; gap: 8px; }
.tb-done-list a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border-radius: 14px; text-decoration: none; color: var(--tb-ink); border: 2px solid #eef2fb; }
.tb-done-list a:hover { border-color: var(--tb-lime); }
.tb-done-list .ok { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #eaf7e0; color: var(--tb-lime-dark); display: grid; place-items: center; font-weight: 800; }
.tb-done-list .nm { flex: 1; min-width: 0; font-weight: 800; color: var(--tb-navy); }
.tb-done-list .nm small { display: block; font-weight: 600; color: var(--tb-muted); }
.tb-done-list .dt { font-size: .85rem; color: var(--tb-muted); white-space: nowrap; }
@media (max-width: 560px) { .tb-done-list .dt { display: none; } }

/* Buddy next to "Hi …! Ready to learn?" (Derek 2026-10-13: it was hidden above the greeting) */
.tb-hello { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 4px; }
.tb-hello h1 { margin: 0; }
html .tb-hello .tb-buddy-chip { margin: 0; }
.tb-buddy-chip.pick { background: #ffd23f; color: var(--tb-navy); box-shadow: 0 4px 0 #e0a800; animation: tbBuddyPulse 2.2s ease-in-out infinite; }
.tb-buddy-chip.pick .em { background: #fff; }
.tb-buddy-chip.has .em { width: 60px; height: 60px; font-size: 2.4rem; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
@keyframes tbBuddyPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .tb-buddy-chip.pick { animation: none; } }
@media (min-width: 900px) { html .tb-buddy-chip.has .em { width: 54px; height: 54px; font-size: 2.1rem; } }

/* Talking buddy (Derek 2026-10-13): tap it, it jumps and says the next line. */
.tb-buddy-talk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tb-buddy-talk .em { width: 64px; height: 64px; flex: none; border-radius: 50%; border: 0; background: #fff; font-size: 2.5rem; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.15); animation: tbBuddyIdle 3s ease-in-out infinite; }
.tb-buddy-talk .em:focus-visible { outline: 3px solid #ffd23f; outline-offset: 3px; }
.tb-buddy-talk .em.jump { animation: tbBuddyJump .5s ease-out; }
.tb-buddy-talk .bubble { position: relative; max-width: 330px; background: #fff; color: var(--tb-navy); font-weight: 800; font-size: 1rem; line-height: 1.3; padding: 10px 14px; border-radius: 16px; box-shadow: 0 4px 0 rgba(0,0,0,.12); }
.tb-buddy-talk .bubble::before { content: ""; position: absolute; left: -8px; top: 50%; margin-top: -8px; border: 8px solid transparent; border-left: 0; border-right-color: #fff; }
.tb-buddy-talk .bubble.pop { animation: tbPop .3s ease-out; }
.tb-buddy-talk .change { color: rgba(255,255,255,.85); font-size: .85rem; font-weight: 700; text-decoration: underline; }
.tb-hw-go { display: inline-block; margin: 12px 0 4px; background: #ffd23f; color: var(--tb-navy); font-weight: 900; font-size: 1.15rem; padding: 12px 20px; border-radius: 999px; text-decoration: none; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.tb-hero.result .tb-hw-go { display: block; flex-basis: 100%; width: 100%; text-align: center; box-sizing: border-box; }
.tb-hw-go:active { transform: translateY(2px); box-shadow: 0 2px 0 rgba(0,0,0,.18); }
@keyframes tbBuddyIdle { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes tbBuddyJump { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-18px) scale(1.12) rotate(8deg); } 70% { transform: translateY(0) scale(.95); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .tb-buddy-talk .em, .tb-buddy-talk .em.jump { animation: none; } }
@media (max-width: 560px) { .tb-buddy-talk { flex-wrap: wrap; } .tb-buddy-talk .em { width: 54px; height: 54px; font-size: 2.1rem; } .tb-buddy-talk .bubble { flex: 1 1 0; min-width: 0; max-width: none; font-size: .9rem; } .tb-buddy-talk .change { flex-basis: 100%; } }

/* Results page: the buddy cheers; a new buddy unlocked */
.tb-buddy-cheer { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; }
.tb-buddy-cheer .em { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 2rem; flex: none; animation: tbBuddyJump .7s ease-out .3s both; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.tb-buddy-cheer .bubble { background: #fff; color: var(--tb-navy); font-weight: 800; padding: 8px 14px; border-radius: 14px; }
.tb-unlock { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 0 0 16px; border-radius: 18px; background: linear-gradient(135deg, #fff4d6, #ffe6f3); border: 2px solid #ffd23f; animation: tbPop .5s ease-out both; text-decoration: none; color: var(--tb-navy); font-weight: 800; }
.tb-unlock .em { font-size: 2.6rem; }
.tb-unlock small { display: block; font-weight: 700; color: var(--tb-muted); }

/* Book skill heading (NEW WORDS, WORKBOOK, LISTEN FOR REASONS...) as a small label above the instruction (2026-10-13) */
.tb-instr-label { display: table; margin: 0 0 4px; padding: 2px 10px; border-radius: 99px; background: #eef3ff; color: var(--tb-navy, #1d3d9a); font-size: .7rem; font-weight: 800; letter-spacing: .06em; line-height: 1.6; }
/* Listen first, then read (Level 4+, Derek 2026-10-16) */
.tb-listen-first .tb-lf-step { font-weight: 800; color: var(--tb-navy); margin: 0 0 10px; font-size: 1.08rem; }
.tb-listen-first .tb-lf-audio { width: 100%; margin-bottom: 10px; }
.tb-listen-first .tb-lf-lock { background: #eef4ff; border-radius: 12px; padding: 12px 14px; text-align: center; font-weight: 700; color: var(--tb-navy); margin: 0 0 6px; }
.tb-lf-wait .tb-after-listen { display: none; }
.tb-listen-first .tb-lf-audio { position: sticky; top: 8px; z-index: 5; box-shadow: 0 4px 12px rgba(0,0,0,.08); border-radius: 30px; }

/* ---- tests (2026-10-28): keyboard-free gaps, letter tiles, tap the wrong word, results ---- */
.tb-gap.tap { caret-color: transparent; cursor: pointer; }
.tb-letter-word { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 3px; margin: 6px 0; font-size: 1.35rem; font-weight: 700; }
.tb-letter-fixed { min-width: 1.1em; text-align: center; }
.tb-letter-space { width: .8em; }
.tb-letter-slot { width: 1.7em; height: 1.9em; border: 0; border-bottom: 3px solid var(--tb-navy); background: #f2f6ff; border-radius: 8px 8px 0 0; font: inherit; color: var(--tb-navy); cursor: pointer; padding: 0; }
.tb-letter-slot.on { background: #e3ecff; }
.tb-tapword { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tb-tapword-w { min-height: 46px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--tb-line); background: #fff; font: inherit; font-size: 1.1rem; cursor: pointer; }
.tb-tapword-w.on { background: #fde2e1; border-color: #d92d20; text-decoration: line-through; text-decoration-color: #d92d20; }
.tb-test-name { margin: 0 0 4px; font-weight: 700; color: var(--tb-navy); }
.tb-hero .tb-test-name { color: #fff; } /* 2026-10-30: was navy on the navy banner */
.tb-hero .tb-muted { color: rgba(255, 255, 255, .88); } /* 2026-10-30: grey was barely visible on the blue banner */
.tb-hero .vi-line { color: rgba(255, 255, 255, .88); } /* 2026-11-18: same fix -- the Vietnamese line under "Try this unit" was unreadable on the navy banner */
.tb-skill-bars { display: grid; gap: 6px; margin: 10px 0; }
.tb-sbar { display: grid; grid-template-columns: minmax(110px, 9em) 1fr auto; align-items: center; gap: 8px; font-size: .95rem; }
.tb-sbar .track { height: 14px; background: #eef2f7; border-radius: 99px; overflow: hidden; }
.tb-sbar .fill { display: block; height: 100%; background: var(--tb-navy); border-radius: 99px; }
.tb-sbar .val { font-weight: 700; white-space: nowrap; }
.tb-guide { background: #f7f9fc; border: 1px solid var(--tb-line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.tb-guide-list { margin: 6px 0 0 0.4em; padding: 0; list-style: none; } /* the lines already start with "5 –" */
.tb-test-card { display: grid; gap: 6px; }
.tb-test-card .tb-sections { display: flex; flex-wrap: wrap; gap: 6px; }
.tb-stamps { font-size: .9rem; color: #555; }
@media print { .tb-topbar, .tb-noprint { display: none !important; } }

/* Read-along Karaoke (lesson homework) */
.tb-kara-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.tb-kara-bar .tb-btn[disabled] { opacity: .45; cursor: default; }
.tb-kara { font-size: 1.25rem; line-height: 2.1; padding: 14px 16px; border-radius: 14px; background: #fffbea; border: 2px dashed #f3d27a; overflow-wrap: anywhere; }
.tb-kara-w { padding: 2px 3px; border-radius: 6px; transition: background .08s; }
/* Speaking Ladder (lesson homework) */
.tb-lad { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.tb-lad-line { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: #f4f6fb; border: 2px solid transparent; font-size: 1.15rem; line-height: 1.45; transition: background .1s; }
.tb-lad-line.mine { background: #eef8ee; }
.tb-lad-who { flex: 0 0 auto; max-width: 40%; font-size: .85rem; font-weight: 800; color: #50608a; }
.tb-lad-who:empty { display: none; }
.tb-lad-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.tb-lad-line.on { background: #ffd54a; border-color: #f0b400; color: #1b2a5e; font-weight: 700; }
.tb-lad-line.you { background: #c8f0c8; border-color: #2e9e44; color: #124a1f; font-weight: 700; }
.tb-lad-words { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
.tb-lad-pic { width: 84px; text-align: center; font-size: .85rem; font-weight: 700; background: #fff; border: 2px solid #e1e6f2; border-radius: 12px; padding: 4px; }
.tb-lad-pic img { width: 100%; height: 64px; object-fit: contain; display: block; }
.tb-kara-w.on { background: #ffd54a; color: #1b2a5e; font-weight: 800; }
.tb-kara-w.gap { border-bottom: 3px solid #3a63d6; cursor: pointer; }
.tb-kara-w.gap.filled { color: #1d4fd8; font-weight: 800; }
.tb-kara-w.ask { background: #cfe0ff; outline: 3px solid #3a63d6; }
.tb-kara-tiles { position: sticky; bottom: 76px; background: #fff; padding: 10px; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.15); margin-top: 10px; z-index: 5; }
.tb-kara-tiles[hidden] { display: none; }
.tb-group.tb-kara-card { overflow: visible; } /* 30/11/2026: overflow hidden stopped the word tray sticking to the screen bottom */
.tb-kara-hint { margin: 4px 0 8px; }

/* ================================================================ speaking + video tasks (HANDOVER-SPEAKING-FIX.md, 08/11/2026) */
/* the part to read: one clearly marked box (student page + grading page) */
.tb-say-box { background: #fff8e1; border: 3px solid #ffb300; border-radius: 16px; padding: 12px 16px; margin: 8px 0 12px; font-size: 1.2rem; line-height: 1.7; font-weight: 600; max-width: 760px; }
.tb-say-box p { margin: 0 0 8px; }
.tb-say-box p:last-child { margin-bottom: 0; }
.tb-say-label { display: block; font-size: .95rem; font-weight: 800; color: var(--tb-navy); margin: 0 0 6px; }
/* the tiger mascot asks */
.tb-tiger-ask { display: flex; align-items: center; gap: 12px; margin: 8px 0 12px; }
.tb-tiger-ask img { width: 96px; height: auto; flex: none; mix-blend-mode: multiply; }
.tb-tiger-bubble { position: relative; background: #fff; border: 3px solid var(--tb-navy); border-radius: 18px; padding: 10px 14px; font-size: 1.2rem; font-weight: 700; line-height: 1.5; }
.tb-tiger-bubble::before { content: ''; position: absolute; left: -12px; top: 50%; margin-top: -10px; border: 10px solid transparent; border-right-color: var(--tb-navy); border-left: 0; }
.tb-tiger-ask.talking img { animation: tb-tiger-talk .5s ease-in-out infinite alternate; }
@keyframes tb-tiger-talk { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-4px) rotate(2deg); } }
/* big photo (PICTURE TALK): full card width, never cropped */
.tb-q-photo { display: block; width: 100%; max-width: 720px; height: auto; max-height: 70vh; object-fit: contain; border-radius: 14px; margin: 8px 0 12px; background: #f4f6fb; }
/* model answer + sentence frames */
.tb-model-text { font-style: italic; color: #445; margin: 0 0 10px; max-width: 720px; }
.tb-frames { display: grid; gap: 6px; margin: 6px 0 12px; }
.tb-frames .tb-starter { margin: 0; }
/* Tiny Tigers script steps on the grading page */
.tb-tt-steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 6px 0 12px; }
.tb-tt-steps figure { margin: 0; text-align: center; background: #fff; border: 1px solid var(--tb-line); border-radius: 12px; padding: 6px; }
.tb-tt-steps img { width: 100%; height: 96px; object-fit: contain; }
.tb-tt-steps figcaption { font-weight: 800; }
.tb-tt-steps .tb-chip { min-height: 32px; padding: 2px 10px; }
/* comment chips in groups */
.tb-chip-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.tb-chip-head { font-weight: 800; color: var(--tb-navy); min-width: 110px; }
.tb-fold > summary { cursor: pointer; }
/* passage pictures (§4): one size everywhere, never a huge picture beside small text; full width on a phone */
.tb-passage > p > img, .tb-read-text > p > img, .tb-say-box img { display: block; width: auto; max-width: min(100%, 420px) !important; height: auto; margin: 6px auto 10px; border-radius: 12px; }
.tb-passage > p > img.tb-pic-r, .tb-read-text > p > img.tb-pic-r { float: right; width: 42%; max-width: 240px !important; margin: 0 0 8px 12px; }
.tb-read-text p::after, .tb-read-text::after { content: ''; display: table; clear: both; }
@media (max-width: 480px) {
  .tb-passage > p > img, .tb-read-text > p > img, .tb-passage > p > img.tb-pic-r, .tb-read-text > p > img.tb-pic-r { float: none; width: 100%; max-width: 100% !important; margin: 6px 0 10px; }
  .tb-tiger-ask img { width: 72px; }
  .tb-chip-head { min-width: 0; width: 100%; }
}
.tb-card.rec-live > .tb-say-box { display: none; }
/* tiger mascot poses (§12): one size, the picture never jumps while it changes */
.tb-tiger-ask img { width: 96px; height: 144px; object-fit: contain; }
.tb-tiger-ask.talking img { animation: none; }
/* Derek 26/11/2026: tiger song show on the primary skin (Tigers Starter chants) - same as theme-kinder.css */
.kd-rec-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; border-radius: 22px; background: #fff7e6; overflow: hidden; }
.kd-rec-pic { width: 100%; max-height: 300px; object-fit: contain; border-radius: 18px; }
.kd-rec-pic.pop { animation: kd-bounce .5s; }
@keyframes kd-bounce { 40% { transform: scale(1.08); } }
.kd-rec-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 7rem; font-weight: 900; color: #fff; background: rgba(23, 46, 110, .55); }
.kd-rec { justify-content: center; position: relative; }
.kd-rec .tb-rec-btn { width: 96px; height: 96px; min-height: 0; padding: 0; border-radius: 50%; font-size: 2.6rem; }
.kd-rec .tb-rec-info { text-align: center; font-size: .9rem; }
.kd-rec .tb-vid-live { flex-basis: auto; width: 120px; border-radius: 14px; transform: scaleX(-1); }
.kd-rec .tb-vid-play { width: 100%; max-width: 360px; border-radius: 14px; }
.kd-tiger-corner { position: absolute; right: 6px; bottom: 6px; margin: 0; z-index: 3; pointer-events: none; }
.kd-tiger-corner img { width: 80px; height: 120px; }
.kd-tiger-corner .tb-tiger-bubble { display: none; }
@media (max-width: 480px) { .tb-tiger-ask img { width: 72px; height: 108px; } .kd-tiger-corner img { width: 60px; height: 90px; } }
.tb-clip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0; } .tb-clip-row > span { font-weight: 700; } .tb-clip-row audio { margin: 0; }
/* ---- Grading page, one clear layout for every part (Derek 08/11/2026: "narrow cards with half the page empty,
   pictures at random sizes, videos squeezed in") ---- */
.tb-gp { padding: 0; overflow: hidden; }
.tb-gp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 20px; background: linear-gradient(90deg, #1d3a8a, #2f5bd3); color: #fff; }
.tb-gp-num { font-weight: 900; font-size: 1.15rem; background: rgba(255,255,255,.18); border-radius: 999px; padding: 4px 12px; }
.tb-gp-tag { font-weight: 900; letter-spacing: .04em; font-size: .85rem; background: #ffb300; color: #1d2a44; border-radius: 999px; padding: 4px 12px; }
.tb-gp-ins { font-weight: 700; font-size: 1.05rem; flex: 1 1 260px; }
.tb-gp-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 0; }
.tb-gp-task { padding: 18px 20px; border-right: 2px solid #eef1f8; min-width: 0; }
.tb-gp-mark { padding: 18px 20px; background: #f8faff; min-width: 0; }
.tb-gp-mark .tb-form-grid { grid-template-columns: 1fr; }
.tb-gp-mark .tb-form-grid label[style] { grid-column: auto !important; }
.tb-gp-mark .tb-chip-head { min-width: 0; width: 100%; margin-top: 6px; }
/* everything in the task column uses the full column: no half-empty boxes */
.tb-gp-task .tb-say-box, .tb-gp-task .tb-model-text, .tb-gp-task .tb-read-text { max-width: none; }
/* pictures: ONE size rule. Never floating beside text, never wider than the column, never taller than 340px */
.tb-gp-task img:not(.tb-tiger-ask img), .tb-gp-task .tb-read-text img, .tb-gp-task .tb-say-box img, .tb-gp-task img.tb-pic-r {
  float: none !important; display: block; width: auto !important; max-width: 100% !important; max-height: 340px; height: auto;
  margin: 8px auto 12px !important; border-radius: 14px; box-shadow: 0 2px 10px rgba(29,42,68,.12); object-fit: contain; }
.tb-gp-task .tb-tt-steps img { max-height: 110px; box-shadow: none; margin: 0 auto 4px !important; }
.tb-gp-task .tb-q-photo { max-height: 380px; background: none; }
/* the child's video: a proper frame, the same size every time, portrait or landscape */
.tb-gp-mark video { display: block; width: 100% !important; max-width: none !important; aspect-ratio: 4 / 3; max-height: 460px; object-fit: contain; background: #0d1530 !important; border-radius: 16px !important; box-shadow: 0 4px 16px rgba(13,21,48,.25); }
.tb-gp-mark audio { width: 100% !important; max-width: none !important; }
.tb-gp-task audio { max-width: 100%; }
@media (max-width: 900px) {
  .tb-gp-cols { grid-template-columns: 1fr; }
  .tb-gp-task { border-right: 0; border-bottom: 2px solid #eef1f8; }
  .tb-gp-head, .tb-gp-task, .tb-gp-mark { padding-left: 14px; padding-right: 14px; }
}
/* the whole reading on the grading / results pages: the full card width; every picture the same size on the right */
.tb-fold .tb-read-text { max-width: none; font-size: 1.08rem; padding: 14px 20px; }
@media (min-width: 900px) {
  .tb-fold .tb-read-text img, .tb-fold .tb-read-text img.tb-pic-r { float: right !important; clear: right; width: 34% !important; max-width: 360px !important; max-height: none; height: auto; margin: 4px 0 14px 22px !important; border-radius: 14px; box-shadow: 0 2px 10px rgba(29,42,68,.12); }
}
@media (max-width: 899px) {
  .tb-fold .tb-read-text img { float: none !important; display: block; width: 100% !important; max-width: 100% !important; margin: 8px 0 12px !important; border-radius: 14px; }
}
.tb-model-box { background: #eafbea; border: 3px solid #5cb85c; border-radius: 16px; padding: 12px 16px; margin: 12px 0; }
.tb-model-box .tb-say-label { color: #23702a; }
.tb-model-answer { font-size: 1.15rem; font-weight: 700; line-height: 1.6; color: #1d2a44; margin: 2px 0 8px; }
.tb-model-box audio { width: 100%; max-width: 420px; }

/* homework report (homework_detail.php): the whole class x all exercises on one screen, for a screenshot (Derek 2026-11-09) */
.tb-wrap.tb-hw-report { max-width: none; padding: 10px 16px; }
.tb-hw-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
.tb-hw-head h1 { margin: 4px 0 2px; }
.tb-hw-head .tb-stats-row { margin: 0; }
.tb-hw-sub { margin: 2px 0 8px; }
.tb-hw-report .tb-table { table-layout: fixed; font-size: 12px; min-width: 900px; }
.tb-hw-report .tb-table th, .tb-hw-report .tb-table td { padding: 5px 3px; text-align: center; vertical-align: middle; border-left: 1px solid var(--tb-line); overflow-wrap: anywhere; }
.tb-hw-report .tb-table th { font-size: 11px; line-height: 1.2; font-weight: 700; vertical-align: bottom; overflow-wrap: normal; hyphens: auto; }
.tb-hw-report .tb-table th:first-child, .tb-hw-report .tb-table td:first-child { text-align: left; padding-left: 6px; border-left: 0; overflow-wrap: anywhere; }
.tb-hw-report col.c-name { width: 96px; } .tb-hw-report col.c-st { width: 64px; } .tb-hw-report col.c-avg { width: 54px; }
.tb-hw-report .sc { display: block; max-width: 64px; margin: 0 auto; font-weight: 800; border-radius: 6px; padding: 2px 0; text-decoration: none; }
.tb-hw-report .sc.g { background: #e3f4d7; color: #27500a; } .tb-hw-report .sc.a { background: #fdeccc; color: #6b3d00; }
.tb-hw-report .sc.r { background: #fde0de; color: #8a1c14; } .tb-hw-report .sc.p { background: #e8edf8; color: #1d3a7a; font-size: 11px; }
.tb-hw-report .dt { display: block; color: var(--tb-muted); font-size: 10px; line-height: 1.15; margin-top: 2px; }
.tb-hw-report td.avg { font-weight: 800; font-size: 13px; }
.tb-hw-report > p:first-child { margin: 0 0 2px; }
.tb-hw-report .tb-hw-head h1 { margin: 0; }
.tb-hw-report col.c-st { width: 76px; }
.tb-hw-report .tb-table td { padding: 3px 3px; }
.tb-hw-report .dt { margin-top: 1px; }

/* camera / microphone refused: big help box with the steps (tb-recorder.js permHelp, 2026-11-09) */
.tb-perm-help { background: #fff6d6; border: 2px solid #f2b705; border-radius: 14px; padding: 12px 16px; margin: 10px 0; color: #4a3500; font-size: 1.05rem; line-height: 1.5; }
.tb-perm-help strong { display: block; font-size: 1.15rem; margin-bottom: 4px; }
.tb-perm-help ol { margin: 4px 0 6px; padding-left: 22px; }
.tb-perm-help li { margin: 3px 0; }
.tb-perm-note { font-size: .92rem; color: #6b5200; }
.tb-perm-help .vi-line { color: #6b5200; font-weight: 600; }
.tb-rec-info .vi-line { font-weight: 600; }
/* Derek 2026-11-10: homework status card on the home page (parents, EN + VI, tiger mascot) */
.tb-hw-status { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 18px; background: #fff; }
.tb-hw-status.todo { border: 3px solid #d85a30; animation: tbHwGlow 1.6s ease-in-out infinite; }
.tb-hw-status.todo img { animation: tbPulse 1.6s ease-in-out infinite; }
@keyframes tbHwGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(216, 90, 48, .45); } 50% { box-shadow: 0 0 0 8px rgba(216, 90, 48, 0); } }
.tb-hw-status.done { background: #eaf3de; border: 3px solid #97c459; }
.tb-hw-status img { flex: none; width: 76px; height: auto; align-self: flex-end; }
.tb-hw-status .txt { flex: 1; min-width: 0; line-height: 1.3; }
.tb-hw-status .txt b { display: block; font-size: 1.2rem; font-weight: 900; color: #993c1d; }
.tb-hw-status.done .txt b { color: #27500a; }
.tb-hw-status .sub { display: block; font-size: .92rem; font-weight: 700; color: #5f5e5a; }
.tb-hw-status.done .sub { color: #3b6d11; }
.tb-hw-status ul { margin: 8px 0; padding-left: 18px; }
.tb-hw-status li { margin: 3px 0; font-size: .95rem; }
.tb-hw-status li a { color: var(--tb-navy); font-weight: 800; }
.tb-hw-status li .meta { color: #5f5e5a; font-size: .85rem; }
.tb-hw-status li em { color: #c0392b; font-style: normal; font-weight: 800; }
.tb-hw-status li.more { list-style: none; margin-left: -18px; color: #5f5e5a; font-weight: 700; }
.tb-hw-status .go { display: inline-block; background: #d85a30; color: #fff; font-weight: 900; padding: 8px 16px; border-radius: 999px; text-decoration: none; box-shadow: 0 3px 0 #993c1d; }
.tb-hw-status.todo .go { animation: tbHwBtnPulse 1.1s ease-in-out infinite; } /* Derek 18/11/2026: the glow alone was too subtle, make the button itself pulse */
@keyframes tbHwBtnPulse { 0%, 100% { transform: scale(1); box-shadow: 0 3px 0 #993c1d, 0 0 0 0 rgba(216, 90, 48, .55); } 50% { transform: scale(1.07); box-shadow: 0 3px 0 #993c1d, 0 0 0 7px rgba(216, 90, 48, 0); } }
.tb-hw-status .go:active { transform: translateY(2px); box-shadow: 0 1px 0 #993c1d; }

/* "Read with the tiger: listening text": the speaker's name before each line (hw_listen_text.js, 2026-11-09) */
.tb-who { color: #1d3a7a; font-weight: 800; margin-right: 4px; }
/* why these stars (Derek 09/11/2026) */
.tb-star-note { display: inline-block; margin: -6px 0 12px; padding: 6px 18px; border-radius: 18px; max-width: 100%; box-sizing: border-box; background: #fff3c4; color: #5c4400; font-weight: 800; }
.tb-st-score { font-size: .85rem; font-weight: 800; color: var(--tb-muted); white-space: nowrap; }

/* Audit 10/11/2026: a very wide or very tall picture (a strip of several small pictures, a comic row) is shown whole,
   not cut to a square; tb-runner.js adds .tb-whole when the picture loads (ratio over 1.6 or under 0.62) */
img.tb-whole { object-fit: contain !important; background: #fff; }
/* Derek 12/11/2026: True or False Race countdown */
.tb-race { background: #fff7e0; border: 2px solid #f5b400; border-radius: 14px; padding: 8px 12px; margin-top: 10px; font-weight: 700; position: sticky; top: 82px; z-index: 5; }
.tb-race-bar { height: 10px; background: #f3e3b0; border-radius: 99px; overflow: hidden; margin-top: 6px; }
.tb-race-bar .fill { height: 100%; width: 100%; background: linear-gradient(90deg, #ff7a00, #f5b400); transition: width .25s linear; }
.tb-race.late { border-color: #d33; background: #ffecec; }
@media (max-width: 600px) { .tb-race { top: 16px; } }
.tb-race.run { position: fixed; top: 8px; left: 12px; right: 12px; max-width: 760px; margin: 0 auto; z-index: 30; box-shadow: 0 4px 14px rgba(0,0,0,.15); }

/* ---------- Rewards v2: buddy shop (Derek 2026-11-17, copied from Learn looks.css) ---------- */
.tb-bd { position: relative; display: inline-block; vertical-align: middle; width: 2.4em; height: 2.4em; flex: none; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #fff, #fff3c4); overflow: hidden; line-height: 1; --ring: 0 0 0 .05em #c9ccd1; box-shadow: var(--ring); }
.tb-bd span { position: absolute; left: 50%; transform: translateX(-50%); }
.tb-bd-place { top: 50%; transform: translate(-50%, -50%) !important; font-size: 2.2em; opacity: .38; }
.tb-bd-animal { top: .42em; font-size: 1em; }
/* hat/glasses tops in % of the circle (em here = the layer's own small font, which put glasses up at the hat) */
.tb-bd-hat { top: 10%; font-size: .55em; }
.tb-bd-glasses { top: 33%; font-size: .42em; }
.tb-bd-clothes { top: 1.52em; font-size: .68em; }
.tb-ring-rare { --ring: 0 0 0 .06em #2f7de1; }
.tb-ring-epic { --ring: 0 0 0 .06em #8b45d6, 0 0 0 .1em #e3d0f7; }
.tb-ring-legendary { --ring: 0 0 0 .07em #d49a00, 0 0 0 .12em #fff0bf; }
.tb-stage-3 .tb-bd-animal, .tb-stage-4 .tb-bd-animal, .tb-stage-5 .tb-bd-animal { filter: drop-shadow(0 0 .08em rgba(255, 200, 60, .9)); }
.tb-stage-4::before, .tb-stage-4::after, .tb-stage-5::before, .tb-stage-5::after { content: '✨'; position: absolute; font-size: .3em; z-index: 2; animation: tb-twinkle 2.4s ease-in-out infinite; }
.tb-stage-4::before, .tb-stage-5::before { top: .15em; left: .2em; }
.tb-stage-4::after, .tb-stage-5::after { bottom: .45em; right: .2em; animation-delay: 1.2s; }
.tb-stage-5 { animation: tb-aura 2.8s ease-in-out infinite; }
@keyframes tb-twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }
@keyframes tb-aura { 0%, 100% { box-shadow: var(--ring), 0 0 .1em .02em rgba(255, 200, 60, .35); } 50% { box-shadow: var(--ring), 0 0 .35em .12em rgba(255, 200, 60, .75); } }
@media (prefers-reduced-motion: reduce) { .tb-bd, .tb-bd::before, .tb-bd::after { animation: none !important; } }
.tb-buddy-talk .em.has-bd { width: auto; height: auto; background: none; box-shadow: none; border-radius: 50%; }
.tb-shop-top { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.tb-shop-top h1 { margin: 0 0 4px; }
.tb-balance { font-family: "Baloo 2", sans-serif; font-weight: 800; font-size: 1.6rem; }
.tb-balance .vi-line { display: inline; font-size: .9rem; }
.tb-grow { font-size: .9rem; color: var(--tb-muted); margin-top: 2px; }
.tb-shop-msg { background: #fff8e1; border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.tb-shop-msg.ok { background: #eaf7ec; }
.tb-shop-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tb-shop-tabs a { padding: 6px 14px; border-radius: 18px; border: 2px solid #e3e8f4; background: #fff; text-decoration: none; font-weight: 800; color: var(--tb-navy); text-align: center; line-height: 1.2; }
.tb-shop-tabs a .vi-line { font-size: .75rem; font-weight: 600; }
.tb-shop-tabs a.on { background: var(--tb-navy); border-color: var(--tb-navy); color: #fff; }
.tb-shop-tabs a.on .vi-line { color: #dfe6f5; }
.tb-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.tb-shop-item { background: #fff; border: 3px solid #e3e8f4; border-radius: 20px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 0; }
.tb-shop-item.worn { border-color: var(--tb-lime); background: #f3fbe9; }
.tb-shop-item.trying { border-color: #e6a700; border-style: dashed; }
.tb-shop-item.r-rare { border-top: 5px solid #2f7de1; }
.tb-shop-item.r-epic { border-top: 5px solid #8b45d6; }
.tb-shop-item.r-legendary { border-top: 5px solid #d49a00; box-shadow: 0 2px 10px rgba(212, 154, 0, .2); }
.tb-shop-emoji { font-size: 3rem; line-height: 1.1; }
.tb-shop-name { font-weight: 800; color: var(--tb-navy); line-height: 1.2; }
.tb-shop-name .vi-line { font-size: .8rem; font-weight: 600; }
.tb-shop-state { font-size: .85rem; font-weight: 700; color: #6b5200; }
.tb-shop-state .vi-line { font-size: .8rem; }
.tb-rar { display: inline-block; font-size: .72rem; font-weight: 700; line-height: 1.6; padding: 0 8px; border-radius: 9px; background: #eef0f2; color: #4a4f57; white-space: nowrap; }
.tb-rar-rare { background: #dceafc; color: #1d5fb3; }
.tb-rar-epic { background: #ecdffa; color: #6b2fb0; }
.tb-rar-legendary { background: #fff0bf; color: #7a5700; }
.tb-shop-item .tb-btn, .tb-try-bar .tb-btn, .tb-buy-box .tb-btn { min-height: 40px; padding: 0 14px; font-size: .9rem; background: #fff; color: var(--tb-navy); border: 2px solid #d5dcec; box-shadow: none; }
.tb-shop-item .tb-btn-go, .tb-try-bar .tb-btn-go, .tb-buy-box .tb-btn-go { background: var(--tb-btn-green); color: #fff; border-color: var(--tb-btn-green); box-shadow: 0 3px 0 var(--tb-btn-green-dark); }
.tb-try-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #fff8e1; border: 2px dashed #e6c46a; color: #5b3f00; border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; }
.tb-try-bar[hidden], .tb-buy-overlay[hidden], .tb-try-bar [hidden] { display: none !important; }
.tb-try-text { font-weight: 800; }
.tb-try-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.tb-buy-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.tb-buy-box { background: #fff; border-radius: 22px; padding: 20px; max-width: 340px; width: 100%; text-align: center; color: var(--tb-navy); }
.tb-buy-q { font-size: 1.15rem; margin: 8px 0 4px; }
.tb-buy-left { font-size: .9rem; margin: 0 0 14px; }
@media (max-width: 560px) { .tb-shop-top { gap: 10px; flex-direction: column; text-align: center; } .tb-shop-top h1 { font-size: 1.6rem; } .tb-shop-top .tb-bd { font-size: 48px !important; } .tb-shop-grid { grid-template-columns: repeat(2, 1fr); } }
.tb-shop-msg.tb-xmas { background: #e7f5ec; border: 2px solid #1f7a4d; color: #14532d; }
/* Surprise boxes (rewards v2) */
.tb-box-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 14px 0; }
.tb-box { margin: 0; }
.tb-box button { font: inherit; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 16px 8px; border-radius: 22px; border: 4px solid #c9ccd1; background: #fff; cursor: pointer; }
.tb-box .em { font-size: 4rem; line-height: 1.1; animation: tbBoxWiggle 2.4s ease-in-out infinite; }
.tb-box .nm { font-weight: 800; color: var(--tb-navy); font-size: .9rem; }
.tb-box .go { margin-top: 4px; padding: 6px 16px; border-radius: 99px; background: var(--tb-btn-green); color: #fff; font-weight: 800; box-shadow: 0 3px 0 var(--tb-btn-green-dark); }
.tb-box-rare button { border-color: #2f7de1; background: #f1f7ff; }
.tb-box-epic button { border-color: #8b45d6; background: #f8f2ff; }
.tb-box-legendary button { border-color: #d49a00; background: #fffaea; box-shadow: 0 0 14px rgba(212, 154, 0, .35); }
@keyframes tbBoxWiggle { 0%, 80%, 100% { transform: rotate(0); } 85% { transform: rotate(-8deg); } 90% { transform: rotate(8deg); } 95% { transform: rotate(-4deg); } }
.tb-box-won { text-align: center; margin-bottom: 18px; }
.tb-box-big { font-size: 3rem; } .tb-box-big span { display: block; font-size: 6rem; line-height: 1.1; animation: tbPop .5s ease-out both; }
.tb-box-none { background: #fff8e1; border-radius: 14px; padding: 12px 14px; font-weight: 700; }
.tb-box-chip { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 16px 6px 8px; border-radius: 99px; background: #ffd23f; color: var(--tb-navy); font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 #e0a800; }
.tb-box-chip .em { font-size: 1.6rem; animation: tbBoxWiggle 2.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tb-box .em, .tb-box-chip .em { animation: none; } }
/* Most improved (rewards v2): names only */
.tb-improved-names { display: flex; flex-wrap: wrap; gap: 8px; }
.tb-improved-names span { padding: 6px 14px; border-radius: 99px; background: #eaf7ec; color: #14532d; font-weight: 800; }
.tb-improved-names span.me { background: #c9efcf; outline: 2px solid #2e7d32; }

/* Derek 26/11/2026 (Starter improvements item 4): karaoke picture per sentence group */
.tb-kara-pic { display: block; width: 100%; max-height: 190px; object-fit: contain; border-radius: 16px; background: #fff7e6; margin: 10px 0 6px; scroll-margin-top: 8px; }
.tb-kara-pic.pop { animation: kd-bounce .5s; }

/* Derek 26/11/2026 (Starter improvements item 6): effort star after the first saved recording of a task */
.tb-rec-star { position: fixed; left: 50%; top: 30%; transform: translateX(-50%); z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border-radius: 24px; padding: 12px 22px 16px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.tb-rec-star img { width: 84px; height: 126px; }
.tb-rec-star .tb-tiger-bubble { display: none; }
.tb-rec-star .msg { font-weight: 800; font-size: 1.25rem; color: var(--tb-navy); white-space: nowrap; }
.tb-rec-star.out { opacity: 0; transition: opacity .45s; }

/* Derek 26/11/2026 (quality test): no I'm finished bar over the recorder while recording */
body.tb-recording .tb-submit-bar { display: none; }
