/* ==========================================================================
   Tusks Up Draft — "Arena Calm", streamlined
   Utah Mammoth identity (Rock Black, Mountain Blue, Salt White) on a compact,
   quiet scale: 16px body, slim chrome, dense magnet-style schedule rows.
   Display font (Big Shoulders Display) is decorative headings only; body text
   is Atkinson Hyperlegible.
   ========================================================================== */

:root {
  --rock-black: #0f1418;
  --rock-deep: #16232e;
  --mountain-blue: #69b3e7;
  --mountain-blue-dark: #1d6ca8;
  --mountain-blue-deeper: #15517e;
  --salt-white: #f7fafc;
  --paper: #ffffff;
  --ice-tint: #eaf3fb;
  --line: #cdd9e3;
  --line-soft: #e2eaf1;
  --ink: #1a232b;
  --ink-soft: #45535f;
  --ok-green: #1e7a3c;
  --ok-green-bg: #e4f3e9;
  --warn-red: #b3261e;
  --warn-red-bg: #fbe9e7;
  --amber: #8a5a00;
  --amber-bg: #fdf3dd;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 20, 24, 0.08), 0 3px 10px rgba(15, 20, 24, 0.05);
  --font-body: "Atkinson Hyperlegible", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: linear-gradient(180deg, var(--salt-white) 0%, #edf3f8 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Focus & skip link ---------- */

:focus-visible {
  outline: 2px solid var(--mountain-blue-dark);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rock-black);
  color: var(--salt-white);
  padding: 8px 14px;
  z-index: 50;
  font-weight: 700;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ---------- Header ---------- */

.site-header {
  background: linear-gradient(135deg, var(--rock-black) 0%, var(--rock-deep) 100%);
  color: var(--salt-white);
  border-bottom: 3px solid var(--mountain-blue);
}

.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 10px 20px 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand__mark { display: grid; place-items: center; }
.brand__mark svg { width: 30px; height: 30px; }

.brand__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.brand__subtitle {
  display: block;
  font-size: 0.8rem;
  color: #bcd6ec;
  margin-top: 2px;
}

.site-header__user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.signed-in-as strong { color: var(--mountain-blue); }

.site-nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

.site-nav__link {
  display: inline-block;
  padding: 8px 12px;
  color: #d9e8f5;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.site-nav__link:hover { color: var(--salt-white); }

.site-nav__link--current {
  color: var(--salt-white);
  border-bottom-color: var(--mountain-blue);
}

/* ---------- Main layout ---------- */

.site-main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 20px 48px;
}

.site-footer {
  background: var(--rock-black);
  color: #9db4c6;
  text-align: center;
  padding: 10px;
  font-size: 0.85rem;
}

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.8rem;
  color: var(--rock-black);
  margin: 0 0 4px;
}

.page-lede {
  font-size: 0.98rem;
  color: var(--ink-soft);
  max-width: 46rem;
  margin: 0 0 18px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 1.2rem;
  margin: 26px 0 10px;
  color: var(--rock-deep);
}

/* ---------- Flash messages ---------- */

.flash {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 16px;
  border: 1px solid;
}

.flash--notice {
  background: var(--ok-green-bg);
  border-color: var(--ok-green);
  color: var(--ok-green);
}

.flash--alert {
  background: var(--warn-red-bg);
  border-color: var(--warn-red);
  color: var(--warn-red);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
}

.btn--primary {
  background: var(--mountain-blue-dark);
  color: #ffffff;
}
.btn--primary:hover { background: var(--mountain-blue-deeper); }

.btn--dark {
  background: var(--rock-black);
  color: var(--salt-white);
}
.btn--dark:hover { background: #000000; }

.btn--outline {
  background: var(--paper);
  color: var(--mountain-blue-deeper);
  border-color: var(--mountain-blue-dark);
}
.btn--outline:hover { background: var(--ice-tint); }

.btn--danger {
  background: var(--paper);
  color: var(--warn-red);
  border-color: var(--warn-red);
}
.btn--danger:hover { background: var(--warn-red-bg); }

.btn--ghost {
  background: transparent;
  color: #d9e8f5;
  border-color: #4a627a;
}
.btn--ghost:hover { color: #fff; border-color: #7f9cb5; }

.btn--small { min-height: 32px; padding: 4px 12px; font-size: 0.88rem; }

.btn--big { font-size: 1.02rem; padding: 9px 22px; }

.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Cards & panels ---------- */

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.panel--tinted { background: var(--ice-tint); }

/* ---------- Sign-in ---------- */

.signin {
  max-width: 460px;
  margin: 16px auto 0;
}

.signin__hero {
  text-align: center;
  margin-bottom: 20px;
}

.signin__hero .page-title { font-size: 2.1rem; }

.name-options {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
}

.name-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
}

.name-option:hover { border-color: var(--mountain-blue-dark); }

.name-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--mountain-blue-dark);
}

.name-option:has(input:checked) {
  border-color: var(--mountain-blue-dark);
  background: var(--ice-tint);
  box-shadow: inset 0 0 0 1px var(--mountain-blue-dark);
}

.name-option:has(input:focus-visible) {
  outline: 2px solid var(--mountain-blue-dark);
  outline-offset: 2px;
}

.pin-field { margin-bottom: 18px; }

.field-label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 4px;
}

.field-hint {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

.pin-input {
  width: 100%;
  max-width: 180px;
  font-family: var(--font-body);
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pin-input:focus { border-color: var(--mountain-blue-dark); }

/* ---------- Splash (sign-in) ---------- */

.splash-body {
  background:
    repeating-linear-gradient(115deg,
      transparent 0px, transparent 90px,
      rgba(105, 179, 231, 0.045) 90px, rgba(105, 179, 231, 0.045) 92px),
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(105, 179, 231, 0.22), transparent 60%),
    linear-gradient(180deg, #0c1116 0%, #10202e 100%);
  color: var(--salt-white);
}

.splash-body .site-main {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4vh;
}

.splash {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
  padding: 4vh 0 6vh;
}

.splash__glow {
  position: absolute;
  inset: -20% -40% auto;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(105, 179, 231, 0.14), transparent 65%);
  pointer-events: none;
}

.splash__hero { position: relative; }

.splash__mark {
  display: inline-block;
  filter: drop-shadow(0 0 34px rgba(105, 179, 231, 0.55));
  animation: splash-rise 0.5s ease-out both;
}

.splash__kicker {
  margin: 14px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--mountain-blue);
  animation: splash-rise 0.5s ease-out 0.08s both;
}

.splash__title {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(4rem, 16vw, 7rem);
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: var(--salt-white);
  animation: splash-rise 0.5s ease-out 0.14s both;
}

.splash__title-accent {
  display: block;
  color: transparent;
  -webkit-text-stroke: 2px var(--mountain-blue);
}

.splash__tagline {
  margin: 10px 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  font-size: 1.05rem;
  color: #9db4c6;
  animation: splash-rise 0.5s ease-out 0.2s both;
}

.splash__card {
  width: 100%;
  max-width: 420px;
  background: rgba(247, 250, 252, 0.05);
  border: 1px solid rgba(105, 179, 231, 0.35);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(6px);
  animation: splash-rise 0.5s ease-out 0.28s both;
}

.splash__fieldset { border: none; margin: 0; padding: 0; }

.splash__names {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.splash__name {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px solid rgba(247, 250, 252, 0.25);
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1.25rem;
  color: var(--salt-white);
  cursor: pointer;
}

.splash__name:hover { border-color: var(--mountain-blue); }

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

.splash__name:has(input:checked) {
  background: var(--mountain-blue);
  border-color: var(--mountain-blue);
  color: var(--rock-black);
}

.splash__name:has(input:focus-visible) {
  outline: 2px solid var(--mountain-blue);
  outline-offset: 2px;
}

.splash__pin {
  display: flex;
  gap: 8px;
}

.splash__pin-input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-body);
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 8px 10px;
  background: rgba(15, 20, 24, 0.55);
  border: 1px solid rgba(247, 250, 252, 0.25);
  border-radius: 10px;
  color: var(--salt-white);
}

.splash__pin-input::placeholder { color: rgba(247, 250, 252, 0.35); letter-spacing: 0.4em; }

.splash__pin-input:focus { border-color: var(--mountain-blue); outline: none; }

.splash__enter { white-space: nowrap; }

.splash__foot {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7f98ab;
  animation: splash-rise 0.5s ease-out 0.36s both;
}

.splash-body .flash {
  max-width: 420px;
  margin: 0 auto 4px;
}

@keyframes splash-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  .splash__pin { flex-direction: column; }
  .splash__names { grid-template-columns: 1fr; }
}

/* ---------- Pick-your-games board ---------- */

.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
}

.magnet, .prioritybox {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--paper);
}

.magnet__band {
  background: var(--rock-black);
  color: var(--salt-white);
  padding: 9px 14px 7px;
  border-bottom: 3px solid var(--mountain-blue);
}

.magnet__title, .prioritybox__title {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 1.15rem;
  margin: 0;
}

.magnet__subtitle, .prioritybox__subtitle {
  margin: 1px 0 0;
  font-size: 0.8rem;
  color: #bcd6ec;
}

.magnet__hint {
  margin: 0;
  padding: 5px 14px;
  background: var(--warn-red-bg);
  color: var(--warn-red);
  font-weight: 700;
  font-size: 0.82rem;
  border-bottom: 1px solid var(--line-soft);
}

.magnet__rows, .prioritybox__rows {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 46px;
}

.magnet__row {
  display: grid;
  grid-template-columns: 92px 1fr auto 34px;
  gap: 8px;
  align-items: center;
  padding: 3px 8px 3px 14px;
  min-height: 38px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
  background: var(--paper);
}

.magnet__rows .magnet__row:nth-child(even) { background: #f2f7fb; }

.magnet__rows .magnet__row[data-game-id],
.prioritybox__row { cursor: grab; }

.magnet__row--pinned {
  background: var(--line-soft) !important;
  color: var(--ink-soft);
  cursor: default;
  grid-template-columns: 92px 1fr auto;
}

.magnet__date {
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--mountain-blue-deeper);
  white-space: nowrap;
}

.magnet__row--pinned .magnet__date { color: var(--ink-soft); }

.magnet__opponent { font-weight: 700; }

.magnet__tag {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.magnet__time {
  color: var(--ink-soft);
  font-size: 0.82rem;
  white-space: nowrap;
}

.chip-btn {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: var(--mountain-blue-deeper);
  padding: 0;
}

.chip-btn--add { border-color: var(--mountain-blue-dark); }
.chip-btn--add:hover { background: var(--ice-tint); }

.chip-btn--remove { color: var(--warn-red); }
.chip-btn--remove:hover { background: var(--warn-red-bg); border-color: var(--warn-red); }

.prioritybox__band {
  background: var(--mountain-blue-dark);
  color: #ffffff;
  padding: 9px 14px 7px;
  border-bottom: 3px solid var(--rock-black);
}

.prioritybox__subtitle { color: #dcecfa; }

.prioritybox__empty {
  padding: 16px 14px;
  border: 2px dashed var(--mountain-blue);
  border-radius: 8px;
  margin: 12px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  text-align: center;
}

.prioritybox__rows { counter-reset: priority; }

.prioritybox__row { counter-increment: priority; grid-template-columns: 30px 92px 1fr auto 34px; }

.prioritybox__row::before {
  content: counter(priority);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rock-black);
  color: var(--salt-white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
}

.prioritybox__rows .prioritybox__row:first-child::before { background: var(--mountain-blue-dark); }

.prioritybox__actions {
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
}

.drag-ghost { opacity: 0.4; }

/* ---------- Status chips ---------- */

.game-card__status {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}

.status--can { background: var(--ok-green-bg); color: var(--ok-green); }
.status--cannot { background: var(--warn-red-bg); color: var(--warn-red); }
.status--open { background: var(--amber-bg); color: var(--amber); }
.status--preseason { background: var(--line-soft); color: var(--ink-soft); }

/* ---------- Review lists / boxes ---------- */

.review-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 5px;
}

.review-list li {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.95rem;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.review-list .rank-chip {
  font-weight: 700;
  color: var(--mountain-blue-deeper);
  min-width: 2rem;
}

.problem-box {
  background: var(--warn-red-bg);
  border: 1px solid var(--warn-red);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.problem-box h2 { margin: 0 0 6px; font-size: 1.02rem; color: var(--warn-red); }

.problem-box ul { margin: 0; padding-left: 20px; font-size: 0.95rem; }

.success-box {
  background: var(--ok-green-bg);
  border: 1px solid var(--ok-green);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.warning-box {
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.warning-box h2 { margin: 0 0 6px; font-size: 1.02rem; color: var(--amber); }

.admin-banner {
  background: var(--amber-bg);
  border: 1px solid var(--amber);
  color: var(--amber);
  font-weight: 700;
  border-radius: var(--radius);
  padding: 9px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.92rem;
}

.data-table th {
  background: var(--rock-black);
  color: var(--salt-white);
  text-align: left;
  padding: 7px 10px;
  font-size: 0.85rem;
}

.data-table td {
  padding: 7px 10px;
  border-top: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tr:nth-child(even) td { background: #f6f9fc; }

.data-table tr.row--mine td {
  background: var(--ice-tint);
  border-top-color: var(--mountain-blue);
}

.owner-chip {
  display: inline-block;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.85rem;
}

.owner-chip--Josh  { background: #dcebfa; color: #14507e; }
.owner-chip--Rulon { background: #e8f3dc; color: #2e6218; }
.owner-chip--Stan  { background: #fdebd3; color: #7c4a03; }
.owner-chip--none  { background: var(--warn-red-bg); color: var(--warn-red); }

/* ---------- Draft rounds ---------- */

.round-group { margin-bottom: 18px; }

.round-title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
  color: var(--mountain-blue-deeper);
  margin: 0 0 6px;
}

.pick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  margin-bottom: 6px;
}

.pick-card--mine { border-color: var(--mountain-blue-dark); background: var(--ice-tint); }

.pick-card__position {
  display: grid;
  place-items: center;
  min-width: 46px;
  height: 36px;
  border-radius: 8px;
  background: var(--rock-black);
  color: var(--salt-white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.pick-card--mine .pick-card__position { background: var(--mountain-blue-dark); }

.pick-card__body { font-size: 0.95rem; }

.pick-card__meta { color: var(--ink-soft); font-size: 0.88rem; }

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

.inline-form { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.select-input {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 5px 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
}

.availability-grid td.av-can { background: var(--ok-green-bg); color: var(--ok-green); font-weight: 700; }
.availability-grid td.av-cannot { background: var(--warn-red-bg); color: var(--warn-red); font-weight: 700; }
.availability-grid td.av-missing { background: var(--amber-bg); color: var(--amber); font-weight: 700; }

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  margin: 12px 0;
}

.checkbox-row input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--mountain-blue-dark);
  flex-shrink: 0;
}

.actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

.audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.audit-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}

.audit-list time { color: var(--ink-soft); }

.muted { color: var(--ink-soft); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
