:root {
  --ink: #26110b;
  --muted: #7b5948;
  --soft: #f6ead2;
  --paper: #fff7dc;
  --panel: rgba(255, 248, 219, 0.96);
  --line: rgba(38, 17, 11, 0.14);
  --sea: #087a9b;
  --sea-dark: #06596f;
  --gold: #f5c445;
  --orange: #f07622;
  --red: #d71717;
  --danger: #991b1b;
  --danger-soft: #ffe2dc;
  --shadow: 0 18px 44px rgba(72, 22, 10, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 27% 42%, rgba(255, 244, 141, 0.94) 0 12%, rgba(255, 198, 74, 0.58) 13% 22%, transparent 23%),
    linear-gradient(150deg, #e41419 0%, #f24919 26%, #f99425 52%, #14a5cb 78%, #087a9b 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: auto 0 0;
  height: 32vh;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.42) 0 2px, transparent 3px 22px),
    linear-gradient(180deg, rgba(1, 83, 111, 0), rgba(1, 77, 105, 0.72));
  opacity: 0.75;
}

body::after {
  content: "";
  position: fixed;
  right: 6vw;
  top: 16vh;
  width: min(34vw, 420px);
  aspect-ratio: 1.75;
  pointer-events: none;
  background:
    linear-gradient(145deg, transparent 0 30%, rgba(14, 13, 13, 0.92) 31% 65%, transparent 66%),
    linear-gradient(90deg, transparent 0 44%, rgba(14, 13, 13, 0.75) 45% 48%, transparent 49%),
    linear-gradient(0deg, transparent 0 62%, rgba(14, 13, 13, 0.75) 63% 66%, transparent 67%);
  filter: drop-shadow(0 20px 16px rgba(40, 12, 5, 0.24));
  opacity: 0.28;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 0;
}

.app-alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  color: #7a140d;
  background: var(--danger-soft);
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
}

.welcome-panel,
.score-layout {
  min-height: calc(100vh - 48px);
}

.welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
  gap: 28px;
  align-items: center;
}

.welcome-copy {
  color: white;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.36);
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-copy h1,
.score-header h1 {
  margin: 0;
  color: white;
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.welcome-copy p {
  max-width: 540px;
  margin: 18px 0 0;
  font-size: 1.15rem;
  line-height: 1.55;
}

.game-tabs,
.turn-panel,
.winner-banner,
.player-card,
.ranking-panel {
  background: var(--panel);
  border: 1px solid rgba(38, 17, 11, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.game-tabs,
.turn-panel,
.winner-banner {
  border-radius: 8px;
}

.game-tabs {
  padding: 10px;
}

.tab-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: rgba(38, 17, 11, 0.08);
  border-radius: 8px;
}

.tab-button {
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.tab-button.is-active {
  color: white;
  background: var(--red);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.setup-form {
  display: grid;
  gap: 16px;
  padding: 22px 8px 8px;
}

.section-title,
.score-header,
.player-topline,
.score-row,
.winner-banner,
.undo-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-title h2,
.turn-panel h2,
.player-card h2 {
  margin: 0;
}

.icon-button,
.game-options summary {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  background: rgba(38, 17, 11, 0.92);
  border: 0;
  border-radius: 8px;
  font-size: 1.35rem;
}

.players-editor,
.form-grid,
.score-form,
.action-stack {
  display: grid;
  gap: 12px;
}

.field-row {
  display: grid;
  gap: 7px;
}

.field-row span,
.score-input span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.field-row input,
.field-row select,
.score-input input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

.field-row input:focus,
.field-row select:focus,
.score-input input:focus {
  border-color: var(--sea);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15);
}

.joueur {
  grid-template-columns: 82px minmax(0, 1fr) 42px;
  align-items: end;
}

.remove-player {
  display: inline-grid;
  width: 42px;
  height: 50px;
  place-items: center;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid rgba(180, 35, 24, 0.16);
  border-radius: 8px;
}

.primary-action,
.secondary-action,
.winner-banner button,
.undo-form button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 850;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary-action,
.winner-banner button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: white;
  background: #d32424;
  box-shadow: 0 8px 20px rgba(153, 27, 27, 0.2);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: white;
  box-shadow: 0 8px 18px rgba(38, 17, 11, 0.07);
}

.secondary-action.danger {
  color: var(--danger);
  background: #fff1ed;
}

.primary-action:hover,
.secondary-action:hover,
.winner-banner button:hover,
.undo-form button:hover,
.quick-column button:hover,
.score-mode-toggle button:hover {
  transform: translateY(-1px);
}

.score-layout {
  display: grid;
  gap: 14px;
  align-content: start;
}

.score-header {
  padding-top: 10px;
  color: white;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.game-options {
  position: relative;
}

.game-options summary {
  list-style: none;
}

.game-options summary::-webkit-details-marker {
  display: none;
}

.options-menu {
  position: absolute;
  right: 0;
  top: 52px;
  z-index: 2;
  display: grid;
  gap: 10px;
  min-width: 210px;
  padding: 14px;
  color: var(--ink);
  text-shadow: none;
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.options-menu a {
  color: var(--danger);
  font-weight: 800;
}

.options-menu a {
  display: block;
  padding: 10px 12px;
  text-decoration: none;
  border-radius: 8px;
}

.options-menu .save-quit-link {
  color: #2b1607;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.86), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b);
}

.options-menu .delete-quit-link {
  color: #fff1ea;
  background: linear-gradient(180deg, #7b2a20, #2a0d09);
}

.winner-banner {
  padding: 16px;
}

.winner-banner strong {
  display: block;
  font-size: 1.3rem;
}

.winner-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(4, 2, 1, 0.72);
  backdrop-filter: blur(5px);
}

.winner-modal-card {
  position: relative;
  width: min(430px, 100%);
  padding: 24px;
  text-align: center;
  color: #f8ead0;
  background:
    radial-gradient(circle at 50% -10%, rgba(246, 198, 87, 0.26), transparent 38%),
    linear-gradient(180deg, rgba(47, 25, 10, 0.98), rgba(9, 5, 3, 0.98));
  border: 1px solid rgba(216, 170, 76, 0.42);
  border-radius: 14px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 173, 0.08),
    0 26px 60px rgba(0, 0, 0, 0.48);
}

.winner-modal-card h2 {
  margin: 0;
  color: #f8ead0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 0.95;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.5);
}

.winner-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #f8ead0;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(216, 170, 76, 0.26);
  border-radius: 999px;
  font-size: 1.4rem;
}

.winner-modal-card p {
  margin: 12px 0 18px;
  color: rgba(248, 234, 208, 0.78);
  font-weight: 800;
}

.winner-modal-card form {
  margin: 0;
}

.winner-modal-card button {
  width: 100%;
  min-height: 52px;
  color: #3a2108;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.9), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b);
  border: 2px solid #f6d77c;
  border-radius: 999px;
  box-shadow:
    inset 0 3px 0 rgba(255, 240, 168, 0.32),
    inset 0 -4px 0 rgba(80, 43, 6, 0.32),
    0 9px 14px rgba(0, 0, 0, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
  font-weight: 900;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(440px, 1.3fr);
  gap: 14px;
  align-items: start;
}

.ranking-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
}

.ranking-panel summary {
  list-style: none;
  cursor: pointer;
}

.ranking-panel summary::-webkit-details-marker {
  display: none;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading .eyebrow {
  margin-bottom: 0;
}

.ranking-list {
  display: grid;
  gap: 6px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(38, 17, 11, 0.1);
  border-radius: 8px;
}

.ranking-row.is-active {
  background: #fff4cc;
  border-color: rgba(211, 36, 36, 0.48);
  box-shadow: 0 0 0 2px rgba(255, 223, 89, 0.38);
}

.rank-number {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: white;
  background: rgba(38, 17, 11, 0.9);
  border-radius: 50%;
  font-size: 0.68rem;
  font-weight: 950;
}

.rank-player {
  min-width: 0;
}

.rank-score {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1;
}

.player-position,
.turn-badge {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.turn-badge {
  padding: 4px 7px;
  color: #8b1e16;
  background: rgba(245, 196, 69, 0.35);
  border-radius: 999px;
  font-size: 0.68rem;
}

.ranking-row h2 {
  overflow: hidden;
  margin: 0;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.score-row {
  margin-top: 26px;
  justify-content: flex-start;
}

.score-row strong {
  font-size: 2.7rem;
  line-height: 1;
}

.score-row span {
  color: var(--muted);
  font-weight: 800;
}

.progress-track {
  height: 6px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(29, 40, 48, 0.1);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--sea);
  border-radius: inherit;
}

.ranking-row.is-leading .progress-track span {
  background: var(--gold);
}

.ranking-row footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.turn-panel {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.active-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding: 16px;
  color: white;
  background:
    linear-gradient(135deg, rgba(38, 17, 11, 0.28), transparent 48%),
    linear-gradient(180deg, #1c1b18, #080706);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.active-player-card .eyebrow {
  color: var(--gold);
}

.active-player-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
  color: white;
  font-size: clamp(2rem, 4.4vw, 3.45rem);
  line-height: 0.96;
}

.active-score {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.active-score strong {
  color: var(--gold);
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 0.9;
}

.active-score span {
  font-weight: 900;
  white-space: nowrap;
}

.next-turn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(38, 17, 11, 0.08);
  border-radius: 8px;
}

.next-turn span {
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.next-turn strong {
  color: var(--ink);
  font-size: 1rem;
}

.score-input {
  display: grid;
  gap: 8px;
}

.score-input input {
  height: 50px;
  font-size: 1.35rem;
  font-weight: 900;
  text-align: center;
}

.quick-score-panel {
  display: grid;
  gap: 8px;
}

.score-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr 52px;
  gap: 4px;
  padding: 4px;
  background: rgba(38, 17, 11, 0.08);
  border-radius: 8px;
}

.score-mode-toggle button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 850;
}

.score-mode-toggle button.is-active {
  color: white;
  background: #d32424;
  box-shadow: 0 8px 18px rgba(153, 27, 27, 0.16);
}

.score-mode-toggle button[data-score-mode="remove"].is-active {
  color: #ffe8e4;
  background: #7f1d1d;
}

.score-mode-toggle button[data-score-mode="death"].is-active {
  color: white;
  background: #111;
}

.quick-column {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.quick-column.is-active {
  display: grid;
}

.quick-column > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quick-column form {
  margin: 0;
}

.quick-column button {
  width: 100%;
  min-height: 42px;
  padding: 0 6px;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(38, 17, 11, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(38, 17, 11, 0.08);
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 850;
}

.quick-column.remove button,
.quick-column.death button {
  color: #8b1e16;
  background: #fff3f0;
}

.quick-column.death button {
  color: #161616;
  background: #f2f2f2;
}

.custom-score-trigger {
  color: var(--sea-dark) !important;
  background: #eef9fb !important;
}

.custom-score-form {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}

.custom-score-form.is-active {
  display: grid;
}

.custom-score-form input {
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: white;
  border: 1px solid rgba(38, 17, 11, 0.12);
  border-radius: 8px;
  font-weight: 850;
  text-align: center;
}

.custom-score-form button {
  min-width: 104px;
  color: white;
  background: #d32424;
}

.undo-form {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.undo-form button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  background: #f2efe6;
}

@media (max-width: 860px) {
  .app-shell {
    width: min(100% - 18px, 680px);
    padding: 8px 0 20px;
  }

  .welcome-panel,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .welcome-panel {
    align-items: start;
    gap: 18px;
  }

  .welcome-copy h1,
  .score-header h1 {
    font-size: 2.85rem;
  }

  .turn-panel {
    position: static;
  }
}

@media (max-width: 520px) {
  .welcome-copy h1,
  .score-header h1 {
    font-size: 2.05rem;
  }

  .score-header {
    align-items: center;
    padding-top: 2px;
  }

  .game-grid {
    gap: 8px;
  }

  .ranking-panel,
  .turn-panel {
    padding: 8px;
  }

  .ranking-panel:not([open]) {
    padding-bottom: 8px;
  }

  .ranking-panel:not([open]) .ranking-list {
    display: none;
  }

  .ranking-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    min-height: 52px;
    padding: 7px 8px;
  }

  .rank-score {
    font-size: 1.35rem;
  }

  .active-player-card,
  .quick-score-panel {
    grid-template-columns: 1fr;
  }

  .active-player-card {
    padding: 12px;
  }

  .active-player-card h2 {
    font-size: 1.85rem;
  }

  .active-score strong {
    font-size: 2.2rem;
  }

  .next-turn {
    padding: 8px 10px;
  }

  .score-mode-toggle {
    grid-template-columns: 1fr 1fr 48px;
  }

  .quick-column button {
    min-height: 38px;
  }

  .active-score {
    justify-items: start;
  }

  .winner-banner,
  .undo-form {
    align-items: stretch;
    flex-direction: column;
  }

  .joueur {
    grid-template-columns: 1fr 42px;
  }

  .joueur > span {
    grid-column: 1 / -1;
  }
}

/* Premium polish pass */
body {
  background:
    linear-gradient(90deg, rgba(255, 220, 150, 0.025) 0 1px, transparent 1px 74px),
    linear-gradient(0deg, rgba(255, 220, 150, 0.025) 0 1px, transparent 1px 84px),
    radial-gradient(circle at 50% -12%, rgba(210, 150, 52, 0.22), transparent 26%),
    radial-gradient(circle at 20% 100%, rgba(109, 58, 18, 0.24), transparent 30%),
    linear-gradient(135deg, #140905 0%, #271207 42%, #0b0503 100%);
}

.app-shell {
  width: min(500px, calc(100% - 22px));
  padding-top: 14px;
}

.score-header {
  grid-template-columns: 40px 1fr 40px;
  margin-bottom: 4px;
}

.score-header h1 {
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 0.86;
  text-shadow: 0 2px 0 #0c0502, 0 8px 18px rgba(0, 0, 0, 0.62);
}

.score-header .eyebrow {
  font-size: 0.72rem;
}

.ranking-panel,
.turn-panel {
  background:
    linear-gradient(180deg, rgba(40, 22, 10, 0.82), rgba(10, 5, 3, 0.9)),
    repeating-linear-gradient(90deg, rgba(255, 222, 154, 0.02) 0 2px, transparent 2px 56px);
  border-color: rgba(194, 135, 48, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(255, 228, 162, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.34);
}

.podium-list {
  gap: 7px;
}

.ranking-card {
  min-height: 130px;
  padding: 18px 8px 10px;
  background:
    radial-gradient(circle at 50% -5%, rgba(221, 168, 64, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(48, 27, 13, 0.94), rgba(16, 8, 4, 0.96));
  border: 1px solid rgba(168, 111, 34, 0.68);
}

.ranking-card.rank-1 {
  min-height: 154px;
  border-color: rgba(239, 192, 91, 0.9);
}

.ranking-card.rank-2,
.ranking-card.rank-3 {
  margin-top: 20px;
}

.ranking-card:nth-child(n+4) {
  min-height: 48px;
  background: linear-gradient(180deg, rgba(39, 22, 11, 0.9), rgba(14, 7, 4, 0.94));
  border-color: rgba(168, 111, 34, 0.5);
}

.ranking-row.is-active,
.ranking-card:nth-child(n+4).is-active {
  background:
    linear-gradient(90deg, rgba(203, 143, 41, 0.25), rgba(38, 21, 10, 0.92)),
    linear-gradient(180deg, rgba(55, 31, 13, 0.94), rgba(18, 9, 4, 0.96));
  border-color: rgba(246, 206, 112, 0.86);
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 177, 0.18),
    0 10px 18px rgba(0, 0, 0, 0.28);
}

.rank-number {
  top: -14px;
  width: 38px;
  height: 38px;
  border-width: 1px;
  font-size: 1.08rem;
}

.ranking-card:nth-child(n+4) .rank-number {
  width: 26px;
  height: 26px;
  font-size: 0.78rem;
}

.ship-mark {
  display: none;
}

.player-emblem {
  display: grid;
  width: 48px;
  height: 48px;
  margin-top: 14px;
  place-items: center;
  color: #221004;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 246, 188, 0.95), transparent 28%),
    linear-gradient(180deg, #d9a441, #8b5414);
  border: 1px solid #f1d078;
  border-radius: 50%;
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 175, 0.45),
    inset 0 -4px 0 rgba(77, 41, 5, 0.32),
    0 8px 14px rgba(0, 0, 0, 0.36);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.rank-1 .player-emblem {
  width: 58px;
  height: 58px;
  color: #2c1604;
  font-size: 1.8rem;
}

.rank-2 .player-emblem {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(180deg, #cfd4d7, #747b80);
  border-color: #f0f1f2;
}

.rank-3 .player-emblem {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 226, 171, 0.95), transparent 28%),
    linear-gradient(180deg, #bd7925, #6b390d);
  border-color: #e9b86c;
}

.ranking-card:nth-child(n+4) .player-emblem {
  display: none;
}

.ranking-card h2 {
  color: #f7ead2;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.9rem, 3vw, 1.18rem);
  font-weight: 900;
}

.ranking-card.rank-1 h2 {
  font-size: clamp(1.02rem, 3.7vw, 1.42rem);
}

.rank-meta {
  max-width: 100%;
  color: rgba(216, 170, 76, 0.78);
  font-size: 0.66rem;
}

.rank-score {
  color: #f9ead1;
  font-size: clamp(1.45rem, 4.8vw, 2.1rem);
}

.ranking-card.rank-1 .rank-score {
  color: #f4c341;
  font-size: clamp(1.9rem, 6.4vw, 2.75rem);
}

.active-player-card {
  min-height: 78px;
  background:
    radial-gradient(circle at 50% -12%, rgba(221, 168, 64, 0.17), transparent 42%),
    linear-gradient(180deg, #241308, #090403);
  border-color: rgba(200, 132, 38, 0.72);
}

.active-player-card h2 {
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.active-score strong {
  font-size: clamp(1.85rem, 7vw, 2.75rem);
}

.next-turn {
  min-height: 46px;
}

.score-mode-toggle button {
  min-height: 42px;
}

.quick-column {
  gap: 10px;
}

.quick-column button,
.custom-score-form button {
  min-height: 54px;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 247, 188, 0.88), transparent 24%),
    linear-gradient(180deg, #eab54b 0%, #c8841d 54%, #8b520d 100%);
  border: 1px solid #f1ca6a;
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 175, 0.34),
    inset 0 -3px 0 rgba(80, 43, 6, 0.3),
    0 7px 11px rgba(0, 0, 0, 0.32);
  font-size: clamp(1.05rem, 3.8vw, 1.42rem);
}

.quick-column.remove button,
.quick-column.death button {
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 210, 175, 0.24), transparent 24%),
    linear-gradient(180deg, #4a2118 0%, #28100c 68%, #100504 100%);
  border-color: #8f543a;
}

.custom-score-trigger {
  grid-column: 1 / -1;
  width: min(190px, 100%);
  justify-self: center;
}

@media (max-width: 520px) {
  .score-header h1 {
    font-size: 2rem;
  }

  .ranking-card {
    min-height: 112px;
    padding: 16px 6px 8px;
  }

  .ranking-card.rank-1 {
    min-height: 136px;
  }

  .ranking-card.rank-2,
  .ranking-card.rank-3 {
    margin-top: 16px;
  }

  .player-emblem {
    width: 40px;
    height: 40px;
    margin-top: 12px;
    font-size: 1.22rem;
  }

  .rank-1 .player-emblem {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .quick-column button,
  .custom-score-form button {
    min-height: 50px;
  }
}

/* Dark pirate game skin */
body {
  color: #f8ead1;
  background:
    radial-gradient(circle at 50% -8%, rgba(214, 170, 83, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 80px),
    linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 2px, transparent 2px 84px),
    linear-gradient(135deg, #160c06, #2b180d 38%, #0d0805);
}

body::before {
  inset: 0;
  height: auto;
  background:
    radial-gradient(circle at 14% 92%, rgba(183, 123, 43, 0.16), transparent 18%),
    radial-gradient(circle at 84% 92%, rgba(183, 123, 43, 0.12), transparent 16%),
    repeating-linear-gradient(0deg, rgba(255, 230, 170, 0.04) 0 1px, transparent 1px 82px);
  opacity: 1;
}

body::after {
  display: none;
}

.app-shell {
  width: min(620px, calc(100% - 22px));
  padding: 18px 0 28px;
}

.score-layout {
  min-height: auto;
  gap: 12px;
}

.score-header {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding-top: 0;
  text-align: center;
  text-shadow: 0 3px 0 #140b05, 0 10px 18px rgba(0, 0, 0, 0.55);
}

.score-header > div {
  grid-column: 2;
}

.score-header .eyebrow {
  justify-content: center;
  width: 100%;
  margin-bottom: 4px;
  color: #c89a43;
}

.score-header h1 {
  color: #f8ead1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 9vw, 3.6rem);
  font-weight: 900;
  text-transform: uppercase;
}

.game-options {
  grid-column: 3;
  justify-self: end;
}

.game-options summary {
  width: 40px;
  height: 40px;
  color: #d8aa4c;
  background: rgba(11, 7, 4, 0.72);
  border: 1px solid rgba(216, 170, 76, 0.44);
  border-radius: 50%;
}

.game-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.ranking-panel,
.turn-panel,
.winner-banner {
  background: rgba(19, 12, 7, 0.78);
  border: 1px solid rgba(216, 170, 76, 0.26);
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 173, 0.06), 0 18px 38px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(4px);
}

.ranking-panel {
  padding: 10px;
}

.panel-heading {
  display: none;
}

.podium-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.ranking-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 18px 9px 12px;
  overflow: visible;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(62, 37, 18, 0.9), rgba(18, 11, 6, 0.92)),
    radial-gradient(circle at 50% 0, rgba(234, 181, 73, 0.18), transparent 38%);
  border: 2px solid rgba(154, 103, 36, 0.62);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 225, 154, 0.12), 0 10px 18px rgba(0, 0, 0, 0.3);
}

.ranking-card.rank-1 {
  min-height: 180px;
  order: 2;
  border-color: #e3b95b;
  box-shadow: inset 0 0 0 1px rgba(255, 239, 177, 0.3), 0 14px 24px rgba(0, 0, 0, 0.38);
}

.ranking-card.rank-2 {
  order: 1;
}

.ranking-card.rank-3 {
  order: 3;
}

.ranking-card:nth-child(n+4) {
  grid-column: 1 / -1;
  order: 4;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  min-height: 54px;
  padding: 8px 10px;
  text-align: left;
}

.ranking-card:nth-child(n+4) .ship-mark {
  display: none;
}

.rank-number {
  position: absolute;
  top: -15px;
  left: 50%;
  width: 44px;
  height: 44px;
  color: #2c1604;
  background: radial-gradient(circle at 38% 26%, #fff1a9, #d69a28 42%, #80500c 100%);
  border: 2px solid #f4d277;
  box-shadow: 0 4px 0 #5b3509, 0 8px 14px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.ranking-card.rank-2 .rank-number {
  background: radial-gradient(circle at 38% 26%, #fff, #bfc4c8 44%, #696e72 100%);
}

.ranking-card.rank-3 .rank-number {
  background: radial-gradient(circle at 38% 26%, #ffe0a6, #b87422 44%, #6d3b0b 100%);
}

.ranking-card:nth-child(n+4) .rank-number {
  position: static;
  width: 28px;
  height: 28px;
  transform: none;
  font-size: 0.82rem;
}

.ship-mark {
  position: relative;
  display: block;
  width: 58px;
  height: 52px;
  margin-top: 18px;
  filter: drop-shadow(0 8px 5px rgba(0, 0, 0, 0.48));
}

.ship-mark::before,
.ship-mark::after {
  content: "";
  position: absolute;
  bottom: 12px;
  border-style: solid;
}

.ship-mark::before {
  left: 13px;
  border-width: 0 0 38px 25px;
  border-color: transparent transparent currentColor transparent;
}

.ship-mark::after {
  right: 13px;
  border-width: 38px 25px 0 0;
  border-color: currentColor transparent transparent transparent;
}

.ship-mark.ship-red {
  color: #cf3024;
}

.ship-mark.ship-blue {
  color: #2e6aa0;
}

.ship-mark.ship-green {
  color: #76a82d;
}

.ranking-card .rank-player {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
}

.ranking-card .player-topline {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.ranking-card h2 {
  color: #f5e6ca;
  font-size: clamp(0.95rem, 3.4vw, 1.35rem);
  text-shadow: 0 2px 2px #120a05;
}

.ranking-card.rank-1 h2 {
  font-size: clamp(1.18rem, 4vw, 1.7rem);
}

.rank-meta {
  color: #aa8753;
  font-size: 0.68rem;
}

.rank-score {
  color: #f6e6c3;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 6vw, 2.55rem);
  text-shadow: 0 3px 0 #120a05;
}

.ranking-card.rank-1 .rank-score {
  color: #f0bb38;
  font-size: clamp(2.25rem, 8vw, 3.2rem);
}

.ranking-card:nth-child(n+4) .rank-player {
  justify-items: start;
}

.ranking-card:nth-child(n+4) .player-topline {
  justify-items: start;
}

.ranking-card:nth-child(n+4) .rank-score {
  font-size: 1.55rem;
}

.turn-badge {
  color: #ffdf86;
  background: rgba(216, 170, 76, 0.14);
  border: 1px solid rgba(216, 170, 76, 0.32);
}

.turn-panel {
  padding: 12px;
}

.active-player-card {
  justify-items: center;
  min-height: 86px;
  padding: 12px 16px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(47, 28, 14, 0.92), rgba(15, 9, 5, 0.96)),
    radial-gradient(circle at 50% 0, rgba(216, 170, 76, 0.2), transparent 40%);
  border: 2px solid rgba(174, 116, 36, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 228, 157, 0.16), 0 10px 18px rgba(0, 0, 0, 0.28);
}

.active-player-card .eyebrow {
  color: #d8aa4c;
}

.active-player-card h2 {
  color: #f5e6ca;
  font-size: clamp(1.55rem, 6vw, 2.25rem);
}

.active-score strong {
  color: #f0bb38;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 8vw, 3.1rem);
  text-shadow: 0 3px 0 #120a05;
}

.active-score span {
  color: #f5e6ca;
}

.next-turn {
  justify-content: center;
  padding: 10px 14px;
  color: #d8aa4c;
  background: linear-gradient(180deg, rgba(43, 25, 12, 0.9), rgba(18, 11, 6, 0.92));
  border-color: rgba(174, 116, 36, 0.5);
}

.next-turn strong {
  color: #f5e6ca;
  font-size: 1.25rem;
}

.score-mode-toggle {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.score-mode-toggle button {
  min-height: 48px;
  color: #f2d188;
  background: linear-gradient(180deg, #3d2410, #130b06);
  border: 1px solid rgba(216, 170, 76, 0.34);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 238, 176, 0.18), 0 8px 14px rgba(0, 0, 0, 0.25);
  font-size: 1.2rem;
}

.score-mode-toggle button.is-active,
.score-mode-toggle button[data-score-mode="remove"].is-active,
.score-mode-toggle button[data-score-mode="death"].is-active {
  color: #2a1605;
  background: linear-gradient(180deg, #ffe58f, #c5861e 58%, #7f4d0d);
  border-color: #ffe8a5;
}

.quick-column {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-column button,
.custom-score-form button {
  min-height: 62px;
  color: #3a2108;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.9), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b);
  border: 2px solid #f6d77c;
  border-radius: 999px;
  box-shadow: inset 0 3px 0 rgba(255, 240, 168, 0.32), inset 0 -4px 0 rgba(80, 43, 6, 0.32), 0 9px 14px rgba(0, 0, 0, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 4.5vw, 1.75rem);
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 232, 160, 0.75);
}

.quick-column.remove button,
.quick-column.death button {
  color: #f5e6ca;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 205, 180, 0.25), transparent 28%),
    linear-gradient(180deg, #5a251c, #2a100d 68%, #120706);
  border-color: #9d5b3d;
  text-shadow: 0 2px 0 #120706;
}

.custom-score-trigger {
  grid-column: 2 / 3;
  color: #3a2108 !important;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.9), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b) !important;
}

.custom-score-form input {
  height: 56px;
  color: #f5e6ca;
  background: rgba(17, 10, 5, 0.9);
  border: 1px solid rgba(216, 170, 76, 0.42);
  border-radius: 999px;
  font-size: 1.25rem;
}

.undo-form {
  color: #c39b5b;
  border-top-color: rgba(216, 170, 76, 0.24);
}

.undo-form button {
  color: #f5e6ca;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 18px, 430px);
    padding-top: 12px;
  }

  .score-header h1 {
    font-size: 2.18rem;
  }

  .podium-list {
    gap: 7px;
  }

  .ranking-card {
    min-height: 126px;
    padding: 16px 7px 9px;
  }

  .ranking-card.rank-1 {
    min-height: 152px;
  }

  .ship-mark {
    width: 45px;
    height: 40px;
    margin-top: 15px;
  }

  .ship-mark::before {
    left: 10px;
    border-width: 0 0 30px 20px;
  }

  .ship-mark::after {
    right: 10px;
    border-width: 30px 20px 0 0;
  }

  .rank-number {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }

  .ranking-card h2 {
    font-size: 0.95rem;
  }

  .ranking-card.rank-1 h2 {
    font-size: 1.15rem;
  }

  .rank-score {
    font-size: 1.7rem;
  }

  .ranking-card.rank-1 .rank-score {
    font-size: 2.25rem;
  }

  .active-player-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .active-score {
    justify-items: center;
  }

  .quick-column {
    gap: 9px;
  }

  .quick-column button,
  .custom-score-form button {
    min-height: 55px;
    font-size: 1.25rem;
  }
}

/* Final premium overrides */
.app-shell {
  width: min(500px, calc(100% - 22px));
  padding-top: 14px;
}

.score-header h1 {
  font-size: clamp(2rem, 8vw, 3rem);
}

.ranking-panel,
.turn-panel {
  background:
    linear-gradient(180deg, rgba(40, 22, 10, 0.84), rgba(10, 5, 3, 0.92)),
    repeating-linear-gradient(90deg, rgba(255, 222, 154, 0.018) 0 2px, transparent 2px 58px);
}

.ranking-card {
  min-height: 130px;
  padding: 18px 8px 10px;
}

.ranking-card.rank-1 {
  min-height: 154px;
}

.ranking-card.rank-2,
.ranking-card.rank-3 {
  margin-top: 20px;
}

.ship-mark {
  display: none;
}

.player-emblem {
  display: grid;
  width: 48px;
  height: 48px;
  margin-top: 14px;
  place-items: center;
  color: #221004;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 246, 188, 0.95), transparent 28%),
    linear-gradient(180deg, #d9a441, #8b5414);
  border: 1px solid #f1d078;
  border-radius: 50%;
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 175, 0.45),
    inset 0 -4px 0 rgba(77, 41, 5, 0.32),
    0 8px 14px rgba(0, 0, 0, 0.36);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  font-weight: 900;
}

.rank-1 .player-emblem {
  width: 58px;
  height: 58px;
  font-size: 1.8rem;
}

.rank-2 .player-emblem {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.96), transparent 28%),
    linear-gradient(180deg, #cfd4d7, #747b80);
  border-color: #f0f1f2;
}

.rank-3 .player-emblem {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 226, 171, 0.95), transparent 28%),
    linear-gradient(180deg, #bd7925, #6b390d);
  border-color: #e9b86c;
}

.ranking-card:nth-child(n+4) .player-emblem {
  display: none;
}

.ranking-card h2 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(0.9rem, 3vw, 1.18rem);
}

.ranking-card.rank-1 h2 {
  font-size: clamp(1.02rem, 3.7vw, 1.42rem);
}

.rank-score {
  font-size: clamp(1.45rem, 4.8vw, 2.1rem);
}

.ranking-card.rank-1 .rank-score {
  font-size: clamp(1.9rem, 6.4vw, 2.75rem);
}

.active-player-card {
  min-height: 78px;
}

.active-player-card h2 {
  font-size: clamp(1.4rem, 5vw, 2rem);
}

.active-score strong {
  font-size: clamp(1.85rem, 7vw, 2.75rem);
}

.quick-column button,
.custom-score-form button {
  min-height: 54px;
  border-width: 1px;
  box-shadow:
    inset 0 2px 0 rgba(255, 239, 175, 0.34),
    inset 0 -3px 0 rgba(80, 43, 6, 0.3),
    0 7px 11px rgba(0, 0, 0, 0.32);
  font-size: clamp(1.05rem, 3.8vw, 1.42rem);
}

.custom-score-trigger {
  grid-column: 1 / -1;
  width: min(190px, 100%);
  justify-self: center;
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 18px, 430px);
  }

  .score-header h1 {
    font-size: 2rem;
  }

  .ranking-card {
    min-height: 112px;
    padding: 16px 6px 8px;
  }

  .ranking-card.rank-1 {
    min-height: 136px;
  }

  .ranking-card.rank-2,
  .ranking-card.rank-3 {
    margin-top: 16px;
  }

  .player-emblem {
    width: 40px;
    height: 40px;
    margin-top: 12px;
    font-size: 1.22rem;
  }

  .rank-1 .player-emblem {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .quick-column button,
  .custom-score-form button {
    min-height: 50px;
    font-size: 1.16rem;
  }
}

/* Interaction and score polish */
.player-emblem {
  display: none !important;
}

.rank-number {
  display: grid !important;
  place-items: center !important;
  line-height: 1 !important;
  padding: 0 0 1px !important;
  text-align: center;
}

.rank-meta {
  display: inline-flex;
  min-height: 18px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(216, 170, 76, 0.78);
}

.rank-meta .bx {
  color: #d8aa4c;
  font-size: 0.9rem;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.75));
}

.rank-meta .no-trophy {
  opacity: 0.48;
}

.rank-meta span:not(.no-trophy) {
  margin-left: 5px;
}

.turn-badge {
  color: rgba(255, 223, 134, 0.86);
  background: transparent;
  border-color: rgba(216, 170, 76, 0.22);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

.zero-score-form {
  margin: 0;
}

.zero-score-form button {
  width: 100%;
  min-height: 44px;
  color: #f5e6ca;
  background: linear-gradient(180deg, rgba(43, 25, 12, 0.92), rgba(18, 11, 6, 0.94));
  border: 1px solid rgba(216, 170, 76, 0.36);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 238, 176, 0.14), 0 6px 10px rgba(0, 0, 0, 0.24);
  font-weight: 850;
}

.quick-column.remove .custom-score-trigger,
.quick-column.death .custom-score-trigger {
  color: #f5e6ca !important;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 210, 175, 0.24), transparent 24%),
    linear-gradient(180deg, #4a2118 0%, #28100c 68%, #100504 100%) !important;
  border-color: #8f543a;
  text-shadow: 0 2px 0 #120706;
}

.custom-score-form button {
  min-width: 112px;
}

/* Alignment and alternate background pass */
body {
  background:
    radial-gradient(circle at 50% 8%, rgba(225, 174, 77, 0.13), transparent 22%),
    radial-gradient(ellipse at 50% 100%, rgba(102, 51, 18, 0.34), transparent 42%),
    linear-gradient(90deg, rgba(255, 222, 154, 0.018) 0 1px, transparent 1px 78px),
    linear-gradient(0deg, rgba(255, 222, 154, 0.016) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 54px),
    linear-gradient(120deg, #0e0603 0%, #291307 40%, #140805 100%);
}

body::before {
  background:
    radial-gradient(circle at 50% 28%, rgba(237, 180, 71, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.26));
}

.podium-list {
  align-items: end;
}

.ranking-card {
  align-content: center;
  gap: 8px;
}

.ranking-card.rank-1 {
  z-index: 2;
}

.ranking-card h2 {
  line-height: 1.05;
}

.ranking-card .rank-player {
  min-height: 48px;
  align-content: center;
}

.ranking-card.rank-1 .rank-player {
  min-height: 60px;
}

.ranking-card:nth-child(n+4) .rank-player {
  min-height: 0;
}

.rank-score {
  line-height: 0.95;
}

.rank-meta:empty {
  display: none;
}

.active-player-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  text-align: center;
}

.active-player-card > div:first-child {
  min-width: 0;
}

.active-score {
  align-content: center;
}

.quick-score-panel.is-death-mode .score-mode-toggle button[data-score-mode="death"] {
  color: #f7e6ce;
  background: linear-gradient(180deg, #1d1b19 0%, #050505 100%);
  border-color: rgba(255, 255, 255, 0.18);
}

.quick-score-panel.is-death-mode .zero-score-form button,
.quick-score-panel.is-death-mode .quick-column.death button,
.quick-score-panel.is-death-mode .quick-column.death .custom-score-trigger {
  color: #f7e6ce !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #2b2927 0%, #0b0a09 74%, #000 100%) !important;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.14),
    inset 0 -3px 0 rgba(0, 0, 0, 0.6),
    0 8px 13px rgba(0, 0, 0, 0.38);
  text-shadow: 0 2px 0 #000;
}

@media (max-width: 520px) {
  .ranking-card h2 {
    font-size: 0.88rem;
  }

  .ranking-card.rank-1 h2 {
    font-size: 1.02rem;
  }

  .ranking-card .rank-player {
    min-height: 42px;
  }

  .ranking-card.rank-1 .rank-player {
    min-height: 52px;
  }

  .rank-meta {
    min-height: 16px;
  }

  .active-player-card {
    grid-template-columns: minmax(0, 1fr) auto;
    text-align: center;
  }

  .active-score {
    justify-items: end;
  }
}

/* Stable leaderboard layout + mode colors */
.podium-list {
  grid-template-columns: 1fr;
  gap: 8px;
}

.ranking-card,
.ranking-card.rank-1,
.ranking-card.rank-2,
.ranking-card.rank-3 {
  order: initial;
  margin-top: 0;
}

.ranking-card.rank-1 {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  min-height: 96px;
  padding: 12px 14px;
  text-align: left;
  align-items: center;
  justify-items: stretch;
  background:
    radial-gradient(circle at 12% 20%, rgba(246, 206, 112, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(95, 58, 18, 0.94), rgba(25, 12, 6, 0.96));
}

.ranking-card.rank-1 .rank-number {
  position: static;
  transform: none;
  width: 42px;
  height: 42px;
}

.ranking-card.rank-1 .rank-player,
.ranking-card.rank-1 .player-topline {
  min-height: 0;
  justify-items: start;
  text-align: left;
}

.ranking-card.rank-1 h2 {
  font-size: 1.45rem;
}

.ranking-card.rank-1 .rank-score {
  font-size: 2.65rem;
}

.ranking-card:not(.rank-1) {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 58px;
  padding: 8px 12px;
  text-align: left;
  align-items: center;
  justify-items: stretch;
}

.ranking-card:not(.rank-1) .rank-number {
  position: static;
  transform: none;
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}

.ranking-card:not(.rank-1) .rank-player,
.ranking-card:not(.rank-1) .player-topline {
  min-height: 0;
  justify-items: start;
  text-align: left;
}

.ranking-card:not(.rank-1) h2 {
  font-size: 1.05rem;
}

.ranking-card:not(.rank-1) .rank-score {
  font-size: 1.65rem;
}

.ranking-card .player-topline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.rank-meta {
  justify-content: flex-start;
}

.quick-score-panel.is-remove-mode .score-mode-toggle button[data-score-mode="remove"] {
  color: #fff1ea;
  background: linear-gradient(180deg, #8e2f24 0%, #42110d 100%);
  border-color: rgba(255, 169, 130, 0.38);
}

.quick-score-panel.is-remove-mode .zero-score-form button,
.quick-score-panel.is-remove-mode .quick-column.remove button,
.quick-score-panel.is-remove-mode .quick-column.remove .custom-score-trigger {
  color: #fff1ea !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 204, 180, 0.2), transparent 22%),
    linear-gradient(180deg, #7b2a20 0%, #3a100c 72%, #150504 100%) !important;
  border-color: rgba(205, 104, 73, 0.72);
  text-shadow: 0 2px 0 #130403;
}

@media (max-width: 520px) {
  .ranking-card.rank-1 {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    min-height: 82px;
    padding: 10px 12px;
  }

  .ranking-card.rank-1 .rank-score {
    font-size: 2.1rem;
  }

  .ranking-card.rank-1 h2 {
    font-size: 1.18rem;
  }

  .ranking-card:not(.rank-1) {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 52px;
    padding: 7px 10px;
  }

  .ranking-card:not(.rank-1) .rank-score {
    font-size: 1.45rem;
  }
}

/* Compact turn status + final score-mode colors */
.turn-panel {
  gap: 8px;
}

.active-player-card {
  min-height: 58px;
  padding: 9px 13px;
  gap: 10px;
  border-width: 1px;
  background:
    radial-gradient(circle at 12% 12%, rgba(233, 180, 73, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(43, 24, 11, 0.86), rgba(10, 6, 4, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 224, 151, 0.12),
    0 8px 16px rgba(0, 0, 0, 0.22);
}

.active-player-card .eyebrow {
  display: block;
  margin-bottom: 2px;
  font-size: 0.64rem;
  letter-spacing: 0.13em;
}

.active-player-card h2 {
  font-size: clamp(1.15rem, 3.2vw, 1.55rem);
  line-height: 1;
}

.active-score {
  gap: 0;
  justify-items: end;
}

.active-score strong {
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  line-height: 0.92;
}

.active-score span {
  font-size: 0.78rem;
}

.next-turn {
  min-height: 34px;
  padding: 6px 10px;
  justify-content: center;
  gap: 8px;
  background: rgba(10, 5, 2, 0.38);
  border-color: rgba(216, 170, 76, 0.28);
  box-shadow: none;
}

.next-turn span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.next-turn strong {
  font-size: 0.98rem;
}

.zero-score-form button {
  color: #3a2108 !important;
  background:
    radial-gradient(circle at 30% 16%, rgba(255, 252, 211, 0.6), transparent 20%),
    linear-gradient(180deg, #f8d968 0%, #da981a 62%, #9d5d08 100%) !important;
  border-color: rgba(255, 230, 137, 0.86);
  box-shadow:
    inset 0 2px 0 rgba(255, 245, 183, 0.68),
    inset 0 -3px 0 rgba(114, 61, 4, 0.4),
    0 8px 13px rgba(0, 0, 0, 0.28);
  text-shadow: 0 1px 0 rgba(255, 234, 162, 0.68);
}

.quick-score-panel.is-remove-mode .zero-score-form button {
  color: #fff1ea !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 204, 180, 0.2), transparent 22%),
    linear-gradient(180deg, #7b2a20 0%, #3a100c 72%, #150504 100%) !important;
  border-color: rgba(205, 104, 73, 0.72);
  text-shadow: 0 2px 0 #130403;
}

.quick-score-panel.is-death-mode .zero-score-form button {
  color: #f7e6ce !important;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #2b2927 0%, #0b0a09 74%, #000 100%) !important;
  border-color: rgba(255, 255, 255, 0.2);
  text-shadow: 0 2px 0 #000;
}

@media (max-width: 520px) {
  .turn-panel {
    gap: 7px;
  }

  .active-player-card {
    min-height: 50px;
    padding: 7px 10px;
  }

  .active-player-card .eyebrow {
    font-size: 0.58rem;
  }

  .active-score span {
    font-size: 0.72rem;
  }

  .next-turn {
    min-height: 30px;
    padding: 5px 8px;
  }
}

/* Slimmer current/next turn status */
.turn-panel {
  gap: 6px;
}

.active-player-card {
  min-height: 46px;
  padding: 7px 11px;
  border-radius: 8px;
  scroll-margin-top: 14px;
}

#score-controls {
  scroll-margin-top: 12px;
}

.active-player-card .eyebrow {
  margin-bottom: 1px;
  font-size: 0.56rem;
}

.active-player-card h2 {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.active-score strong {
  font-size: clamp(1.3rem, 3.2vw, 1.65rem);
}

.active-score span {
  font-size: 0.68rem;
}

.next-turn {
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 7px;
  background: rgba(6, 3, 1, 0.24);
}

.next-turn span {
  font-size: 0.6rem;
}

.next-turn strong {
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .active-player-card {
    min-height: 42px;
    padding: 6px 9px;
  }

  .active-player-card h2 {
    font-size: 1rem;
  }

  .active-score strong {
    font-size: 1.35rem;
  }

  .next-turn {
    min-height: 26px;
    padding: 4px 8px;
  }
}

/* Cleaner leaderboard active state */
.ranking-row.is-active,
.ranking-card.is-active,
.ranking-card:nth-child(n+4).is-active {
  border-color: rgba(116, 72, 20, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 173, 0.04);
}

.ranking-card.rank-1.is-active {
  border-color: rgba(227, 187, 88, 0.72);
}

.rank-number,
.ranking-card.rank-1 .rank-number,
.ranking-card.rank-2 .rank-number,
.ranking-card.rank-3 .rank-number,
.ranking-card:nth-child(n+4) .rank-number,
.ranking-card:not(.rank-1) .rank-number {
  box-shadow: inset 0 1px 0 rgba(255, 244, 188, 0.36);
  text-shadow: none;
}

/* New game screen */
.welcome-panel {
  grid-template-columns: minmax(0, 760px);
  justify-content: center;
  align-content: center;
  gap: 18px;
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px) 0;
}

.welcome-copy {
  text-align: center;
  color: #f8ead0;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.56), 0 18px 28px rgba(0, 0, 0, 0.38);
}

.welcome-copy .eyebrow {
  margin-bottom: 6px;
  color: #d8aa4c;
  letter-spacing: 0.18em;
}

.welcome-copy h1 {
  color: #f8ead0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.4rem, 12vw, 6.8rem);
  font-weight: 950;
  line-height: 0.82;
  text-transform: uppercase;
}

.welcome-copy p {
  display: none;
}

.game-tabs {
  position: relative;
  overflow: hidden;
  padding: clamp(14px, 3vw, 22px);
  color: #f6ead2;
  background:
    linear-gradient(90deg, rgba(255, 214, 112, 0.06) 0 1px, transparent 1px 100%),
    radial-gradient(circle at 50% -12%, rgba(224, 160, 58, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(47, 25, 10, 0.96), rgba(10, 5, 3, 0.98));
  background-size: 112px 100%, auto, auto;
  border: 1px solid rgba(216, 170, 76, 0.34);
  border-radius: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 173, 0.06),
    0 20px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: none;
}

.game-tabs::before {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px solid rgba(216, 170, 76, 0.18);
  border-radius: 9px;
}

.tab-buttons {
  position: relative;
  z-index: 1;
  gap: 10px;
  padding: 4px;
  background: rgba(6, 3, 1, 0.5);
  border: 1px solid rgba(216, 170, 76, 0.2);
  border-radius: 999px;
}

.tab-button {
  min-height: 42px;
  color: #ecd8ab;
  border-radius: 999px;
  font-weight: 950;
  letter-spacing: 0.03em;
}

.tab-button.is-active {
  color: #2b1607;
  background:
    radial-gradient(circle at 30% 16%, rgba(255, 252, 211, 0.62), transparent 20%),
    linear-gradient(180deg, #f8d968 0%, #d99518 68%, #8c5008 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 245, 183, 0.62),
    inset 0 -3px 0 rgba(89, 47, 4, 0.36);
}

.setup-form {
  position: relative;
  z-index: 1;
  gap: 14px;
  padding: 18px 4px 0;
}

.section-title {
  color: #f8ead0;
}

.section-title h2 {
  color: #f8ead0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.7rem;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.48);
}

.icon-button {
  width: 44px;
  height: 44px;
  color: #2b1607;
  background:
    radial-gradient(circle at 30% 16%, rgba(255, 252, 211, 0.58), transparent 21%),
    linear-gradient(180deg, #f8d968, #c27a0d);
  border: 1px solid rgba(255, 230, 137, 0.7);
  border-radius: 999px;
}

.players-editor {
  gap: 10px;
}

.field-row {
  color: #f8ead0;
}

.field-row span {
  color: #d8aa4c;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.field-row input,
.field-row select {
  min-height: 48px;
  color: #f8ead0;
  background: linear-gradient(180deg, rgba(17, 9, 5, 0.92), rgba(5, 3, 2, 0.9));
  border: 1px solid rgba(216, 170, 76, 0.28);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 232, 173, 0.05);
}

.field-row input::placeholder {
  color: rgba(248, 234, 208, 0.44);
}

.field-row input:focus,
.field-row select:focus {
  border-color: rgba(248, 217, 104, 0.82);
  box-shadow: 0 0 0 3px rgba(216, 170, 76, 0.16);
}

.joueur {
  grid-template-columns: 86px minmax(0, 1fr) 44px;
  align-items: end;
  padding: 0;
}

.remove-player {
  width: 44px;
  height: 48px;
  color: #f8ead0;
  background: linear-gradient(180deg, #622018, #260806);
  border: 1px solid rgba(205, 104, 73, 0.48);
  border-radius: 9px;
}

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

.form-grid > .field-row {
  min-width: 0;
}

.field-row select,
.field-row input {
  height: 48px;
}

.primary-action {
  min-height: 54px;
  margin-top: 4px;
  color: #2b1607;
  background:
    radial-gradient(circle at 30% 16%, rgba(255, 252, 211, 0.64), transparent 20%),
    linear-gradient(180deg, #f8d968 0%, #d99518 64%, #8c5008 100%);
  border: 1px solid rgba(255, 230, 137, 0.78);
  border-radius: 999px;
  box-shadow:
    inset 0 2px 0 rgba(255, 245, 183, 0.66),
    inset 0 -4px 0 rgba(89, 47, 4, 0.34),
    0 10px 18px rgba(0, 0, 0, 0.28);
  font-size: 1.04rem;
}

.option-row {
  gap: 9px;
}

.choice-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: rgba(6, 3, 1, 0.5);
  border: 1px solid rgba(216, 170, 76, 0.2);
  border-radius: 999px;
}

.choice-toggle label {
  min-width: 0;
  margin: 0;
}

.choice-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-toggle span {
  display: grid;
  min-height: 40px;
  place-items: center;
  color: #ecd8ab;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  text-transform: none;
}

.choice-toggle input:checked + span {
  color: #3a2108;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.9), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b);
  border: 2px solid #f6d77c;
  box-shadow:
    inset 0 3px 0 rgba(255, 240, 168, 0.32),
    inset 0 -4px 0 rgba(80, 43, 6, 0.32);
}

@media (max-width: 640px) {
  .welcome-panel {
    min-height: calc(100vh - 32px);
    padding: 12px 0 24px;
  }

  .game-tabs {
    padding: 12px;
  }

  .welcome-copy h1 {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .form-grid,
  .joueur {
    grid-template-columns: 1fr;
  }

  .joueur {
    gap: 6px;
  }

  .remove-player {
    width: 100%;
  }
}

/* Home buttons and open games */
.tab-button.is-active,
.primary-action,
.icon-button,
.resume-game-link {
  color: #3a2108;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.9), transparent 28%),
    linear-gradient(180deg, #f6c657, #ba7617 62%, #7c470b);
  border: 2px solid #f6d77c;
  box-shadow:
    inset 0 3px 0 rgba(255, 240, 168, 0.32),
    inset 0 -4px 0 rgba(80, 43, 6, 0.32),
    0 9px 14px rgba(0, 0, 0, 0.34);
  text-shadow: 0 1px 0 rgba(255, 232, 160, 0.75);
}

.primary-action,
.resume-game-link {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 3.4vw, 1.35rem);
  font-weight: 900;
}

.open-games {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  padding: 18px 4px 0;
}

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

.open-game-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: center;
  padding: 12px;
  color: #f8ead0;
  background:
    radial-gradient(circle at 10% 12%, rgba(216, 170, 76, 0.13), transparent 32%),
    linear-gradient(180deg, rgba(31, 17, 8, 0.92), rgba(8, 4, 2, 0.94));
  border: 1px solid rgba(216, 170, 76, 0.28);
  border-radius: 10px;
}

.open-game-main {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.open-game-main strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
}

.open-game-code {
  color: #d8aa4c;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.open-game-summary {
  display: flex;
  grid-column: 1 / 2;
  flex-wrap: wrap;
  gap: 7px 10px;
  color: rgba(248, 234, 208, 0.72);
  font-size: 0.82rem;
  font-weight: 800;
}

.open-game-summary span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 3px 8px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(216, 170, 76, 0.12);
  border-radius: 999px;
}

.resume-game-link {
  display: inline-flex;
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
}

.empty-games {
  margin: 0;
  padding: 14px;
  color: rgba(248, 234, 208, 0.72);
  background: rgba(8, 4, 2, 0.42);
  border: 1px solid rgba(216, 170, 76, 0.2);
  border-radius: 10px;
  font-weight: 800;
}

.resume-code-form {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(216, 170, 76, 0.18);
}

@media (max-width: 640px) {
  .open-game-card {
    grid-template-columns: 1fr;
  }

  .open-game-summary,
  .resume-game-link {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Stable compact player order */
.podium-list {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr;
}

.ranking-card,
.ranking-card.rank-1,
.ranking-card.rank-2,
.ranking-card.rank-3,
.ranking-card:not(.rank-1),
.ranking-card:nth-child(n+4) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  margin-top: 0;
  padding: 7px 10px;
  align-items: center;
  justify-items: stretch;
  text-align: left;
  background:
    radial-gradient(circle at 8% 12%, rgba(216, 170, 76, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(31, 17, 8, 0.9), rgba(8, 4, 2, 0.94));
  border-color: rgba(116, 72, 20, 0.72);
}

.ranking-card.is-leading {
  border-color: rgba(216, 170, 76, 0.62);
}

.rank-number,
.ranking-card .rank-number,
.ranking-card.rank-1 .rank-number,
.ranking-card.rank-2 .rank-number,
.ranking-card.rank-3 .rank-number,
.ranking-card:not(.rank-1) .rank-number,
.ranking-card:nth-child(n+4) .rank-number {
  display: none;
}

.ranking-card .rank-player,
.ranking-card.rank-1 .rank-player,
.ranking-card:not(.rank-1) .rank-player,
.ranking-card:nth-child(n+4) .rank-player {
  min-height: 0;
  min-width: 0;
  justify-items: stretch;
  text-align: left;
}

.ranking-card .player-topline,
.ranking-card.rank-1 .player-topline,
.ranking-card:not(.rank-1) .player-topline,
.ranking-card:nth-child(n+4) .player-topline {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
}

.ranking-card h2,
.ranking-card.rank-1 h2,
.ranking-card:not(.rank-1) h2 {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  overflow: hidden;
  color: #f8ead0;
  font-size: 1rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-position {
  flex: 0 0 auto;
  display: inline-grid;
  min-width: 34px;
  min-height: 22px;
  place-items: center;
  color: #3a2108;
  background:
    radial-gradient(circle at 35% 18%, rgba(255, 245, 175, 0.82), transparent 28%),
    linear-gradient(180deg, #f6c657, #9c5e08);
  border: 1px solid rgba(255, 230, 137, 0.7);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 950;
}

.trophy-icon {
  flex: 0 0 auto;
  color: #f4c64f;
  font-size: 0.92rem;
}

.ranking-card .turn-badge {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 8px;
  color: #ecd8ab;
  background: rgba(216, 170, 76, 0.12);
  border: 1px solid rgba(216, 170, 76, 0.22);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
}

.ranking-card .rank-score,
.ranking-card.rank-1 .rank-score,
.ranking-card:not(.rank-1) .rank-score {
  color: #f8ead0;
  font-size: 1.42rem;
  line-height: 0.95;
}

@media (max-width: 520px) {
  .ranking-card,
  .ranking-card.rank-1,
  .ranking-card:not(.rank-1),
  .ranking-card:nth-child(n+4) {
    min-height: 40px;
    padding: 6px 8px;
  }

  .ranking-card h2,
  .ranking-card.rank-1 h2,
  .ranking-card:not(.rank-1) h2 {
    font-size: 0.9rem;
  }

  .rank-position {
    min-width: 30px;
    min-height: 20px;
    font-size: 0.68rem;
  }

  .ranking-card .rank-score,
  .ranking-card.rank-1 .rank-score,
  .ranking-card:not(.rank-1) .rank-score {
    font-size: 1.2rem;
  }
}

/* Winner modal close button must not inherit the gold CTA style */
.winner-modal-card .winner-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  min-height: 0;
  height: 36px;
  padding: 0;
  color: #f8ead0;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(216, 170, 76, 0.32);
  border-radius: 999px;
  box-shadow: none;
  font-family: inherit;
  font-size: 1.35rem;
  line-height: 1;
  text-shadow: none;
}

.winner-modal-card .winner-modal-close i {
  line-height: 1;
}
