:root {
  color-scheme: light;
  --ink: #142326;
  --muted: #657170;
  --paper: #fbfaf6;
  --panel: #ffffff;
  --rule: #d8ddd8;
  --wash: #e7f1ea;
  --green: #2f7d58;
  --deep: #193d29;
  --gold: #f5c15c;
  --rose: #df6f61;
  --shadow: 0 18px 44px rgba(20, 35, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-nav {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand,
.site-links a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-links a {
  color: var(--muted);
  font-size: 0.88rem;
}

.site-links a:hover {
  color: var(--green);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.topbar,
.game-grid,
.result-bar,
.history-panel,
.mode-row {
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  border-radius: 0;
  background: var(--deep);
  color: #fff;
  padding: 30px;
  box-shadow: 0 18px 44px rgba(20, 35, 38, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  filter: drop-shadow(0 12px 18px rgba(16, 32, 39, 0.22));
}

.brand-mark rect {
  fill: rgba(255, 255, 255, 0.12);
}

.brand-mark circle {
  fill: #83c795;
}

.brand-copy {
  min-width: 0;
}

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

.back-link,
.text-link {
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.08);
}

.back-link:hover,
.text-link:hover {
  color: var(--gold);
  text-decoration: none;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: var(--gold);
}

h1,
h2 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  color: inherit;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: 0;
}

h2 {
  font-size: 1.18rem;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(74px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.score-strip > div,
.facts > div,
.result-bar > div {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 12px;
}

.topbar .score-strip > div {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.score-strip span,
.facts span,
.result-bar span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .score-strip span {
  color: rgba(255, 255, 255, 0.7);
}

.score-strip strong,
.facts strong,
.result-bar strong {
  display: block;
  margin-top: 3px;
  font-size: 1.3rem;
}

.topbar .score-strip strong {
  color: #fff;
}

.mode-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mode,
.secondary-button,
.primary-button,
.icon-button {
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.mode {
  min-height: 40px;
  padding: 0 14px;
  font-weight: 760;
}

.mode:hover,
.secondary-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 125, 88, 0.55);
}

.mode.is-active {
  background: var(--deep);
  border-color: var(--deep);
  color: white;
  box-shadow: 0 10px 24px rgba(20, 35, 38, 0.18);
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.triangle-panel,
.context-panel,
.history-panel,
.result-bar {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.triangle-panel,
.history-panel {
  padding: 18px;
}

.context-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-head.compact {
  align-items: center;
  margin-bottom: 10px;
}

.pill {
  border-radius: 8px;
  background: var(--deep);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  padding-bottom: 3px;
}

.triangle-table {
  width: 100%;
  min-width: 660px;
  border-collapse: separate;
  border-spacing: 0;
}

.triangle-table th,
.triangle-table td {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 13px 12px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.triangle-table th:first-child,
.triangle-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  z-index: 1;
  background: #f7faf7;
  font-weight: 800;
}

.triangle-table thead th {
  background: #eef4ef;
  color: var(--deep);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.triangle-table thead th:first-child {
  z-index: 2;
}

.triangle-table tr:first-child th:first-child {
  border-top-left-radius: 8px;
}

.triangle-table tr:first-child th:last-child {
  border-top-right-radius: 8px;
}

.triangle-table td.is-target {
  background: #fff3d9;
  color: #8e5218;
  font-size: 1.08rem;
  font-weight: 900;
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.triangle-table td.is-current {
  background: #e7f1ea;
  font-weight: 900;
}

.triangle-table td.is-hidden {
  color: #a7b1af;
  background: #f7f5ef;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.facts strong {
  font-size: 1rem;
  line-height: 1.2;
}

.facts .source-fact {
  grid-column: 1 / -1;
}

.ldf-card,
.pick-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fffefa;
  padding: 14px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.pick-card:not(.is-locked) {
  cursor: text;
}

.pick-card:hover {
  border-color: rgba(47, 125, 88, 0.5);
}

.pick-card.is-picked {
  background: #fff8e7;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(245, 193, 92, 0.36);
}

.average {
  border-radius: 8px;
  background: var(--wash);
  color: var(--deep);
  padding: 8px 10px;
  font-size: 1rem;
}

.ldf-list {
  display: grid;
  gap: 7px;
}

.ldf-row {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(216, 221, 216, 0.95);
  border-radius: 8px;
  background: #f7f8f4;
  color: var(--ink);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 62px 18px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.ldf-row:not(:disabled) {
  cursor: pointer;
}

.ldf-row:hover:not(:disabled) {
  background: #f0faf3;
  border-color: rgba(47, 125, 88, 0.5);
  transform: translateX(2px);
}

.ldf-row:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.ldf-row.is-picked {
  background: #fff8e7;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(245, 193, 92, 0.36);
}

.ldf-row:disabled {
  cursor: default;
  opacity: 0.88;
}

.ldf-row .ldf-year {
  font-size: 0.78rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.ldf-row .bar {
  position: relative;
  height: 16px;
  border: 1px solid rgba(216, 221, 216, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #eef4ef 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(20, 35, 38, 0.12);
}

.ldf-row .bar::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((var(--fill, 0.5) * 100%) - 4px);
  min-width: 10px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.22) 0 25%, transparent 25% 50%, rgba(255,255,255,0.22) 50% 75%, transparent 75%),
    linear-gradient(90deg, #2f7d58 0%, #58b884 100%);
  background-size: 14px 14px, 100% 100%;
  box-shadow: 0 0 10px rgba(47, 125, 88, 0.22);
}

.ldf-row .bar::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: calc(var(--avg, 0.5) * 100%);
  width: 2px;
  transform: translateX(-1px);
  border-radius: 2px;
  background: rgba(20, 35, 38, 0.48);
}

.ldf-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.ldf-row .pick-cue {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e7f1ea;
  color: var(--green);
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
}

.ldf-row.is-picked .pick-cue {
  background: var(--deep);
  color: #fff;
}

.ldf-row:disabled .pick-cue {
  opacity: 0.35;
}

.benchmarks {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.benchmark-row {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(216, 221, 216, 0.95);
  color: var(--ink);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 62px 18px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  text-align: left;
  border-radius: 8px;
  background: #f1f5f1;
  padding: 6px 8px;
  font-size: 0.88rem;
}

.benchmark-row.is-selectable {
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.benchmark-row.is-selectable:hover {
  background: #f0faf3;
  border-color: rgba(47, 125, 88, 0.5);
  transform: translateX(2px);
}

.benchmark-row:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.benchmark-row.is-picked {
  background: #fff8e7;
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(245, 193, 92, 0.75);
}

.benchmark-row:disabled {
  cursor: default;
  opacity: 0.88;
}

.benchmark-row .benchmark-label,
.manual-pick-row .manual-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.benchmark-row .bar,
.manual-pick-row .bar {
  position: relative;
  display: block;
  height: 16px;
  border: 1px solid rgba(216, 221, 216, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #fff 0%, #eef4ef 100%);
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(20, 35, 38, 0.12);
}

.benchmark-row .bar::before,
.manual-pick-row .bar::before {
  content: "";
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc((var(--fill, 0.5) * 100%) - 4px);
  min-width: 10px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.22) 0 25%, transparent 25% 50%, rgba(255,255,255,0.22) 50% 75%, transparent 75%),
    linear-gradient(90deg, #2f7d58 0%, #58b884 100%);
  background-size: 14px 14px, 100% 100%;
  box-shadow: 0 0 10px rgba(47, 125, 88, 0.22);
}

.benchmark-row .bar::after,
.manual-pick-row .bar::after {
  content: "";
  position: absolute;
  top: 1px;
  bottom: 1px;
  left: calc(var(--avg, 0.5) * 100%);
  width: 2px;
  transform: translateX(-1px);
  border-radius: 2px;
  background: rgba(20, 35, 38, 0.48);
}

.benchmark-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.benchmark-row .pick-cue {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e7f1ea;
  color: var(--green);
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
}

.benchmark-row.is-picked .pick-cue {
  background: var(--deep);
  color: #fff;
}

.benchmark-row:disabled .pick-cue {
  opacity: 0.35;
}

.manual-pick-row {
  width: 100%;
  border: 1px solid rgba(216, 221, 216, 0.95);
  border-radius: 8px;
  background: #f7f8f4;
  color: var(--ink);
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 62px 18px;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
  margin-bottom: 10px;
  text-align: left;
}

.pick-card.is-picked .manual-pick-row {
  background: #fff8e7;
  border-color: var(--gold);
}

.manual-pick-row strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.manual-pick-row .pick-cue {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #e7f1ea;
  color: var(--green);
  font-weight: 900;
  font-size: 0.82rem;
  line-height: 1;
}

.pick-card.is-picked .manual-pick-row .pick-cue {
  background: var(--deep);
  color: #fff;
}

.pick-card label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pick-controls {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  margin-bottom: 12px;
}

.icon-button {
  width: 44px;
  height: 44px;
  font-size: 1.35rem;
  font-weight: 900;
}

#ldf-input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 12px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 850;
  color: var(--ink);
  background: #fff;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  font-weight: 850;
}

.primary-button {
  width: 100%;
  margin-top: 12px;
  border-color: var(--deep);
  background: var(--deep);
  color: white;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 24px rgba(20, 35, 38, 0.22);
}

.primary-button:disabled,
.secondary-button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.secondary-button.small {
  min-height: 34px;
  padding: 0 10px;
}

.result-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 12px;
}

.result-bar[hidden] {
  display: none;
}

.result-bar .secondary-button {
  height: 100%;
}

.history-panel {
  margin-top: 16px;
}

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

.scorecard li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 78px 84px;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  background: #f7f8f4;
  padding: 9px 10px;
}

.scorecard .empty {
  display: block;
  color: var(--muted);
}

.scorecard strong {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 880px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .score-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .result-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-bar .secondary-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 540px) {
  .site-nav {
    width: min(100vw - 20px, 1180px);
    align-items: flex-start;
    flex-direction: column;
  }

  .site-links {
    justify-content: flex-start;
    gap: 10px 12px;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 14px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
  }

  .facts,
  .score-strip {
    grid-template-columns: 1fr;
  }

  .scorecard li {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .scorecard strong {
    text-align: left;
  }
}

/* ═══════════════════════════════════════════════
   SITE HEADER
═══════════════════════════════════════════════ */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
}

.site-header-inner {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
}

.site-brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--gold);
  font-size: 0.78rem;
  letter-spacing: 0;
  flex-shrink: 0;
}

.site-brand-name {
  font-size: 1rem;
}

.site-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.site-links a:hover { color: var(--green); }

/* ═══════════════════════════════════════════════
   SITE FOOTER
═══════════════════════════════════════════════ */

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--rule);
  background: var(--deep);
  color: rgba(255,255,255,0.85);
}

.site-footer-inner {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 32px;
  display: grid;
  gap: 20px;
}

.footer-brand .site-brand { color: #fff; }
.footer-brand .site-brand-mark { background: rgba(255,255,255,0.15); color: var(--gold); }

.footer-tagline {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ═══════════════════════════════════════════════
   GLOBAL LEADERBOARD
═══════════════════════════════════════════════ */

.leaderboard-panel {
  margin-top: 16px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.lb-row {
  display: grid;
  grid-template-columns: 40px minmax(0,1fr) 72px 90px 64px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  background: #f7f8f4;
  padding: 8px 12px;
  font-size: 0.9rem;
}

.lb-row--top {
  background: linear-gradient(135deg, #fffbe8 0%, #f0faf3 100%);
  border: 1px solid #e8d98a;
}

.lb-medal {
  font-size: 1.2rem;
  text-align: center;
}

.lb-rank {
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.lb-name {
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-mode {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.lb-mode--paid     { background: #e7f1ea; color: var(--deep); }
.lb-mode--incurred { background: #fff3d9; color: #7a4a10; }

.lb-date {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
}

.lb-score {
  text-align: right;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.lb-empty {
  color: var(--muted);
  padding: 12px 0;
  font-style: italic;
}

/* ── Name-entry modal ── */

.lb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,35,38,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.lb-modal-overlay[hidden] { display: none; }

.lb-modal {
  background: var(--panel);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 64px rgba(20,35,38,0.28);
}

.lb-modal .eyebrow {
  color: var(--green);
  margin-bottom: 6px;
}

.lb-modal h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.lb-modal-sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

#lb-name-input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 14px;
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  margin-bottom: 14px;
}

#lb-name-input:focus {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-color: transparent;
}

.lb-modal-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.lb-modal-actions .primary-button {
  margin-top: 0;
}

/* ── Responsive tweaks ── */

@media (max-width: 880px) {
  .lb-row {
    grid-template-columns: 36px minmax(0,1fr) 64px 64px;
  }
  .lb-date { display: none; }
}

@media (max-width: 540px) {
  .site-header-inner {
    width: calc(100vw - 20px);
    flex-direction: column;
    align-items: flex-start;
  }
  .site-links { justify-content: flex-start; gap: 10px 12px; }

  .lb-row {
    grid-template-columns: 34px minmax(0,1fr) 54px;
  }
  .lb-mode { display: none; }
}
