:root {
  color-scheme: dark;
  --bg: #0b0b0e;
  --surface: #15151a;
  --surface-2: #1d1d24;
  --border: #2a2a33;
  --text: #ecebe7;
  --muted: #9b99a4;
  --accent: #c8102e;
  --accent-hover: #e2203f;
  --accent-soft: rgba(200, 16, 46, 0.14);
  --gold: #c9a45c;
  --success: #3fae74;
  --danger: #e2533f;
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --topbar-h: 60px;
  --tabbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(200, 16, 46, 0.18), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---------- Postavitev ---------- */

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
}

.app.centered {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 32px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px;
  background: rgba(11, 11, 14, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: .14em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }

.topnav { display: none; gap: 4px; }
.topnav a, .tabbar a {
  color: var(--muted);
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.topnav a { padding: 8px 14px; }
.topnav a:hover, .tabbar a:hover { color: var(--text); text-decoration: none; }
.topnav a.active { color: var(--text); background: var(--surface-2); }

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 11, 14, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .72rem;
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--accent-hover); }

@media (min-width: 768px) {
  .topnav { display: flex; }
  .tabbar { display: none !important; }
  .app { padding-bottom: 48px; }
}

/* ---------- Komponente ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: .85rem; font-weight: 500; color: var(--muted); }

.input, select.input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  user-select: none;
}
.btn:hover { border-color: #3a3a46; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-sm { height: 36px; padding: 0 14px; font-size: .875rem; }

.error {
  color: var(--danger);
  font-size: .875rem;
  min-height: 1.3em;
  margin: 0;
}

.divider { height: 1px; background: var(--border); margin: 20px 0; border: 0; }

/* ---------- Avatar ---------- */

.avatar {
  --size: 40px;
  width: var(--size);
  height: var(--size);
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: calc(var(--size) * 0.4);
  color: #fff;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.avatar-lg { --size: 112px; }
.avatar-sm { --size: 32px; }

/* ---------- Prijava ---------- */

.hero { text-align: center; margin-bottom: 28px; }
.hero img { width: 72px; height: 72px; margin-bottom: 12px; }
.hero h1 {
  font-size: 3rem;
  letter-spacing: .18em;
  margin-bottom: 4px;
}
.hero p { color: var(--muted); font-style: italic; font-family: var(--font-display); font-size: 1.1rem; }

.auth-card { max-width: 400px; width: 100%; margin: 0 auto; }
.lang-switch { display: flex; justify-content: center; gap: 4px; margin-top: 20px; }
.lang-switch button {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: .85rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.lang-switch button.active { color: var(--text); background: var(--surface-2); }

/* ---------- Domov ---------- */

.greeting { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.greeting h1 { margin: 0; font-size: 1.7rem; }

.actions { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .actions { grid-template-columns: 1fr 1fr; } }

/* ---------- Profil ---------- */

.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.profile-head h2 { margin: 0; }

/* ---------- Obrazci ---------- */

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-size: .85rem; font-weight: 500; color: var(--muted); padding: 0; margin-bottom: 6px; }

.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  line-height: 1.4;
}
.choice input { width: 20px; height: 20px; margin: 0; flex: 0 0 auto; accent-color: var(--accent); }

.grid-2, .grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-3 .field label { min-height: 2.6em; display: flex; align-items: flex-end; }

/* ---------- Modalno okno ---------- */

.dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 24px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .7);
}
.dialog::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(3px); }
.dialog h2 { display: flex; align-items: center; gap: 10px; }
.dialog h2 svg { width: 22px; height: 22px; color: var(--gold); }
.dialog-section {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
}
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; position: sticky; bottom: -24px; padding: 12px 0 0; background: var(--surface); }

/* ---------- Seznam sob ---------- */

.btn svg { width: 18px; height: 18px; }

.join-form { display: flex; gap: 8px; }
.join-form .input { flex: 1; min-width: 0; }
.join-form .btn { white-space: nowrap; }
.code-input { text-transform: uppercase; letter-spacing: .25em; font-weight: 600; }
.code-input::placeholder { letter-spacing: normal; font-weight: 400; text-transform: none; }

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  border: 1px solid rgba(200, 16, 46, .4);
  border-radius: var(--radius-sm);
}

.section-title {
  margin: 32px 0 12px;
  font-size: 1.15rem;
}

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

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.room-item:hover:not(:disabled) { border-color: #3a3a46; background: var(--surface-2); }
.room-item:disabled { opacity: .55; cursor: not-allowed; }
.room-item-main { min-width: 0; }
.room-item-name { display: flex; align-items: center; gap: 6px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }

.icon-inline { display: inline-flex; color: var(--gold); }
.icon-inline svg { width: 15px; height: 15px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.badge svg { width: 12px; height: 12px; }
.badge-live { color: var(--accent-hover); border-color: rgba(200, 16, 46, .45); background: var(--accent-soft); }

.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ---------- Soba ---------- */

.room-head { display: flex; flex-direction: column; gap: 16px; }
.room-title { margin: 0 0 6px; font-size: 1.8rem; word-break: break-word; }
.badges { gap: 6px; }

.code-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px dashed #3a3a46;
  border-radius: var(--radius-sm);
}
.code {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: .25em;
  margin-right: -.25em;
  color: var(--gold);
}

@media (min-width: 600px) {
  .room-head { flex-direction: row; align-items: center; justify-content: space-between; }
  .code-box { min-width: 200px; }
}

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h3 { margin: 0; }

.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.member { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: var(--radius-sm); }
.member.offline { opacity: .5; }
.member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.member-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.tag svg { width: 12px; height: 12px; }
.tag-host { color: var(--gold); }
.tag-off { color: var(--danger); }
.member-actions { display: flex; gap: 4px; }

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); color: var(--gold); }
.icon-btn-danger:hover { color: var(--danger); }
.icon-btn svg { width: 16px; height: 16px; }

.role-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: .9rem;
}
.role-chip b { color: var(--muted); font-weight: 600; }
.role-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.role-mafia .dot { background: var(--accent); }
.role-dama .dot { background: #d6457a; }
.role-police .dot { background: #4a8fe0; }
.role-doctor .dot { background: var(--success); }
.role-citizen .dot { background: #a5a3ad; }

.hint-warn { margin: 12px 0 0; color: var(--gold); font-size: .875rem; }

.settings-list { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 0; }
.settings-list div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.settings-list dt { color: var(--muted); }
.settings-list dd { margin: 0; text-align: right; font-weight: 500; }
.timers-line { margin: 12px 0 0; line-height: 1.7; }

.room-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

/* ---------- Igra ---------- */

body.is-night {
  background: radial-gradient(ellipse 70% 40% at 50% -10%, rgba(60, 70, 140, 0.16), transparent 70%), #050507;
}
body.is-night .topbar, body.is-night .tabbar { background: rgba(5, 5, 7, .92); }

.game-bar {
  position: sticky;
  top: calc(var(--topbar-h) + 8px);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: rgba(21, 21, 26, .92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.phase-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.step-label { color: var(--gold); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; }
.countdown {
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  min-width: 4ch;
  text-align: right;
}

.sound-blocked { margin-bottom: 12px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--accent-soft); } }

.narration {
  margin: 0 0 12px;
  padding: 10px 14px;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  border-left: 2px solid var(--gold);
}

.notice {
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.notice-warn { color: var(--gold); border-color: rgba(201, 164, 92, .4); background: rgba(201, 164, 92, .08); }

.morning p { margin: 0; font-size: 1.1rem; font-weight: 600; }
.morning p + p { margin-top: 6px; color: var(--muted); font-weight: 500; }

.result-card p, .win-card h1 { margin: 0; text-align: center; }
.result-card p { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }

.win-card { padding: 32px 20px; text-align: center; }
.win-card h1 { font-size: 2.2rem; }
.win-town { border-color: rgba(63, 174, 116, .5); background: linear-gradient(180deg, rgba(63, 174, 116, .14), var(--surface)); }
.win-mafia { border-color: rgba(200, 16, 46, .55); background: linear-gradient(180deg, rgba(200, 16, 46, .18), var(--surface)); }

/* Vloga */
.role-card { border-width: 1px; }
.role-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.role-name { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.role-hidden { color: var(--border); letter-spacing: .4em; font-size: 1.2rem; padding: 6px 0; }
.role-card.revealed.role-mafia, .role-card.revealed.role-dama { border-color: rgba(200, 16, 46, .55); }
.role-card.revealed.role-mafia .role-name { color: var(--accent-hover); }
.role-card.revealed.role-dama .role-name { color: #e2588d; }
.role-card.revealed.role-police .role-name { color: #5b9cf0; }
.role-card.revealed.role-doctor .role-name { color: var(--success); }
.police-log { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.check { font-size: .9rem; font-weight: 600; }
.check.mafia { color: var(--accent-hover); }
.check.not_mafia { color: var(--success); }

/* Glasovanje */
.vote-grid { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .vote-grid { grid-template-columns: 1fr 1fr; } }
.vote-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px 10px;
  min-height: 56px;
  padding: 10px 14px;
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.vote-option:hover:not(:disabled) { border-color: #3a3a46; }
.vote-option:disabled { cursor: default; }
.vote-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.vote-name { font-weight: 600; }
.vote-count { font-size: 1.25rem; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.vote-voters { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); }

/* Noč */
.night-card h2 { margin-bottom: 14px; }
.target-grid { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
@media (min-width: 520px) { .target-grid { grid-template-columns: 1fr 1fr 1fr; } }
.target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.target.selected { border-color: var(--accent); background: var(--accent-soft); }
.target-name { font-weight: 600; font-size: .9rem; text-align: center; word-break: break-word; }
.target-picks { font-size: .72rem; color: var(--accent-hover); text-align: center; }

.check-result {
  padding: 24px 16px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
}
.check-result.mafia { color: var(--accent-hover); background: var(--accent-soft); }
.check-result.not_mafia { color: var(--success); background: rgba(63, 174, 116, .12); }

.sleep-screen { text-align: center; padding: 48px 16px; }
.sleep-screen p { margin: 0 0 6px; font-family: var(--font-display); font-size: 1.3rem; color: #8d8a99; }
.moon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  box-shadow: inset -18px -6px 0 0 #c9c4b0;
  transform: rotate(-20deg);
  opacity: .8;
}

.member.dead { opacity: .45; }
.member.dead .member-name { text-decoration: line-through; }
.tag-warn { color: var(--gold); }
.role-chip-sm { padding: 4px 10px; font-size: .78rem; }

.game-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 8px; }
.game .btn-block + .card, .game .card + .btn-block { margin-top: 0; }
.game > .btn-block { margin-bottom: 16px; }

/* ---------- Statistika ---------- */

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.segmented a, .segmented button {
  flex: 1;
  padding: 9px 12px;
  text-align: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.segmented a:hover { text-decoration: none; color: var(--text); }
.segmented .active { background: var(--surface-2); color: var(--text); }

.back-link { display: inline-block; margin-bottom: 16px; color: var(--muted); }

.tiles { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
@media (min-width: 600px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.tile-value { font-family: var(--font-display); font-size: 2rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile-label { color: var(--muted); font-size: .85rem; margin-top: 4px; }
.tile-sub { color: var(--gold); font-size: .78rem; margin-top: 4px; }

.bar-row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 8px 0; }
@media (min-width: 520px) { .bar-row { grid-template-columns: 9rem 1fr 8rem; align-items: center; gap: 12px; } }
.bar-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.bar-track { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold); border-radius: 4px; }
.bar-value { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
@media (min-width: 520px) { .bar-value { text-align: right; } }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.role-dot-mafia { background: var(--accent); }
.role-dot-dama { background: #d6457a; }
.role-dot-police { background: #4a8fe0; }
.role-dot-doctor { background: var(--success); }
.role-dot-citizen { background: #a5a3ad; }

.people { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.person { padding: 12px; background: var(--surface-2); border-radius: var(--radius-sm); }
.person-name { display: block; font-weight: 700; margin: 2px 0; color: var(--text); }

.history { display: flex; flex-direction: column; gap: 4px; }
.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  color: var(--text);
}
.history-row:hover { background: var(--surface-2); text-decoration: none; }
.history-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.history-room { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-win { color: var(--success); border-color: rgba(63, 174, 116, .45); background: rgba(63, 174, 116, .12); }

.board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.board-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); color: var(--text); }
.board-row:hover { background: var(--surface-2); text-decoration: none; }
.board-row.me { background: var(--accent-soft); }
.board-rank { width: 1.6em; text-align: center; color: var(--gold); font-weight: 700; }
.board-name { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-value { font-weight: 700; font-variant-numeric: tabular-nums; }

.timeline { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }

/* ---------- Admin ---------- */

.admin-user { flex-wrap: wrap; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; padding-left: 52px; }
@media (min-width: 700px) { .admin-actions { width: auto; padding-left: 0; } }

/* ---------- Obvestila ---------- */

.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
  animation: toast-in .2s ease-out;
}
.toast.error { border-left-color: var(--danger); color: var(--text); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@media (min-width: 768px) { .toasts { bottom: 24px; } }
