/* 小赵识字 — Spec 11 shared components and style tokens.
   This file is loaded last. Every screen uses these components; do not restyle
   a character row, grid card, Lv pill, story text, button or page title per
   screen. */

:root {
  /* Sizes */
  --action-height: 60px;
  --action-radius: 18px;
  --icon-button: 44px;
  --page-title-size: 22px;
  --page-title-weight: 800;
  --page-subtitle-size: 12px;

  /* Character and level */
  --level-pill-radius: 999px;
  --level-pill-height: 26px;
  --level-pill-font: 13px;
  --level-pill-small-height: 20px;
  --level-pill-small-font: 11px;
  --character-grid-bg: #FFFDF7;
  --character-grid-outside-bg: #F4EFE4;
  --character-grid-outside-line: #B9B0A0;

  /* Story text */
  --story-ink: #2C241B;
  --story-focus-fill: #FAEEDA;
  --story-focus-line: #EF9F27;
  --story-focus-radius: 5px;
  --story-focus-weight: 3px;
}

/* ------------------------------------------------------------- icon buttons */
.round-btn,
.app-top .round-btn,
.deck-page .round-btn,
.reader-info,
.reader-size button,
.modal-x,
.settings-info-btn,
.story-info-btn {
  width: var(--icon-button);
  height: var(--icon-button);
  flex: none;
}
.round-btn { display: grid; place-items: center; }
.app-top .round-btn svg { width: 22px; height: 22px; }
.modal-x {
  padding: 0;
  border: 1.5px solid var(--line2);
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.reader-size button { font-size: 14px; }
.reader-size { gap: 6px; }
.reader-info svg { width: 22px; height: 22px; }
.settings-info-btn,
.story-info-btn {
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
}
.settings-info-btn { margin: -10px -10px -10px 0; }
.story-info-btn { margin-right: -6px; }
.hf-capsule { height: var(--icon-button); }
.hf-capsule .hf-glyph { width: 26px; height: 26px; }

/* Fit the five-control Home bar at 390 px with 44 px controls. */
.app-top { padding: 0 14px; gap: 6px; }
.top-actions { gap: 5px; }
@media (max-width: 400px) {
  .app-top { padding: 0 12px; gap: 4px; }
  .top-actions { gap: 4px; }
}

/* ---------------------------------------------------------------- buttons */
.btn-main,
.btn-primary,
.btn-outline,
.new-save,
.done-actions .btn-main,
.done-actions .btn-outline,
.done-hotlist-btn,
.reader-practice,
.reader-actions button,
.lesson-preview-actions button,
.story-hotlist-btn,
.story-sheet-close,
.confirm-sheet-actions .btn-outline,
.confirm-sheet-actions .btn-delete,
.btn-outline-red,
.btn-outline-grey,
.hotlist-done,
.picture-save-without,
.picture-footer-actions .btn-outline {
  min-height: var(--action-height);
  height: var(--action-height);
  border-radius: var(--action-radius);
}
.btn-primary,
.btn-main,
.new-save { font-size: 17px; }
.btn-outline { font-size: 15px; }
.btn-delete { border-radius: var(--action-radius); }
.picture-footer-actions .round-btn { width: var(--icon-button); height: var(--icon-button); }
.btn-outline-grey { font-size: 14px; }
.reader-actions button { font-size: 14px; }
.reader-practice { margin-top: 12px; }

/* ------------------------------------------------------------------ titles */
h1.page-title {
  font-size: var(--page-title-size);
  font-weight: var(--page-title-weight);
  line-height: 1.2;
  text-align: left;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.add-top,
.settings-top {
  justify-content: flex-start;
  gap: 10px;
  height: 52px;
}
.add-top .page-title,
.settings-top .page-title { margin-right: auto; text-align: left; }
.settings-top h1 { text-align: left; }
.add-spacer { width: var(--icon-button); height: var(--icon-button); flex: 0 0 var(--icon-button); }
.stories-top { gap: 10px; }
.stories-head-text { text-align: left; }
.stories-title { font-size: var(--page-title-size); }
.stories-scope { margin-top: 2px; font-size: var(--page-subtitle-size); }
.story-create-top,
.lesson-create-top {
  grid-template-columns: var(--icon-button) minmax(0, 1fr) var(--icon-button);
  gap: 10px;
  height: 52px;
}
.story-create-head,
.lesson-create-head { text-align: left; }
.story-create-step,
.lesson-create-step { margin-top: 2px; font-size: var(--page-subtitle-size); }
.reader-top {
  grid-template-columns: var(--icon-button) minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 16px 10px;
}
.reader-title {
  text-align: left;
  font-size: var(--page-title-size);
  font-weight: var(--page-title-weight);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deck-head-main h1.page-title { font-size: var(--page-title-size); }
.search-page-head h1 { font-size: var(--page-title-size); text-align: left; }

/* ---------------------------------------------------------------- Lv pill */
.lv-badge {
  height: var(--level-pill-height);
  padding: 0 10px;
  font-size: var(--level-pill-font);
  font-weight: 700;
  border-radius: var(--level-pill-radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  flex: none;
}
.lv-badge.small {
  height: var(--level-pill-small-height);
  padding: 0 7px;
  font-size: var(--level-pill-small-font);
  border-width: 1.25px;
}
.new-chip {
  height: var(--level-pill-height);
  padding: 0 10px;
  border: 1.5px solid var(--character-grid-outside-line);
  border-radius: var(--level-pill-radius);
  background: var(--character-grid-outside-bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  flex: none;
}
.card-level {
  display: inline-flex;
  align-items: center;
  height: var(--level-pill-height);
  padding: 0 9px;
  border-radius: var(--level-pill-radius);
  border: 1.5px solid var(--line2);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--level-pill-font);
  font-weight: 700;
  white-space: nowrap;
}

/* ------------------------------------------------------------ character row */
.character-row,
.deck-row.character-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--paper);
  border: 0;
  border-bottom: 1px solid var(--seg);
  text-align: left;
}
.character-row.with-rank { grid-template-columns: 22px 48px minmax(0, 1fr) auto auto; }
.character-row:last-child { border-bottom: 0; }
.character-row-rank {
  align-self: center;
  text-align: right;
  font: 800 12px/1.2 var(--ui-font);
  color: var(--muted);
}
.character-row-tile {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid var(--red);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  font: 28px/1 "LXGW WenKai", "KaiTi", "STKaiti", serif;
  flex: none;
}
.character-row-tile::before,
.character-row-tile::after {
  content: "";
  position: absolute;
  border-color: var(--grid-line);
  opacity: .55;
  pointer-events: none;
}
.character-row-tile::before {
  left: 50%; top: 0; bottom: 0; width: 0;
  border-left: 1px dashed var(--grid-line);
  transform: translateX(-.5px);
}
.character-row-tile::after {
  top: 50%; left: 0; right: 0; height: 0;
  border-top: 1px dashed var(--grid-line);
}
.character-row.is-new .character-row-tile {
  border-style: dashed;
  border-color: var(--character-grid-outside-line);
  background: var(--character-grid-outside-bg);
}
.character-row-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.character-row-pinyin {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.character-row-word {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.character-row-meta {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.character-row-action {
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--red);
  font: 800 14px/1 var(--ui-font);
  flex: none;
}
.character-row-action:disabled { color: var(--muted); opacity: .65; }
.character-row-action:active:not(:disabled) { transform: scale(.98); }
.character-row .flame-btn { width: 44px; height: 44px; }
.character-row .deck-btn { width: 44px; height: 44px; }
.deck-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #A89F8D;
  display: grid;
  place-items: center;
}
.deck-btn .deck-icon { width: 20px; height: 20px; display: block; }
.character-row-reason {
  color: #7A4A00;
  font-weight: 600;
}
.character-row .lv-badge { margin-left: 2px; }

/* --------------------------------------------------------- character grid */
.character-grid-card,
.story-tile,
.story-add-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  aspect-ratio: 1 / 1;
  padding: 6px 4px 5px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--character-grid-bg);
  box-shadow: 0 2px 0 var(--line);
  color: var(--ink);
  overflow: hidden;
  text-align: center;
}
.character-grid-card,
.story-tile { font-family: var(--ui-font); }
.character-grid-card:active,
.story-tile:active { transform: scale(.96); }
.character-grid-card.selected,
.story-tile.selected {
  border-color: var(--red);
  background: #FFFAF0;
  box-shadow: 0 2px 0 var(--red-edge), 0 0 0 2px var(--red-tint) inset;
}
.character-grid-char {
  font-family: "LXGW WenKai", "KaiTi", "STKaiti", serif;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}
.character-grid-card.small .character-grid-char { font-size: 24px; }
.story-tile-char { font-size: 30px; line-height: 1; color: var(--ink); }
.story-tile.small .story-tile-char { font-size: 24px; }
.character-grid-pinyin {
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.character-grid-word {
  font-family: var(--ui-font);
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.character-grid-level {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: var(--level-pill-small-height);
  max-width: 100%;
}
.character-grid-count {
  font: 700 11px/1 var(--ui-font);
  color: var(--muted);
  white-space: nowrap;
}
.character-grid-card.outside,
.story-tile.outside {
  border-style: dashed;
  border-color: var(--character-grid-outside-line);
  background: var(--character-grid-outside-bg);
  box-shadow: none;
}
.character-grid-card.outside .character-grid-char,
.story-tile.outside .story-tile-char { color: var(--ink); }
.character-grid-card .grid-tick,
.story-tile .grid-tick {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px var(--paper);
}
.character-grid-card .grid-tick svg,
.story-tile .grid-tick svg { width: 14px; height: 14px; display: block; }
.story-tile-bar,
.story-focus-chip-bar,
.story-focus-detail-bar,
.story-char-card-bar { display: none !important; }

/* The focus/new-character highlight. One rule for every story surface. */
.story-char.focus,
.focus-char,
.character-grid-char.focus,
.lesson-chip-char.focus {
  background: var(--story-focus-fill);
  border-radius: var(--story-focus-radius);
  box-shadow: inset 0 calc(-1 * var(--story-focus-weight)) 0 var(--story-focus-line);
  color: var(--story-ink);
  padding: 0 .03em;
  text-decoration: none;
}
.reader-body,
.reader-body .story-char,
.reader-body .story-outside,
.reader-body .story-outside span,
.picture-preview-card,
.picture-preview-card .story-char,
.picture-section-text,
.picture-section-text .story-char,
.edit-text-body,
.edit-text-body .story-char,
.picture-caption-after,
.picture-caption-after .story-char {
  color: var(--story-ink);
}
.reader-body .story-outside rt,
.picture-preview-card rt,
.picture-section-text rt,
.edit-text-body rt,
.picture-caption-after rt { color: var(--muted); }
.story-char { -webkit-tap-highlight-color: transparent; }
.story-char.active { outline: none; text-decoration: none; }

/* --------------------------------------------------------------- page bits */
.story-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
}
.story-list-text { flex: 1; min-width: 0; }
.story-row .deck-chevron,
.story-list-row .deck-chevron { color: var(--muted); flex: none; }

/* Story details/focus grids */
.story-focus-details { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.story-char-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 6px 0 4px;
}
.character-grid-card.detail { border-radius: 10px; padding: 5px 2px 4px; gap: 3px; }
.character-grid-card.detail .character-grid-char { font-size: 24px; }

/* --------------------------------------------------------------- settings */
.settings-top h1.page-title { margin-right: auto; }
.settings-history-row { min-height: 64px; }
.done-legend .legend-item i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.story-legend-row i { width: 16px; height: 4px; border-radius: 2px; }

/* --------------------------------------------------------- lesson deck cards */
.lesson-story-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 3px 0 var(--line);
  color: var(--ink);
  text-align: left;
}
.lesson-story-card .lesson-story-cover {
  width: 66px;
  height: 66px;
  flex: none;
  border-radius: 12px;
  overflow: hidden;
  background: var(--folder);
}
.lesson-story-cover { position: relative; }
.lesson-story-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lesson-story-cover.empty { display: grid; place-items: center; color: var(--muted); }
.lesson-story-card .lesson-story-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lesson-story-card .lesson-story-title { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lesson-story-card .lesson-story-label { font-size: 11px; color: var(--muted); font-weight: 700; }
.lesson-story-card .deck-chevron { color: var(--muted); flex: none; }

/* --------------------------------------------------------- lesson preview */
.lesson-preview-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.lesson-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px 7px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--character-grid-bg);
  box-shadow: 0 2px 0 var(--line);
  color: var(--ink);
  text-align: center;
  min-width: 0;
}
.lesson-chip.locked { border-color: var(--red); box-shadow: 0 2px 0 var(--red-edge); }
.lesson-chip-char {
  font-family: "LXGW WenKai", "KaiTi", "STKaiti", serif;
  font-size: 30px;
  line-height: 1.05;
  color: var(--story-ink);
}
.lesson-chip-pinyin {
  font-size: 11px;
  line-height: 1.1;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-chip-word {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lesson-chip-uses { font: 700 11px/1 var(--ui-font); color: var(--muted); }
.lesson-chip-head, .lesson-chip-actions, .lesson-chip-reason { display: none; }
.lesson-chip-sheet .lesson-chip-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--character-grid-bg);
}
.lesson-chip-sheet .lesson-chip-preview .lesson-chip-char { font-size: 44px; }
.lesson-chip-sheet .lesson-chip-details { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lesson-chip-sheet .lesson-chip-detail-line { font-size: 14px; font-weight: 700; }
.lesson-chip-sheet .lesson-chip-detail-sub { font-size: 12px; color: var(--muted); line-height: 1.35; }
.lesson-chip-sheet-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.lesson-chip-sheet-actions .btn-outline { width: 100%; }
.lesson-chip-sheet-actions .btn-outline.is-on { border-color: var(--red); color: var(--red); }

/* ------------------------------------------------------------ story picker */
.story-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.story-add-tile { border-style: dashed; border-color: var(--line2); background: transparent; box-shadow: none; color: var(--muted); }
.story-add-glyph { font: 800 22px/1 var(--ui-font); }
.story-add-label { font-size: 11px; font-weight: 700; }
.story-browse-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.story-add-row { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--seg); }
.story-add-row .character-row { border-bottom: 0; padding-left: 0; padding-right: 0; flex: 1; }
.story-add-row .story-add-btn { margin-left: auto; }

@media (max-width: 380px) {
  .story-grid, .story-browse-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .character-grid-char, .story-tile-char { font-size: 27px; }
  .character-grid-card.small .character-grid-char,
  .story-tile.small .story-tile-char { font-size: 22px; }
  .story-focus-details, .story-char-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lesson-preview-chips { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* --------------------------------------------------------------- refinements */
.story-focus-chips {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.story-list-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.story-list-text .story-row-title,
.story-list-text .story-row-meta {
  margin: 0;
  display: block;
}
.story-list-text .story-row-meta { font-size: 12px; }
.story-add-char-row {
  border: 1.5px solid var(--line);
  border-radius: 14px;
  margin-bottom: 6px;
  background: var(--paper);
  box-shadow: 0 2px 0 var(--line);
}
.story-add-char-row .character-row-action.added { color: var(--muted); }
.next-list { display: block; }
.next-list .character-row:first-child { border-top: 0; }
.next-footnote {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
}
.character-row.is-rich { align-items: start; }
.character-row.is-rich .character-row-tile { margin-top: 1px; }
.character-row.is-rich .character-row-meta {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 1px;
}
.character-row.is-rich .lv-badge,
.character-row.is-rich .new-chip { margin-top: 3px; }
#storyLengthValue {
  min-width: 3ch;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}
#storyLengthValue::before { content: "≈ "; font-weight: 700; }
#storyLengthValue::after {
  content: " " attr(data-unit);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.story-length-row { gap: 12px; flex-wrap: wrap; }
.story-card-speaker {
  border-color: var(--line2) !important;
  background: var(--paper) !important;
  color: var(--muted) !important;
}
.settings-card .stepper-value { font-size: 15px; min-width: 48px; }
.story-round-sm { width: 44px; height: 44px; }
.character-grid-card .character-grid-pinyin { padding: 0 1px; }
@media (max-width: 380px) {
  .story-focus-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Quiz actions: the main answers and hands-free actions are 60 px tall. */
.grade-btn,
.hf-action {
  height: var(--action-height);
  min-height: var(--action-height);
  border-radius: var(--action-radius);
  flex-direction: row;
  gap: 8px;
  padding: 0 8px;
  font-size: 15px;
}
.grade-btn .grade-icon,
.hf-action .hf-action-icon { width: 22px; height: 22px; }
.hf-action-row { gap: 10px; }

.lesson-block {
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.lesson-block .lesson-story-card { margin: 0; }

/* The Spec 10 cover used a two-column grid; the row now has its own chevron. */
.stories-list .story-row.story-list-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 12px;
}
.stories-list .story-row.story-list-row .story-row-cover { grid-row: auto; }
.reader-top { padding-left: 12px; padding-right: 12px; gap: 6px; }

/* The quiz's single-card level is the same full-size Lv pill. */
.study-level-badge,
.study-level-badge.level-0,
.study-level-badge.level-1,
.study-level-badge.level-2,
.study-level-badge.level-3,
.study-level-badge.level-4,
.study-level-badge.level-5 {
  height: var(--level-pill-height);
  padding: 0 10px;
  font-size: var(--level-pill-font);
  font-weight: 700;
  border-width: 1.5px;
  border-style: solid;
}
.study-level-badge { border-color: var(--l0s); background: var(--l0t); color: var(--l0k); }
.study-level-badge.level-1 { border-color: var(--l1s); background: var(--l1t); color: var(--l1k); }
.study-level-badge.level-2 { border-color: var(--l2s); background: var(--l2t); color: var(--l2k); }
.study-level-badge.level-3 { border-color: var(--l3s); background: var(--l3t); color: var(--l3k); }
.study-level-badge.level-4 { border-color: var(--l4s); background: var(--l4t); color: var(--l4k); }
.study-level-badge.level-5 { border-color: var(--l5s); background: var(--l5t); color: var(--l5k); }


/* Search uses the same back + 22 px title pattern as every sub-page. */
.search-page { padding-top: 12px; }
.search-page-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.search-page-head .search-head-text { flex: 1; min-width: 0; }
.search-page-head .page-title { margin: 0; }
.search-page-head .page-subtitle { margin-top: 2px; font-size: var(--page-subtitle-size); color: var(--muted); }
.search-page-head #searchCount { flex: none; }

/* The discard button sits beside main actions, so it is a 60 px secondary. */
.picture-footer-actions .picture-trash {
  width: var(--action-height);
  height: var(--action-height);
  border-radius: var(--action-radius);
}

.meta-line { font-size: var(--page-subtitle-size); }
.page-subtitle { font-size: var(--page-subtitle-size); color: var(--muted); line-height: 1.3; }

/* Rows that expand in place do not use a chevron. */
.story-browse-toggle {
  width: 20px;
  flex: none;
  text-align: center;
  font: 800 16px/1 var(--ui-font);
  color: var(--muted);
}

/* The Add menu's rows open pages, so they end in a chevron. */
#addChooser .add-sheet-row::after {
  content: "›";
  margin-left: auto;
  padding-left: 8px;
  font-size: 22px;
  line-height: 1;
  color: var(--muted);
  flex: none;
}

/* Spec 11 exception: the Home name stays 26 px at every width. */
.brand-title { font-size: 26px; }

/* Collection-page Play: the deck header's 60 px play control, not a
   full-width banner. */
.deck-head-row { gap: 12px; }
.deck-play-btn {
  width: 60px;
  height: 60px;
  min-width: 60px;
  padding: 0;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--action-radius);
  position: relative;
}
.deck-play-btn svg { width: 26px; height: 26px; display: block; }

/* Hot / Smart list label. One component, two variants. */
.list-tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.list-tag.hot { background: #FBE3DF; color: #9A2E24; }
.list-tag.smart {
  background: #E6F1FB;
  border-color: #B4D2EE;
  color: #0C447C;
}

/* The title truncates; the list pill keeps its size. */
.deck-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.deck-title-row .page-title { min-width: 0; }

/* M9 (plan §10 M9.1): hands-free checks audio on the server, so its toggles
   are disabled offline and say why. */
.hf-capsule:disabled,
.scope-hf-toggle.offline { opacity: .5; cursor: default; }
.hf-capsule:disabled .knob { background: var(--muted-2); }

/* M9 (plan §10 M9.2): the Home sync dot and the Settings stale warning. */
.sync-dot .sync-dot-mark {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px var(--amber-tint);
}
.sync-dot[hidden] { display: none; }
.sync-warning { color: var(--amber-ink); }
