:root {
  color-scheme: light;
  --ink: #171614;
  --muted: #5f6664;
  --paper: #eef3f1;
  --panel: #f9fbf8;
  --line: #c9d3cf;
  --charcoal: #161b1d;
  --green: #2f7d55;
  --red: #c94c43;
  --gold: #eab54f;
  --blue: #3e78a8;
  --violet: #6554a8;
  --shadow: 0 22px 55px rgba(11, 17, 18, 0.22);
  --tight-shadow: 0 10px 24px rgba(11, 17, 18, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(234, 181, 79, 0.08) 0 12%, transparent 12% 38%, rgba(62, 120, 168, 0.08) 38% 50%, transparent 50% 100%) 0 0 / 46px 46px,
    linear-gradient(180deg, #101516 0%, #1b2020 38%, #dfe8e3 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(247, 251, 248, 0.05), transparent 18%, transparent 82%, rgba(247, 251, 248, 0.05)),
    linear-gradient(180deg, rgba(247, 251, 248, 0.06), transparent 240px);
}

body[data-theme="light"] {
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(234, 181, 79, 0.1) 0 12%, transparent 12% 38%, rgba(62, 120, 168, 0.1) 38% 50%, transparent 50% 100%) 0 0 / 46px 46px,
    linear-gradient(180deg, #edf4f1 0%, #f7faf8 50%, #dfe8e3 100%);
}

body[data-theme="light"]::before {
  background:
    linear-gradient(90deg, rgba(22, 27, 29, 0.04), transparent 18%, transparent 82%, rgba(22, 27, 29, 0.04)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.65), transparent 250px);
}

body[data-theme="light"] .home-title,
body[data-theme="light"] .draft-panel {
  color: var(--charcoal);
}

body[data-theme="light"] .home-title h1,
body[data-theme="light"] .draft-header h1 {
  text-shadow: 0 12px 26px rgba(22, 27, 29, 0.14);
}

body[data-theme="light"] .help-tab {
  color: var(--charcoal);
  background: rgba(249, 251, 248, 0.9);
}

body[data-theme="light"] .auction-stage,
body[data-theme="light"] .complete-panel {
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 38%),
    linear-gradient(180deg, #fbfdfb, #e8efec);
  border-color: rgba(22, 27, 29, 0.08);
}

body[data-theme="light"] .current-item h2,
body[data-theme="light"] .complete-hero h1 {
  text-shadow: 0 10px 22px rgba(22, 27, 29, 0.12);
}

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

button {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.app-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  position: relative;
}

.landing-panel,
.home-panel,
.setup-panel,
.invite-panel,
.waiting-panel,
.draft-panel,
.complete-panel {
  min-height: calc(100vh - 56px);
}

.landing-panel,
.home-panel,
.setup-panel,
.invite-panel,
.waiting-panel {
  display: grid;
  align-content: center;
  gap: 22px;
}

.setup-panel {
  position: relative;
  padding-bottom: 64px;
}

.landing-panel,
.home-panel {
  position: relative;
  gap: 24px;
  justify-items: center;
  padding-bottom: 64px;
}

.landing-start-card {
  width: min(430px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.24), transparent 46%),
    rgba(249, 251, 248, 0.96);
  box-shadow: var(--shadow);
}

.landing-start-card .primary-button {
  min-height: 56px;
  font-size: 1.02rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.home-title-large {
  position: relative;
  padding: 18px 0 4px;
}

.home-title-large::after {
  content: "";
  display: block;
  width: min(320px, 72vw);
  height: 2px;
  margin: 18px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(234, 181, 79, 0.9), transparent);
}

.home-title-large .brand-mark {
  width: 92px;
  height: 92px;
}

.home-proof-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: -8px;
}

.home-proof-row span {
  min-height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0 11px;
  border: 1px solid rgba(247, 251, 248, 0.24);
  border-radius: 999px;
  color: #f7fbf8;
  background: rgba(247, 251, 248, 0.08);
  box-shadow: inset 0 1px 0 rgba(247, 251, 248, 0.1);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-theme="light"] .home-proof-row span {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.1);
  background: rgba(249, 251, 248, 0.72);
}

.home-choice-grid {
  width: min(700px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.home-choice-card,
.home-player-card {
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.72), transparent 24%),
    linear-gradient(145deg, rgba(47, 125, 85, 0.18), transparent 48%),
    rgba(249, 251, 248, 0.96);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.home-choice-card {
  min-height: 150px;
  display: grid;
  align-content: end;
  gap: 6px;
  padding: 18px;
  text-align: left;
}

.home-choice-card::before,
.home-player-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--blue));
}

.home-choice-card::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px auto;
  width: 54px;
  height: 2px;
  border-radius: 999px;
  background: rgba(23, 22, 20, 0.16);
}

.home-choice-card .choice-mark {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 22, 20, 0.14);
  border-radius: 50%;
  color: rgba(23, 22, 20, 0.62);
  background: rgba(255, 255, 255, 0.5);
  font-size: 1.5rem;
  font-weight: 950;
  z-index: 0;
}

.home-choice-card > :not(.choice-mark) {
  position: relative;
  z-index: 1;
}

.home-choice-card:hover {
  border-color: rgba(234, 181, 79, 0.72);
  box-shadow: 0 28px 66px rgba(11, 17, 18, 0.32);
}

.home-choice-card:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

.home-choice-card .choice-kicker {
  color: var(--red);
  font-size: clamp(1.45rem, 3.4vw, 2.25rem);
  line-height: 0.92;
  font-weight: 950;
  text-transform: uppercase;
}

.home-choice-card strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.home-choice-card em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 850;
}

.daily-choice-card {
  background:
    linear-gradient(145deg, rgba(234, 181, 79, 0.22), transparent 46%),
    rgba(249, 251, 248, 0.96);
}

.daily-choice-card::before {
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.blind-choice-card {
  background:
    linear-gradient(145deg, rgba(22, 27, 29, 0.18), transparent 46%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.18), transparent 45%),
    rgba(249, 251, 248, 0.96);
}

.blind-choice-card::before {
  background: linear-gradient(90deg, var(--charcoal), var(--blue), var(--gold));
}

.perfect-choice-card {
  grid-column: 1 / -1;
  min-height: 132px;
  background:
    linear-gradient(145deg, rgba(101, 84, 168, 0.2), transparent 42%),
    linear-gradient(225deg, rgba(234, 181, 79, 0.2), transparent 44%),
    rgba(249, 251, 248, 0.96);
}

.perfect-choice-card::before {
  background: linear-gradient(90deg, var(--violet), var(--gold), var(--green));
}

.home-player-card {
  width: min(700px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
}

.home-player-top,
.home-mode-toggle,
.home-player-counts {
  display: flex;
  align-items: center;
}

.home-player-top {
  justify-content: space-between;
  gap: 10px;
}

.home-player-top strong {
  color: var(--charcoal);
  font-size: 0.9rem;
  text-transform: uppercase;
}

body[data-theme="light"] .home-player-top strong {
  color: var(--charcoal);
}

.home-mode-toggle,
.home-player-counts {
  gap: 8px;
}

.home-mode-option,
.home-player-counts button {
  min-height: 48px;
  border: 1px solid rgba(23, 22, 20, 0.1);
  border-radius: 8px;
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.56);
  font-weight: 900;
}

body[data-theme="light"] .home-mode-option,
body[data-theme="light"] .home-player-counts button {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.home-mode-option {
  flex: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  padding: 10px;
  text-align: left;
}

.home-mode-option span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 22, 20, 0.07);
}

.home-mode-option strong,
.home-mode-option em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-mode-option em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

body[data-theme="light"] .home-mode-option em {
  color: var(--muted);
}

.home-player-counts button {
  flex: 1;
  min-height: 38px;
}

.home-mode-option.is-selected,
.home-player-counts button.is-selected {
  border-color: rgba(234, 181, 79, 0.82);
  background:
    linear-gradient(145deg, rgba(234, 181, 79, 0.2), transparent 52%),
    rgba(47, 125, 85, 0.14);
  box-shadow: inset 0 0 0 1px rgba(234, 181, 79, 0.18);
}

.daily-status {
  min-height: 24px;
  margin: -6px 0 0;
  color: #f1c766;
  font-size: 0.9rem;
  font-weight: 900;
  text-align: center;
}

body[data-theme="light"] .daily-status {
  color: var(--blue);
}

.invite-panel,
.waiting-panel {
  justify-items: center;
}

.setup-top,
.draft-header,
.panel-heading,
.stage-top,
.header-actions {
  display: flex;
  align-items: center;
}

.setup-top {
  position: relative;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 18px 0 4px;
}

.setup-top .icon-button {
  position: absolute;
  top: 18px;
  right: 0;
}

.setup-home-button {
  right: 0;
}

.home-settings-button {
  position: absolute;
  top: 21px;
  right: 0;
  z-index: 11;
}

.help-tab {
  position: absolute;
  top: 21px;
  left: 0;
  z-index: 11;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #f7fbf8;
  background: rgba(22, 27, 29, 0.72);
  box-shadow: var(--tight-shadow);
  font-size: 0.82rem;
  font-weight: 900;
}

.setup-panel .help-tab {
  left: 54px;
}

.help-tab:hover,
.help-tab.is-open {
  color: #171614;
  border-color: rgba(234, 181, 79, 0.6);
  background: var(--gold);
}

.home-title {
  display: grid;
  justify-items: center;
  gap: 9px;
  color: #f7fbf8;
}

.brand-mark {
  width: 74px;
  height: 74px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

.home-title h1 {
  font-size: clamp(4.4rem, 13vw, 8.8rem);
  text-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

.home-title p {
  max-width: 620px;
  margin: 0;
  color: #f1c766;
  font-size: clamp(1.05rem, 2.5vw, 1.55rem);
  font-weight: 850;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 6vw, 5.5rem);
  line-height: 0.95;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
  line-height: 1.1;
}

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

.setup-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: rgba(249, 251, 248, 0.95);
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.instructions-panel {
  position: fixed;
  top: 68px;
  left: 50%;
  z-index: 40;
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(249, 251, 248, 0.96);
  box-shadow: 0 24px 70px rgba(11, 17, 18, 0.32);
  overflow: auto;
  transform: translateX(-50%);
}

.instructions-panel div {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(201, 211, 207, 0.7);
  border-radius: 8px;
  background: rgba(251, 253, 251, 0.72);
}

.instructions-panel strong {
  color: var(--charcoal);
  font-size: 0.86rem;
  font-weight: 950;
}

.instructions-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
  font-weight: 760;
  line-height: 1.42;
}

.invite-card,
.waiting-card,
.coin-flip-card,
.quick-draft-card {
  width: min(620px, 100%);
  display: grid;
  gap: 16px;
  padding: 22px;
  background: rgba(249, 251, 248, 0.96);
  border: 1px solid rgba(247, 251, 248, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.waiting-card {
  position: relative;
  padding-top: 58px;
}

.waiting-home-button,
.coin-home-button {
  position: absolute;
  top: 14px;
  right: 14px;
}

.invite-card h1,
.waiting-card h1,
.coin-flip-card h1 {
  font-size: clamp(2.4rem, 7vw, 4.9rem);
}

.quick-draft-panel {
  display: grid;
  justify-items: center;
  margin-bottom: 14px;
}

.complete-actions {
  position: relative;
}

.complete-actions .quick-draft-panel {
  position: fixed;
  inset: 0;
  z-index: 70;
  width: 100%;
  min-height: 100dvh;
  margin: 0;
  padding: clamp(14px, 4vw, 32px);
  align-items: start;
  align-content: start;
  background: rgba(10, 14, 15, 0.58);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.complete-actions .quick-draft-card {
  width: min(720px, 100%);
  margin: 0 auto;
  max-height: none;
  text-align: left;
}

.complete-actions .quick-draft-panel .category-menu,
.complete-actions .quick-draft-panel .choice-menu {
  position: static;
  margin-top: 8px;
  max-height: min(360px, 48vh);
  transform: none;
}

.quick-draft-grid {
  display: grid;
  gap: 14px;
}

.quick-actions,
.complete-actions,
.waiting-actions,
.coin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quick-actions {
  justify-content: flex-end;
}

.complete-actions {
  justify-content: center;
}

.waiting-actions {
  justify-content: center;
}

.coin-actions {
  justify-content: center;
}

.perfect-panel {
  min-height: calc(100vh - 56px);
  display: grid;
  align-content: center;
}

.perfect-shell {
  width: min(980px, 100%);
  display: grid;
  gap: 18px;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 30px);
  position: relative;
  color: #f7fbf8;
  background:
    linear-gradient(135deg, rgba(101, 84, 168, 0.24), transparent 36%),
    linear-gradient(225deg, rgba(234, 181, 79, 0.18), transparent 42%),
    linear-gradient(180deg, #202829, #121718);
  border: 1px solid rgba(247, 251, 248, 0.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.perfect-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--violet), var(--gold), var(--green), var(--blue));
}

.perfect-home-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
}

.perfect-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-top: 18px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.perfect-hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  text-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

.perfect-hero p:last-child {
  max-width: 620px;
  margin: 0;
  color: #f1c766;
  font-weight: 850;
  line-height: 1.35;
}

.perfect-card {
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
  margin: 0 auto;
  padding: 18px;
  position: relative;
  z-index: 1;
  color: var(--charcoal);
  background: rgba(249, 251, 248, 0.96);
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  box-shadow: var(--tight-shadow);
}

.perfect-choice-shell .choice-menu {
  max-height: 290px;
}

.budget-choice-option {
  min-height: 58px;
}

.perfect-budget-trigger:disabled {
  cursor: default;
  opacity: 1;
  color: var(--charcoal);
  border-color: rgba(234, 181, 79, 0.76);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.28), transparent 48%),
    linear-gradient(180deg, #fbfdfb, #edf2ee);
}

.perfect-budget-trigger:disabled .choice-trigger-caret {
  color: var(--green);
  font-size: 0.7rem;
  letter-spacing: 0;
}

.perfect-game-card {
  width: min(900px, 100%);
  overflow: hidden;
}

.perfect-round-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.perfect-round-top h2 {
  color: var(--charcoal);
  font-size: clamp(1.45rem, 4vw, 2.5rem);
}

.perfect-budget-pill {
  min-width: 96px;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(234, 181, 79, 0.5);
  border-radius: 8px;
  background: rgba(234, 181, 79, 0.16);
}

.perfect-budget-pill span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.perfect-budget-pill strong {
  font-size: 1.35rem;
  line-height: 1;
}

.perfect-lineup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(85, 121, 150, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(23, 22, 20, 0.05), transparent 52%),
    rgba(255, 255, 255, 0.72);
}

.perfect-lineup-slot {
  min-height: 78px;
  display: grid;
  gap: 5px;
  align-content: start;
  padding: 10px;
  border: 1px dashed rgba(85, 121, 150, 0.28);
  border-radius: 8px;
  background: rgba(247, 251, 248, 0.74);
  color: var(--muted);
}

.perfect-lineup-slot.is-current {
  border-style: solid;
  border-color: rgba(234, 181, 79, 0.72);
  box-shadow: inset 0 0 0 1px rgba(234, 181, 79, 0.22);
}

.perfect-lineup-slot.is-filled {
  border-style: solid;
  color: var(--charcoal);
  background: #fbfdfb;
}

.perfect-lineup-slot span {
  width: fit-content;
  min-width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #171614;
  background: var(--gold);
  font-size: 0.76rem;
  font-weight: 950;
}

.perfect-lineup-slot strong {
  color: inherit;
  font-size: 0.86rem;
  line-height: 1.1;
}

.perfect-lineup-slot em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.perfect-round-copy,
.perfect-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.perfect-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  perspective: 1200px;
}

.perfect-option {
  min-height: 128px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.08), transparent 55%),
    #fbfdfb;
  text-align: left;
  transform-origin: center bottom;
  animation: perfectCardFlip 420ms cubic-bezier(0.2, 0.84, 0.28, 1) var(--flip-delay, 0ms) both;
}

.perfect-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(234, 181, 79, 0.72);
  box-shadow: 0 16px 28px rgba(11, 17, 18, 0.16);
}

.perfect-option.tier-5 {
  border-color: rgba(234, 181, 79, 0.7);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.42), transparent 52%),
    linear-gradient(180deg, #fff9e8, #fbfdfb);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.82), 0 16px 28px rgba(234, 181, 79, 0.16);
}

.perfect-option.tier-4 {
  border-color: rgba(47, 125, 85, 0.38);
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.18), transparent 52%),
    #fbfdfb;
}

.perfect-option.tier-3 {
  border-color: rgba(62, 120, 168, 0.3);
}

.perfect-option.tier-2 {
  border-color: rgba(159, 77, 69, 0.22);
  background:
    linear-gradient(135deg, rgba(159, 77, 69, 0.08), transparent 52%),
    #fbfdfb;
}

.perfect-option.tier-1 {
  border-color: rgba(23, 22, 20, 0.22);
  background:
    repeating-linear-gradient(-35deg, rgba(23, 22, 20, 0.035) 0 8px, transparent 8px 16px),
    linear-gradient(180deg, #faf6ef, #f4efe7);
}

.perfect-option.is-over-budget {
  border-style: dashed;
  color: rgba(23, 22, 20, 0.62);
  background:
    linear-gradient(145deg, rgba(201, 76, 67, 0.08), transparent 55%),
    #f3f0ed;
}

.perfect-option.is-over-budget span {
  color: #fbfdfb;
  background: var(--red);
}

.perfect-no-pick {
  grid-column: 1 / -1;
  min-height: 110px;
  border-color: rgba(201, 76, 67, 0.28);
  background:
    linear-gradient(135deg, rgba(201, 76, 67, 0.12), transparent 48%),
    #fff7f5;
}

.perfect-option strong {
  font-size: 0.98rem;
  line-height: 1.12;
}

.perfect-option small {
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.perfect-option.tier-5 small {
  color: #8f650f;
}

.perfect-option.tier-1 small {
  color: var(--red);
}

.perfect-option em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 820;
  line-height: 1.25;
}

.perfect-option span {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  color: #171614;
  background: var(--gold);
  font-size: 0.82rem;
  font-weight: 950;
}

.perfect-option.tier-5 span,
.perfect-lineup-slot.tier-5 span {
  color: #171614;
  background: linear-gradient(135deg, #ffe9a8, var(--gold));
}

.perfect-option.tier-1 span,
.perfect-lineup-slot.tier-1 span {
  color: #fbfdfb;
  background: var(--red);
}

.perfect-lineup-slot.tier-4 {
  border-color: rgba(47, 125, 85, 0.35);
  background: rgba(47, 125, 85, 0.08);
}

.perfect-lineup-slot.tier-5 {
  border-color: rgba(234, 181, 79, 0.62);
  background: rgba(234, 181, 79, 0.14);
}

.perfect-lineup-slot.tier-1 {
  border-color: rgba(201, 76, 67, 0.28);
  background: rgba(201, 76, 67, 0.08);
}

@keyframes perfectCardFlip {
  0% {
    opacity: 0;
    transform: rotateX(72deg) translateY(18px) scale(0.96);
  }
  70% {
    opacity: 1;
    transform: rotateX(-5deg) translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: rotateX(0) translateY(0) scale(1);
  }
}

.perfect-summary {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(47, 125, 85, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.12), transparent 48%),
    #f4faf5;
}

.perfect-summary h3 {
  margin: 0;
  color: var(--charcoal);
  font-size: clamp(1.35rem, 4vw, 2rem);
}

.perfect-summary ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.perfect-summary li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 820;
}

.perfect-summary li strong {
  color: var(--charcoal);
}

.perfect-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.invite-card strong {
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.1;
}

.invite-form {
  display: grid;
  gap: 12px;
}

.waiting-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 820;
}

.waiting-seat-pill,
.waiting-status {
  width: fit-content;
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid rgba(85, 121, 150, 0.22);
  border-radius: 999px;
  color: var(--blue);
  background: #eaf3f8;
  font-size: 0.78rem;
  font-weight: 900;
}

.waiting-room-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(234, 181, 79, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.22), transparent 48%),
    #edf3f0;
}

.waiting-room-code {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 6px 8px;
}

.waiting-room-code span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.waiting-room-code strong {
  color: var(--charcoal);
  font-size: clamp(1.3rem, 5vw, 2rem);
  line-height: 1;
}

.waiting-share-button {
  width: 54px;
  min-height: 54px;
  align-self: center;
  color: var(--charcoal);
  border: 1px solid rgba(234, 181, 79, 0.38);
  background:
    linear-gradient(180deg, #fbfdfb, #e6efe9);
  box-shadow: 0 10px 20px rgba(22, 27, 29, 0.1);
}

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

.waiting-player {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8efec;
}

.waiting-player span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.waiting-player strong {
  align-self: end;
  font-size: 1.1rem;
}

.waiting-player.is-seated {
  border-color: rgba(47, 125, 85, 0.42);
  background: #eaf6eb;
  box-shadow: inset 0 0 0 1px rgba(47, 125, 85, 0.12);
}

.waiting-player.is-flip-winner {
  border-color: rgba(234, 181, 79, 0.72);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.26), transparent 54%),
    #eef8ef;
  box-shadow: inset 0 0 0 2px rgba(234, 181, 79, 0.16);
}

.coin-flip-panel {
  display: grid;
  justify-items: center;
}

.coin-flip-card {
  position: relative;
  padding-top: 58px;
}

.coin-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(22, 27, 29, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.2), transparent 44%),
    #edf3f0;
}

.coin-disc {
  width: clamp(86px, 20vw, 128px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 8px solid #e5bb5a;
  border-radius: 50%;
  color: #171614;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.84), transparent 18%),
    linear-gradient(145deg, #f8df8e, #c9862f);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.28),
    0 16px 32px rgba(201, 134, 47, 0.26);
  font-size: clamp(2.2rem, 8vw, 4rem);
  font-weight: 950;
  text-transform: uppercase;
}

.coin-disc.is-complete {
  animation: coin-pop 520ms ease-out;
}

.coin-stage p {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 850;
}

.coin-stage strong {
  display: block;
  color: var(--charcoal);
  font-size: clamp(1.35rem, 4vw, 2.2rem);
  line-height: 1.04;
}

.coin-waiting-note {
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 0 14px;
  border: 1px dashed rgba(85, 121, 150, 0.4);
  border-radius: 8px;
  color: var(--blue);
  background: #eaf3f8;
  font-weight: 900;
}

@keyframes coin-pop {
  0% {
    transform: rotateY(0) scale(0.86);
  }
  60% {
    transform: rotateY(540deg) scale(1.08);
  }
  100% {
    transform: rotateY(720deg) scale(1);
  }
}

.waiting-start-button {
  min-width: min(280px, 100%);
}

.settings-panel {
  position: absolute;
  top: 72px;
  right: 0;
  z-index: 12;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(247, 251, 248, 0.58);
  border-radius: 8px;
  background: rgba(249, 251, 248, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.settings-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.settings-panel-top strong {
  color: var(--charcoal);
  font-size: 0.92rem;
  font-weight: 950;
}

.mini-icon-button {
  width: 34px;
  height: 34px;
  box-shadow: none;
}

.mini-icon-button span {
  font-size: 1.25rem;
}

.theme-toggle {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(62, 120, 168, 0.22);
  border-radius: 8px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #22282b, var(--charcoal));
  font-weight: 950;
  text-align: center;
}

body[data-theme="light"] .theme-toggle {
  color: var(--charcoal);
  background: linear-gradient(180deg, #f8fbf8, #dfe8e3);
}

.sound-toggle[aria-pressed="false"] {
  color: var(--charcoal);
  background: linear-gradient(180deg, #e8efec, #d1dbd5);
}

.custom-category-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.55fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8efec;
}

.draft-category-shell {
  position: relative;
  display: grid;
  gap: 8px;
}

.setup-choice-shell {
  position: relative;
  display: grid;
  gap: 8px;
}

.field-label {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.native-category-select,
.native-choice-select {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

.category-trigger,
.choice-trigger {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 22, 20, 0.12);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.2), transparent 42%),
    linear-gradient(180deg, #fbfdfb, #eaf1ed);
  box-shadow: var(--tight-shadow);
  text-align: left;
}

.choice-trigger {
  min-height: 82px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(62, 120, 168, 0.16), transparent 46%),
    linear-gradient(180deg, #fbfdfb, #eaf1ed);
}

.category-trigger-icon,
.choice-trigger-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(23, 22, 20, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  font-size: 1.45rem;
}

.choice-trigger-icon {
  color: var(--charcoal);
  font-size: 1.24rem;
  font-weight: 950;
}

.category-trigger strong,
.choice-trigger strong {
  display: block;
  color: var(--charcoal);
  font-size: 1.08rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.choice-trigger strong {
  font-size: 0.9rem;
}

.category-trigger em,
.choice-trigger em {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 780;
  line-height: 1.25;
}

.choice-trigger em {
  font-size: 0.76rem;
}

.category-trigger-caret,
.choice-trigger-caret {
  color: var(--red);
  font-size: 1.35rem;
  font-weight: 950;
}

.category-trigger[aria-expanded="true"],
.choice-trigger[aria-expanded="true"] {
  border-color: rgba(234, 181, 79, 0.86);
  box-shadow: 0 0 0 3px rgba(234, 181, 79, 0.18), var(--tight-shadow);
}

.category-trigger.is-selected-setting,
.choice-trigger.is-selected-setting {
  border-color: rgba(234, 181, 79, 0.76);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.28), transparent 48%),
    linear-gradient(180deg, #fbfdfb, #edf2ee);
  box-shadow:
    inset 0 0 0 2px rgba(234, 181, 79, 0.16),
    var(--tight-shadow);
}

.category-trigger.is-selected-setting .category-trigger-icon,
.choice-trigger.is-selected-setting .choice-trigger-icon {
  border-color: rgba(234, 181, 79, 0.55);
  background: rgba(234, 181, 79, 0.18);
  box-shadow: 0 0 0 4px rgba(234, 181, 79, 0.12);
}

.category-menu,
.choice-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 45;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(178px, 1fr));
  gap: 8px;
  max-height: min(430px, calc(100vh - 170px));
  padding: 10px;
  border: 1px solid rgba(247, 251, 248, 0.56);
  border-radius: 8px;
  background: rgba(18, 23, 24, 0.96);
  box-shadow: 0 28px 70px rgba(7, 10, 11, 0.42);
  overflow: auto;
}

body[data-theme="light"] .category-menu,
body[data-theme="light"] .choice-menu {
  border-color: rgba(22, 27, 29, 0.12);
  background: rgba(249, 251, 248, 0.98);
}

.choice-menu {
  grid-template-columns: 1fr;
  min-width: min(280px, 100vw - 40px);
  max-height: 340px;
}

.category-option {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 7px 10px;
  padding: 10px;
  border: 1px solid rgba(247, 251, 248, 0.14);
  border-radius: 8px;
  color: #fbfdfb;
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.18), transparent 52%),
    rgba(255, 255, 255, 0.055);
  box-shadow: none;
  text-align: left;
}

.choice-option {
  min-height: 70px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(247, 251, 248, 0.14);
  border-radius: 8px;
  color: #fbfdfb;
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.18), transparent 52%),
    rgba(255, 255, 255, 0.055);
  box-shadow: none;
  text-align: left;
}

body[data-theme="light"] .category-option {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.08);
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.78);
}

body[data-theme="light"] .choice-option {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.08);
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.12), transparent 52%),
    rgba(255, 255, 255, 0.78);
}

.category-option:hover,
.category-option.is-selected,
.choice-option:hover,
.choice-option.is-selected {
  border-color: rgba(234, 181, 79, 0.82);
  background:
    linear-gradient(145deg, rgba(234, 181, 79, 0.18), transparent 48%),
    rgba(47, 125, 85, 0.24);
}

.category-option-icon,
.choice-option-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(247, 251, 248, 0.12);
  font-size: 1.12rem;
}

.choice-option-icon {
  color: #fbfdfb;
  background: rgba(247, 251, 248, 0.14);
  font-weight: 950;
}

body[data-theme="light"] .choice-option-icon {
  color: var(--charcoal);
  background: rgba(22, 27, 29, 0.06);
}

.category-option-copy,
.choice-option-copy {
  min-width: 0;
}

.category-option-copy strong,
.category-option-copy em,
.choice-option-copy strong,
.choice-option-copy em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-option-copy strong,
.choice-option-copy strong {
  font-size: 0.86rem;
  line-height: 1.08;
  text-transform: uppercase;
}

.choice-option-copy strong {
  font-size: 0.82rem;
}

.category-option-copy em,
.choice-option-copy em,
.category-option-group {
  color: rgba(247, 251, 248, 0.72);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 760;
}

body[data-theme="light"] .category-option-copy em,
body[data-theme="light"] .choice-option-copy em,
body[data-theme="light"] .category-option-group {
  color: var(--muted);
}

.category-option-group {
  grid-column: 1 / -1;
  justify-self: start;
  padding: 3px 7px;
  border: 1px solid rgba(247, 251, 248, 0.14);
  border-radius: 999px;
  text-transform: uppercase;
}

body[data-theme="light"] .category-option-group {
  border-color: rgba(22, 27, 29, 0.08);
}

.category-menu {
  grid-template-columns: 1fr;
  gap: 12px;
}

.category-browser-top {
  position: sticky;
  top: -10px;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  margin: -2px -2px 0;
  padding: 10px;
  border: 1px solid rgba(247, 251, 248, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 44%),
    rgba(18, 23, 24, 0.98);
  box-shadow: 0 12px 24px rgba(7, 10, 11, 0.18);
}

body[data-theme="light"] .category-browser-top {
  border-color: rgba(22, 27, 29, 0.08);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.14), transparent 44%),
    rgba(249, 251, 248, 0.98);
}

.category-browser-top > div {
  display: grid;
  gap: 2px;
}

.category-browser-top strong {
  color: #fbfdfb;
  font-size: 0.95rem;
  font-weight: 950;
  text-transform: uppercase;
}

body[data-theme="light"] .category-browser-top strong {
  color: var(--charcoal);
}

.category-browser-top span {
  color: rgba(247, 251, 248, 0.68);
  font-size: 0.74rem;
  font-weight: 850;
}

body[data-theme="light"] .category-browser-top span {
  color: var(--muted);
}

.category-search {
  display: block;
}

.category-search input {
  min-height: 42px;
  padding: 0 12px;
  border-color: rgba(247, 251, 248, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(238, 243, 241, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.category-browser-groups {
  display: grid;
  gap: 14px;
}

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

.category-browser-group h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #f1c766;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.category-browser-group h3::after {
  content: "";
  flex: 1;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(234, 181, 79, 0.42), transparent);
}

body[data-theme="light"] .category-browser-group h3 {
  color: var(--blue);
}

.category-browser-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 8px;
}

.category-empty {
  margin: 4px 0 0;
  padding: 18px;
  border: 1px dashed rgba(247, 251, 248, 0.18);
  border-radius: 10px;
  color: rgba(247, 251, 248, 0.72);
  background: rgba(247, 251, 248, 0.06);
  font-weight: 850;
  text-align: center;
}

body[data-theme="light"] .category-empty {
  color: var(--muted);
  border-color: rgba(22, 27, 29, 0.12);
  background: rgba(255, 255, 255, 0.62);
}

.custom-category-field textarea {
  min-height: 150px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

input {
  min-height: 48px;
  padding: 0 13px;
}

select {
  min-height: 48px;
  padding: 0 36px 0 13px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 21px / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 21px / 6px 6px no-repeat,
    #fff;
}

textarea {
  resize: vertical;
  min-height: 210px;
  padding: 13px;
  line-height: 1.45;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 125, 85, 0.2);
}

.wide {
  grid-column: 1 / -1;
}

.room-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(120px, 0.45fr);
  gap: 10px;
  align-items: end;
}

.room-code-label {
  min-width: 0;
}

.setup-status {
  min-height: 20px;
  margin: -2px 0 0;
  color: #dfe8e3;
  font-size: 0.86rem;
  font-weight: 800;
}

.setup-grid .setup-status,
.quick-draft-grid .setup-status,
.invite-card .setup-status,
.feedback-card .setup-status {
  color: var(--muted);
}

.feedback-button {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 8;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(247, 251, 248, 0.42);
  border-radius: 999px;
  color: #f7fbf8;
  background: rgba(22, 27, 29, 0.74);
  box-shadow: var(--tight-shadow);
  font-size: 0.82rem;
  font-weight: 900;
}

.feedback-button:hover {
  color: var(--charcoal);
  background: var(--gold);
}

body[data-theme="light"] .feedback-button {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.12);
  background: rgba(249, 251, 248, 0.92);
}

.feedback-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  padding: 22px;
  background: rgba(9, 13, 14, 0.48);
}

.feedback-card {
  width: min(520px, 100%);
  display: grid;
  gap: 13px;
  padding: 18px;
  border: 1px solid rgba(247, 251, 248, 0.5);
  border-radius: 8px;
  background: rgba(249, 251, 248, 0.98);
  box-shadow: var(--shadow);
}

.feedback-card h2 {
  margin: 0;
  color: var(--charcoal);
  font-size: 1.5rem;
}

.feedback-card textarea {
  min-height: 140px;
}

.primary-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button {
  min-height: 50px;
  padding: 0 18px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #22282b, var(--charcoal));
  box-shadow: 0 12px 22px rgba(22, 27, 29, 0.2);
}

.primary-button:hover {
  background: linear-gradient(180deg, #30383b, #111414);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost-button {
  min-height: 38px;
  padding: 0 13px;
  color: var(--charcoal);
  background: #dfe8e3;
}

.ghost-button:hover,
.ghost-button.is-selected {
  color: #fbfdfb;
  background: var(--blue);
}

.draft-panel {
  display: grid;
  align-content: start;
  gap: 16px;
  color: #f7fbf8;
}

.draft-header {
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0 2px;
}

.draft-header h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  text-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.header-actions {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reaction-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.reaction-toggle {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(234, 181, 79, 0.58);
  border-radius: 50%;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.9), transparent 27%),
    linear-gradient(180deg, rgba(255, 247, 222, 0.96), rgba(234, 181, 79, 0.82));
  box-shadow: 0 9px 18px rgba(11, 17, 18, 0.16);
}

.reaction-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(11, 17, 18, 0.2);
}

.reaction-toggle span {
  font-size: 1rem;
  line-height: 1;
}

.reaction-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  z-index: 90;
  width: min(310px, calc(100vw - 32px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(247, 251, 248, 0.5);
  border-radius: 8px;
  background: rgba(249, 251, 248, 0.98);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.reaction-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(23, 22, 20, 0.1);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 50%),
    #fbfdfb;
  text-align: left;
}

.reaction-option:hover {
  border-color: rgba(234, 181, 79, 0.72);
  box-shadow: 0 12px 22px rgba(11, 17, 18, 0.14);
}

.reaction-option span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(23, 22, 20, 0.07);
  font-size: 1.16rem;
}

.reaction-option strong {
  min-width: 0;
  color: var(--charcoal);
  font-size: 0.78rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.seat-pill,
.timer-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(39, 94, 133, 0.2);
  border-radius: 8px;
  color: #f5fbff;
  background: rgba(62, 120, 168, 0.82);
  font-size: 0.86rem;
  font-weight: 900;
}

.timer-pill {
  min-width: 58px;
  justify-content: center;
  color: var(--charcoal);
  border-color: rgba(234, 181, 79, 0.34);
  background: linear-gradient(180deg, #f5d47d, var(--gold));
  box-shadow: 0 10px 20px rgba(234, 181, 79, 0.2);
}

.timer-pill.is-warning {
  color: #fbfdfb;
  border-color: rgba(201, 76, 67, 0.42);
  background: linear-gradient(180deg, #db6158, var(--red));
  box-shadow: 0 10px 20px rgba(201, 76, 67, 0.24);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--charcoal);
  background: #f9fbf8;
  border: 1px solid rgba(247, 251, 248, 0.45);
  box-shadow: var(--tight-shadow);
}

.icon-button span {
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-button {
  background: linear-gradient(180deg, #fbfdfb, #dfe8e3);
}

.home-action {
  flex: 0 0 44px;
}

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

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  align-items: start;
}

.auction-stage,
.snake-stage,
.player-card,
.complete-panel {
  background: rgba(249, 251, 248, 0.96);
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.player-card {
  padding: 14px;
  position: relative;
  overflow: visible;
}

.player-card {
  display: grid;
  gap: 12px;
}

.player-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--blue));
}

.player-card.is-cpu {
  border-color: rgba(85, 121, 150, 0.35);
  background: #f0f7fa;
}

.player-card.is-cpu::before {
  background: linear-gradient(90deg, var(--blue), var(--violet));
}

.player-card.is-leading-bidder {
  border-color: rgba(234, 181, 79, 0.78);
  box-shadow: 0 18px 38px rgba(234, 181, 79, 0.22), var(--tight-shadow);
  transform: translateY(-1px);
}

.player-card.is-leading-bidder::before {
  height: 7px;
  background: linear-gradient(90deg, var(--gold), #f4d88a);
}

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

.player-identity {
  min-width: 0;
  position: relative;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.player-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--charcoal);
}

.player-reaction-bubble {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(234, 181, 79, 0.62);
  border-radius: 21px 21px 21px 7px;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 255, 255, 0.9), transparent 28%),
    linear-gradient(180deg, #fff7de, #f4dc97);
  box-shadow: 0 12px 22px rgba(11, 17, 18, 0.18);
  animation: playerReactionPop 3000ms cubic-bezier(0.2, 0.84, 0.28, 1) both;
}

.player-reaction-bubble::after {
  content: "";
  position: absolute;
  left: 3px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f4dc97;
  box-shadow: 8px 5px 0 -3px rgba(244, 220, 151, 0.9);
}

.player-reaction-bubble span {
  position: relative;
  z-index: 1;
  font-size: 1.35rem;
  line-height: 1;
}

@keyframes playerReactionPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.72);
  }
  12%,
  78% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.92);
  }
}

.money {
  color: var(--green);
  font-weight: 950;
  white-space: nowrap;
}

.cpu-control-note {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(85, 121, 150, 0.4);
  border-radius: 8px;
  color: var(--blue);
  background: #eaf3f8;
  font-size: 0.86rem;
  font-weight: 900;
}

.meter {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6dfdb;
}

.meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  box-shadow: 0 0 14px rgba(234, 181, 79, 0.28);
}

.player-controls {
  display: grid;
  grid-template-columns: minmax(72px, 0.8fr) minmax(112px, 1.25fr) minmax(82px, 0.9fr);
  gap: 8px;
}

.player-controls.uncontested-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.player-controls.blind-controls {
  grid-template-columns: 1fr;
}

.blind-controls .custom-bid-control {
  grid-template-columns: minmax(72px, 0.7fr) minmax(112px, 1fr);
  background:
    linear-gradient(135deg, rgba(22, 27, 29, 0.88), rgba(62, 120, 168, 0.92));
}

.blind-controls .custom-bid-control input {
  min-height: 42px;
  font-size: 1.06rem;
}

.blind-controls .custom-submit {
  grid-column: auto;
  min-height: 42px;
}

.blind-note {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.uncontested-controls .bid-button,
.uncontested-controls .give-up-button,
.uncontested-controls .sabotage-button {
  min-height: 52px;
}

.bid-button,
.give-up-button,
.sabotage-button {
  min-height: 46px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  color: #fbfdfb;
  font-weight: 900;
  line-height: 1.05;
  white-space: normal;
}

.bid-button {
  background: linear-gradient(180deg, #3a9366, var(--green));
  box-shadow: 0 10px 18px rgba(47, 125, 85, 0.24);
}

.give-up-button {
  background: linear-gradient(180deg, #db6158, var(--red));
  box-shadow: 0 10px 18px rgba(201, 76, 67, 0.22);
}

.sabotage-button {
  background: linear-gradient(180deg, #e4b858, var(--gold));
  color: #171614;
  box-shadow: 0 10px 18px rgba(234, 181, 79, 0.2);
}

.bid-button:disabled,
.give-up-button:disabled,
.sabotage-button:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #dfe5e1;
}

.custom-bid-control {
  display: grid;
  grid-template-columns: 28px minmax(44px, 1fr) 28px;
  gap: 4px;
  padding: 5px;
  border-radius: 8px;
  background: linear-gradient(180deg, #4c8dbd, var(--blue));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.custom-bid-control input,
.custom-step,
.custom-submit {
  border: 0;
  border-radius: 6px;
  font-weight: 900;
}

.custom-bid-control input {
  min-height: 32px;
  padding: 0 4px;
  text-align: center;
  color: var(--charcoal);
  background: #fbfdfb;
}

.custom-step,
.custom-submit {
  color: #fbfdfb;
  background: rgba(255, 255, 255, 0.16);
}

.custom-submit {
  grid-column: 1 / -1;
  min-height: 31px;
}

.custom-bid-control.is-disabled {
  background: #dfe5e1;
}

.custom-bid-control.is-disabled input,
.custom-bid-control.is-disabled button {
  cursor: not-allowed;
  color: var(--muted);
  background: #f3f7f4;
}

.roster-list,
.item-queue {
  margin: 0;
  padding: 0;
  list-style: none;
}

.roster-list {
  display: grid;
  gap: 8px;
}

.player-card .roster-list {
  grid-template-columns: repeat(auto-fit, minmax(98px, 1fr));
}

.roster-list li,
.item-queue li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef3f1;
  color: var(--muted);
  font-size: 0.9rem;
}

.roster-list li {
  justify-content: flex-start;
}

.roster-list li span {
  min-width: 0;
}

.roster-list li small {
  flex: 0 0 auto;
  min-width: 31px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #171614;
  background: rgba(234, 181, 79, 0.72);
  font-size: 0.64rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.roster-list .empty-slot {
  color: var(--muted);
}

.roster-list .empty-slot small {
  color: var(--muted);
  background: rgba(85, 121, 150, 0.12);
}

.roster-list strong,
.item-queue strong {
  color: var(--ink);
}

.auction-stage {
  min-height: 360px;
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 20px;
  color: #f7fbf8;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.12), transparent 40%),
    linear-gradient(180deg, #202829, #121718);
  border-color: rgba(247, 251, 248, 0.18);
  position: relative;
  overflow: hidden;
}

.auction-stage::after {
  content: "";
  position: absolute;
  inset: auto 20px 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green), var(--blue));
}

.snake-stage {
  display: grid;
  gap: 16px;
  padding: 18px;
  color: var(--ink);
}

.snake-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.snake-stage h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
}

.snake-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.snake-pick {
  min-height: 96px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 13px;
  border: 1px solid #c9d3cf;
  border-radius: 8px;
  color: var(--charcoal);
  background: linear-gradient(180deg, #fbfdfb, #edf4f1);
  text-align: left;
}

.snake-pick:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(47, 125, 85, 0.5);
  background: linear-gradient(180deg, #f3fff1, #e7f4e6);
  box-shadow: 0 14px 24px rgba(47, 125, 85, 0.16);
}

.snake-pick:disabled {
  cursor: not-allowed;
  color: var(--muted);
  background: #dce3df;
}

.snake-pick.is-picked {
  opacity: 0.75;
}

.snake-pick strong {
  font-size: 1rem;
  line-height: 1.15;
}

.snake-pick span,
.snake-pick small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.stage-top,
.panel-heading {
  justify-content: space-between;
  gap: 12px;
}

.stage-top .eyebrow {
  color: #f2c362;
}

.queue-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #db6158, var(--red));
  font-size: 0.82rem;
  font-weight: 900;
}

.queue-pill.subtle {
  color: var(--charcoal);
  background: #dbe7e1;
}

.current-item {
  min-height: 210px;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.current-item h2 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.25rem);
  text-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

.bid-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 40px;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 8px;
  color: #fbfdfb;
  background: rgba(62, 120, 168, 0.92);
  box-shadow: 0 10px 26px rgba(62, 120, 168, 0.28);
  font-weight: 950;
}

.is-blind-stage .bid-status {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  text-align: center;
}

.is-blind-stage .bid-status small {
  max-width: min(720px, 80vw);
  color: rgba(247, 251, 248, 0.78);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.bid-status.has-bid {
  color: var(--charcoal);
  background: linear-gradient(180deg, #f2c96d, var(--gold));
  box-shadow: 0 14px 32px rgba(234, 181, 79, 0.34);
}

.bid-status.is-bid-pulse {
  animation: bidPulse 520ms ease-out;
}

@keyframes bidPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 0 0 rgba(234, 181, 79, 0.48);
  }
  55% {
    transform: scale(1.04);
    box-shadow: 0 0 0 12px rgba(234, 181, 79, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 14px 32px rgba(234, 181, 79, 0.34);
  }
}

.history-panel {
  overflow: hidden;
}

.panel-heading {
  margin-bottom: 10px;
}

.panel-heading span {
  color: var(--muted);
  font-weight: 800;
}

.item-queue {
  counter-reset: item;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.item-queue li {
  flex: 0 0 min(240px, 72vw);
  align-items: center;
}

.item-queue li::before {
  counter-increment: item;
  content: counter(item);
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  height: 25px;
  border-radius: 999px;
  color: #fbfdfb;
  background: var(--charcoal);
  font-size: 0.78rem;
  font-weight: 900;
}

.item-queue .picked {
  opacity: 1;
}

.item-queue .empty-history {
  flex-basis: 100%;
  justify-content: center;
  color: var(--muted);
  font-weight: 850;
}

.item-queue .empty-history::before {
  display: none;
}

.complete-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 22px;
  color: #f7fbf8;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.14), transparent 34%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.14), transparent 38%),
    linear-gradient(180deg, #202829, #121718);
  border-color: rgba(247, 251, 248, 0.18);
  position: relative;
  overflow: hidden;
}

.complete-panel::after {
  content: "";
  position: absolute;
  inset: auto 22px 18px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green), var(--blue));
}

.complete-hero {
  display: grid;
  justify-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  padding: clamp(16px, 4vw, 28px) 0 8px;
  text-align: center;
}

.complete-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 8vw, 5rem);
  text-shadow: 0 16px 28px rgba(0, 0, 0, 0.34);
}

.celebration {
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  line-height: 1;
}

.complete-panel:not(.is-celebrating) .celebration {
  display: none;
}

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

.confetti-piece {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 9px;
  height: 15px;
  border-radius: 2px;
  background: var(--confetti-color);
  animation: confettiDrop var(--duration) linear var(--delay) forwards;
  transform: rotate(var(--rotation));
}

@keyframes confettiDrop {
  0% {
    transform: translateY(-24px) rotate(var(--rotation));
    opacity: 1;
  }
  100% {
    transform: translateY(110vh) rotate(calc(var(--rotation) + 560deg));
    opacity: 0;
  }
}

.complete-copy {
  margin: 0 0 8px;
  color: #f1c766;
  font-weight: 850;
}

.h2h-record {
  display: grid;
  gap: 8px;
  width: min(620px, 100%);
  padding: 12px;
  border: 1px solid rgba(234, 181, 79, 0.34);
  border-radius: 8px;
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.22), transparent 48%),
    rgba(249, 251, 248, 0.94);
  box-shadow: var(--tight-shadow);
  text-align: left;
}

.h2h-record span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.h2h-record strong {
  color: var(--charcoal);
  font-size: clamp(1.05rem, 3vw, 1.35rem);
  line-height: 1.1;
}

.h2h-record em {
  color: var(--muted);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 850;
}

.winner-line {
  margin: 0;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #3a9366, var(--green));
  font-size: 1.05rem;
  font-weight: 950;
  box-shadow: 0 10px 26px rgba(47, 125, 85, 0.28);
}

.winner-line.is-loss {
  background: linear-gradient(180deg, #db6158, var(--red));
  box-shadow: 0 10px 26px rgba(201, 76, 67, 0.24);
}

.winner-line.is-tie {
  color: var(--charcoal);
  background: linear-gradient(180deg, #f2c96d, var(--gold));
  box-shadow: 0 10px 26px rgba(234, 181, 79, 0.26);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 0;
  max-height: 2400px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 220ms ease,
    transform 220ms ease,
    max-height 260ms ease,
    margin-top 220ms ease;
}

.results-grid.is-personal-result {
  grid-template-columns: minmax(0, min(620px, 100%));
  justify-content: center;
}

.results-grid.is-suppressed {
  max-height: 0;
  margin-top: -4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.result-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(247, 251, 248, 0.48);
  border-radius: 8px;
  background: rgba(249, 251, 248, 0.96);
  box-shadow: var(--tight-shadow);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--gold), var(--blue));
}

.result-card.is-winner {
  border-color: rgba(40, 124, 73, 0.42);
  background: #eff9f0;
  box-shadow: inset 0 0 0 2px rgba(40, 124, 73, 0.18);
}

.result-card.is-loser {
  border-color: rgba(193, 65, 52, 0.38);
  background: #fff0ee;
  box-shadow: inset 0 0 0 2px rgba(193, 65, 52, 0.16);
}

.result-card h3 {
  margin: 0 0 8px;
  font-size: 1.3rem;
  color: var(--charcoal);
}

.result-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 850;
}

.result-card .roster-list li {
  align-items: flex-start;
  justify-content: space-between;
}

.result-card .roster-list .result-empty-pick {
  border: 1px dashed rgba(95, 102, 100, 0.34);
  background: rgba(238, 243, 241, 0.62);
}

.result-empty-pick span,
.result-empty-pick strong {
  color: var(--muted);
}

.result-pick-copy {
  display: grid;
  gap: 3px;
}

.result-pick-copy small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.recap-award-card {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(247, 251, 248, 0.22);
  border-radius: 8px;
  color: #fbfdfb;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.18), transparent 46%),
    rgba(247, 251, 248, 0.08);
}

.recap-award-card span {
  color: #f1c766;
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.recap-award-card strong {
  color: #fbfdfb;
  font-size: 1rem;
  line-height: 1.1;
}

.recap-award-card em {
  color: rgba(247, 251, 248, 0.72);
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 800;
}

/* Premium game polish */
body {
  background:
    linear-gradient(115deg, rgba(234, 181, 79, 0.08) 0 12%, transparent 12% 38%, rgba(62, 120, 168, 0.08) 38% 50%, transparent 50% 100%) 0 0 / 46px 46px,
    linear-gradient(155deg, rgba(47, 125, 85, 0.18), transparent 38%),
    linear-gradient(25deg, rgba(201, 76, 67, 0.14), transparent 34%),
    linear-gradient(180deg, #0e1314 0%, #192021 44%, #283634 100%);
}

body[data-theme="light"] {
  background:
    linear-gradient(115deg, rgba(234, 181, 79, 0.1) 0 12%, transparent 12% 38%, rgba(62, 120, 168, 0.1) 38% 50%, transparent 50% 100%) 0 0 / 46px 46px,
    linear-gradient(155deg, rgba(47, 125, 85, 0.12), transparent 42%),
    linear-gradient(25deg, rgba(201, 76, 67, 0.1), transparent 38%),
    linear-gradient(180deg, #f3f8f6 0%, #e5eeea 100%);
}

.landing-start-card,
.home-player-card,
.home-choice-card,
.setup-grid,
.invite-card,
.waiting-card,
.coin-flip-card,
.quick-draft-card,
.auction-stage,
.snake-stage,
.player-card,
.complete-panel,
.result-card {
  border-radius: 10px;
}

.primary-button {
  border: 1px solid rgba(247, 251, 248, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #2b3335, #111516);
  box-shadow: 0 14px 28px rgba(11, 17, 18, 0.24), inset 0 1px 0 rgba(247, 251, 248, 0.12);
  font-weight: 950;
}

.primary-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 42%),
    linear-gradient(135deg, #333d40, #111516);
}

.ghost-button,
.icon-button,
.help-tab {
  border-radius: 10px;
}

.home-title-large .brand-mark {
  width: 100px;
  height: 100px;
}

.home-title h1,
.draft-header h1,
.complete-hero h1 {
  letter-spacing: 0;
}

.home-title p {
  color: #f3d27a;
}

.landing-start-card,
.home-player-card,
.setup-grid,
.invite-card,
.waiting-card,
.coin-flip-card,
.quick-draft-card {
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.2), transparent 42%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.12), transparent 44%),
    rgba(250, 252, 250, 0.96);
}

.home-choice-grid {
  gap: 16px;
}

.home-choice-card {
  min-height: 156px;
  border-color: rgba(247, 251, 248, 0.58);
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.2), transparent 45%),
    linear-gradient(225deg, rgba(234, 181, 79, 0.18), transparent 45%),
    #fbfdfb;
}

.home-choice-card::after {
  width: 74px;
  height: 5px;
  background: linear-gradient(90deg, rgba(201, 76, 67, 0.65), rgba(234, 181, 79, 0.88), rgba(47, 125, 85, 0.65));
}

.home-choice-card .choice-mark {
  width: 58px;
  height: 58px;
  border-color: rgba(23, 22, 20, 0.1);
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.9), transparent 28%),
    rgba(238, 243, 241, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.home-choice-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 30px 70px rgba(11, 17, 18, 0.36);
}

.home-choice-card .choice-kicker {
  color: var(--charcoal);
  text-shadow: none;
}

.home-choice-card strong,
.home-choice-card em {
  max-width: calc(100% - 76px);
}

.home-mode-option,
.home-player-counts button,
.category-trigger,
.choice-trigger {
  border-radius: 10px;
}

.home-mode-option[aria-pressed="true"],
.home-player-counts button[aria-pressed="true"],
.choice-trigger.is-selected-setting,
.category-trigger.is-selected-setting {
  box-shadow: inset 0 0 0 2px rgba(234, 181, 79, 0.46), 0 14px 28px rgba(234, 181, 79, 0.16);
}

.draft-header {
  padding: 12px 0 6px;
}

.draft-header > div:first-child,
.complete-hero {
  border-radius: 12px;
}

.auction-stage {
  min-height: 340px;
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.14), transparent 38%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.16), transparent 42%),
    repeating-linear-gradient(90deg, rgba(247, 251, 248, 0.035) 0 1px, transparent 1px 42px),
    linear-gradient(180deg, #222b2d, #101516);
}

.auction-stage::after,
.complete-panel::after {
  height: 5px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green), var(--blue), var(--violet));
}

.current-item {
  min-height: 190px;
}

.current-item h2 {
  max-width: min(13ch, 92vw);
}

.queue-pill,
.bid-status,
.timer-pill,
.seat-pill {
  border-radius: 999px;
}

.player-card {
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.11), transparent 42%),
    #fbfdfb;
}

.player-card.is-cpu {
  background:
    linear-gradient(135deg, rgba(62, 120, 168, 0.16), transparent 42%),
    #f2f8fa;
}

.player-card.is-leading-bidder {
  box-shadow: 0 20px 44px rgba(234, 181, 79, 0.28), 0 10px 24px rgba(11, 17, 18, 0.16);
}

.money {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #3a9366, var(--green));
  box-shadow: 0 9px 18px rgba(47, 125, 85, 0.18);
  font-size: 0.84rem;
}

.roster-list li {
  border: 1px solid rgba(201, 211, 207, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent),
    #eef3f1;
}

.player-card .roster-list li {
  min-height: 42px;
}

.snake-stage {
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 42%),
    #fbfdfb;
}

.snake-pick {
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent),
    #f3f8f6;
}

.complete-panel {
  gap: 20px;
  padding: clamp(16px, 3vw, 28px);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 35%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.18), transparent 42%),
    repeating-linear-gradient(90deg, rgba(247, 251, 248, 0.034) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, #222b2d, #101516);
}

.complete-hero {
  width: 100%;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(247, 251, 248, 0.12);
  background:
    linear-gradient(135deg, rgba(247, 251, 248, 0.08), transparent 44%),
    rgba(247, 251, 248, 0.04);
  box-shadow: inset 0 1px 0 rgba(247, 251, 248, 0.08);
}

.winner-line {
  max-width: min(860px, 100%);
  line-height: 1.28;
}

.complete-copy {
  max-width: min(680px, 100%);
  color: rgba(247, 251, 248, 0.82);
  line-height: 1.4;
}

.complete-actions {
  margin-top: 2px;
}

.results-grid {
  gap: 18px;
}

.result-card {
  gap: 12px;
  padding: 18px;
  border-color: rgba(247, 251, 248, 0.58);
  background:
    linear-gradient(135deg, rgba(62, 120, 168, 0.1), transparent 45%),
    #fbfdfb;
  box-shadow: 0 18px 42px rgba(11, 17, 18, 0.2);
}

.result-card::before {
  height: 7px;
  background: linear-gradient(90deg, var(--blue), var(--gold));
}

.result-card.is-winner {
  border-color: rgba(47, 125, 85, 0.58);
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.18), transparent 44%),
    linear-gradient(225deg, rgba(234, 181, 79, 0.18), transparent 44%),
    #f4fff5;
  box-shadow: 0 22px 52px rgba(47, 125, 85, 0.2), inset 0 0 0 2px rgba(47, 125, 85, 0.16);
}

.result-card.is-winner::before {
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.result-card.is-loser {
  border-color: rgba(201, 76, 67, 0.38);
  background:
    linear-gradient(135deg, rgba(201, 76, 67, 0.12), transparent 44%),
    #fff5f3;
}

.result-card.is-loser::before {
  background: linear-gradient(90deg, var(--red), rgba(234, 181, 79, 0.72));
}

.result-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-bottom: 8px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, var(--blue), #2c648f);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result-card.is-winner .result-badge {
  color: var(--charcoal);
  background: linear-gradient(180deg, #f3d47b, var(--gold));
}

.result-card.is-loser .result-badge {
  background: linear-gradient(180deg, #db6158, var(--red));
}

.result-score {
  flex: 0 0 auto;
  min-width: 74px;
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid rgba(23, 22, 20, 0.1);
  border-radius: 14px;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.8), transparent 28%),
    linear-gradient(180deg, #fff7df, #ecd184);
  box-shadow: 0 12px 24px rgba(11, 17, 18, 0.14);
  font-size: clamp(1.45rem, 5vw, 2.15rem);
  line-height: 1;
}

.result-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.result-stat-row span {
  display: grid;
  gap: 2px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(201, 211, 207, 0.78);
  border-radius: 10px;
  background: rgba(238, 243, 241, 0.8);
}

.result-stat-row small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 950;
  text-transform: uppercase;
}

.result-stat-row strong {
  color: var(--charcoal);
  font-size: 1.02rem;
  line-height: 1;
}

.result-card .roster-list {
  gap: 9px;
}

.result-card .roster-list li {
  min-height: 58px;
  padding: 10px 12px;
  border-color: rgba(201, 211, 207, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), transparent),
    #edf4f1;
}

.result-card .roster-list li strong {
  flex: 0 0 auto;
  min-width: 54px;
  display: inline-grid;
  place-items: center;
  padding: 7px 9px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, #2f7d55, #266647);
  font-size: 0.86rem;
}

.result-pick-copy span {
  color: var(--charcoal);
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.15;
}

.result-pick-copy small {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
}

.result-empty-pick .result-pick-copy small {
  color: var(--muted);
}

.recap-awards {
  margin-top: 2px;
}

.recap-award-card {
  min-height: 124px;
  padding: 16px;
  border-color: rgba(247, 251, 248, 0.32);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.2), transparent 44%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.14), transparent 44%),
    rgba(247, 251, 248, 0.08);
  box-shadow: inset 0 1px 0 rgba(247, 251, 248, 0.08);
}

.recap-award-card strong {
  font-size: clamp(1.08rem, 3vw, 1.34rem);
}

body[data-theme="light"] .complete-copy {
  color: var(--muted);
}

body[data-theme="light"] .auction-stage,
body[data-theme="light"] .complete-panel {
  color: var(--charcoal);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.16), transparent 38%),
    linear-gradient(225deg, rgba(62, 120, 168, 0.12), transparent 42%),
    repeating-linear-gradient(90deg, rgba(22, 27, 29, 0.025) 0 1px, transparent 1px 48px),
    linear-gradient(180deg, #fbfdfb, #e9f1ed);
}

body[data-theme="light"] .bid-status {
  color: #fbfdfb;
}

body[data-theme="light"] .bid-status.has-bid {
  color: var(--charcoal);
}

body[data-theme="light"] .complete-hero {
  border-color: rgba(22, 27, 29, 0.08);
  background: rgba(249, 251, 248, 0.72);
}

/* Full-flow display polish */
.app-shell::before {
  content: "";
  position: fixed;
  inset: 16px;
  z-index: -1;
  pointer-events: none;
  border: 1px solid rgba(247, 251, 248, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(234, 181, 79, 0.1), transparent 16%, transparent 84%, rgba(62, 120, 168, 0.1)),
    repeating-linear-gradient(90deg, transparent 0 58px, rgba(247, 251, 248, 0.035) 58px 59px);
  mask-image: linear-gradient(180deg, #000, transparent 92%);
}

.landing-panel::before,
.home-panel::before,
.setup-panel::before,
.invite-panel::before,
.waiting-panel::before,
.coin-flip-panel::before,
.perfect-panel::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(132deg, transparent 0 58%, rgba(234, 181, 79, 0.1) 58% 63%, transparent 63% 100%),
    linear-gradient(38deg, transparent 0 67%, rgba(62, 120, 168, 0.09) 67% 72%, transparent 72% 100%);
}

.landing-panel,
.home-panel,
.setup-panel,
.invite-panel,
.waiting-panel,
.coin-flip-panel,
.perfect-panel {
  animation: screenLift 360ms ease both;
}

@keyframes screenLift {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.home-title {
  text-align: center;
}

.home-title-large {
  width: min(860px, 100%);
  padding: 22px 12px 8px;
}

.home-title-large::before {
  content: "";
  width: min(520px, 86vw);
  height: 10px;
  margin: 0 auto 18px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--green), var(--blue));
  box-shadow: 0 14px 34px rgba(234, 181, 79, 0.2);
}

.brand-mark {
  border-radius: 22px;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.26);
}

.home-title h1 {
  text-shadow:
    0 18px 36px rgba(0, 0, 0, 0.32),
    0 0 36px rgba(234, 181, 79, 0.12);
}

.home-title p {
  max-width: 680px;
  padding: 0 8px;
}

.help-tab,
.home-settings-button,
.setup-home-button,
.perfect-home-button,
.waiting-home-button,
.coin-home-button,
.home-action {
  border: 1px solid rgba(247, 251, 248, 0.26);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent),
    rgba(22, 27, 29, 0.72);
  color: #fbfdfb;
  backdrop-filter: blur(14px);
}

body[data-theme="light"] .help-tab,
body[data-theme="light"] .home-settings-button,
body[data-theme="light"] .setup-home-button,
body[data-theme="light"] .perfect-home-button,
body[data-theme="light"] .waiting-home-button,
body[data-theme="light"] .coin-home-button,
body[data-theme="light"] .home-action {
  color: var(--charcoal);
  border-color: rgba(22, 27, 29, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 245, 242, 0.86));
}

.help-tab:hover,
.help-tab.is-open,
.icon-button:hover {
  border-color: rgba(234, 181, 79, 0.72);
  color: var(--charcoal);
  background:
    linear-gradient(180deg, #ffe8a0, var(--gold));
}

.landing-start-card {
  width: min(470px, 100%);
  gap: 16px;
  padding: 20px;
}

.landing-start-card label,
.setup-grid label,
.feedback-card label,
.invite-form label {
  color: var(--charcoal);
  font-weight: 900;
}

input,
select,
textarea {
  border-color: rgba(95, 102, 100, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(251, 253, 251, 0.96));
}

input::placeholder,
textarea::placeholder {
  color: rgba(95, 102, 100, 0.68);
}

.settings-panel,
.instructions-panel,
.feedback-card {
  border-radius: 12px;
  border-color: rgba(247, 251, 248, 0.62);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.14), transparent 42%),
    rgba(249, 251, 248, 0.98);
}

.instructions-panel {
  gap: 14px;
  padding: 18px;
}

.instructions-panel div {
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(62, 120, 168, 0.08), transparent 52%),
    rgba(255, 255, 255, 0.78);
}

.instructions-panel strong {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, var(--blue), #2c648f);
  font-size: 0.74rem;
}

.setup-top {
  margin-bottom: 4px;
}

.setup-grid {
  gap: 16px;
  padding: clamp(16px, 3vw, 22px);
  border-color: rgba(247, 251, 248, 0.58);
}

.field-label {
  width: fit-content;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--charcoal);
  background: rgba(234, 181, 79, 0.22);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.category-trigger,
.choice-trigger {
  min-height: 76px;
  border-color: rgba(22, 27, 29, 0.08);
  background:
    radial-gradient(circle at 90% 18%, rgba(255, 255, 255, 0.76), transparent 24%),
    linear-gradient(135deg, rgba(234, 181, 79, 0.2), transparent 44%),
    linear-gradient(180deg, #fbfdfb, #e7f0eb);
}

.category-trigger:hover,
.choice-trigger:hover {
  border-color: rgba(234, 181, 79, 0.72);
  box-shadow: 0 18px 36px rgba(11, 17, 18, 0.18);
}

.category-trigger-icon,
.choice-trigger-icon,
.category-option-icon,
.choice-option-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.category-menu,
.choice-menu {
  border-radius: 12px;
  padding: 12px;
}

.category-option,
.choice-option {
  border-radius: 10px;
}

.category-option:hover,
.category-option.is-selected,
.choice-option:hover,
.choice-option.is-selected {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.custom-category-field,
.room-actions {
  border-radius: 12px;
}

.custom-category-field {
  border-color: rgba(62, 120, 168, 0.18);
  background:
    linear-gradient(135deg, rgba(62, 120, 168, 0.1), transparent 42%),
    rgba(238, 243, 241, 0.9);
}

.room-actions {
  padding: 12px;
  border: 1px solid rgba(201, 211, 207, 0.72);
  background: rgba(238, 243, 241, 0.7);
}

.invite-card,
.waiting-card,
.coin-flip-card {
  width: min(680px, 100%);
  gap: 18px;
  padding: clamp(20px, 4vw, 30px);
  border-color: rgba(247, 251, 248, 0.62);
}

.waiting-card,
.coin-flip-card {
  padding-top: clamp(62px, 8vw, 78px);
}

.invite-card h1,
.waiting-card h1,
.coin-flip-card h1 {
  color: var(--charcoal);
  text-shadow: none;
}

.invite-card > .eyebrow,
.waiting-card > .eyebrow,
.coin-flip-card > .eyebrow {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fbfdfb;
  background: linear-gradient(180deg, var(--red), #a63c35);
}

.waiting-room-tools {
  border-radius: 12px;
  border-color: rgba(234, 181, 79, 0.48);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.24), transparent 42%),
    linear-gradient(225deg, rgba(47, 125, 85, 0.1), transparent 46%),
    #f2f6f3;
}

.waiting-room-code strong {
  letter-spacing: 0;
}

.waiting-player {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), transparent),
    #e8efec;
}

.waiting-player.is-seated {
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.16), transparent 48%),
    #eff9f0;
}

.coin-stage {
  border-radius: 14px;
  border-color: rgba(234, 181, 79, 0.28);
}

.coin-disc {
  position: relative;
}

.coin-disc::after {
  content: "";
  position: absolute;
  inset: 13px;
  border: 2px dashed rgba(23, 22, 20, 0.18);
  border-radius: 50%;
}

.perfect-shell {
  border-radius: 14px;
}

.perfect-card,
.perfect-lineup,
.perfect-option,
.perfect-summary {
  border-radius: 12px;
}

.perfect-card {
  border-color: rgba(247, 251, 248, 0.62);
  background:
    linear-gradient(135deg, rgba(234, 181, 79, 0.12), transparent 44%),
    rgba(249, 251, 248, 0.97);
}

.perfect-option {
  min-height: 136px;
  box-shadow: 0 10px 22px rgba(11, 17, 18, 0.08);
}

.perfect-option span,
.perfect-lineup-slot span {
  box-shadow: 0 7px 16px rgba(11, 17, 18, 0.1);
}

.perfect-summary {
  background:
    linear-gradient(135deg, rgba(47, 125, 85, 0.16), transparent 44%),
    #f6fbf6;
}

.feedback-button {
  min-height: 42px;
  padding: 0 18px;
  border-color: rgba(234, 181, 79, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent),
    rgba(22, 27, 29, 0.82);
  backdrop-filter: blur(14px);
}

.feedback-overlay {
  backdrop-filter: blur(8px);
}

.feedback-card {
  border-radius: 14px;
}

.daily-status {
  width: fit-content;
  max-width: min(720px, 100%);
  padding: 8px 12px;
  border: 1px solid rgba(234, 181, 79, 0.22);
  border-radius: 999px;
  background: rgba(22, 27, 29, 0.24);
}

body[data-theme="light"] .daily-status {
  background: rgba(249, 251, 248, 0.72);
}

.is-hidden {
  display: none;
}

@media (max-width: 920px) {
  .home-choice-grid,
  .recap-awards,
  .setup-grid,
  .instructions-panel,
  .settings-panel,
  .custom-category-field,
  .waiting-players,
  .results-grid,
  .perfect-options,
  .perfect-lineup {
    grid-template-columns: 1fr;
  }

  .room-actions {
    grid-template-columns: 1fr;
  }

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

  .auction-stage {
    min-height: 330px;
  }

  .setup-top {
    padding-top: 52px;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding: 10px 0;
  }

  .setup-panel,
  .landing-panel,
  .invite-panel,
  .waiting-panel,
  .draft-panel,
  .complete-panel,
  .perfect-panel {
    min-height: calc(100vh - 20px);
  }

  .draft-header {
    align-items: flex-start;
  }

  .setup-top .icon-button {
    top: 2px;
  }

  .home-settings-button {
    top: 5px;
  }

  .help-tab {
    position: absolute;
    top: 5px;
    left: 0;
  }

  .settings-panel {
    top: 54px;
    width: min(330px, calc(100vw - 20px));
  }

  .setup-panel .help-tab {
    left: 52px;
  }

  .home-title {
    padding-top: 34px;
    width: min(100%, 370px);
  }

  .home-choice-grid {
    width: min(330px, 100%);
  }

  .perfect-shell {
    padding: 18px 12px 12px;
  }

  .perfect-card {
    padding: 14px;
  }

  .perfect-round-top {
    display: grid;
  }

  .coin-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-title h1 {
    font-size: clamp(3.55rem, 15.5vw, 4.65rem);
  }

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

  .player-card .roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-item h2 {
    max-width: 9ch;
    font-size: clamp(2rem, 13vw, 3.5rem);
  }

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

/* Mobile app pass */
@media (max-width: 760px) {
  html {
    scroll-padding-top: 76px;
  }

  body {
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
  }

  button,
  input,
  textarea {
    font-size: 16px;
  }

  button {
    touch-action: manipulation;
  }

  .app-shell {
    width: min(100% - 16px, 760px);
    padding:
      max(10px, env(safe-area-inset-top))
      0
      max(76px, calc(env(safe-area-inset-bottom) + 58px));
  }

  .app-shell::before {
    inset: 8px;
    border-radius: 14px;
    opacity: 0.75;
  }

  .landing-panel,
  .home-panel,
  .setup-panel,
  .invite-panel,
  .waiting-panel,
  .draft-panel,
  .complete-panel,
  .perfect-panel {
    min-height: calc(100dvh - 20px);
    animation: none;
    transform: none;
  }

  .landing-panel,
  .home-panel,
  .setup-panel,
  .invite-panel,
  .waiting-panel {
    gap: 16px;
    align-content: start;
    padding-top: 64px;
    padding-bottom: max(92px, calc(env(safe-area-inset-bottom) + 84px));
  }

  .home-title-large {
    padding: 6px 0 0;
  }

  .home-title-large::before {
    width: min(360px, 86vw);
    height: 7px;
    margin-bottom: 14px;
  }

  .home-title-large::after {
    margin-top: 12px;
  }

  .home-title-large .brand-mark {
    width: 76px;
    height: 76px;
  }

  .home-title h1 {
    font-size: clamp(3.35rem, 17vw, 5.2rem);
    line-height: 0.9;
  }

  .home-title p {
    font-size: 1rem;
  }

  .help-tab,
  .home-settings-button {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    z-index: 80;
  }

  .help-tab {
    left: 8px;
    min-height: 42px;
  }

  .home-settings-button {
    right: 8px;
  }

  .settings-panel {
    position: fixed;
    top: max(58px, calc(env(safe-area-inset-top) + 52px));
    right: 8px;
    left: 8px;
    width: auto;
    z-index: 90;
  }

  .instructions-panel {
    top: max(58px, calc(env(safe-area-inset-top) + 52px));
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 76px - env(safe-area-inset-bottom));
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .landing-start-card,
  .home-player-card,
  .setup-grid,
  .invite-card,
  .waiting-card,
  .coin-flip-card,
  .perfect-card {
    width: 100%;
    padding: 14px;
  }

  .landing-start-card {
    gap: 12px;
  }

  .landing-start-card .primary-button,
  .primary-button,
  #joinRoomButton {
    min-height: 54px;
  }

  .home-choice-grid {
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .home-choice-card,
  .perfect-choice-card {
    min-height: 116px;
    padding: 14px;
  }

  .home-choice-card .choice-mark {
    width: 50px;
    height: 50px;
    top: 12px;
    right: 12px;
  }

  .home-choice-card strong,
  .home-choice-card em {
    max-width: calc(100% - 62px);
  }

  .home-choice-card .choice-kicker {
    font-size: clamp(1.38rem, 8vw, 2rem);
  }

  .home-mode-toggle {
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-player-counts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .setup-top {
    padding-top: 0;
    margin-bottom: 0;
  }

  .setup-top .home-title {
    padding-top: 0;
  }

  .setup-top .brand-mark {
    width: 58px;
    height: 58px;
  }

  .setup-top .icon-button,
  .perfect-home-button,
  .waiting-home-button,
  .coin-home-button {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: 8px;
    z-index: 85;
  }

  .setup-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    backdrop-filter: none;
  }

  .category-trigger,
  .choice-trigger {
    min-height: 66px;
    gap: 10px;
    padding: 10px;
  }

  .category-trigger-icon,
  .choice-trigger-icon {
    width: 42px;
    height: 42px;
  }

  .category-trigger strong,
  .choice-trigger strong,
  .category-trigger em,
  .choice-trigger em {
    white-space: normal;
  }

  .category-menu,
  .choice-menu,
  .complete-actions .quick-draft-panel .category-menu,
  .complete-actions .quick-draft-panel .choice-menu {
    position: fixed;
    top: max(58px, calc(env(safe-area-inset-top) + 52px));
    right: 8px;
    bottom: auto;
    left: 8px;
    z-index: 95;
    height: calc(100dvh - max(58px, calc(env(safe-area-inset-top) + 52px)) - max(12px, env(safe-area-inset-bottom)));
    max-height: none;
    min-width: 0;
    border-radius: 14px;
    overscroll-behavior: contain;
  }

  .choice-menu {
    align-content: start;
  }

  .category-browser-top {
    top: -4px;
    grid-template-columns: 1fr;
  }

  .category-browser-options {
    grid-template-columns: 1fr;
  }

  .category-option,
  .choice-option {
    min-height: 68px;
  }

  .category-option-copy strong,
  .category-option-copy em,
  .choice-option-copy strong,
  .choice-option-copy em {
    white-space: normal;
  }

  .custom-category-field,
  .room-actions {
    grid-template-columns: 1fr;
  }

  .draft-panel {
    gap: 10px;
  }

  .draft-header {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    z-index: 50;
    align-items: center;
    padding: 8px 8px;
    border: 1px solid rgba(247, 251, 248, 0.16);
    border-radius: 14px;
    background: rgba(14, 19, 20, 0.86);
    box-shadow: 0 12px 26px rgba(7, 10, 11, 0.22);
    backdrop-filter: blur(14px);
  }

  body[data-theme="light"] .draft-header {
    background: rgba(249, 251, 248, 0.86);
    border-color: rgba(22, 27, 29, 0.1);
  }

  .draft-header h1 {
    max-width: 58vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.9rem;
  }

  .draft-header .eyebrow {
    margin-bottom: 2px;
    font-size: 0.66rem;
  }

  .header-actions {
    gap: 6px;
  }

  .timer-pill,
  .seat-pill {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .seat-pill {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-action,
  .icon-button {
    width: 42px;
    height: 42px;
  }

  .auction-stage {
    min-height: clamp(230px, 42dvh, 320px);
    padding: 14px;
  }

  .current-item {
    min-height: 150px;
    gap: 12px;
  }

  .current-item h2 {
    max-width: 11ch;
    font-size: clamp(2.05rem, 12vw, 3.45rem);
  }

  .bid-status {
    min-height: 38px;
    padding: 8px 12px;
    line-height: 1.15;
  }

  .players-grid,
  .results-grid,
  .recap-awards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .player-card {
    padding: 12px;
  }

  .player-top {
    align-items: flex-start;
  }

  .player-name {
    font-size: 1rem;
  }

  .money {
    min-height: 28px;
    font-size: 0.78rem;
  }

  .player-card .roster-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .roster-list li {
    min-width: 0;
    padding: 8px;
  }

  .roster-list li span {
    overflow-wrap: anywhere;
  }

  .player-controls {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 25;
    grid-template-columns: 1fr;
    padding: 8px;
    border: 1px solid rgba(201, 211, 207, 0.72);
    border-radius: 12px;
    background: rgba(249, 251, 248, 0.94);
    box-shadow: 0 14px 30px rgba(11, 17, 18, 0.2);
    backdrop-filter: blur(14px);
  }

  .bid-button,
  .give-up-button,
  .sabotage-button,
  .custom-submit {
    min-height: 52px;
  }

  .custom-bid-control {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .custom-bid-control input {
    min-height: 42px;
  }

  .snake-stage {
    padding: 12px;
  }

  .snake-stage-top {
    display: grid;
    gap: 8px;
  }

  .snake-stage h2 {
    font-size: clamp(1.4rem, 8vw, 2.25rem);
  }

  .snake-board {
    grid-template-columns: 1fr;
  }

  .snake-pick {
    min-height: 84px;
  }

  .complete-panel {
    padding: 12px;
  }

  .complete-hero {
    padding: 18px 12px;
  }

  .complete-hero h1 {
    font-size: clamp(2.4rem, 13vw, 4rem);
  }

  .winner-line {
    font-size: 0.92rem;
  }

  .complete-actions {
    position: sticky;
    top: max(6px, env(safe-area-inset-top));
    z-index: 45;
    padding: 8px;
    border-radius: 14px;
    background: rgba(14, 19, 20, 0.72);
    backdrop-filter: none;
  }

  .complete-actions .draft-action {
    min-height: 42px;
  }

  .result-card {
    padding: 14px;
  }

  .result-card-top {
    align-items: center;
  }

  .result-score {
    min-width: 62px;
    min-height: 58px;
    font-size: 1.55rem;
  }

  .result-stat-row {
    gap: 6px;
  }

  .result-stat-row span {
    min-height: 48px;
    padding: 7px;
  }

  .result-card .roster-list li {
    min-height: 54px;
  }

  .perfect-panel {
    align-content: start;
  }

  .perfect-shell {
    min-height: calc(100dvh - 20px);
    padding: 64px 10px 14px;
    border-radius: 14px;
  }

  .perfect-hero {
    padding-top: 0;
  }

  .perfect-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.7rem);
  }

  .perfect-lineup,
  .perfect-options {
    grid-template-columns: 1fr;
  }

  .perfect-option {
    min-height: 118px;
  }

  .perfect-actions {
    position: sticky;
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 8px;
    border-radius: 12px;
    background: rgba(249, 251, 248, 0.92);
    box-shadow: 0 14px 30px rgba(11, 17, 18, 0.18);
  }

  .waiting-card,
  .coin-flip-card {
    padding-top: 64px;
  }

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

  .waiting-room-tools {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .coin-stage {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .feedback-button {
    bottom: max(12px, env(safe-area-inset-bottom));
    z-index: 86;
  }

  .feedback-overlay {
    align-items: end;
    padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  }

  .feedback-card {
    max-height: calc(100dvh - 18px - env(safe-area-inset-top));
    overflow: auto;
  }
}

@media (max-width: 390px) {
  .app-shell {
    width: min(100% - 12px, 390px);
  }

  .home-title-large .brand-mark {
    width: 64px;
    height: 64px;
  }

  .home-title h1 {
    font-size: clamp(3rem, 16vw, 4rem);
  }

  .home-player-counts button {
    min-height: 44px;
    padding: 0 6px;
  }

  .draft-header {
    gap: 8px;
  }

  .draft-header h1 {
    max-width: 50vw;
    font-size: 1.55rem;
  }

  .timer-pill {
    min-width: 46px;
  }

  .seat-pill {
    display: none;
  }

  .player-card .roster-list {
    grid-template-columns: 1fr;
  }

  .result-stat-row {
    grid-template-columns: 1fr;
  }

  .complete-actions {
    justify-content: stretch;
  }

  .complete-actions .draft-action,
  .complete-actions .home-action {
    flex: 1 1 auto;
  }

  .complete-actions .home-action {
    max-width: 52px;
  }
}
