/* Flash study app — extends site.css */
:root {
  font-size: 16px;
}

html, body {
  height: 100%;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ───────────────────────── Login ───────────────────────── */
.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px 26px;
  text-align: center;
}
.login-card h1 { margin: 0 0 4px; font-size: 1.7rem; }
.login-card .sub { margin: 0 0 22px; color: var(--muted); }
.login-card input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  outline: none;
}
.login-card input:focus { border-color: var(--blue); }
.login-card .hint { color: var(--muted); font-size: 0.8rem; margin: 14px 0 0; }

/* ───────────────────────── Auth (PC) ───────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 48px;
  max-width: 960px;
  width: 100%;
  align-items: center;
}
.auth-eyebrow {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
}
.auth-hero h1 { margin: 0 0 14px; font-size: 2.35rem; line-height: 1.2; }
.auth-lead {
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0 0 22px;
  max-width: 520px;
}
.auth-lead strong { color: var(--blue); font-weight: 700; }
.auth-highlights {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.auth-highlight {
  flex: 1;
  min-width: 120px;
  background: linear-gradient(145deg, #f0f6ff 0%, #fff 100%);
  border: 1px solid #c8daf5;
  border-radius: 14px;
  padding: 14px 12px;
  text-align: center;
}
.auth-highlight-num {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blue);
  line-height: 1.2;
}
.auth-highlight-label {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}
.auth-features {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--ink);
  line-height: 1.7;
  font-size: 0.95rem;
}
.home-novel-entry {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #c8daf5;
  background: linear-gradient(145deg, #fff 0%, #f0f6ff 100%);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.home-novel-entry:hover {
  border-color: var(--blue);
  box-shadow: 0 4px 16px rgba(31, 111, 235, 0.12);
}
.home-novel-icon { font-size: 1.75rem; line-height: 1; }
.home-novel-text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.home-novel-text strong { font-size: 1.05rem; color: var(--ink); }
.home-novel-text small { color: var(--muted); font-size: 0.82rem; }
.home-novel-arrow { font-size: 1.4rem; color: var(--blue); font-weight: 700; }
.auth-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px 26px;
}
.auth-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.auth-tab {
  flex: 1;
  border: none;
  background: #eef1f6;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}
.auth-tab.active { background: var(--blue); color: #fff; }
.auth-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 12px 0 6px;
}
.auth-form input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  outline: none;
  margin-bottom: 4px;
}
.auth-form input:focus { border-color: var(--blue); }
.auth-form .auth-error {
  color: var(--red);
  font-size: 0.85rem;
  margin: 8px 0 0;
  min-height: 0;
}
.auth-form .auth-error:not(.hidden) {
  margin-bottom: 4px;
}
.auth-form button[type="submit"] {
  width: 100%;
  margin-top: 18px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.auth-notice { text-align: center; padding: 6px 2px 2px; }
.auth-notice-icon { font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.auth-notice h2 { font-size: 1.15rem; margin: 0 0 10px; }
.auth-notice-msg {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin: 0 0 18px;
  word-break: break-word;
}
.auth-otp-form {
  text-align: left;
  margin: 0 0 14px;
}
.auth-otp-form label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.auth-otp-form input {
  width: 100%;
  box-sizing: border-box;
  font-size: 1.5rem;
  letter-spacing: 0.35em;
  text-align: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.auth-otp-form input:focus { border-color: var(--blue); }
.auth-otp-form button[type="submit"] { margin-top: 12px; width: 100%; }
.auth-notice .auth-error { text-align: left; }
.auth-notice button[type="button"].btn { width: 100%; margin-top: 8px; }
.auth-notice .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-link-plain {
  display: inline-block;
  margin-top: 14px;
  background: none;
  border: none;
  color: var(--blue);
  font-weight: 600;
  cursor: pointer;
}
.auth-form button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}
.auth-guest-hint {
  margin: 0 0 10px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.45;
}
.auth-guest-btn {
  width: 100%;
  margin: 0 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--blue);
  font-weight: 700;
}
.auth-guest-btn:hover {
  background: var(--blue-soft);
  border-color: #c9d8f0;
}
.app > .guest-cta {
  flex: 0 0 auto;
}

.sub-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, box-shadow 0.15s;
}
.sub-badge:hover { box-shadow: 0 2px 8px rgba(16, 24, 40, 0.12); }
.sub-badge:active { transform: scale(0.96); }
.sub-badge.sub-free { background: #eef1f6; color: var(--muted); }
.sub-badge.sub-pro { background: #dafbe1; color: var(--green); }
.btn-subscribe {
  border: none;
  background: linear-gradient(135deg, #1677ff, #1f6feb);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.btn-subscribe:hover { filter: brightness(1.05); }
.btn-subscribe.hidden { display: none !important; }

.search-hint {
  margin: 6px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}
@media (max-width: 640px) {
  .search-hint {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.membership-status { margin: 0 0 14px; }
.mem-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.mem-card-active {
  background: linear-gradient(145deg, #ecfdf3 0%, #f0fdf4 100%);
  border-color: #86efac;
}
.mem-card-expired {
  background: #fff7ed;
  border-color: #fcd34d;
}
.mem-card-free {
  background: #f8fafc;
}
.mem-card-icon {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1rem;
}
.mem-card-active .mem-card-icon { background: var(--green); color: #fff; }
.mem-card-expired .mem-card-icon { background: #f59e0b; color: #fff; }
.mem-card-free .mem-card-icon { background: #eef1f6; color: var(--muted); }
.mem-card-title {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.mem-card-meta {
  margin: 0 0 2px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
.mem-card-meta strong { color: var(--ink); }
.membership-benefits {
  margin: 0 0 16px;
  padding-left: 1.2rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.55;
}
.membership-plans-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
}
.membership-close-btn {
  width: 100%;
  margin-top: 8px;
}
.plan-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.plan-card {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  text-align: left;
}
.plan-card.selected { border-color: var(--blue); background: #f0f6ff; }
.plan-card h4 { margin: 0 0 4px; }
.plan-card .price { font-size: 1.4rem; font-weight: 700; color: var(--blue); }
.pay-qr-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  padding: 12px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.pay-qr-img {
  display: block;
  border-radius: 8px;
}
.pay-wait-hint {
  text-align: center;
  font-size: 0.88rem;
  color: var(--blue);
  margin: 0 0 10px;
}
.pay-methods { display: flex; gap: 12px; margin-bottom: 12px; }
.pay-btn {
  flex: 1;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  color: #fff;
}
.pay-alipay { background: #1677ff; }
.pay-wechat { background: #07c160; }
.pay-panel { margin-top: 12px; }
.pay-summary { font-weight: 600; margin: 0 0 8px; }
.pay-qr-hint {
  white-space: pre-line;
  background: #f6f8fa;
  padding: 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* PC app shell */
@media (min-width: 1024px) {
  .app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 24px;
  }
  .flashcard { max-width: 720px; margin: 0 auto; }
  .study-toolbar { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .card-stage { max-width: 720px; margin: 0 auto; }
  .playback-dock { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  #sentence-stage { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
}
@media (max-width: 900px) {
  .login {
    align-items: flex-start;
    justify-content: flex-start;
    padding: max(12px, env(safe-area-inset-top)) 16px 28px;
    min-height: 100%;
    min-height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .auth-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    width: 100%;
  }
  /* Login form first on phone — hero was pushing inputs below the fold */
  .auth-card {
    order: -1;
    width: 100%;
    flex-shrink: 0;
  }
  .auth-hero {
    order: 1;
    text-align: center;
  }
  .auth-hero h1 {
    font-size: 1.55rem;
    margin-bottom: 10px;
  }
  .auth-lead {
    font-size: 0.92rem;
    margin-bottom: 12px;
  }
  .auth-highlights {
    justify-content: center;
    margin-bottom: 12px;
  }
  .auth-features {
    display: none;
  }
}

/* ───────────────────────── Buttons ───────────────────────── */
.btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: #eef1f6;
  color: var(--ink);
}
.btn.big { width: 100%; padding: 15px; font-size: 1.1rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-d); }
.btn-danger { background: #fdecee; color: var(--red); }

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 40px; height: 40px;
  border-radius: 11px;
  font-size: 1.15rem;
  cursor: pointer;
  display: grid; place-items: center;
}

/* ───────────────────────── App shell ───────────────────────── */
.app {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}

.app-chrome,
.study-toolbar,
.branch-bar,
.playback-dock {
  flex-shrink: 0;
}
.app-chrome {
  overflow: hidden;
  max-height: 220px;
  transition: max-height 0.28s ease, opacity 0.22s ease;
}
.app.chrome-hidden .app-chrome {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.chrome-toggle {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #f3f5f9;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.chrome-toggle[aria-expanded="true"] {
  background: #e8f0fe;
  color: var(--blue);
  border-color: #c9d8f0;
}

/* Focus/Explore: hide top chrome + search so the word card fills the page */
.app.mode-sentences .immersive-toggle { display: none; }
.app.immersive:not(.mode-sentences) {
  max-width: none;
  width: 100%;
}
.app.immersive:not(.mode-sentences) .app-chrome,
.app.immersive:not(.mode-sentences) .study-toolbar,
.app.immersive:not(.mode-sentences) .branch-bar,
.app.immersive:not(.mode-sentences) .guest-cta {
  display: none !important;
}
.app.immersive:not(.mode-sentences) .card-stage {
  padding: 10px 12px 8px;
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
}
.app.immersive:not(.mode-sentences) .flashcard {
  flex: 1 1 auto;
  /* Leave room for immersive nav + bottom playback dock */
  min-height: calc(100dvh - 168px - env(safe-area-inset-bottom, 0px));
  max-width: none;
  border-radius: 16px;
  padding: 20px 18px 24px;
  box-shadow: none;
  border: 1px solid rgba(229, 231, 235, 0.75);
}
.app.immersive:not(.mode-sentences) .word {
  font-size: clamp(2.1rem, 7vw, 3.2rem);
  line-height: 1.15;
}
.app.immersive:not(.mode-sentences) .senses {
  font-size: 1.05rem;
}
.app.immersive:not(.mode-sentences) .immersive-bar {
  display: flex;
}
.app.immersive:not(.mode-sentences) .playback-dock {
  flex-shrink: 0;
  position: relative;
  z-index: 35;
  background: rgba(241, 245, 249, 0.96);
  border-top: 1px solid var(--line);
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}
.immersive-bar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 8px;
  padding: 4px 0;
}
.immersive-bar.hidden { display: none !important; }
.immersive-nav-btn,
.immersive-exit {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.1);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.immersive-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.immersive-nav-btn-back {
  color: #7c3aed;
  border-color: #ddd6fe;
  background: #f5f3ff;
}
.immersive-toggle[aria-pressed="true"] {
  background: #e8f0fe;
  color: var(--blue);
  border-color: #c9d8f0;
}

@media (max-width: 520px) {
  .app.immersive:not(.mode-sentences) .flashcard {
    min-height: calc(100dvh - 160px - env(safe-area-inset-bottom, 0px));
    border-radius: 12px;
    padding: 16px 14px 20px;
  }
  .app.immersive:not(.mode-sentences) .card-stage {
    padding: 6px 8px 4px;
  }
  .immersive-nav-btn,
  .immersive-exit {
    font-size: 0.74rem;
    padding: 7px 10px;
  }
}

.topbar {
  background: linear-gradient(120deg, var(--blue), #6366f1);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: nowrap;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}
.who {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 38%;
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: grid; place-items: center;
  font-weight: 700; text-transform: uppercase;
  flex: 0 0 auto;
}
.hello {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.stat-pills {
  display: flex;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 0;
}
.pill {
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  white-space: nowrap;
  flex: 0 0 auto;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.novel-link {
  text-decoration: none;
  font-size: 1.05rem;
  line-height: 1;
}

@media (max-width: 520px) {
  .topbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-top));
  }
  .who {
    order: 1;
    flex: 1 1 auto;
    max-width: none;
  }
  .top-actions {
    order: 2;
    flex: 0 0 auto;
    gap: 4px;
    max-width: 58%;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .stat-pills {
    order: 3;
    flex: 1 1 100%;
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    padding-top: 2px;
  }
  .pill {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    padding: 5px 6px;
    font-size: 0.72rem;
  }
  .hello {
    max-width: 5.5rem;
  }
  .btn-subscribe {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .sub-badge {
    font-size: 0.7rem;
    padding: 5px 8px;
  }
  .topbar .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
}

@media (max-width: 380px) {
  .hello { display: none; }
  .top-actions { max-width: 72%; }
}

.progress-rail {
  position: relative;
  height: 5px;
  background: #dfe3ea;
}
.progress-practicing {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: #f0b429;
  transition: width .35s ease;
  z-index: 0;
}
.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--green);
  transition: width .35s ease;
  z-index: 1;
}
.pill-practice { background: rgba(255, 255, 255, 0.14); }

/* ───────────────────────── Study toolbar ───────────────────────── */
.study-toolbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.sentence-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.sent-classify-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.sent-classify-btn {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  touch-action: manipulation;
}
.sent-classify-btn.active {
  background: var(--blue);
  color: #fff;
}
.sentence-exam-filters,
.sentence-theme-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.sentence-filter-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.sentence-theme-filters label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.sentence-theme-filters select {
  max-width: 9rem;
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.sentence-theme-label {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.app.mode-sentences.sent-browse-theme #deck-select,
.app.mode-sentences.sent-browse-theme .deck-bar label[for="deck-select"] {
  display: none;
}

.deck-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  background: transparent;
  border-bottom: none;
  flex-wrap: wrap;
}
.deck-bar label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  flex: 0 0 auto;
}
#deck-select {
  flex: 1;
  min-width: 140px;
  max-width: 100%;
  padding: 10px 12px;
  font-size: 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.deck-hint {
  flex: 1 1 100%;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
  margin: 0;
}
@media (max-width: 640px) {
  .deck-hint {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
}
.mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #eef1f6;
  border-radius: 999px;
  flex: 0 0 auto;
}
.mode-pill {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.mode-pill:hover:not(.active) {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.6);
}
.mode-pill.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 10px rgba(31, 111, 235, 0.22);
}
.mode-pill:active { transform: scale(0.97); }
@media (min-width: 520px) {
  .deck-hint { flex: 1 1 auto; text-align: right; }
}

.search-panel {
  position: relative;
  margin: 2px 16px 10px;
  padding: 10px 12px 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 8px rgba(16, 24, 40, 0.04);
  box-sizing: border-box;
}
.search-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}
.search-input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 14px;
  font-size: 1rem;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
}
.search-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}
.search-submit {
  flex: 0 0 auto;
  align-self: stretch;
  min-height: 42px;
  border: none;
  background: var(--blue);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0 18px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(31, 111, 235, 0.28);
  transition: background 0.15s, transform 0.12s;
}
.search-submit:hover { background: #1a5fd4; }
.search-submit:active { transform: scale(0.97); }
.search-submit:disabled { opacity: 0.55; cursor: wait; box-shadow: none; }
.flash-suggestions {
  position: absolute;
  left: 12px;
  right: 12px;
  top: calc(100% - 6px);
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  max-height: 220px;
  overflow-y: auto;
  z-index: 30;
}
.flash-suggestions li {
  padding: 12px 16px;
  font-size: 1rem;
  cursor: pointer;
}
.flash-suggestions li:hover,
.flash-suggestions li.active { background: #eef4ff; color: var(--blue); }
.app.mode-sentences .search-panel { display: none; }

/* Compact inline speed (例句语速 / 跟读语速) */
.accent-inline {
  flex-shrink: 0;
}
.accent-inline .accent-pill {
  min-width: 2.1rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  touch-action: manipulation;
}
.accent-settings-row {
  flex-wrap: wrap;
  gap: 8px;
}
.accent-settings-row .speed-pill-group {
  flex: 1;
  min-width: 0;
}
.app.mode-sentences #accent-word {
  display: none;
}

.speed-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(229, 231, 235, 0.85);
}
.speed-inline-label {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.speed-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.speed-pill-group--tight {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.speed-pill-group--tight::-webkit-scrollbar { display: none; }
.speed-pill {
  border: none;
  background: #eef1f6;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.12s;
  flex-shrink: 0;
}
.speed-pill:hover {
  background: #e3ebfa;
  color: var(--blue);
}
.speed-pill.active {
  background: var(--blue);
  color: #fff;
  box-shadow: none;
}
.speed-pill:active { transform: scale(0.97); }
.speed-pill-group--tight .speed-pill {
  padding: 4px 10px;
  font-size: 0.74rem;
}
.zh-toggle-btn {
  flex: 0 0 auto;
  margin-left: 6px;
  border: 1px solid var(--line);
  background: #f3f5f9;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.zh-toggle-btn:hover {
  border-color: #c9d8f0;
  color: var(--ink);
}
.zh-toggle-btn.active {
  background: #e8f0fe;
  color: var(--blue);
  border-color: #c9d8f0;
}
.zh-toggle-btn:active { transform: scale(0.97); }
.card-loading { text-align: center; color: var(--muted); margin: 1rem 0; }
.card-loading.muted { font-size: 0.9rem; }

.branch-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px 14px;
  background: #fff7e6;
  border-bottom: 1px solid #f5d9a8;
  flex-shrink: 0;
}
.btn-back-deck {
  border: none;
  background: #fff;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #c9d8f0;
  cursor: pointer;
  align-self: flex-start;
}
.branch-meta {
  font-size: 0.8rem;
  color: #8a6d3b;
  line-height: 1.35;
}
.sheet-note {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 12px;
}

/* ───────────────────────── Card ───────────────────────── */
.card-stage {
  flex: 1;
  min-height: 0; /* allow flex child to shrink so overflow scroll works */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px 16px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.card-stage .flashcard,
.card-stage .empty {
  width: 100%;
  max-width: 100%;
}
.flashcard {
  width: 100%;
  max-width: 100%;
  background: var(--card);
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(16, 24, 40, 0.04),
    0 14px 36px rgba(16, 24, 40, 0.1);
  border: 1px solid rgba(229, 231, 235, 0.9);
  padding: 22px 20px 26px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  animation: pop .22s ease;
}
@keyframes pop { from { transform: scale(.98); opacity: .4; } to { transform: scale(1); opacity: 1; } }

.card-top { display: flex; align-items: flex-start; gap: 14px; }
.word-block { flex: 1; min-width: 0; }
.deck-position {
  margin: 6px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.4;
}
.deck-position strong {
  color: var(--ink);
  font-weight: 700;
}
.mastery-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.mastery-dots {
  display: inline-flex;
  gap: 4px;
}
.mastery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: background .2s ease, transform .2s ease;
}
.mastery-dot.on { background: var(--blue); }
.mastery-dot.on.known { background: var(--green); }
.mastery-dot.on.ready { background: #f0b429; }
.mastery-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue);
}
.mastery-row[data-level="0"] .mastery-label { color: var(--muted); }
.mastery-row[data-level="4"] .mastery-label { color: #b45309; }
.mastery-row[data-level="5"] .mastery-label { color: var(--green); }
.mastery-detail {
  font-size: 0.85rem;
  color: var(--muted);
}
.chip.mastery-0 { border-color: #e5e7eb; }
.chip.mastery-1 { border-color: #bfdbfe; }
.chip.mastery-2 { border-color: #93c5fd; }
.chip.mastery-3 { border-color: #fcd34d; }
.chip.mastery-4 { border-color: #fbbf24; }
.chip.mastery-5 { border-color: #86efac; }
.word {
  margin: 0;
  font-size: clamp(2.75rem, 8vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.6px;
  word-break: break-word;
}
.speak-btn {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  flex: 0 0 auto;
}
.speak-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #f3f5f9;
  color: var(--blue);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.speak-btn:hover .speak-btn-icon {
  background: #e8f0fe;
  box-shadow: 0 2px 10px rgba(31, 111, 235, 0.18);
}
.speak-btn:active .speak-btn-icon { transform: scale(0.94); }

.senses { margin-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.card-loading {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  padding: 20px 0;
}
.sense { border-top: 1px solid var(--line); padding-top: 18px; }
.sense:first-child { border-top: none; padding-top: 0; }
.sense .pos {
  display: inline-block;
  background: #eaf1ff; color: var(--blue);
  font-size: 0.8rem; font-weight: 700;
  padding: 4px 10px; border-radius: 8px;
  margin-right: 8px; vertical-align: middle;
}
.sense .freq {
  display: inline-block;
  font-size: 0.72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
  margin-right: 8px; vertical-align: middle;
  background: #f1f5f9; color: #64748b;
}
.sense .freq.core { background: #dbeafe; color: #1d4ed8; }
.sense .freq.common { background: #dcfce7; color: #15803d; }
.sense .freq.uncommon { background: #ffedd5; color: #c2410c; }
.sense .freq.rare { background: #f1f5f9; color: #64748b; }
.sense .def {
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.5;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip {
  font-size: 0.92rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.chip.syn { background: #e7f6ec; color: var(--green); border-color: #bce7c8; }
.chip.ant { background: #fdecee; color: var(--red); border-color: #f5c2c7; }
.chip.rel { background: #f1ebfd; color: var(--purple); border-color: #ddccf7; }
.chip.chip-link { cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.chip.chip-link:active { transform: scale(0.97); }
.chip.chip-static { cursor: default; text-decoration: none; }
.flashcard.in-branch .card-top .word::after {
  content: " · linked";
  font-size: 0.45em;
  color: var(--muted);
  font-weight: 500;
}
.chip-label { font-size: 0.82rem; color: var(--muted); align-self: center; margin-right: 2px; }

.examples { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }

/* Sentence practice mode */
.sentence-progress-wrap { width: 100%; }
.sentence-progress-rail {
  position: relative;
  height: 8px;
  background: #dfe3ea;
  border-radius: 999px;
  cursor: pointer;
  /* generous vertical hit-area for easier grabbing (esp. touch) */
  padding: 10px 0;
  margin: -10px 0;
  background-clip: content-box;
  touch-action: none;
  outline: none;
}
.sentence-progress-rail:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
.sentence-progress-fill {
  position: absolute;
  top: 10px;
  left: 0;
  height: 8px;
  width: 0%;
  background: linear-gradient(90deg, var(--blue), #3b82f6);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.sentence-progress-knob {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
  transition: left 0.35s ease;
  pointer-events: none;
}
.sentence-progress-rail:hover .sentence-progress-knob { transform: translate(-50%, -50%) scale(1.12); }
.sentence-progress-bubble {
  position: absolute;
  bottom: calc(100% - 6px);
  left: 0%;
  transform: translate(-50%, 0);
  background: #111827;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease;
  z-index: 5;
}
.sentence-progress-rail.dragging .sentence-progress-fill,
.sentence-progress-rail.dragging .sentence-progress-knob { transition: none; }
.sentence-progress-rail.dragging .sentence-progress-bubble { opacity: 1; }
.sentence-progress-text {
  margin: 8px 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.sentence-speed {
  width: 100%;
  margin-bottom: 10px;
}
.sentence-expr-head {
  width: 100%;
  text-align: center;
  margin-bottom: 4px;
}
.sentence-expr-rank {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 6px;
  margin-bottom: 6px;
}
.sentence-expr-phrase {
  margin: 0 0 6px;
  font-size: 1.65rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
}
.sentence-expr-stars {
  display: block;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: #d97706;
  margin-bottom: 4px;
}
.sentence-expr-extra {
  width: 100%;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed #e5e7eb;
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #374151;
}
.sentence-expr-extra p {
  margin: 0 0 8px;
}
.sentence-expr-extra p:last-child { margin-bottom: 0; }
.sentence-expr-extra .expr-label {
  font-weight: 600;
  color: #6b7280;
  margin-right: 4px;
}
.sentence-expr-extra .expr-zh {
  color: #6b7280;
  font-size: 0.88rem;
}
.sentence-expr-expl { color: #1d4ed8; }
.sentence-expr-tv { color: #7c3aed; font-style: italic; }
.sentence-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 22px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}
.sentence-phase-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8a6d3b;
  background: #fff7e6;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #f5d9a8;
}
.sentence-zh {
  margin: 0;
  width: 100%;
  font-size: 1.5rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: center;
  color: #1a1a1a;
  word-break: break-word;
}
.sentence-en {
  margin: 0;
  width: 100%;
  font-size: 1.35rem;
  line-height: 1.55;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  word-break: break-word;
}
.sentence-stage.speaking .sentence-en { color: var(--blue); }
.sentence-empty {
  text-align: center;
  color: var(--muted);
  margin: 0;
}
/* Playback dock — shared by Sentences + Focus/Explore */
.playback-dock,
.playback-dock .dock-btn,
.mode-pill,
.speed-pill,
.chrome-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.playback-dock {
  flex-shrink: 0;
  padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(244, 246, 251, 0.92) 24%);
  border-top: none;
}
.playback-dock-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 14px 18px;
  background: #fff;
  border-radius: 20px;
  box-shadow:
    0 4px 6px rgba(16, 24, 40, 0.04),
    0 12px 32px rgba(16, 24, 40, 0.12);
  border: 1px solid rgba(229, 231, 235, 0.9);
}
.sentence-dock-bar {
  gap: 20px;
  max-width: 420px;
}
.flash-dock-bar {
  gap: 8px;
  max-width: 560px;
}
@media (max-width: 480px) {
  .flash-dock-bar {
    gap: 4px;
    padding: 12px 10px;
  }
  .flash-dock-bar .dock-btn-nav .dock-icon {
    width: 42px;
    height: 42px;
  }
  .flash-dock-bar .dock-btn-play .dock-icon-main {
    width: 64px;
    height: 64px;
  }
  .flash-dock-bar .dock-label {
    font-size: 0.65rem;
  }
  .sentence-dock-bar {
    gap: 14px;
    padding: 14px 14px;
  }
  .sentence-dock-bar .dock-btn-nav .dock-icon {
    width: 52px;
    height: 52px;
  }
}
.dock-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0;
  color: var(--ink);
  transition: transform 0.15s ease, color 0.15s ease;
}
.dock-btn:active:not(:disabled) { transform: scale(0.94); }
.dock-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.dock-btn-nav .dock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f3f5f9;
  color: var(--ink);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.dock-btn-nav:hover .dock-icon {
  background: #e8f0fe;
  color: var(--blue);
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.15);
}
.dock-btn-play {
  margin: 0 4px;
}
.dock-btn-play .dock-icon-main {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3b82f6, var(--blue));
  color: #fff;
  box-shadow:
    0 6px 20px rgba(31, 111, 235, 0.45),
    0 0 0 4px rgba(31, 111, 235, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dock-btn-play:hover .dock-icon-main {
  transform: scale(1.04);
  box-shadow:
    0 8px 28px rgba(31, 111, 235, 0.5),
    0 0 0 5px rgba(31, 111, 235, 0.16);
}
.dock-btn-play.is-playing .dock-icon-main {
  background: linear-gradient(145deg, #1a7f37, #22c55e);
  box-shadow:
    0 6px 20px rgba(34, 197, 94, 0.4),
    0 0 0 4px rgba(34, 197, 94, 0.12);
}
.dock-btn-play .icon-pause { display: none; }
.dock-btn-play.is-playing .icon-play { display: none; }
.dock-btn-play.is-playing .icon-pause { display: block; }
.dock-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.dock-btn-play .dock-label {
  color: var(--blue);
  font-size: 0.8rem;
}
.dock-btn-play.is-playing .dock-label { color: var(--green); }
.dock-btn-known .dock-icon {
  background: #ecfdf3;
  color: var(--green);
}
.dock-btn-known:hover .dock-icon {
  background: #d1fae5;
  color: #15803d;
  box-shadow: 0 2px 10px rgba(34, 197, 94, 0.2);
}
.dock-btn-known .dock-label { color: var(--green); }
#sentence-stage {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  padding-bottom: 20px;
  display: none;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}
.app.mode-sentences #card-stage,
.app.mode-sentences #flash-controls,
.app.mode-sentences #branch-bar {
  display: none !important;
}
.app.mode-sentences #sentence-stage {
  display: flex !important;
}
.app.mode-sentences #sentence-controls {
  display: block !important;
}
.sentence-loading {
  margin: 0 0 12px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.sentence-card .sentence-en.hidden,
.sentence-card .sentence-zh.hidden { display: none; }
.sentence-card.phase-en-only .sentence-en {
  font-size: 1.55rem;
}

.ex { display: flex; gap: 10px; align-items: flex-start; }
.ex-play-btn {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.ex-play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3f5f9;
  color: var(--blue);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.ex-play-btn:hover .ex-play-icon {
  background: #e8f0fe;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.15);
}
.ex-play-btn:active .ex-play-icon { transform: scale(0.94); }
.ex.speaking .ex-play-icon {
  background: linear-gradient(145deg, #3b82f6, var(--blue));
  color: #fff;
  box-shadow: 0 4px 14px rgba(31, 111, 235, 0.35);
}
.ex-text .en {
  font-size: 1.1rem;
  line-height: 1.55;
  transition: background 0.15s, border-radius 0.15s;
}
.ex-text .zh {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 4px;
}
.ex.speaking {
  scroll-margin: 40vh 16px;
}
.ex.speaking .en {
  background: #eef4ff;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.sentence-zh,
.sentence-en {
  scroll-margin: 38vh 12px;
}

.empty { text-align: center; align-self: center; margin: auto; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* ───────────────────────── Settings sheet ───────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 20; }
.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 21;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,.18);
  max-width: 720px; margin: 0 auto;
  max-height: 88vh; overflow-y: auto;
  animation: slideup .25s ease;
}
@keyframes slideup { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: #d8dce3; margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 14px; }
.sheet .row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.sheet .row span { font-size: 0.95rem; }
.sheet .row input[type="range"] { grid-column: 1 / 2; }
.sheet .row em { color: var(--blue); font-style: normal; font-weight: 700; min-width: 46px; text-align: right; }
.sheet .row.toggle { grid-template-columns: 1fr auto; }
.sheet .row select { padding: 8px; border-radius: 9px; border: 1px solid var(--line); max-width: 200px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 18px; }
.sheet-actions .btn { flex: 1; }

input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--blue); }
input[type="range"] { width: 100%; accent-color: var(--blue); }

/* ───────────────────────── Toast ───────────────────────── */
.toast {
  position: fixed;
  left: 50%; bottom: 120px; transform: translateX(-50%);
  background: rgba(13,17,23,.92); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 0.9rem; z-index: 30;
  animation: pop .2s ease;
}

/* desktop niceties */
@media (min-width: 720px) {
  .app { box-shadow: var(--shadow); }
  .word { font-size: 3.4rem; }
  .sense .def { font-size: 1.35rem; }
  .ex-text .en { font-size: 1.15rem; }
  .card-stage { padding: 14px 20px 20px; }
  .flashcard { padding: 28px 24px 32px; }
}
