:root {
  color-scheme: light;
  --ink: #0a0b0b;
  --paper: #f5f4ed;
  --signal: #dfff00;
  --signal-soft: #ecff6c;
  --line: rgba(10, 11, 11, 0.22);
  --deck-height: 78px;
  --radius: 0;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --font-display: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", "Roboto Mono", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 11px 15px;
  color: #fff;
  background: var(--ink);
  border: 1px solid #fff;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-160%);
  transition: transform .2s;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-page {
  height: 100vh;
  height: 100dvh;
  min-width: 320px;
  overflow: hidden;
  color: var(--ink);
  background: var(--ink);
}

.app-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) var(--deck-height);
  width: 100%;
  height: 100%;
}

/* The owner receives every pixel above the control deck. */
.owner-stage {
  --stage-bg: var(--signal);
  --stage-fg: var(--ink);
  --stage-muted: rgba(10, 11, 11, .68);
  --stage-line: rgba(10, 11, 11, .19);
  --stage-button-bg: var(--ink);
  --stage-button-fg: #fff;
  --stage-accent: #244be8;
  position: relative;
  isolation: isolate;
  min-height: 0;
  overflow: hidden;
  color: var(--stage-fg);
  background: var(--stage-bg);
  transition: color .55s var(--ease-out), background-color .55s var(--ease-out);
}

.owner-stage::before,
.owner-stage::after {
  content: "";
  position: absolute;
  z-index: -2;
  pointer-events: none;
  transition: transform .9s var(--ease-out), opacity .5s;
}

.owner-stage::before {
  width: min(45vw, 650px);
  aspect-ratio: 1;
  right: -11vw;
  bottom: -30%;
  border: clamp(50px, 7vw, 110px) solid var(--stage-fg);
  border-radius: 50%;
  opacity: .09;
}

.owner-stage::after {
  width: 30vw;
  height: 130%;
  top: -15%;
  right: 22%;
  background: var(--stage-fg);
  opacity: .035;
  transform: skewX(-15deg);
}

.stage-grid {
  position: absolute;
  z-index: -3;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--stage-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--stage-line) 1px, transparent 1px);
  background-size: clamp(54px, 7vw, 112px) clamp(54px, 7vw, 112px);
  mask-image: linear-gradient(to right, rgba(0,0,0,.65), transparent 82%);
  opacity: .6;
}

.stage-orbit {
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 8%;
  width: clamp(180px, 27vw, 480px);
  aspect-ratio: 1;
  border: 1px solid var(--stage-line);
  border-radius: 50%;
  transform: translateY(-50%);
  opacity: .8;
}

.stage-orbit::before,
.stage-orbit::after {
  content: "";
  position: absolute;
  border-radius: inherit;
}

.stage-orbit::before {
  inset: 22%;
  border: 1px solid var(--stage-line);
}

.stage-orbit::after {
  width: 12px;
  height: 12px;
  top: 14%;
  right: 15%;
  background: var(--stage-accent);
  box-shadow: 0 0 0 8px var(--stage-bg);
  animation: orbital-pulse 2.2s ease-in-out infinite;
}

@keyframes orbital-pulse {
  50% { transform: scale(.45); opacity: .45; }
}

.brand-dna {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  color: var(--stage-fg);
  pointer-events: none;
  user-select: none;
}

.brand-monogram {
  position: absolute;
  right: clamp(18px, 7vw, 110px);
  top: 50%;
  font-family: var(--font-display);
  font-size: clamp(15rem, 41vw, 44rem);
  font-weight: 950;
  line-height: .6;
  letter-spacing: -.12em;
  opacity: .065;
  transform: translateY(-39%) rotate(-4deg);
}

.brand-domain-ghost {
  position: absolute;
  right: clamp(18px, 3vw, 44px);
  bottom: clamp(80px, 12vh, 150px);
  max-width: 70vw;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(.65rem, 1.2vw, 1rem);
  font-weight: 900;
  letter-spacing: .16em;
  opacity: .28;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.brand-spectrum {
  position: absolute;
  right: clamp(42px, 11vw, 175px);
  bottom: clamp(68px, 10vh, 125px);
  display: flex;
  align-items: end;
  gap: 5px;
  height: clamp(52px, 9vh, 90px);
  opacity: .8;
}

.brand-spectrum i {
  width: clamp(7px, .65vw, 11px);
  height: 28%;
  background: var(--stage-accent);
  border: 1px solid var(--stage-fg);
  animation: spectrum-live 2.8s ease-in-out infinite alternate;
}

.brand-spectrum i:nth-child(2) { height: 57%; animation-delay: -.6s; }
.brand-spectrum i:nth-child(3) { height: 100%; animation-delay: -1.2s; }
.brand-spectrum i:nth-child(4) { height: 72%; animation-delay: -1.8s; }
.brand-spectrum i:nth-child(5) { height: 41%; animation-delay: -2.4s; }

@keyframes spectrum-live {
  45% { transform: scaleY(.65); transform-origin: bottom; }
  75% { transform: scaleY(1.12); transform-origin: bottom; }
}

.owner-stage[data-skin-pattern="stripes"] .stage-grid {
  background-image: repeating-linear-gradient(118deg, transparent 0 34px, var(--stage-line) 35px 36px);
  background-size: auto;
  mask-image: linear-gradient(to right, #000, transparent 90%);
}

.owner-stage[data-skin-pattern="rings"] .stage-orbit {
  border-width: clamp(18px, 3vw, 46px);
  border-color: color-mix(in srgb, var(--stage-accent) 55%, transparent);
  opacity: .54;
}

.owner-stage[data-skin-pattern="blocks"]::after {
  width: 42vw;
  height: 54%;
  top: 25%;
  right: 5%;
  background: var(--stage-accent);
  opacity: .11;
  transform: rotate(-7deg);
}

.stage-index {
  position: absolute;
  z-index: -1;
  right: 2.5vw;
  bottom: -0.1em;
  color: var(--stage-fg);
  font-family: var(--font-display);
  font-size: clamp(9rem, 25vw, 28rem);
  font-weight: 950;
  line-height: .72;
  letter-spacing: -.11em;
  opacity: .045;
  user-select: none;
}

.artifact-nav {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 46px;
  padding: max(14px, env(safe-area-inset-top)) clamp(16px, 2.6vw, 40px) 8px;
  color: var(--stage-fg);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.live-signal,
.artifact-links {
  display: flex;
  align-items: center;
  gap: 9px;
}

.live-dot {
  position: relative;
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
  opacity: .45;
}

.live-signal.is-live .live-dot {
  opacity: 1;
  animation: live-heartbeat 1.55s ease-in-out infinite;
}

.live-dot::after {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid currentColor;
  border-radius: inherit;
  opacity: 0;
}

.live-signal.just-beat .live-dot::after {
  animation: live-confirmed .8s ease-out both;
}

.live-signal.just-beat {
  text-shadow: 0 0 14px color-mix(in srgb, currentColor 65%, transparent);
}

@keyframes live-heartbeat {
  0%, 34%, 100% { transform: scale(1); box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent); }
  9% { transform: scale(1.65); box-shadow: 0 0 0 8px transparent; }
  17% { transform: scale(.9); }
  25% { transform: scale(1.38); box-shadow: 0 0 0 6px transparent; }
}

@keyframes live-confirmed {
  from { opacity: .9; transform: scale(1); }
  to { opacity: 0; transform: scale(4.2); }
}

.artifact-links {
  gap: clamp(12px, 2vw, 28px);
}

.artifact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 32px;
  padding: 0 2px;
  text-decoration: none;
  text-transform: uppercase;
  opacity: .72;
}

.artifact-links a:hover,
.artifact-links a:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* A real, ephemeral crowd layer. Counts come only from live main-page sockets. */
.crowd-raid {
  position: absolute;
  z-index: 7;
  top: 58px;
  right: clamp(16px, 2.6vw, 40px);
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto;
  align-items: stretch;
  min-height: 48px;
  color: var(--stage-fg);
  background: var(--stage-bg);
  background: color-mix(in srgb, var(--stage-bg) 78%, transparent);
  border: 1px solid var(--stage-line);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, .12);
  box-shadow: 5px 5px 0 color-mix(in srgb, var(--stage-fg) 10%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-family: var(--font-mono);
  text-transform: uppercase;
  transition: color .2s, background .2s, box-shadow .2s, transform .2s var(--ease-out);
}

.crowd-readout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 190px;
  padding: 8px 13px;
}

.crowd-presence {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
}

.crowd-presence i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: currentColor;
  border-radius: 50%;
  animation: crowd-pulse 1.8s ease-in-out infinite;
}

.crowd-pressure {
  margin-top: 4px;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.25;
  opacity: .65;
}

.crowd-rule {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  padding: 3px 5px;
  color: var(--stage-fg);
  background: var(--stage-bg);
  background: color-mix(in srgb, var(--stage-bg) 86%, transparent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}

.raid-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 144px;
  min-height: 44px;
  padding: 0 14px;
  color: var(--stage-button-fg);
  background: var(--stage-button-bg);
  border: 0;
  border-left: 1px solid var(--stage-line);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .04em;
  cursor: pointer;
}

.crowd-war-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.crowd-engagement {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 9px 8px 13px;
  border-top: 1px solid var(--stage-line);
}

.crowd-engagement[hidden] {
  display: none;
}

.crowd-engagement-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  line-height: 1.25;
}

.crowd-engagement-copy strong {
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .07em;
}

.crowd-engagement-copy span {
  font-size: 7px;
  font-weight: 750;
  letter-spacing: .025em;
  opacity: .72;
}

.crowd-engagement-action,
.crowd-engagement-dismiss {
  min-height: 36px;
  color: var(--stage-button-fg);
  background: var(--stage-button-bg);
  border: 1px solid var(--stage-line);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .035em;
  cursor: pointer;
}

.crowd-engagement-action {
  max-width: 140px;
  padding: 6px 9px;
}

.crowd-engagement-dismiss {
  width: 36px;
  flex: 0 0 36px;
  padding: 0;
  color: var(--stage-fg);
  background: transparent;
  font-size: 16px;
}

.crowd-engagement-action:hover:not(:disabled),
.crowd-engagement-action:focus-visible:not(:disabled),
.crowd-engagement-dismiss:hover,
.crowd-engagement-dismiss:focus-visible {
  filter: invert(1);
}

.crowd-engagement-action:focus-visible,
.crowd-engagement-dismiss:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -4px;
}

.crowd-engagement-action:disabled {
  cursor: wait;
  opacity: .5;
}

.crowd-invite[data-status="stale"] {
  background: color-mix(in srgb, var(--stage-fg) 7%, transparent);
}

.crowd-raid[data-engagement="true"] + .crowd-coup {
  top: 198px;
}

.crowd-war-actions .raid-button {
  min-width: 108px;
  justify-content: center;
  padding-inline: 10px;
  white-space: nowrap;
}

.crowd-war-actions .defend-button {
  color: var(--stage-fg);
  background: transparent;
}

.crowd-raid[data-side="raid"] .raid-button:first-child,
.crowd-raid[data-side="defend"] .defend-button {
  color: var(--stage-button-fg);
  background: var(--stage-button-bg);
}

.raid-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  transition: transform .2s var(--ease-out);
}

.raid-button:hover:not(:disabled) svg,
.raid-button:focus-visible:not(:disabled) svg {
  transform: translateX(4px);
}

.raid-button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: -5px;
}

.raid-button:disabled {
  cursor: wait;
  opacity: .5;
}

.crowd-raid[data-joined="true"] .raid-button {
  color: var(--stage-fg);
  background: transparent;
}

.crowd-raid[data-joined="true"] .raid-button:disabled {
  cursor: default;
}

.crowd-raid[data-side="raid"] .raid-button:first-child,
.crowd-raid[data-side="defend"] .defend-button {
  color: var(--stage-button-fg);
  background: var(--stage-button-bg);
  opacity: 1;
}

/* One authorized sponsor, a verified crowd, and no automatic capture. */
.crowd-coup {
  position: absolute;
  z-index: 8;
  top: 128px;
  right: clamp(16px, 2.6vw, 40px);
  display: grid;
  width: min(340px, calc(100% - 32px));
  padding: 13px;
  color: #f7f4eb;
  background: #0a0b0b;
  border: 1px solid currentColor;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .22);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--stage-fg) 24%, transparent);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.crowd-coup[hidden] {
  display: none;
}

.coup-header,
.coup-contender,
.coup-power,
.coup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coup-header {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.coup-header strong {
  color: var(--signal);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.coup-manifesto {
  margin: 9px 0 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 950;
  line-height: .95;
  letter-spacing: -.04em;
}

.coup-manifesto strong {
  color: var(--signal);
}

.coup-contender {
  align-items: end;
  padding: 8px 0;
  border-top: 1px solid #454643;
}

.coup-contender > span {
  display: grid;
  min-width: 0;
}

.coup-contender > span:last-child {
  flex: 0 0 auto;
  text-align: right;
}

.coup-contender small {
  margin-bottom: 3px;
  color: #999b95;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
}

.coup-contender strong {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: .95;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.coup-meter {
  height: 9px;
  margin: 1px 0 7px;
  overflow: hidden;
  background: #3e403d;
  border: 1px solid #777872;
}

.coup-meter i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease-out);
}

.coup-power {
  font-size: 8px;
  font-weight: 850;
}

.coup-power span {
  color: #aaaca5;
  font-size: 7px;
}

.coup-status {
  min-height: 23px;
  margin: 8px 0 7px;
  color: var(--signal);
  font-size: 8px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .035em;
}

.coup-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.coup-actions button {
  min-height: 44px;
  flex: 1 1 50%;
  padding: 7px 9px;
  color: #0a0b0b;
  background: var(--signal);
  border: 1px solid var(--signal);
  font-family: inherit;
  font-size: 8px;
  font-weight: 950;
  line-height: 1.2;
  cursor: pointer;
}

.coup-actions button + button {
  color: #f7f4eb;
  background: transparent;
  border-color: #777872;
}

.coup-actions button:hover:not(:disabled),
.coup-actions button:focus-visible:not(:disabled) {
  color: #fff;
  background: #244be8;
  border-color: #fff;
}

.coup-actions button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.coup-actions button:disabled {
  cursor: wait;
  opacity: .55;
}

.coup-actions .coup-fire {
  flex-basis: 100%;
  color: #0a0b0b;
  background: var(--signal);
  border-color: var(--signal);
}

.coup-actions .coup-cancel {
  color: #ff8b7d;
  border-color: #7d504a;
}

.coup-challenge:empty {
  display: none;
}

.coup-challenge {
  margin-top: 7px;
  overflow-x: auto;
  overflow-y: hidden;
}

.coup-rule {
  margin: 7px 0 0;
  color: #aaaca5;
  font-size: 7px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.crowd-coup[data-status="ready"] {
  border-color: var(--signal);
  box-shadow: 8px 8px 0 var(--signal);
}

.owner-stage[data-coup-active="true"] .owner-content {
  width: min(62vw, 900px);
}

.owner-stage[data-raid-level="awake"],
.owner-stage[data-raid-level="siege"] {
  box-shadow: inset 0 0 0 5px var(--stage-fg);
}

.owner-stage[data-raid-level="riot"] {
  box-shadow: inset 0 0 0 9px var(--stage-fg);
}

.owner-stage[data-raid-level="awake"] .crowd-raid,
.owner-stage[data-raid-level="siege"] .crowd-raid,
.owner-stage[data-raid-level="riot"] .crowd-raid {
  color: var(--stage-bg);
  background: var(--stage-fg);
  border-color: var(--stage-fg);
  box-shadow: 7px 7px 0 color-mix(in srgb, var(--stage-fg) 25%, transparent);
  transform: rotate(-.7deg);
}

.owner-stage[data-raid-level="awake"] .raid-button,
.owner-stage[data-raid-level="siege"] .raid-button,
.owner-stage[data-raid-level="riot"] .raid-button {
  color: var(--stage-fg);
  background: var(--stage-bg);
}

.raid-tape {
  position: absolute;
  z-index: 1;
  bottom: clamp(18px, 3.5vh, 42px);
  left: -5%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 28px;
  width: 110%;
  min-height: clamp(46px, 7vh, 72px);
  padding: 0 2vw;
  overflow: hidden;
  color: var(--stage-bg);
  background: var(--stage-fg);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3.1vw, 3.2rem);
  font-weight: 950;
  line-height: .85;
  letter-spacing: -.055em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-8%) rotate(-3deg) scaleY(.3);
  transition: opacity .24s, transform .45s var(--ease-out);
}

.raid-tape i {
  font-size: .35em;
  font-style: normal;
}

.owner-stage[data-raid-level="awake"] .raid-tape,
.owner-stage[data-raid-level="siege"] .raid-tape,
.owner-stage[data-raid-level="riot"] .raid-tape {
  opacity: .92;
  transform: translateX(0) rotate(-3deg) scaleY(1);
  animation: raid-march 4s ease-in-out infinite alternate;
}

.owner-stage[data-raid-level="riot"] .raid-tape {
  min-height: clamp(68px, 10vh, 104px);
  color: var(--ink);
  background: var(--signal);
  animation-duration: 1.2s;
}

@keyframes crowd-pulse {
  50% { opacity: .35; transform: scale(.65); }
}

@keyframes raid-march {
  to { transform: translateX(2.5%) rotate(-2deg) scaleY(1); }
}

.owner-content {
  position: absolute;
  z-index: 2;
  left: clamp(18px, 6vw, 96px);
  top: 50%;
  width: min(79vw, 1200px);
  max-height: calc(100% - 100px);
  transform: translateY(-47%);
  outline: none;
}

.ownership-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 clamp(12px, 2vh, 24px);
  color: var(--stage-muted);
  font-family: var(--font-mono);
  font-size: clamp(9px, 1vw, 12px);
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1.5;
}

.ownership-kicker::before {
  content: "";
  width: 27px;
  height: 2px;
  flex: 0 0 auto;
  background: currentColor;
}

.site-identity {
  display: inline-flex;
  max-width: min(70vw, 620px);
  margin: 0 0 12px;
  padding: 6px 9px;
  overflow: hidden;
  color: var(--stage-bg);
  background: var(--stage-fg);
  border: 2px solid var(--stage-accent);
  font-family: var(--font-mono);
  font-size: clamp(7px, .8vw, 9px);
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.owner-name {
  max-width: 12ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.15rem, 9.3vw, 10.2rem);
  font-weight: 950;
  line-height: .83;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  text-transform: uppercase;
}

.owner-message {
  width: min(600px, 75vw);
  margin: clamp(20px, 3.5vh, 42px) 0 0;
  color: var(--stage-muted);
  font-size: clamp(1rem, 1.6vw, 1.45rem);
  font-weight: 620;
  line-height: 1.38;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.owner-link,
.neutral-claim {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 52px;
  margin-top: clamp(24px, 4vh, 48px);
  padding: 0 22px;
  color: var(--stage-button-fg);
  background: var(--stage-button-bg);
  border: 1px solid var(--stage-button-bg);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .09em;
  text-decoration: none;
  transition: color .18s, background .18s, transform .18s var(--ease-out);
}

.owner-link svg,
.neutral-claim svg {
  width: 18px;
  height: 18px;
}

.owner-link:hover,
.owner-link:focus-visible,
.neutral-claim:hover,
.neutral-claim:focus-visible {
  color: var(--stage-fg);
  background: transparent;
  transform: translateY(-2px);
}

.neutral-claim {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 245px;
  padding: 12px 19px;
  text-align: left;
  cursor: pointer;
}

.neutral-claim span {
  font-size: 8px;
  font-weight: 700;
  opacity: .7;
}

.commentary {
  position: absolute;
  z-index: 3;
  right: clamp(16px, 3vw, 42px);
  bottom: clamp(15px, 3vh, 30px);
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: min(390px, calc(100% - 32px));
  margin: 0;
  padding: 12px 15px;
  color: var(--stage-fg);
  background: color-mix(in srgb, var(--stage-bg) 75%, transparent);
  border: 1px solid var(--stage-line);
  backdrop-filter: blur(12px);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1.45;
  text-transform: uppercase;
}

.commentary > span:first-child {
  margin-top: .15em;
  font-size: 7px;
}

.loading-mark {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 22px;
  color: var(--stage-fg);
  background: var(--stage-bg);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 7rem);
  font-weight: 950;
  letter-spacing: -.07em;
  transition: opacity .45s, visibility .45s;
}

.loading-mark i {
  position: relative;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: var(--stage-line);
}

.loading-mark i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  transform-origin: left;
  animation: loading-line 1.1s var(--ease-out) infinite;
}

@keyframes loading-line {
  0% { transform: scaleX(0); transform-origin: left; }
  45% { transform: scaleX(1); transform-origin: left; }
  55% { transform: scaleX(1); transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

body:not(.is-loading) .loading-mark {
  visibility: hidden;
  opacity: 0;
}

body:not(.is-loading) .owner-content {
  animation: content-arrive .75s var(--ease-out) both;
}

@keyframes content-arrive {
  from { opacity: 0; transform: translateY(-43%); }
}

/* Curated, code-owned themes. User content never supplies CSS. */
.owner-stage.theme-noir {
  --stage-bg: #0a0a0a;
  --stage-fg: #f5f2e9;
  --stage-muted: rgba(245, 242, 233, .67);
  --stage-line: rgba(245, 242, 233, .14);
  --stage-button-bg: #f5f2e9;
  --stage-button-fg: #0a0a0a;
}

.owner-stage.theme-noir .stage-grid {
  background-size: 11px 11px;
  opacity: .16;
}

.owner-stage.theme-noir::after {
  opacity: .08;
  transform: skewX(-15deg) rotate(9deg);
}

.owner-stage.theme-cobalt {
  --stage-bg: #1246f5;
  --stage-fg: #fffefa;
  --stage-muted: rgba(255, 254, 250, .76);
  --stage-line: rgba(255, 254, 250, .19);
  --stage-button-bg: #fffefa;
  --stage-button-fg: #0b2aa5;
}

.owner-stage.theme-cobalt::before {
  border-radius: 0;
  transform: rotate(20deg);
}

.owner-stage.theme-paper {
  --stage-bg: #eee9dc;
  --stage-fg: #1c1b18;
  --stage-muted: rgba(28, 27, 24, .67);
  --stage-line: rgba(28, 27, 24, .17);
  --stage-button-bg: #c42e25;
  --stage-button-fg: #fff9ec;
}

.owner-stage.theme-paper .owner-name {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  line-height: .84;
  letter-spacing: -.065em;
}

.owner-stage.theme-paper .stage-grid {
  background-image: repeating-linear-gradient(to bottom, transparent 0 27px, var(--stage-line) 28px);
  background-size: auto;
  mask-image: none;
  opacity: .5;
}

.owner-stage.theme-paper::after {
  background: #c42e25;
  opacity: .06;
}

/* Persistent public control deck */
.control-deck {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(155px, 1.15fr) minmax(110px, .8fr) minmax(105px, .67fr) minmax(110px, .72fr) minmax(230px, 1.25fr);
  align-items: stretch;
  min-width: 0;
  color: #f7f6ef;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.16);
  padding-bottom: env(safe-area-inset-bottom);
}

.brand-lockup,
.deck-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 clamp(12px, 2vw, 30px);
  border-right: 1px solid rgba(255,255,255,.14);
}

.brand-lockup {
  color: inherit;
  text-decoration: none;
}

.brand-word {
  color: var(--signal);
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.65vw, 1.55rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.055em;
}

.brand-manifesto {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .13em;
  opacity: .52;
}

.deck-label {
  margin-bottom: 7px;
  color: rgba(255,255,255,.48);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  letter-spacing: .13em;
}

.deck-block strong {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(.76rem, 1.05vw, .94rem);
  line-height: 1;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-metric strong {
  font-variant-numeric: tabular-nums;
}

.deck-burn {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: rgba(255,255,255,.5);
  font-family: var(--font-mono);
  font-size: 6px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: .025em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-metric strong.just-burned {
  animation: value-burn .35s var(--ease-out);
}

@keyframes value-burn {
  45% { color: var(--signal); transform: translateY(-2px); }
}

.takeover-button {
  --burn-progress: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 clamp(15px, 2.5vw, 34px);
  color: var(--ink);
  background: var(--signal);
  border: 0;
  font-family: var(--font-mono);
  font-size: clamp(.68rem, .92vw, .84rem);
  font-weight: 950;
  letter-spacing: -.02em;
  text-align: left;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.takeover-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: currentColor;
  opacity: .55;
  transform: scaleX(var(--burn-progress));
  transform-origin: left;
  transition: transform .2s linear;
}

.takeover-button svg {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin-left: 12px;
  transition: transform .25s var(--ease-out);
}

.takeover-copy {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.takeover-copy > span,
.takeover-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.takeover-copy > small {
  font-size: 6px;
  font-weight: 800;
  letter-spacing: .04em;
  opacity: .58;
}

.takeover-button:hover:not(:disabled),
.takeover-button:focus-visible:not(:disabled) {
  color: #fff;
  background: #3151ff;
}

.takeover-button:hover:not(:disabled) svg {
  transform: translateX(5px);
}

.takeover-button:disabled {
  color: rgba(255,255,255,.48);
  background: #272929;
  cursor: wait;
}

/* Takeover interface */
dialog {
  padding: 0;
}

.takeover-dialog,
.win-dialog,
.share-fallback-dialog {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 18px 18px 0 rgba(0,0,0,.22);
}

.takeover-dialog {
  width: min(780px, calc(100vw - 28px));
  max-width: none;
  max-height: min(920px, calc(100dvh - 28px));
  overflow: hidden;
}

dialog::backdrop {
  background: rgba(8,9,9,.76);
  backdrop-filter: blur(9px);
}

dialog[open] {
  animation: dialog-enter .38s var(--ease-out) both;
}

@keyframes dialog-enter {
  from { opacity: 0; transform: translateY(20px) scale(.985); }
}

.dialog-frame {
  max-height: min(920px, calc(100dvh - 28px));
  overflow: auto;
  overscroll-behavior: contain;
}

.dialog-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 85px;
  padding: 18px clamp(18px, 3vw, 30px) 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.dialog-step,
.dialog-header h2 {
  margin: 0;
}

.dialog-step {
  margin-bottom: 4px;
  color: #5e605e;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .13em;
}

.dialog-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4vw, 2.4rem);
  line-height: .95;
  letter-spacing: -.055em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  cursor: pointer;
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.icon-button:hover,
.icon-button:focus-visible {
  color: var(--signal);
  background: var(--ink);
}

.dialog-alert {
  margin: 18px clamp(18px, 3vw, 30px) 0;
  padding: 12px 14px;
  color: #8d1613;
  background: #ffe5df;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.dialog-panel {
  padding: clamp(18px, 3vw, 30px);
}

.quote-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3px 20px;
  padding: 17px 19px;
  color: var(--ink);
  background: var(--signal);
  border: 1px solid var(--ink);
}

.quote-strip > span,
.quote-strip small {
  font-family: var(--font-mono);
}

.quote-strip > span {
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.quote-strip strong {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 6vw, 3.6rem);
  line-height: .9;
  letter-spacing: -.07em;
}

.quote-strip small {
  font-size: 8px;
  font-weight: 650;
  opacity: .62;
}

#creative-form {
  display: grid;
  gap: 0;
}

.form-section {
  min-width: 0;
  margin: 24px 0 0;
  padding: 0;
  border: 0;
}

.form-section > legend {
  width: 100%;
  margin: 0 0 12px;
  padding: 0 0 9px;
  border-bottom: 1px solid #b8b7b0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.form-section > legend small {
  float: right;
  color: #686a67;
  font-size: 7px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.purchase-mode-picker {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 8px;
}

.purchase-mode-picker label {
  position: relative;
  display: grid;
}

.purchase-mode-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.purchase-mode-picker label > span {
  display: grid;
  align-content: center;
  min-height: 76px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid #9b9c96;
  cursor: pointer;
}

.purchase-mode-picker strong {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .035em;
}

.purchase-mode-picker small {
  margin-top: 6px;
  color: #686a67;
  font-size: 9px;
  line-height: 1.4;
}

.purchase-mode-picker input:checked + span {
  background: var(--signal);
  border: 2px solid var(--ink);
  padding: 12px 13px;
}

.purchase-mode-picker input:focus-visible + span {
  outline: 3px solid #244be8;
  outline-offset: 2px;
}

.payment-rail-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.payment-rail-picker label {
  position: relative;
  display: grid;
}

.payment-rail-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.payment-rail-picker label > span {
  display: grid;
  align-content: center;
  min-height: 66px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #9b9c96;
  cursor: pointer;
}

.payment-rail-picker strong {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .04em;
}

.payment-rail-picker small {
  margin-top: 5px;
  color: #686a67;
  font-size: 9px;
  line-height: 1.4;
}

.payment-rail-picker input:checked + span {
  background: var(--signal);
  border: 2px solid var(--ink);
  padding: 11px 13px;
}

.payment-rail-picker input:focus-visible + span {
  outline: 3px solid #244be8;
  outline-offset: 2px;
}

.payment-rail-locked {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 12px 14px;
  background: var(--signal);
  border: 2px solid var(--ink);
}

.payment-rail-locked > span {
  display: grid;
}

.payment-rail-locked > b {
  padding: 5px 7px;
  color: #fff;
  background: #244be8;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: .08em;
}

.x402-testnet-note {
  margin: 8px 0 0;
  padding: 9px 11px;
  color: #fff;
  background: #244be8;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .035em;
  line-height: 1.45;
}

.coup-purchase-disclosure {
  margin-top: 8px;
  padding: 13px 14px;
  color: #f7f4eb;
  background: var(--ink);
  border: 1px solid var(--ink);
}

.coup-purchase-disclosure[hidden] {
  display: none;
}

.coup-purchase-disclosure > strong {
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .04em;
}

.coup-purchase-disclosure p {
  margin: 7px 0 0;
  font-size: 9px;
  line-height: 1.5;
}

.coup-purchase-disclosure .coup-power-preview {
  padding-top: 8px;
  border-top: 1px solid #555752;
  color: var(--signal);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .025em;
}

.money-section {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) 1fr;
  align-items: end;
  column-gap: 24px;
}

.money-section legend,
.money-section .quick-amounts {
  grid-column: 1 / -1;
}

.money-input {
  display: flex;
  align-items: baseline;
  padding: 2px 0 7px;
  border-bottom: 3px solid var(--ink);
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 9vw, 5.2rem);
  font-weight: 950;
  line-height: .86;
  letter-spacing: -.08em;
}

.money-input span {
  margin-right: .08em;
  font-size: .48em;
  vertical-align: top;
}

.money-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
  font: inherit;
  letter-spacing: inherit;
  appearance: textfield;
}

.money-input input::-webkit-inner-spin-button,
.money-input input::-webkit-outer-spin-button {
  appearance: none;
}

.money-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 11px;
}

.money-meta strong {
  font-family: var(--font-mono);
  font-size: clamp(.82rem, 1.8vw, 1.08rem);
}

.money-meta span {
  color: #696b69;
  font-size: 11px;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.quick-amounts button {
  min-height: 30px;
  padding: 0 11px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #92938e;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.quick-amounts button:hover,
.quick-amounts button:focus-visible {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.field > span {
  display: flex;
  justify-content: space-between;
  color: #5e605e;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 850;
  font-style: normal;
  letter-spacing: .09em;
}

.field > span i {
  font-style: normal;
  font-weight: 650;
}

.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: #fff;
  border: 1px solid #9b9c96;
  border-radius: 0;
  outline: 0;
  font-size: 14px;
}

.field input {
  height: 45px;
  padding: 0 13px;
}

.field textarea {
  min-height: 76px;
  padding: 12px 13px;
  line-height: 1.4;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.money-input:focus-within {
  border-color: #244be8;
  box-shadow: 0 0 0 2px #244be8;
}

.money-input:focus-within {
  box-shadow: 0 3px 0 #244be8;
}

.tagline-field {
  margin-top: 12px;
}

.remix-row {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.tone-picker {
  display: flex;
  min-width: 0;
  border: 1px solid #a5a69f;
}

.tone-picker label {
  position: relative;
  display: grid;
}

.tone-picker input,
.theme-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tone-picker span {
  display: grid;
  place-items: center;
  min-height: 33px;
  padding: 0 clamp(7px, 1.5vw, 13px);
  border-right: 1px solid #a5a69f;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 850;
  cursor: pointer;
}

.tone-picker label:last-child span {
  border-right: 0;
}

.tone-picker input:checked + span {
  color: #fff;
  background: var(--ink);
}

.tone-picker input:focus-visible + span,
.theme-option input:focus-visible + span {
  outline: 2px solid #244be8;
  outline-offset: 2px;
}

.remix-button {
  min-height: 35px;
  padding: 0 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.remix-button:hover,
.remix-button:focus-visible {
  background: var(--signal);
}

.remix-button:disabled {
  opacity: .5;
  cursor: wait;
}

.spark {
  margin-right: 5px;
}

.remix-results {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.remix-results button {
  padding: 10px 12px;
  color: var(--ink);
  background: #efeee6;
  border: 1px solid #b7b8b1;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.remix-results button:hover,
.remix-results button:focus-visible {
  background: #fff;
  border-color: var(--ink);
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.theme-option {
  position: relative;
}

.theme-option > span {
  display: block;
  padding: 5px;
  background: #fff;
  border: 1px solid #aaa;
  cursor: pointer;
}

.theme-option input:checked + span {
  border: 2px solid var(--ink);
  padding: 4px;
}

.theme-option i {
  position: relative;
  display: block;
  height: 37px;
  overflow: hidden;
  background: var(--swatch-bg);
}

.theme-option i::after {
  content: "A";
  position: absolute;
  left: 8px;
  bottom: -5px;
  color: var(--swatch-fg);
  font-family: var(--font-display);
  font-size: 38px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.theme-option b {
  display: block;
  padding: 7px 3px 3px;
  font-family: var(--font-mono);
  font-size: 7px;
  letter-spacing: .08em;
}

.signal-swatch { --swatch-bg: #dfff00; --swatch-fg: #0a0b0b; }
.noir-swatch { --swatch-bg: #0a0a0a; --swatch-fg: #f5f2e9; }
.cobalt-swatch { --swatch-bg: #1246f5; --swatch-fg: #fff; }
.paper-swatch { --swatch-bg: #eee9dc; --swatch-fg: #c42e25; }

.challenge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 48px;
  margin-top: 22px;
}

.challenge-row p {
  max-width: 210px;
  margin: 0;
  color: #6a6b68;
  font-size: 9px;
  line-height: 1.45;
  text-align: right;
}

.primary-action,
.share-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  margin-top: 20px;
  padding: 0 20px;
  color: var(--ink);
  background: var(--signal);
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .025em;
  cursor: pointer;
  transition: color .18s, background .18s;
}

.primary-action svg,
.share-button svg {
  width: 21px;
  height: 21px;
}

.primary-action:hover:not(:disabled),
.primary-action:focus-visible:not(:disabled),
.share-button:hover:not(:disabled),
.share-button:focus-visible {
  color: #fff;
  background: #244be8;
}

.primary-action:disabled {
  color: #777;
  background: #dddcd5;
  cursor: wait;
}

.purchase-disclosure {
  margin: 11px auto 0;
  max-width: 590px;
  color: #686a67;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.back-button {
  padding: 0;
  color: #555754;
  background: transparent;
  border: 0;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .08em;
  cursor: pointer;
}

.back-button:hover,
.back-button:focus-visible {
  color: #244be8;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.payment-summary {
  margin: 24px 0;
  padding: 19px;
  color: var(--ink);
  background: var(--signal);
  border: 1px solid var(--ink);
}

.payment-summary > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.payment-summary strong {
  display: block;
  margin: 5px 0 10px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 9vw, 5rem);
  line-height: .9;
  letter-spacing: -.075em;
}

.payment-summary p {
  max-width: 540px;
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.stripe-mount {
  min-height: 180px;
  padding: 15px;
  background: #fff;
  border: 1px solid #9b9c96;
}

.payment-loading {
  display: grid;
  place-items: center;
  min-height: 145px;
  color: #777;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
}

.wallet-payment {
  color: var(--ink);
  background: #fff;
  border: 1px solid #8d8f8a;
}

.wallet-network {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 13px;
  color: #fff;
  background: #244be8;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
}

.wallet-network span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.wallet-network i {
  width: 7px;
  height: 7px;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(223, 255, 0, .17);
}

.wallet-network strong {
  color: var(--signal);
  font-size: inherit;
}

.wallet-review {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.wallet-review > div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid #d0cfc8;
  border-bottom: 1px solid #d0cfc8;
}

.wallet-review > div:nth-child(2n) {
  border-right: 0;
}

.wallet-review dt {
  color: #686a67;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}

.wallet-review dd {
  margin: 5px 0 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-connect {
  width: calc(100% - 24px);
  min-height: 44px;
  margin: 12px;
  color: #fff;
  background: var(--ink);
  border: 0;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 950;
  letter-spacing: .06em;
  cursor: pointer;
}

.wallet-connect:hover:not(:disabled),
.wallet-connect:focus-visible:not(:disabled) {
  color: var(--ink);
  background: var(--signal);
}

.wallet-connect:disabled {
  opacity: .58;
  cursor: wait;
}

.wallet-explainer {
  margin: 0;
  padding: 0 12px 13px;
  color: #626461;
  font-size: 9px;
  line-height: 1.5;
}

.hold-note {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  color: #626461;
  background: #e9e8e1;
}

.hold-note svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.hold-note p {
  margin: 0;
  font-size: 9px;
  line-height: 1.5;
}

.processing-panel {
  min-height: 480px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.processing-panel:not([hidden]) {
  display: grid;
}

.processing-orbit {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 30px;
  border: 1px solid #aaa;
  border-radius: 50%;
  animation: process-spin 2.8s linear infinite;
}

.processing-orbit::before {
  content: "";
  position: absolute;
  inset: 27px;
  border: 1px solid #aaa;
  border-radius: inherit;
}

.processing-orbit i {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--ink);
}

.processing-orbit i:first-child { top: 4px; left: 28px; }
.processing-orbit i:last-child { right: 6px; bottom: 22px; background: #244be8; }

@keyframes process-spin { to { transform: rotate(360deg); } }

.processing-panel > p {
  margin: 0 0 10px;
  color: #666;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.processing-panel h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: .92;
  letter-spacing: -.06em;
  text-transform: uppercase;
}

.processing-panel > span {
  max-width: 440px;
  margin-top: 16px;
  color: #626461;
  font-size: 11px;
  line-height: 1.5;
}

/* Capture transition */
.win-dialog {
  width: min(820px, calc(100vw - 28px));
  max-width: none;
  padding: clamp(25px, 5vw, 58px);
  color: var(--ink);
  background: var(--signal);
  overflow-x: hidden;
  overflow-y: auto;
}

.win-dialog::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  right: -220px;
  bottom: -230px;
  border: 75px solid var(--ink);
  border-radius: 50%;
  opacity: .08;
}

.win-close {
  position: absolute;
  top: 17px;
  right: 17px;
}

.win-dialog > p:first-of-type {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.win-dialog h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 7.6rem);
  line-height: .8;
  letter-spacing: -.08em;
}

.win-stats {
  display: grid;
  grid-template-columns: .7fr 1fr 1fr;
  margin-top: clamp(25px, 5vw, 48px);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.win-stats > span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 15px 13px;
  border-right: 1px solid var(--ink);
}

.win-stats > span:first-child { padding-left: 0; }
.win-stats > span:last-child { border-right: 0; }

.win-stats small {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .09em;
}

.win-stats strong {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(.8rem, 2vw, 1.2rem);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-copy {
  width: min(550px, 90%);
  margin: 24px 0 0;
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.4;
}

.share-fallback-dialog {
  width: min(620px, calc(100vw - 28px));
  max-width: none;
  padding: clamp(26px, 5vw, 52px);
  overflow: hidden;
}

.share-fallback-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.share-fallback-dialog > p {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.share-fallback-dialog h2 {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-size: clamp(2.7rem, 9vw, 5.5rem);
  line-height: .82;
  letter-spacing: -.07em;
}

.share-fallback-dialog label {
  display: block;
  margin-bottom: 7px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .1em;
}

.share-fallback-dialog textarea {
  width: 100%;
  min-height: 126px;
  padding: 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 0;
  outline: 0;
  font: 700 12px/1.5 var(--font-mono);
  resize: none;
}

.share-fallback-dialog textarea:focus {
  box-shadow: 0 0 0 2px #244be8;
}

.share-fallback-dialog .share-button {
  margin-top: 12px;
}

.share-button {
  width: min(390px, 100%);
  background: var(--ink);
  color: #fff;
}

.win-share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(620px, 100%);
}

.win-share-actions .share-button {
  width: 100%;
}

.win-share-actions .challenge-share-button {
  color: var(--ink);
  background: transparent;
}

.win-share-actions .share-button:disabled {
  color: rgba(10, 11, 11, .6);
  background: transparent;
  cursor: default;
  opacity: .65;
}

.win-confetti i {
  position: absolute;
  width: 9px;
  height: 45px;
  background: #244be8;
  animation: confetti-drop 1.1s var(--ease-out) both;
}

.win-confetti i:nth-child(1) { top: -5px; left: 15%; transform: rotate(22deg); }
.win-confetti i:nth-child(2) { top: 13%; right: 8%; height: 24px; animation-delay: .12s; }
.win-confetti i:nth-child(3) { bottom: 8%; left: 3%; height: 31px; animation-delay: .2s; }
.win-confetti i:nth-child(4) { top: 43%; right: 31%; height: 18px; animation-delay: .28s; }
.win-confetti i:nth-child(5) { bottom: 2%; left: 55%; height: 25px; animation-delay: .15s; }

@keyframes confetti-drop {
  from { opacity: 0; transform: translateY(-80px) rotate(60deg); }
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(var(--deck-height) + 18px + env(safe-area-inset-bottom));
  max-width: calc(100vw - 30px);
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 8px 8px 0 rgba(0,0,0,.15);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

.toast:not([hidden]) {
  animation: toast-in .3s var(--ease-out) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 10px); }
}

/* Static policy pages */
.legal-page {
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
}

.legal-header {
  position: sticky;
  z-index: 5;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 clamp(18px, 5vw, 72px);
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.2);
}

.legal-header .brand-word {
  text-decoration: none;
}

.legal-nav {
  display: flex;
  gap: clamp(12px, 3vw, 30px);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.legal-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  text-underline-offset: 4px;
}

.legal-main {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(0, 720px) minmax(40px, .3fr);
  gap: clamp(20px, 6vw, 90px);
  max-width: 1350px;
  margin: 0 auto;
  padding: clamp(45px, 9vw, 120px) clamp(18px, 5vw, 72px) 100px;
}

.legal-title {
  position: sticky;
  top: 115px;
  align-self: start;
}

.legal-title p {
  margin: 0 0 13px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .1em;
}

.legal-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: .82;
  letter-spacing: -.075em;
  text-transform: uppercase;
}

.legal-copy {
  font-size: 15px;
  line-height: 1.72;
}

.legal-copy .lede {
  margin-top: 0;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 680;
  line-height: 1.42;
}

.legal-copy h2 {
  margin: 50px 0 12px;
  padding-top: 17px;
  border-top: 1px solid #aaa;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -.035em;
  text-transform: uppercase;
}

.legal-copy h3 {
  margin: 25px 0 8px;
  font-size: 1rem;
}

.legal-copy p,
.legal-copy li {
  color: #3d3e3c;
}

.legal-copy li + li {
  margin-top: 10px;
}

.legal-callout {
  margin: 30px 0;
  padding: 19px 21px;
  background: var(--signal);
  border: 1px solid var(--ink);
  font-weight: 700;
}

.legal-updated {
  color: #6b6c69;
  font-family: var(--font-mono);
  font-size: 9px;
}

/* Public takeover record */
.history-page {
  background:
    linear-gradient(rgba(10, 11, 11, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 11, 11, .045) 1px, transparent 1px),
    var(--paper);
  background-size: 96px 96px;
}

.history-main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 72px) clamp(70px, 10vw, 140px);
}

.history-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
  align-items: end;
  gap: clamp(35px, 8vw, 130px);
  min-height: min(610px, calc(100vh - 68px));
  padding: clamp(75px, 10vw, 145px) 0 clamp(65px, 8vw, 110px);
  border-bottom: 1px solid var(--ink);
}

.history-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.history-kicker span {
  color: #244be8;
  font-size: 8px;
}

.history-hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8.8vw, 8rem);
  font-weight: 950;
  line-height: .79;
  letter-spacing: -.085em;
}

.history-intro {
  padding: 22px 0 4px;
  border-top: 3px solid var(--ink);
}

.history-intro p {
  margin: 0;
  color: #404240;
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  font-weight: 650;
  line-height: 1.45;
  text-wrap: balance;
}

.history-intro a,
.history-empty a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 25px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .07em;
  text-decoration: none;
}

.history-intro a:hover,
.history-intro a:focus-visible,
.history-empty a:hover,
.history-empty a:focus-visible {
  color: #244be8;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.history-record {
  padding-top: clamp(50px, 7vw, 90px);
}

.record-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--ink);
}

.record-header p,
.record-header h2 {
  margin: 0;
}

.record-header > div > p,
.record-count {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
}

.record-header h2 {
  margin-top: 5px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: .9;
  letter-spacing: -.06em;
  text-transform: uppercase;
}

.record-count {
  padding-bottom: 3px;
  color: #5f615f;
}

.history-status {
  display: grid;
  place-items: center;
  min-height: 350px;
  padding: 60px 20px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  text-align: center;
}

.history-status strong {
  margin-top: 25px;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -.04em;
}

.history-status > span,
.history-status > p {
  max-width: 470px;
  margin: 8px 0 0;
  color: #666864;
  font-size: 11px;
  line-height: 1.5;
}

.history-loader {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
}

.history-loader i {
  display: block;
  width: 9px;
  height: 9px;
  background: var(--ink);
  border-radius: 50%;
  animation: history-pulse 1.1s ease-in-out infinite;
}

.history-loader i:nth-child(2) { animation-delay: .15s; }
.history-loader i:nth-child(3) { animation-delay: .3s; }

@keyframes history-pulse {
  50% { transform: translateY(-13px); background: #244be8; }
}

.history-empty {
  position: relative;
  overflow: hidden;
}

.history-empty .empty-number {
  position: absolute;
  z-index: -1;
  right: -.03em;
  bottom: -.25em;
  color: var(--signal);
  font-family: var(--font-display);
  font-size: clamp(13rem, 30vw, 30rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.12em;
  opacity: .8;
}

.history-empty strong,
.history-error strong {
  margin: 0;
}

.history-error button {
  min-height: 42px;
  margin-top: 22px;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  cursor: pointer;
}

.history-error button:hover,
.history-error button:focus-visible {
  color: var(--ink);
  background: var(--signal);
}

.history-error button:disabled {
  opacity: .5;
  cursor: wait;
}

.reign-list {
  margin: 0;
  padding: 0;
  border-right: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
  list-style: none;
}

.reign-item {
  --reign-accent: var(--signal);
  --reign-accent-ink: var(--ink);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
}

.reign-item::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 8px;
  background: var(--reign-accent);
}

.reign-theme-noir { --reign-accent: #0a0a0a; --reign-accent-ink: #fff; }
.reign-theme-cobalt { --reign-accent: #1246f5; --reign-accent-ink: #fff; }
.reign-theme-paper { --reign-accent: #c42e25; --reign-accent-ink: #fff; }

.reign-card {
  padding: clamp(25px, 4vw, 52px) clamp(20px, 4vw, 58px) clamp(24px, 4vw, 45px);
  background: color-mix(in srgb, var(--paper) 94%, white);
  transition: background .18s;
}

.reign-card:hover {
  background: #fff;
}

.reign-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.reign-identity {
  position: relative;
  min-width: 0;
  padding-left: 32px;
}

.reign-identity::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 17px;
  height: 17px;
  background: var(--reign-accent);
  border: 1px solid var(--ink);
}

.reign-number,
.reign-company,
.reign-ended {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.reign-number {
  margin: 0 0 9px;
  color: #646663;
}

.reign-identity h3 {
  max-width: 15ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 5.5rem);
  line-height: .82;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.reign-company {
  margin: 10px 0 0;
  color: #555754;
}

.reign-ended {
  flex: 0 0 auto;
  padding: 9px 11px;
  color: var(--reign-accent-ink);
  background: var(--reign-accent);
  border: 1px solid var(--ink);
}

.reign-tagline {
  width: min(690px, 82%);
  margin: clamp(25px, 4vw, 44px) 0 0 32px;
  color: #3f413e;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  font-weight: 650;
  line-height: 1.42;
  letter-spacing: -.015em;
}

.reign-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  margin: clamp(26px, 4vw, 44px) 0 0 32px;
  border-top: 1px solid #a8aaa5;
  border-bottom: 1px solid #a8aaa5;
}

.reign-metric {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px 14px 0;
  border-right: 1px solid #a8aaa5;
}

.reign-metric + .reign-metric {
  padding-left: 16px;
}

.reign-metric:last-child {
  border-right: 0;
}

.reign-metric small {
  color: #6a6c68;
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
}

.reign-metric strong {
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(.72rem, 1.25vw, .94rem);
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reign-eviction,
.reign-commentary {
  margin-right: 0;
  margin-left: 32px;
}

.reign-eviction {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 17px;
  margin-bottom: 0;
  font-family: var(--font-mono);
}

.reign-eviction span {
  color: #6a6c68;
  font-size: 7px;
  font-weight: 850;
  letter-spacing: .1em;
}

.reign-eviction strong {
  font-size: 11px;
  text-transform: uppercase;
}

.reign-commentary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: min(610px, calc(100% - 32px));
  margin-top: 20px;
  margin-bottom: 0;
  padding: 11px 13px;
  background: #e8e7df;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .055em;
  line-height: 1.5;
  text-transform: uppercase;
}

.reign-commentary > span:first-child {
  color: var(--reign-accent);
  font-size: 7px;
  -webkit-text-stroke: .3px var(--ink);
}

.history-footnote {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding: 25px 0;
  border-bottom: 1px solid var(--ink);
}

.history-footnote p {
  width: min(670px, 75%);
  margin: 0;
  color: #5e605d;
  font-size: 10px;
  line-height: 1.5;
}

.history-footnote a {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .08em;
  text-underline-offset: 4px;
}

@media (max-width: 850px) {
  :root {
    --deck-height: 82px;
  }

  .control-deck {
    grid-template-columns: 104px minmax(54px, .65fr) minmax(62px, .72fr) minmax(58px, .68fr) minmax(125px, 1.25fr);
  }

  .brand-lockup,
  .deck-block {
    padding: 0 10px;
  }

  .brand-manifesto,
  .deck-label,
  .deck-burn {
    display: none;
  }

  .brand-word {
    font-size: 1rem;
  }

  .deck-block strong {
    font-size: .69rem;
  }

  .takeover-button {
    padding: 0 12px;
    font-size: .62rem;
    line-height: 1.2;
  }

  .takeover-button svg {
    width: 17px;
    height: 17px;
    margin-left: 6px;
  }

  .owner-content {
    width: min(87vw, 700px);
  }

  .crowd-readout {
    min-width: 160px;
  }

  .raid-button {
    min-width: 124px;
    padding: 0 10px;
  }

  .commentary {
    right: 16px;
    bottom: 15px;
  }

  .legal-main {
    grid-template-columns: 1fr;
  }

  .legal-title {
    position: static;
  }

  .history-hero {
    grid-template-columns: 1fr;
    align-content: center;
    min-height: 610px;
  }

  .history-intro {
    width: min(520px, 100%);
  }

  .reign-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .reign-metric:nth-child(2) {
    border-right: 0;
  }

  .reign-metric:nth-child(n+3) {
    border-top: 1px solid #a8aaa5;
  }
}

@media (max-width: 600px) {
  :root {
    --deck-height: calc(78px + env(safe-area-inset-bottom));
  }

  .artifact-nav {
    padding-top: max(12px, env(safe-area-inset-top));
  }

  .artifact-links {
    gap: 10px;
  }

  .artifact-links a {
    min-height: 32px;
    font-size: 9px;
  }

  .crowd-raid {
    top: 52px;
    right: 12px;
    left: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 44px;
  }

  .crowd-readout {
    min-width: 0;
    flex: 1;
    padding: 7px 9px;
  }

  .crowd-war-actions .raid-button {
    min-width: 86px;
    padding-inline: 6px;
    font-size: 8px;
  }

  .crowd-presence {
    font-size: 9px;
  }

  .crowd-pressure {
    max-width: 29ch;
    font-size: 8px;
    white-space: normal;
  }

  .raid-button {
    min-width: 111px;
    padding: 0 9px;
    font-size: 9px;
    line-height: 1.15;
  }

  .raid-button svg {
    width: 13px;
    height: 13px;
  }

  .crowd-rule {
    max-width: calc(100vw - 24px);
    overflow: hidden;
    font-size: 7px;
    text-overflow: ellipsis;
  }

  .crowd-engagement {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px;
    gap: 7px;
    padding: 8px 9px;
  }

  .crowd-engagement-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .crowd-engagement-action {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
  }

  .crowd-engagement-dismiss {
    grid-column: 2;
    grid-row: 1;
  }

  .crowd-recruit .crowd-engagement-copy {
    grid-column: 1 / -1;
  }

  .crowd-raid[data-engagement="true"] + .crowd-coup {
    top: 218px;
  }

  .crowd-coup {
    top: 109px;
    right: 12px;
    left: 12px;
    width: auto;
    padding: 10px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, .22);
    box-shadow: 5px 5px 0 color-mix(in srgb, var(--stage-fg) 24%, transparent);
  }

  .coup-manifesto {
    margin-block: 6px 7px;
    font-size: 14px;
  }

  .coup-contender {
    padding-block: 6px;
  }

  .coup-contender strong {
    font-size: 16px;
  }

  .coup-status {
    min-height: 18px;
    margin-block: 5px;
  }

  .coup-actions button {
    min-height: 44px;
    padding: 6px;
    font-size: 7px;
  }

  .owner-stage[data-coup-active="true"] .owner-content {
    top: 64%;
    width: calc(100% - 36px);
    transform: translateY(-42%);
  }

  .purchase-mode-picker,
  .payment-rail-picker {
    grid-template-columns: 1fr;
  }

  .owner-content {
    left: 18px;
    top: 47%;
    width: calc(100% - 36px);
    max-height: calc(100% - 100px);
  }

  .owner-name {
    max-width: 10ch;
    font-size: clamp(3.15rem, 16vw, 6.2rem);
    line-height: .82;
  }

  .owner-message {
    width: min(90%, 470px);
    margin-top: 18px;
    font-size: .97rem;
  }

  .owner-link,
  .neutral-claim {
    min-height: 46px;
    margin-top: 22px;
  }

  .stage-orbit {
    right: -26%;
    width: 78vw;
  }

  .brand-monogram {
    right: -7vw;
    font-size: 76vw;
    opacity: .055;
  }

  .brand-domain-ghost {
    right: 11px;
    bottom: 88px;
    font-size: 8px;
  }

  .brand-spectrum {
    right: 38px;
    bottom: 70px;
    height: 52px;
    opacity: .55;
  }

  .stage-index {
    right: -2vw;
    bottom: 1vh;
    font-size: 54vw;
  }

  .commentary {
    display: none;
  }

  .raid-tape {
    bottom: 26px;
    gap: 18px;
    width: 120%;
    font-size: clamp(1rem, 7vw, 2rem);
  }

  .control-deck {
    grid-template-columns: 72px minmax(43px, .6fr) minmax(48px, .75fr) minmax(49px, .68fr) minmax(105px, 1.3fr);
  }

  .brand-lockup,
  .deck-block {
    padding: 0 7px;
  }

  .brand-word {
    font-size: .72rem;
    letter-spacing: -.065em;
  }

  .deck-block strong {
    font-size: clamp(.53rem, 2.4vw, .65rem);
    letter-spacing: -.07em;
  }

  .takeover-button {
    padding: 0 8px;
    font-size: clamp(.5rem, 2.1vw, .59rem);
  }

  .takeover-button svg {
    display: none;
  }

  .takeover-dialog,
  .win-dialog,
  .share-fallback-dialog {
    width: 100vw;
    max-height: 94dvh;
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    box-shadow: none;
  }

  .dialog-frame {
    max-height: 94dvh;
  }

  dialog[open] {
    animation-name: sheet-enter;
  }

  @keyframes sheet-enter {
    from { opacity: 0; transform: translateY(100%); }
  }

  .dialog-header {
    min-height: 72px;
    padding: 14px 16px;
  }

  .dialog-panel {
    padding: 18px 16px calc(25px + env(safe-area-inset-bottom));
  }

  .dialog-alert {
    margin: 14px 16px 0;
  }

  .quote-strip {
    padding: 14px;
  }

  .quote-strip strong {
    font-size: 2.55rem;
  }

  .money-section {
    grid-template-columns: minmax(150px, .92fr) .8fr;
    column-gap: 14px;
  }

  .money-input {
    font-size: clamp(2.4rem, 15vw, 4.2rem);
  }

  .money-meta span {
    font-size: 9px;
  }

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

  .remix-row {
    align-items: stretch;
    flex-direction: column;
  }

  .tone-picker {
    width: 100%;
  }

  .tone-picker label {
    flex: 1;
  }

  .tone-picker span {
    padding: 0 4px;
  }

  .remix-button {
    min-height: 38px;
  }

  .theme-picker {
    grid-template-columns: 1fr 1fr;
  }

  .challenge-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .challenge-row p {
    text-align: left;
  }

  .win-dialog {
    max-height: calc(100dvh - 28px);
    padding: 38px 18px calc(24px + env(safe-area-inset-bottom));
  }

  .win-share-actions {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .win-stats {
    grid-template-columns: 1fr 1fr;
  }

  .win-stats > span:nth-child(2) {
    border-right: 0;
  }

  .win-stats > span:last-child {
    grid-column: 1 / -1;
    padding-left: 0;
    border-top: 1px solid var(--ink);
  }

  .legal-header {
    padding: 0 16px;
  }

  .legal-nav {
    gap: 8px;
    font-size: 7px;
  }

  .history-main {
    padding-right: 15px;
    padding-left: 15px;
  }

  .history-hero {
    min-height: calc(100svh - 68px);
    padding-top: 70px;
    padding-bottom: 58px;
  }

  .history-hero h1 {
    font-size: clamp(3.65rem, 16vw, 5.3rem);
  }

  .record-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .record-count {
    padding: 0;
  }

  .history-status {
    min-height: 300px;
  }

  .reign-item::before {
    width: 5px;
  }

  .reign-card {
    padding: 25px 17px 24px 20px;
  }

  .reign-topline {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 18px;
  }

  .reign-identity {
    padding-left: 25px;
  }

  .reign-identity::before {
    width: 13px;
    height: 13px;
  }

  .reign-identity h3 {
    font-size: clamp(2.65rem, 14vw, 4.5rem);
  }

  .reign-ended {
    margin-left: 25px;
  }

  .reign-tagline,
  .reign-metrics,
  .reign-eviction,
  .reign-commentary {
    margin-left: 25px;
  }

  .reign-tagline {
    width: calc(100% - 25px);
  }

  .reign-metrics {
    width: calc(100% - 25px);
  }

  .reign-metric {
    padding: 12px 7px 12px 0;
  }

  .reign-metric + .reign-metric {
    padding-left: 9px;
  }

  .reign-commentary {
    width: calc(100% - 25px);
  }

  .history-footnote {
    flex-direction: column;
  }

  .history-footnote p {
    width: 100%;
  }
}

@media (max-width: 370px) {
  .control-deck {
    grid-template-columns: 61px 42px 45px 47px minmax(102px, 1fr);
  }

  .raid-button {
    min-width: 99px;
  }

  .raid-button svg {
    display: none;
  }

  .legal-header {
    padding: 0 11px;
  }

  .legal-header .brand-word {
    font-size: .82rem;
  }

  .legal-nav {
    gap: 4px;
    font-size: 9px;
  }
}

@media (max-height: 640px) and (min-width: 650px) {
  :root { --deck-height: 70px; }
  .owner-content { transform: translateY(-43%); }
  .owner-name { font-size: clamp(3rem, 10vh, 5.6rem); }
  .owner-message { margin-top: 16px; }
  .owner-link, .neutral-claim { margin-top: 18px; }

  .crowd-coup {
    max-height: calc(100% - 136px);
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .coup-manifesto,
  .coup-power span,
  .coup-rule {
    display: none;
  }

  .coup-contender {
    padding-block: 4px;
  }

  .coup-contender strong {
    font-size: 15px;
  }

  .coup-meter {
    margin-block: 1px 4px;
  }

  .coup-status {
    min-height: 0;
    margin-block: 4px;
  }

  .coup-actions button {
    min-height: 38px;
    padding-block: 5px;
  }
}

@media (max-height: 700px) and (max-width: 600px) {
  .coup-manifesto,
  .coup-power span,
  .coup-rule {
    display: none;
  }

  .owner-stage[data-coup-active="true"] .owner-content {
    top: 66%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .owner-stage,
  .control-deck,
  .crowd-raid,
  .crowd-coup,
  .raid-button,
  .crowd-engagement-action,
  .crowd-engagement-dismiss,
  .coup-actions button,
  .takeover-button,
  .primary-action {
    forced-color-adjust: auto;
  }
}
