:root {
  color-scheme: dark;
  --bg: #131233;
  --bg-2: #1c1a4a;
  --panel: #201d54;
  --panel-2: #2a2670;
  --text: #f5f3ff;
  --muted: #b3aee0;
  --line: rgba(255,255,255,.10);
  --purple: #8c5cf5;
  --pink: #fd6bb0;
  --teal: #2fd9c6;
  --amber: #ffb545;
  --coral: #ff7a6e;
  --blue: #4c8dff;
  --green: #33d17a;
  --red: #ff5566;
  --yellow: #ffd15c;
  --shadow: 0 16px 32px rgba(20,10,60,.35);
  --shadow-glow: 0 10px 26px rgba(140,92,245,.45);
  --radius: 20px;
  --radius-sm: 14px;
  font-family: Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button, input, select, textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 430px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px 92px;
  background:
    radial-gradient(120% 240px at 20% 0%, rgba(253,107,176,.30), transparent 60%),
    radial-gradient(120% 260px at 90% 10%, rgba(47,217,198,.22), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 320px);
}

.topbar, .profile-strip, .match-hud, .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  margin-bottom: 16px;
}

.eyebrow, .label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 24px;
  background: linear-gradient(90deg, var(--pink), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
}

h2 {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 800;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font-size: 18px;
  box-shadow: var(--shadow);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.profile-strip, .match-card, .compact-card, .question-card, .invite-card, .profile-panel, .warning-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
}

.profile-strip {
  padding: 14px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: #fff;
  font-weight: 900;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
  border: 2px solid rgba(255,255,255,.35);
}

.mini-avatar {
  display: inline-grid;
  width: 22px;
  height: 22px;
  margin-inline-end: 6px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
  border: none;
  box-shadow: none;
}

.avatar.big {
  width: 84px;
  height: 84px;
  margin: 0 auto 12px;
  font-size: 30px;
}

.profile-main {
  flex: 1;
  min-width: 0;
}

.profile-main strong, .profile-main span {
  display: block;
}

.profile-main span {
  color: var(--muted);
  font-size: 12px;
}

.xp-bar {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
}

.xp-bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--teal), var(--purple));
  box-shadow: 0 0 10px rgba(47,217,198,.6);
}

.wallet {
  min-width: 68px;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(255,181,69,.25), rgba(255,122,110,.18));
  border: 1px solid rgba(255,181,69,.35);
}

.wallet span {
  display: block;
  color: var(--amber);
  font-size: 11px;
  font-weight: 700;
}

.ad-banner, .small-ad {
  display: block;
  margin: 14px 0;
  padding: 16px;
  border-radius: var(--radius);
  text-decoration: none;
  color: #1a0f2e;
  font-weight: 700;
  background: linear-gradient(135deg, var(--amber), var(--pink));
  box-shadow: var(--shadow-glow);
}

.ad-banner span, .ad-banner small {
  display: block;
}

.ad-banner small {
  opacity: .78;
}

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

.action-grid button, .action-grid a, .task-item, .skin, .primary-action {
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  background: var(--panel);
  font-weight: 700;
}

.action-grid a {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.action-grid button:nth-child(6n+1), .action-grid a:nth-child(6n+1) { border-color: rgba(140,92,245,.5); }
.action-grid button:nth-child(6n+2), .action-grid a:nth-child(6n+2) { border-color: rgba(253,107,176,.5); }
.action-grid button:nth-child(6n+3), .action-grid a:nth-child(6n+3) { border-color: rgba(47,217,198,.5); }
.action-grid button:nth-child(6n+4), .action-grid a:nth-child(6n+4) { border-color: rgba(255,181,69,.5); }
.action-grid button:nth-child(6n+5), .action-grid a:nth-child(6n+5) { border-color: rgba(76,141,255,.5); }
.action-grid button:nth-child(6n+6), .action-grid a:nth-child(6n+6) { border-color: rgba(51,209,122,.5); }

.primary-action {
  border: 0;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-glow);
}

.primary-action.full {
  width: 100%;
  margin-top: 14px;
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.btn-row .primary-action {
  flex: 1;
  padding: 10px;
}

.compact-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
  text-align: center;
}

.compact-card strong {
  display: block;
  font-size: 19px;
  color: var(--teal);
}

.match-card {
  padding: 16px;
}

.match-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.lobby-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.player-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
}

.player-row.ready { border-color: rgba(51,209,122,.5); }
.player-row.waiting { border-color: rgba(255,181,69,.5); }
.player-row.ready strong { color: var(--green); }
.player-row.waiting strong { color: var(--amber); }

.warning-box {
  margin-top: 14px;
  padding: 14px;
  color: #ffe8c8;
  background: linear-gradient(160deg, rgba(255,181,69,.16), rgba(255,122,110,.10));
  border-color: rgba(255,181,69,.3);
  line-height: 1.8;
  font-size: 13px;
}

.warning-box-error {
  color: #ffd6d6;
  background: linear-gradient(160deg, rgba(255,90,90,.2), rgba(255,60,60,.12));
  border-color: rgba(255,90,90,.4);
}

.lobby-howto {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  padding: 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.lobby-howto .section-head {
  color: var(--text);
  margin-bottom: 6px;
}

.forced-channel-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.forced-channel-list a {
  display: block;
  text-align: center;
  padding: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}

.match-hud {
  position: sticky;
  top: 8px;
  z-index: 2;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(28,26,74,.9);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.timer {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--bg-2) 58%, transparent 59%),
    conic-gradient(var(--teal) 0% 100%, rgba(255,255,255,.12) 0%);
  box-shadow: var(--shadow-glow);
}

.timer span {
  line-height: 1;
  font-size: 21px;
  font-weight: 900;
  color: var(--teal);
}

.timer small {
  color: var(--muted);
  font-size: 10px;
}

.status-rail {
  display: flex;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.status-rail::-webkit-scrollbar {
  display: none;
}

.status-chip {
  flex: 0 0 92px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.status-chip strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.status-chip span {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.status-chip i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: rgba(255,255,255,.16);
}

.status-chip .good { background: var(--green); }
.status-chip .bad { background: var(--red); }
.status-chip.leader { border-color: var(--amber); box-shadow: 0 0 12px rgba(255,181,69,.4); }
.status-chip.muted { opacity: .72; }

.status-skin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  margin-inline-end: 4px;
  vertical-align: middle;
}

.question-meta {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.question-card {
  padding: 16px;
}

.question-card h2 {
  line-height: 1.75;
}

.question-author {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.answers {
  display: grid;
  gap: 10px;
}

.report-question-btn {
  display: block;
  margin: 12px auto 0;
  padding: 8px 14px;
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 999px;
  background: transparent;
  color: var(--muted, #9aa1cf);
  font-size: 12px;
}

.report-question-btn:disabled {
  opacity: .6;
}

.answer {
  min-height: 56px;
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 800;
  text-align: right;
  padding: 0 16px;
  box-shadow: var(--shadow);
}

.answer.green { background: linear-gradient(135deg, #35d488, var(--green)); }
.answer.blue { background: linear-gradient(135deg, #6aa6ff, var(--blue)); }
.answer.red { background: linear-gradient(135deg, #ff8790, var(--red)); }
.answer.yellow { background: linear-gradient(135deg, #ffdd85, var(--yellow)); color: #1a0f2e; }

.review-item {
  margin-bottom: 12px;
}

.review-item h3 {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.7;
}

.review-options {
  margin: 0 0 12px;
  padding-inline-start: 18px;
  font-size: 13px;
  color: var(--muted);
}

.review-options li {
  margin-bottom: 4px;
}

.review-option-correct {
  color: var(--green);
  font-weight: 700;
}

.review-option-wrong {
  color: var(--red);
  font-weight: 700;
}

.small-ad {
  text-align: center;
  font-weight: 800;
}

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

.waiting-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 16px;
}

.waiting-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  animation: waiting-bounce 1.2s ease-in-out infinite;
}

.waiting-dots span:nth-child(2) { animation-delay: .15s; }
.waiting-dots span:nth-child(3) { animation-delay: .3s; }

@keyframes waiting-bounce {
  0%, 80%, 100% { transform: scale(.6); opacity: .5; }
  40% { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .waiting-dots span {
    animation: none;
    opacity: .8;
  }
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.section-head span {
  color: var(--muted);
  font-size: 12px;
}

.task-list {
  display: grid;
  gap: 10px;
}

.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  text-align: right;
}

.task-item strong {
  color: var(--amber);
}

/* Task cards need to stack (title row, progress bar, footer) rather
   than sit on the single flex row .task-item gives every other list
   item, so the layout is overridden rather than inherited. */
.task-card {
  display: block;
  width: 100%;
}

.task-card-head,
.task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-card-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.task-progress {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.task-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), #ffd977);
  transition: width 0.3s ease;
}

.task-card.claimable {
  border-color: var(--amber);
}

.task-card.done {
  opacity: 0.55;
}

.invite-card {
  padding: 14px;
}

.invite-card label, .invite-card code {
  display: block;
}

.invite-card label {
  color: var(--muted);
  font-size: 12px;
}

.invite-card code {
  direction: ltr;
  overflow-wrap: anywhere;
  margin-top: 8px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.22);
  color: var(--teal);
}

.reward-track {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.tier {
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.tier.done { border-color: var(--green); box-shadow: 0 0 10px rgba(51,209,122,.3); }
.tier.current { border-color: var(--amber); box-shadow: 0 0 10px rgba(255,181,69,.35); }

.skin-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.skin {
  min-height: 122px;
  padding: 12px;
}

.skin-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  font-size: 28px;
}

.skin.locked {
  opacity: .55;
}

.skin.equipped {
  border-color: var(--amber);
  box-shadow: 0 0 12px rgba(255, 181, 69, .4);
}

.skin .skin-status {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--amber);
}

.question-form {
  display: grid;
  gap: 10px;
}

.question-form input, .question-form select, .question-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  padding: 12px 14px;
}

.question-form textarea {
  min-height: 94px;
  resize: vertical;
}

.profile-panel {
  padding: 20px;
  text-align: center;
}

.profile-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.bottom-nav {
  position: fixed;
  right: 50%;
  bottom: 10px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(calc(100% - 20px), 410px);
  transform: translateX(50%);
  padding: 8px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(28,26,74,.92);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.bottom-nav button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 11px;
  font-weight: 700;
}

.nav-icon {
  font-size: 18px;
}

.bottom-nav button.active {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.inline-form input {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
}

.tab-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--muted);
  font-weight: 700;
}

.tab.active {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  border-color: transparent;
}

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-chip {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.category-chip:nth-child(6n+1) { border-color: var(--purple); }
.category-chip:nth-child(6n+2) { border-color: var(--pink); }
.category-chip:nth-child(6n+3) { border-color: var(--teal); }
.category-chip:nth-child(6n+4) { border-color: var(--amber); }
.category-chip:nth-child(6n+5) { border-color: var(--blue); }
.category-chip:nth-child(6n+6) { border-color: var(--green); }

.category-chip.selected {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.icon-button[data-go] {
  cursor: pointer;
}

.toast {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 20;
  max-width: min(calc(100% - 32px), 400px);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-align: center;
  box-shadow: var(--shadow-glow);
  transform: translate(-50%, -140%);
  transition: transform .35s ease;
}

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

.streak-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,181,69,.14), rgba(255,122,110,.08));
}

.streak-flame {
  font-size: 18px;
  flex: none;
}

.streak-pips {
  display: flex;
  gap: 4px;
  flex: 1;
}

.streak-pip {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.1);
}

.streak-pip.filled {
  background: var(--amber);
  box-shadow: 0 0 8px rgba(255,181,69,.6);
}

.streak-label {
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--amber);
}

.rank-hint {
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.rank-hint strong {
  color: var(--teal);
}

.result-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.result-outcome-badge {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--amber), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti span {
  position: absolute;
  top: -10%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: confetti-fall 1.6s ease-in forwards;
}

@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(160px) rotate(280deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .confetti span { animation: none; opacity: 0; }
  .toast { transition: none; }
}

.reward-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,181,69,.22), rgba(253,107,176,.14));
  border: 1px solid rgba(255,181,69,.4);
  box-shadow: var(--shadow-glow);
}

.reward-box-icon {
  font-size: 30px;
}

.reward-box strong {
  display: block;
  color: var(--amber);
  font-size: 14px;
}

.reward-box span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 360px) {
  .app-shell { padding-inline: 10px; }
  .status-chip { flex-basis: 82px; }
  .action-grid { gap: 8px; }
  .action-grid button { font-size: 13px; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 8, 30, .72);
}

/* Higher specificity than `.modal-overlay` so the [hidden] attribute
   actually hides it — otherwise the browser's default
   `[hidden]{display:none}` UA rule loses to the class's `display: flex`
   and the modal stays visible even while "hidden". */
.modal-overlay[hidden] {
  display: none;
}

.modal-box {
  width: 100%;
  max-width: 380px;
  padding: 18px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.modal-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.hint-text {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.modal-box textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,.2);
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.modal-counter {
  margin-top: 6px;
  text-align: left;
  font-size: 11px;
  color: var(--muted);
  direction: ltr;
}

.modal-error {
  margin: 6px 0 0;
  color: var(--red);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.modal-actions button {
  flex: 1;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
}

.modal-actions .primary-action {
  border: 0;
}

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

/* The badge is positioned against the bell button, so the button needs
   to be the containing block for it. */
.topbar-actions .icon-button {
  position: relative;
}

.notif-badge {
  position: absolute;
  top: -4px;
  inset-inline-end: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.announcement-card {
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
}

.announcement-card.unseen {
  border-color: var(--purple);
}

.announcement-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.announcement-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
}

.announcement-card time {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--muted);
}

.announcement-empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---- Round 2/3: settings account card, static pages, skin artwork,
   leaderboard emphasis ---- */

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.account-card strong {
  display: block;
  font-size: 16px;
}

.account-meta {
  font-size: 12px;
  color: var(--muted);
}

.page-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  line-height: 2;
  margin-bottom: 12px;
}

/* Uploaded skin artwork replaces the emoji inside the same tile, so it
   has to fill the existing .skin-preview box rather than resize it. */
.skin-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: inherit;
}

.my-rank-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--amber);
  border-radius: 14px;
  background: rgba(255, 181, 69, 0.08);
}

.my-rank-card strong {
  color: var(--amber);
}

/* The caller's own row inside the list, so they can find themselves at
   a glance instead of scanning 50 names. */
.player-row.me {
  border-color: var(--amber);
  background: rgba(255, 181, 69, 0.08);
}

.player-row small {
  color: var(--muted);
  font-size: 11px;
}
