@font-face {
  font-family: "Fredoka";
  src: url("/fonts/fredoka.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #241a3d;
  --grey: #5d5575;
  --pink: #db2777;
  --violet: #6d28d9;
  --error: #c0132c;
  --line: #e4dcf7;
  --hot: linear-gradient(100deg, #6d28d9 0%, #db2777 55%, #d63f08 100%);
  --rainbow: linear-gradient(90deg, #ff4d6d, #ff9f1c, #ffd23f, #3ddc84, #27c4f5, #5b6cff, #b44dff, #ff4d6d);
  --title: Fredoka, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --text: Nunito, "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ticker-height: 34px;
  --gutter: 24px;
  --sheet-height: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff7fb;
  color: var(--ink);
  font: 600 16px/1.5 var(--text);
}

a { color: var(--violet); }
a:hover { color: var(--pink); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.gradient-text, .wordmark, .bid-card h1, dialog h2, .page-main h1 {
  background: var(--hot);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--violet);
  font: 700 13px/1.4 var(--title);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  overflow-wrap: anywhere;
}

@keyframes rainbow-slide {
  to { background-position: 0 0, 150% 0; }
}

.rainbow-card, .bid-card, .floor-card, dialog, .page-main {
  border: 4px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--rainbow) border-box;
  background-size: auto, 300% 100%;
  animation: rainbow-slide 9s linear infinite;
  box-shadow: 0 18px 44px rgba(109, 40, 217, 0.24);
}

/* Buttons and fields */
@keyframes shine {
  0%, 62% { transform: translateX(-160%) skewX(-20deg); }
  100% { transform: translateX(260%) skewX(-20deg); }
}

.pill {
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--hot);
  background-size: 170% 100%;
  color: #fff;
  font: 600 18px/1.25 var(--title);
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(219, 39, 119, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-position 0.3s ease;
}
.pill::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 34%;
  background: rgba(255, 255, 255, 0.34);
  animation: shine 3.6s ease-in-out infinite;
  pointer-events: none;
}
.pill:hover {
  transform: translateY(-2px);
  background-position: 100% 0;
  box-shadow: 0 14px 28px rgba(219, 39, 119, 0.48);
  color: #fff;
}
.pill:active { transform: translateY(1px); }
.pill:disabled { opacity: 0.65; cursor: wait; transform: none; }
.pill.outline {
  border: 3px solid transparent;
  background: linear-gradient(#fff, #fff) padding-box, var(--hot) border-box;
  color: var(--violet);
  box-shadow: none;
}
.pill.outline::after { display: none; }
.pill.outline:hover { color: var(--pink); box-shadow: 0 8px 18px rgba(109, 40, 217, 0.2); }
.pill.small { padding: 8px 16px; font-size: 15px; }

.round {
  flex: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: #efe9ff;
  color: var(--violet);
  font: 700 24px/1 var(--title);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.round:hover { transform: scale(1.1); }
.round.small { width: 42px; height: 42px; font-size: 19px; }
#less { background: linear-gradient(135deg, #f0569b, #d3145f); color: #fff; box-shadow: 0 6px 14px rgba(211, 20, 95, 0.35); }
#more { background: linear-gradient(135deg, #10a974, #047857); color: #fff; box-shadow: 0 6px 14px rgba(4, 120, 87, 0.35); }

input[type="text"], input[type="password"], textarea {
  display: block;
  width: 100%;
  padding: 13px 18px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: 700 16px/1.3 var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[type="text"]:focus, input[type="password"]:focus, textarea:focus {
  border-color: #b44dff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(180, 77, 255, 0.18);
}
input::placeholder, textarea::placeholder { color: #6f6788; opacity: 1; }
textarea { resize: vertical; }

.form-error { margin: 6px 0 0; color: var(--error); font-size: 14px; font-weight: 700; text-align: center; }
.form-error:empty { display: none; }
.grey-line { margin: 0; color: var(--grey); font-size: 14px; overflow-wrap: anywhere; }

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--violet);
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--pink); }

/* Top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px calc(var(--gutter) + var(--safe-right)) 12px calc(var(--gutter) + var(--safe-left));
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 700 23px/1.2 var(--title);
  text-decoration: none;
}
.wordmark::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: none;
  background: url("/favicon.svg") center / contain no-repeat;
}
.topbar nav { display: flex; gap: 8px; }
.topbar nav a {
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--violet);
  font: 600 15px/1.4 var(--title);
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.16);
  transition: transform 0.15s ease;
}
.topbar nav a:hover { transform: translateY(-1px); color: var(--pink); }

/* Live ticker */
@keyframes ticker-move {
  to { transform: translateX(-50%); }
}
.ticker {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--ticker-height) + var(--safe-top));
  padding-top: var(--safe-top);
  overflow: hidden;
  background: var(--hot);
  color: #fff;
  font: 500 15px/34px var(--title);
  white-space: nowrap;
}
.ticker-track {
  display: inline-flex;
  animation: ticker-move 40s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group {
  display: inline-flex;
  justify-content: space-around;
  gap: 44px;
  min-width: 100vw;
  padding-right: 44px;
}

/* Home: tower fills the screen and the cards float on top */
.home { overflow: hidden; height: 100vh; height: 100dvh; }
#tower {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  outline-offset: -4px;
}
.home .topbar {
  position: fixed;
  z-index: 2;
  top: calc(var(--ticker-height) + var(--safe-top));
  left: 0;
  right: 0;
  pointer-events: none;
}
.home .topbar a { pointer-events: auto; }
.home .wordmark {
  padding: 5px 16px 5px 10px;
  border-radius: 999px;
  background: linear-gradient(#fff, #fff);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.16);
  color: var(--violet);
}

.bid-card {
  position: fixed;
  z-index: 3;
  top: calc(50% + 28px);
  left: calc(var(--gutter) + var(--safe-left));
  transform: translateY(-50%);
  width: 372px;
  max-height: calc(100vh - 104px);
  max-height: calc(100dvh - 104px);
  overflow-y: auto;
  padding: 16px 24px 18px;
  border-radius: 30px;
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-5px) rotate(4deg); }
}
.big-emoji {
  display: block;
  width: fit-content;
  margin: 0 auto 2px;
  font-size: 40px;
  line-height: 1.15;
  animation: bob 3s ease-in-out infinite;
}
.bid-card h1 {
  margin: 0 0 10px;
  font: 700 33px/1.1 var(--title);
  text-align: center;
}
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  flex: 1;
  color: var(--pink);
  font: 700 52px/1.1 var(--title);
}
.amount.long { font-size: 40px; }
.amount input[type="text"] {
  width: 3.7ch;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-bottom: 3px dashed #f3b4d3;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
}
.amount input[type="text"]:focus { border-bottom-color: var(--pink); outline: none; box-shadow: none; }
.quick {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.quick button {
  min-height: 32px;
  padding: 4px 13px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font: 600 14px/1.5 var(--title);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.quick button:hover { transform: translateY(-2px) scale(1.04); }
.quick button:nth-child(1) { background: #0d7ea8; }
.quick button:nth-child(2) { background: #6d28d9; }
.quick button:nth-child(3) { background: #c2410c; }
#bid-form { display: grid; gap: 10px; }
.bid-hint { min-height: 22px; margin: 10px 0 0; color: var(--grey); font-size: 14px; text-align: center; }
.perks-open {
  display: block;
  margin: 8px auto 0;
  padding: 5px 14px;
  border: 2px dashed #b44dff;
  border-radius: 999px;
  background: #faf5ff;
  color: var(--violet);
  font: 600 15px/1.35 var(--title);
  cursor: pointer;
}
.perks-open:hover { background: #f1e6ff; }
.stat-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 0;
}
.chip {
  padding: 2px 11px;
  border-radius: 999px;
  font: 600 14px/1.6 var(--title);
}
.chip.violet { background: #efe9ff; color: #5b21b6; }
.chip.pink { background: #ffe4f1; color: #b0145f; }
.chip.green { background: #dcf8ea; color: #04694a; }
.chip.gold { background: #fff0c2; color: #7a4d00; }
.card-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  margin: 8px 0 0;
  font-size: 13px;
}
.card-links a { color: var(--grey); }

.view-controls {
  position: fixed;
  z-index: 2;
  right: calc(var(--gutter) + var(--safe-right));
  bottom: calc(var(--gutter) + var(--safe-bottom));
  display: flex;
  align-items: center;
  gap: 8px;
}
.view-pill {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font: 600 15px/1.4 var(--title);
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(109, 40, 217, 0.3);
}
.view-pill:empty { display: none; }
.view-controls .round { background: #fff; box-shadow: 0 6px 14px rgba(109, 40, 217, 0.22); }
@keyframes bubble-pop {
  from { opacity: 0; transform: translate(-50%, -80%) scale(0.8); }
}
.char-bubble {
  position: fixed;
  z-index: 4;
  width: max-content;
  max-width: min(220px, calc(100vw - 24px));
  margin: 0;
  padding: 9px 14px;
  border: 3px solid #b44dff;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  font: 600 15px/1.3 var(--title);
  text-align: center;
  transform: translate(-50%, calc(-100% - 14px));
  animation: bubble-pop 0.18s ease-out;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.3);
}
@keyframes sound-pulse {
  50% { transform: scale(1.14); box-shadow: 0 0 0 7px rgba(219, 39, 119, 0.25); }
}
#sound-toggle.waiting { animation: sound-pulse 1.8s ease-in-out infinite; }
.sound-hint {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--violet);
  font: 600 14px/1.4 var(--title);
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(109, 40, 217, 0.22);
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
}
.floor-card {
  position: fixed;
  z-index: 4;
  top: calc(var(--ticker-height) + var(--safe-top) + 62px);
  right: calc(var(--gutter) + var(--safe-right));
  width: 348px;
  max-height: calc(100vh - 110px);
  max-height: calc(100dvh - 110px);
  overflow-y: auto;
  border-radius: 30px;
  animation: rainbow-slide 9s linear infinite, pop-in 0.22s ease-out;
}
.floor-head {
  padding: 22px 46px 18px;
  border-radius: 26px 26px 0 0;
  color: #fff;
  text-align: center;
}
.floor-head .eyebrow { margin: 0 0 4px; color: inherit; }
.floor-head h2 {
  margin: 0;
  font: 700 28px/1.12 var(--title);
  overflow-wrap: anywhere;
}
.floor-head.is-top { color: #3a2800; }
.floor-body { display: grid; gap: 10px; padding: 16px 20px 18px; }
.floor-tagline { margin: 0; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.floor-card .grey-line { text-align: center; }
.floor-card .stat-line { margin: 0; }
.floor-page-link { color: var(--violet); font-size: 14px; font-weight: 800; text-align: center; }
.close { position: absolute; top: 10px; right: 10px; background: #fff; }
.report { margin-top: 2px; font-size: 14px; }
.report summary { color: var(--grey); text-align: center; cursor: pointer; }
.report form { display: grid; gap: 8px; margin-top: 10px; }

.no-webgl-note {
  display: none;
  position: fixed;
  z-index: 2;
  top: calc(var(--ticker-height) + 62px);
  right: 24px;
  max-width: 320px;
  margin: 0;
  padding: 14px 18px;
  border: 3px solid #b44dff;
  border-radius: 18px;
  background: #fff;
}
.no-webgl-note.visible, .no-webgl .no-webgl-note { display: block; }
.no-webgl .view-controls { display: none; }
.no-webgl { background: linear-gradient(180deg, #5fb2ff, #c9b6ff 45%, #ffb8cf 75%, #ffdca8); }

/* Claim flow: one question per screen */
dialog {
  width: min(470px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 30px;
  color: var(--ink);
}
dialog::backdrop { background: rgba(60, 20, 110, 0.55); }
dialog h2 {
  margin: 0 0 6px;
  font: 700 30px/1.14 var(--title);
  text-align: center;
}
.flow-emoji { font-size: 54px; }
.flow-hint { margin: 0 0 14px; color: var(--grey); text-align: center; }
.flow-buttons { display: grid; gap: 8px; margin-top: 16px; }
.steps { display: flex; justify-content: center; gap: 7px; margin-bottom: 12px; }
.steps span { width: 34px; height: 8px; border-radius: 4px; background: var(--line); }
.steps span.done { background: var(--hot); }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.flow-note {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fff4cf;
  color: #6b4400;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}
.flow-note .link-button { color: #6d28d9; }
.included {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 12px;
  margin: 12px 0 0;
  padding: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  list-style: none;
}

.perks-dialog { width: min(600px, calc(100vw - 24px)); }
.perks-dialog .big-emoji { margin-top: 4px; }
.perk-list { display: grid; gap: 10px; margin: 14px 0; padding: 0; list-style: none; }
.perk-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 16px; background: #faf6ff; }
.perk-list li:nth-child(6n + 2) { background: #fff5e0; }
.perk-list li:nth-child(6n + 3) { background: #e9f8ff; }
.perk-list li:nth-child(6n + 4) { background: #ffeef6; }
.perk-list li:nth-child(6n + 5) { background: #e8fbf1; }
.perk-list li:nth-child(6n) { background: #fff9d9; }
.perk-list strong { display: block; font: 600 18px/1.3 var(--title); }
.perk-list div { min-width: 0; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.perk-icon { flex: none; font-size: 26px; line-height: 1.2; }
.perk-list code { font-size: 12.5px; }
.toggle {
  --tone: #6d28d9;
  padding: 9px 8px;
  border: 3px solid var(--tone);
  border-radius: 16px;
  background: #fff;
  color: var(--tone);
  font: 600 15px/1.2 var(--title);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.toggle:hover { transform: translateY(-2px); }
.toggle.on { background: var(--tone); color: #fff; }
.category-grid .toggle:nth-child(6n + 1) { --tone: #6d28d9; }
.category-grid .toggle:nth-child(6n + 2) { --tone: #be185d; }
.category-grid .toggle:nth-child(6n + 3) { --tone: #c2410c; }
.category-grid .toggle:nth-child(6n + 4) { --tone: #047857; }
.category-grid .toggle:nth-child(6n + 5) { --tone: #0d6e9e; }
.category-grid .toggle:nth-child(6n) { --tone: #4338ca; }
.preview {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border-radius: 20px;
  color: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}
.preview strong { font: 700 23px/1.2 var(--title); }
.preview small { opacity: 0.94; }
.preview.is-top { color: #3a2800; }
.agree { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; cursor: pointer; }
.agree input { flex: none; width: 19px; height: 19px; margin: 2px 0 0; accent-color: var(--pink); }

/* Text pages */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(140deg, #ffe3f1 0%, #eee4ff 38%, #dff1ff 68%, #fff4d4 100%) fixed;
}
.narrow-inner { max-width: 420px; margin: 0 auto; text-align: center; }

.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 16px; }
.category-pill {
  padding: 3px 12px;
  border-radius: 999px;
  background: #efe9ff;
  color: #5b21b6;
  font: 600 14px/1.6 var(--title);
  text-decoration: none;
}
.category-pill:nth-child(5n + 2) { background: #ffe4f1; color: #a5125a; }
.category-pill:nth-child(5n + 3) { background: #ffedd5; color: #9a3412; }
.category-pill:nth-child(5n + 4) { background: #dcf8ea; color: #04694a; }
.category-pill:nth-child(5n) { background: #dff1ff; color: #0b5c86; }
.category-pill[aria-current="page"] { background: var(--hot); color: #fff; }

.tone-0 { background: linear-gradient(120deg, #e11d74, #7c3aed); }
.tone-1 { background: linear-gradient(120deg, #2563eb, #0e8fb0); }
.tone-2 { background: linear-gradient(120deg, #059669, #4d8f0e); }
.tone-3 { background: linear-gradient(120deg, #ea580c, #db2777); }
.tone-4 { background: linear-gradient(120deg, #7c3aed, #2563eb); }
.tone-5 { background: linear-gradient(120deg, #dc2626, #ea580c); }
.tone-6 { background: linear-gradient(120deg, #0891b2, #7c3aed); }
.tone-7 { background: linear-gradient(120deg, #c026d3, #e11d48); }
.tone-8 { background: linear-gradient(120deg, #16a34a, #0891b2); }
.tone-9 { background: linear-gradient(120deg, #c2660a, #dc2626); }
.tone-gold { background: linear-gradient(120deg, #ffe27a, #f0a81e); }

.company-head {
  margin: -28px -32px 16px;
  padding: 26px 24px 22px;
  border-radius: 26px 26px 0 0;
  color: #fff;
  text-align: center;
  overflow-wrap: anywhere;
}
.company-head.is-top { color: #3a2800; }
.page-main .company-head h1 {
  margin: 8px 0 2px;
  background: none;
  color: inherit;
  font-size: 34px;
}
.company-head p { margin: 0; font-weight: 700; }
.company-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.company-logo img { border-radius: 12px; }
#company-letter { color: #6d28d9; font: 700 52px/1 var(--title); }
.company-chips { margin: 0 0 16px; }
.company-actions { display: grid; gap: 10px; max-width: 420px; margin: 0 auto; }
.badge-box { margin-top: 16px; }
.badge-box .pill { margin-top: 8px; }
.visit-link { font-size: 13px; font-weight: 800; }
.floor-text a.visit-link { font: 800 13px/1.4 var(--text); }
.page-main {
  max-width: 760px;
  margin: 8px auto 12px;
  padding: 28px 32px 32px;
  border-radius: 30px;
}
.page-main h1 {
  margin: 0 0 18px;
  font: 700 38px/1.14 var(--title);
  text-align: center;
}
.page-main h2 { margin: 28px 0 8px; font: 600 23px/1.25 var(--title); }
.page-main h2:nth-of-type(4n + 1) { color: #6d28d9; }
.page-main h2:nth-of-type(4n + 2) { color: #be185d; }
.page-main h2:nth-of-type(4n + 3) { color: #c2410c; }
.page-main h2:nth-of-type(4n) { color: #047857; }
.page-main ul, .page-main ol { padding-left: 22px; }
.page-main li { margin-bottom: 6px; }
.page-main .updated { color: var(--grey); font-size: 14px; text-align: center; }
.center { text-align: center; }
.center-form { max-width: 320px; margin: 20px auto; }
.narrow { max-width: 460px; }
.narrow .pill { margin-top: 10px; }
.thanks-note { margin-top: 16px; }
.page-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 16px;
  padding: 14px 24px 28px;
  font-size: 14px;
}
.page-footer a { color: #4b3f6b; }

.floor-list { padding: 0; list-style: none; }
.page-main .floor-list { padding: 0; }
.page-main .floor-list li { margin: 0 0 8px; }
.floor-row {
  --tone: #6d28d9;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 3px solid var(--tone);
  border-radius: 20px;
  background: #fff;
}
.floor-row:nth-child(6n + 1) { --tone: #6d28d9; }
.floor-row:nth-child(6n + 2) { --tone: #be185d; }
.floor-row:nth-child(6n + 3) { --tone: #c2410c; }
.floor-row:nth-child(6n + 4) { --tone: #047857; }
.floor-row:nth-child(6n + 5) { --tone: #0d6e9e; }
.floor-row:nth-child(6n) { --tone: #4338ca; }
.floor-rank { flex: none; min-width: 46px; color: var(--tone); font: 700 22px/1 var(--title); text-align: center; }
.floor-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.floor-text a { color: var(--tone); font: 600 19px/1.25 var(--title); }
.floor-text small { display: block; color: var(--grey); font-size: 14px; }
.floor-money { flex: none; color: var(--tone); font: 700 20px/1 var(--title); }

/* Confetti on the thank-you page */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Admin */
.admin-table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.page-main.admin-wide { max-width: 1040px; }
.admin-row-hidden { opacity: 0.55; }

/* ---------- Responsive layer ----------
   Layout depends on screen shape, not just width:
   - wide or landscape: side card (default)
   - portrait up to 900px wide: docked bottom sheet (DOCKED_QUERY in app.js must match)
   - landscape and short: compact side card */

/* Touch screens: no sticky hover, and fingers need bigger targets */
@media (hover: none) {
  .pill:hover { transform: none; background-position: 0 0; box-shadow: 0 10px 22px rgba(219, 39, 119, 0.38); }
  .pill.outline:hover { box-shadow: none; color: var(--violet); }
  .round:hover, .toggle:hover, .quick button:hover, .topbar nav a:hover { transform: none; }
}
@media (pointer: coarse) {
  #zoom-in, #zoom-out { display: none; }
  .card-links a, .page-footer a { padding: 5px 3px; }
  .quick button { padding: 7px 15px; }
  .perks-open { padding: 7px 16px; }
  .category-pill { padding: 6px 14px; }
}

/* Small laptops and short windows: drop decoration before anything scrolls */
@media (orientation: landscape) and (max-height: 800px) {
  .bid-card .big-emoji { display: none; }
  .bid-card { padding-top: 14px; }
}
@media (orientation: landscape) and (max-height: 680px) {
  .bid-card .eyebrow, .bid-card .quick { display: none; }
  .bid-card h1 { font-size: 28px; }
  .amount { font-size: 44px; }
  .bid-hint { margin-top: 6px; }
}

/* Narrow landscape windows */
@media (orientation: landscape) and (max-width: 1000px) {
  :root { --gutter: 14px; }
  .bid-card { width: 320px; }
  .floor-card { width: 300px; }
  .view-pill { display: none; }
}

/* Portrait phones and tablets: docked bottom sheet */
@media (max-width: 900px) and (orientation: portrait) {
  .bid-card {
    top: auto;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: min(100%, 640px);
    max-height: 62vh;
    max-height: 62dvh;
    padding: 14px 20px calc(12px + var(--safe-bottom));
    border-width: 4px 4px 0;
    border-radius: 28px 28px 0 0;
  }
  .bid-card .big-emoji { display: none; }
  .view-controls {
    right: calc(12px + var(--safe-right));
    bottom: calc(var(--sheet-height) + 10px);
  }
  .floor-card {
    top: auto;
    left: 50%;
    right: auto;
    bottom: calc(8px + var(--safe-bottom));
    transform: translateX(-50%);
    width: min(calc(100% - 16px), 520px);
    max-height: calc(100vh - 80px);
    max-height: calc(100dvh - 80px);
    animation: rainbow-slide 9s linear infinite;
  }
  .no-webgl-note { left: 16px; right: 16px; max-width: none; }
}

/* Portrait phones */
@media (max-width: 600px) and (orientation: portrait) {
  :root { --ticker-height: 30px; --gutter: 14px; }
  .ticker { font-size: 14px; line-height: 30px; }
  .topbar { padding-top: 8px; padding-bottom: 8px; }
  .wordmark { font-size: 20px; }
  .wordmark::before { width: 24px; height: 24px; }
  .topbar nav { gap: 6px; }
  .topbar nav a { padding: 5px 11px; font-size: 14px; }
  .bid-card { width: 100%; padding: 10px 14px calc(8px + var(--safe-bottom)); border-width: 4px 0 0; }
  .bid-card h1 { margin-bottom: 2px; font-size: 25px; }
  .bid-card .eyebrow, .bid-card .quick { display: none; }
  .round { width: 42px; height: 42px; font-size: 22px; }
  .stepper { margin-bottom: 6px; }
  .amount { font-size: 38px; }
  .amount.long { font-size: 30px; }
  .pill { padding: 11px 18px; font-size: 17px; }
  input[type="text"], input[type="password"], textarea { padding: 10px 14px; }
  #bid-form { gap: 8px; }
  .bid-hint { min-height: 0; margin-top: 5px; font-size: 13px; line-height: 1.3; }
  .perks-open { min-height: 32px; margin-top: 5px; padding: 3px 12px; font-size: 14px; }
  .stat-line { margin-top: 4px; gap: 4px; }
  .chip { padding: 1px 9px; font-size: 13px; }
  .card-links { margin-top: 3px; font-size: 12px; }
  .round.small { width: 38px; height: 38px; font-size: 17px; }
  .view-pill { padding: 7px 13px; font-size: 14px; }
}

/* Short portrait phones: keep the tower visible */
@media (orientation: portrait) and (max-height: 700px) {
  .bid-card .stat-line .chip:nth-child(n + 3) { display: none; }
}
@media (orientation: portrait) and (max-height: 620px) {
  .bid-card .stat-line { display: none; }
  .bid-card h1 { font-size: 22px; }
  .amount { font-size: 32px; }
}
@media (orientation: portrait) and (max-height: 520px) {
  .bid-card .bid-hint { display: none; }
  .view-controls .view-pill { display: none; }
}

/* Very narrow phones and folded phones */
@media (max-width: 340px) {
  .topbar nav a:first-child { display: none; }
  .wordmark { font-size: 17px; gap: 5px; }
  .wordmark::before { width: 20px; height: 20px; }
  .home .wordmark { padding: 4px 10px 4px 6px; }
  .amount.long { font-size: 26px; }
  .view-pill { display: none; }
  .bid-card h1 { font-size: 22px; }
  .perk-list li { gap: 8px; padding: 8px; }
  .perk-icon { font-size: 22px; }
}

/* Landscape phones and very short windows: compact side card */
@media (orientation: landscape) and (max-height: 520px) {
  :root { --ticker-height: 24px; --gutter: 10px; }
  .ticker { font-size: 13px; line-height: 24px; }
  .topbar { padding-top: 5px; padding-bottom: 5px; }
  .wordmark { font-size: 17px; }
  .wordmark::before { width: 20px; height: 20px; }
  .home .wordmark { padding: 2px 10px 2px 6px; }
  .topbar nav a { padding: 2px 10px; font-size: 13px; }
  .bid-card {
    top: calc(var(--ticker-height) + var(--safe-top) + 44px);
    transform: none;
    width: clamp(230px, 40vw, 330px);
    max-height: calc(100vh - var(--ticker-height) - var(--safe-top) - var(--safe-bottom) - 50px);
    max-height: calc(100dvh - var(--ticker-height) - var(--safe-top) - var(--safe-bottom) - 50px);
    padding: 8px 14px;
    border-radius: 20px;
  }
  .bid-card .big-emoji, .bid-card .eyebrow, .bid-card .quick, .bid-card .stat-line { display: none; }
  .bid-card h1 { margin-bottom: 2px; font-size: 19px; }
  .round { width: 34px; height: 34px; font-size: 19px; }
  .stepper { margin-bottom: 4px; }
  .amount { font-size: 28px; }
  .amount.long { font-size: 22px; }
  input[type="text"], input[type="password"] { padding: 7px 12px; border-radius: 14px; }
  #bid-form { gap: 6px; }
  .pill { padding: 8px 14px; font-size: 15px; }
  .bid-hint { min-height: 0; margin-top: 4px; font-size: 12px; line-height: 1.25; }
  .perks-open { min-height: 30px; margin-top: 4px; padding: 2px 10px; font-size: 13px; }
  .card-links { margin-top: 3px; gap: 0 8px; font-size: 11px; }
  .view-controls { bottom: calc(8px + var(--safe-bottom)); gap: 5px; }
  .round.small { width: 34px; height: 34px; font-size: 16px; }
  .view-pill { display: none; }
  .floor-card {
    top: calc(var(--ticker-height) + var(--safe-top) + 6px);
    width: clamp(240px, 44vw, 360px);
    max-height: calc(100vh - var(--ticker-height) - 14px);
    max-height: calc(100dvh - var(--ticker-height) - 14px);
    border-radius: 20px;
  }
  .floor-head { padding: 10px 40px 8px; border-radius: 16px 16px 0 0; }
  .floor-head h2 { font-size: 20px; }
  .floor-body { gap: 6px; padding: 10px 12px; }

  dialog { padding: 12px 16px; border-radius: 20px; }
  dialog h2 { font-size: 20px; }
  .flow-emoji, .steps { display: none; }
  .flow-hint { margin-bottom: 6px; font-size: 14px; }
  .flow-buttons { grid-template-columns: 1fr 1fr; margin-top: 8px; }
  .perks-dialog .big-emoji { display: none; }
  .perk-list { grid-template-columns: 1fr 1fr; gap: 6px; }
  .perk-list li { padding: 6px 8px; }
  .perk-list div { font-size: 12.5px; }
  .perk-list strong { font-size: 15px; }
  .perk-icon { font-size: 20px; }
  .included, .agree { margin-top: 8px; font-size: 12.5px; }
  .preview { padding: 8px 12px; }
  .preview strong { font-size: 18px; }
  .perks-dialog { width: min(760px, calc(100vw - 16px)); }
  .category-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 5px; }
  .toggle { padding: 5px 6px; font-size: 13px; }
}

/* The smallest landscape phones */
@media (orientation: landscape) and (max-height: 360px) {
  .bid-card .bid-hint { display: none; }
  .bid-card { padding: 6px 12px; }
  .bid-card h1 { font-size: 17px; }
  .bid-card .pill { padding: 6px 14px; }
  .card-links { gap: 0 6px; }
}

/* Text pages on small screens */
@media (max-width: 760px) {
  .page-main { margin: 4px 10px 10px; padding: 20px 16px 24px; }
  .page-main h1 { font-size: 30px; }
  .page-main h2 { font-size: 21px; }
  .category-pills {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-right: -16px;
    margin-left: -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .category-pill { flex: none; }
  .company-head { margin: -20px -16px 14px; padding: 20px 14px 18px; }
  .page-main .company-head h1 { font-size: 28px; }
  .floor-row { flex-wrap: wrap; gap: 6px 10px; padding: 10px 12px; }
  .floor-rank { min-width: 34px; font-size: 19px; }
  .floor-text { flex-basis: calc(100% - 110px); }
  .floor-money { margin-left: auto; font-size: 18px; }
  dialog { padding: 18px; }
  dialog h2 { font-size: 25px; }
  .flow-emoji { font-size: 44px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  dialog { padding: 12px 16px; }
  dialog h2 { font-size: 20px; }
}

/* Large monitors and TVs: scale the interface so it doesn't look tiny */
@media (min-width: 1800px) {
  .bid-card, .floor-card, .view-controls, .topbar, .ticker, dialog { zoom: 1.15; }
  .page-main { max-width: 900px; font-size: 18px; }
}
@media (min-width: 2400px) {
  .bid-card, .floor-card, .view-controls, .topbar, .ticker, dialog { zoom: 1.45; }
  .page-main { max-width: 1100px; font-size: 21px; }
}
@media (min-width: 3200px) {
  .bid-card, .floor-card, .view-controls, .topbar, .ticker, dialog { zoom: 2; }
  .page-main { max-width: 1500px; font-size: 28px; }
}

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

@media print {
  .topbar nav, .page-footer { display: none; }
  .page, .page-main { background: #fff; box-shadow: none; border: 0; }
}
