/* The web app's look: always dark, cinematic and uncluttered: black, big
   video posters, one warm amber accent (like a lit screen in a dark room).
   Change the accent in one place: --blue / --accent-2 below.
   (style.css is shared with Grab.) */
:root, :root:not([data-theme]) {
  --loaded-web: 1;   /* core.js cssApplied: this file is in effect */
  --bg: #000;
  --cell: #141416;
  --cell-pressed: #2a2a2e;
  --label: #f5f5f7;
  --secondary: rgba(235, 235, 245, 0.55);
  --tertiary: rgba(235, 235, 245, 0.28);
  --separator: rgba(255, 255, 255, 0.08);
  --fill: rgba(255, 255, 255, 0.08);
  --seg-thumb: #3a3a3e;
  --blue: #ffb020;              /* the accent (buttons, links, highlights) */
  --accent-2: #ff7a3d;
  --on-accent: #1a1000;         /* text on accent-coloured buttons */
  --bar: rgba(0, 0, 0, 0.78);
  --sheet: #121214;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}
.sheet .group { --cell: #1d1d20; }
body { background: #000; }
.large-title { font-size: 32px; letter-spacing: -0.5px; }
.primary-button { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }
body.signed-out .tabbar { display: none; }
.tabbar { background: rgba(0, 0, 0, 0.85); border-top-color: rgba(255, 255, 255, 0.06); }

/* Sign in */
.signin { padding-top: calc(var(--safe-top) + 64px); text-align: center; }
.signin .group, .signin .section-footer { text-align: left; }
.si-logo {
  width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 22px; overflow: hidden;
  box-shadow: 0 10px 44px rgba(255, 150, 40, 0.30);
}
.si-logo img { width: 100%; height: 100%; display: block; }
.si-define { color: var(--secondary); font-size: 14px; margin: -4px 16px 18px; }
.si-define i { font-style: normal; color: var(--label); opacity: .75; }
.si-headline {
  font-size: 30px; font-weight: 800; line-height: 1.15; letter-spacing: -0.6px; margin: 4px 16px 10px;
  background: linear-gradient(90deg, var(--blue), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.si-tag { color: var(--secondary); font-size: 16px; line-height: 1.4; margin: 0 16px 14px; }
.si-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 30px; }
.si-badges span {
  padding: 5px 10px; border-radius: 12px; background: rgba(255, 176, 32, .12);
  color: var(--blue); font-size: 12px; font-weight: 600;
}
.signin .text-button { margin: 10px auto 0; display: block; color: var(--secondary); }

/* Review bar */
.rv-bar {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 4px 0 16px;
  padding: 12px 14px; border-radius: 16px; background: var(--cell); text-align: left;
}
.rv-bar-n {
  flex: none; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fill); font-weight: 700; font-size: 16px;
}
.rv-bar.due .rv-bar-n { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }
.rv-bar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rv-bar-t b { font-size: 16px; }
.rv-bar-t i { font-style: normal; font-size: 13px; color: var(--secondary); }
.rv-bar-go { flex: none; color: var(--blue); font-weight: 600; font-size: 15px; }

/* Continue (hero) */
.hero {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 18px;
  border-radius: 18px; overflow: hidden; background: #111; text-align: left;
}
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.85)); }
.hero-text { position: absolute; left: 16px; right: 72px; bottom: 14px; display: flex; flex-direction: column; }
.hero-text i { font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); }
.hero-text b { font-size: 19px; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.hero-play {
  position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 23px;
  background: #fff; display: flex; align-items: center; justify-content: center;
}
.hero-play svg { width: 22px; height: 22px; fill: #000; margin-left: 3px; }

/* Add a video */
.add-row {
  display: flex; gap: 8px; align-items: center; margin-bottom: 22px;
  background: var(--cell); border-radius: 14px; padding: 6px 6px 6px 14px;
}
.add-row input {
  flex: 1; min-width: 0; height: 40px; border: 0; outline: 0; background: none;
  color: var(--label); font: inherit; font-size: 16px;
}
.add-row input::placeholder { color: var(--tertiary); }
.add-row button {
  flex: none; height: 38px; padding: 0 16px; border-radius: 11px; font-weight: 700; color: var(--on-accent);
  background: linear-gradient(135deg, var(--blue), var(--accent-2));
}
.add-row button:disabled { opacity: .5; }

/* Posters */
.shelf-title { font-size: 20px; font-weight: 700; margin: 6px 4px 12px; letter-spacing: -0.3px; }
.poster-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; margin-bottom: 26px; }
@media (min-width: 700px) { .poster-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .poster-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.poster { display: flex; flex-direction: column; text-align: left; min-width: 0; }
.poster:active { opacity: .75; }
.poster-img {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #151517;
}
.poster-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.poster.busy img { filter: brightness(.35); }
.poster-title {
  margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.25;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.poster-sub { font-size: 12px; color: var(--secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster-time {
  position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px;
  background: rgba(0, 0, 0, 0.75); font-size: 11px; font-weight: 600;
}
.poster-state {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px; text-align: center; font-size: 12px; font-weight: 600;
}
.poster-state.failed { color: var(--red); background: rgba(0, 0, 0, .6); }
.poster-add {
  position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border-radius: 15px;
  display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 600; line-height: 1;
  background: rgba(0, 0, 0, 0.65); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.poster-add.added { background: var(--blue); color: var(--on-accent); font-size: 15px; }
.spinner {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin .8s linear infinite;
}
.empty-note { grid-column: 1 / -1; color: var(--secondary); font-size: 15px; margin: 4px 4px 20px; }
.shelf-note { color: var(--secondary); font-size: 15px; margin: -4px 4px 12px; }
#ex-channels { margin-bottom: 26px; }
#ch-more { margin: 4px 0 24px; }

/* Streak + daily goal */
.learn-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.learn-top .large-title { margin-bottom: 8px; }
#st-streak { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.streak {
  display: flex; align-items: center; gap: 4px; height: 38px; padding: 0 12px; border-radius: 19px;
  background: var(--cell); font-size: 16px;
}
.streak .flame { filter: grayscale(1) brightness(.8); transition: filter .3s; }
.streak.lit .flame { filter: none; }
.streak b { font-size: 17px; }
.streak-l { color: var(--secondary); font-size: 13px; }
.goal { position: relative; width: 44px; height: 44px; }
.goal svg { width: 44px; height: 44px; transform: rotate(-90deg); }
.goal circle { fill: none; stroke-width: 3.5; }
.goal-bg { stroke: rgba(255, 255, 255, .1); }
.goal-fg { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.goal span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: var(--secondary); letter-spacing: 0;
}
.goal span b { color: var(--label); font-size: 12px; }

/* Lesson progress on posters */
.poster-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .15); }
.poster-progress i { display: block; height: 100%; background: var(--blue); }
.poster-time { bottom: 10px; }

/* Progress sheet */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.stat-row div { background: var(--cell); border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.stat-row b { font-size: 22px; }
.stat-row span { font-size: 12px; color: var(--secondary); }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 110px; margin-bottom: 18px; align-items: end; }
.wk { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.wk i { display: block; width: 100%; min-height: 4px; border-radius: 6px; background: rgba(255, 255, 255, .14); }
.wk.met i { background: linear-gradient(var(--blue), var(--accent-2)); }
.wk span { font-size: 11px; color: var(--secondary); }
.sheet-label { font-size: 13px; color: var(--secondary); text-transform: uppercase; letter-spacing: .5px; margin: 0 4px 8px; }
.goal-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.goal-pick button { background: var(--cell); border-radius: 14px; padding: 12px 6px; display: flex; flex-direction: column; border: 2px solid transparent; }
.goal-pick button.on { border-color: var(--blue); }
.goal-pick span { font-size: 12px; color: var(--secondary); }

/* Celebrations */
.celebrate {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  pointer-events: none; opacity: 0; transition: opacity .3s;
}
.celebrate.show { opacity: 1; }
.cel-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 28px; border-radius: 22px;
  background: rgba(20, 20, 22, .92); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); transform: scale(.9); transition: transform .35s cubic-bezier(.2, 1.4, .4, 1);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.celebrate.show .cel-card { transform: scale(1); }
.cel-card b { font-size: 22px; }
.cel-card span { color: var(--blue); font-weight: 600; }
.confetti { position: fixed; inset: 0; z-index: 59; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -12px; width: 8px; height: 12px; border-radius: 2px;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(var(--r)); } }

/* Lesson page and review in the accent */
.sent.now { box-shadow: inset 3px 0 0 var(--blue); }
.grade.easy { background: var(--blue); color: var(--on-accent); }
.chip.on { color: var(--on-accent); }
.sent.now { background: rgba(255, 176, 32, 0.10); }
.wc-word .syl.on { background: rgba(255, 176, 32, .22); }
.review-card { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }
.rc-btn { color: var(--accent-2); }

/* ───────── Brighter, bigger, happier (owner, 2026-10-01: "looks small, not bright,
   engaging and happy"; tab buttons hard to see). Still dark + amber, still simple. ───────── */
:root, :root:not([data-theme]) {
  --cell: #1c1712;
  --cell-pressed: #2b241b;
  --secondary: rgba(255, 240, 222, 0.70);
  --tertiary: rgba(255, 240, 222, 0.40);
  --separator: rgba(255, 200, 120, 0.10);
  --fill: rgba(255, 210, 150, 0.10);
  --tabbar-h: 68px;
}
body {
  background:
    radial-gradient(900px 520px at 50% -160px, rgba(255, 150, 40, 0.24), transparent 70%),
    radial-gradient(700px 400px at 100% 110%, rgba(255, 110, 60, 0.10), transparent 70%),
    linear-gradient(#140e08, #050403 55%) fixed;
}
.content { max-width: 1100px; padding-left: 20px; padding-right: 20px; padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 48px); }
.signin.content { max-width: 560px; }

/* Greeting */
.hello { margin: -2px 4px 18px; font-size: 17px; color: var(--secondary); }
.hello b { color: var(--blue); font-weight: 700; }

/* Floating tab dock: big, bright, easy to hit */
.tabbar {
  left: 50%; right: auto; transform: translateX(-50%);
  bottom: calc(var(--safe-bottom) + 12px);
  width: min(480px, calc(100% - 24px)); height: var(--tabbar-h);
  padding: 6px; gap: 6px; border-radius: 26px;
  background: rgba(34, 27, 19, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 190, 90, 0.16);
}
.tab {
  max-width: none; border-radius: 20px; gap: 3px;
  color: rgba(255, 240, 222, 0.80); font-size: 12.5px; font-weight: 650;
  transition: background .2s, color .2s;
}
.tab svg { width: 26px; height: 26px; stroke-width: 2; }
.tab.active {
  color: var(--on-accent);
  background: linear-gradient(135deg, var(--blue), var(--accent-2));
  box-shadow: 0 6px 22px rgba(255, 140, 40, 0.35);
}
.tab.active svg { stroke-width: 2.3; }
.badge { top: 2px; }

/* Bigger type on bigger screens */
.large-title { font-size: 38px; line-height: 1.1; letter-spacing: -0.8px; }
@media (min-width: 900px) {
  .large-title { font-size: 48px; }
  .hello { font-size: 19px; }
  .shelf-title { font-size: 26px; }
  .poster-title { font-size: 16px; }
}

/* Streak + goal: warmer, bigger */
.streak { height: 46px; padding: 0 16px; border-radius: 23px; background: rgba(255, 170, 40, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 180, 60, 0.22); }
.streak b { font-size: 20px; color: var(--blue); }
.streak .flame { font-size: 20px; filter: saturate(.6); }
.goal, .goal svg { width: 52px; height: 52px; }
.goal span b { font-size: 14px; }

/* Add a video: bigger and inviting */
.add-row { padding: 8px 8px 8px 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.18); margin-bottom: 28px; }
.add-row input { height: 46px; font-size: 17px; }
.add-row button { height: 46px; padding: 0 24px; border-radius: 14px; font-size: 17px; box-shadow: 0 6px 20px rgba(255, 140, 40, 0.30); }

/* Posters: bigger, with a warm glow */
.shelf-title { font-size: 22px; }
.poster-grid { gap: 22px 16px; }
.poster-img { border-radius: 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55); transition: transform .2s, box-shadow .2s; }
@media (hover: hover) {
  .poster:hover .poster-img { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(255, 140, 40, 0.25), 0 0 0 1px rgba(255, 190, 90, 0.35); }
}
.poster-title { margin-top: 10px; font-size: 15px; }
.poster-state { font-size: 13px; color: #fff; }
.poster-state .spinner { border-color: rgba(255, 190, 90, .3); border-top-color: var(--blue); }
.poster.busy img { filter: brightness(.45) saturate(.8); }

/* Friendly empty state */
.empty-note { font-size: 16px; }
.empty-card {
  grid-column: 1 / -1; padding: 28px 22px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(255, 176, 32, 0.14), rgba(255, 122, 61, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.18);
}
.empty-card .big { font-size: 40px; display: block; margin-bottom: 6px; }
.empty-card b { display: block; font-size: 19px; margin-bottom: 4px; }
.empty-card span { color: var(--secondary); font-size: 15px; }

/* ───────── Say it like a native (from Grab's app/style.css) ───────── */
#ph-input { width: 100%; border: 0; outline: 0; resize: none; background: none; color: var(--label); font: inherit; font-size: 17px; padding: 4px 0; }
.ph-item { margin: 12px 0 6px; }
.ph-q { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; color: var(--secondary); margin: 0 4px 8px; }
.ph-q b { flex: 1; color: var(--label); font-size: 17px; }
.ph-q button { color: var(--secondary); font-size: 15px; }
.ph-item:has(.ph-fold:not(.open)) { margin: 0; border-bottom: 1px solid var(--separator); }
#ph-list { overflow-x: clip; }
.ph-fold { margin: 0 4px; padding: 12px 0; align-items: center; overflow: hidden; }
.ph-fold.open { padding-bottom: 8px; }
.ph-q .ph-head { flex: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; display: flex; align-items: flex-start; gap: 10px; text-align: left; color: var(--label); min-width: 0; }
.ph-chev { color: var(--secondary); font-size: 20px; line-height: 22px; transition: transform .2s; }
.ph-fold.open .ph-chev { transform: rotate(90deg); }
.ph-title { flex: 1; min-width: 0; }
.ph-title b { display: block; font-size: 17px; }
.ph-title small { display: block; margin-top: 3px; font-size: 14px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-check { margin: 0 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--fill); font-size: 14px; }
.ph-check.good b { color: var(--green); }
.ph-check.bad b { color: var(--orange); }
.ph-v { background: var(--cell); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; }
.ph-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ph-ctx { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); }
.ph-ctx em { font-style: normal; color: var(--orange, #ff9f0a); }
.ph-star { font-size: 22px; color: var(--secondary); line-height: 1; }
.ph-star.on { color: #ffcc00; }
.ph-acts { display: flex; align-items: center; gap: 6px; }
.ph-vx {
  width: 36px; height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
  color: var(--blue); background: rgba(255, 176, 32, 0.16); box-shadow: inset 0 0 0 1.5px rgba(255, 176, 32, 0.55);
}
.ph-vx svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.ph-vx:active { transform: scale(.9); background: var(--blue); color: var(--on-accent); }
.ph-restore { display: block; margin: 4px auto 10px; font-size: 15px; }
.ph-v .en { margin: 8px 0 0; }
.ph-note { font-size: 13px; color: var(--secondary); margin-top: 6px; }
.ph-flag { font-size: 13px; color: var(--orange); margin-top: 6px; }
.ph-heard { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--separator); }
.ph-heard b { font-size: 13px; color: var(--green); }
.ph-heard small { display: block; font-size: 12px; color: var(--secondary); margin: 2px 0 2px; }
.ph-heard button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 15px; color: var(--label);
  margin-top: 8px; padding: 10px 10px 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.05);
  box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.18);
}
.ph-heard button:active { transform: scale(.98); background: rgba(255, 176, 32, 0.14); }
.ph-heard .vid-t { flex: 1; min-width: 0; }
.ph-heard .vid-t span { display: block; font-size: 12px; color: var(--secondary); margin-top: 2px; }
.vid-play {
  flex: none; width: 34px; height: 34px; border-radius: 17px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent);
}
.vid-play svg { width: 15px; height: 15px; fill: currentColor; margin-left: 2px; }
/* Tappable words (phrases and lesson sentences): a dotted amber underline says so. */
.ph-v .il .tok b, .tok[data-s="word"] b { -webkit-text-decoration: underline dotted rgba(255, 176, 32, 0.75); text-decoration: underline dotted rgba(255, 176, 32, 0.75); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.ph-heard mark { background: none; color: var(--orange, #ff9f0a); font-weight: 600; }
.ph-v .il .tok { cursor: pointer; }
.ph-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.ph-wait { background: var(--cell); border-radius: 16px; padding: 14px; color: var(--secondary); font-size: 15px; display: flex; gap: 10px; align-items: center; }

.ph-steps { flex-direction: column; align-items: stretch; gap: 8px; }
.ph-steps > div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--tertiary); }
.ph-steps > div > i { width: 18px; flex: none; display: flex; justify-content: center; font-style: normal; }
.ph-steps > div > span { flex: 1; min-width: 0; }
.ph-steps > div.done { color: var(--secondary); }
.ph-steps > div.done > i { color: var(--green); }
.ph-steps > div.now { color: var(--label); font-weight: 600; }
.ph-why { margin: 4px 0 0; font-size: 12px; color: var(--secondary); }

/* ───────── Practice tab ───────── */
.pr-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 30px; }
.pr-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 18px; border-radius: 20px; text-align: left;
  background: var(--cell); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.14);
}
.pr-tile.lit { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); box-shadow: 0 10px 30px rgba(255, 140, 40, 0.3); }
.pr-big { font-size: 40px; font-weight: 800; line-height: 1; margin-bottom: 6px; }
.pr-tile b { font-size: 19px; }
.pr-tile i { font-style: normal; font-size: 14px; opacity: .75; }
.ph-box {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 10px 10px 18px; border-radius: 18px; margin-bottom: 18px;
  background: var(--cell); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.18);
}
.ph-box #ph-input { flex: 1; min-height: 46px; padding: 10px 0; }
.ph-box #ph-input::placeholder { color: var(--tertiary); }
#ph-go {
  flex: none; height: 46px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: 17px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); box-shadow: 0 6px 20px rgba(255, 140, 40, 0.30);
}
#ph-go:disabled { opacity: .5; }
.ph-v { padding: 16px 18px; border-radius: 18px; box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.10); }
.ph-v .il .tok b { font-size: 26px; }
.ph-hint { margin: 8px 0 0; font-size: 12px; color: var(--tertiary); }
.ph-x { color: var(--secondary); font-size: 16px; padding: 4px 6px; }

/* ───────── Lesson page: keep the video's true 16:9 shape, centred ─────────
   (it filled the full width with a height cap, so wide screens got a cropped strip) */
.player .yt-box, .player video {
  width: min(100%, calc(34vh * 16 / 9)); max-height: none; height: auto; aspect-ratio: 16 / 9; margin: 0 auto;
}
@media (min-width: 900px) {
  .player .yt-box, .player video { width: min(100%, calc(52vh * 16 / 9)); border-radius: 0 0 16px 16px; overflow: hidden; }
  .player-controls, .player-options { max-width: 900px; margin: 0 auto; justify-content: center; }
  .player .scrub { max-width: 900px; margin: 0 auto; }
  .transcript { max-width: 820px; }
  .transcript .il .tok b { font-size: 24px; }
}
.player-controls > button.big { color: var(--on-accent); }
@media (min-width: 900px) { .hero { aspect-ratio: 2.35 / 1; } .hero img { object-position: center 30%; } }

/* Phrase list: a clear, lively open arrow and ✕ (owner: easier to see, still on-brand) */
.ph-q { align-items: center; }
.ph-fold { padding: 10px 0; }
.ph-q .ph-head { align-items: center; gap: 12px; border-radius: 14px; padding: 4px 6px 4px 0; transition: background .2s; }
.ph-chev {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; font-weight: 700; color: var(--blue);
  background: rgba(255, 176, 32, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.30);
  transition: transform .35s cubic-bezier(.2, 1.5, .4, 1), background .2s, color .2s, box-shadow .2s;
}
.ph-fold.open .ph-chev {
  transform: rotate(90deg); color: var(--on-accent);
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); box-shadow: 0 4px 16px rgba(255, 140, 40, 0.35);
}
.ph-x {
  flex: none; width: 34px; height: 34px; border-radius: 50%; padding: 0;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
  color: var(--secondary); background: var(--fill);
  transition: transform .25s ease, background .2s, color .2s;
}
.ph-x:active { transform: scale(.9); }
@media (hover: hover) {
  .ph-q .ph-head:hover { background: rgba(255, 176, 32, 0.06); }
  .ph-q .ph-head:hover .ph-chev { transform: translateX(3px) scale(1.08); background: rgba(255, 176, 32, 0.24); }
  .ph-fold.open .ph-head:hover .ph-chev { transform: rotate(90deg) scale(1.08); }
  .ph-x:hover { color: #fff; background: rgba(255, 90, 60, 0.85); transform: rotate(90deg); }
}
@keyframes phIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Drawn icons (owner: a real arrow; no dark hover; no red) */
.ph-chev svg, .ph-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ph-x svg { width: 16px; height: 16px; stroke-width: 2.6; }
@media (hover: hover) {
  .ph-fold.open .ph-head:hover .ph-chev {
    background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent);
    box-shadow: 0 6px 20px rgba(255, 140, 40, 0.5);
  }
  .ph-x:hover { color: var(--blue); background: rgba(255, 176, 32, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.35); }
}

/* Anki decks in Practice */
#dk-section { margin-bottom: 30px; }
.dk-import { margin-top: 10px; }
.dk-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 4px 12px; font-size: 13px; color: var(--secondary); }
.dk-top .chip:disabled { opacity: .6; }
.dk-recall-all { margin: 4px 0 12px; }
.mem-proof { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; font-size: 13px; color: var(--secondary); line-height: 1.35; }

/* Videos & phrases vs Anki: separate review tiles and Saved lists */
.pr-tiles.three .pr-tile[data-s="saved"] { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; padding: 14px 18px; }
.pr-tiles.three .pr-tile[data-s="saved"] .pr-big { font-size: 28px; margin: 0; }
.pr-tiles.three .pr-tile[data-s="saved"] i { margin-left: auto; }
#sv-set { margin-bottom: 10px; }

/* Saved (owner, 2026-10-21): From chips (44 pt tall to tap, the pill inside) and one group per lesson */
.sv-from { display: flex; align-items: center; gap: 8px; overflow-x: auto; margin: -2px -20px 10px; padding: 0 0 0 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
/* scrolled sideways: the chip leaving on the left fades out too (at the start, the From label stays crisp) */
.sv-from.scrolled { -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 28px), transparent); }
.sv-from::-webkit-scrollbar { display: none; }
/* the end space (not padding: Safari can leave a scroller's end padding out): scrolled to the end, the last chip is clear of the fade */
.sv-from::after { content: ''; flex: none; width: 28px; height: 1px; }
.sv-from-k { flex: none; font-size: 13px; color: var(--secondary); margin: 0 0 0 4px; }
.sv-from button { flex: none; height: 44px; display: flex; align-items: center; -webkit-tap-highlight-color: transparent; }
.sv-from button span { display: flex; align-items: center; height: 32px; padding: 0 13px; border-radius: 16px;
  background: var(--fill); color: var(--label); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .15s; }
.sv-from button[aria-checked="true"] span { background: var(--blue); color: var(--on-accent); }
.sv-from button:active span { opacity: .7; }
.sv-head { display: flex; align-items: center; gap: 10px; margin: 18px 0 2px 16px; }
.sv-list > .sv-head:first-child { margin-top: 2px; }
.sv-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* the lesson title: up to two lines, like the Library's poster titles, so lessons of one series stay apart */
.sv-head-t b { font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--label);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* the grey line: a long channel name is cut short, the count always shows */
.sv-head-s { display: flex; min-width: 0; font-size: 13px; color: var(--secondary); margin-top: 1px; }
.sv-head-s i { font-style: normal; white-space: pre; }
.sv-head-s .sv-head-ch { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-head-s .sv-head-n { flex: none; }
.sv-head-rv { flex: none; height: 44px; min-width: 44px; display: flex; align-items: center; justify-content: flex-end; -webkit-tap-highlight-color: transparent; }
.sv-head-rv span { height: 30px; padding: 0 14px; border-radius: 15px; display: flex; align-items: center;
  background: rgba(255, 176, 32, 0.14); color: var(--blue); font-size: 14px; font-weight: 600; }
.sv-head-rv:active span { opacity: .7; }
.sv-list > .group { margin-bottom: 0; }

/* Pull to refresh */
.ptr {
  position: fixed; z-index: 70; left: 50%; top: calc(var(--safe-top) + 8px); transform: translate(-50%, -60px); opacity: 0;
  display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 20px; pointer-events: none;
  background: rgba(34, 27, 19, 0.95); box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 190, 90, .2);
  font-size: 14px; color: var(--label); transition: opacity .2s;
}
.ptr .spinner { border-color: rgba(255, 190, 90, .3); border-top-color: var(--blue); animation: none; }
.ptr.busy .spinner { animation: spin .8s linear infinite; }

/* Practice: two tiles + a slim Saved row; Anki has its own page */
.pr-tiles { margin-bottom: 12px; }
.pr-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; margin-bottom: 30px; border-radius: 16px; text-align: left;
  background: var(--cell); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.12); font-size: 17px;
}
.pr-row b { flex: 1; }
.pr-row i { font-style: normal; color: var(--secondary); }
.pr-row em { font-style: normal; color: var(--blue); font-size: 22px; line-height: 1; }
#ak-review { margin: 4px 0 26px; }
#ak-review.done { background: var(--cell); color: var(--secondary); box-shadow: none; }
#screen-anki .dk-import { display: block; margin: 18px auto 0; color: var(--blue); font-weight: 600; }

/* Practice: one column of big, identical buttons (each opens its own page) */
.menu { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.menu-card {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 92px; padding: 18px 20px; border-radius: 22px; text-align: left;
  background: var(--cell); box-shadow: inset 0 0 0 1px rgba(255, 190, 90, 0.14); transition: transform .15s;
}
.menu-card:active { transform: scale(.98); }
.mc-icon {
  flex: none; width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  font-size: 28px; background: rgba(255, 176, 32, 0.12);
}
.mc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mc-text b { font-size: 20px; letter-spacing: -0.2px; }
.mc-text i { font-style: normal; font-size: 15px; color: var(--secondary); }
.mc-count {
  flex: none; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 17px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent);
}
.menu-card em { flex: none; font-style: normal; font-size: 26px; line-height: 1; color: var(--blue); }
.menu-card.lit { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); box-shadow: 0 10px 30px rgba(255, 140, 40, 0.3); }
.menu-card.lit .mc-icon { background: rgba(0, 0, 0, 0.12); }
.menu-card.lit .mc-text i, .menu-card.lit em { color: var(--on-accent); opacity: .8; }
.menu-card.lit .mc-count { background: rgba(0, 0, 0, 0.18); color: var(--on-accent); }
@media (min-width: 900px) { .menu { display: grid; grid-template-columns: 1fr 1fr; } }

/* "Tap to play" over the video when iPhone won't start it on its own */
.yt-box { position: relative; }
.tap-play {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: 16px; background: rgba(0, 0, 0, 0.62); color: #fff; text-align: center;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.tap-play[hidden] { display: none; }
.tap-play i {
  width: 72px; height: 72px; border-radius: 36px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent);
  box-shadow: 0 8px 30px rgba(255, 140, 40, 0.45); animation: tapPulse 1.4s ease-in-out infinite;
}
.tap-play i svg { width: 30px; height: 30px; fill: currentColor; margin-left: 4px; }
.tap-play b { font-size: 18px; }
.tap-play span { font-size: 15px; opacity: .85; max-width: 90%; }
@keyframes tapPulse { 50% { transform: scale(1.08); } }

.ls-hint { margin: 10px 16px 0; font-size: 13px; color: var(--secondary); }

/* Replay a sentence: a clear orange ▶ button beside each sentence */
.sent-side { gap: 22px; }   /* ▶ and ☆ well apart so one isn't tapped for the other */
.replay {
  width: 42px; height: 42px; border-radius: 21px; color: var(--on-accent);
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); box-shadow: 0 4px 14px rgba(255, 140, 40, 0.3);
}
.replay svg { width: 26px; height: 26px; margin-left: 2px; }
.replay:active { transform: scale(.92); }

/* Free plan: the locked rest of a lesson, and the Pro prompt */
.lock-card {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); margin: 12px 16px 24px; padding: 16px;
  border-radius: 18px; text-align: left; color: var(--label);
  background: linear-gradient(135deg, rgba(255, 176, 32, 0.16), rgba(255, 122, 61, 0.12)); box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.4);
}
.lock-card:active { transform: scale(.98); }
.lock-ic { font-size: 26px; }
.lock-t { flex: 1; min-width: 0; }
.lock-t b { display: block; font-size: 17px; }
.lock-t i { display: block; font-style: normal; font-size: 14px; color: var(--secondary); margin-top: 2px; }
.lock-card em { flex: none; font-style: normal; font-weight: 700; padding: 8px 14px; border-radius: 14px; color: var(--on-accent); background: linear-gradient(135deg, var(--blue), var(--accent-2)); }
.pro-hero { text-align: center; margin: 4px 0 14px; }
.pro-hero span { font-size: 40px; display: block; }
.pro-hero b { display: block; font-size: 22px; margin-top: 6px; }
.pro-hero i { display: block; font-style: normal; color: var(--secondary); margin-top: 4px; }
.pro-list { margin: 0 6px 18px; padding-left: 20px; font-size: 16px; line-height: 1.5; }
.pro-list li { margin: 6px 0; }
.poster-add.pro { width: auto; padding: 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .5px; background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }

/* The saved word, when a word card opens its lesson */
.sent .tok.hl b { background: rgba(255, 176, 32, 0.28); border-radius: 6px; padding: 0 3px; margin: 0 -3px; text-decoration: underline solid var(--blue); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* Words the checks weren't sure of: wavy red-orange (dotted orange = "tap me") */
.tok.unsure b, .tok.unsure[data-s="word"] b { text-decoration: underline wavy #ff6a55; text-decoration-thickness: 1.5px; text-underline-offset: 6px; }

/* ───────── Help: ? buttons, tip cards, help page, welcome tour ───────── */
.help-q {
  width: 32px; height: 32px; border-radius: 16px; font-size: 18px; font-weight: 800; line-height: 1;
  color: var(--blue); background: rgba(255, 176, 32, 0.14); box-shadow: inset 0 0 0 1.5px rgba(255, 176, 32, 0.5);
  display: inline-flex; align-items: center; justify-content: center;
}
.navbar .help-q { bottom: 6px; }
#screen-study .navbar .help-q { right: 58px; }   /* next to Refresh */
.bar-right { width: 60px; display: flex; justify-content: flex-end; }
.ac-links { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin: 6px 4px 18px; }
#ac-help { width: 100%; }

.tip-card {
  position: relative; margin: 6px 0 16px; padding: 14px 44px 14px 16px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 176, 32, 0.16), rgba(255, 122, 61, 0.10));
  box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.45); animation: phIn .3s ease-out;
}
#screen-lesson .tip-card { margin: 10px 12px 6px; }
.tip-card b { font-size: 17px; }
.tip-card p { margin: 6px 0 10px; font-size: 15px; line-height: 1.45; color: var(--label); }
.tip-x { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 15px; color: var(--secondary); font-size: 16px; }
.tip-btns { display: flex; gap: 10px; }
.tip-btns button { padding: 8px 16px; border-radius: 14px; font-weight: 700; font-size: 15px; }
.tip-ok { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }
.tip-more { color: var(--blue); background: rgba(255, 176, 32, 0.12); }

.help-index { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.help-index button { padding: 9px 13px; border-radius: 16px; background: var(--cell); color: var(--label); font-size: 15px; font-weight: 600; }
.help-sec { background: var(--cell); border-radius: 20px; padding: 16px 18px 6px; margin-bottom: 16px; }
.help-sec h2 { font-size: 21px; margin: 0 0 8px; }
.help-sec ol, .help-sec ul { padding-left: 22px; margin: 6px 0 12px; }
.help-sec li { font-size: 16px; line-height: 1.5; margin: 8px 0; }
.help-sec ul ul, .help-sec ol ul { margin: 4px 0; }
.help-sec p { font-size: 16px; line-height: 1.5; color: var(--secondary); margin: 0 0 6px; }

/* Little pictures of buttons */
.gp { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.gp-play, .gp-bigplay { width: 26px; height: 26px; border-radius: 13px; color: var(--on-accent); background: linear-gradient(135deg, var(--blue), var(--accent-2)); }
.gp-bigplay { border-radius: 8px; }
.gp-play svg, .gp-bigplay svg { width: 14px; height: 14px; fill: currentColor; margin-left: 2px; }
.gp-star { font-size: 20px; color: var(--secondary); line-height: 1; }
.gp-star.on { color: #ffcc00; }
.gp-x { width: 24px; height: 24px; border-radius: 12px; font-size: 12px; font-weight: 800; color: var(--blue); box-shadow: inset 0 0 0 1.5px rgba(255, 176, 32, 0.6); }
.gp-word { text-decoration: underline dotted rgba(255, 176, 32, 0.85); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.gp-word.unsure { text-decoration: underline wavy #ff6a55; text-decoration-thickness: 1.5px; }
.gp-chip { display: inline-block; padding: 2px 10px; border-radius: 12px; background: var(--fill); font-weight: 700; font-size: 14px; }
.gp-chip.on { background: var(--blue); color: var(--on-accent); }

/* Welcome tour */
.tour { position: fixed; inset: 0; z-index: 1000; }
.tour.dim { background: rgba(0, 0, 0, 0.72); }
.tour-hole {
  position: fixed; border-radius: 16px; pointer-events: none; display: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 3px var(--blue), 0 0 24px 6px rgba(255, 176, 32, 0.55);
  transition: all .3s ease;
}
.tour-card {
  position: fixed; left: 16px; right: 16px; top: 50%; transform: translateY(-50%); max-width: 460px; margin: 0 auto;
  background: #1b1510; border-radius: 22px; padding: 20px 20px 16px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 176, 32, 0.35);
  animation: phIn .25s ease-out;
}
.tour-card.top { top: calc(var(--safe-top) + 70px); transform: none; }
.tour-card.bottom { top: auto; bottom: calc(var(--safe-bottom) + 24px); transform: none; }
.tour-count { font-size: 13px; color: var(--blue); font-weight: 700; min-height: 16px; }
.tour-title { display: block; font-size: 22px; margin: 4px 0 8px; }
.tour-text { font-size: 17px; line-height: 1.5; margin: 0 0 16px; color: var(--label); }
.tour-text .gp-play { width: 24px; height: 24px; }
.tour-btns { display: flex; gap: 10px; }
.tour-btns button { flex: 1; padding: 14px; border-radius: 16px; font-size: 17px; font-weight: 700; }
.tour-next { background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent); }
.tour-skip { background: var(--fill); color: var(--label); }
.tour-x { position: absolute; top: 14px; right: 16px; color: var(--secondary); font-size: 14px; font-weight: 600; }
.tour-demo { margin: 4px 0 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); padding: 8px 0 4px; position: relative; }
.tour-try { display: block; margin: 0 16px 2px; font-size: 13px; font-weight: 700; color: var(--blue); }
.tour-demo .tok b { text-decoration: underline dotted rgba(255, 176, 32, 0.85); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.tour-demo .tok { cursor: pointer; }
.tour-demo .tok.hl b { color: var(--blue); }
.tour-demo .sent.now .tok b { color: var(--blue); }
.tour-demo .replay, .tour-demo .star { cursor: pointer; }
.tour-demo .star.on { color: #ffcc00; }
.tour-demo .star.on svg { fill: #ffcc00; }
.tour-demo .sent { margin: 0; }
.tour-demo .replay, .tour-demo .star { display: flex; }
.tour-demo.focus-word .tok b { color: var(--blue); animation: tapPulse 1.4s ease-in-out infinite; display: inline-block; }
.tour-demo.focus-star .star:not(.on) { animation: tapPulse 1.4s ease-in-out infinite; }
.tour-demo:not(.focus-word):not(.focus-star) .replay { animation: tapPulse 1.4s ease-in-out infinite; }

#ac-plan-note { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; margin-top: 2px; }

/* Supporting creators: Subscribe / Watch on YouTube */
.creator-bar { display: flex; align-items: center; gap: 8px; margin: 12px 16px 0; font-size: 14px; color: var(--secondary); flex-wrap: wrap; }
.creator-bar > span { flex: 1; min-width: 0; }
.creator-bar b { color: var(--label); }
.yt-sub, .yt-watch { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 14px; }
.yt-sub { background: #ff3b30; color: #fff; }
.yt-watch { background: var(--fill); color: var(--label); }
.yt-sub.big, .yt-watch.big { font-size: 15px; padding: 11px 16px; border-radius: 16px; flex: 1; }
.creator-btns { display: flex; gap: 10px; margin: 2px 0 16px; }
.creator-end { margin: 18px 16px 28px; padding: 16px; border-radius: 18px; background: var(--cell); display: flex; flex-direction: column; gap: 6px; }
.creator-end b { font-size: 17px; }
.creator-end span { font-size: 15px; color: var(--secondary); line-height: 1.4; }
.creator-end .creator-btns { margin: 8px 0 0; }

.ls-hint { line-height: 1.6; }
.hint-ic { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; font-size: 14px; color: #ffcc00; vertical-align: -3px; }
.hint-ic.play { font-size: 9px; color: var(--on-accent); background: linear-gradient(135deg, var(--blue), var(--accent-2)); padding-left: 2px; }

/* Help: ↑ All topics, and a glow on the topic a ? opened */
.help-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.help-top { flex: none; font-size: 13px; font-weight: 700; color: var(--blue); }
.help-sec.glow { animation: helpGlow 2.2s ease-out; }
@keyframes helpGlow { 0%, 40% { box-shadow: 0 0 0 2px var(--blue), 0 0 24px rgba(255, 176, 32, 0.45); } 100% { box-shadow: none; } }

/* Say it like a native: quick answer while the full check runs */
.ph-checking { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 176, 32, 0.10); box-shadow: inset 0 0 0 1px rgba(255, 176, 32, 0.35); }
.ph-checking .spinner { border-color: rgba(255, 190, 90, .3); border-top-color: var(--blue); margin-top: 3px; }
.ph-checking b { display: block; font-size: 15px; }
.ph-checking i { display: block; font-style: normal; font-size: 13px; color: var(--secondary); margin-top: 2px; }
.ph-v.quick .ph-ru { font-size: 26px; font-weight: 500; margin: 2px 0 4px; }
.ph-checked { font-size: 13px; font-weight: 700; color: var(--green); margin: 2px 4px 10px; }

/* Tab dock stands out from what scrolls behind it: solid, outlined, with the page fading to dark underneath */
.tabbar {
  background: #1d1610;
  -webkit-backdrop-filter: blur(24px) saturate(140%); backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.8), 0 0 0 1.5px rgba(255, 176, 32, 0.38);
}
.tab { color: rgba(255, 244, 230, 0.92); }
body:not(.signed-out):not(.in-page)::after {
  content: ''; position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--safe-bottom) + var(--tabbar-h) + 48px);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.88) 45%, #000);
  pointer-events: none; z-index: 19;   /* under the dock (20), over the page */
}

/* Bible section: one verse at a time */
#bv-review { margin: 4px 0 20px; }
#bv-review.done { background: var(--cell); color: var(--secondary); box-shadow: none; }
.bv-item .ph-q { justify-content: space-between; align-items: center; }
.bv-tag { font-size: 12px; font-weight: 700; color: var(--accent-2); border: 1px solid var(--accent-2); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.bv-prog { margin: 14px 4px 4px; }
.bv-bar { height: 8px; border-radius: 4px; background: var(--cell); overflow: hidden; }
.bv-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--accent-2)); border-radius: 4px; transition: width .4s; }
.bv-prog p { font-size: 13px; color: var(--secondary); margin: 8px 0 0; line-height: 1.4; }
.bv-next { display: block; margin: 10px 4px 2px; }
#bv-done { margin-top: 0; }
.bv-old { background: var(--card, var(--cell)); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.bv-old-t { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.bv-old-ru { font-size: 17px; line-height: 1.45; }
.bv-old .en { font-size: 14px; color: var(--secondary); margin: 6px 0 0; }
.bv-copy { font-size: 11px; color: var(--secondary); margin: 22px 4px 8px; line-height: 1.4; }
#bv-words { margin-top: 0; }
.bv-words { display: flex; flex-direction: column; gap: 8px; }
.bv-word { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 10px; text-align: left; background: var(--cell); border: 0; border-radius: 12px; padding: 12px 14px; color: var(--label); font: inherit; }
.bv-word b { font-size: 18px; }
.bv-word i { font-style: normal; font-size: 14px; color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-none { font-size: 14px; color: var(--secondary); margin: 0 4px; line-height: 1.45; }
.bv-sec { margin-top: 18px; }
.bv-fold .ph-title small { display: block; font-size: 13px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; font-weight: 400; }
.bv-fold .ph-title { min-width: 0; flex: 1; }
.bv-bar-mini { height: 4px; margin: 2px 4px 10px; }
.bv-old { padding: 2px 10px; }
.bv-old .ph-fold { margin: 0; padding: 6px 0; }
.bv-old-ru { padding-bottom: 2px; }
.bv-old .ph-tools { padding-bottom: 10px; }
.bv-show { display: flex; gap: 8px; margin: 0 0 10px; }
.rv-who { font-size: 14px; font-weight: 600; color: var(--accent-2, #ffb020); margin: 6px 0 2px; }
.rv-front + .rv-who { text-align: center; }
.rv-ru { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--accent-2, #ffb020); }
.saved-elsewhere .wc-unsave { display: block; margin: 8px auto 0; font-size: 15px; }
.rv-peeks { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.il.gl-off .tok > i { display: none; }
.pp-words { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.pp-w { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--separator, rgba(255,255,255,.15)); background: var(--cell); color: var(--label); font: inherit; font-size: 19px; }
.pp-w.on { border-color: transparent; background: var(--blue); color: var(--on-accent); font-weight: 600; }
.pp-text { font-size: 30px; }
.bv-paths { display: flex; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.bv-ru-ref { display: block; font-size: 12px; font-weight: 400; color: var(--secondary); margin-top: 2px; }
.bv-easy { margin: 14px 0 4px; padding: 12px; border-radius: 12px; background: rgba(255, 176, 32, .08); }
.bv-tag-line { font-size: 13px; font-weight: 600; color: var(--accent-2, #ffb020); margin: 0 0 6px; }
.bv-easy .k { font-size: 13px; font-weight: 600; color: var(--accent-2, #ffb020); margin-bottom: 6px; }
@keyframes bv-flash { 0%, 60% { background: rgba(255, 176, 32, 0.22); } 100% { background: transparent; } }
.en.flash { animation: bv-flash 1.6s ease-out; border-radius: 8px; }
.wc-word[data-lesson] .syl { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.syl-hint { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 13px; color: var(--secondary); margin: 2px 0 6px; }
.chip.stop { background: var(--accent-2); color: var(--on-accent); }
.ac-share { margin-top: 14px; }
.ac-share .cell { display: block; }
.ac-share .k { margin-bottom: 4px; }
#ac-link { color: var(--secondary); }
.ac-share-btns { display: flex; gap: 10px; margin-top: 10px; }
.poster-add.soon { width: auto; padding: 0 10px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.6); color: var(--secondary); }

/* Sign-in on a computer: everything larger (phones keep the normal size) */
@media (min-width: 900px) and (hover: hover) {
  .signin.content { zoom: 1.4; padding-top: 40px; }
}

/* Remembered / pasted emails: no browser autofill highlight (yellow or blue box) */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--cell) inset !important;
  box-shadow: 0 0 0 1000px var(--cell) inset !important;
  -webkit-text-fill-color: var(--label) !important;
  caret-color: var(--label);
  transition: background-color 99999s ease-out 0s;
}
.en.big.lit { font-style: normal; line-height: 1.5; }

/* Word cards: the word inside its sentence; the same word in other sentences */
.rv-front .il.ctx { justify-content: center; }
.rv-hint .hl-word { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.wc-uses { margin: 16px 0 4px; text-align: left; }
.wc-uses .k { font-size: 13px; color: var(--secondary); margin-bottom: 6px; }
.wc-use { background: var(--cell); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; }
.wc-use .il { font-size: 17px; }
.wc-nudge { font-size: 13px; color: var(--secondary); text-align: center; margin: 6px 8px 0; }
.en.lit { font-style: normal; }
.rv-back .en.lit, .wc-sentence .en.lit { font-size: 16px; color: var(--secondary); }

/* Build it */
.bd-cue { font-size: 19px; line-height: 1.45; text-align: center; margin: 4px 6px 10px; color: var(--label); }
.bd-ctx { font-size: 15px; color: var(--secondary); text-align: center; margin: 0 6px 12px; line-height: 1.5; }
.bd-gap { color: var(--accent-2); font-weight: 700; }
.bd-ans { min-height: 58px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; padding: 10px; margin: 6px 0 14px; border-radius: 14px; border: 1.5px dashed rgba(255, 176, 32, .45); }
.bd-empty { color: var(--tertiary, var(--secondary)); font-size: 14px; }
.bd-tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.bd-tile { font: inherit; font-size: 20px; padding: 8px 14px; border-radius: 12px; border: 1px solid rgba(255, 176, 32, .35); background: var(--cell); color: var(--label); }
.bd-tile.used { opacity: .25; }
.bd-tile.in { background: rgba(255, 176, 32, .14); }
.bd-tile.ok { border-color: var(--green); background: rgba(52, 199, 89, .18); }
.bd-tile.bad { border-color: var(--red, #ff453a); background: rgba(255, 69, 58, .18); }
.bd-msg { text-align: center; font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.bd-msg.ok { color: var(--green); } .bd-msg.bad { color: var(--red, #ff453a); }
.bd-right { text-align: center; font-size: 20px; margin: 0 0 14px; }
.bd-skip { display: block; margin: 10px auto 0; color: var(--secondary); }

/* Songs */
.song-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.song-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center;
  background: radial-gradient(circle at 30% 20%, rgba(255, 176, 32, .45), transparent 60%), linear-gradient(135deg, #3a1f0a, #120a05); color: var(--label); }
.song-card i { font-style: normal; font-size: 34px; }
.song-card b { font-size: 14px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.song-card small { font-size: 13px; color: var(--secondary); }
.song-card.big i { font-size: 56px; } .song-card.big b { font-size: 20px; }
.song-cover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; border-radius: inherit; overflow: hidden; }
.song-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.song-cover.story { aspect-ratio: 16 / 10; }
.song-cover.story img { object-fit: contain; }
#ls-transcript .tok.sing b { color: var(--accent-2); text-shadow: 0 0 14px rgba(255, 140, 40, .55); }
.as-form > .shelf-note:first-child { margin-top: 20px; }
.as-form .as-label { display: block; font-size: 14px; color: var(--secondary); margin: 14px 4px 0; }
.as-form .as-label i { font-style: normal; opacity: .7; }
.as-form input[type=text], .as-form textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 17px; color: var(--label); background: var(--cell); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; box-sizing: border-box; }
.as-form .as-pick { display: flex; align-items: center; gap: 16px; margin-top: 8px; background: var(--cell); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px; }
.as-form .as-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.as-form .as-pick-btn { flex: none; font-size: 17px; font-weight: 600; color: #1a1205; background: var(--blue); border-radius: 10px; padding: 12px 18px; }
.as-form .as-pick-name { flex: 1; min-width: 0; font-size: 16px; color: var(--secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-form .as-pick-name.on { color: var(--label); }
.as-status { color: var(--accent-2); font-size: 15px; min-height: 20px; margin: 14px 4px 8px; }
#screen-addsong .page-title { font-size: 22px; font-weight: 700; bottom: 9px; }

/* One-time offer: due count on the app icon */
.badge-ask { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 14px; background: var(--cell); border: 1px solid rgba(255,176,32,.25); border-radius: 16px; }
.badge-ask[hidden] { display: none; }
.badge-ask-dot { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #ff3b30; color: #fff; font-weight: 700; font-size: 17px; display: grid; place-items: center; }
.badge-ask-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.badge-ask-t b { font-size: 16px; }
.badge-ask-t i { font-style: normal; font-size: 14px; color: var(--secondary); }
.badge-ask .chip { flex: none; }
.badge-ask-x { flex: none; color: var(--secondary); font-size: 16px; padding: 6px; }
.ac-time { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 16px; color: var(--secondary); }
.ac-time[hidden] { display: none; }
.ac-time input { font: inherit; font-size: 17px; color: var(--label); background: var(--bg, #000); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 10px; color-scheme: dark; }

/* Pictures: word pictures above words, scene pictures above sentences (tap: larger) */
.tok.has-pic { vertical-align: bottom; }
.tok-pic { display: block; width: 56px; height: 56px; object-fit: cover; border-radius: 12px; margin: 0 0 4px; background: rgba(255,255,255,.04); }
.scene-pic, .wc-pic { display: block; padding: 0; border: 0; background: rgba(255,255,255,.04); overflow: hidden; border-radius: 16px; transition: width .2s, height .2s; }
.scene-pic { width: 100%; max-width: 300px; aspect-ratio: 1; margin: 4px auto 14px; }
.scene-pic.big { max-width: 520px; }
.scene-pic img, .wc-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wc-pic { width: 150px; height: 150px; margin: 0 auto 12px; }
.wc-pic.big { width: min(100%, 420px); height: auto; aspect-ratio: 1; }
.il:has(.tok-pic) { align-items: flex-end; }

/* Build it: tap the Russian words in order (review cards and the lesson's 🧩 Build) */
.bd-count { font-size: 14px; color: var(--secondary); margin: 0 0 6px; }
.bd-cue { font-size: 19px; line-height: 1.4; color: var(--label); margin: 8px 0 4px; }
.bd-en { font-size: 15px; color: var(--secondary); font-style: italic; margin: 2px 0 8px; }
.bd-ctx { font-size: 16px; color: var(--secondary); margin: 6px 0; }
.bd-gap { color: var(--blue); }
.bd-tools { display: flex; gap: 8px; margin: 8px 0 4px; }
.bd-ans { min-height: 58px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; margin: 12px 0; border: 1.5px dashed rgba(255,176,32,.45); border-radius: 14px; }
.bd-empty { color: var(--secondary); font-size: 15px; }
.bd-tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 14px; }
.bd-tile { font: inherit; font-size: 20px; color: var(--label); background: var(--cell); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 13px; }
.bd-tile.used { opacity: .25; }
.bd-tile.in { background: rgba(255,176,32,.14); border-color: rgba(255,176,32,.5); }
.bd-tile.ok { background: rgba(52,199,89,.18); border-color: #34c759; }
.bd-tile.bad { background: rgba(255,69,58,.18); border-color: #ff453a; }
.bd-msg { font-size: 18px; font-weight: 700; margin: 4px 0 6px; }
.bd-msg.ok { color: #34c759; }
.mem-stay { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-left: 6px; vertical-align: middle; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: var(--label, #fff); font: inherit; font-size: 15px; font-weight: 600; }
.bd-msg.bad { color: #ff9f0a; }
.bd-right { font-size: 20px; margin-bottom: 12px; }
.bd-skip { display: block; margin: 10px auto 0; }
.bd-sheet .secondary-button { margin-bottom: 10px; }

/* 🧠 Recall / Memorize */
.mem-steps { display: flex; gap: 6px; margin: 0 0 12px; }
.mem-steps span { flex: 1; text-align: center; font-size: 12px; padding: 6px 0; border-radius: 8px; background: transparent; border: 1px solid rgba(255,255,255,.08); color: var(--secondary); }
.mem-steps span.now { background: var(--blue); color: #1a1205; font-weight: 700; }
.mem-steps span.done { color: var(--blue); }
.mem-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.mem-opt { font: inherit; font-size: 17px; color: var(--label); background: var(--cell); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 14px 10px; }
.mem-opt.ok { background: rgba(52,199,89,.2); border-color: #34c759; }
.mem-opt.bad { background: rgba(255,69,58,.2); border-color: #ff453a; }
.mem-text { font-size: 22px; line-height: 1.45; margin: 10px 0; }
.mem-round { font-weight: 700; color: var(--blue); margin: 0 0 4px; }
.mem-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; margin: 12px 0 16px; }
.mem-w, .mem-gap { display: inline-flex; flex-direction: column; align-items: flex-start; font-size: 22px; line-height: 1.2; }
.mem-w i, .mem-gap i { font-style: normal; font-size: 13px; color: var(--secondary); }
.mem-w.was b { color: var(--blue); }
.mem-w.peek b { color: #ff9f0a; text-decoration: underline dotted; }
.mem-w.ok b { color: #34c759; }
.mem-w.bad b { color: #ff453a; }
.mem-gap { font: inherit; font-size: 22px; padding: 0; border: 0; background: none; color: var(--label); }
.mem-gap b { letter-spacing: 2px; color: var(--secondary); border-bottom: 2px solid rgba(255,176,32,.6); }
.mem-grade { display: flex; gap: 10px; margin: 8px 0; }
.mem-grade > * { flex: 1; }
.mem-done { text-align: center; padding: 10px 0; }
.mem-done b { font-size: 22px; }
.mem-done p { color: var(--secondary); }
.mem-sheet .secondary-button, .mem-sheet .primary-button { margin-top: 10px; }
.listening { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.bv-mem { margin: 14px 0 6px; }
.mem-heard { font-size: 14px; color: var(--secondary); margin: 4px 0 8px; }
.mem-from { font-size: 16px; color: var(--secondary); margin: 6px 0; }
.mem-from b { color: var(--label); font-weight: 600; }
.mem-cue { font-size: 21px; font-weight: 700; color: var(--blue); margin: 12px 0 4px; }
.mem-steps span { font-size: 11px; }
.mem-note { font-size: 15px; color: var(--blue); margin: 2px 0 10px; }

/* "Show English": the real English only when asked (owner) */
.en-peek { display: inline-block; margin: 6px 0 2px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--separator, rgba(255,255,255,.15)); background: none; color: var(--secondary); font-size: 13px; }
.mem-own { width: 100%; box-sizing: border-box; margin: 8px 0 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--separator, rgba(255,255,255,.15)); background: var(--fill, rgba(255,255,255,.06)); color: inherit; font: inherit; font-size: 20px; resize: none; }
.mem-sheet .il .tok.ok b { color: #34c759; }
.mem-sheet .il .tok.bad b { color: #ff453a; }
/* Deck sentences fold (owner): › + label + Russian; tap to open */
.dk-sent-row { display: flex; align-items: center; gap: 10px; }
.dk-sent-head { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.dk-sent-t { display: flex; flex-direction: column; min-width: 0; gap: 2px; }
.dk-sent-t b { font-size: 19px; font-weight: 500; color: var(--label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-sent:not(.open) { padding-top: 12px; padding-bottom: 12px; }
.dk-chev { width: 30px; height: 30px; }
.dk-chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.dk-sent.open .dk-chev { transform: rotate(90deg); color: var(--on-accent); background: linear-gradient(135deg, var(--blue), var(--accent-2)); }
.ph-better { display: block; width: 100%; margin-top: 10px; text-align: center; white-space: normal; }
.ph-better-ru { text-decoration: underline dotted; text-underline-offset: 4px; cursor: pointer; }
.vs-saved { margin: 12px 4px 4px; font-size: 15px; color: var(--secondary); }
/* ⬇ Saving a video: a bar above the tabs on every screen */
.vs-pill { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 10px); z-index: 25;
  overflow: hidden; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(255, 190, 90, 0.35);
  background: rgba(40, 30, 18, 0.96); color: var(--label); font: inherit; font-size: 14px; text-align: left;
  white-space: nowrap; text-overflow: ellipsis; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); }
.vs-pill b { color: var(--blue); font-weight: 600; }
.vs-pill i { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--accent-2)); }
.vs-pill.done { border-color: rgba(52, 199, 89, .5); }
body.in-page .vs-pill { bottom: calc(var(--safe-bottom) + 12px); }
.ac-vids { margin: 10px 0 8px; display: flex; flex-direction: column; gap: 8px; }
.ac-vid { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-vid span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-vid i { color: var(--secondary); font-style: normal; margin-left: 4px; }
#ac-offline small { display: block; color: var(--secondary); margin-top: 6px; }
.ch-lists { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ch-lists::-webkit-scrollbar { display: none; }
.ch-lists .chip { flex: none; white-space: nowrap; }

/* ───────── Organised like Apple's apps (owner, 2026-10-16): grouped lists, one main card ───────── */
.ios-list { background: var(--cell); border-radius: 14px; overflow: hidden; margin: 0 0 22px; }
.sheet .ios-list { background: #2c2c2e; }
.ios-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 54px; padding: 10px 14px; text-align: left;
  background: none; color: var(--label); font: inherit; -webkit-tap-highlight-color: transparent; position: relative; }
.ios-row + .ios-row::before { content: ''; position: absolute; top: 0; right: 0; left: 56px; border-top: 0.5px solid var(--separator); }
.ios-list .ios-row:not(:has(.ios-ic)) + .ios-row::before, .ios-row:not(:has(.ios-ic))::before { left: 14px; }
.ios-row:active { background: var(--cell-pressed); }
.ios-row[hidden] { display: none; }
.ios-ic { flex: none; width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: var(--ic, #333); }
.ios-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ios-t b { font-size: 17px; font-weight: 400; }
.ios-t i { font-style: normal; font-size: 13px; color: var(--secondary); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ios-t i:empty { display: none; }
.ios-n, .ios-val { color: var(--secondary); font-size: 17px; }
.ios-count { background: var(--blue); color: var(--on-accent, #1a1206); border-radius: 11px; min-width: 22px; padding: 1px 8px;
  font-size: 14px; font-weight: 600; text-align: center; }
.ios-count[hidden] { display: none; }
.ios-row em { font-style: normal; color: var(--tertiary); font-size: 22px; line-height: 1; margin-left: 2px; }
.ios-switch { flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill); position: relative; transition: background .2s; }
.ios-switch i { position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 2px 4px rgba(0,0,0,.3); }
.ios-switch.on { background: var(--blue); }
.ios-switch.on i { transform: translateX(20px); }

/* Home: the one big card */
.home-hero { display: block; width: 100%; text-align: left; border-radius: 20px; padding: 20px; margin: 4px 0 22px;
  background: linear-gradient(135deg, var(--blue), var(--accent-2)); color: var(--on-accent, #1a1206); font: inherit;
  box-shadow: 0 10px 30px rgba(255, 140, 40, .25); }
.home-hero b { display: block; font-size: 24px; letter-spacing: -.3px; }
.home-hero i { display: block; font-style: normal; font-size: 15px; opacity: .8; margin-top: 2px; }
.home-hero-btn { display: block; margin-top: 16px; padding: 13px; border-radius: 13px; text-align: center; font-weight: 600;
  background: rgba(20, 12, 4, .92); color: var(--blue); }
.home-hero.done { background: var(--cell); color: var(--label); box-shadow: none; }
.home-hero.done i { color: var(--secondary); opacity: 1; }
#screen-study .hello { margin-top: -6px; }
#screen-explore .add-row { margin-bottom: 18px; }

/* Lesson: one row of controls */
.player-controls .ls-aa { font-weight: 600; min-width: 48px; }
.player-controls .ls-practice { font-weight: 600; }
.player-controls .ls-saved { font-weight: 600; white-space: nowrap; min-width: 48px; }
.dk-review.due { background: var(--accent-2, #ffb020); color: #111; }
.player-controls .ls-saved.due { background: var(--accent-2, #ffb020); color: #111; }
.player-options[hidden] { display: none !important; }
.ls-hint { font-size: 14px; }
.sheet .creator-bar { margin: 0 0 14px; }
.ex-admin { margin-top: 22px; }
.ex-admin:not(:has(.ios-row:not([hidden]))) { display: none; }
.ios-danger { justify-content: center; }
.ios-danger .ios-t { align-items: center; }
.ios-danger b { color: var(--red); }
#screen-account .ios-val { max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-offline-sheet { font-size: 16px; line-height: 1.45; padding: 4px 4px 12px; }
.ac-offline-sheet small { display: block; color: var(--secondary); margin-top: 10px; }
#screen-lesson .player-controls { justify-content: space-between; padding-left: 20px; padding-right: 20px; }
.up-card { background: radial-gradient(circle at 30% 20%, #12404d, #0d1a20 75%); }
.up-made { text-align: center; margin: 4px 6px 18px; }
.up-made .big { font-size: 44px; display: block; margin-bottom: 8px; }
.up-made p { font-size: 16px; line-height: 1.45; color: var(--secondary); margin: 8px 0; }
.up-made p b { color: var(--label); }
#screen-anki .dk-top { display: block; width: 100%; margin: 16px 0 0; }
.ai-banner { display: block; width: 100%; text-align: left; border: 0; border-radius: 16px; padding: 14px 16px; margin: 0 0 14px; font: inherit; color: var(--label); }
.ai-banner b { display: block; font-size: 16px; }
.ai-banner i { display: block; font-style: normal; font-size: 14px; color: var(--secondary); margin-top: 3px; }
.ai-banner.low { background: #3a2a0a; border: 1px solid #ffb02055; }
.ai-banner.out { background: #3a0f0f; border: 1px solid #ff5a5a66; }
.ios-val.warn { color: #ff8a65; font-weight: 600; }
.ai-log-h { font-size: 15px; color: var(--secondary); margin: 18px 4px 6px; font-weight: 600; }
.ai-log > div { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--separator); }
.ai-log span { flex: 1; min-width: 0; }
.ai-log b { display: block; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-log i { display: block; font-style: normal; font-size: 13px; color: var(--secondary); }
.ai-log em { font-style: normal; font-size: 15px; color: var(--label); font-variant-numeric: tabular-nums; }
.ai-log .top em { color: #6fd08c; } .ai-log .out em { color: #ff8a65; }
.easy-bar { display: flex; flex-direction: column; gap: 6px; padding: 10px 16px 4px; }
.easy-bar .seg { display: flex; background: var(--fill); border-radius: 12px; padding: 3px; }
.easy-bar .seg button { flex: 1; border: 0; background: none; color: var(--secondary); font: inherit; font-size: 15px; font-weight: 600; padding: 9px 6px; border-radius: 10px; }
.easy-bar .seg button.on { background: var(--seg-thumb); color: var(--label); }
.easy-bar .easy-pct { font-size: 13px; color: var(--secondary); text-align: center; }
.main-pin { align-self: center; margin: 2px 0 0; padding: 5px 14px; border-radius: 999px; border: 1px solid var(--separator, rgba(255,255,255,.15)); background: none; color: var(--secondary); font: inherit; font-size: 13px; font-weight: 600; }
.main-pin.on { border-color: transparent; background: rgba(255, 176, 32, .16); color: var(--blue); }
.lm-top { margin-top: 6px; color: var(--secondary); }
.lm-top:empty { display: none; }
.pin-ic { display: inline-block; transition: transform .3s ease; }
.main-pin.on .pin-ic, .pin-ic.up { transform: rotate(-45deg); }   /* 📌 leans; straight up = your main lesson */
.poster-main { position: absolute; left: 6px; top: 6px; padding: 1px 7px; border-radius: 6px; background: rgba(0, 0, 0, 0.75); font-size: 11px; font-weight: 700; }
#ls-transcript.easy-only .sent.not-easy { display: none; }
#ls-transcript.watch { display: none; }
.watch-card { display: flex; flex-direction: column; gap: 8px; margin: 12px 16px; padding: 18px; border-radius: 16px; background: var(--fill); }
.watch-card b { font-size: 18px; }
.watch-card span { color: var(--secondary); font-size: 15px; line-height: 1.4; }
.watch-card .secondary-button { margin-top: 6px; }
.kn-stats { display: flex; gap: 10px; margin: 8px 0 14px; }
.kn-stats div { flex: 1; background: var(--cell); border-radius: 14px; padding: 12px 8px; text-align: center; }
.kn-stats b { display: block; font-size: 26px; color: var(--blue); }
.kn-stats i { font-style: normal; font-size: 13px; color: var(--secondary); }
.kn-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.kn-w { border: 1px solid var(--separator); background: var(--cell); color: var(--label); font: inherit; font-size: 19px; padding: 9px 14px; border-radius: 12px; }
.kn-w.on { background: #123d2e; border-color: #3fbf7f; color: #fff; }
.kn-w.on::before { content: '✓ '; color: #6fd08c; }
.kn-forget { display: block; margin: 18px auto 0; color: var(--secondary); background: none; border: 0; font: inherit; }
.page-lead { margin: -4px 0 16px; color: var(--secondary); font-size: 15px; line-height: 1.4; }

/* The 1,000-words decks: the word being learned, underlined */
/* drawn as a bottom border, not text-decoration: older iPhones (owner's daughter, 2026-10-19) don't draw that */
.dk-u { text-decoration: none; border-bottom: 3px solid var(--blue); padding-bottom: 1px; }
.ph-v .il .tok.target b, .tok.target b { color: var(--blue); text-decoration: none; -webkit-text-decoration: none; border-bottom: 3px solid var(--blue); margin-bottom: -3px; }
.dk-mean { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--label); }
.kn-sec { background: var(--cell); border-radius: 18px; padding: 14px 16px 6px; margin: 10px 0 16px; }
.kn-sec .shelf-title { margin-top: 0; }
.kn-sec .kn-stats div { background: var(--fill); }
.kn-top { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 8px; }
.kn-top b { font-size: 34px; color: var(--blue); }
.kn-top span { color: var(--secondary); font-size: 15px; }
.kn-bar { height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-bottom: 12px; }
.kn-bar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.kn-nav { display: flex; gap: 10px; margin-bottom: 10px; }
.kn-nav > * { flex: 1; margin: 0; }
.w-snd { text-align: center; margin: 2px 0 6px; font-size: 17px; }
.w-snd span { color: var(--secondary); font-size: 14px; }
.w-snd b { color: var(--blue); letter-spacing: .3px; }
.tok .snd { display: block; font-style: normal; font-size: 13px; color: var(--blue); opacity: .85; letter-spacing: .2px; }
.saved-elsewhere { background: #123d2e; color: #d8f5e4; border-radius: 14px; padding: 14px 16px; margin: 6px 0 10px; font-size: 15px; line-height: 1.4; }
.saved-elsewhere.other { background: var(--fill); color: var(--label); }
#screen-lesson [data-s="prev"] { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* Opening the app: the logo until it's back where you left off (core.js startApp). Its styles are in index.html,
   so it shows before this file has loaded. */
#ls-yt { position: relative; }
.yt-wait { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; z-index: 2; background: #000; }

/* Saving a video for offline: on its Library card (study.js vsBadge) */
.poster-vs {
  position: absolute; left: 6px; top: 6px; padding: 2px 7px 4px; border-radius: 7px; overflow: hidden;
  background: rgba(0, 0, 0, 0.78); font-size: 11px; font-weight: 700; color: var(--blue);
}
.poster-vs i { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--blue); transition: width .4s; }
.poster-vs.saved { color: var(--green); padding-bottom: 2px; }
.ac-warn { color: var(--orange); font-size: 13px; margin-bottom: 6px; }
/* Account → Saved on this phone: the "keep every Library lesson" switch */
.ac-all { width: 100%; margin: 12px 0 4px; border-radius: 12px; background: var(--cell); text-align: left; }
.ac-all .ios-t i { white-space: normal; }

/* ───────── Lesson turned sideways: the video fills the screen (owner, 2026-10-21: "if I turn it sideways,
   it makes the video smaller… just make it go full screen"). Upright again, everything is back. YouTube's own
   controls work on the video; a saved video gets ⏮ ▶ ⏭ on a tap (study.js, fades after 3 s). ───────── */
@media (orientation: landscape) and (max-height: 600px) {
  #screen-lesson.active .page-bar, #screen-lesson.active .easy-bar, #screen-lesson.active .transcript,
  #screen-lesson.active .scrub, #screen-lesson.active .player-options { display: none !important; }
  #screen-lesson.active .player {
    position: fixed; inset: 0; z-index: 900; background: #000; box-shadow: none;
    display: flex; align-items: center; justify-content: center;
    padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left);
  }
  #screen-lesson.active .player .yt-box, #screen-lesson.active .player video {
    width: min(100%, calc(100dvh * 16 / 9)); height: auto; max-height: 100dvh; margin: 0; border-radius: 0;
  }
  #screen-lesson.active .player-controls {
    position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%);
    width: auto; padding: 6px 10px; border-radius: 30px; background: rgba(0, 0, 0, .6);
    opacity: 0; pointer-events: none; transition: opacity .3s;
  }
  #screen-lesson.active .player-controls .ls-aa, #screen-lesson.active .player-controls .ls-practice, #screen-lesson.active .player-controls .ls-saved { display: none; }
  /* YouTube: its own controls; ours only for a video on the phone, after a tap */
  #screen-lesson.active .player:has(video:not([hidden])).show-ctl .player-controls { opacity: 1; pointer-events: auto; }
  body.in-page:has(#screen-lesson.active) .toast { z-index: 1100; }
}

/* Account → Admin → Test: listen with the screen off (path.js) */
.lt p, .lt ol { font-size: 15px; line-height: 1.45; color: var(--label); }
.lt ol { padding-left: 20px; }
.lt-state { font-weight: 600; color: var(--blue); margin: 14px 0 10px; }
.lt-last, .lt-small { font-size: 13px; color: var(--secondary); }
.ac-prog { font-size: 15px; line-height: 1.4; margin: 0 0 10px; color: var(--label); }
.ac-prog.done { color: #7fd38a; }
.ac-now { width: 100%; margin: 0 0 12px; }
.ac-stats { font-size: 14px; color: var(--secondary); margin: 0 0 10px; }
.ac-diag { display: block; margin: 14px 4px 0; font-size: 12px; color: var(--tertiary, var(--secondary)); opacity: .8; }
.bv-show.dk-show { margin: 12px 4px 4px; }
.ac-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.1); margin: 0 0 12px; overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb020, #ff7a45); transition: width .6s; }

/* A word's two more sentences on the deck page (study.js moreHTML) */
.dk-more { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.dk-more-h { font-size: 13px; color: var(--secondary); margin: 0 0 4px; }
.dk-more-h b { color: var(--blue); font-weight: 600; }
.dk-more-s { margin: 10px 0 14px; }
.dk-more-s .ph-tools { margin-top: 8px; }
/* A word's extra sentences as rows of their own, right under it (study.js withMore / deckOrder) */
.ph-v.dk-extra { margin-left: 18px; border-left: 2px solid rgba(255, 176, 32, .35); }
