/*
 * Wordle service: admin pages and phone pages. One set of tokens, light and dark.
 */

@font-face {
  font-family: 'Inter';
  src: url('/assets/inter-latin.woff2?v=1') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9ecf1;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --fg: #101828;
  --fg-2: #344054;
  --muted: #667085;
  --subtle: #98a2b3;

  --correct: #538d4e;
  --present: #c9a227;
  --absent: #787c7e;
  --brand: #3f8a3a;
  --brand-strong: #2f6f2b;
  --brand-soft: #e8f3e6;
  --success: #16803c;
  --success-soft: #e6f4ea;
  --warning: #b54708;
  --warning-soft: #fef4e6;
  --danger: #c4320a;
  --danger-soft: #fdecea;
  --info: #175cd3;
  --info-soft: #eaf2ff;

  --sidebar: #0d1014;
  --sidebar-fg: #c9ced6;
  --sidebar-muted: #7d8590;
  --sidebar-active: #1b2027;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06);
  --shadow: 0 1px 3px rgb(16 24 40 / 0.08), 0 4px 12px rgb(16 24 40 / 0.05);
  --shadow-lg: 0 12px 32px rgb(16 24 40 / 0.14);
  --ring: 0 0 0 4px rgb(63 138 58 / 0.18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --surface: #13161b;
    --surface-2: #1a1e24;
    --surface-3: #232831;
    --border: #252a32;
    --border-strong: #343a44;
    --fg: #eef0f3;
    --fg-2: #d0d5dd;
    --muted: #98a2b3;
    --subtle: #667085;
    --absent: #3d4148;
    --brand: #5aa354;
    --brand-strong: #74bd6d;
    --brand-soft: #172a17;
    --success: #4cc675;
    --success-soft: #11291a;
    --warning: #f5a524;
    --warning-soft: #2c2010;
    --danger: #f97066;
    --danger-soft: #331715;
    --info: #6aa8ff;
    --info-soft: #132238;
    --sidebar: #08090b;
    --sidebar-active: #171b21;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow: 0 1px 3px rgb(0 0 0 / 0.5), 0 4px 12px rgb(0 0 0 / 0.25);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / 0.5);
    --ring: 0 0 0 4px rgb(90 163 84 / 0.25);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--fg);
}

p {
  margin: 0;
}

code {
  font: 12.5px ui-monospace, 'SF Mono', Menlo, monospace;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
}

.muted {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  fill: currentColor;
  flex: none;
}

/* ----- tiles (the Wordle letters, used everywhere) ----------------------------------------------- */

.tiles {
  display: inline-flex;
  gap: 0.18em;
  vertical-align: middle;
}

.tile {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: 0.28em;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
}

.tiles-xs {
  font-size: 9px;
}
.tiles-sm {
  font-size: 11px;
}
.tiles-md {
  font-size: 15px;
}
.tiles-lg {
  font-size: 22px;
}

.tile.correct {
  background: var(--correct);
}
.tile.present {
  background: var(--present);
}
.tile.absent {
  background: var(--absent);
}
.tile.plain {
  background: var(--surface);
  color: var(--fg);
  box-shadow: inset 0 0 0 2px var(--border-strong);
}
.tile.empty {
  background: transparent;
  box-shadow: inset 0 0 0 2px var(--border);
}

.tiles-animate .tile {
  animation: flip-in 0.45s calc(var(--i) * 80ms) ease-out both;
}

@keyframes flip-in {
  from {
    transform: rotateX(90deg);
  }
  to {
    transform: rotateX(0);
  }
}

.mini {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  vertical-align: middle;
}

.mini-row {
  display: flex;
  gap: 2px;
}

.mini i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--surface-3);
}

.mini i.correct {
  background: var(--correct);
}
.mini i.present {
  background: var(--present);
}
.mini i.absent {
  background: var(--absent);
}
.mini i.empty {
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border);
}

/* ----- admin shell -------------------------------------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px 14px;
  background: var(--sidebar);
  color: var(--sidebar-fg);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px;
  color: #fff;
}

.brand:hover {
  text-decoration: none;
}

.brand .tiles {
  font-size: 15px;
}

.brand span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand small {
  color: var(--sidebar-muted);
  font-size: 12px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: 9px;
  color: var(--sidebar-fg);
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--sidebar-active);
  color: #fff;
  text-decoration: none;
}

.nav a.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--correct);
}

.nav a .icon {
  color: var(--sidebar-muted);
}

.nav a.active .icon {
  color: var(--correct);
}

.nav-section {
  margin: 18px 11px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 8px 4px;
  border-top: 1px solid #1d2229;
}

.sidebar-user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
  flex: 1;
}

.sidebar-user-text strong {
  color: #fff;
  font-size: 13px;
}

.sidebar-user-text small {
  color: var(--sidebar-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  color: var(--sidebar-muted);
  padding: 6px;
  border-radius: 8px;
  display: grid;
}

.sidebar-logout:hover {
  color: #fff;
  background: var(--sidebar-active);
}

.content {
  min-width: 0;
  padding: 32px 40px 72px;
  max-width: 1320px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: page-in 0.3s ease-out both;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
  }
  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    order: 3;
    width: 100%;
  }
  .nav-section {
    display: none;
  }
  .sidebar-user {
    margin-left: auto;
    border: 0;
    padding: 0;
  }
  .sidebar-user-text {
    display: none;
  }
  .content {
    padding: 20px 16px 48px;
  }
}

/* ----- page header -------------------------------------------------------------------------------- */

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

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  width: fit-content;
}

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

.page-header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.page-header-text {
  flex: 1;
  min-width: 240px;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 750;
  line-height: 1.2;
}

.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--muted);
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ----- cards, grids ------------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 0;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 650;
}

.card-header p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-body {
  padding: 18px 22px 22px;
}

.card-flush .card-body {
  padding: 12px 0 0;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.grid-main {
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr);
  align-items: start;
}

.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

@media (max-width: 1100px) {
  .grid-main,
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ----- stats -------------------------------------------------------------------------------------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.stat {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
}

.stat-icon .icon {
  width: 21px;
  height: 21px;
}

.tone-neutral {
  background: var(--surface-2);
  color: var(--fg-2);
}
.tone-brand,
.tone-success {
  background: var(--brand-soft);
  color: var(--brand);
}
.tone-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.tone-info {
  background: var(--info-soft);
  color: var(--info);
}
.tone-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.25;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-hint {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 2px;
}

.trend {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  padding: 1px 6px 1px 2px;
  border-radius: 999px;
}

.trend.up {
  color: var(--success);
  background: var(--success-soft);
}

.trend.down {
  color: var(--danger);
  background: var(--danger-soft);
}

/* ----- chart -------------------------------------------------------------------------------------- */

.chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  height: 200px;
  padding-top: 18px;
  border-bottom: 1px solid var(--border);
  background: repeating-linear-gradient(to top, transparent 0, transparent 49px, var(--border) 49px, var(--border) 50px);
}

.chart-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  min-height: 3px;
  border-radius: 7px 7px 2px 2px;
  background: var(--surface-3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  transform-origin: bottom;
  animation: grow 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.chart-col:nth-child(n) .chart-bar {
  animation-delay: calc(var(--n, 0) * 1ms);
}

.chart-won {
  width: 100%;
  background: linear-gradient(to top, var(--correct), color-mix(in srgb, var(--correct) 70%, white));
}

.chart-col.today .chart-bar {
  box-shadow: 0 0 0 2px var(--present);
}

@keyframes grow {
  from {
    transform: scaleY(0);
  }
}

.chart-value {
  font-size: 11px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.chart-label {
  position: absolute;
  bottom: -22px;
  font-size: 11px;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  font-size: 12.5px;
  color: var(--muted);
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--surface-3);
}

.chart-legend i.won {
  background: var(--correct);
}

/* ----- buttons ------------------------------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  border-radius: 10px;
  padding: 10px 15px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.05s, color 0.15s;
  text-decoration: none !important;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-sm {
  padding: 7px 11px;
  font-size: 13px;
  border-radius: 9px;
}

.btn-icon {
  padding: 8px;
}

.btn-sm.btn-icon {
  padding: 6px;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.1), inset 0 1px 0 rgb(255 255 255 / 0.15);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  background: var(--surface);
  color: var(--fg-2);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--fg);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.08);
}

.btn-danger-ghost {
  background: transparent;
  color: var(--danger);
}

.btn-danger-ghost:hover {
  background: var(--danger-soft);
}

.inline-form {
  display: inline;
  margin: 0;
}

/* ----- badges, avatars, people -------------------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge .icon {
  width: 13px;
  height: 13px;
}

.badge-neutral {
  background: var(--surface-2);
  color: var(--fg-2);
  box-shadow: inset 0 0 0 1px var(--border);
}
.badge-success {
  background: var(--success-soft);
  color: var(--success);
}
.badge-brand {
  background: var(--brand-soft);
  color: var(--brand);
}
.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge-info {
  background: var(--info-soft);
  color: var(--info);
}

.avatar {
  --avatar: var(--absent);
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--avatar);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.avatar-sm {
  width: 28px;
  height: 28px;
  font-size: 11px;
}
.avatar-md {
  width: 36px;
  height: 36px;
  font-size: 13px;
}
.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 22px;
  box-shadow: 0 0 0 4px var(--surface), 0 0 0 5px var(--border);
}

.avatar.anonymous {
  background: var(--surface-3);
  color: var(--muted);
}

.avatar.anonymous .icon {
  width: 60%;
  height: 60%;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 550;
  color: var(--fg);
  min-width: 0;
}

.person span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ----- tables ------------------------------------------------------------------------------------- */

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  padding: 10px 16px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table th:first-child,
.table td:first-child {
  padding-left: 22px;
}

.table th:last-child,
.table td:last-child {
  padding-right: 22px;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.12s;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.table tr[data-href] {
  cursor: pointer;
}

.table .end {
  text-align: right;
}

.table .num {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.cell-stack small {
  color: var(--muted);
  font-size: 12.5px;
}

.row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.rank {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}

.rank-1 {
  background: var(--present);
  color: #fff;
}
.rank-2,
.rank-3 {
  background: var(--surface-3);
  color: var(--fg);
}

.streak {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #ea580c;
  font-weight: 650;
}

.streak .icon {
  width: 15px;
  height: 15px;
}

/* ----- tabs, filters, pagination ------------------------------------------------------------------ */

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 550;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--fg);
  text-decoration: none;
}

.tabs a.active {
  color: var(--fg);
  border-bottom-color: var(--brand);
}

.tab-count {
  font-size: 11.5px;
  font-weight: 650;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 0 22px 16px;
}

.filters select,
.filters input {
  width: auto;
  min-width: 150px;
}

.search {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--subtle);
}

.search input[type='search'] {
  padding-left: 36px;
  width: 100%;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

/* ----- forms -------------------------------------------------------------------------------------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-2);
}

.hint {
  color: var(--muted);
  font-size: 12.5px;
}

input[type='text'],
input[type='email'],
input[type='number'],
input[type='search'],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: var(--ring);
}

select:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

textarea {
  min-height: 300px;
  resize: vertical;
  font: 13.5px/1.6 ui-monospace, 'SF Mono', Menlo, monospace;
  text-transform: uppercase;
}

.textarea-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.toggle {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
}

.toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-track {
  flex: none;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  position: relative;
  transition: background 0.2s;
  margin-top: 1px;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 0.2s cubic-bezier(0.3, 0.7, 0.4, 1.3);
}

.toggle input:checked + .toggle-track {
  background: var(--brand);
  box-shadow: none;
}

.toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(16px);
}

.toggle input:focus-visible + .toggle-track {
  box-shadow: var(--ring);
}

.toggle-text {
  display: flex;
  flex-direction: column;
  line-height: 1.4;
}

.toggle-text strong {
  font-weight: 600;
  font-size: 14px;
}

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

.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border);
  width: fit-content;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 550;
  font-size: 13.5px;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.segmented input:checked + span {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow);
}

.segmented input:focus-visible + span {
  box-shadow: var(--ring);
}

.form-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

/* ----- callouts, toasts, empty states ------------------------------------------------------------- */

.callout {
  display: flex;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.5;
}

.callout .icon {
  margin-top: 1px;
}

.callout-info {
  background: var(--info-soft);
  color: var(--info);
}
.callout-warning {
  background: var(--warning-soft);
  color: var(--warning);
}
.callout-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.callout div {
  color: var(--fg-2);
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 16px;
  border-radius: var(--radius);
  background: var(--fg);
  color: var(--bg);
  box-shadow: var(--shadow-lg);
  font-weight: 550;
  animation: toast-in 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  max-width: min(440px, calc(100vw - 40px));
}

.toast-success .icon:first-child {
  color: #4cc675;
}
.toast-danger .icon:first-child {
  color: #f97066;
}

.toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.6;
  cursor: pointer;
  padding: 4px;
  display: grid;
  border-radius: 6px;
}

.toast-close:hover {
  opacity: 1;
}

.toast.hide {
  animation: toast-out 0.25s ease-in forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.96);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-12px);
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
}

.empty-state h3 {
  font-size: 16px;
  margin-top: 8px;
}

.empty-state p {
  color: var(--muted);
  max-width: 420px;
}

.empty-state .btn {
  margin-top: 8px;
}

/* ----- confirm dialog (admin.js) ------------------------------------------------------------------ */

dialog.confirm {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(420px, calc(100vw - 32px));
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
}

dialog.confirm::backdrop {
  background: rgb(8 10 14 / 0.55);
  backdrop-filter: blur(3px);
}

dialog.confirm[open] {
  animation: toast-in 0.25s ease-out both;
}

.confirm-body {
  padding: 22px 22px 18px;
  display: flex;
  gap: 14px;
}

.confirm-body .stat-icon {
  width: 42px;
  height: 42px;
}

.confirm-body h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.confirm-body p {
  color: var(--muted);
  font-size: 14px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 22px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

/* ----- word lists --------------------------------------------------------------------------------- */

.list-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.list-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.list-card h3 {
  font-size: 17px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.current-word {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
}

.current-word-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-weight: 550;
}

.upcoming {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.upcoming-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.list-card-foot strong {
  color: var(--fg);
}

/* ----- plan (timeline of the next words) ---------------------------------------------------------- */

.plan {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.plan-item {
  display: grid;
  grid-template-columns: 22px 104px max-content minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  position: relative;
  background: var(--surface);
  transition: background 0.15s, box-shadow 0.15s;
}

.plan-item:first-child {
  border-top: 0;
}

.plan-item.current {
  background: linear-gradient(90deg, var(--brand-soft), transparent 70%);
}

.plan-item.dragging {
  opacity: 0.5;
}

.plan-item.drop-target {
  box-shadow: inset 0 3px 0 var(--brand);
}

.plan-handle {
  color: var(--subtle);
  cursor: grab;
  display: grid;
  place-items: center;
}

.plan-handle.locked {
  cursor: default;
}

.plan-when {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.plan-when strong {
  font-size: 15px;
}

.plan-when small {
  color: var(--muted);
  font-size: 12.5px;
}

.plan-word {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.plan-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.plan-word .note {
  font-size: 12px;
  color: var(--muted);
}

.plan-actions {
  display: flex;
  gap: 2px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.plan-set {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

.plan-set input {
  width: 92px;
  padding: 6px 9px;
  font-size: 13px;
  text-transform: uppercase;
}

@media (max-width: 1250px) {
  .plan-item {
    grid-template-columns: 22px 104px minmax(0, 1fr);
  }
  .plan-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }
}

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

.attempts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attempt {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  gap: 14px;
  align-items: center;
}

.attempt-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attempt.rejected .tiles {
  opacity: 0.55;
}

.attempt.rejected .tile {
  text-decoration: line-through;
}

.attempt-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px 18px;
  margin: 0;
  font-size: 14px;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-weight: 550;
  min-width: 0;
}

.result-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 26px 20px;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 0, var(--brand-soft), transparent 70%), var(--surface-2);
  text-align: center;
}

.result-hero.lost {
  background: radial-gradient(circle at 50% 0, var(--danger-soft), transparent 70%), var(--surface-2);
}

.result-hero h2 {
  font-size: 20px;
}

.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}

.danger-zone .card-header h2 {
  color: var(--danger);
}

.copy-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.copy-field code {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 8px 10px;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.word-cloud code {
  font-size: 12px;
}

/* ----- phone pages -------------------------------------------------------------------------------- */

body.phone {
  min-height: 100vh;
  background: radial-gradient(circle at 50% -10%, color-mix(in srgb, var(--correct) 22%, transparent), transparent 55%), var(--bg);
}

.phone-main {
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 18px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.phone-brand .tiles {
  font-size: 13px;
}

.phone-brand .tile {
  animation: flip-in 0.45s calc(var(--i) * 80ms) ease-out both;
}

.sheet {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: page-in 0.35s ease-out both;
}

.sheet h1 {
  font-size: 23px;
  line-height: 1.25;
}

.sheet .lead {
  color: var(--muted);
}

.sheet .btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 12px;
}

.sheet .btn-ghost {
  padding: 10px;
  font-size: 15px;
}

.sheet input[type='text'] {
  padding: 13px 14px;
  font-size: 17px;
  border-radius: 12px;
}

.sheet input.code {
  font-size: 28px;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.sheet-icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 4px;
}

.sheet-icon .icon {
  width: 32px;
  height: 32px;
}

.sheet.center {
  text-align: center;
}

.success-pop {
  animation: pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

.phone-footer {
  color: var(--subtle);
  font-size: 12px;
}

.screen-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--fg-2);
  font-size: 13px;
  font-weight: 550;
  width: fit-content;
}

/* Small secondary links under a phone sheet ("Nickname ändern · Dieses Handy abmelden") */
.sheet-links {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.sheet-links a {
  white-space: nowrap;
  color: var(--fg-2);
  font-weight: 550;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ----- dashboard feed ----------------------------------------------------------------------------- */

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-head h2 {
  font-size: 18px;
}

.feed {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}

.feed a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  color: inherit;
  transition: background 0.12s;
}

.feed a:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.feed-main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.feed-main strong {
  font-weight: 600;
}

.feed-main small {
  color: var(--muted);
  font-size: 12.5px;
}

.feed-result {
  width: 40px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 750;
  font-size: 13px;
  background: var(--surface-2);
  color: var(--muted);
}

.feed-result.won {
  background: var(--correct);
  color: #fff;
}

.feed-result.lost {
  background: var(--absent);
  color: #fff;
}

.explain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 13.5px;
  color: var(--fg-2);
}

.explain li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.explain .icon {
  flex: none;
  width: 30px;
  height: 30px;
  padding: 6px;
  border-radius: 9px;
  background: var(--surface-2);
  color: var(--brand);
}

.plan-item {
  animation: page-in 0.35s ease-out both;
}

.center-text {
  text-align: center;
}

.sheet.center {
  align-items: center;
}

.sheet input::placeholder {
  color: var(--subtle);
  opacity: 0.55;
}

/* ----- website: landing and game ------------------------------------------------------------------ */

body.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% -20%, color-mix(in srgb, var(--correct) 18%, transparent), transparent 50%), var(--bg);
}

.site-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.site-brand:hover {
  text-decoration: none;
}

.site-brand .tiles {
  font-size: 12px;
}

.site-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px 48px;
}

.site-footer {
  text-align: center;
  color: var(--subtle);
  font-size: 12.5px;
  padding: 20px;
}

.site-footer a {
  color: inherit;
}

.landing {
  max-width: 620px;
  margin: 6vh auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  animation: page-in 0.4s ease-out both;
}

.landing-tiles .tiles {
  font-size: clamp(22px, 6vw, 34px);
}

.landing h1 {
  font-size: clamp(30px, 6vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.landing .lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 520px;
}

.landing-actions .btn {
  padding: 14px 22px;
  font-size: 16px;
  border-radius: 12px;
}

.landing-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

.landing-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-2);
}

.play-loading {
  display: grid;
  place-items: center;
  min-height: 50vh;
}

.play-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  animation: page-in 0.35s ease-out both;
}

@media (max-width: 960px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.play-main {
  padding: 24px clamp(14px, 3vw, 32px) 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.play-switch {
  align-self: center;
  flex-wrap: wrap;
}

.play-head {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.play-head h1 {
  font-size: clamp(22px, 4vw, 28px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.play-head h1 .icon {
  color: var(--brand);
}

.play-sub {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.play-stage {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  min-height: 420px;
  justify-content: center;
}

.board {
  --cell: min(62px, calc((min(100vw, 560px) - 64px) / var(--cols) - 6px));
  display: grid;
  gap: 6px;
}

.board-row {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--cell));
  gap: 6px;
}

.board .cell {
  width: var(--cell);
  height: var(--cell);
  border-radius: 8px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: calc(var(--cell) * 0.5);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--fg);
  background: var(--surface);
}

.board .cell.filled {
  border-color: var(--muted);
}

.board .cell.correct,
.board .cell.present,
.board .cell.absent {
  color: #fff;
  border-color: transparent;
}

.board .cell.correct {
  background: var(--correct);
}
.board .cell.present {
  background: var(--present);
}
.board .cell.absent {
  background: var(--absent);
}

.board .cell.pop {
  animation: cell-pop 0.1s ease-out;
}

.board .cell.flip {
  animation: cell-flip 0.32s var(--delay, 0ms) ease-in-out both;
}

.board .cell.bounce {
  animation: cell-bounce 0.6s var(--delay, 0ms) ease both;
}

.board-row.shake {
  animation: row-shake 0.45s ease;
}

@keyframes cell-pop {
  50% {
    transform: scale(1.1);
  }
}

@keyframes cell-flip {
  50% {
    transform: rotateX(90deg);
  }
}

@keyframes cell-bounce {
  40% {
    transform: translateY(-30%);
  }
  60% {
    transform: translateY(5%);
  }
}

@keyframes row-shake {
  20%,
  80% {
    transform: translateX(3px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-5px);
  }
  40%,
  60% {
    transform: translateX(5px);
  }
}

.keys {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.keys-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}

.key {
  flex: 1 1 0;
  max-width: 46px;
  height: 54px;
  border: 0;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--fg);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  transition: background 0.2s, transform 0.05s;
  padding: 0;
}

.key:active {
  transform: scale(0.95);
}

.key-wide {
  max-width: 72px;
  flex-grow: 1.6;
  font-size: 13px;
}

.key .icon {
  width: 22px;
  height: 22px;
}

.key.correct {
  background: var(--correct);
  color: #fff;
}
.key.present {
  background: var(--present);
  color: #fff;
}
.key.absent {
  background: var(--absent);
  color: #fff;
  opacity: 0.55;
}

.play-toast {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translate(-50%, -8px);
  opacity: 0;
  pointer-events: none;
  background: var(--fg);
  color: var(--bg);
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 40;
}

.play-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.play-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 28px 20px;
  width: 100%;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at 50% 0, var(--brand-soft), transparent 70%), var(--surface-2);
  animation: page-in 0.35s ease-out both;
}

.play-result.lost {
  background: radial-gradient(circle at 50% 0, var(--danger-soft), transparent 70%), var(--surface-2);
}

.play-result h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.play-result .tiles {
  font-size: clamp(18px, 5vw, 26px);
}

.mini-lg i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.mini-lg,
.mini-lg .mini-row {
  gap: 3px;
}

.play-points {
  font-size: 26px;
  font-weight: 800;
  color: var(--brand);
}

.play-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.play-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.play-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.play-stat-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 24px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.play-stat-value .icon {
  width: 18px;
  height: 18px;
  color: var(--present);
}

.play-stat:first-child .icon {
  color: #ea580c;
}

.play-stat-label {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.play-note {
  grid-column: 1 / -1;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

.play-board {
  list-style: none;
  margin: 0;
  padding: 0;
}

.play-board li {
  display: grid;
  grid-template-columns: 30px 1fr auto 36px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}

.play-board li:last-child {
  border-bottom: 0;
}

.play-board li.me .name {
  color: var(--brand);
  font-weight: 700;
}

.play-board .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 550;
}

.play-board .points {
  text-align: right;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.play-switch:empty {
  display: none;
}

@media (max-width: 560px) {
  .site-bar {
    padding: 12px 16px;
  }
  .site-user > span:not(.avatar),
  .site-user .btn span {
    display: none;
  }
  .site-main {
    padding: 4px 12px 32px;
  }
  .play-main {
    padding: 18px 10px 22px;
  }
  .key {
    height: 50px;
  }
}

.play-intro {
  margin: 6px 0 2px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  max-width: 100%;
}

.list-card-intro {
  color: var(--muted);
  font-size: 13.5px;
  margin-top: 6px;
}
