/* Control, type fallback, and layout assumptions: Design/IMPLEMENTATION.md. */
:root {
  --se-black: #1b1b1b;
  --se-gold: #c5a066;
  --se-red: #d41f3a;
  --se-taupe: #c8b89c;
  --se-black-deep: #0a0a0a;
  --se-black-raised: #111111;
  --se-white: #ffffff;
  --se-offwhite: #f4f1ea;
  --se-text-body: #e8e4dc;
  --se-gold-dim: rgb(197 160 102 / 28%);
  --se-font:
    "Codec Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --se-radius-card: 8px;
  color-scheme: dark;
  font-family: var(--se-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--se-text-body);
  background: var(--se-black);
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
dialog {
  width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 24px;
  color: var(--se-text-body);
  background: var(--se-black-raised);
  border: 1px solid var(--se-gold);
  border-radius: var(--se-radius-card);
  overflow-wrap: anywhere;
}
dialog::backdrop {
  background: rgb(0 0 0 / 75%);
}
dialog form {
  margin-bottom: 0;
}
a {
  color: var(--se-white);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--se-gold);
}
header,
footer {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  align-items: center;
}
header {
  /* Trimmed vertically so the 44px brand target does not make the bar taller. */
  padding-block: 16px;
  border-bottom: 1px solid var(--se-gold-dim);
}
.brand {
  color: var(--se-white);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 800;
  text-decoration: none;
}
header span,
.eyebrow {
  color: var(--se-gold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 600;
}
main {
  max-width: 1000px;
  /* svh is the height the visitor can actually see. vh resolves against the
     largest viewport, so on a phone it reserves space behind the collapsed
     URL bar and short pages gain a scrollbar with nothing in it. */
  min-height: 72vh;
  min-height: 72svh;
  margin: auto;
  padding: 48px 24px;
  overflow-wrap: anywhere;
}
h1,
h2 {
  color: var(--se-white);
  font-weight: 800;
  text-wrap: balance;
}
h1 {
  font-size: clamp(36px, 7vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 16px 0 24px;
}
h2 {
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
p {
  line-height: 1.6;
  max-width: 60ch;
  margin: 12px 0;
  /* Headings already balance. Paragraphs get pretty so six languages of
     translated copy stop leaving a single word on the last line. */
  text-wrap: pretty;
}
.intro {
  margin-bottom: 32px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.card,
.dashboard-card,
.stats > section {
  min-width: 0;
  padding: 24px;
  background: var(--se-black-raised);
  border: 1px solid var(--se-gold-dim);
  border-radius: var(--se-radius-card);
}
.card {
  color: var(--se-text-body);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: start;
}
.card .eyebrow {
  margin-bottom: 16px;
}
.card p {
  flex: 1;
  margin-top: 0;
}
.card > span:last-child {
  margin-top: 16px;
  color: var(--se-white);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.card.primary {
  /* The creator path is the recommended one, so it gets the full-strength gold
     hairline while the buyer card keeps the 28% decorative rule. At 320 and
     390 the two cards stack, and this is what tells them apart. */
  border-color: var(--se-gold);
}
.card:hover {
  color: var(--se-text-body);
  border-color: var(--se-gold);
}
.card:hover > span:last-child {
  color: var(--se-gold);
}
.form-panel {
  max-width: 560px;
  margin: auto;
}
.form-panel h1,
.dashboard h1,
.token-page h1 {
  font-size: clamp(36px, 5vw, 56px);
}
form {
  display: grid;
  gap: 8px;
  margin: 24px 0;
}
form > label {
  color: var(--se-white);
  font-weight: 600;
}
form > label:not(:first-child) {
  margin-top: 4px;
}
input,
select,
button {
  min-width: 0;
  min-height: 48px;
  width: 100%;
  padding: 12px;
  font: inherit;
  color: var(--se-white);
  border: 1px solid var(--se-taupe);
  border-radius: var(--se-radius-card);
}
input,
select {
  background: var(--se-black-deep);
}
input::placeholder {
  color: var(--se-text-body);
  opacity: 1;
}
button {
  background: var(--se-black);
  /* The primary action carries a heavier gold rule and a white bold label.
     Weighting the rule rather than filling the button keeps the brand rule
     that gold is metal, not a background fill. */
  border: 2px solid var(--se-gold);
  cursor: pointer;
  font-weight: 600;
  overflow-wrap: anywhere;
}
button:hover:not(:disabled) {
  background: var(--se-black-deep);
  color: var(--se-gold);
}
button:active:not(:disabled) {
  border-color: var(--se-white);
}
button.secondary {
  background: transparent;
  /* Quieter than the primary on every axis that still clears contrast:
     1px taupe rule (8.85:1) and body-weight body-colour label (13.58:1). */
  color: var(--se-text-body);
  border: 1px solid var(--se-taupe);
  font-weight: 400;
}
button:disabled,
input:disabled,
select:disabled {
  color: var(--se-text-body);
  background: var(--se-black-raised);
  border-color: var(--se-gold-dim);
  border-style: dashed;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid var(--se-white);
  outline-offset: 4px;
}
[role="alert"] {
  max-width: none;
  padding: 12px 16px;
  color: var(--se-white);
  background: var(--se-red);
  border: 1px solid var(--se-white);
  border-radius: var(--se-radius-card);
}
[role="alert"] a,
[role="alert"] a:hover {
  color: var(--se-white);
}
input[aria-invalid="true"],
select[aria-invalid="true"] {
  color: var(--se-white);
  background: var(--se-red);
  border: 2px solid var(--se-white);
}
input:user-invalid,
select:user-invalid {
  color: var(--se-white);
  background: var(--se-red);
  border: 2px solid var(--se-white);
}
[role="status"]:empty {
  margin: 0;
}
dt {
  font-size: 14px;
  color: var(--se-text-body);
}
dd {
  margin: 4px 0 16px;
  color: var(--se-white);
  overflow-wrap: anywhere;
}
.dashboard-card {
  margin-bottom: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.stat-value {
  color: var(--se-white);
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.25;
}
.referral-url {
  overflow-wrap: anywhere;
}
.referred-list {
  padding: 0;
  list-style: none;
}
.referred-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--se-gold-dim);
}
.referred-list time {
  font-size: 14px;
}
.referred-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.dashboard {
  overflow-wrap: anywhere;
}
.dashboard nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.dashboard nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
/* Standalone action links need a thumb-sized target. Links inside a sentence
   are deliberately excluded: padding those would break the text block. */
.form-panel > a,
.dashboard > a,
.dashboard-card > a,
.qr-card > p > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
}
.token-page .qr-card > p > a {
  margin-inline: auto;
}
.referred-list li a,
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.badge {
  display: inline-block;
  color: var(--se-white);
  border: 1px solid var(--se-taupe);
  border-radius: 2px;
  padding: 4px 8px;
  font-size: 14px;
}
.token-page {
  max-width: 620px;
  margin: auto;
  text-align: center;
  overflow-wrap: anywhere;
}
.token-page p {
  margin-left: auto;
  margin-right: auto;
}
.qr-image {
  display: block;
  width: min(100%, 420px);
  height: auto;
  margin-block: 16px;
  background: var(--se-white);
}
.token-page .qr-image {
  margin-inline: auto;
}
.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.qr-actions button {
  flex: 1 1 140px;
  width: auto;
}
.token-page .qr-actions {
  justify-content: center;
}
.qr-link-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.qr-link-actions p {
  flex: 1 1 220px;
  overflow-wrap: anywhere;
}
.qr-link-actions button,
.qr-album > button {
  width: auto;
  max-width: 100%;
  font-size: 14px;
}
.qr-guide-dialog {
  width: min(560px, calc(100% - 32px));
}
.qr-phone-picker > summary {
  min-height: 48px;
  padding-block: 12px;
  cursor: pointer;
}
.qr-album {
  padding-top: 16px;
}
.qr-guide-fallback {
  margin-block: 16px;
}
.qr-guide-fallback > summary {
  min-height: 48px;
  padding: 12px;
  color: var(--se-white);
  border: 1px solid var(--se-gold);
  border-radius: var(--se-radius-card);
  font-weight: 600;
  cursor: pointer;
}
.qr-guide-content,
.qr-guide-dialog {
  text-align: left;
}
.qr-guide-content section {
  margin-top: 24px;
  border-top: 1px solid var(--se-gold-dim);
}
.qr-guide-content h3 {
  color: var(--se-gold);
}
.qr-guide-content h4 {
  margin-bottom: 8px;
}
.qr-guide-content ol {
  padding-left: 24px;
}
.qr-guide-content li + li {
  margin-top: 12px;
}
.qr-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.qr-platforms button {
  flex: 1 1 100px;
}
/* These groups are toggles, not primary actions. They used to read as
   "1px gold vs 2px gold"; now that every button carries a 2px gold rule they
   need their own quiet default so the pressed one still stands out. */
.qr-platforms button {
  color: var(--se-text-body);
  border: 1px solid var(--se-taupe);
  font-weight: 400;
}
.qr-platforms [aria-pressed="true"] {
  color: var(--se-white);
  background: var(--se-black-deep);
  border: 2px solid var(--se-gold);
  font-weight: 600;
}
.qr-guide-url {
  overflow-wrap: anywhere;
}
.qr-guide-note {
  padding-left: 12px;
  border-left: 2px solid var(--se-gold);
}
footer {
  font-size: 14px;
  border-top: 1px solid var(--se-gold-dim);
}
footer > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
footer > [data-privacy-open] {
  color: #494641;
  text-decoration: none;
}
footer > [data-privacy-open]:hover,
footer > [data-privacy-open]:focus-visible {
  color: var(--se-text-body);
}
footer > span {
  flex: 1;
  text-align: center;
}
.footer-language {
  position: relative;
  margin-left: auto;
}
.footer-language > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--se-text-body);
  cursor: pointer;
  list-style: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-language > summary::-webkit-details-marker {
  display: none;
}
.footer-language > summary:hover {
  color: var(--se-gold);
}
.footer-language > form {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: calc(100% + 8px);
  width: 180px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 96px);
  overflow: auto;
  margin: 0;
  padding: 8px;
  gap: 0;
  background: var(--se-black-raised);
  border: 1px solid var(--se-gold-dim);
  border-radius: var(--se-radius-card);
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
}
.footer-language button {
  display: flex;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  color: var(--se-text-body);
  background: transparent;
  font-size: inherit;
  font-weight: 400;
  text-align: left;
}
.footer-language button:hover:not(:disabled),
.footer-language button:focus-visible {
  color: var(--se-white);
  background: var(--se-black);
}
.footer-language button[aria-current="true"] {
  color: var(--se-gold);
}
.footer-language button[aria-current="true"]::after {
  content: "✓";
}
@media (max-width: 600px) {
  header,
  footer {
    padding: 20px 16px;
  }
  header {
    padding-block: 12px;
  }
  main {
    padding: 32px 16px;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .card,
  .dashboard-card,
  .stats > section {
    padding: 16px;
  }
  footer > span {
    order: 3;
    flex-basis: 100%;
  }
}
@media (forced-colors: active) {
  :focus-visible {
    outline-color: Highlight;
  }
  .card,
  .dashboard-card,
  .stats > section {
    border-color: CanvasText;
  }
  .qr-image {
    forced-color-adjust: none;
    background: #ffffff;
  }
}
[hidden] {
  display: none !important;
}
.request-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--se-gold-dim);
}
.request-card form {
  flex: 1 1 140px;
  margin: 0 0 16px;
}
.request-card button {
  width: 100%;
}
/* Motion is opt-in: every rule below sits inside no-preference, so a
   reduced-motion visitor, or a browser without the query, keeps the static
   rendering. Only opacity, transform and colour animate; the QR is never
   touched, so it stays still and scannable. */
@media (prefers-reduced-motion: no-preference) {
  a,
  button,
  summary,
  input,
  select {
    transition:
      color 140ms ease-out,
      background-color 140ms ease-out,
      border-color 140ms ease-out,
      outline-color 140ms ease-out;
  }
  .card {
    transition:
      color 160ms ease-out,
      background-color 160ms ease-out,
      border-color 160ms ease-out,
      transform 160ms ease-out;
  }
  .card:hover {
    transform: translateY(-2px);
  }
  button:active:not(:disabled),
  .card:active {
    transform: translateY(1px);
    transition-duration: 60ms;
  }
  /* One short settle as a page renders, so navigation reads as movement
     between views rather than a hard cut. Transform and opacity only.
     This is deliberately NOT on main: a QR has to stay still and scannable,
     and animation:none on the image cannot cancel an ancestor's transform or
     opacity. The three wrappers named here never contain a QR, so the
     dashboard and the My QR Code page get no entrance motion at all. */
  main > .intro,
  main > .cards,
  main > .form-panel {
    animation: se-rise 260ms ease-out both;
  }
  /* Belt and braces if a QR ever lands inside one of those wrappers. */
  main > :has(.qr-card) {
    animation: none;
  }
  [role="alert"] {
    animation: se-rise 200ms ease-out both;
  }
  dialog[open] {
    animation: se-rise 180ms ease-out both;
  }
  dialog[open]::backdrop {
    animation: se-fade 180ms ease-out both;
  }
  @keyframes se-rise {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
  }
  @keyframes se-fade {
    from {
      opacity: 0;
    }
  }
}

.private-detail + .private-detail {
  border-top: 1px solid var(--se-gold-dim);
  margin-top: 24px;
  padding-top: 16px;
}
.private-summary {
  overflow-wrap: anywhere;
}
.private-detail h3 .badge {
  font-size: 12px;
}

.private-detail .qr-actions > a,
[data-detail-cancel] {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  width: fit-content;
  max-width: 100%;
}

/* Account navigation and first-screen dimensions are implementation assumptions. */
.account-page header form {
  margin: 0;
}
.account-page header {
  gap: 8px 16px;
}
.account-page main {
  padding-top: 24px;
}
.account-page {
  padding-bottom: calc(
    var(--account-nav-height, 8rem + env(safe-area-inset-bottom, 0px)) + 16px
  );
}
.account-nav {
  position: fixed;
  z-index: 2;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--se-gold);
  background: var(--se-black-raised);
}
.account-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  max-width: 240px;
  min-height: 48px;
  padding: 8px;
  border: 1px solid var(--se-taupe);
  border-radius: var(--se-radius-card);
  text-align: center;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.account-nav:lang(de) a {
  flex-basis: auto;
  overflow-wrap: normal;
  hyphens: auto;
}
.account-page [id] {
  scroll-margin-top: 16px;
}
.account-page :is(a, button, input, select) {
  scroll-margin-bottom: calc(
    var(--account-nav-height, 8rem + env(safe-area-inset-bottom, 0px)) + 16px
  );
}
.account-qr {
  text-align: center;
}
.account-qr h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin: 0 0 12px;
}
.account-qr .qr-image {
  width: 256px;
  min-width: 240px;
  margin: 0 auto;
}
.account-qr .qr-card > .qr-actions {
  max-width: 560px;
  margin: 12px auto 8px;
}
.account-qr .qr-card > .qr-actions button {
  flex-basis: 240px;
}
.account-qr .qr-link-actions {
  justify-content: center;
}
.account-qr .qr-card > p {
  margin: 8px auto 0;
}
.account-qr .qr-card > p > a {
  margin-inline: auto;
}
.dashboard > section + section {
  margin-top: 24px;
}
.dashboard nav a,
.dashboard-card > a,
[data-detail-open] {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  max-width: 100%;
}
@media (max-width: 600px) {
  .account-page main {
    padding-top: 16px;
  }
  .account-qr {
    padding: 12px;
  }
  .account-qr .qr-card > .qr-actions {
    gap: 8px;
  }
}

/* Guided onboarding: supplied full logo; sparse prototype layout. Underlines,
   160ms question fades and these dimensions are implementation assumptions. */
@view-transition {
  navigation: auto;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.guided-page main {
  width: min(100%, 1020px);
  max-width: none;
  min-height: calc(100svh - 112px);
  padding: max(54px, calc(50svh - 286px)) 32px 56px;
}
.guided-experience {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.guided-logo {
  width: 138px;
  flex: none;
  view-transition-name: guided-logo;
}
.guided-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.guided-landing .guided-logo {
  width: 207px;
}
.guided-page main:has(.guided-signup) {
  --guided-top: max(32px, env(safe-area-inset-top, 0px));
  padding-top: var(--guided-top);
  padding-bottom: 0;
}
.guided-signup {
  min-height: calc(100svh - 112px - var(--guided-top));
}
.guided-signup .guided-logo {
  width: min(448px, 100%);
}
.guided-signup .guided-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0;
  padding-block: 32px;
}
.guided-signup .guided-stage:has(.cf-turnstile) {
  padding-block: 180px;
}
.guided-signup .guided-form:has(.cf-turnstile) {
  position: relative;
}
.guided-signup .guided-form .cf-turnstile {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}
.guided-stage {
  width: 100%;
  max-width: 850px;
  margin-top: 34px;
  min-height: 310px;
  text-align: center;
  view-transition-name: guided-question;
  animation: guided-in 160ms ease;
}
.guided-stage h1 {
  font-size: clamp(32px, 4.8vw, 60px);
  line-height: 1.12;
  margin: 0;
}
.guided-stage h1:focus {
  outline: none;
}
.guided-stage .guided-compact {
  font-size: clamp(29px, 3.7vw, 46px);
}
.guided-stage .guided-intro {
  font-size: clamp(23px, 3.6vw, 42px);
  line-height: 1.3;
}
.guided-intro span {
  display: block;
}
.guided-intro span:first-child {
  color: var(--se-text-body);
  letter-spacing: normal;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 18px;
}
.guided-stage p {
  margin: 16px auto;
}
.guided-note {
  font-size: 14px;
  color: var(--se-text-body);
}
.guided-login {
  position: absolute;
  top: max(16px, env(safe-area-inset-top, 0px));
  right: max(24px, env(safe-area-inset-right, 0px));
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 14px;
}
.guided-choices,
.guided-actions {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  margin: 32px auto 0;
}
.guided-waitlist {
  margin: 32px auto 0;
  color: var(--se-red);
  font-size: 20px;
  line-height: 1.4;
}
.guided-waitlist + .guided-choices {
  margin-top: 12px;
}
.guided-signup .guided-actions {
  width: min(100%, 510px);
  flex-wrap: nowrap;
  gap: 24px;
  margin-top: 16px;
}
.guided-signup .guided-actions > :is(a, button) {
  width: auto;
  flex: 0 1 auto;
}
.guided-choices a {
  font-size: 20px;
  text-decoration: none;
  border-bottom: 1px solid var(--se-gold);
}
.guided-form {
  width: min(100%, 510px);
  margin: 30px auto 0;
}
.guided-form input:not([type="hidden"]) {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--se-gold);
  border-radius: 0;
  font-size: clamp(22px, 3vw, 32px);
  text-align: center;
  padding: 12px 4px;
  width: 100%;
}
.guided-form .cf-turnstile {
  margin: 20px auto;
  width: 150px;
}
.guided-stage button,
.guided-actions a {
  background: transparent;
  color: var(--se-white);
  border: 0;
  padding: 10px 8px;
  font-size: 14px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.guided-stage button:hover {
  color: var(--se-gold);
}
.guided-handle {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--se-gold);
  font-size: clamp(22px, 3vw, 32px);
}
.guided-handle span {
  padding-left: 10px;
  color: var(--se-gold);
}
.guided-handle input:not([type="hidden"]) {
  min-width: 0;
  border: 0;
  text-align: left;
}
.guided-error,
.guided-stage [role="alert"] {
  font-size: 14px;
  padding: 10px 14px;
  background: var(--se-black-raised);
  border-left: 2px solid var(--se-gold);
  text-align: left;
}
.guided-page > footer {
  font-size: 13px;
  padding-block: 16px;
}
.guided-page > footer > span {
  display: none;
}
@keyframes guided-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
::view-transition-old(root),
::view-transition-new(root),
::view-transition-old(guided-logo),
::view-transition-new(guided-logo) {
  animation: none;
}
::view-transition-group(guided-logo) {
  animation-duration: 0s;
}
/* Dashboard form navigation has no page transition to animate. */
html:has(.founder-profile)::view-transition-group(root) {
  animation: none;
}
::view-transition-old(guided-question),
::view-transition-new(guided-question) {
  animation-duration: 160ms;
}
@media (max-width: 600px) {
  .guided-page main {
    padding: max(50px, calc(50svh - 266px)) 24px 32px;
  }
  .guided-logo {
    width: 116px;
  }
  .guided-landing .guided-logo {
    width: 174px;
  }
  .guided-stage {
    margin-top: 30px;
  }
  .guided-choices {
    gap: 42px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .guided-stage,
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none;
  }
}

/* Compact Creator dashboard, following the 9.15 user notes. */
.creator-page,
.buyer-page {
  padding-bottom: 0;
}
.creator-page > header,
.buyer-page > header {
  padding-top: 32px;
  border-bottom: 0;
}
.dashboard-logo {
  width: min(448px, 70%);
}
.dashboard-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.creator-page :is(a, button, input, select),
.buyer-page :is(a, button, input, select) {
  scroll-margin-bottom: 16px;
}
.creator-page main {
  max-width: 760px;
  min-height: calc(100svh - 230px);
  padding: 36px 24px;
}
.account-handle,
.compact-actions button,
.creator-dashboard .qr-actions button {
  width: auto;
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--se-text-body);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.account-handle {
  max-width: 100%;
  overflow-wrap: anywhere;
  margin-left: auto;
}
.account-handle:hover:not(:disabled),
.compact-actions button:hover:not(:disabled),
.creator-dashboard .qr-actions button:hover:not(:disabled) {
  background: transparent;
  color: var(--se-gold);
}
.creator-dashboard .account-qr .qr-image {
  width: min(100%, 300px);
  min-width: 0;
  background: transparent;
}
.qr-expand {
  display: block;
  width: min(100%, 300px);
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.qr-expand:hover:not(:disabled) {
  background: transparent;
}
.qr-expand:focus-visible {
  outline-color: #d41f3a;
}
@property --qr-outline-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.qr-outline {
  position: relative;
  isolation: isolate;
  border-radius: 16px;
}
.qr-outline::before,
.qr-outline::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: #d41f3a;
  pointer-events: none;
  z-index: -1;
}
.qr-outline::before {
  filter: blur(8px);
  opacity: 0.7;
}
.qr-outline::after {
  padding: 2px;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.qr-expand:disabled::before,
.qr-expand:disabled::after {
  content: none;
}
@media (prefers-reduced-motion: no-preference) {
  .qr-outline::before,
  .qr-outline::after {
    background: conic-gradient(
      from var(--qr-outline-angle, 0deg),
      transparent,
      #d41f3a 55deg,
      #ff667d 75deg,
      #d41f3a 95deg,
      transparent 135deg
    );
    animation: qr-outline-turn 4s linear infinite;
  }
}
@keyframes qr-outline-turn {
  to {
    --qr-outline-angle: 1turn;
  }
}
.qr-lightbox {
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  margin: 0;
  padding: 48px 16px 24px;
  border: 0;
  background: var(--se-black);
  overscroll-behavior: contain;
  cursor: zoom-out;
}
.qr-lightbox[open] {
  display: grid;
  place-items: center;
}
.qr-enlarged {
  width: fit-content;
  max-width: 100%;
  border-radius: 24px;
}
.qr-lightbox img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100svh - 72px);
  object-fit: contain;
}
.creator-dashboard .qr-card > .qr-actions {
  justify-content: center;
  gap: 20px;
  margin-top: 8px;
}
.creator-dashboard .qr-card > .qr-actions button {
  flex: 0 1 auto;
}
.creator-dashboard .referral-url {
  font-size: 13px;
}
.home-screen-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 16px;
  border: 1px solid var(--se-gold);
  border-radius: 8px;
  color: var(--se-text-body);
  font-size: 15px;
  text-align: center;
  text-decoration: none;
}
.home-screen-button:hover {
  color: var(--se-gold);
}
.creator-dashboard .global-rank {
  margin: 20px auto 0;
  color: var(--se-gold);
  font-size: 20px;
}
.creator-dashboard > #referrals {
  margin-top: 32px;
  text-align: center;
}
.creator-dashboard #referrals h2 {
  font-size: 24px;
}
.creator-dashboard #referrals p {
  margin-inline: auto;
}
.creator-dashboard .referred-list {
  margin: 0 auto;
  max-width: 420px;
}
.creator-dashboard .referred-list li {
  display: block;
  padding: 8px;
}
.creator-dashboard .referred-list li:last-child {
  border-bottom: 0;
}
.detail-popups,
.compact-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.detail-popups {
  border-top: 1px solid var(--se-gold-dim);
  padding-top: 16px;
}
/* One tiara on velvet at rest; only the next tier appears in its disclosure. */
.founder-profile {
  margin: 24px auto 0;
  max-width: 440px;
}
.founder-badges {
  position: relative;
  display: flex;
  justify-content: center;
}
.founder-badge {
  width: 200px;
  margin: 0;
  padding: 0;
  border: 0;
}
.founder-current,
.founder-next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--se-gold);
  text-align: center;
}
summary.founder-current {
  padding: 0 0 14px;
  cursor: pointer;
  list-style: none;
}
summary.founder-current::-webkit-details-marker {
  display: none;
}
.founder-current:focus-visible {
  outline: 2px solid var(--se-white);
  outline-offset: 5px;
  border-radius: 16px;
}
.founder-art {
  position: relative;
  display: block;
  width: 200px;
  aspect-ratio: 1;
  border-radius: 14px;
  background: url("/founder-velvet.webp") center / cover no-repeat;
}
.founder-crown {
  display: block;
  position: absolute;
  width: 84%;
  height: 84%;
  top: 10%;
  left: 8%;
  overflow: visible;
}
.founder-crown-mask {
  mask-type: alpha;
}
.founder-shine {
  transform: translateX(-100%);
}
.founder-tier-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.04em;
}
.founder-hint {
  position: absolute;
  z-index: 4;
  inset-inline: 0;
  top: calc(100% - 8px);
  width: min(100%, 272px);
  margin-inline: auto;
  padding: 16px 20px 20px;
  border: 1px solid var(--se-gold-dim);
  border-radius: 16px;
  background: var(--se-black-deep);
  color: var(--se-text-body);
  box-shadow: 0 12px 32px rgb(0 0 0 / 45%);
  text-align: center;
  font-size: 14px;
}
.founder-next {
  color: #aaa7a2;
}
.founder-next .founder-art {
  width: 152px;
}
.founder-next .founder-crown {
  filter: grayscale(1) brightness(0.68);
}
.founder-hint p {
  margin: 14px 0 0;
  line-height: 1.5;
}
.founder-profile .detail-popups {
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 0;
}
.detail-popups > .detail-button {
  display: inline-flex;
  width: min(100%, 300px);
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--se-offwhite);
  border-radius: 8px;
  background: var(--se-offwhite);
  color: var(--se-black);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}
.detail-popups > .detail-button:hover {
  background: var(--se-white);
  border-color: var(--se-gold);
}
.profile-completion {
  margin: 0;
  color: var(--se-taupe);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .founder-shine {
    animation: founder-shine 7s ease-in-out infinite;
  }
  .founder-hint {
    animation: founder-outline 4s ease-in-out infinite;
  }
}
@keyframes founder-shine {
  0%,
  25% {
    transform: translateX(-100%);
  }
  65%,
  100% {
    transform: translateX(100%);
  }
}
@keyframes founder-outline {
  0%,
  100% {
    border-color: rgb(197 160 102 / 28%);
  }
  50% {
    border-color: rgb(197 160 102 / 58%);
  }
}
.compact-dialog {
  width: min(480px, calc(100% - 32px));
  padding: 24px;
}
/* Server-open editors stay in the dashboard flow without JavaScript. */
[data-detail-dialog][open]:not(:modal) {
  position: static;
  flex-basis: 100%;
  max-height: none;
  margin: 16px auto;
  animation: none;
}
.compact-dialog h2 {
  font-size: 24px;
  margin-right: 28px;
}
.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  color: var(--se-taupe);
  background: transparent;
  font-size: 24px;
}
.compact-details-form {
  margin: 16px 0 0;
  gap: 4px;
}
.private-social-icon {
  display: block;
  width: 16px;
  height: 16px;
  margin-top: 12px;
  color: var(--se-offwhite);
}
.compact-details-form > label {
  margin-top: 8px;
  font-size: 13px;
}
.compact-details-form input:not([type="hidden"]),
.compact-details-form select {
  min-height: 40px;
  padding: 6px 8px;
  border: 0;
  border-bottom: 1px solid var(--se-gold-dim);
  border-radius: 0;
  background: transparent;
  font-size: 15px;
}
/* Native menus may ignore a transparent select's dark page background. */
.compact-details-form select {
  color-scheme: light;
  color: var(--se-black);
  background-color: var(--se-offwhite);
}
.compact-details-form select option {
  color: var(--se-black);
  background-color: var(--se-offwhite);
}
.compact-actions {
  margin-top: 12px;
}
.location-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.location-row > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.location-row label {
  font-size: 13px;
}
@media (max-width: 600px) {
  .creator-page > header {
    align-items: center;
    gap: 12px;
  }
  .dashboard-logo {
    width: min(100%, 340px);
  }
  .creator-page main {
    padding: 24px 16px;
  }
  .founder-profile .detail-popups {
    padding-inline: 12px;
  }
}

/* Entry gate layout assumption: reuse the form panel, gold rule and native controls. */
.age-panel {
  width: min(100%, 460px);
  margin: clamp(24px, 8vh, 80px) auto;
  text-align: center;
}
.age-logo {
  width: min(100%, 240px);
  height: auto;
}
.age-panel h1 {
  font-size: clamp(1.6rem, 5vw, 2rem);
}
.age-actions {
  display: grid;
  grid-auto-rows: 1fr;
  gap: 12px;
  margin-top: 24px;
}
.age-actions form {
  margin: 0;
}
.age-actions button {
  width: 100%;
  height: 100%;
}

/* Admin layout assumptions: wider reading area and native horizontal scrolling. */
main:has(.admin-dashboard) {
  max-width: 1480px;
}
.admin-dashboard {
  min-width: 0;
}
.admin-table-scroll {
  max-width: 100%;
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}
.admin-table caption {
  text-align: left;
  padding: 12px 0;
}
.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--se-gold-dim);
  vertical-align: top;
  max-width: 260px;
  overflow-wrap: anywhere;
}
.admin-table th {
  color: var(--se-gold);
}
.admin-table tbody tr {
  cursor: pointer;
}
.admin-table tbody tr:hover,
.admin-table tbody tr:focus-within {
  background: var(--se-black);
}
.admin-pagination,
.admin-pagination form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-pagination form {
  margin: 12px 0;
}
.admin-pagination label {
  margin: 0;
}
.admin-pagination select {
  width: auto;
}
.admin-detail dd {
  margin: 4px 0 20px;
}
.admin-detail dt {
  font-weight: 600;
  color: var(--se-gold);
}
#signup-confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  #signup-confetti {
    display: none;
  }
}
