:root {
  --line-preview: #c4bdb3;
}

[data-theme="dark"] {
  --line-preview: #6b635a;
}

[data-theme="dark"] .status-banner--error {
  color: #ffb4b4;
  background: #3a2222;
  border-color: #5c3535;
}

[data-theme="dark"] .game-modal__title--lost {
  color: #f0a050;
}

[data-theme="dark"] .ttt-cell--win {
  background: rgba(224, 139, 46, 0.22);
}

[data-theme="dark"] .hex-board .hex-cell--p1-edge {
  fill: rgba(215, 25, 28, 0.12);
}

[data-theme="dark"] .hex-board .hex-cell--p2-edge {
  fill: rgba(43, 131, 186, 0.14);
}

[data-theme="dark"] .hex-board .hex-cell--p1-edge.hex-cell--p2-edge {
  fill: rgba(171, 221, 164, 0.1);
}

/* PaperDot — shared game room layout */

.page--game {
  max-width: 68rem;
  padding: 1rem 1.25rem 2rem;
}

.game-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  gap: 1rem;
  align-items: stretch;
  min-height: calc(100vh - var(--header-height) - 7rem);
}

/* Main board area */

.game-main {
  display: flex;
  min-width: 0;
  min-height: 28rem;
}

.game-board-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.game-board {
  display: block;
  max-width: 100%;
  max-height: 100%;
  touch-action: none;
  user-select: none;
}

.game-board .dot-hit {
  fill: transparent;
  cursor: crosshair;
}

.game-board .dot-hit--active {
  fill: rgba(44, 40, 36, 0.08);
}

[data-theme="dark"] .game-board .dot-hit--active {
  fill: rgba(242, 236, 228, 0.08);
}

.game-board.is-disabled .dot-hit {
  cursor: default;
  pointer-events: none;
}

.game-board .dot {
  fill: var(--ink-muted);
  pointer-events: none;
}

.game-board .line-preview {
  stroke: var(--line-preview, #c4bdb3);
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  pointer-events: none;
}

.sidebar-score-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Sidebar */

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.game-sidebar__card {
  padding: 1rem 1.05rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.turn-banner {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.65rem;
  background: var(--paper-dark);
  color: var(--ink-muted);
}

.turn-banner--yours {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.players-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.player-block {
  position: relative;
}

.player-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border: 1.5px solid transparent;
  border-radius: 0.65rem;
  transition: border-color 0.15s, background 0.15s;
}

.player-row--active {
  border-color: var(--border);
  background: var(--paper);
}

.player-row--you .player-name {
  font-weight: 600;
}

.player-color {
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border: 2px solid rgba(44, 40, 36, 0.12);
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.player-color:disabled {
  cursor: default;
}

.player-color:not(:disabled):hover {
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px rgba(44, 40, 36, 0.15);
}

.player-name {
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-score {
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 1.25rem;
  text-align: right;
}

.player-score--mark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  min-width: 1.75rem;
  text-align: center;
}

/* Noughts & crosses */

.game-board-wrap--ttt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(72vw, 20rem);
}

.ttt-board {
  --ttt-size: min(72vw, 18rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: var(--ttt-size);
  height: var(--ttt-size);
  flex-shrink: 0;
  background: var(--card);
  border: 2px solid var(--ink-muted);
  border-radius: 0.65rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ttt-board.is-disabled .ttt-cell--playable {
  cursor: default;
}

.ttt-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--border);
  cursor: default;
  overflow: hidden;
}

.ttt-cell--playable {
  cursor: pointer;
}

.ttt-cell--playable:hover {
  background: var(--paper-dark);
}

.ttt-cell--win {
  background: rgba(254, 224, 139, 0.42);
}

.ttt-mark {
  font-family: "Fraunces", Georgia, serif;
  font-size: calc(var(--ttt-size) / 3 * 0.62);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.ttt-series__heading {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.ttt-series__grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.5rem;
  align-items: start;
}

.ttt-series__player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.ttt-series__player:last-child {
  text-align: right;
}

.ttt-series__mark {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1;
}

.ttt-series__value {
  font-size: 1.45rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ttt-series__name {
  font-size: 0.78rem;
  color: var(--ink-muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.ttt-series__draws {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding-top: 0.15rem;
}

.ttt-series__draws-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.player-score--goal {
  font-size: 1.05rem;
  font-weight: 600;
  min-width: 1.75rem;
  text-align: center;
}

/* Hangman */

.game-board-wrap--hangman {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

.hangman-board {
  width: 100%;
  max-width: 36rem;
  padding: 0.5rem 0;
}

.hangman-board.is-disabled .hangman-key--playable,
.hangman-board.is-disabled .hangman-resolve__input,
.hangman-board.is-disabled .hangman-resolve .btn {
  cursor: default;
}

.hangman-board__top {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.hangman-gallows {
  width: min(9rem, 34vw);
  height: auto;
  flex-shrink: 0;
}

.hangman-gallows__frame,
.hangman-gallows__part {
  stroke: var(--ink);
  stroke-linecap: round;
  fill: none;
}

.hangman-gallows__part {
  transition: opacity 0.25s ease;
}

[data-theme="dark"] .hangman-gallows__frame,
[data-theme="dark"] .hangman-gallows__part {
  stroke: var(--ink);
}

.hangman-board__info {
  flex: 1;
  min-width: min(100%, 14rem);
  text-align: center;
}

.hangman-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.75rem;
}

.hangman-word__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0.15rem;
}

.hangman-word__letter--blank {
  color: var(--ink-muted);
}

.hangman-wrong,
.hangman-strikes {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.hangman-wrong__none {
  font-style: italic;
}

.hangman-keyboard {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.35rem;
  margin-bottom: 1rem;
}

@media (max-width: 520px) {
  .hangman-keyboard {
    grid-template-columns: repeat(7, 1fr);
  }
}

.hangman-key {
  aspect-ratio: 1;
  padding: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  cursor: default;
}

.hangman-key--playable {
  cursor: pointer;
  background: var(--paper);
}

.hangman-key--playable:hover {
  background: var(--paper-dark);
  border-color: var(--ink-muted);
}

.hangman-key--used {
  opacity: 0.35;
}

.hangman-resolve {
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.hangman-resolve__hint {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  text-align: center;
}

.hangman-resolve__form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hangman-resolve__input {
  flex: 1 1 10rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
}

.hangman-resolve__input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

/* Hex */

.game-board-wrap--hex {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(72vw, 22rem);
  overflow: hidden;
}

.hex-board {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

.hex-board .hex-cell {
  fill: var(--paper);
  stroke: var(--border);
  stroke-width: 1.2;
  cursor: default;
}

.hex-board .hex-cell--p1-edge {
  fill: rgba(158, 1, 66, 0.07);
}

.hex-board .hex-cell--p2-edge {
  fill: rgba(50, 136, 189, 0.08);
}

.hex-board .hex-cell--p1-edge.hex-cell--p2-edge {
  fill: rgba(94, 79, 162, 0.08);
}

.hex-board .hex-cell--playable {
  cursor: pointer;
}

.hex-board .hex-cell--playable:hover {
  fill: var(--paper-dark);
}

.hex-board.is-disabled .hex-cell--playable {
  cursor: default;
}

.hex-board .hex-stone {
  pointer-events: none;
}

.player-waiting {
  font-size: 0.95rem;
  color: var(--ink-muted);
  font-style: italic;
  padding: 0.55rem 0.65rem;
}

.color-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.4rem;
  margin-top: 0.5rem;
  padding: 0.55rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
}

.color-picker[hidden] {
  display: none;
}

.color-option {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s, opacity 0.1s;
}

.color-option:hover:not(:disabled) {
  transform: scale(1.1);
}

.color-option.is-selected {
  border-color: var(--ink);
  box-shadow: 0 0 0 2px var(--card);
}

.color-option:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.sidebar-actions .btn {
  width: 100%;
  text-align: center;
}

.btn--forfeit {
  color: var(--ink-muted);
}

.btn--forfeit:hover {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.06);
}

/* How to play accordion */

.how-to {
  overflow: hidden;
}

.how-to__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.15s;
}

.how-to__toggle:hover {
  background: var(--paper);
}

.how-to__toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.how-to__chevron {
  font-size: 0.75rem;
  color: var(--ink-muted);
  transition: transform 0.2s;
}

.how-to__toggle[aria-expanded="true"] .how-to__chevron {
  transform: rotate(180deg);
}

.how-to__panel {
  padding: 0 1rem 1rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  box-shadow: var(--shadow);
}

.how-to__panel[hidden] {
  display: none;
}

.how-to__panel p {
  margin: 0 0 0.65rem;
}

.how-to__panel p:last-child {
  margin-bottom: 0;
}

/* In-game chat */

.game-chat {
  overflow: hidden;
}

.game-chat__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background 0.15s;
}

.game-chat__toggle:hover {
  background: var(--paper);
}

.game-chat__toggle[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}

.game-chat__panel {
  padding: 0.75rem 1rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  box-shadow: var(--shadow);
}

.game-chat__panel[hidden] {
  display: none;
}

.game-chat__log {
  max-height: 9.5rem;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.65rem;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
}

.game-chat__empty {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-style: italic;
}

.game-chat__message + .game-chat__message {
  margin-top: 0.55rem;
}

.game-chat__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.1rem;
}

.game-chat__name {
  font-size: 0.78rem;
  font-weight: 600;
}

.game-chat__time {
  font-size: 0.72rem;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.game-chat__body {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  word-break: break-word;
}

.game-chat__emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.game-chat__emoji {
  width: 2rem;
  height: 2rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}

.game-chat__emoji:hover:not(:disabled) {
  background: var(--paper-dark);
  transform: scale(1.06);
}

.game-chat__emoji:disabled {
  opacity: 0.4;
  cursor: default;
}

.game-chat__compose {
  display: flex;
  gap: 0.45rem;
}

.game-chat__input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
}

.game-chat__input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.game-chat__send {
  flex-shrink: 0;
  padding: 0.5rem 0.85rem;
  font-size: 0.82rem;
}

.game-chat__send:disabled,
.game-chat__input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Play-next invite overlay */

.play-next-overlay {
  z-index: 1200;
}

.game-modal__dialog--invite {
  max-width: 22rem;
}

.game-modal__dialog--invite .game-modal__title {
  font-size: 1.15rem;
  line-height: 1.35;
}

/* End-game modal */

.game-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--overlay);
}

.game-modal[hidden] {
  display: none;
}

.game-modal__dialog {
  width: 100%;
  max-width: 22rem;
  padding: 1.75rem 1.5rem 1.35rem;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
  box-shadow: var(--shadow-hover);
}

.game-modal__title {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
}

.game-modal__title--won {
  color: var(--accent);
}

.game-modal__title--lost {
  color: #b45309;
}

.game-modal__scores {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.game-modal__scores strong {
  color: var(--ink);
}

.game-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.game-modal__actions .btn {
  width: 100%;
}

.game-modal__message {
  margin: 0 0 1.35rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.game-modal__actions--row {
  flex-direction: row;
  gap: 0.55rem;
}

.game-modal__actions--row .btn {
  flex: 1;
  width: auto;
}

.btn--danger {
  color: #fff;
  background: #b42318;
}

.btn--danger:hover {
  background: #912018;
}

.game-modal__other {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.game-modal__other .btn {
  font-size: 0.82rem;
  padding: 0.5rem 0.65rem;
}

.btn--secondary {
  color: var(--ink);
  background: var(--paper-dark);
}

.btn--secondary:hover {
  background: var(--border);
}

/* Setup / status */

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn:disabled:hover {
  background: var(--accent);
}

.status-banner {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.status-banner--error {
  color: #8b2f2f;
  background: #fdeeee;
  border-color: #e8bcbc;
}

.setup-card {
  max-width: 28rem;
  margin: 0 auto;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.setup-card h1 {
  margin: 0 0 0.35rem;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.5rem;
}

.setup-card p {
  margin: 0 0 1rem;
  color: var(--ink-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
  text-align: left;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input {
  padding: 0.55rem 0.75rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
}

.setup-choices {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.setup-choice {
  flex: 1;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  cursor: pointer;
}

.setup-choice.is-selected {
  border-color: var(--ink);
  background: var(--paper);
  font-weight: 600;
}

.field[hidden],
.setup-bot-options[hidden] {
  display: none !important;
}

.setup-bot-options {
  border: none;
  padding: 0;
  margin: 0 0 1rem;
}

.field__legend {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.difficulty-options {
  display: flex;
  gap: 0.5rem;
}

.difficulty-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  font-size: 0.9rem;
  cursor: pointer;
}

.difficulty-option:has(input:checked) {
  border-color: var(--ink);
  background: var(--paper);
  font-weight: 600;
}

.difficulty-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.invite-box {
  padding: 0.85rem 1rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 0.65rem;
}

.invite-box__heading {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.invite-box__hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.invite-box__row {
  display: flex;
  gap: 0.5rem;
}

.invite-box__input {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  font: inherit;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input-bg);
  color: var(--ink-muted);
}

.field input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .game-room {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .game-main {
    min-height: 22rem;
  }

  .game-sidebar {
    order: -1;
  }
}

@media (max-width: 420px) {
  .game-modal__other {
    grid-template-columns: 1fr;
  }
}
