/* The Bloom — unofficial $ANT. Velvet chamber, glass petals, no exchange floor. */

:root {
  --void: #0b0810;
  --void-2: #140c16;
  --terra: #d06040;
  --terra-hot: #e07a5a;
  --terra-deep: #8a3220;
  --cream: #f4e8e0;
  --cream-2: #f7efe8;
  --ink: #1a0c0c;
  --ink-soft: rgba(244, 232, 224, 0.72);
  --glass: rgba(16, 10, 18, 0.58);
  --glass-edge: rgba(244, 232, 224, 0.16);
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;
  --accent: #627eea;
  --accent-deep: #3a4ba8;
  --accent-violet: #8b7cf0;
  --accent-glow: rgba(98, 126, 234, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--void);
  color: var(--cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, a { font-family: inherit; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; }
[hidden] { display: none !important; }

#stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background: var(--void);
}

.bloom-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
}
.veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 64% 36%, rgba(98, 126, 234, 0.18) 0%, transparent 58%),
    radial-gradient(ellipse 42% 38% at 24% 66%, rgba(139, 124, 240, 0.12) 0%, transparent 62%),
    radial-gradient(ellipse 70% 55% at 50% 42%, transparent 30%, rgba(8, 5, 14, 0.58) 100%),
    linear-gradient(180deg, rgba(8, 6, 16, 0.32) 0%, transparent 18%, transparent 72%, rgba(8, 5, 14, 0.55) 100%);
}
.veil::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
  opacity: 0.08;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='124' viewBox='0 0 72 124'><path d='M36 4 L60 36 L36 50 L12 36 Z' fill='none' stroke='%23627EEA' stroke-width='1'/><path d='M36 50 L60 64 L36 120 L12 64 Z' fill='none' stroke='%23627EEA' stroke-width='1'/></svg>");
  background-size: 72px 124px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 44%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 44%, #000 0%, transparent 72%);
  animation: veil-drift 64s linear infinite;
}
@keyframes veil-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -124px, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .veil::after { animation: none; }
}
.watermark {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
  pointer-events: none;
  display: grid;
  place-items: center;
  user-select: none;
}
.watermark span {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.5rem, 14vw, 9rem);
  letter-spacing: 0.18em;
  color: rgba(244, 232, 224, 0.035);
  text-transform: uppercase;
  transform: rotate(-18deg);
  white-space: nowrap;
}

/* ========== LOADER ========== */
.loader {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: end center;
  padding: 0 24px calc(48px + var(--safe-b));
  background: transparent;
  cursor: pointer;
}
.loader-skip {
  position: absolute;
  top: calc(16px + var(--safe-t));
  right: 16px;
  z-index: 2;
  background: transparent;
  border: 0;
  color: rgba(244, 232, 224, 0.55);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 10px;
}
.loader-skip:hover { color: var(--cream); }
.loader-wordmark {
  text-align: center;
  max-width: 36rem;
  opacity: 0;
  transform: translateY(12px);
  filter: blur(10px);
  transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease);
  pointer-events: none;
}
.loader-wordmark.is-on {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
.loader-logo {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  filter: drop-shadow(0 8px 24px rgba(208, 96, 64, 0.35));
}
.loader-kicker {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terra-hot);
}
.loader-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 11vw, 6.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  color: var(--cream);
}
.loader-ticker {
  margin: 10px 0 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.4rem, 4vw, 2rem);
  color: var(--terra-hot);
}
.loader-disclaimer {
  margin: 0 auto;
  max-width: 32rem;
  font-size: 11px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.loader-hint {
  margin: 18px 0 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 232, 224, 0.4);
}

/* Hide chrome while the star blooms */
.is-loading .crown,
.is-loading .dock,
.is-loading .orbit,
.is-loading .first-disclaimer,
.is-loading #petals,
.is-loading .watermark {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.crown, .dock, .orbit, .first-disclaimer, #petals, .watermark {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s var(--ease), visibility 1s;
}

/* ========== CROWN ========== */
.crown {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 8px;
  pointer-events: none;
}
.crown > * { pointer-events: auto; }
.crown-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.crown-logo { width: 32px; height: 32px; flex: 0 0 auto; }
.crown-id { display: flex; flex-direction: column; line-height: 1.1; }
.crown-id strong {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.08em;
}
.crown-id span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.crown-clock {
  margin-left: auto;
  text-align: right;
  min-width: 0;
}
.crown-clock time {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cream);
}
.clock-note {
  display: none;
  font-size: 9px;
  color: rgba(244, 232, 224, 0.45);
  max-width: 16rem;
}
.crown-orbit {
  flex: 0 0 auto;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  color: var(--cream);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 7px 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.crown-orbit[aria-pressed="true"] {
  background: rgba(208, 96, 64, 0.35);
  border-color: rgba(224, 122, 90, 0.5);
}

.first-disclaimer {
  position: absolute;
  top: calc(56px + var(--safe-t));
  left: 14px;
  right: 14px;
  z-index: 8;
  margin: 0;
  font-size: 10px;
  line-height: 1.45;
  color: rgba(244, 232, 224, 0.55);
  max-width: 36rem;
  pointer-events: none;
}

/* ========== DOCK ========== */
.dock {
  position: absolute;
  z-index: 7;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--safe-b));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "buy ca x"
    "chart chart chart";
  gap: 8px 8px;
  align-items: center;
  pointer-events: none;
}
.dock > * { pointer-events: auto; }
.btn-buy { grid-area: buy; }
.btn-ca { grid-area: ca; }
.btn-x { grid-area: x; }
.btn-chart { grid-area: chart; justify-self: end; }

.btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
  border: 0;
  background: transparent;
}
.btn:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

/* Starburst-clipped Buy */
.btn-buy {
  width: 76px;
  height: 76px;
  color: var(--cream);
  filter: drop-shadow(0 8px 18px rgba(138, 50, 32, 0.45));
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
}
.btn-buy .burst-shape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--terra);
  stroke: rgba(244, 232, 224, 0.35);
  stroke-width: 0.8;
}
.btn-buy .btn-kicker,
.btn-buy .btn-label { position: relative; z-index: 1; text-align: center; }
.btn-buy .btn-kicker {
  font-family: var(--mono);
  font-size: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
.btn-buy .btn-label {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.04em;
  line-height: 1;
}
.btn-buy:hover { transform: scale(1.06); filter: drop-shadow(0 10px 22px rgba(208, 96, 64, 0.55)); }
.btn-buy:active { transform: scale(0.96); }

/* Cream “I’m not stock” CA card */
.btn-ca {
  align-items: stretch;
  background: var(--cream-2);
  color: var(--ink);
  border-radius: 16px 18px 14px 20px;
  padding: 7px 10px 8px;
  min-width: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  text-align: left;
}
.btn-ca .btn-kicker {
  font-family: var(--serif);
  font-style: italic;
  font-size: 9px;
  color: var(--terra-deep);
}
.ca-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ca-text {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}
.btn-copy {
  flex: 0 0 auto;
  border: 0;
  background: rgba(26, 12, 12, 0.08);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.btn-copy:hover { background: rgba(208, 96, 64, 0.18); }

/* Wax-orbit seal for X */
.btn-x {
  flex-direction: row;
  gap: 0;
  width: 52px;
  height: 52px;
}
.wax-seal {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #e07a5a, #d06040 45%, #8a3220 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 244, 232, 0.35),
    inset 0 -4px 8px rgba(60, 16, 8, 0.35),
    0 8px 18px rgba(80, 20, 12, 0.35);
  display: grid;
  place-items: center;
}
.wax-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1.5px dashed rgba(244, 232, 224, 0.35);
  animation: waxspin 28s linear infinite;
}
@keyframes waxspin { to { transform: rotate(360deg); } }
.wax-letter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  color: #f7efe8;
  text-shadow: 0 1px 0 rgba(60, 16, 8, 0.4);
}
.btn-x .btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Chart as a slim orbit chip */
.btn-chart {
  flex-direction: row;
  gap: 8px;
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--cream);
}
.btn-chart .btn-kicker {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
}
.btn-chart .btn-label {
  font-family: var(--serif);
  font-size: 12px;
}

/* ========== ORBIT NAV ========== */
.orbit {
  position: absolute;
  z-index: 6;
  left: 0;
  right: 0;
  bottom: calc(128px + var(--safe-b));
  display: flex;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.orbit::-webkit-scrollbar { display: none; }
.orbit-ring { display: none; }
.orb {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: transparent;
  color: rgba(244, 232, 224, 0.55);
  padding: 4px 8px;
  flex: 0 0 auto;
}
.orb-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 232, 224, 0.3);
  box-shadow: 0 0 0 4px rgba(208, 96, 64, 0);
  transition: transform 0.6s var(--ease), background 0.6s var(--ease), box-shadow 0.6s var(--ease);
}
.orb-meta { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.orb-no {
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.14em;
}
.orb-name {
  font-family: var(--serif);
  font-size: 10px;
  font-style: italic;
}
.orb.is-active { color: var(--cream); }
.orb.is-active .orb-dot {
  background: var(--terra-hot);
  transform: scale(1.45);
  box-shadow: 0 0 0 5px rgba(208, 96, 64, 0.22), 0 0 16px rgba(208, 96, 64, 0.5);
}

/* ========== PETALS ========== */
#petals {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.petal {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: calc(172px + var(--safe-b));
  max-height: min(36vh, 300px);
  width: auto;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.94);
  filter: blur(12px);
  transition:
    opacity 1.25s var(--ease),
    transform 1.25s var(--ease),
    filter 1.25s var(--ease),
    visibility 1.25s;
}
.petal.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  filter: blur(0);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(208, 96, 64, 0.4) transparent;
}
.petal-inner {
  background: linear-gradient(165deg, rgba(28, 12, 12, 0.72), rgba(14, 7, 7, 0.62));
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  border: 1px solid var(--glass-edge);
  border-radius: 28px 34px 24px 32px;
  padding: 16px 16px 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.petal-kicker {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--terra-hot);
}
.petal h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.7rem, 6vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}
.reveal .ch {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(8px);
  animation: letterpress 0.9s var(--ease) forwards;
}
.reveal .ch.space { width: 0.3em; }
@keyframes letterpress {
  to { opacity: 1; filter: blur(0); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal .ch { animation: none; opacity: 1; filter: none; transform: none; }
  .petal { transition-duration: 0.2s; filter: none; }
  .wax-ring { animation: none; }
}
.lede {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  word-spacing: 0.04em;
  color: var(--ink-soft);
}
.prose { font-size: 14px; line-height: 1.65; word-spacing: 0.04em; color: rgba(244, 232, 224, 0.78); }
.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }

.still { margin: 0 0 12px; }
.still-frame {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.still-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(244, 232, 224, 0.12);
  border-radius: inherit;
}
.still-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transform: scale(1.04);
  animation: ken 22s var(--ease) alternate infinite;
}
.still-square .still-frame img { aspect-ratio: 1; }
@keyframes ken {
  from { transform: scale(1.04) translate(0, 0); }
  to { transform: scale(1.1) translate(-1.2%, 1%); }
}
@media (prefers-reduced-motion: reduce) {
  .still-frame img { animation: none; }
}
.still figcaption {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 232, 224, 0.45);
}
.still-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

/* ========== DEX CHART (Origin landing) ========== */
.chart-stage {
  margin: 0 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(98, 126, 234, 0.32);
  background:
    linear-gradient(180deg, rgba(18, 16, 32, 0.78), rgba(10, 8, 18, 0.84));
  box-shadow:
    0 0 0 1px rgba(98, 126, 234, 0.08),
    0 0 28px rgba(98, 126, 234, 0.12),
    0 12px 32px rgba(8, 6, 20, 0.35);
  overflow: hidden;
  max-width: 100%;
}
.chart-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px 6px;
  border-bottom: 1px solid rgba(98, 126, 234, 0.18);
}
.chart-kicker,
.chart-chain {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(196, 206, 255, 0.7);
}
.chart-title {
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--cream);
}
.chart-chain { margin-left: auto; }
.chart-frame {
  position: relative;
  height: 148px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0 0 15px 15px;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(98, 126, 234, 0.14), transparent 55%),
    #0b0d16;
}
.chart-tba {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 14px;
  /* faint fake chart grid so it reads as a module, not a broken embed */
  background-image:
    linear-gradient(rgba(98, 126, 234, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 126, 234, 0.07) 1px, transparent 1px);
  background-size: 24px 20px;
  background-position: center;
}
.chart-tba-title {
  margin: 0 0 2px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--cream);
}
.chart-tba-ca {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.chart-tba-note {
  margin: 0;
  max-width: 22rem;
  font-size: 11px;
  line-height: 1.45;
  color: rgba(244, 232, 224, 0.58);
}
.chart-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0b0d16;
}
.petal-origin { max-height: min(48vh, 400px); }

/* Range typography */
.range-caption {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.range-board {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 8px 0 14px;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.04em;
  color: var(--cream);
}
.range-currency { font-size: clamp(1.4rem, 5vw, 2.6rem); opacity: 0.7; }
.range-num { font-size: clamp(3.2rem, 16vw, 7.5rem); line-height: 0.9; }
.range-dash { font-size: clamp(1.8rem, 8vw, 3.4rem); opacity: 0.5; margin: 0 4px; }
.range-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
}
.range-flags span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra-hot);
  border: 1px solid rgba(208, 96, 64, 0.35);
  border-radius: 999px;
  padding: 4px 8px;
}

.btn-play {
  margin-top: 12px;
  border: 1px solid var(--glass-edge);
  background: rgba(208, 96, 64, 0.16);
  color: var(--cream);
  border-radius: 999px;
  padding: 8px 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  display: inline-flex;
  flex-direction: row;
}
.btn-play:hover { background: rgba(208, 96, 64, 0.3); }

.game-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 14px 0;
}
.game-card {
  text-align: left;
  border: 1px solid var(--glass-edge);
  background: rgba(244, 232, 224, 0.05);
  color: var(--cream);
  border-radius: 16px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.game-card:hover { background: rgba(208, 96, 64, 0.16); }
.game-no {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.14em;
  color: var(--terra-hot);
}
.game-card strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 14px;
}
.game-card span:last-child {
  font-size: 11px;
  color: var(--ink-soft);
}

.site-footer { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(244, 232, 224, 0.1); }
.footer-disclaimer { margin: 0 0 8px; font-size: 11px; line-height: 1.5; color: var(--ink-soft); }
.footer-meta { margin: 0; font-size: 11px; color: rgba(244, 232, 224, 0.5); }
.text-link {
  border: 0;
  background: none;
  color: var(--cream);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
  font: inherit;
}

/* ========== TOAST + GAMES ========== */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%) translateY(0);
  z-index: 40;
  background: var(--cream-2);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  animation: toastin 0.45s var(--ease);
}
.toast.is-out { opacity: 0; transition: opacity 0.25s ease; }
@keyframes toastin {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
}

.games {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: rgba(8, 4, 4, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 16px;
}
.games-shell {
  width: min(520px, 100%);
  max-height: min(86dvh, 720px);
  overflow: auto;
  background: linear-gradient(180deg, #241010, #140808);
  border: 1px solid var(--glass-edge);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.games-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}
.games-bar h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
}
.games-close {
  border: 1px solid var(--glass-edge);
  background: transparent;
  color: var(--cream);
  border-radius: 999px;
  padding: 6px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.games-body { padding: 8px 16px 20px; }
.game-ui { display: flex; flex-direction: column; gap: 10px; }
.game-hint { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.game-scoreline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--terra-hot);
}
.game-stage {
  position: relative;
  min-height: 240px;
  border-radius: 16px;
  background: rgba(8, 4, 4, 0.45);
  border: 1px solid rgba(244, 232, 224, 0.08);
  overflow: hidden;
}
.game-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.game-actions .btn-play { margin-top: 0; }

/* Bloom timing */
.bt-board, .oa-board { display: grid; place-items: center; height: 260px; position: relative; }
.bt-svg, .oa-svg { width: min(220px, 70%); height: auto; }
.bt-star { fill: var(--terra); opacity: 0.9; }
.bt-ring { stroke: var(--cream); stroke-width: 1.6; opacity: 0.85; }
.bt-readout, .oa-readout {
  position: absolute;
  bottom: 10px;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--cream);
}

/* Charter sort */
.cs-board { padding: 16px 14px; text-align: center; }
.cs-count { margin: 0 0 8px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--terra-hot); }
.cs-line {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.3;
  min-height: 3.2em;
}
.cs-bins { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.cs-bin {
  border: 1px solid var(--glass-edge);
  background: rgba(244, 232, 224, 0.06);
  color: var(--cream);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.cs-bin:hover { background: rgba(208, 96, 64, 0.25); }
.cs-feedback { min-height: 1.2em; margin: 12px 0 0; font-size: 12px; color: var(--ink-soft); }
.cs-feedback.is-ok { color: #c8e0b8; }
.cs-feedback.is-miss { color: var(--terra-hot); }

/* Wax stamp */
.ws-board { position: relative; height: 260px; overflow: hidden; }
.ws-page {
  position: absolute;
  width: 42%;
  max-width: 160px;
  padding: 14px 10px;
  border: 0;
  background: var(--cream-2);
  color: var(--ink);
  border-radius: 4px 10px 8px 4px;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
  transform: rotate(-4deg);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease), background 0.4s;
}
.ws-page.is-sealed {
  background: #d06040;
  color: var(--cream);
  transform: rotate(0deg) scale(0.96);
}
.ws-page.is-fade { opacity: 0; }

/* Orbit align */
.oa-ghost { fill: none; stroke: rgba(244, 232, 224, 0.35); stroke-width: 1.4; }
.oa-live { fill: var(--terra); opacity: 0.92; cursor: grab; }
.oa-board:active .oa-live { cursor: grabbing; }

/* ========== DESKTOP ========== */
@media (min-width: 900px) {
  .loader { place-items: end start; padding: 0 0 64px 8vw; }
  .loader-wordmark { text-align: left; }
  .loader-logo { margin-left: 0; margin-right: auto; }
  .loader-disclaimer { margin-left: 0; }

  .crown { padding: 18px 28px 12px; }
  .crown-logo { width: 36px; height: 36px; }
  .clock-note { display: block; }
  .first-disclaimer {
    top: 78px;
    left: 28px;
    right: auto;
    width: min(28rem, 32vw);
  }

  .dock {
    left: 28px;
    right: auto;
    bottom: 28px;
    width: min(560px, 52vw);
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    grid-template-areas: "buy ca x chart";
    align-items: center;
  }
  .btn-buy { width: 92px; height: 92px; }
  .btn-buy .btn-label { font-size: 18px; }
  .btn-buy .btn-kicker { font-size: 7px; }
  .btn-ca { padding: 10px 14px 11px; border-radius: 20px 22px 16px 24px; }
  .ca-text { font-size: 11px; }
  .btn-x, .wax-seal { width: 58px; height: 58px; }
  .btn-chart { justify-self: auto; }

  /* Vertical orbit along the left, not a pit rail */
  .orbit {
    left: 18px;
    right: auto;
    top: 50%;
    bottom: auto;
    width: 132px;
    transform: translateY(-50%);
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 0;
    overflow: visible;
  }
  .orbit-ring {
    display: block;
    position: absolute;
    left: 10px;
    top: -8px;
    height: calc(100% + 16px);
    width: 28px;
    color: rgba(244, 232, 224, 0.18);
    pointer-events: none;
  }
  .orb {
    flex-direction: row;
    gap: 10px;
    padding: 4px 0;
  }
  .orb-meta { align-items: flex-start; }
  .orb-name { font-size: 13px; }

  /* Petals dock to different spots — not a shared sheet */

  .petal, .petal.petal-right, .petal.petal-after {
    left: auto;
    right: 32px;
    top: 110px;
    bottom: 140px;
    width: min(420px, 38vw);
    max-height: none;
  }
  .petal.petal-origin {
    width: min(520px, 42vw);
  }
  .chart-frame { height: 236px; }
  .chart-title { font-size: 17px; }
  .petal.petal-left {
    left: 170px;
    right: auto;
    top: 120px;
    bottom: 140px;
    width: min(400px, 36vw);
  }
  .petal.petal-range {
    left: 50%;
    right: auto;
    top: auto;
    bottom: 150px;
    width: min(680px, 62vw);
    transform: translateX(-50%) translateY(18px) scale(0.96);
    max-height: 44vh;
    text-align: center;
  }
  .petal.petal-range.is-active {
    transform: translateX(-50%);
  }
  .petal.petal-range .petal-inner { padding: 22px 36px 28px; }
  .still-row {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1280px) {
  .petal, .petal.petal-right, .petal.petal-after {
    width: min(460px, 34vw);
    right: 48px;
  }
  .petal.petal-origin { width: min(560px, 40vw); }
  .chart-frame { height: 268px; }
  .petal.petal-left { width: min(430px, 34vw); }
  .first-disclaimer { width: min(32rem, 28vw); }
}

/* Short phones: keep star visible, compress petal */
@media (max-width: 899px) {
  .chart-chain { flex-basis: 100%; margin-left: 0; }
  .watermark span { font-size: 1.85rem; letter-spacing: 0.12em; }
  .still-square .still-frame img { aspect-ratio: 16 / 11; object-position: 50% 70%; }
  .still-row { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .still-row .still { margin-bottom: 8px; }
  .still-row .still figcaption { font-size: 7px; }
}
@media (max-height: 720px) and (max-width: 899px) {
  .petal { max-height: min(30vh, 220px); bottom: calc(160px + var(--safe-b)); }
  .petal-origin { max-height: min(42vh, 290px); }
  .chart-frame { height: 128px; }
  .first-disclaimer { font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
