:root {
  --ink: #10141c;
  --muted: #6b7385;
  --paper: #eceff4;
  --surface: #f7f8fb;
  --line: rgba(16, 20, 28, 0.1);
  --scarlet: #d91f2a;
  --scarlet-deep: #9e121b;
  --slate: #1c2433;
  --accent: #c6a15b;
  --font-display: "Archivo Black", sans-serif;
  --font-body: "Manrope", sans-serif;
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
}

body {
  position: relative;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 45% at 0% -10%, rgba(217, 31, 42, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 0%, rgba(28, 36, 51, 0.14), transparent 50%),
    linear-gradient(180deg, #f4f6fa 0%, var(--paper) 40%, #e3e8f0 100%);
}

.top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--slate);
}

.tagline {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.back-link {
  color: var(--scarlet-deep);
  font-weight: 600;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.account-login,
.col-picker-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.account-login {
  border-radius: 999px;
}

.col-picker-btn:hover,
.account-login:hover {
  border-color: rgba(217, 31, 42, 0.45);
  color: var(--scarlet-deep);
}

.col-picker-btn.danger {
  color: var(--scarlet-deep);
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.toolbar h1,
.toolbar h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.meta {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.live-draft-placeholder,
.live-draft-lot,
.live-draft-actions,
.live-draft-columns section {
  max-width: 40rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.live-draft-toolbar-actions,
.live-draft-admin,
.live-draft-actions,
.live-draft-lot-head,
.live-draft-manager,
.live-draft-squad-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.live-draft-squad-tally {
  margin: 0 0 0.55rem;
  line-height: 1.45;
}

.live-draft-squad-tally .is-zero {
  opacity: 0.45;
}

.live-draft-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.live-draft-lot img,
.live-draft-squad-row img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  background: #fff;
}

.live-draft-team-name {
  margin-bottom: 0.75rem;
}

.live-draft-results {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
}

.live-draft-results button {
  text-align: left;
}

.live-draft-lot.is-open {
  border-color: rgba(198, 161, 91, 0.65);
  box-shadow: 0 0 0 3px rgba(198, 161, 91, 0.16);
}

.live-draft-lot.is-paused {
  border-color: rgba(217, 31, 42, 0.45);
  box-shadow: 0 0 0 3px rgba(217, 31, 42, 0.12);
}

.live-draft-lot.is-you-leader {
  box-shadow: 0 0 0 3px rgba(43, 138, 62, 0.2);
}

.live-draft-lot-flag {
  margin: 0.35rem 0 0;
  font-weight: 700;
}

.live-draft-manager.is-turn {
  outline: 2px solid var(--accent);
}

.live-draft-manager.is-leader {
  outline: 2px solid #2b8a3e;
}

.live-draft-manager.is-folded {
  opacity: 0.55;
}

.live-draft-bid-form {
  align-items: center;
}

.live-draft-bid-stepper {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.live-draft-bid-stepper input {
  width: 4.8rem;
  min-width: 4.8rem;
  flex: 0 0 4.8rem;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
}

.live-draft-bid-cap {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.live-draft-bid-submit {
  background: #2b8a3e;
  color: #fff;
  border-color: #237a35;
}

.live-draft-bid-submit:hover {
  background: #247536;
  color: #fff;
  border-color: #1b5e2a;
}

.live-draft-bid-submit:disabled,
.live-draft-fold:disabled,
.live-draft-autopick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.live-draft-fold {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}

.live-draft-fold:active,
.live-draft-autopick:active {
  scale: 0.96;
}

@media (prefers-reduced-motion: reduce) {
  .live-draft-fold:active,
  .live-draft-autopick:active {
    scale: 1;
  }
}

.live-draft-fold.is-pressed {
  background: var(--scarlet);
  color: #fff;
  border-color: var(--scarlet-deep);
}

.live-draft-autopick {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  margin: 0.5rem 0 0;
  padding: 0.45rem 0.8rem;
  border: 1px solid #237a35;
  border-radius: 6px;
  background: #2b8a3e;
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.live-draft-autopick:hover {
  background: #247536;
  border-color: #1b5e2a;
}

.live-draft-manager-name.is-unnamed,
.live-draft-unnamed {
  color: var(--muted);
  font-weight: 600;
}

.live-draft-ping {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.live-draft-ping-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #c92a2a;
}

.live-draft-ping.is-online .live-draft-ping-dot {
  background: #2b8a3e;
}

.live-draft-wishlist-panel .live-draft-actions {
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  margin: 0.5rem 0 0.65rem;
}

.live-draft-wishlist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.live-draft-wishlist-filters label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1 1 8rem;
}

.live-draft-wishlist-filters select {
  min-width: 6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.live-draft-wishlist-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.live-draft-wishlist-row input[type="number"] {
  width: 4.2rem;
  min-width: 4.2rem;
  flex: 0 0 4.2rem;
  padding: 0.3rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.live-draft-wishlist-row .live-draft-wishlist-name {
  flex: 1 1 8rem;
  font-size: 0.88rem;
}

.live-draft-actions input {
  min-width: 6rem;
  flex: 1 1 8rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.live-draft-placeholder p {
  margin: 0 0 0.75rem;
}

.live-draft-placeholder p:last-child {
  margin-bottom: 0;
}

.live-draft-columns h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.live-draft-all-squads {
  margin-top: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
}

.live-draft-all-squads h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.live-draft-all-squads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 0.65rem 0.75rem;
  overflow-x: auto;
}

.live-draft-manager-squad h4 {
  margin: 0 0 0.4rem;
  font-size: 0.88rem;
  line-height: 1.2;
}

.live-draft-manager-squad .live-draft-squad-row {
  display: block;
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  line-height: 1.25;
}

.live-draft-manager-squad .meta {
  margin: 0;
}

.live-draft-as {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.live-draft-as select,
.live-draft-correct select {
  min-width: 6rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.live-draft-correct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.live-draft-correct input[type="number"] {
  width: 3.6rem;
  min-width: 3.6rem;
  padding: 0.3rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.live-draft-release {
  margin-top: 0.25rem;
}

.live-draft-all-squads-grid:has(.live-draft-correct) {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

@media (max-width: 720px) {
  .live-draft-placeholder,
  .live-draft-lot,
  .live-draft-actions,
  .live-draft-columns section,
  .live-draft-all-squads {
    max-width: 100%;
    padding: 0.85rem;
    border-radius: 14px;
  }
}
