/* Values from the approved canvas «Люси: угадайка в Discord» (Duo-Round,
   Duo-Guessed, Main), the «Дневник Люси» style. Geist is served by the Worker
   (OFL, src/diary/fonts/OFL.txt). */
@font-face {
  font-family: Geist;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-cyrillic-ext.woff2) format('woff2');
  unicode-range:
    U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/geist-latin.woff2) format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #090909;
  --glow-bg: #2a1f14;
  --surface: #141311;
  --surface-2: #1b1a18;
  --surface-warm: #1f1a15;
  --border: #292725;
  --border-warm: #3a2a1c;
  --border-strong: #3a3633;
  --text: #ede9e6;
  --muted: #aba49e;
  --accent: #ee7d23;
  --accent-ink: #c2560e;
  --grad: linear-gradient(90deg, #ec6f22, #f08a24);
  --cream: #fff9f0;
  --ink: #0d0b0a;
  --on-accent: #0d0d0c;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
}
button {
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

@keyframes lucyGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(238, 125, 35, 0.45);
  }
  50% {
    box-shadow: 0 0 22px 6px rgba(238, 125, 35, 0.45);
  }
}
@keyframes bar {
  0%,
  100% {
    transform: scaleY(0.35);
  }
  50% {
    transform: scaleY(1);
  }
}
@keyframes dot {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}
.glow {
  animation: lucyGlow 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .glow,
  .vb,
  .dt {
    animation: none !important;
  }
}

.app {
  min-height: 100%;
  display: flex;
  /* Inside Discord on a phone: its safe areas, else the device's; 0 elsewhere. */
  padding: var(--discord-safe-area-inset-top, env(safe-area-inset-top, 0))
    var(--discord-safe-area-inset-right, env(safe-area-inset-right, 0))
    var(--discord-safe-area-inset-bottom, env(safe-area-inset-bottom, 0))
    var(--discord-safe-area-inset-left, env(safe-area-inset-left, 0));
}
.screen {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.muted {
  color: var(--muted);
}
.accent {
  color: var(--accent);
}
.small {
  font-size: 13px;
}

/* Header pieces */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--accent);
  box-shadow: 0 0 12px 3px rgba(238, 125, 35, 0.6);
}
.brand-name {
  font-weight: 700;
  font-size: 16px;
}
.brand-sub {
  color: var(--muted);
  font-size: 15px;
}
.bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}
.voice-btn[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--surface-warm);
}
.voice-btn:disabled {
  color: var(--muted);
}
.vb-wrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 14px;
}
.vb {
  display: inline-block;
  width: 3px;
  height: 14px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: 50% 100%;
}
.speaking .vb {
  animation: bar 0.9s ease-in-out infinite;
}
.vb:nth-child(2) {
  animation-delay: 0.15s;
}
.vb:nth-child(3) {
  animation-delay: 0.3s;
}
.vb:nth-child(4) {
  animation-delay: 0.45s;
}

/* Segmented controls */
.seg {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 14px;
  background: #0e0d0c;
  border: 1px solid var(--border);
}
.seg button {
  flex: 1;
  min-height: 36px;
  min-width: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.seg button[aria-pressed='true'] {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}
.seg-small button {
  min-height: 32px;
}

/* Lobby */
.lobby {
  background: radial-gradient(
    60% 55% at 30% 0%,
    var(--glow-bg) 0%,
    var(--bg) 65%
  );
  padding: 20px 28px 24px;
  gap: 20px;
}
.lobby-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
}
.table-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  overflow: hidden;
  min-height: 460px;
}
.table-head {
  position: absolute;
  left: 28px;
  top: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.table-oval {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 30%;
  height: 44%;
  border-radius: 50%;
  background: radial-gradient(
    70% 70% at 50% 40%,
    var(--surface-warm) 0%,
    #100f0e 100%
  );
  border: 1px solid #312e2b;
  box-shadow: inset 0 0 60px rgba(238, 125, 35, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.table-oval span {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: #6f6964;
  font-weight: 600;
}
.seat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.seat-luci {
  left: 50%;
  top: 9%;
  transform: translateX(-50%);
}
.seat-you {
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%);
}
.seat-name {
  font-size: 15px;
  font-weight: 700;
}
.lobby-bubble {
  position: absolute;
  left: calc(50% + 72px);
  top: 7%;
  max-width: 250px;
}
.table-foot {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
}
.avatar-luci {
  background: var(--surface-2);
  border: 2px solid var(--accent);
  color: var(--accent);
}
.avatar-xl {
  width: 112px;
  height: 112px;
  font-size: 40px;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 26px;
}
.avatar-md {
  width: 64px;
  height: 64px;
  font-size: 22px;
}
.avatar-sm {
  width: 48px;
  height: 48px;
  font-size: 18px;
  box-shadow: 0 0 22px 4px rgba(238, 125, 35, 0.45);
}
.avatar-you {
  width: 64px;
  height: 64px;
  font-size: 20px;
  background: #3a2e25;
  border: 2px solid #34d399;
}
.bubble {
  background: var(--cream);
  color: var(--ink);
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.bubble-up {
  border-radius: 18px 18px 18px 4px;
}
.bubble-left {
  border-radius: 4px 18px 18px 18px;
}

.lobby-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.group legend {
  padding: 0;
  margin-bottom: 10px;
}
.mode {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.mode + .mode {
  margin-top: 10px;
}
.mode-on {
  border-color: var(--accent);
  background: var(--surface-warm);
}
.mode-off {
  cursor: not-allowed;
  opacity: 0.75;
}
.mode input {
  margin: 3px 0 0;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex: none;
}
.mode-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 14px;
  line-height: 1.45;
}
.mode-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  flex-wrap: wrap;
  line-height: 1.3;
}
.tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--cream);
  color: var(--ink);
  border-radius: 8px;
  padding: 2px 7px;
}
.tag-soon {
  background: none;
  color: var(--muted);
  border: 1px dashed var(--border-strong);
}
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  font-size: 14px;
}
.chips button[aria-pressed='false'] {
  border: 1px dashed #312e2b;
  background: none;
  color: var(--muted);
}
.lobby-start {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 26px;
  background: var(--grad);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 16px;
}
#start {
  min-height: 56px;
  border-radius: 28px;
  padding: 0 34px;
  font-size: 18px;
}
.primary:disabled {
  opacity: 0.6;
}

/* Round */
.round {
  background: radial-gradient(
    50% 55% at 90% 0%,
    var(--glow-bg) 0%,
    var(--bg) 62%
  );
  padding: 16px 24px 20px;
  gap: 14px;
  height: 100vh;
}
.round-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
  align-items: center;
}
.round-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.round-bar-left .brand-name {
  font-size: 15px;
}
.round-bar-left .brand-sub {
  font-size: 14px;
}
.round-bar-right {
  display: flex;
  justify-content: flex-end;
}
.word-card {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 12px 8px 18px;
  min-height: 52px;
}
.word-left,
.word-right {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.word-right {
  gap: 14px;
}
.word {
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.word-right b,
.clock-num,
.mini-num,
.vs-num {
  font-variant-numeric: tabular-nums;
}
.word-right b {
  color: var(--text);
}
.clock {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.clock-num {
  font-weight: 800;
  font-size: 24px;
}
.clock-late .clock-num {
  color: var(--accent);
}

.round-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 20px;
}
.draw-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.paper {
  flex: 1;
  min-height: 240px;
  position: relative;
  background: var(--cream);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
#canvas {
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 8px 10px;
}
.toolbar[aria-disabled='true'] {
  opacity: 0.5;
  pointer-events: none;
}
.swatches,
.tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 16px;
  border: 1px solid var(--border-strong);
  padding: 0;
}
.swatch[aria-pressed='true'] {
  border: 2px solid var(--text);
  box-shadow: inset 0 0 0 2px var(--surface);
}
.size-dot {
  display: inline-block;
  border-radius: 50%;
  background: currentColor;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-btn[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--surface-warm);
  color: var(--accent);
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}
.luci-card {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.luci-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.luci-name {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.luci-title {
  font-weight: 700;
  font-size: 18px;
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
}
.feed li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.feed .step {
  width: 52px;
  flex: none;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.feed .thought {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.4;
}
.feed .thought s {
  color: #8a837d;
}
.feed li.latest {
  align-items: flex-start;
}
.feed li.latest .step {
  color: var(--accent);
  font-weight: 600;
  padding-top: 12px;
}
.feed li.latest .thought {
  background: var(--cream);
  color: var(--ink);
  border-radius: 4px 18px 18px 18px;
  padding: 12px 14px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
}
.feed li.latest .thought s {
  color: #6b625a;
  font-weight: 600;
}
.dots {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
}
.dt {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--ink);
  animation: dot 1.2s ease-in-out infinite;
}
.dt:nth-child(2) {
  animation-delay: 0.2s;
}
.dt:nth-child(3) {
  animation-delay: 0.4s;
}
.feed-note {
  margin-top: auto;
  line-height: 1.4;
}
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.mini {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mini .small {
  font-size: 12px;
}
.mini-num {
  font-weight: 800;
  font-size: 22px;
}
.mini-title {
  font-weight: 700;
  font-size: 16px;
}

/* Result */
.result {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 9, 0.74);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.result-card {
  width: min(460px, 100%);
  background: var(--surface);
  border: 1px solid var(--border-warm);
  border-radius: 28px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  box-shadow: 0 0 60px 4px rgba(238, 125, 35, 0.2);
  font-size: 15px;
}
.badge {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--grad);
  border-radius: 10px;
  padding: 5px 12px;
}
.badge-plain {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.result-word {
  font-weight: 800;
  font-size: 52px;
  line-height: 1;
  overflow-wrap: anywhere;
}
.result-sub b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.result-say {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}
.result-say .bubble {
  font-size: 16px;
}
.vs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.vs-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vs-name {
  width: 72px;
  font-size: 13px;
  font-weight: 600;
}
.vs-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: var(--surface-2);
}
.vs-fill {
  height: 100%;
  border-radius: 5px;
  background: var(--grad);
}
.vs-fill-old {
  background: var(--border-strong);
}
.vs-num {
  width: 40px;
  text-align: right;
  font-weight: 800;
}
.vs-note {
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.swap-card {
  flex: 1;
  min-height: 0;
  background: var(--surface-warm);
  border: 1px solid var(--border-warm);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 15px;
  line-height: 1.45;
}
/* The swap is a press (owner, 08.11): the card's body is a toggle. */
.swap-toggle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  font-size: inherit;
  line-height: inherit;
  text-align: left;
}
.swap-toggle:hover {
  border-color: var(--accent);
}
.swap-toggle[aria-pressed='true'] {
  border-style: solid;
  border-color: var(--accent);
  background: var(--surface-warm);
}
.swap-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.swap-title {
  font-weight: 800;
  font-size: 28px;
  line-height: 1.1;
}
.swap-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Word help: the «?», the hint and «Другое слово». */
.help-btn {
  width: 28px;
  height: 28px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  align-self: center;
  flex: none;
}
.help-btn[aria-expanded='true'] {
  border-color: var(--accent);
  color: var(--accent);
}
.word-help {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  min-height: 18px;
  padding: 0 4px;
}
.word-help-text {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.word-help #about {
  color: var(--text);
}
.link-btn {
  border: 0;
  background: none;
  padding: 0;
  min-height: 24px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  flex: none;
}
.link-btn:hover:not(:disabled) {
  color: var(--accent);
}
.link-btn:disabled {
  opacity: 0.5;
  text-decoration: none;
}
/* She draws, you guess: canvas «Вдвоём: рисует Люси, угадываешь ты». */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.letters {
  display: flex;
  gap: 6px;
  font-weight: 800;
  font-size: 22px;
  align-self: center;
}
.letter {
  width: 24px;
  min-height: 30px;
  text-align: center;
  text-transform: uppercase;
  border-bottom: 2px solid var(--border-strong);
}
.letter-open {
  border-bottom-color: var(--accent);
}
.letter-gap {
  width: 10px;
  border: 0;
}
.letter-mark {
  border: 0;
  width: auto;
}
.pen-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cream);
  background: var(--accent-ink);
  border-radius: 10px;
  padding: 4px 9px;
  pointer-events: none;
  transform: translate(-10px, -30px);
  white-space: nowrap;
}
.round-lucy #word-label {
  white-space: nowrap;
}
.round-lucy #canvas {
  cursor: default;
}
.round-lucy .luci-card {
  flex: none;
  gap: 12px;
}
.round-lucy .luci-head .avatar-lg {
  width: 56px;
  height: 56px;
}
.luci-bubble {
  font-size: 17px;
  padding: 12px 14px;
}
.chat-card {
  flex: 1;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.chat-list {
  flex: 1;
  min-height: 0;
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.35;
}
.chat-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.chat-guess {
  color: var(--muted);
  text-decoration: line-through;
}
.chat-guess-win {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.chat-who {
  color: var(--accent);
  font-weight: 700;
  margin-right: 6px;
}
.heat-chip {
  align-self: flex-start;
  font-size: 12px;
  color: var(--ink);
  background: #f5c518;
  border-radius: 8px;
  padding: 3px 8px;
  font-weight: 600;
}
.chat-form {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border-radius: 22px;
  border: 1px solid var(--accent);
  background: #0e0d0c;
  color: var(--text);
  padding: 0 16px;
  font-family: inherit;
  font-size: 15px;
}
.chat-form input:disabled {
  border-color: var(--border-strong);
}
.chat-send {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: var(--grad);
  color: var(--on-accent);
  font-weight: 700;
  font-size: 14px;
}
.chat-send:disabled {
  opacity: 0.6;
}

/* Narrow window and phone: one column (canvas note «Мобильный Discord»). */
@media (max-width: 960px) {
  .lobby,
  .round {
    padding: 12px 16px 16px;
  }
  .round {
    height: auto;
    min-height: 100vh;
  }
  .lobby-grid,
  .round-grid,
  .round-bar {
    grid-template-columns: minmax(0, 1fr);
  }
  .round-bar-left {
    flex-wrap: wrap;
  }
  .round-bar-right {
    justify-content: flex-start;
  }
  .word-card {
    flex-basis: 100%;
    flex-wrap: wrap;
  }
  .paper {
    min-height: 0;
    aspect-ratio: 4 / 3;
    flex: none;
  }
  .luci-card {
    min-height: 240px;
  }
  .round-lucy .luci-card {
    min-height: 0;
  }
  .chat-card {
    min-height: 320px;
  }
  .table-card {
    min-height: 420px;
  }
  .lobby-bubble {
    left: auto;
    right: 16px;
    top: 46%;
    max-width: 60%;
  }
}
