/* Lespardy UI — inherits DingleGG style.css. Overlay keeps its own look in overlay.php. */
:root {
  --lp-neon: var(--accent, #ff495d);
  --lp-magenta: #9b7dff;
  --lp-gold: #ffc857;
  --lp-lime: #5ee2a0;
  --lp-coral: var(--accent, #ff495d);
  --lp-panel: color-mix(in srgb, var(--glass, #111a24) 92%, transparent);
  --lp-stroke: var(--glass-border, #263244);
  --lp-font: inherit;
  --lp-display: inherit;
}

* { box-sizing: border-box; }

.lp-wrap a:not(.lp-btn):not(.lp-footer-powered):not(.lp-cell) {
  color: var(--accent, #ff495d);
}
.lp-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 32px;
  width: 100%;
  color: var(--text, #e7edf5);
}
.lp-gate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(70vh, 640px);
}
.lp-gate .lp-hero {
  margin-bottom: 0;
}
.lp-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}
.lp-kicker {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--accent, #ff495d);
  font-weight: 800;
}
.lp-title {
  font-family: var(--lp-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin: 0;
  color: var(--text, #e7edf5);
  letter-spacing: 0.02em;
}
.lp-sub {
  color: var(--muted, #a9b5c7);
  max-width: 54ch;
  line-height: 1.45;
  margin: 0;
}

/* —— Home landing —— */
.lp-home {
  max-width: 720px;
  padding-top: 28px;
  padding-bottom: 48px;
}
.lp-home-hero {
  display: grid;
  gap: 12px;
  margin-bottom: 36px;
}
.lp-home-hero .lp-title {
  font-size: clamp(3rem, 10vw, 4.6rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
}
.lp-home-hero .lp-sub {
  margin: 0;
  font-size: 1.05rem;
}
.lp-home-signed {
  margin: 0;
  font-size: 0.95rem;
}
.lp-home-signed strong {
  color: var(--accent, #ff495d);
}
.lp-home-join {
  margin-top: 8px;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--lp-stroke);
  background: var(--lp-panel);
  box-shadow: var(--shadow, 0 10px 26px rgba(0, 0, 0, 0.28));
}
.lp-home-join-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 10px;
}
.lp-home-join-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.lp-code-input {
  flex: 1 1 160px;
  min-width: 0;
  text-align: center;
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 16px 14px;
  border-color: color-mix(in srgb, var(--accent, #ff495d) 45%, var(--lp-stroke));
  background: color-mix(in srgb, var(--glass, #111a24) 70%, #000);
}
.lp-code-input::placeholder {
  letter-spacing: 0.28em;
  opacity: 0.35;
}
.lp-code-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent, #ff495d) 55%, transparent);
  outline-offset: 2px;
}
.lp-code-input--solo {
  width: 100%;
  margin-bottom: 14px;
  flex: none;
}
.lp-home-join-btn {
  flex: 0 0 auto;
  min-width: 140px;
  padding-left: 22px;
  padding-right: 22px;
  font-size: 1.05rem;
}
.lp-home-join .lp-muted {
  margin: 10px 0 0;
}
.lp-home-err {
  margin: 10px 0 0;
  color: #ff8a8a;
  font-size: 0.92rem;
  font-weight: 700;
}
.lp-home-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.lp-home-how {
  padding-top: 8px;
  border-top: 1px solid var(--lp-stroke);
}
.lp-home-how-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: var(--text, #e7edf5);
}
.lp-home-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.lp-home-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.lp-home-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 0.9rem;
  color: #fff;
  background: var(--accent, #ff495d);
}
.lp-home-steps strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text, #e7edf5);
}
.lp-home-steps p {
  margin: 0;
  color: var(--muted, #a9b5c7);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* —— Join page —— */
.lp-join-page {
  max-width: 440px;
  padding-top: 20px;
}
.lp-join-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent, #ff495d);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}
.lp-join-back:hover { text-decoration: underline; }
.lp-join-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}
.lp-join-title {
  font-size: clamp(2rem, 8vw, 2.8rem) !important;
  margin: 0;
}
.lp-join-hero .lp-sub {
  margin: 0;
}
.lp-join-form {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--lp-stroke);
  background: var(--lp-panel);
  box-shadow: var(--shadow, 0 10px 26px rgba(0, 0, 0, 0.28));
}
.lp-join-submit {
  width: 100%;
  min-height: 52px;
  font-size: 1.1rem;
}
.lp-join-tip {
  margin: 12px 0 0;
  text-align: center;
}

@media (max-width: 520px) {
  .lp-home-join-btn {
    width: 100%;
  }
}

.lp-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.lp-card {
  background: var(--lp-panel);
  border: 1px solid var(--lp-stroke);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow, 0 10px 26px rgba(0, 0, 0, 0.28));
}
.lp-card h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--text, #e7edf5); }
.lp-card p { margin: 0 0 14px; color: var(--muted, #a9b5c7); font-size: 0.95rem; }

.lp-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  background: var(--accent, #ff495d);
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.lp-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.lp-btn.secondary {
  color: var(--text, #e7edf5);
  background: color-mix(in srgb, var(--glass, #111a24) 80%, transparent);
  border: 1px solid var(--lp-stroke);
}
.lp-btn.correct {
  background: linear-gradient(135deg, #1ad67a, #7dffb3);
  color: #052016;
  font-size: 1.05rem;
  min-width: 140px;
  border-color: transparent;
}
.lp-btn.incorrect {
  background: linear-gradient(135deg, #ff3355, #ff8a6b);
  color: #1a0508;
  font-size: 1.05rem;
  min-width: 140px;
  border-color: transparent;
}
.lp-btn.warn {
  background: linear-gradient(135deg, var(--lp-gold), #ffe8a3);
  color: #2a1d00;
  border-color: transparent;
}
.lp-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

@keyframes lp-flash-err {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  25%, 75% { box-shadow: 0 0 0 3px rgba(255, 51, 85, 0.65); }
}
.lp-flash-err {
  animation: lp-flash-err 0.7s ease !important;
  background: #ff3355 !important;
  color: #fff !important;
  border-color: #ff1f45 !important;
  filter: none !important;
}
.lp-cell.lp-flash-err {
  background: #ff3355 !important;
  color: #fff !important;
}
.lp-input.lp-flash-err {
  border-color: #ff3355 !important;
  box-shadow: 0 0 0 3px rgba(255, 51, 85, 0.4) !important;
  background: rgba(255, 51, 85, 0.18) !important;
}
@keyframes lp-flash-ok {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  40% { box-shadow: 0 0 0 3px rgba(26, 214, 122, 0.55); }
}
.lp-flash-ok {
  animation: lp-flash-ok 0.55s ease !important;
  background: #1ad67a !important;
  color: #052016 !important;
  border-color: #14b866 !important;
}

.lp-input, .lp-select, .lp-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--lp-stroke);
  background: color-mix(in srgb, var(--glass, #111a24) 75%, #000);
  color: var(--text, #e7edf5);
  padding: 12px 14px;
  font: inherit;
}
.lp-textarea { min-height: 90px; resize: vertical; }
.lp-label { display: grid; gap: 6px; margin-bottom: 12px; font-size: 0.9rem; color: var(--muted, #a9b5c7); }
.lp-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lp-muted { color: var(--muted, #a9b5c7); font-size: 0.9rem; }
.lp-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent, #ff495d) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent, #ff495d) 40%, var(--lp-stroke));
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text, #e7edf5);
}

/* Board */
.lp-board {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.lp-board.fast { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lp-board.fast .lp-cell {
  aspect-ratio: 16 / 9;
}
.lp-cat {
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  padding: 12px 6px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--glass, #111a24) 90%, #000);
  border: 1px solid var(--lp-stroke);
  color: var(--text, #e7edf5);
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lp-cell {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent, #ff495d) 35%, var(--lp-stroke));
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%),
    color-mix(in srgb, var(--glass, #111a24) 85%, #000);
  color: var(--lp-gold);
  font-weight: 900;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.lp-cell:hover:not(.done):not(.empty):not(.locked) { transform: scale(1.03); filter: brightness(1.12); }
.lp-cell.locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.lp-cell.locked.active { opacity: 1; }
.lp-cell.done, .lp-cell.empty {
  background: color-mix(in srgb, var(--glass, #111a24) 50%, #000);
  color: transparent;
  border-color: var(--lp-stroke);
  cursor: default;
}
.lp-cell.active {
  outline: 3px solid var(--accent, #ff495d);
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent, #ff495d) 40%, transparent);
}
.lp-muted.is-warn {
  color: var(--lp-gold, #ffd166);
  opacity: 1;
}

.lp-clue-stage {
  border-radius: 14px;
  padding: clamp(18px, 4vw, 40px);
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--accent, #ff495d) 18%, transparent), transparent 50%),
    var(--lp-panel);
  border: 1px solid var(--lp-stroke);
  color: var(--text, #e7edf5);
}
.lp-clue-stage .cat {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent, #ff495d);
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.lp-clue-stage .clue {
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  max-width: 28ch;
}
.lp-booty {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, var(--accent, #ff495d), var(--lp-gold));
  color: #1a0a16;
  animation: lpPulse 0.85s ease-in-out infinite alternate;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lp-gold) 35%, transparent),
    0 12px 28px color-mix(in srgb, var(--accent, #ff495d) 35%, transparent);
}
@keyframes lpPulse {
  from { transform: scale(0.98); filter: brightness(1); }
  to { transform: scale(1.04); filter: brightness(1.15); }
}

.lp-scoreboard {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lp-scoreboard.stacked {
  grid-template-columns: 1fr;
  height: 100%;
  min-height: 0;
}
.lp-seat {
  border-radius: 12px;
  padding: 12px;
  background: color-mix(in srgb, var(--glass, #111a24) 70%, #000);
  border: 1px solid var(--lp-stroke);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.lp-scoreboard.stacked .lp-seat {
  flex-direction: row;
  text-align: left;
  align-items: center;
  justify-content: flex-start;
  padding: 16px 18px;
  min-height: 0;
  flex: 1 1 0;
}
.lp-seat.answering {
  border-color: var(--accent, #ff495d);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #ff495d) 35%, transparent);
}
.lp-seat .lp-seat-text { min-width: 0; }
.lp-seat .name { font-weight: 800; color: var(--text, #e7edf5); }
.lp-seat .money {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--lp-gold);
  margin-top: 4px;
}
.lp-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,209,102,0.45);
}
.lp-scoreboard.stacked .lp-avatar {
  width: 72px;
  height: 72px;
}
.lp-avatar-sm { width: 24px; height: 24px; border-width: 1px; }
.lp-avatar-inline {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 8px;
}
.lp-avatar-ph {
  display: inline-block;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.35), transparent 42%),
    rgba(255,255,255,0.1);
}
.lp-top-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}
.lp-top-rank {
  flex: 0 0 auto;
  min-width: 1.7em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.85em;
  opacity: 0.6;
}
.lp-top-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-top-score {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.lp-top10 { list-style: none; padding: 0; margin: 0; }
.lp-top10 li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--lp-stroke);
  color: var(--text, #e7edf5);
}
.lp-top10 li:last-child { border-bottom: 0; }

/* Mobile play */
.lp-play-shell {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 14px 40px;
}
.lp-answer-box {
  display: flex;
  align-items: stretch;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--lp-stroke);
  background: rgba(0,0,0,0.35);
}
.lp-answer-prefix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: color-mix(in srgb, var(--accent, #ff495d) 16%, transparent);
  color: var(--accent, #ff495d);
  font-weight: 800;
  white-space: nowrap;
}
.lp-answer-box input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text, #e7edf5);
  padding: 14px 12px;
  font: inherit;
  min-width: 0;
}
.lp-answer-box input:focus { outline: none; }

.lp-buzz {
  width: min(72vw, 280px);
  height: min(72vw, 280px);
  border-radius: 50%;
  border: 8px solid rgba(255,255,255,0.2);
  background:
    radial-gradient(circle at 35% 30%, #ff8ab8, transparent 40%),
    linear-gradient(160deg, #ff2d6a, #8b001f);
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 16px 40px rgba(255,45,106,0.4), inset 0 0 30px rgba(255,255,255,0.15);
  cursor: pointer;
}
.lp-buzz:active { transform: scale(0.96); }
.lp-buzz:disabled {
  background: linear-gradient(160deg, #444, #222);
  box-shadow: none;
}
.lp-buzz.locked-in {
  background: linear-gradient(160deg, #1ad67a, #0a7a45);
  border-color: rgba(125,255,179,0.55);
}

.lp-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(8,10,24,0.92);
  border: 1px solid var(--lp-stroke);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 50;
}

.lp-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 28px 16px 36px;
  border-top: 1px solid var(--glass-border, #263244);
  text-align: center;
  color: var(--muted, #a9b5c7);
}
.lp-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lp-footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted, #a9b5c7);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.lp-footer-powered:hover {
  color: var(--text, #e7edf5);
}
.lp-footer-powered-label {
  font-size: 0.95rem;
  white-space: nowrap;
}
.lp-footer-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: min(160px, 42vw);
}
.lp-footer-meta {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  font-size: 0.88rem;
  font-weight: 600;
}
.lp-footer-meta a {
  color: var(--muted, #a9b5c7);
  text-decoration: none;
}
.lp-footer-meta a:hover {
  color: var(--accent, #ff495d);
  text-decoration: underline;
}
.lp-footer-sep { opacity: 0.45; }

/* —— Admin panel —— */
.lp-wrap--admin {
  max-width: 1180px;
}
.lp-admin-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.lp-admin-section {
  margin-bottom: 16px;
}
.lp-admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.lp-admin-section-head h3 {
  margin: 0;
}
.lp-admin-table-wrap {
  overflow-x: auto;
}
.lp-admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.lp-admin-table th,
.lp-admin-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}
.lp-admin-table th {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.65;
  font-weight: 700;
}
.lp-admin-table a {
  color: var(--lp-neon);
  text-decoration: none;
}
.lp-admin-table a:hover {
  text-decoration: underline;
}
.lp-admin-table-actions {
  white-space: nowrap;
  text-align: right;
}
.lp-btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 999px;
}
.lp-btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #ff3355, #c4183a);
}
.lp-btn-danger:hover {
  filter: brightness(1.08);
}
.lp-pill-warn {
  background: rgba(255, 209, 102, 0.18);
  border-color: rgba(255, 209, 102, 0.45);
  color: var(--lp-gold);
}
.lp-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.9rem;
  cursor: pointer;
}
.lp-admin-bank {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.lp-admin-pane-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-neon);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-admin-cats,
.lp-admin-clues {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}
.lp-admin-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: min(52vh, 480px);
  overflow-y: auto;
  margin-bottom: 12px;
}
.lp-admin-cat-item {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lp-admin-cat-item:hover {
  background: color-mix(in srgb, var(--accent, #ff495d) 10%, transparent);
}
.lp-admin-cat-item.is-selected {
  border-color: color-mix(in srgb, var(--accent, #ff495d) 45%, var(--lp-stroke));
  background: color-mix(in srgb, var(--accent, #ff495d) 14%, transparent);
}
.lp-admin-cat-item.is-inactive {
  opacity: 0.55;
}
.lp-admin-cat-title {
  font-weight: 700;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-admin-cat-meta {
  flex-shrink: 0;
  font-size: 0.8rem;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}
.lp-admin-cat-form,
.lp-admin-clue-form {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-admin-empty {
  display: grid;
  place-items: center;
  min-height: 220px;
  text-align: center;
  padding: 24px;
}
.lp-admin-clue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-admin-clue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  max-height: min(42vh, 420px);
  overflow-y: auto;
}
.lp-admin-clue-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-admin-clue-row.is-inactive {
  opacity: 0.55;
}
.lp-admin-clue-row.is-used {
  border-color: rgba(255, 209, 102, 0.25);
}
.lp-admin-clue-tier {
  font-weight: 900;
  color: var(--lp-gold);
  padding-top: 2px;
}
.lp-admin-clue-text {
  font-weight: 650;
  line-height: 1.35;
  margin: 4px 0;
}
.lp-admin-clue-resp {
  opacity: 0.75;
  font-size: 0.9rem;
  font-style: italic;
}
.lp-admin-clue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.lp-admin-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 860px) {
  .lp-admin-bank {
    grid-template-columns: 1fr;
  }
  .lp-admin-cat-list {
    max-height: 240px;
  }
  .lp-admin-clue-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }
  .lp-admin-clue-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* —— Host dashboard —— */
.lp-wrap--host {
  max-width: 1280px;
}
.lp-wrap--host.lp-host-full {
  max-width: none;
  width: 100%;
}
.page:has(.lp-host-full) {
  width: min(100%, 98vw) !important;
  max-width: none !important;
}
/* Single horizontal toolbar: brand, dropdowns, session links. */
.lp-host-bar {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 12, 36, 0.55);
}
.lp-host-bar-brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-right: 6px;
  margin-right: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}
.lp-host-bar-mark {
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  color: var(--lp-gold, #ffd166);
}
.lp-host-bar-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.lp-host-bar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.lp-host-setup {
  background: var(--lp-panel);
  border: 1px solid var(--lp-stroke);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.lp-host-setup-main {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.lp-host-load {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  flex: 1;
  min-width: 220px;
}
.lp-host-load .lp-label {
  flex: 1;
  min-width: 140px;
}
.lp-host-status {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent, #ff495d) 28%, var(--lp-stroke));
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent, #ff495d) 12%, transparent), transparent 55%),
    var(--lp-panel);
}
.lp-host-status-sticky .lp-host-status {
  position: sticky;
  top: 8px;
  z-index: 20;
  backdrop-filter: blur(10px);
}
.lp-host-status-left,
.lp-host-status-right {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
}
.lp-host-status-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 4px;
}
.lp-host-status-value {
  font-weight: 800;
  font-size: 1.05rem;
}
.lp-host-code {
  font-size: 1.8rem;
  letter-spacing: 0.18em;
  color: var(--lp-neon);
  line-height: 1;
}
.lp-host-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}
.lp-host-pill.is-open {
  color: #052016;
  background: linear-gradient(135deg, #1ad67a, #7dffb3);
  border-color: transparent;
}
.lp-host-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 14px;
  align-items: start;
}
.lp-host-col {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 40px;
  min-width: 0;
  border-radius: 14px;
  transition: background 0.15s ease, outline-color 0.15s ease;
}
.lp-host-col.is-drop-target {
  background: color-mix(in srgb, var(--accent, #ff495d) 10%, transparent);
  outline: 2px dashed color-mix(in srgb, var(--accent, #ff495d) 45%, transparent);
  outline-offset: 4px;
}
.lp-host-col[hidden] {
  display: none !important;
}
.lp-host-layout-wide .lp-host-grid {
  grid-template-columns: minmax(0, 2.3fr) minmax(260px, 0.7fr);
}
.lp-host-layout-equal .lp-host-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.lp-host-layout-controls_left .lp-host-grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.7fr);
}
.lp-host-layout-controls_left #hostCol2 {
  order: -1;
}
.lp-host-layout-three.lp-host-full .lp-host-grid,
.lp-host-layout-three .lp-host-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lp-host-layout-stacked .lp-host-grid,
.lp-host-layout-focus .lp-host-grid {
  grid-template-columns: 1fr;
}
.lp-host-layout-focus #hostCol1 [data-panel="board"] {
  min-height: 320px;
}
.lp-host-main,
.lp-host-side {
  display: grid;
  gap: 14px;
}
.lp-host-side {
  position: sticky;
  top: 12px;
}
.lp-host-status-sticky .lp-host-col {
  /* columns scroll naturally; status stays sticky */
}
.lp-host-layout-stacked .lp-host-side,
.lp-host-layout-focus .lp-host-side {
  position: static;
}
.lp-host-density-compact .lp-host-panel {
  padding: 12px;
}
.lp-host-density-compact .lp-host-panel-head {
  margin-bottom: 8px;
}
.lp-host-density-compact .lp-host-status {
  padding: 10px 12px;
}
.lp-host-density-compact .lp-host-code {
  font-size: 1.4rem;
}
.lp-host-panel {
  margin: 0;
}
.lp-host-panel.is-dragging {
  opacity: 0.55;
  z-index: 40;
  position: relative;
}
.lp-host-drag {
  cursor: grab;
  user-select: none;
  font-size: 1.05rem;
  letter-spacing: -0.08em;
  opacity: 0.55;
  padding: 2px 4px;
  border-radius: 6px;
  line-height: 1;
}
.lp-host-drag:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.08);
}
.lp-host-drag:active {
  cursor: grabbing;
}
.lp-host-layout-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lp-host-layout-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #f4f7ff;
  border-radius: 999px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.lp-host-layout-pill:hover {
  border-color: color-mix(in srgb, var(--accent, #ff495d) 40%, var(--lp-stroke));
}
.lp-host-layout-pill.is-active {
  background: var(--accent, #ff495d);
  color: #fff;
  border-color: transparent;
}
.lp-host-toolbar-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.lp-host-toggle {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  color: #f4f7ff;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.lp-host-toggle.is-on {
  border-color: rgba(125, 255, 179, 0.55);
  background: rgba(125, 255, 179, 0.16);
  color: #b8ffd4;
}
.lp-host-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lp-host-save-status {
  font-size: 0.82rem;
  opacity: 0.75;
  min-height: 1em;
}
.lp-host-panel-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lp-host-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
}
/* display:flex above would otherwise beat the UA rule for [hidden]. */
.lp-host-nav[hidden] {
  display: none;
}
.lp-host-menu {
  position: relative;
}
.lp-host-menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: #f4f7ff;
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
}
.lp-host-menu-btn:hover {
  background: rgba(255, 255, 255, 0.07);
}
.lp-host-menu.is-open > .lp-host-menu-btn {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
}
.lp-host-menu-caret {
  font-size: 0.7rem;
  opacity: 0.7;
}
.lp-host-menu.is-open .lp-host-menu-caret {
  transform: rotate(180deg);
}
.lp-host-menu-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 240px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 11, 30, 0.98);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.lp-host-menu-pop--wide {
  min-width: 340px;
}
.lp-host-menu-head {
  margin: 0 0 8px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #a9b5c7);
}
.lp-host-menu-stack {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}
.lp-host-menu-stack > * {
  text-align: center;
}
.lp-host-lobby-games {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.lp-host-lobby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.lp-host-lobby-head h3 {
  margin: 0;
  font-size: 0.95rem;
}
.lp-host-lobby-list {
  display: grid;
  gap: 8px;
}
.lp-host-lobby-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
}
.lp-host-lobby-code {
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}
@media (max-width: 640px) {
  .lp-host-lobby-row {
    grid-template-columns: 1fr auto;
  }
  .lp-host-bar-sub {
    display: none;
  }
  .lp-host-bar-brand {
    padding-right: 4px;
  }
}
.lp-host-panel-toggle {
  appearance: none;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: transparent;
  color: var(--muted, #a9b5c7);
  border-radius: 8px;
  padding: 5px 10px;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.lp-host-panel-toggle.is-on {
  color: #f4f7ff;
  border-style: solid;
  border-color: rgba(108, 240, 255, 0.45);
  background: rgba(108, 240, 255, 0.12);
}
.lp-host-control-block {
  margin-top: 12px;
}
.lp-host-control-block:first-of-type {
  margin-top: 4px;
}
.lp-host-control-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 6px;
  font-weight: 800;
}
.lp-host-round-row .lp-btn {
  flex: 1 1 auto;
  min-width: 72px;
}
.lp-host-scene-groups {
  display: grid;
  gap: 10px;
}
.lp-host-scene-group .lp-host-control-label {
  margin-bottom: 4px;
  opacity: 0.5;
}
.lp-host-board .lp-board.fast {
  max-width: 720px;
}
.lp-host-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.lp-host-panel-head h3 {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
}
.lp-host-board {
  overflow-x: auto;
}
.lp-host-clue {
  min-height: 180px;
}
.lp-host-clue-paused {
  display: grid;
  gap: 8px;
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(0, 0, 0, 0.22);
}
.lp-host-clue-paused strong {
  font-size: 1.15rem;
}
.lp-exclusive-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #1a1200;
  background: linear-gradient(135deg, var(--lp-gold), #ffe8a3);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lp-gold) 35%, transparent);
}
.lp-host-answer {
  margin: 12px 0 0;
  font-weight: 700;
  color: var(--lp-gold);
  min-height: 1.2em;
}
.lp-host-judge {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.lp-host-btn-stack {
  display: grid;
  gap: 8px;
}
.lp-host-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lp-host-scene-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.lp-host-scene-btn.is-active {
  border-color: color-mix(in srgb, var(--accent, #ff495d) 55%, var(--lp-stroke));
  background: color-mix(in srgb, var(--accent, #ff495d) 16%, transparent);
  color: var(--text, #e7edf5);
}
.lp-host-links {
  display: grid;
  gap: 10px;
}
.lp-host-link-row {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.lp-host-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 0.95rem;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .lp-host-layout-three .lp-host-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .lp-host-grid,
  .lp-host-layout-wide .lp-host-grid,
  .lp-host-layout-equal .lp-host-grid,
  .lp-host-layout-controls_left .lp-host-grid,
  .lp-host-layout-three .lp-host-grid {
    grid-template-columns: 1fr;
  }
  .lp-host-layout-controls_left #hostCol2 {
    order: 0;
  }
}

@media (max-width: 720px) {
  .lp-board, .lp-board.fast { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lp-scoreboard { grid-template-columns: 1fr; }
  .lp-host-scene-grid { grid-template-columns: 1fr; }
}

/* Drawing pads (Daily Double / Final) */
.lp-draw-root {
  display: grid;
  gap: 10px;
}
.lp-draw-title {
  font-weight: 800;
  font-size: 1.05rem;
}
.lp-draw-hint { margin: 0; }
.lp-draw-canvas {
  width: 100%;
  max-width: 640px;
  height: auto;
  aspect-ratio: 16 / 7;
  border-radius: 12px;
  border: 2px solid var(--lp-stroke);
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}
.lp-draw-tools {
  display: flex;
  gap: 8px;
}
.lp-host-drawings {
  margin-top: 12px;
}
.lp-host-draw-seat {
  border: 1px solid var(--lp-stroke);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  background: var(--lp-panel);
}
.lp-host-draw-seat.is-correct {
  border-color: rgba(26, 214, 122, 0.75);
  box-shadow: 0 0 0 2px rgba(26, 214, 122, 0.25);
}
.lp-host-wager-edit {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin: 10px 0;
}
.lp-host-wager-edit .lp-label {
  flex: 1 1 160px;
  margin: 0;
}
.lp-host-wager-edit .lp-input {
  margin-top: 4px;
}
.lp-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.lp-level {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.lp-level-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1ad67a, #ffd166, #ff495d);
  transition: width 0.05s linear;
}
.lp-host-grant {
  display: grid;
  gap: 10px;
}
.lp-host-search-results,
.lp-host-access-list {
  display: grid;
  gap: 8px;
}
.lp-host-access-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--lp-stroke);
  background: rgba(0, 0, 0, 0.18);
}
.lp-host-access-row.is-owner {
  border-color: color-mix(in srgb, var(--lp-gold, #ffc857) 45%, var(--lp-stroke));
}
.lp-host-draw-seat-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.lp-host-draw-imgs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.lp-host-draw-imgs figure {
  margin: 0;
}
.lp-host-draw-imgs img {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--lp-stroke);
  background: #fff;
}
.lp-host-draw-imgs figcaption {
  font-size: 0.8rem;
  color: var(--muted, #a9b5c7);
  margin-top: 4px;
}
