* {
  box-sizing: border-box;
}

:root {
  --bg-dark: #14110d;
  --bg-deep: #0c0907;
  --bg-surface: #29231d;
  --panel: linear-gradient(180deg, rgba(64, 58, 48, 0.96), rgba(28, 24, 20, 0.97));
  --panel-strong: linear-gradient(180deg, rgba(20, 17, 14, 0.96), rgba(11, 9, 7, 0.98));
  --panel-soft: linear-gradient(180deg, rgba(55, 48, 40, 0.94), rgba(21, 18, 15, 0.96));
  --line: rgba(180, 155, 103, 0.22);
  --line-strong: rgba(180, 155, 103, 0.74);
  --text: #ebe0c8;
  --muted: #aea188;
  --player: #59c2ff;
  --enemy: #ff6a70;
  --accent: #d6b067;
  --accent-soft: rgba(182, 146, 82, 0.16);
  --ready: #7ce5a1;
  --danger: #b36552;
  --shadow: rgba(0, 0, 0, 0.58);
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at top, rgba(174, 132, 62, 0.08), transparent 36%),
    radial-gradient(circle at bottom, rgba(88, 69, 45, 0.14), transparent 34%),
    linear-gradient(180deg, #29231d, #0c0907 74%);
  color: var(--text);
  font-family: Verdana, Geneva, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px),
    radial-gradient(circle at top left, rgba(214, 176, 103, 0.07), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 128, 90, 0.05), transparent 20%);
  opacity: 0.7;
}

body.sudden-death .timer-display,
body.sudden-death .state-text {
  color: #fff4cf;
  text-shadow: 0 0 18px rgba(182, 146, 82, 0.34);
}

button {
  font: inherit;
}

#app,
#gameShell,
#gameCanvas {
  width: 100%;
  height: 100%;
}

#app {
  position: relative;
}

#gameShell {
  position: relative;
}

#gameCanvas {
  display: block;
  cursor: crosshair;
}

.screen {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.4vw, 18px);
  background:
    linear-gradient(180deg, rgba(20, 17, 14, 0.62), rgba(8, 6, 5, 0.86)),
    radial-gradient(circle at top, rgba(182, 146, 82, 0.12), transparent 45%);
  backdrop-filter: blur(6px);
}

#menuScreen,
.draft-screen,
.create-game-screen {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

.hidden {
  display: none !important;
}

.panel {
  width: min(1360px, calc(100vw - 24px));
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    var(--panel-strong),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0, rgba(255, 255, 255, 0.015) 1px, transparent 1px, transparent 4px);
  box-shadow:
    0 30px 60px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.menu-panel {
  width: 100%;
  height: 100%;
  margin: auto;
  border-radius: 0;
  padding: clamp(18px, 1.9vw, 28px) clamp(20px, 2.3vw, 32px) clamp(18px, 1.7vw, 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.result-panel {
  width: min(460px, 100%);
  padding: 34px;
  text-align: center;
}

.branding h1,
.result-panel h2 {
  margin: 0;
  font-size: clamp(30px, 4.2vw, 48px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 12px;
}

.subtitle,
.result-text,
.menu-note {
  color: var(--muted);
}

.menu-status {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.menu-status.error {
  color: #f0b0a4;
}

.subtitle {
  max-width: 860px;
  margin: 6px 0 0;
  line-height: 1.35;
  font-size: 13px;
}

.menu-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.menu-section {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.18);
}

.menu-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.section-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
  font-size: 11px;
}

.compact-heading {
  margin-bottom: 8px;
}

.champion-section {
  padding-bottom: 10px;
}

.lobby-section {
  padding-top: 10px;
}

.lobby-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: start;
}

.lobby-side-block {
  display: grid;
  gap: 12px;
}

.lobby-meta-card {
  padding: 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(42, 35, 29, 0.92), rgba(24, 20, 17, 0.96));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.online-heading {
  margin-bottom: 0;
}

.menu-footer {
  min-height: 22px;
}

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

.champion-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 120px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.champion-card:hover,
.champion-card.selected {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 24px rgba(0, 0, 0, 0.3);
}

.champion-section .champion-card {
  cursor: default;
}

.champion-section .champion-card:hover,
.champion-section .champion-card.selected {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.champion-card strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.champion-role {
  color: var(--accent);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.champion-desc {
  color: var(--muted);
  line-height: 1.25;
  font-size: 11px;
}

.champion-icon {
  display: block;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(79, 70, 58, 0.92), rgba(37, 31, 26, 0.96));
  border: 1px solid rgba(180, 155, 103, 0.18);
  position: relative;
}

.square-icon::before,
.circle-icon::before,
.triangle-icon::before {
  content: "";
  position: absolute;
  inset: 11px;
  margin: auto;
}

.square-icon::before {
  width: 30px;
  height: 30px;
  background: #3aa6ff;
}

.circle-icon::before {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #ff8f54;
}

.triangle-icon::before {
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 28px solid #ffc949;
  top: 9px;
}

.primary-button,
.secondary-button {
  min-width: 0;
  padding: 10px 12px;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(168, 145, 97, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 7px 14px rgba(0, 0, 0, 0.28);
  transition: transform 0.12s ease, filter 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.primary-button {
  background:
    linear-gradient(180deg, rgba(120, 101, 72, 0.96), rgba(57, 46, 35, 0.99)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 2px, transparent 2px, transparent 5px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-button {
  background: linear-gradient(180deg, rgba(90, 79, 67, 0.96), rgba(43, 37, 31, 0.99));
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  filter: brightness(1.03);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.draft-lock-button:disabled {
  cursor: default;
  opacity: 1;
  color: rgba(235, 224, 200, 0.9);
  border-color: rgba(180, 155, 103, 0.24);
  background:
    linear-gradient(180deg, rgba(84, 74, 62, 0.76), rgba(41, 34, 28, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.2);
  filter: none;
}

.lobby-actions {
  display: none;
}

.lobby-label {
  margin: 0 0 6px;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
}

.lobby-status-text {
  margin: 0;
  color: var(--text);
  line-height: 1.3;
  font-size: 13px;
}

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

.group-grid,
.online-players {
  display: grid;
  gap: 8px;
}

.group-grid {
  grid-template-columns: 1fr;
}

.online-players {
  grid-template-columns: 1fr;
}

.group-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.group-card:hover,
.group-card.selected {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 24px rgba(0, 0, 0, 0.3);
}

.group-card.locked {
  cursor: not-allowed;
  opacity: 0.7;
}

.group-card.current-group {
  border-color: rgba(122, 128, 90, 0.52);
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.group-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.group-tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(182, 146, 82, 0.12);
  color: var(--muted);
}

.game-card .group-tag {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.group-tag.ready {
  background: rgba(122, 128, 90, 0.18);
  color: #d7dfbd;
}

.group-slots {
  display: grid;
  gap: 8px;
}

.lobby-slot-list {
  margin-top: 2px;
}

.group-slot {
  padding: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.group-slot.filled {
  border-color: rgba(180, 155, 103, 0.16);
}

.group-slot.ready {
  border-color: rgba(122, 128, 90, 0.34);
  background: rgba(122, 128, 90, 0.12);
}

.group-slot.empty {
  color: var(--muted);
  font-style: italic;
}

.group-player-name {
  display: block;
  font-weight: 700;
  font-size: 13px;
}

.group-player-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

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

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lobby-games-list {
  min-height: 188px;
}

.game-card {
  padding: 10px 11px 11px;
}

.game-card-body {
  display: flex;
  align-items: center;
  gap: 10px;
}

.game-card-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.arena-thumbnail {
  width: 82px;
  height: 50px;
  flex: 0 0 82px;
  border-radius: 12px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f5ead1;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.arena-forge-ring {
  background:
    radial-gradient(circle at 50% 50%, rgba(113, 214, 212, 0.35), transparent 40%),
    linear-gradient(135deg, #173847, #254d5d 55%, #101f2c);
}

.arena-harbor-grid {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(135deg, #27466a, #173042 70%, #0b1c29);
}

.arena-solar-bastion {
  background:
    radial-gradient(circle at 50% 35%, rgba(182, 146, 82, 0.34), transparent 36%),
    linear-gradient(135deg, #5a3f21, #8e6334 60%, #29190d);
}

.arena-editor-map {
  background:
    radial-gradient(circle at 50% 50%, rgba(143, 227, 136, 0.28), transparent 42%),
    linear-gradient(135deg, #1d3a1a, #30592f 58%, #0f1f0d);
}

.arena-random {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(135deg, #283447, #162230 65%, #0b131d);
  font-size: 24px;
}

.current-game-summary {
  display: grid;
  gap: 4px;
  color: var(--text);
  line-height: 1.3;
  font-size: 13px;
}

.joined-game-card {
  gap: 12px;
  border: 1px solid rgba(180, 155, 103, 0.28);
  background:
    linear-gradient(180deg, rgba(48, 40, 33, 0.98), rgba(22, 18, 15, 0.98));
  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.joined-game-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.room-players {
  min-height: 118px;
}

.online-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.online-player-card.ready {
  border-color: rgba(122, 128, 90, 0.42);
  background: rgba(122, 128, 90, 0.12);
}

.online-player-card.not-ready {
  border-color: rgba(179, 101, 82, 0.34);
  background: rgba(179, 101, 82, 0.12);
}

.online-player-name {
  font-weight: 700;
  font-size: 13px;
}

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

.joined-game-card .section-copy,
.joined-game-card .current-game-summary,
.joined-game-card .online-player-meta {
  color: rgba(245, 234, 209, 0.92);
}

.empty-state {
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
}

.room-actions {
  margin-top: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.room-actions > button {
  width: 100%;
  min-height: 48px;
}

.room-actions #startGameButton {
  grid-column: 1 / -1;
}

.selection-disabled {
  opacity: 0.78;
  cursor: default;
}

.selection-disabled:not(.selected):hover {
  transform: none;
  border-color: var(--line);
  box-shadow: none;
}

.create-game-screen {
  z-index: 5;
}

.create-game-panel {
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: clamp(18px, 1.9vw, 28px) clamp(20px, 2.3vw, 32px) clamp(20px, 2vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
}

.create-game-title {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 40px);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.create-game-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.create-game-form {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.create-form-section {
  padding: 12px;
}

.create-choice-grid {
  display: grid;
  gap: 8px;
}

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

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

.create-choice-grid.map-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.create-choice-button,
.map-choice-button {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(59, 51, 42, 0.98), rgba(21, 17, 14, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.create-choice-button span,
.map-choice-button span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.create-choice-button strong,
.map-choice-button strong {
  font-size: 14px;
  letter-spacing: 0.04em;
}

.create-choice-button:hover,
.create-choice-button.selected,
.map-choice-button:hover,
.map-choice-button.selected {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 24px rgba(0, 0, 0, 0.26);
}

.map-choice-button {
  justify-items: start;
}

.map-choice-button .arena-thumbnail {
  width: 100%;
  height: 62px;
}

.create-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.draft-screen {
  z-index: 5;
}

.draft-panel {
  width: 100%;
  height: 100%;
  border-radius: 0;
  padding: clamp(18px, 1.9vw, 28px) clamp(20px, 2.3vw, 32px) clamp(20px, 2vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
}

.draft-copy {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.draft-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(250px, 0.8fr);
  gap: 12px;
  margin-top: 14px;
}

.draft-arena-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.draft-timer-card {
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.draft-countdown {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff4cf;
}

.draft-player-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 10px;
}

.draft-select-section {
  margin-top: 10px;
}

.draft-champion-select {
  margin-top: 6px;
}

.draft-champion-card {
  cursor: pointer;
}

.draft-champion-card:hover,
.draft-champion-card.selected {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 24px rgba(0, 0, 0, 0.3);
}

#hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 20px;
}

.top-hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.health-card,
.score-card,
.cooldown-slot {
  border: 1px solid rgba(180, 155, 103, 0.2);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(36, 30, 25, 0.9), rgba(18, 15, 12, 0.95));
  backdrop-filter: blur(4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.3);
}

.health-card {
  padding: 14px;
}

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

.card-title {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-subtitle {
  color: var(--text);
  font-weight: 700;
}

.health-bar {
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(180, 155, 103, 0.14);
}

.health-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  transition: width 0.16s linear;
}

.player-fill {
  background: linear-gradient(90deg, #2a9dff, #7ed5ff);
}

.enemy-fill {
  background: linear-gradient(90deg, #ff585f, #ff9b7d);
}

.health-text {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.score-card {
  padding: 14px 20px;
  text-align: center;
}

.score-text {
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
}

.round-text {
  margin-top: 6px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.center-hud {
  position: absolute;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.timer-display {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.state-text {
  margin-top: 6px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

.bottom-hud {
  display: flex;
  justify-content: center;
}

.cooldowns {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 12px;
  width: min(860px, 100%);
}

.cooldown-slot {
  --cooldown-progress: 1;
  --cooldown-color: var(--ready);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.cooldown-slot.ready {
  border-color: rgba(124, 229, 161, 0.35);
}

.cooldown-wheel {
  position: relative;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
}

.cooldown-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--cooldown-color) calc(var(--cooldown-progress) * 1turn),
    rgba(255, 255, 255, 0.08) 0
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 0);
}

.cooldown-center {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: linear-gradient(180deg, rgba(41, 34, 28, 0.96), rgba(24, 20, 17, 0.98));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
}

.spell-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.spell-key {
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spell-name {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}

.spell-cd {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.1;
  color: var(--muted);
}

.cooldown-slot.ready .spell-cd {
  color: var(--ready);
}

.cooldown-slot.ready .cooldown-center {
  border-color: rgba(122, 128, 90, 0.34);
}

.round-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  transform: translate(-50%, -50%);
  padding: 18px 26px;
  border-radius: 18px;
  border: 1px solid rgba(180, 155, 103, 0.35);
  background: linear-gradient(180deg, rgba(42, 35, 29, 0.94), rgba(24, 20, 17, 0.98));
  color: #fff4cf;
  font-size: clamp(22px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.result-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.editor-gate-panel {
  width: min(420px, 100%);
}

.editor-code-field {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  text-align: left;
}

.editor-code-field span {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-code-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(180, 155, 103, 0.24);
  background: rgba(13, 11, 9, 0.92);
  color: var(--text);
  outline: none;
}

.editor-screen {
  background: none;
  align-items: stretch;
  justify-content: flex-start;
  padding: 18px;
  backdrop-filter: none;
  pointer-events: none;
}

.editor-shell {
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  pointer-events: auto;
}

.editor-sidebar,
.editor-help-card {
  border: 1px solid rgba(180, 155, 103, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(31, 27, 23, 0.94), rgba(13, 11, 9, 0.96));
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.editor-sidebar {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 36px);
  padding: 16px;
  overflow: auto;
}

.editor-sidebar h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

.editor-slot-button {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: linear-gradient(180deg, rgba(65, 56, 47, 0.94), rgba(27, 22, 18, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-slot-button.selected {
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.3);
  filter: brightness(1.04);
}

.editor-slot-button strong {
  font-size: 13px;
  line-height: 1.25;
}

.editor-slot-number,
.editor-slot-meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.editor-slot-number {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.editor-mode-buttons,
.editor-action-grid {
  display: grid;
  gap: 10px;
}

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

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

.editor-mode-buttons .secondary-button.selected,
.editor-asset-button.selected {
  border-color: var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 10px 24px rgba(0, 0, 0, 0.3);
  filter: brightness(1.04);
}

.editor-selection-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: rgba(255, 255, 255, 0.03);
}

.editor-selection-card strong {
  font-size: 14px;
}

.editor-selection-card span,
.editor-help-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.editor-asset-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.editor-asset-button {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(180, 155, 103, 0.18);
  background: linear-gradient(180deg, rgba(65, 56, 47, 0.94), rgba(27, 22, 18, 0.98));
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.editor-asset-thumb-frame {
  display: block;
  aspect-ratio: 10 / 7;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(180, 155, 103, 0.16);
  background:
    radial-gradient(circle at 50% 18%, rgba(214, 176, 103, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(28, 24, 20, 0.98), rgba(12, 10, 8, 0.98));
}

.editor-asset-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-asset-caption {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-align: center;
}

.editor-help-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.editor-help-card strong {
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

@media (max-width: 900px) {
  .section-heading-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .lobby-overview-grid {
    grid-template-columns: 1fr;
  }

  .champion-select {
    grid-template-columns: 1fr;
  }

  .draft-overview-grid {
    grid-template-columns: 1fr;
  }

  .draft-player-status {
    grid-template-columns: 1fr;
  }

  .create-choice-grid.map-grid,
  .create-choice-grid.three-col,
  .create-choice-grid.two-col,
  .lobby-buttons {
    grid-template-columns: 1fr;
  }

  .top-hud {
    grid-template-columns: 1fr;
  }

  .center-hud {
    top: 188px;
  }

  .cooldowns {
    grid-template-columns: 1fr;
  }

  .result-actions {
    flex-direction: column;
  }

  .editor-mode-buttons,
  .editor-action-grid,
  .editor-slot-list {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    flex-direction: column;
  }

  .editor-shell {
    width: 100%;
  }
}
