/* Design tokens and shared components for every extension page, and for the
   overlay's shadow roots on youtube.com (hence :host next to :root).
   Values are measured from languagereactor.com (computed styles, Chrome
   DevTools protocol, 2026-09-23). The reference is dark-only. Its purple is
   Wovia's blue and yellow (owner, 2026-10-12), from brand.css.

   The panel page, in the extension and on the website, has a light and a
   dark look (owner, 2026-10-14: Safari's grounds on iOS, light by default),
   chosen by the setting `theme` and written on its root as data-theme
   (panel/theme-mode.js); the blocks below the first redefine the tokens for
   each. Everything else keeps the first block's, the reference's dark: the
   overlay and the subtitle frame, whose :host resets the tokens inside its
   shadow root, and the extension's other pages. A stylesheet names a token
   for every colour of the page's own surfaces; white over a picture, a video
   or a coloured fill is --on-media or --on-accent, the same in both looks. */

@import url("brand.css");

:root,
:host {
  color-scheme: dark;
  /* The website's ground in its default look: its install manifest's colours and index.html's theme-color (backend/site-app.js). */
  --site-bg: #f2f2f7;
  /* The foreground the faint tints and lines are mixed from: color-mix(in srgb, var(--ink) N%, transparent). */
  --ink: #ffffff;
  --on-accent: #ffffff;
  --on-media: #ffffff;
  /* A darker press on a field, the scroll bars' thumbs, a switch's knob, the inverse surface of toasts. */
  --press: rgba(0, 0, 0, 0.3);
  --scrollbar: #3d3f44;
  --switch-thumb: #e0e0e0;
  --inverse: #323232;
  --on-inverse: #ffffff;
  /* Text on a fill of the learner's word colour (a stage's pill switched on). */
  --on-word: #111111;
  /* A count beside a drawer row, a done message, a saved sentence's mark as text. */
  --nav-count: #41af99;
  --success: #4caf50;
  --saved-text: #ffec8e;
  /* The reference's bright status colours as text, icons and lines (a ready file, a warning, information). */
  --success-bright: #00e676;
  --warning-text: #ffc107;
  --info-text: #00bfff;
  --bg: #1a1c1f;
  --bg-deep: #131517;
  --surface: #23252a;
  --surface-raised: #292c31;
  --surface-soft: rgba(255, 255, 255, 0.04);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.133);
  --line-soft: rgba(255, 255, 255, 0.1);
  --field-bg: rgba(0, 0, 0, 0.2);
  --field-border: rgba(255, 255, 255, 0.15);
  --text: #e2e5e9;
  --text-strong: #ffffff;
  --text-nav: #cccccc;
  --text-label: rgba(255, 255, 255, 0.667);
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-tool: rgba(255, 255, 255, 0.7);
  /* What the pointer is over and what is chosen: a fill, a field's edge, the chosen item's text. The panel page's
     looks draw them in the brand's blue (owner, 2026-10-14); here the reference's neutral white. */
  --hover: rgba(255, 255, 255, 0.05);
  --selected: rgba(255, 255, 255, 0.08);
  --tab-active: rgba(255, 255, 255, 0.1);
  --hover-line: rgba(255, 255, 255, 0.4);
  --selected-text: #ffffff;
  --pill-bg: rgba(255, 255, 255, 0.06);
  --accent: var(--wovia-blue);
  --accent-hover: var(--wovia-blue-strong);
  --accent-track: color-mix(in srgb, var(--wovia-blue) 50%, transparent);
  --accent-soft: var(--wovia-blue-light);
  --lang: #37ae92;
  --lang-text: #7fd7c2;
  --saved: var(--wovia-yellow);
  --badge-new: #ff9800;
  --chevron: color-mix(in srgb, var(--wovia-blue-pale) 73.3%, transparent);
  --danger: #f28b82;
  --focus: var(--wovia-blue-light);
  --shadow: 0 11px 15px -7px rgba(0, 0, 0, 0.2), 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font: "Noto Sans", Helvetica, Arial, sans-serif;
  /* Headings of the panel page's home (owner, 2026-10-14: Be Vietnam Pro, drawn for Vietnamese; fonts.css). */
  --font-display: "Be Vietnam Pro", "Noto Sans", Helvetica, Arial, sans-serif;
}

/* The panel page's light look (owner, 2026-10-14): Safari's grounds on iOS,
   the grouped grey under white surfaces, black text, its separators' grey
   (rgb 60 60 67). The logo's blue reads 6.1:1 on its ground. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #000000;
  --press: rgba(0, 0, 0, 0.08);
  --scrollbar: #c7c7cc;
  --switch-thumb: #ffffff;
  /* A colour made for the dark (the reference's, the learner's word colours) is drawn no lighter than this OKLCH
     lightness, dark enough on white: `oklch(from <colour> min(l, var(--max-lightness, 1)) c h)` in a stylesheet,
     word-colour-properties.js colourInLook in code. Unset in the dark looks, where the colour is as written. */
  --max-lightness: 0.55;
  --on-word: #ffffff;
  --nav-count: #0f7a63;
  --success: #1b7f3b;
  --saved-text: #8a6100;
  --success-bright: #1b7f3b;
  --warning-text: #8a6100;
  --info-text: #0369a1;
  --bg: var(--site-bg);
  --bg-deep: var(--site-bg);
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #ffffff;
  --line: rgba(60, 60, 67, 0.16);
  --line-strong: rgba(60, 60, 67, 0.22);
  --line-soft: rgba(60, 60, 67, 0.11);
  --field-bg: #ffffff;
  --field-border: rgba(60, 60, 67, 0.24);
  --text: #1d1d1f;
  --text-strong: #000000;
  --text-nav: #1d1d1f;
  --text-label: #48484d;
  --text-muted: #6e6e73;
  --text-tool: #48484d;
  --hover: color-mix(in srgb, var(--wovia-blue) 8%, transparent);
  --selected: color-mix(in srgb, var(--wovia-blue) 13%, transparent);
  --tab-active: var(--selected);
  --hover-line: color-mix(in srgb, var(--wovia-blue) 70%, transparent);
  --selected-text: var(--wovia-blue-strong);
  --pill-bg: rgba(120, 120, 128, 0.12);
  --accent-track: color-mix(in srgb, var(--wovia-blue) 30%, transparent);
  /* The brand's blue as text and lines on white (6.2:1), its fill unchanged. */
  --accent-soft: var(--wovia-blue-strong);
  --lang-text: #0f7a63;
  /* The saved item's gold as a mark on white: the brand's yellow reads 1.4:1 there. */
  --saved: #c99400;
  --chevron: rgba(60, 60, 67, 0.6);
  --danger: #c62828;
  --focus: var(--wovia-blue-strong);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* The panel page's dark look (owner, 2026-10-14): Safari's on iOS, black
   under its grey surfaces, in place of the reference's grey and the
   website's former navy. */
html[data-theme="dark"] {
  --bg: #000000;
  --bg-deep: #000000;
  --surface: #1c1c1e;
  --surface-raised: #2c2c2e;
  --surface-soft: #1c1c1e;
  --scrollbar: #48484a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --field-bg: rgba(118, 118, 128, 0.24);
  --text: #e5e5ea;
  --text-nav: #e5e5ea;
  --text-label: rgba(235, 235, 245, 0.7);
  --text-muted: rgba(235, 235, 245, 0.55);
  --text-tool: rgba(235, 235, 245, 0.7);
  --hover: color-mix(in srgb, var(--wovia-blue) 18%, transparent);
  --selected: color-mix(in srgb, var(--wovia-blue) 30%, transparent);
  --tab-active: var(--selected);
  --hover-line: var(--wovia-blue-light);
  --selected-text: var(--wovia-blue-light);
}

/* Base ------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font: 400 16px/24px var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-soft);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

/* A picture drawn for one look (brand.js PRODUCT_LOGOS) shows in that look only; the light one where none is set. */
html:not([data-theme="dark"]) [data-look="dark"],
html[data-theme="dark"] [data-look="light"] {
  display: none !important;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border-radius: 5px;
  background: var(--scrollbar);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.icon {
  display: inline-block;
  flex: none;
}

.language-flag {
  display: inline-block;
  object-fit: contain;
}

.language-flag.is-dimmed {
  filter: grayscale(0.75);
  opacity: 0.48;
}

/* Buttons ---------------------------------------------------------------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font: 500 16px/24px var(--font);
  cursor: pointer;
  transition: background-color 0.25s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary.small {
  gap: 6px;
  height: 30px;
  padding: 0 9px;
  font-size: 15px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 500 15px/22px var(--font);
  text-decoration: none;
  cursor: pointer;
}

.btn-outline:hover:not(:disabled) {
  background: var(--hover);
}

.btn-outline:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-outline.is-on {
  border-color: color-mix(in srgb, var(--saved) 45%, transparent);
  color: var(--saved);
}

.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 37px;
  height: 37px;
  margin-left: 2px;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-tool);
  cursor: pointer;
}

.tool-button:hover {
  background: var(--hover);
}

.tool-button.bordered {
  width: 36px;
  height: 36px;
  margin: 0 4px;
  border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent);
}

.tool-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 50px;
  background: transparent;
  color: var(--text);
  font: 500 14px/21px var(--font);
  cursor: pointer;
}

.tool-text:hover {
  background: var(--hover);
}

/* Fields ----------------------------------------------------------------- */

.select-wrap {
  position: relative;
  display: inline-flex;
  width: 330px;
  max-width: 100%;
}

.select-field {
  width: 100%;
  height: 40px;
  padding: 0 39px 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text-strong);
  font: 400 16px/23px var(--font);
  appearance: none;
  cursor: pointer;
}

.select-field:hover {
  border-color: var(--hover-line);
}

.select-field option {
  background: var(--surface);
  color: var(--text);
}

.select-caret {
  position: absolute;
  top: 50%;
  right: 7px;
  color: var(--text-strong);
  transform: translateY(-50%);
  pointer-events: none;
}

/* combobox.js: a select that filters as one types (the reference's Autocomplete). */
.combo {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.combo-input {
  width: 100%;
  height: 40px;
  padding: 0 39px 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text-strong);
  font: 400 16px/23px var(--font);
}

.combo-input:hover {
  border-color: var(--hover-line);
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-strong);
  transform: translateY(-50%);
  cursor: pointer;
}

.combo-input[aria-expanded="true"] + .combo-toggle {
  transform: translateY(-50%) rotate(180deg);
}

.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 1300;
  width: 100%;
  max-height: 40vh;
  margin: 0;
  padding: 8px 0;
  overflow: auto;
  border-radius: 4px;
  background: var(--surface);
  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2), 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
  list-style: none;
}

.combo-option {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 16px;
  cursor: pointer;
}

.combo-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--wovia-blue-light) 16%, transparent);
}

.combo-option.is-active {
  background: var(--selected);
}

.combo-option[aria-selected="true"].is-active {
  background: color-mix(in srgb, var(--wovia-blue-light) 24%, transparent);
}

.combo-empty {
  padding: 14px 16px;
  color: color-mix(in srgb, var(--ink) 70%, transparent);
}

/* drawer-select.js: a select on a phone or a tablet, the reference's MobileSelect (MobileSelect-9YWUJYf6.js: Ro, jo, Do,
   $o, Lo, Ao, wo, ko, To). */
.drawer-select {
  width: 100%;
}

.drawer-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 15%, transparent);
  border-radius: 8px;
  background-color: var(--field-bg);
  color: var(--text-strong);
  font: 400 14px/1.4 var(--font);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.drawer-select-button:hover:not(:disabled) {
  border-color: var(--hover-line);
}

.drawer-select-button:focus {
  outline: none;
  border-color: var(--wovia-blue);
}

.drawer-select-button:active:not(:disabled) {
  background-color: var(--press);
}

.drawer-select-button > svg {
  flex-shrink: 0;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.drawer-select-shown {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.drawer-select-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.drawer-select-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: flex-end;
  background: rgba(0, 0, 0, 0.5);
}

.drawer-select-paper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 85dvh;
  padding-bottom: var(--safe-area-bottom, 0px);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  background: linear-gradient(180deg, var(--surface-raised) 0%, var(--surface) 100%);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  color: var(--text-strong);
}

.drawer-select-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.drawer-select-title {
  font: 600 16px/1.5 var(--font);
  color: var(--text-strong);
}

.drawer-select-close,
.drawer-select-clear {
  display: flex;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text-strong);
  cursor: pointer;
}

.drawer-select-searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 16px;
  padding: 0 8px 0 12px;
  border: 1px solid color-mix(in srgb, var(--ink) 23%, transparent);
  border-radius: 4px;
  background-color: var(--field-bg);
}

.drawer-select-magnifier {
  display: flex;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
}

.drawer-select-search {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: none;
  color: var(--text-strong);
  font: 400 16px/23px var(--font);
  outline: none;
}

.drawer-select-list {
  min-height: 40vh;
  max-height: calc(85dvh - 140px);
  padding: 8px 0;
  overflow-y: auto;
}

.drawer-select-list::-webkit-scrollbar {
  width: 6px;
}

.drawer-select-list::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background-color: var(--scrollbar);
}

.drawer-select-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--text-strong);
  font: 400 15px/1.5 var(--font);
  cursor: pointer;
}

.drawer-select-option:hover {
  background-color: var(--hover);
}

.drawer-select-option.is-selected {
  background-color: color-mix(in srgb, var(--wovia-blue) 15%, transparent);
  color: var(--wovia-blue);
}

.drawer-select-option.is-selected:hover {
  background-color: color-mix(in srgb, var(--wovia-blue) 25%, transparent);
}

.drawer-select-label {
  flex: 1;
}

.drawer-select-option > svg {
  margin-left: 8px;
  color: var(--wovia-blue);
}

.drawer-select-empty {
  padding: 24px;
  color: color-mix(in srgb, var(--ink) 50%, transparent);
  text-align: center;
}

/* language-options.js: a study language's row (the reference's Settings_basic:L55–90, PhrasePumpDueChip). */
.combo-lang {
  display: flex;
  align-items: center;
  width: 100%;
}

.combo-lang-avatar {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-right: 2px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--field-bg);
  font-size: 18px;
}

.combo-lang-name {
  flex-grow: 1;
  margin-left: 10px;
}

.combo-due-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 20px;
  padding: 0 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--ink) 22%, var(--surface));
  font-size: 0.85em;
}

.combo-due-chip.is-due {
  background: var(--wovia-blue);
}

.combo-due-chip svg {
  opacity: 0.8;
}

.text-field {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--field-border);
  border-radius: 8px;
  background: var(--field-bg);
  color: var(--text-strong);
  font: 400 16px/24px var(--font);
  resize: vertical;
}

.text-field::placeholder {
  color: color-mix(in srgb, var(--ink) 40%, transparent);
}

.text-field:hover {
  border-color: var(--hover-line);
}

.text-field[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-size: 14px;
}

.field-label {
  display: flex;
  align-items: center;
  margin: 0 0 8px;
  color: var(--text-label);
  font-size: 13px;
  font-weight: 600;
  line-height: 19.5px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.info-icon {
  display: inline-flex;
  margin-left: 8px;
  color: var(--accent);
  letter-spacing: 0;
  text-transform: none;
  cursor: help;
}

.switch {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0 0 10px;
  color: var(--text-strong);
  cursor: pointer;
}

.switch-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  flex: none;
  width: 34px;
  height: 14px;
  margin: 0 12px 0 2px;
  border-radius: 7px;
  background: color-mix(in srgb, var(--ink) 30%, transparent);
  transition: background-color 0.15s;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: -3px;
  left: -3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--switch-thumb);
  box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.14), 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, background-color 0.15s;
}

.switch-input:checked + .switch-track {
  background: var(--accent-track);
}

.switch-input:checked + .switch-track::after {
  background: var(--accent);
  transform: translateX(20px);
}

.switch-input:focus-visible + .switch-track {
  outline: 2px solid var(--focus);
  outline-offset: 4px;
}

/* Pills, badges, headings ----------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 50px;
  background: var(--pill-bg);
  color: var(--text);
  font-size: 13.6px;
  line-height: 20.4px;
}

.pill .icon {
  opacity: 0.7;
}

.section-title {
  display: flex;
  align-items: center;
  margin: 40px 0 24px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 600;
  line-height: 33px;
  letter-spacing: 0.3px;
}

/* Gate: the centered "needs something" state ----------------------------- */

/* The extra bottom padding lifts the box to where the reference centres it
   (its box sits 38px above the app-bar-adjusted middle). */
.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  /* the panel's page height (panel.css --page-h: without the bottom bar of a small screen); elsewhere, as before */
  min-height: var(--page-h, calc(100vh - 42px));
  padding: 24px 24px 101px;
  text-align: center;
}

.gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 480px;
  padding: 20px;
}

.gate-icon {
  color: var(--text-strong);
  opacity: 0.3;
}

.gate-message {
  margin: 10px 20px 25px;
  color: var(--text-strong);
}

.gate-detail {
  margin: -20px 20px 25px;
  color: var(--text-muted);
  font-size: 15px;
}

.gate-description {
  margin: 28px 0 0;
  color: var(--text-strong);
}

/* Dialog and toasts ------------------------------------------------------ */

.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 24px;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dialog-title {
  margin: 0 0 12px;
  color: var(--text-strong);
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
}

.dialog p {
  margin: 0 0 10px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.dialog-actions .button {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--field-border);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: 500 15px/22px var(--font);
  cursor: pointer;
}

.dialog-actions .button:hover {
  background: var(--hover);
}

.dialog-actions .button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.dialog-actions .button.danger {
  border-color: #c62828;
  background: #c62828;
  color: var(--on-accent);
}

.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 1400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
}

.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 6px 16px;
  border-radius: 4px;
  background: var(--inverse);
  color: var(--on-inverse);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.14), 0 1px 18px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  line-height: 20px;
}

.toast-action {
  padding: 4px 6px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--accent-soft);
  font: 600 14px/20px var(--font);
  cursor: pointer;
}

.toast-action:hover {
  background: color-mix(in srgb, var(--wovia-blue-light) 8%, transparent);
}

/* recording-pill.js: a question being recorded from the toolbar (chatbot.md #101; the reference's $rt, ix:L162862–162940). */
.rec-pill {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  border: 1px solid #333;
  border-radius: 30px;
  background: #1e1e1e;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 191, 255, 0.15);
  transform: translate(-50%, -50%);
}

.rec-pill-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00bfff;
  box-shadow: 0 0 8px #00bfff;
  animation: rec-pill-pulse 1.5s infinite;
}

.rec-pill-label {
  color: #aaa;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.rec-pill-time {
  margin-left: 4px;
  color: #00bfff;
  font: 600 16px "Courier New", monospace;
}

.rec-pill-wait {
  color: #aaa;
}

@keyframes rec-pill-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* notice(): observed on languagereactor.com/help/basic#showSetupComplete=true. */
.notice {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1400;
  width: min(290px, calc(100vw - 32px));
  padding: 12px 40px 14px 12px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px rgba(0, 0, 0, 0.14), 0 1px 18px rgba(0, 0, 0, 0.12);
}

.notice-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
}

.notice-message {
  margin: 0;
  font-size: 13px;
  line-height: 19px;
}

.notice-close {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--on-accent);
  cursor: pointer;
}

.notice-close:hover {
  background: color-mix(in srgb, var(--on-accent) 16%, transparent);
}

/* "Cài đặt mức từ vựng" (vocab-level.js), the reference's modal layout ---- */

.dialog.lr-level-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  background: var(--surface-raised);
}

.lr-level-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 0 24px;
}

.lr-level-title .dialog-title {
  margin: 0;
}

.lr-level-close {
  border: 0;
  background: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
}

.lr-level-body {
  display: flex;
  height: 530px;
  max-height: calc(100vh - 170px);
  padding: 20px 24px 0;
  font-size: 16px;
  line-height: 1.5;
}

.lr-level-left {
  display: flex;
  flex: 0 0 460px;
  flex-direction: column;
  min-width: 0;
}

.lr-level-left > p {
  margin: 0;
}

.lr-level-words {
  flex-grow: 1;
  margin: 15px 0 0;
  overflow: auto;
  background: var(--field-bg);
}

.lr-level-row {
  position: relative;
  display: flex;
  align-items: center;
  border-bottom: 3px solid color-mix(in srgb, var(--ink) 6%, transparent);
  background: var(--surface);
  cursor: pointer;
}

.lr-level-row.is-hovered {
  background: color-mix(in srgb, var(--ink) 6%, var(--surface));
}

.lr-level-row.is-selected {
  border-bottom: 3px dashed #9cffcd;
}

.lr-level-rank {
  flex: 0 0 44px;
  padding-bottom: 2px;
  font-size: 0.8em;
  text-align: center;
  opacity: 0.3;
}

.lr-level-cells {
  display: flex;
  flex-grow: 1;
  flex-wrap: wrap;
  padding: 3px 15px 6px 6px;
}

.lr-level-word {
  width: 33%;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  pointer-events: none;
}

.lr-level-reading {
  display: block;
  font-size: 0.7em;
  opacity: 0.7;
}

.lr-level-start {
  flex-grow: 1;
  padding: 10px;
  text-align: center;
  opacity: 0.6;
}

.lr-level-right {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  padding: 0 0 0 20px;
}

.lr-level-right h4 {
  margin: 0 0 12px;
  text-align: center;
}

.lr-level-example {
  flex-grow: 1;
  overflow: auto;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--ink) 27%, transparent);
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.7;
}

.lr-level-line {
  margin: 0 0 12px;
}

.lr-level-switches {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 16px 24px 8px;
}

.lr-level-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.lr-level-muted {
  opacity: 0.6;
}

.lr-level-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  gap: 12px;
}

.lr-level-actions {
  justify-content: center;
  margin: 0;
  padding: 15px;
}

.lr-level-dialog .field-error {
  margin: 8px 24px 0;
}
