:root {
  --bg: #f3f5f7;
  --ink: #1a2332;
  --muted: #5b6573;
  --panel: #ffffff;
  --line: #e2e8ee;
  --accent: #0f4c5c;
  --accent-soft: #d7e6ea;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --ok: #3f6212;
  --serif: "Source Serif 4", "Libre Baskerville", Georgia, serif;
  --display: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.lr-offline-banner {
  background: #3d4a5c;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 8px 12px;
}

.lr-offline-banner[hidden] {
  display: none !important;
}

.lr-cache-banner {
  background: #e8f0fe;
  color: #1a3a6b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  border-bottom: 1px solid #c5d4f0;
}

.lr-cache-banner[hidden] {
  display: none !important;
}

.lr-cache-banner.is-done {
  background: #eef6dc;
  color: #3f6212;
  border-bottom-color: #c5d4a8;
}

body {
  font-family: var(--serif);
  color: var(--ink);
  /* Soft paper: cool gray-blue wash + faint grain for long reading */
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 8% -5%, rgba(15, 76, 92, 0.07), transparent 55%),
    radial-gradient(700px 380px at 92% 8%, rgba(37, 99, 235, 0.04), transparent 50%),
    linear-gradient(180deg, #f7f9fb 0%, var(--bg) 42%, #eef2f5 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.lr-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(247, 249, 251, 0.88);
  backdrop-filter: blur(10px);
}

.lr-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lr-badge {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--accent);
}

.lr-user-label {
  font-size: 12px;
  color: var(--muted);
}

.lr-timer-wrap,
.lr-speed-wrap {
  position: relative;
}

.lr-timer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
  padding: 5px 10px;
  cursor: pointer;
}

.lr-timer-btn:hover,
.lr-timer-btn.is-open {
  color: var(--ink);
  border-color: #cfc6b8;
}

.lr-timer-btn.is-active {
  color: var(--accent);
  border-color: #9cb8c0;
  background: var(--accent-soft);
}

.lr-timer-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.lr-icon-only-btn {
  padding: 5px;
}

.lr-icon-only-btn.is-loading .lr-timer-icon {
  animation: lr-spin 0.8s linear infinite;
}

@keyframes lr-spin {
  to { transform: rotate(360deg); }
}

.lr-timer-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 168px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(28, 25, 23, 0.14);
  padding: 10px;
}

.lr-timer-menu-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.lr-timer-options {
  display: grid;
  gap: 4px;
  max-height: min(60vh, 420px);
  overflow: auto;
}

.lr-timer-options button {
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  padding: 7px 8px;
  cursor: pointer;
  color: var(--ink);
}

.lr-timer-options button:hover,
.lr-timer-options button.is-selected {
  background: #f1ebe1;
}

.lr-btn-text {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.lr-btn-text:hover { color: var(--ink); }

.lr-btn-primary {
  border: 0;
  background: var(--primary);
  color: #fff;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
}

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

.lr-btn-primary:disabled { opacity: 0.55; cursor: wait; }

.lr-main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.lr-kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.lr-hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.lr-lead {
  color: var(--muted);
  max-width: 42rem;
  margin-bottom: 28px;
}

.lr-lesson-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  row-gap: 10px;
  margin: 8px 0 0;
  width: 100%;
  max-width: 36rem;
}

.lr-lesson-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.lr-lesson-bar select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--panel);
  font: inherit;
  font-size: 15px;
  padding: 8px 12px;
  color: var(--ink);
}

.lr-article {
  margin: 28px 0 36px;
  padding: 22px clamp(16px, 3vw, 28px);
  background: var(--panel);
  border: 1px solid var(--line);
}

/* Mobile: lesson card full-bleed to phone edges for more reading space */
@media (max-width: 640px) {
  .lr-main {
    width: 100%;
    box-sizing: border-box;
    padding: 28px 0 64px;
  }

  .lr-hero,
  .lr-vocab-section {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lr-article {
    margin: 20px 0 28px;
    padding: 18px 14px;
    border-left: none;
    border-right: none;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
  }
}

.lr-article-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.lr-article-head h2 {
  font-family: var(--display);
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 400;
  margin-bottom: 6px;
}

.lr-article-desc {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 14px;
}

.lr-article-player {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.lr-article-player .lr-btn-text {
  font-weight: 700;
}

.lr-ab-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 8px;
}

.lr-ab-mark {
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink);
}

.lr-ab-mark:hover {
  border-color: #cfc6b8;
}

.lr-ab-a {
  color: #6b7a2e;
}

.lr-ab-a.is-set {
  background: #f3f6e4;
  border-color: #b8c46a;
}

.lr-ab-a.is-editing {
  outline: 2px solid #6b7a2e;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(107, 122, 46, 0.18);
}

.lr-ab-b {
  color: #3d4a5c;
}

.lr-ab-b.is-set {
  background: #eef1f5;
  border-color: #b7c0cc;
}

.lr-ab-b.is-editing {
  outline: 2px solid #3d4a5c;
  outline-offset: 1px;
  box-shadow: 0 0 0 3px rgba(61, 74, 92, 0.16);
}

.lr-ab-loops-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.lr-ab-loops-wrap select {
  font: inherit;
  font-size: 13px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.lr-ab-status {
  font-size: 12px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.lr-ab-clear {
  margin-left: auto;
  font-weight: 700;
}

.lr-lesson-time {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.lr-lesson-seek {
  width: 100%;
  accent-color: var(--accent);
  position: relative;
  z-index: 1;
}

.lr-ab-seek-track {
  position: relative;
  height: 0;
  margin-top: -10px;
  margin-bottom: 10px;
  pointer-events: none;
}

.lr-ab-seek-range {
  position: absolute;
  left: 0;
  top: -8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(107, 122, 46, 0.35);
  z-index: 0;
}

.lr-article-body {
  max-height: min(62vh, 640px);
  overflow: auto;
  padding-right: 6px;
}

.lr-article.is-curriculum .lr-article-body {
  max-height: min(72vh, 900px);
}

.lr-curriculum-body {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

.lr-curriculum-body h1,
.lr-curriculum-body h2,
.lr-curriculum-body h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.25;
  margin: 1.2em 0 0.45em;
}

.lr-curriculum-body h1 {
  font-size: clamp(22px, 3.4vw, 30px);
  margin-top: 0;
}

.lr-curriculum-body h2 {
  font-size: clamp(18px, 2.8vw, 24px);
}

.lr-curriculum-body .lr-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin: 1.2em 0 0.45em;
  /* Same size as plain H2 "Lesson Information" — do NOT inherit body 15px */
  font-size: clamp(18px, 2.8vw, 24px);
}

.lr-curriculum-body .lr-section-head .lr-section-title {
  margin: 0;
  color: var(--primary);
  /* Override global .lr-section-title (22px) — match Lesson Information H2 */
  font-size: clamp(18px, 2.8vw, 24px);
  font-weight: 400;
  line-height: 1.25;
  font-family: var(--display);
}

.lr-collapse-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  height: 1.15em;
  min-width: 18px;
  min-height: 18px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
}

.lr-collapse-btn:hover,
.lr-section-head:hover .lr-collapse-btn {
  color: var(--primary-hover);
}

.lr-collapse-icon {
  width: 0.9em;
  height: 0.9em;
  min-width: 14px;
  min-height: 14px;
  display: block;
  transition: transform 0.15s ease;
}

.lr-collapse-btn[aria-expanded="false"] .lr-collapse-icon {
  transform: rotate(-90deg);
}

.lr-section-body:not([hidden]) {
  display: block;
}

.lr-curriculum-body .lr-vocab-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  margin: 1.1em 0 0.4em;
}

.lr-curriculum-body .lr-vocab-item-head .lr-section-title {
  margin: 0;
  color: #ea580c;
  font-size: 15px;
  font-weight: 700;
}

.lr-collapse-btn-orange {
  color: #ea580c;
}

.lr-collapse-btn-orange:hover,
.lr-vocab-item-head:hover .lr-collapse-btn-orange {
  color: #c2410c;
}

.lr-vocab-item-body:not([hidden]) {
  display: block;
}

.lr-curriculum-body h3 {
  font-size: 17px;
  font-weight: 600;
}

.lr-curriculum-body p {
  margin: 0 0 0.85em;
}

.lr-curriculum-body ul,
.lr-curriculum-body ol {
  margin: 0 0 0.95em;
  padding-left: 1.35em;
}

.lr-curriculum-body li {
  margin: 0.25em 0;
}

.lr-curriculum-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.2em 0;
}

.lr-curriculum-body strong {
  font-weight: 700;
}

.lr-curriculum-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: #f1f4f7;
  padding: 0.08em 0.35em;
}

.lr-md-table-wrap {
  overflow-x: auto;
  margin: 0 0 1em;
}

.lr-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.lr-md-table th,
.lr-md-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.lr-md-table th {
  background: #f6f3ee;
  font-weight: 600;
}

.lr-article-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
}

.lr-article-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-top: 3px;
}

.lr-article-line .lr-article-speak,
.lr-article-line .lr-article-vi-btn {
  flex: 0 0 auto;
  margin-top: 0;
}

.lr-article-vi-btn.is-active {
  border-color: #9eb7d8;
  background: #eef4fb;
  color: #1d4f91;
}

.lr-article-vi-btn.is-loading {
  opacity: 0.55;
  cursor: wait;
}

.lr-translate-icon {
  width: 15px;
  height: 15px;
  display: block;
}

.lr-article-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lr-article-line .lr-article-title-line,
.lr-article-line .lr-article-h,
.lr-article-line .lr-article-p {
  flex: 0 0 auto;
  min-width: 0;
  margin: 0;
}

.lr-article-vi {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  font-style: italic;
  color: #5b6573;
}

.lr-article-vi[hidden] {
  display: none !important;
}

.lr-article-title-line {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.lr-article-h {
  font-weight: 600;
  color: var(--accent);
  margin-top: 6px;
}

.lr-article-p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

.lr-section-title {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 14px;
}

/* Match hero "Topic" heading height */
.lr-dict-title {
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}

.lr-dict-kicker {
  margin: 0 0 14px;
}

.lr-vocab-section {
  margin-top: 8px;
}

.lr-search-row {
  display: flex;
  gap: 10px;
}

.lr-search-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
}

.lr-search-row input,
.lr-search-wrap input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  font: inherit;
  padding: 12px 14px;
}

.lr-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(28, 25, 23, 0.12);
  max-height: min(280px, 45vh);
  overflow: auto;
}

.lr-search-suggest[hidden] {
  display: none !important;
}

.lr-search-suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  padding: 9px 14px;
  cursor: pointer;
  color: var(--ink);
}

.lr-search-suggest-item:hover,
.lr-search-suggest-item.is-active {
  background: #f3f0ea;
}

.lr-search-suggest-word {
  font-weight: 600;
}

.lr-search-suggest-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--muted);
}

.lr-filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 10px;
  align-items: stretch;
}

.lr-filter-row select {
  flex: 1 1 0;
  min-width: 0;
  width: 0; /* equal columns in a nowrap row */
  border: 1px solid var(--line);
  background: var(--panel);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 8px;
}

.lr-filter-row select option {
  font-weight: 400;
}

.lr-filter-row select option:checked {
  font-weight: 700;
}

@media (max-width: 560px) {
  .lr-filter-row {
    gap: 6px;
  }
  .lr-filter-row select {
    font-size: 12px;
    font-weight: 700;
    padding: 9px 4px;
  }
}

.lr-meta,
.lr-progress-summary {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

.lr-progress-summary { margin-top: 4px; }

.lr-results {
  margin-top: 28px;
  display: grid;
  gap: 12px;
}

.lr-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.lr-card.is-known { border-color: #c5d4a8; background: #fbfef6; }
.lr-card.is-learning { border-color: #c9d9de; background: #f7fbfc; }

.lr-card-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 6px;
}

.lr-word {
  font-family: var(--display);
  font-size: 18px;
}

.lr-pos,
.lr-level,
.lr-ipa {
  font-size: 13px;
  color: var(--muted);
}

.lr-ipa-block {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: center;
}

.lr-ipa {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.lr-ipa-tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
  text-transform: uppercase;
}

.lr-ipa-us .lr-ipa-tag { color: #c23b3b; }
.lr-ipa-uk .lr-ipa-tag { color: #2f6fad; }

.lr-speak-group {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-left: 4px;
}

.lr-speak {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 9px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1.3;
}

.lr-speaker-icon,
.lr-pause-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  display: block;
}

.lr-speaker-icon path:first-child,
.lr-pause-icon rect {
  fill: currentColor;
}

.lr-icon-play,
.lr-icon-pause {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.lr-icon-pause {
  display: none;
}

.lr-speak.is-playing .lr-icon-play {
  display: none;
}

.lr-speak.is-playing .lr-icon-pause {
  display: inline-flex;
}

.lr-speak.is-paused .lr-icon-play {
  display: inline-flex;
}

.lr-speak.is-paused .lr-icon-pause {
  display: none;
}

.lr-speak-ipa {
  margin-right: 2px;
}

.lr-speak-us {
  color: #c23b3b;
  border-color: #e3b6b6;
}

.lr-speak-us:hover {
  color: #a82828;
  border-color: #d08a8a;
  background: #fff7f7;
}

.lr-speak-uk {
  color: #2f6fad;
  border-color: #b7cce3;
}

.lr-speak-uk:hover {
  color: #1f5a93;
  border-color: #8fb0d4;
  background: #f5f9fd;
}

.lr-speak-label { color: inherit; }

.lr-speak:hover { border-color: #cfc6b8; }
.lr-speak:disabled { opacity: 0.55; cursor: wait; }
.lr-speak.is-playing {
  background: var(--accent-soft);
  border-color: #9cb8c0;
  color: var(--ink);
}

.lr-speak.is-paused {
  background: #f0ebe3;
  border-color: #cfc6b8;
  opacity: 0.85;
}

.lr-speak-icon-only {
  flex: 0 0 auto;
  padding: 4px;
  margin-top: 1px;
  color: var(--accent);
  border-color: #c9d9de;
  background: #f7fbfc;
}

.lr-speak-icon-only:hover {
  color: var(--ink);
  border-color: #9cb8c0;
  background: #eef6f8;
}

.lr-speak-icon-only .lr-speaker-icon,
.lr-speak-icon-only .lr-pause-icon,
.lr-speak-icon-only .lr-repeat-icon {
  width: 15px;
  height: 15px;
}

.lr-ex-controls {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  margin-top: 1px;
}

/* Mobile: stack speak + repeat so example text gets more width */
@media (max-width: 768px) {
  .lr-ex-controls {
    flex-direction: column;
    align-items: center;
    gap: 3px;
  }

  .lr-ex-row {
    gap: 6px;
  }

  .lr-ex-controls .lr-speak-icon-only {
    padding: 3px;
    margin-top: 0;
  }
}

.lr-speak-repeat.is-active {
  color: #8a4b12;
  border-color: #d9b48c;
  background: #fff6eb;
}

.lr-vi {
  font-size: 16px;
  margin: 4px 0 8px;
}

.lr-meaning {
  margin: 14px 0 0;
}

.lr-meaning .lr-sense-def {
  border-left: 3px solid #60a5fa;
  padding-left: 10px;
}

.lr-meaning .lr-sense-label,
.lr-meaning .lr-sense-endef,
.lr-meaning .lr-sense-vi {
  color: #1d4ed8;
}

.lr-meaning .lr-sense-vi {
  margin: 2px 0 0;
  display: inline;
}

.lr-more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-width: 4.5rem;
  padding: 6px 10px;
  border: 1px solid #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
}

.lr-more-btn:hover {
  background: #dbeafe;
}

.lr-more-btn[aria-expanded="true"] {
  background: #dbeafe;
  border-color: #60a5fa;
}

.lr-oald-panel {
  margin-top: 12px;
  padding: 12px 12px 4px;
  border: 1px solid #dbe3ea;
  background: #fbfcfd;
}

.lr-oald-sense + .lr-oald-sense {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.lr-oald-sense-top {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 6px;
  align-items: start;
}

.lr-oald-sense-top > .lr-oald-num {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: start;
}

.lr-oald-num {
  font-size: 22px;
  font-weight: 700;
  color: #2563eb;
  line-height: 1;
}

.lr-oald-sense-top > .lr-oald-cefr,
.lr-oald-sense-top > .lr-oald-cefr-spacer {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.lr-oald-cefr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.lr-oald-cefr-spacer {
  display: block;
  width: 28px;
  height: 22px;
}

.lr-oald-sense-top > .lr-oald-def-en {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
}

.lr-oald-sense-top > .lr-oald-sense-collapse,
.lr-oald-sense-top > .lr-oald-sense-collapse-spacer {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
  align-self: start;
}

.lr-oald-sense-collapse-spacer {
  display: block;
  width: 22px;
  height: 22px;
}

.lr-oald-sense-top > .lr-oald-def-vi,
.lr-oald-sense-top > .lr-oald-def-vi-spacer {
  grid-column: 3;
  grid-row: 2;
  margin: 0;
}

.lr-oald-def-vi-spacer {
  display: block;
  min-height: 1px;
}

.lr-oald-sense-collapse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.lr-oald-sense-collapse:hover {
  background: #dbeafe;
  border-color: #2563eb;
}

.lr-oald-sense-details {
  margin-top: 8px;
}

.lr-oald-sense.is-collapsed .lr-oald-sense-details,
.lr-oald-sense-details[hidden] {
  display: none !important;
}

.lr-oald-def-en {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

.lr-oald-def-vi {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 0;
  color: #6b7280;
  font-size: 13px;
}

.lr-oald-related {
  margin-top: 8px;
}

.lr-oald-related-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.lr-oald-related-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lr-oald-related-chip {
  display: inline-block;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
}

.lr-oald-related-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lr-oald-related--syn .lr-oald-related-chip {
  border-color: #c5d4a8;
  background: #f7fbef;
}

.lr-oald-related--syn .lr-oald-related-chip:hover {
  border-color: #8fa85a;
  background: #eef6dc;
}

.lr-oald-related--ant .lr-oald-related-chip {
  border-color: #e2c4c4;
  background: #fdf7f7;
}

.lr-oald-related--ant .lr-oald-related-chip:hover {
  border-color: #c48a8a;
  background: #f8ecec;
}

/* Related-word child card modal */
.lr-related-panel {
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lr-related-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
}

.lr-related-back {
  font-weight: 700;
  color: var(--accent);
}

.lr-related-back:hover {
  color: var(--ink);
}

.lr-related-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 14px 10px;
  overflow: auto;
  max-height: min(78vh, 820px);
}

.lr-related-card .lr-card-head {
  margin-bottom: 10px;
}

.lr-related-body {
  display: block !important;
}

.lr-related-pos {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.lr-related-pos-block:first-child .lr-related-pos {
  margin-top: 0;
}

.lr-related-loading,
.lr-related-error {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 0;
}

.lr-oald-vi-icon {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin-top: 3px;
  border: 1.5px solid #9ca3af;
  border-radius: 2px;
  background:
    linear-gradient(#9ca3af, #9ca3af) center 4px / 7px 1.5px no-repeat,
    linear-gradient(#9ca3af, #9ca3af) center 7px / 7px 1.5px no-repeat;
}

.lr-oald-examples {
  margin-top: 12px;
}

.lr-oald-examples-head {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 8px;
}

.lr-oald-ex-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lr-oald-ex-en,
.lr-oald-ex-vi {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 8px;
  align-items: start;
}

.lr-oald-ex-vi {
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
}

.lr-oald-ex-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  min-height: 22px;
}

.lr-oald-ex-icon .lr-oald-vi-icon {
  margin-top: 0;
}

.lr-oald-ex-en p,
.lr-oald-ex-vi p {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
}

.lr-oald-ex-vi p {
  font-size: 13px;
  color: #6b7280;
}

.lr-oald-hw {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lr-oald-verbforms {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fafafa;
}

.lr-oald-verbforms-head {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
}

.lr-oald-verbforms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.lr-oald-verbforms-list li {
  display: grid;
  grid-template-columns: minmax(7.5rem, 34%) minmax(5rem, 28%) 1fr;
  gap: 8px 12px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.35;
}

.lr-oald-vf-label {
  color: #6b7280;
}

.lr-oald-vf-word {
  font-weight: 600;
  color: var(--ink);
}

.lr-oald-vf-ipa {
  color: #6b7280;
  font-family: "Charis SIL", "Doulos SIL", "Segoe UI", "Noto Sans", sans-serif;
  font-size: 13px;
}

.lr-oald-idioms {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.lr-oald-idioms-head {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 2px solid #111;
  margin-bottom: 12px;
}

.lr-oald-idiom + .lr-oald-idiom {
  margin-top: 14px;
}

.lr-oald-idiom-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: start;
}

.lr-oald-idiom-phrase {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.lr-oald-idiom-label {
  margin: 2px 0 0;
  font-size: 12px;
  font-style: italic;
  color: #6b7280;
}

.lr-oald-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.lr-oald-translating {
  margin: 10px 0 0;
  color: var(--accent, #2563eb);
  font-size: 13px;
  font-style: italic;
}

/* —— LDOCE / LC9000 progressive panels —— */
.lr-ldoce-panel-inner {
  display: grid;
  gap: 14px;
  margin-top: 4px;
}

.lr-ldoce-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.lr-ldoce-word {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
}

.lr-ldoce-pron {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lr-ldoce-level {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.lr-ldoce-dots {
  letter-spacing: 1px;
  color: #b45309;
  font-size: 14px;
}

.lr-ldoce-freq {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: #e8eef6;
  color: #1e3a5f;
  font-size: 12px;
  font-weight: 600;
}

.lr-ldoce-section {
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding-top: 10px;
}

.lr-ldoce-section-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #475569;
}

.lr-ldoce-sense + .lr-ldoce-sense {
  margin-top: 12px;
}

.lr-ldoce-sense-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  align-items: start;
}

.lr-ldoce-sense-meta {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}

.lr-ldoce-ex-list {
  margin: 6px 0 0 1.6em;
  padding: 0;
  color: #334155;
  font-size: 14px;
  list-style: disc;
}

.lr-ldoce-ex-list > li,
.lr-ldoce-line-list > li.lr-ldoce-ex,
.lr-ldoce-colloc-examples > li.lr-ldoce-ex {
  margin: 6px 0;
}

.lr-ldoce-ex-en {
  line-height: 1.45;
}

.lr-ldoce-ex-vi {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 3px;
  margin-bottom: 2px;
  padding: 2px 0 2px 2px;
  font-size: 13px;
  line-height: 1.45;
  color: #1d4ed8;
  font-style: italic;
}

.lr-ldoce-ex-vi .lr-oald-vi-icon {
  flex: 0 0 auto;
  margin-top: 2px;
}

.lr-ldoce-colloc-pattern .lr-ldoce-ex-vi {
  margin-top: 2px;
  font-weight: 400;
}

.lr-ldoce-en-vi-block + .lr-ldoce-en-vi-block {
  margin-top: 6px;
}

.lr-ldoce-word-family {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.lr-ldoce-word-family-line {
  margin: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: #0f172a;
}

.lr-ldoce-plain-list.lr-ldoce-line-list {
  list-style: none;
  padding-left: 0;
}

.lr-ldoce-patterns,
.lr-ldoce-note {
  margin: 6px 0 0;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}

.lr-ldoce-k {
  font-weight: 650;
  color: #0f172a;
}

.lr-ldoce-plain-list {
  margin: 0;
  padding-left: 1.15em;
  font-size: 14px;
  line-height: 1.45;
  color: #334155;
}

.lr-ldoce-colloc-block + .lr-ldoce-colloc-block {
  margin-top: 10px;
}

.lr-ldoce-colloc-label {
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 6px;
  color: #1e293b;
}

.lr-ldoce-colloc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.lr-ldoce-colloc-pattern {
  font-size: 14px;
  line-height: 1.4;
  color: #0f172a;
}

.lr-ldoce-colloc-arrow {
  color: #64748b;
  font-size: 12px;
}

.lr-ldoce-colloc-examples {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 1.1em;
  display: grid;
  gap: 6px;
}

.lr-ldoce-colloc-examples li {
  position: relative;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
}

.lr-ldoce-colloc-examples li::before {
  content: "·";
  position: absolute;
  left: -0.85em;
  color: #94a3b8;
}

.lr-ldoce-line-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0 0 0 1.05em;
  display: grid;
  gap: 6px;
}

.lr-ldoce-line-list li {
  position: relative;
  font-size: 13.5px;
  line-height: 1.45;
  color: #334155;
}

.lr-ldoce-line-list li::before {
  content: "·";
  position: absolute;
  left: -0.85em;
  color: #94a3b8;
}

.lr-ldoce-line-list--bad li {
  color: #7f1d1d;
}

.lr-ldoce-line-list--bad li::before {
  content: "✗";
  left: -1.05em;
  color: #b91c1c;
  font-size: 12px;
}

.lr-ldoce-grammar-box + .lr-ldoce-grammar-box,
.lr-ldoce-grammar-point + .lr-ldoce-grammar-point,
.lr-ldoce-mistake + .lr-ldoce-mistake {
  margin-top: 12px;
}

.lr-ldoce-grammar-rule {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #0f172a;
}

.lr-ldoce-dont,
.lr-ldoce-say {
  margin-top: 8px;
}

.lr-ldoce-chip-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lr-ldoce-chip-list .lr-oald-related-chip {
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.35;
}

.lr-ldoce-related-block + .lr-ldoce-related-block {
  margin-top: 10px;
}

.lr-ldoce-phrv + .lr-ldoce-phrv,
.lr-ldoce-idiom + .lr-ldoce-idiom,
.lr-ldoce-mistake + .lr-ldoce-mistake {
  margin-top: 10px;
}

.lr-ldoce-phrv-head {
  margin: 0 0 4px;
  font-weight: 650;
}

.lr-senses {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.lr-sense-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.lr-sense-num {
  flex: 0 0 auto;
  min-width: 1.1em;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #1d4ed8;
}

.lr-sense-body {
  flex: 1;
  min-width: 0;
}

.lr-sense-label {
  font-size: 13px;
  color: var(--muted);
}

.lr-sense-endef {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}

.lr-sense-vi {
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.5;
}

.lr-examples {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.lr-ex-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.lr-ex-row .lr-ex {
  flex: 1;
  margin: 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.45;
}

.lr-ex {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.45;
}

.lr-ex-vi {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: italic;
  color: var(--muted);
  line-height: 1.4;
}

.lr-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.lr-card-actions .lr-more-btn {
  margin-left: auto;
}

.lr-mark {
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--muted);
}

.lr-mark:hover { color: var(--ink); border-color: #cfc6b8; }
.lr-mark.active-learning {
  background: var(--accent-soft);
  border-color: #9cb8c0;
  color: var(--accent);
}
.lr-mark.active-known {
  background: #e8f0d4;
  border-color: #a3b978;
  color: var(--ok);
}

.lr-empty {
  padding: 28px 8px;
  color: var(--muted);
}

/* Modal */
.lr-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lr-modal.open { display: flex; }

.lr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
}

.lr-modal-panel {
  position: relative;
  width: min(720px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 22px 22px 18px;
  box-shadow: 0 18px 50px rgba(28, 25, 23, 0.18);
}

.lr-admin-panel {
  width: min(1180px, 100%);
  max-height: min(92vh, 900px);
}

.lr-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.lr-modal-head h2 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.lr-modal-hint {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.lr-admin-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .lr-admin-form-grid { grid-template-columns: 1fr; }
}

.lr-admin-form label span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--muted);
}

.lr-admin-form input,
.lr-admin-form select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  padding: 10px 12px;
}

.lr-admin-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  margin-bottom: 20px;
}

.lr-admin-edit-banner {
  margin: 0 0 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1e3a5f;
  background: #e8f1fb;
  border: 1px solid #bfd4ea;
}

.lr-admin-password-label span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.lr-password-hint {
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: #1e3a5f;
  background: #e8f1fb;
  padding: 2px 8px;
  border-radius: 999px;
}

.lr-admin-password-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.lr-admin-password-row input {
  flex: 1;
  min-width: 0;
}

.lr-admin-password-row .lr-btn-text {
  flex: 0 0 auto;
  padding: 0 8px;
  align-self: center;
}

.lr-admin-form input:read-only {
  background: #f3f4f6;
  color: var(--muted);
  cursor: not-allowed;
}

.lr-admin-form.is-editing {
  outline: 1px solid #bfd4ea;
  outline-offset: 6px;
  padding: 4px;
}

.lr-form-error {
  color: #b91c1c;
  font-size: 13px;
  margin-top: 8px;
}

.lr-form-error.is-success {
  color: #166534;
}

.lr-admin-table-wrap {
  overflow: visible;
  margin-top: 8px;
}

.lr-admin-username-field-hidden {
  display: none !important;
}

.lr-admin-grid {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 4px;
  --lr-ag-header-bg: #1f4e79;
  --ag-font-family: inherit;
  --ag-font-size: 12px;
  --ag-row-height: 32px;
  --ag-header-height: 40px;
  --ag-header-background-color: var(--lr-ag-header-bg);
  --ag-header-foreground-color: #ffffff;
  --ag-odd-row-background-color: #fcfcfb;
  --ag-row-hover-color: #eef6f7;
  --ag-selected-row-background-color: #e6f2f4;
  --ag-border-color: #e5e7eb;
  --ag-header-column-separator-display: block;
  --ag-header-column-separator-height: 60%;
  --ag-header-column-separator-width: 1px;
  --ag-header-column-separator-color: rgba(255, 255, 255, 0.55);
  --ag-header-column-resize-handle-display: none;
}

.lr-admin-grid .ag-root-wrapper {
  border: none;
}

/* Only paint header chrome — do not restyle .ag-header-container / .ag-header-row
   (that breaks AG Grid column width sync between header and body). */
.lr-admin-grid .ag-header {
  background: var(--lr-ag-header-bg);
  color: #fff;
}

.lr-admin-grid .ag-header-cell {
  background: var(--lr-ag-header-bg);
  color: #fff;
}

.lr-admin-grid .ag-header-cell-label {
  justify-content: flex-start;
}

.lr-admin-grid .ag-header-cell-text {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  color: #ffffff !important;
  line-height: 1.2;
  white-space: nowrap;
}

.lr-admin-grid .ag-cell.lr-admin-col-left,
.lr-admin-grid .ag-cell.lr-admin-col-left .ag-cell-wrapper {
  justify-content: flex-start !important;
}

.lr-admin-grid .ag-cell.lr-admin-actions-cell,
.lr-admin-grid .ag-cell.lr-admin-actions-cell .ag-cell-wrapper {
  justify-content: flex-start !important;
  overflow: hidden;
}

.lr-admin-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  max-width: 100%;
}

.lr-admin-inline-select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  padding: 2px 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 3px;
}

.lr-admin-inline-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 11px;
  line-height: 1.25;
  padding: 3px 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 3px;
}

.lr-btn {
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  cursor: pointer;
  color: var(--ink);
}

.lr-btn-sm {
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.25;
  min-height: 0;
  height: auto;
  border-radius: 3px;
}

.lr-btn-secondary {
  background: #fff;
  color: #334155;
}

.lr-btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.lr-btn-danger {
  background: #fff;
  color: #b91c1c;
  border-color: #f1c0c0;
}

.lr-btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #991b1b;
}

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

.lr-admin-empty {
  padding: 24px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

/* A–B manual time dialog */
.lr-ab-time-panel {
  width: min(440px, 100%);
  max-height: none;
}

.lr-ab-time-form {
  margin-top: 12px;
}

.lr-ab-time-inputs {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.lr-ab-time-inputs label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.lr-ab-time-inputs label span {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.lr-ab-time-inputs input {
  width: 3.8em;
  text-align: center;
  font: inherit;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  padding: 10px 4px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
}

.lr-ab-time-inputs input#lr-ab-ms {
  width: 4.4em;
}

.lr-ab-time-inputs input:focus {
  outline: 2px solid rgba(107, 122, 46, 0.45);
  outline-offset: 1px;
  border-color: #b8c46a;
}

.lr-ab-time-sep {
  font-size: 20px;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 12px;
  user-select: none;
}

.lr-ab-time-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 480px) {
  .lr-ab-time-inputs {
    gap: 2px;
  }
  .lr-ab-time-inputs input {
    width: 3.2em;
    font-size: 18px;
    padding: 10px 2px;
  }
  .lr-ab-time-inputs input#lr-ab-ms {
    width: 3.8em;
  }
}

