:root {
  --bg0: #05060a;
  --bg1: #070816;
  --text: #eef0f6;
  --muted: rgba(238, 240, 246, .72);
  --muted2: rgba(238, 240, 246, .55);

  --accent: #b9a178;
  --accent2: #8dd6ff;

  --page-max: 1000px;
  --radius: 12px;
  --radius-sm: 16px;

  --link-color: rgba(255, 255, 255, 0.86);
  --link-hover: rgba(255, 255, 255, 0.98);
  --link-underline: rgba(255, 255, 255, 0.35);
  --link-focus: rgba(255, 255, 255, 0.28);

  --glass: rgba(18, 20, 28, .45);
  --glass2: rgba(12, 14, 20, .28);
  --stroke: rgba(255, 255, 255, .12);
  --stroke2: rgba(255, 255, 255, .08);
  --shadow: 0 18px 60px rgba(0, 0, 0, .55);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .35);

  --pad: 1rem;
  --gap: 10px;
  --gap-xl: 16px;
  --header-h: 70px;

  --landing-card-w: min(62vw, 600px);
  --landing-card-w-mobile: min(90vw, 560px);
  --landing-card-ar: 1.402;

  --holo-pop: 1.03;
  --word-soft: rgba(255, 255, 255, .95);

  --fs-xs: clamp(0.75rem, 0.73rem + 0.12vw, 0.82rem);
  --fs-sm: clamp(0.85rem, 0.82rem + 0.18vw, 0.95rem);
  --fs-md: clamp(0.95rem, 0.91rem + 0.24vw, 1.05rem);
  --fs-lg: clamp(1.08rem, 1.00rem + 0.45vw, 1.28rem);
  --fs-xl: clamp(1.35rem, 1.18rem + 0.85vw, 1.80rem);
  --fs-2xl: clamp(1.80rem, 1.45rem + 1.60vw, 2.60rem);

  --fs-input: clamp(0.85rem, 0.82rem + 0.18vw, 0.95rem);
  --lh-input: 1.25;

  --lh-tight: 1.08;
  --lh-snug: 1.22;
  --lh-normal: 1.45;
  --lh-relaxed: 1.6;
}


/* Mobile */
@media (max-width: 720px) {
  :root {
    --header-h: 44px;
    /* try 54–58 */
  }
}

/* Small phones */
@media (max-width: 420px) {
  :root {
    --header-h: 52px;
  }
}


.hide {
  display: none !important;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}


html.is-preload body[data-page="landing"] .landing__word,
html.is-preload body[data-page="landing"] .landing__center,
html.is-preload body[data-page="landing"] .landing__cta {
  opacity: 0 !important;
  visibility: hidden !important;
}

@supports (-webkit-touch-callout: none) {

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



body {
  margin: 0;
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);

  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow-x: hidden;

  background-image:
    url("/assets/img/noise.png"),
    radial-gradient(1100px 800px at 18% 22%, rgba(170, 120, 255, .16), transparent 62%),
    radial-gradient(1000px 760px at 82% 18%, rgba(120, 190, 255, .12), transparent 60%),
    radial-gradient(900px 700px at 55% 80%, rgba(255, 170, 150, .08), transparent 62%),
    linear-gradient(180deg, var(--bg1), var(--bg0));

  background-repeat:
    repeat,
    no-repeat,
    no-repeat,
    no-repeat,
    no-repeat;

  background-size:
    260px 260px,
    auto,
    auto,
    auto,
    auto;

  background-attachment:
    fixed,
    fixed,
    fixed,
    fixed,
    fixed;

  /* keep noise subtle */
  background-blend-mode:
    overlay,
    normal,
    normal,
    normal,
    normal;
}

a,
a:visited {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--link-hover);
  text-decoration-color: rgba(255, 255, 255, .65);
}


/* Moving “light fog” layers that drift around the screen */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -25vh -25vw;
  pointer-events: none;
  z-index: -1;
  will-change: transform;
}

/* Layer A: plum/ink lights */
body::before {
  opacity: .9;
  background:
    radial-gradient(900px 700px at 20% 30%, rgba(180, 130, 255, .22), transparent 62%),
    radial-gradient(900px 700px at 75% 25%, rgba(140, 205, 255, .16), transparent 62%),
    radial-gradient(950px 750px at 55% 80%, rgba(255, 170, 150, .10), transparent 65%);
  animation: driftA 36s ease-in-out infinite alternate;
}

/* Layer B: subtle warm lift + a bit of depth */
body::after {
  opacity: .45;
  background:
    radial-gradient(850px 680px at 30% 70%, rgba(255, 200, 150, .08), transparent 64%),
    radial-gradient(820px 650px at 70% 60%, rgba(160, 140, 255, .10), transparent 64%);
  animation: driftB 52s ease-in-out infinite alternate;
}

@keyframes driftA {
  0% {
    transform: translate3d(-6%, -3%, 0) scale(1.02);
  }

  50% {
    transform: translate3d(2%, 4%, 0) scale(1.06);
  }

  100% {
    transform: translate3d(7%, -2%, 0) scale(1.04);
  }
}

@keyframes driftB {
  0% {
    transform: translate3d(5%, 6%, 0) scale(1.02);
  }

  50% {
    transform: translate3d(-4%, -2%, 0) scale(1.07);
  }

  100% {
    transform: translate3d(-8%, 3%, 0) scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {

  body::before,
  body::after {
    animation: none;
  }
}


a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:visited {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--link-focus);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Typography */
h1 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
}

h2 {
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}

h3 {
  font-size: var(--fs-lg);
  line-height: var(--lh-snug);
}

.flow-kicker {
  font-size: var(--fs-xs);
  line-height: var(--lh-snug);
}

.flow-lead {
  font-size: var(--fs-xs);
  line-height: var(--lh-relaxed);
}

.small {
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
}


/* Don’t underline button links */
a.btn {
  text-decoration: none;
}






/* Layout */
.container {
  width: min(var(--page-max), calc(100% - 44px));
  margin-inline: auto;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 44px 0 60px;
}

/* Site header (glass) */
.site-header {
  position: relative;
  top: var(--gap-xl);
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  width: min(var(--page-max), calc(100% - 44px));
  margin: var(--gap-xl) auto 0;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(18, 22, 32, .34);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}

.site-header__inner {
  width: 100%;
  margin: 0;
  padding: 0 var(--gap-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--gap);
  text-decoration: none;
  color: var(--text);
  font-weight: 650;
  letter-spacing: .2px;
}

.brand__logo {
  height: 18px;
  width: auto;
  display: block;
}

.brand__dot {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: radial-gradient(circle at 30% 30%, #fff, rgba(255, 255, 255, .15) 55%, rgba(255, 255, 255, 0) 60%),
    radial-gradient(circle at 40% 40%, rgba(130, 230, 255, .95), rgba(130, 230, 255, .12) 60%, rgba(130, 230, 255, 0) 70%);
  box-shadow: 0 0 24px rgba(140, 210, 255, .22);
}

.site-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-link {
  color: rgba(238, 240, 246, .72);
  text-decoration: none;
  font-size: var(--fs-sm);
  padding: 10px 10px;
  border-radius: var(--radius);
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
}

.site-actions {
  display: flex;
  gap: var(--gap);
  align-items: center;
}

/* Card header actions container (JS fills #cardActions) */
.site-actions #cardActions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--gap);
  flex-wrap: wrap;
}


/* Header buttons should never wrap text */
.site-header .btn,
.card-header .btn {
  white-space: nowrap;
}

/* Panels (canonical)
   Keep legacy aliases during migration:
   - .glass and .card are legacy aliases for the new panel system.
   - .panel is a legacy wrapper used in current HTML.
*/
.panel,
.card,
.panel {
  border-radius: var(--radius);
}

.panel--padded,
.card {
  padding: var(--pad);
}

/* Glass treatment */
.panel--glass,
.glass {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(18, 22, 32, .34);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}


/* Slightly stronger glass */
.panel--glass-strong {
  background: linear-gradient(180deg, rgba(18, 20, 28, .68), rgba(10, 12, 18, .30));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Optional internal panel sections */
.panel__header {
  padding: 14px var(--gap-xl) 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.panel__body {
  padding: var(--gap-xl);
}

.panel__footer {
  padding: 12px var(--gap-xl) var(--gap-xl);
  border-top: 1px solid rgba(255, 255, 255, .10);
}


p.muted.no-m {
  margin: 0;
}

.mt-6 {
  margin-top: 6px;
}

.block {
  display: block;
}

.preview-line .muted {
  position: absolute;
  font-size: var(--fs-xs);
  margin-top: -22px;
}

/* Landing Page */

/* Pure splash screen: no scroll, full viewport */
body[data-page="landing"] {
  overflow: hidden;
}

.landing {
  width: 100%;
  height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr auto;

  row-gap: clamp(8px, 1.6vh, 14px);
  justify-items: center;
  align-items: stretch;
  padding: clamp(10px, 2vh, 18px) 0;
  position: relative;
  isolation: isolate;
}

.landing__logo {
  grid-row: 1;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin-top: 0;
}

.landing__stage {
  grid-row: 2;
  width: min(1200px, 92vw);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-content: center;
  align-items: center;
  column-gap: clamp(1.25rem, 4vw, 4rem);
  row-gap: clamp(1.25rem, 4vh, 3rem);
  padding-block: clamp(0.75rem, 3vh, 2.25rem);
  position: relative;
}

.landing__cta {
  grid-row: 3;
  width: min(520px, 92vw);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 7;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;

  transition: opacity 600ms ease, transform 600ms ease;
}

.landing__ctaBtn {
  width: 100%;
  justify-content: center;
}

/* Words */
.landing__word {
  color: var(--word-soft);
  line-height: var(--lh-snug);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-shadow: 0 18px 44px rgba(0, 0, 0, .40);
  z-index: 5;
  will-change: transform, opacity, filter;
  user-select: none;
  pointer-events: none;
}

.landing__word--unluck {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: end;
  font-size: clamp(3.2rem, 7.6vw, 7.6rem);
  color: rgba(255, 255, 255, .98);
}

.landing__word--the {
  grid-column: 3;
  grid-row: 2;
  justify-self: start;
  align-self: center;
  font-size: clamp(3.0rem, 6.6vw, 6.8rem);
  color: rgba(255, 255, 255, .95);
}

.landing__word--moment {
  grid-column: 2;
  grid-row: 3;
  justify-self: center;
  align-self: start;
  font-size: clamp(3.2rem, 7.2vw, 7.2rem);
  color: rgba(255, 255, 255, .98);
}

/* Card position */
.landing__center {
  grid-column: 2;
  grid-row: 2;
  width: min(var(--landing-card-w),
      92vw,
      max(260px, calc((100svh - 320px) * var(--landing-card-ar))));
  max-width: 820px;
  justify-self: center;
  align-self: center;
  z-index: 3;
  pointer-events: auto;
}

/* Stage wrapper lets GSAP animate without clobbering hover transforms */
.holo-stage {
  width: 100%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}

/* Holo hover effect wrapper */
.holo-card {
  position: relative;
  border-radius: 22px;
  transform-style: preserve-3d;
  transform-origin: center;
  perspective: 1000px;
  will-change: transform, filter;
  transition: transform 220ms ease, filter 220ms ease;
  filter: drop-shadow(0 22px 44px rgba(0, 0, 0, .55));
}

.holo-card__link {
  display: block;
  border-radius: 22px;
  color: inherit;
  text-decoration: none;
  outline: none;

  pointer-events: auto;
}

.holo-card__link:focus-visible {
  box-shadow: 0 0 0 3px rgba(141, 214, 255, .35);
  border-radius: 22px;
}

.holo-card__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  transform: translateZ(0);
  user-select: none;
  -webkit-user-drag: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .06) inset;
}

.holo-card::before,
.holo-card::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease;
  will-change: opacity, background-position, background;
  mix-blend-mode: screen;
}

.holo-card::before {
  background:
    radial-gradient(520px 360px at calc(var(--mx, 50) * 1%) calc(var(--my, 50) * 1%),
      rgba(255, 255, 255, .35),
      rgba(255, 255, 255, .10) 35%,
      rgba(0, 0, 0, 0) 65%),
    linear-gradient(115deg,
      rgba(255, 110, 180, .14),
      rgba(140, 120, 255, .12),
      rgba(90, 230, 255, .10),
      rgba(255, 210, 120, .10));
}

.holo-card::after {
  background-image:
    url("/assets/img/noise.png"),
    radial-gradient(600px 420px at calc(var(--mx, 50) * 1%) calc(var(--my, 50) * 1%),
      rgba(255, 255, 255, .20),
      rgba(0, 0, 0, 0) 60%);
  background-size: 260px 260px, cover;
  background-position:
    calc(var(--mx, 50) * 1%) calc(var(--my, 50) * 1%),
    center;
  opacity: 0;
  mix-blend-mode: overlay;
}

.holo-card.is-hover {
  transform: perspective(950px) rotateX(calc((var(--ry, 0) * -1) * 1deg)) rotateY(calc(var(--rx, 0) * 1deg)) scale(var(--holo-pop, 1.03));
  filter: drop-shadow(0 26px 58px rgba(0, 0, 0, .62));
}

.holo-card.is-hover::before {
  opacity: .85;
}

.holo-card.is-hover::after {
  opacity: .18;
}

/* Mobile layout: center words above/below card and keep "The Moment" inline */
@media (max-width: 820px) {
  .landing {
    padding: clamp(10px, 2vh, var(--gap-xl)) 0;
  }

  .landing__stage {
    width: min(560px, 92vw);
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: clamp(0.9rem, 3.2vh, 1.6rem);
    column-gap: 0;
    padding-block: clamp(0.5rem, 2vh, 1.25rem);
  }

  .landing__center {
    grid-column: 1;
    grid-row: 2;
    width: min(var(--landing-card-w-mobile),
        92vw,
        max(240px, calc((100svh - 360px) * var(--landing-card-ar))));
  }

  .landing__word {
    justify-self: center;
    text-align: center;
    width: 100%;
  }

  .landing__word--unluck {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .landing__word--the {
    display: none;
  }

  .landing__word--moment {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    white-space: nowrap;
  }
}

/* Form */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-grid {
  display: grid;
  gap: var(--gap);
}

label {
  color: rgba(238, 240, 246, .70);
  font-size: var(--fs-xs);
}

.input,
input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea {
  font-size: var(--fs-input);
  line-height: var(--lh-input);
  letter-spacing: 0;
}

/* If this field is used as a read-only “link / status” field */
input[readonly],
input[aria-readonly="true"] {
  font-size: var(--fs-sm);
  opacity: 0.92;
}

/* Prevent long strings from visually taking over */
.input,
input,
textarea {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Optional: make placeholders less loud */
input::placeholder,
textarea::placeholder {
  opacity: 0.55;
}

.input {
  border-radius: var(--radius);
  padding: 14px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--text);
  background: rgba(0, 0, 0, .20);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.input:focus {
  outline: none;
  border: 1px solid rgba(255, 255, 255, .25);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: var(--fs-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap);
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .05);
  color: var(--text);
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  font-family: inherit;
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
}

/* Normalize <a> and <button> rendering so .btn looks identical */
a.btn,
button.btn {
  border-radius: var(--radius);
}

button.btn::-moz-focus-inner {
  border: 0;
  padding: 0;
}


.btn:hover {
  background: rgba(255, 255, 255, .08);
}

.btn.primary {
  border-color: rgba(185, 161, 120, .55);
  background: linear-gradient(180deg, rgba(185, 161, 120, .22), rgba(185, 161, 120, .10));
}

.btn.primary:hover {
  background: linear-gradient(180deg, rgba(185, 161, 120, .30), rgba(185, 161, 120, .12));
}

.btn.ghost {
  border-color: rgba(255, 255, 255, .10);
  background: transparent;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
}

/* Utilities */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap)
}

.row {
  display: flex;
  gap: var(--gap);
  flex-wrap: wrap;
  align-items: center
}

.hr {
  height: 1px;
  background: rgba(255, 255, 255, .08);
  margin: 12px 0;
}

/* Responsive */
@media (max-width: 720px) {
  h1 {
    font-size: 38px
  }

  .site-nav {
    display: none
  }

  .page-main {
    padding: var(--gap-xl) 0 44px
  }

  .container {
    width: min(var(--page-max), calc(100% - 26px))
  }

  /* Header: match panel width + spacing, keep labels on one line */
  .site-header {
    width: min(var(--page-max), calc(100% - 26px));
  top: 4px;
  margin: 4px auto 0;
  }

  .site-header__inner {
    padding: 0 var(--gap);
  }

  .brand__logo {
    height: 10px;
  }

  .preview-line .muted {
  position: relative;
}

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

  .site-header .btn,
  .card-header .btn {
    white-space: nowrap;
    padding: 8px 10px;
    font-size: 12px;
    line-height: var(--lh-snug);
  }

  /* Card screen spacing */
  .card {
    padding: 20px
  }

  .card-header {
    padding: 0.5rem;
  }

  .card-header__meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .card-header .row {
    gap: 8px;
    flex: 0 0 auto;
  }

  .card-screen {
    gap: 0.75rem;
  }
}

@media (max-width: 520px) {
  .choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .token-chip span:first-child {
    display: none;
  }

  .token-chip .mono {
    max-width: 12ch;
  }
}



@media (prefers-reduced-motion: reduce) {

  body::before,
  body::after {
    animation: none
  }
}


/* Sender setup: single glass panel with internal sections */
.flow-panel--combined {
  width: 100%;
  margin-inline: auto;
}

.flow-panel--combined .flow-section+.flow-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .10);
}



/* Brand logo in card header (JS-rendered) */
.card-brand {
  display: flex;
  align-items: center;
  line-height: 0;
}

.card-brand svg {
  height: 12px !important;
  width: auto;
  display: block;
}

.card-brand svg * {
  fill: rgb(255, 255, 255) !important;
}

/* Header layout: logo left, actions right (inside card page) */
.card-header {
  width: 100%;
  margin: 0;
  padding: 28px 34px;

  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);

  background:
    radial-gradient(900px 420px at 18% 0%, rgba(124, 92, 255, .18) 0%, rgba(0, 0, 0, 0) 60%),
    radial-gradient(900px 420px at 92% 10%, rgba(44, 255, 148, .10) 0%, rgba(0, 0, 0, 0) 55%),
    rgba(0, 0, 0, .12);

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gap);
}

/* Title is inside the card content, so hide header title if present */
.card-header .card-heading {
  display: none;
}

/* Token pill removed from UI */
.card-header .token-chi .card-header__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  margin: 0;
}

/* Buttons group (uses .row utility) */
.card-header .row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--gap);
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

/* Frame: layout only (no background painting) */
.card-screen {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  /* controls header-to-card spacing */
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

/* Title (rendered inside the card content) */
.card-heading {
  font-size: clamp(22px, 3.6vw, 60px);
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 18px;
}

/* Main 2-column layout (legend + scratch grid) */
.card-screen__body {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 50px;
}

/* Title SVG helper */
.card-heading__art {
  width: 100%;
  display: block;
}

.card-heading__art svg {
  width: 100%;
  height: auto;
  display: block;
}

.preview-inline {
  font-size: 12px;
  opacity: 0.8;
  margin: 0 0 10px 0;
}


/* ---------------------------------------------------------------
   Scratch-view legend panel (left side of /card scratch view)
---------------------------------------------------------------- */
.card-screen__body .card-legend {
  display: flex;
  flex-direction: column;
  border: 2px solid rgba(202, 163, 106, .35);
  border-radius: 16px;
  background: #1c1e1e;
  padding: 12px;
}

.card-screen__body .card-legend h2 {
  margin: 0;
  font-size: clamp(15px, 3vw, 28px);
  letter-spacing: 0;
  text-transform: uppercase;
}

.rule-text {
  color: var(--text);
  font-size: var(--fs-xs);
  margin: 0 0 6px;
}

/* Prize list */
.prize-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  gap: var(--gap);
}

.prize-row {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 10px 10px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .02);
}

.prize-row.is-winner {
  background: rgba(0, 0, 0, 0.285);
  box-shadow:
    inset 0 0 0 1px rgba(202, 163, 106, .35),
    0 0 0 1px rgba(255, 255, 255, .06);
}

.prize-row__left {
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-width: 0;
}

.prize-row__icon {
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

.prize-row__icon svg {
  display: block;
  width: 80%;
  height: 80%;
  max-width: 90%;
  max-height: 90%;
}

.prize-row__label {
  font-size: var(--fs-lg);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prize-row__value {
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
}

/* Winner bar inside scratch view */
#winBar {
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 14px;
}

/* Actions row under the scratch board (if present) */
.card-actionsbar,
.card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
  flex-wrap: wrap;
}

.card-actionsbar .btn,
.card-actions .btn {
  border-radius: var(--radius);
}

/* Setup view link box */
.linkbox {
  width: 100%;
  max-width: 700px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .02);
  border-radius: 16px;
  padding: 12px;
}

.linkbox .url {
  word-break: break-all;
  color: var(--text);
  margin: 0 0 10px;
}

/* Rotate overlay (only shown when body has force-landscape) */
.rotate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;

  background: rgba(0, 0, 0, .86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.rotate-overlay__card {
  width: min(420px, 100%);
  border-radius: var(--radius);
  padding: 18px 16px;

  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(20, 20, 20, .85);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .55);
  text-align: center;
}

.rotate-overlay__title {
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.rotate-overlay__text {
  opacity: .9;
  font-size: var(--fs-sm);
  line-height: 1.35;
}

@media (orientation: portrait) {
  body.force-landscape .rotate-overlay {
    display: flex;
  }
}

@media (orientation: landscape) {
  .rotate-overlay {
    display: none !important;
  }
}

/* Responsive: stack legend + board in portrait */
@media (max-width: 860px) and (orientation: portrait) {
  .card-screen__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }

  .card-screen__body .scratch-board {
    order: 1;
  }

  .card-screen__body .card-legend {
    order: 2;
  }

  .card-screen__body .card-legend {
    padding: 10px;
  }

  .prize-list {
    gap: 8px;
  }

  .prize-row {
    padding: 4px 6px;
  }
}





/* Landscape tighten for short viewports */
@media (orientation: landscape) and (max-height: 500px) {
  .container,
  .app-stage,
  .card-screen,
  .card-header,

  .card-screen {
    gap: 1rem;
  }

  .card-header {
    padding: 10px 12px 8px;
    gap: var(--gap);
  }

  .card-header__meta {
    gap: var(--gap);
  }

  .card-header__meta .row {
    gap: var(--gap);
  }
}


/* Internal divider used inside the single sender glass panel */
.flow-divider {
  height: 1px;
  background: rgba(255, 255, 255, .10);
  margin: 16px 0;
}

/* ---------------------------------------------------------------
   Sender setup UI (creator mode)
---------------------------------------------------------------- */
.flow-screen {
  max-width: var(--page-max);
  margin: 0 auto;
}

.flow-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}

.flow-kicker {
  font-size: var(--fs-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: calc(var(--gap-xl) * 2);
}

.flow-title {
  margin: 0 0 10px 0;
  line-height: 1.05;
}

.flow-lead {
  margin: 0 0 10px 0;
}

.flow-sub {
  margin: 0;
}

/* Setup panels (glass) - scoped so scratch-view legend panel stays unchanged */
.flow-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: 12px;
}

.flow-panel__title {
  font-weight: 650;
  letter-spacing: 0.01em;
}

/* Prize choice buttons */
.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}



.choice-grid .btn {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.choice-grid .btn:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .22);
}

.choice-grid .btn:active {
  transform: translateY(1px);
}

.choice-grid .btn[disabled] {
  cursor: not-allowed;
  opacity: 0.45;
}

/* Share bar */
.sharebar {
  display: grid;
  gap: var(--gap);
}

.sharebar__url {
  border-radius: var(--radius);
  padding: 14px 14px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .20);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sharebar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}

.sharebar__actions .btn {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.sharebar__actions .btn:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .22);
}

.sharebar__lock {
  display: flex;
  align-items: center;
  gap: var(--gap);
}

.sharebar__lock .btn {
  padding: 10px 14px;
  border-radius: var(--radius);
}

.flow-tip {
  margin-top: 10px;
}

/* FAQ */
[data-page="faq"] .flow-header__inner {
  width: 100%;
  max-width: var(--flow-screen-w, 980px);
  margin: 0 auto;
}

/* One glass box, with dividers inside */
[data-page="faq"] .faq-box {
  margin-top: var(--gap-xl);
  padding: 6px;
}

[data-page="faq"] .faq-item {
  overflow: hidden;
}

[data-page="faq"] .faq-item+.faq-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-page="faq"] .faq-item>summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 14px;
  font-weight: 600;
  position: relative;
}

[data-page="faq"] .faq-item>summary::-webkit-details-marker {
  display: none;
}

[data-page="faq"] .faq-item>summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: 0.8;
  background: rgba(255, 255, 255, 0.85);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.7 9.3a1 1 0 0 1 1.4 0L12 13.2l3.9-3.9a1 1 0 1 1 1.4 1.4l-4.6 4.6a1 1 0 0 1-1.4 0L6.7 10.7a1 1 0 0 1 0-1.4z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M6.7 9.3a1 1 0 0 1 1.4 0L12 13.2l3.9-3.9a1 1 0 1 1 1.4 1.4l-4.6 4.6a1 1 0 0 1-1.4 0L6.7 10.7a1 1 0 0 1 0-1.4z'/></svg>") center / contain no-repeat;
  transition: transform 160ms ease;
}

[data-page="faq"] .faq-item[open]>summary::after {
  transform: translateY(-50%) rotate(180deg);
}

[data-page="faq"] .faq-answer {
  padding: 0 14px 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

[data-page="faq"] .faq-footer {
  margin-top: 14px;
}

@media (max-width: 720px) {
  [data-page="faq"] .faq-item>summary {
    padding: 14px 40px 14px 14px;
  }
  
  .preview-inline {
    margin-bottom: 8px;
  }

  .prize-row__icon {
  width: 2.6rem;
  height: 2.6rem;
}


}
