/* ==========================================================================
   ChessChamps — mobile-first styling.
   Built for a phone held in one hand: nothing below 44px of tap target,
   safe-area padding for notches and home indicators, and no browser chrome
   (selection, tap flashes, rubber-band scroll) leaking into a game.
   ========================================================================== */

:root {
  --bg: #171514;
  --bg-raised: #221f1d;
  --bg-sunken: #100f0e;
  --line: #332e2a;
  --text: #f2ece4;
  --text-dim: #a49a8e;
  --accent: #e8a33d;
  --accent-ink: #2a1c07;
  --good: #6fbf73;
  --bad: #e2635a;

  --sq-light: #eddec4;
  --sq-dark: #8b6f4e;
  --mark: rgba(255, 201, 71, 0.42);
  --mark-soft: rgba(255, 201, 71, 0.26);

  --radius: 14px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }

/* `hidden` must win against the id-based layout rules further down. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}

#app { height: 100%; }

.screen {
  height: 100%;
  padding: calc(var(--safe-top) + 12px) calc(var(--safe-right) + 14px)
           calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 14px);
}
.screen[hidden] { display: none; }

.muted { color: var(--text-dim); }
.small { font-size: 13px; }

/* ------------------------------------------------------------------ home */

#screen-home {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  max-width: 480px;
  margin: 0 auto;
}

.brand { text-align: center; margin-top: 8px; }

.brand-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 10px;
  border-radius: 16px;
  background: url("/icons/icon-192.png") center / cover no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.brand h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.4px;
  font-weight: 700;
}
.tagline { margin: 2px 0 0; color: var(--text-dim); font-size: 14px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  font-weight: 600;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-user-select: text;
  user-select: text;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.18);
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 6px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.chip strong { font-size: 14px; font-weight: 600; }
.chip span { font-size: 11px; color: var(--text-dim); }
.chip.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip.selected span { color: rgba(42, 28, 7, 0.75); }

.actions { display: flex; flex-direction: column; gap: 10px; }

.btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-title { font-weight: 650; font-size: 16px; }
.btn-sub { font-size: 12px; opacity: 0.72; }

.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.secondary { background: var(--bg-raised); color: var(--text); border-color: var(--line); }
.btn.ghost { background: transparent; color: var(--text-dim); border-color: var(--line); }
.btn.compact { min-height: 48px; flex-direction: row; }

.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel[hidden] { display: none; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-dim);
  font-size: 12px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.join-row { display: flex; gap: 8px; }
#join-code {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 5px;
  text-transform: uppercase;
}
#join-code::placeholder { letter-spacing: 3px; font-weight: 500; color: #5c544c; }

.home-footer {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text-dim);
  font-size: 12px;
}
.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-dim);
}
.pill[data-status="online"] { color: var(--good); }
.pill[data-status="online"]::before { background: var(--good); }
.pill[data-status="offline"], .pill[data-status="replaced"] { color: var(--bad); }
.pill[data-status="offline"]::before, .pill[data-status="replaced"]::before { background: var(--bad); }
.pill[data-status="connecting"]::before,
.pill[data-status="reconnecting"]::before { background: var(--accent); animation: pulse 1.1s infinite; }

@keyframes pulse { 50% { opacity: 0.25; } }

/* --------------------------------------------------------------- waiting */

#screen-wait { display: flex; align-items: center; justify-content: center; }
.wait-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  width: 100%;
  max-width: 380px;
}
.wait-inner h2 { margin: 0; font-size: 21px; }
.wait-inner p { margin: 0; }

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

#code-block {
  width: 100%;
  padding: 18px 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
#code-block[hidden] { display: none; }
.code-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dim);
  margin: 0;
}
.code {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 8px;
  text-indent: 8px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  -webkit-user-select: all;
  user-select: all;
}
.code-actions { display: flex; gap: 8px; width: 100%; }
.code-actions .btn { flex: 1; }

/* ------------------------------------------------------------------ game */

#screen-game {
  display: flex;
  flex-direction: column;
  gap: 6px;
  /* Trim the side gutters: on a phone the board is width-limited, so every
     pixel of padding comes straight off the size of the pieces. */
  padding: calc(var(--safe-top) + 6px) calc(var(--safe-right) + 7px)
           calc(var(--safe-bottom) + 6px) calc(var(--safe-left) + 7px);
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 4px 10px;
  background: var(--bg-raised);
  border-radius: 11px;
  flex: 0 0 auto;
}
.who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.pname {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 32vw;
}
.presence {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex: 0 0 auto;
}
.presence.online { background: var(--good); }
.presence.offline { background: var(--bad); animation: pulse 1.2s infinite; }

.taken { display: flex; align-items: center; gap: 1px; flex: 1; min-width: 0; overflow: hidden; }
.taken-piece { width: 17px; height: 17px; opacity: 0.85; }
.taken-piece .piece-art { width: 100%; height: 100%; }
.advantage { font-size: 12px; color: var(--text-dim); margin-left: 5px; font-weight: 600; }

.clock {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 19px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--bg-sunken);
  color: var(--text-dim);
  min-width: 74px;
  text-align: center;
  flex: 0 0 auto;
}
.clock.active { background: var(--text); color: var(--bg); }
.clock.low { color: var(--bad); }
.clock.active.low { background: var(--bad); color: #fff; }

.board-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Two auto margins split the leftover height evenly above and below the
   board group, keeping it optically centred over the move list and controls. */
#bar-top { margin-top: auto; }
.movelist { margin-top: auto; }

/* Width and height are set in pixels by Board.fit(): fitting a square into a
   box constrained on both axes is not something CSS can express on its own. */
/* Width and height are set in pixels by Board.fit(): fitting a square into a
   box constrained on both axes is not something CSS can express on its own. */
/* Size and position are set in pixels by Board.fit(): the drawn board is a
   perspective projection, so its box is not a plain square and CSS cannot
   solve for a size that fits both axes on its own. */
.board {
  position: relative;
  touch-action: none;
}

/* The tilted half. The squares really are on a receding plane, so highlights
   and coordinates are painted onto the board rather than floating over it. */
/* The board plane itself, placed by Board.fit() so that its centre coincides
   with the origin `_project` measures from. */
.scene {
  position: absolute;
  perspective: 900px;
  perspective-origin: 50% 50%;
}
.surface {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  border-radius: 8px;
  box-shadow: 0 26px 40px rgba(0, 0, 0, 0.55);
}
/* A dark lip around the squares, so the board reads as a slab with a thickness
   rather than a texture floating in space. */
.surface::before {
  content: "";
  position: absolute;
  /* Sized by Board.fit() and counted into the board's footprint, so the near
     corners cannot spill outside the element once perspective spreads them. */
  inset: calc(var(--rim, 7px) * -1);
  border-radius: calc(8px + var(--rim, 7px) * 0.5);
  background: linear-gradient(180deg, #4b3a28 0%, #2e2318 60%, #1c1610 100%);
  box-shadow: inset 0 2px 3px rgba(255, 232, 196, 0.14);
}

.squares {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  border-radius: 8px;
  overflow: hidden;
  /* A lip of shading at the far edge reads as thickness. */
  box-shadow: inset 0 6px 14px rgba(0, 0, 0, 0.28);
}
.board.flat .surface { box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5); }
.board.flat .squares { box-shadow: none; }

.sq { position: relative; }
.sq.light { background: var(--sq-light); }
.sq.dark { background: var(--sq-dark); }
.sq.last::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mark-soft);
}
.sq.active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mark);
}
.sq.check::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(226, 99, 90, 0.95) 12%, rgba(226, 99, 90, 0) 72%);
}

.coord {
  position: absolute;
  font-size: 9px;
  font-weight: 700;
  opacity: 0.55;
  pointer-events: none;
}
.coord.file { bottom: 1px; right: 3px; }
.coord.rank { top: 1px; left: 3px; }
.sq.light .coord { color: var(--sq-dark); }
.sq.dark .coord { color: var(--sq-light); }

.markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* The flat half: pieces are billboards placed by Board._placementFor(), so
   they always face the viewer no matter how far the board leans back. */
.pieces {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: flat;
}

.piece {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--piece, 12.5%);
  height: var(--piece, 12.5%);
  /* Anchored at the feet, so scaling for depth keeps a piece on its square,
     and a toppling king falls from its base rather than its middle. */
  transform-origin: 50% 100%;
  /* Deliberately no `will-change`: 32 permanently promoted layers costs more
     on a cheap phone than it saves. The browser promotes a piece for the
     duration of its animation anyway. */
}
.piece.dragging {
  transition: none;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.55));
}

/* Contact shadow, squashed to sit on the tilted board underneath. */
.piece::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: 54%;
  height: 12%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 70%);
  z-index: -1;
}
.board.flat .piece::after { display: none; }

/* Rendered sprites; the shading is baked in, so nothing here recolours them. */
.piece-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  /* A short drop shadow reads as the piece sitting on the board rather than
     hovering over it; the sprite's own lighting does the rest. */
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
  -webkit-user-drag: none;
  user-select: none;
}

/* --- destruction ------------------------------------------------------- */

.debris {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--piece, 12.5%);
  height: var(--piece, 12.5%);
  transform-origin: 50% 100%;
  pointer-events: none;
  z-index: 25;
}
.shard {
  position: absolute;
  inset: 0;
  will-change: transform, opacity;
}
.shard .piece-art { filter: none; }

.dust, .impact, .promote {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 24;
}
.dust { background: radial-gradient(circle, rgba(226, 214, 193, 0.7), rgba(226, 214, 193, 0)); }
.impact {
  background: radial-gradient(circle, rgba(255, 238, 200, 0.95) 0%, rgba(232, 163, 61, 0.35) 45%, rgba(232, 163, 61, 0) 70%);
  z-index: 26;
}
/* A queen going down is the biggest thing that happens on a board. */
.impact.royal {
  background: radial-gradient(circle, rgba(255, 250, 232, 1) 0%, rgba(255, 205, 92, 0.6) 38%, rgba(255, 170, 40, 0) 72%);
}
.debris.royal .shard { filter: drop-shadow(0 0 5px rgba(255, 198, 92, 0.8)); }

/* A pawn reaching the last rank becomes something else entirely. */
.promote {
  background: radial-gradient(circle, rgba(255, 255, 255, 0) 42%, rgba(255, 226, 150, 0.9) 58%, rgba(232, 163, 61, 0) 74%);
  z-index: 27;
}

/* Hints stay on the tilted surface so they look painted onto the squares. */
.hint {
  position: absolute;
  top: 0;
  left: 0;
  width: 12.5%;
  height: 12.5%;
  transform: translate3d(calc(var(--x) * 100%), calc(var(--y) * 100%), 0);
  display: grid;
  place-items: center;
}
.hint::after {
  content: "";
  width: 30%;
  height: 30%;
  border-radius: 50%;
  background: rgba(20, 16, 12, 0.34);
}
.hint.capture::after {
  width: 88%;
  height: 88%;
  background: none;
  border: 5px solid rgba(20, 16, 12, 0.3);
}

.board-banner {
  align-self: center;
  flex: 0 0 auto;
  margin-top: 2px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
}
.board-banner[hidden] { display: none; }
.board-banner.alert { background: rgba(226, 99, 90, 0.94); }
.board-banner.warn { background: rgba(232, 163, 61, 0.94); color: var(--accent-ink); }
.board-banner.subtle { background: rgba(16, 15, 14, 0.7); color: var(--text-dim); }

.movelist {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 5px 2px;
  min-height: 28px;
  font-size: 13px;
  scrollbar-width: none;
}
.movelist::-webkit-scrollbar { display: none; }
.move-pair { display: inline-flex; gap: 5px; white-space: nowrap; }
.move-no { color: var(--text-dim); }
.move { font-weight: 600; }

.controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

/* The board-angle strip: a slider between a lock and a reset. */
.angle-panel {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.angle-panel input[type="range"] {
  flex: 1;
  min-width: 0;
  accent-color: var(--accent);
}
.angle-panel input[type="range"]:disabled { opacity: 0.4; }
.angle-lock {
  background: none;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  font-size: 1.05rem;
  padding: 4px 9px;
  cursor: pointer;
  color: var(--text);
}
.angle-lock.locked { border-color: var(--accent); }
.angle-value {
  min-width: 2.6em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim, var(--text));
}
.ctl {
  min-height: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.ctl:active { transform: scale(0.96); }
.ctl:disabled { opacity: 0.35; pointer-events: none; }
.ctl-icon { font-size: 17px; line-height: 1; }
.ctl-label { font-size: 10px; color: var(--text-dim); }
.ctl.pending { border-color: var(--accent); color: var(--accent); }
.ctl.off { opacity: 0.5; }

/* -------------------------------------------------------------- overlays */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  padding: 16px;
  padding-bottom: calc(var(--safe-bottom) + 16px);
}
.overlay[hidden] { display: none; }

.sheet {
  width: 100%;
  max-width: 420px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: rise 0.22s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
.sheet h3 { margin: 0; font-size: 20px; }
.sheet p { margin: 0; }

.modal-actions { display: flex; flex-direction: column; gap: 8px; }

.promo-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.promo-choice {
  aspect-ratio: 1;
  background: var(--sq-light);
  border: none;
  border-radius: 12px;
  padding: 6px;
  cursor: pointer;
}
.promo-choice:active { transform: scale(0.94); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 84px);
  transform: translate(-50%, 12px);
  z-index: 60;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 16, 0.95);
  border: 1px solid var(--line);
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  max-width: 88vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[hidden] { display: none; }

/* Landscape phones: sit the board beside the furniture instead of above it. */
@media (orientation: landscape) and (max-height: 520px) {
  #screen-game {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto 1fr auto;
    gap: 6px 10px;
  }
  .board-wrap { grid-row: 1 / 5; grid-column: 1; }
  #bar-top { grid-column: 2; grid-row: 1; }
  .movelist { grid-column: 2; grid-row: 2; }
  #bar-bottom { grid-column: 2; grid-row: 3; }
  .controls { grid-column: 2; grid-row: 4; grid-template-columns: repeat(6, 1fr); }
  .pname { max-width: 22vw; }
}

@media (prefers-reduced-motion: reduce) {
  .piece, .toast, .sheet { transition: none; animation: none; }
}

/* ------------------------------------------------------------- accounts */

.account-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.account-who { display: flex; flex-direction: column; min-width: 0; }
.account-label {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The badge marks a name nobody else can claim. */
.verified::after {
  content: "✓";
  display: inline-block;
  margin-left: 5px;
  font-size: 0.72em;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 50%;
  width: 1.45em;
  height: 1.45em;
  line-height: 1.45em;
  text-align: center;
  vertical-align: 1px;
}

.link-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 6px;
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:active { opacity: 0.6; }

#auth .sheet { gap: 10px; }
#auth .field { gap: 5px; }
input[type="password"] {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  font: inherit;
  color: var(--text);
  background: var(--bg-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  -webkit-user-select: text;
  user-select: text;
}
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 163, 61, 0.18);
}
#auth input[type="text"] { background: var(--bg-sunken); }

.auth-error {
  margin: 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(226, 99, 90, 0.16);
  border: 1px solid rgba(226, 99, 90, 0.4);
  color: #ffb4ad;
  font-size: 13px;
}
.auth-error[hidden] { display: none; }
