@property --deep  { syntax: "<color>"; inherits: true; initial-value: #0D1356; }
@property --field { syntax: "<color>"; inherits: true; initial-value: #2534C9; }
@property --mist  { syntax: "<color>"; inherits: true; initial-value: #B8BEF7; }
@property --paper { syntax: "<color>"; inherits: true; initial-value: #F3F4FB; }
@property --ink   { syntax: "<color>"; inherits: true; initial-value: #0D1356; }
@property --muted { syntax: "<color>"; inherits: true; initial-value: #4A5080; }

:root {
  --sun: #FFC94A;
  --sheet: #FBFAF4;
  --moment: #D6337F;
  --hl: rgba(255, 214, 0, .6);
  --gutter: clamp(16px, 3.4vw, 48px);
  --top: 44px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --deep: #0D1356; --field: #2534C9; --mist: #B8BEF7; --paper: #F3F4FB; --ink: #0D1356; --muted: #4A5080;
  transition: --deep .7s var(--ease), --field .7s var(--ease), --mist .7s var(--ease), --paper .7s var(--ease), --ink .7s var(--ease), --muted .7s var(--ease);
}
:root[data-mode="leader"] {
  --deep: #2A0C05; --field: #CC3A0A; --mist: #FFF0E8; --paper: #FFF0E8; --ink: #2A0C05; --muted: #7A3A22;
}
/* Bright (Roman, 2026-11-02): the mode colour behind the dial and nav; Share drops to the deep colour */
:root body, :root .rail, :root .find { background: var(--field); }
:root .share { background: var(--deep); }
:root .arrow:hover { color: var(--field); }

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scrollbar-color: var(--mist) var(--deep); }
body {
  margin: 0; background: var(--deep); color: #fff;
  font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
::selection { background: var(--sun); color: #0D1356; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
button, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Step rail */
.rail {
  position: fixed; top: 0; left: 0; right: 0; z-index: 55; height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter);
  background: var(--deep); border-bottom: 1px solid color-mix(in srgb, var(--mist) 22%, transparent);
}
.rail .brand {
  font-family: Archivo; font-weight: 750; font-variation-settings: "wdth" 100; font-size: 15px;
  color: #fff; text-decoration: none; letter-spacing: -.005em;
}
/* Back to the start (Roman, 2026-11-28: in place of the old step names) */
.back-start {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 2px; text-decoration: none;
  font-size: 14px; font-weight: 500; color: var(--mist); transition: color .3s var(--ease);
}
.back-start svg { width: 16px; height: 16px; flex: none; }
.back-start:hover { color: #fff; }

/* Buttons */
.btn-sun {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--sun); color: #0D1356; border-radius: 999px; padding: 14px 24px 14px 22px;
  font-family: Archivo; font-weight: 800; font-variation-settings: "wdth" 100; font-size: 17px; line-height: 1.1;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), opacity .2s;
}
.btn-sun:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5); }
.btn-sun:active { transform: translateY(0); }
.btn-sun:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sun svg { width: 20px; height: 20px; flex: none; }
.btn-line {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none;
  background: transparent; border: 1.5px solid currentColor; border-radius: 999px; padding: 12.5px 22px;
  font-weight: 600; font-size: 15.5px; line-height: 1.1; transition: background-color .2s var(--ease);
}
.btn-line:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-line svg { width: 18px; height: 18px; flex: none; }
.linkish {
  background: none; border: 0; padding: 4px 0; cursor: pointer; font-size: 15px;
  text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px;
}
.linkish:hover { text-decoration-color: var(--sun); }

/* 1. Find it */
.find { padding: calc(var(--top) + clamp(22px, 4vh, 40px)) var(--gutter) clamp(34px, 6vh, 56px); background: var(--deep); scroll-margin-top: 0;
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.find > * { width: 100%; }
.dial {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "h ctl" "reel reel";
  column-gap: 24px; max-width: 1344px; margin: 0 auto;
}
.dial h1 {
  grid-area: h; margin: 0;
  font-family: Archivo; font-weight: 850; font-variation-settings: "wdth" 125;
  font-size: clamp(40px, 5.2vw, 80px); line-height: .98; letter-spacing: -.025em; color: #fff; text-wrap: balance;
}
.controls { grid-area: ctl; display: flex; align-items: center; gap: 10px; align-self: end; padding-bottom: 6px; }
.count { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--mist); min-width: 58px; text-align: center; }
.count b { color: #fff; font-weight: 600; }
.arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--mist);
  background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer;
  transition: background .2s, color .2s, transform .15s var(--ease);
}
.arrow:hover { background: #fff; color: var(--deep); }
.arrow:active { transform: scale(.92); }
.arrow svg { width: 20px; height: 20px; }

.reel {
  grid-area: reel; position: relative; margin-top: clamp(8px, 1.4vh, 16px);
  --fs: clamp(44px, 6vw, 86px); --lines: 1;
  --row: calc(var(--fs) * 1.16 * var(--lines));
  height: calc(var(--row) * 2.1);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; perspective: 900px;
}
.reel:active { cursor: grabbing; }
.reel:focus-visible { outline-offset: 6px; }
.reel .win {
  position: absolute; inset: 0 64px 0 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 34%, #000 70%, transparent 100%);
}
.reel .item {
  position: absolute; left: 0; right: 0; top: 50%; height: var(--row); margin-top: calc(var(--row) / -2);
  display: flex; align-items: center; will-change: transform, opacity; transform-origin: 0% 50%;
}
.reel .item span {
  font-family: Archivo; font-weight: 800; font-variation-settings: "wdth" 72;
  font-size: var(--fs); line-height: 1.04; letter-spacing: -.02em; white-space: nowrap; display: inline-block; max-width: 100%;
  color: var(--mist);
}
.reel .item.on span { color: #fff; }
.reel .item.on span::after {
  content: ""; display: inline-block; width: .09em; height: .78em; margin-left: .12em; vertical-align: -.04em; background: var(--sun);
}
.reel .frame {
  position: absolute; left: 0; right: 64px; top: 50%; height: calc(var(--row) + 10px); transform: translateY(-50%);
  border-top: 1px solid color-mix(in srgb, var(--mist) 40%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--mist) 40%, transparent);
  pointer-events: none;
}
.ticks {
  position: absolute; right: 0; top: 0; bottom: 0; width: 44px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
}
.ticks i {
  position: absolute; left: 0; right: 0; top: 0; height: 400%;
  background:
    repeating-linear-gradient(to bottom, var(--mist) 0 2px, transparent 2px var(--tick)) right / 44px 100% no-repeat,
    repeating-linear-gradient(to bottom, transparent 0 calc(var(--tick) / 4 - 1px), color-mix(in srgb, var(--mist) 55%, transparent) calc(var(--tick) / 4 - 1px) calc(var(--tick) / 4)) right / 22px 100% no-repeat;
  will-change: transform;
}
.pointer { position: absolute; right: 44px; top: 50%; width: 16px; height: 18px; transform: translateY(-50%); color: var(--sun); }
.hint { font-size: 13px; color: var(--mist); max-width: 1344px; margin: 8px auto 0; display: flex; gap: 8px; align-items: center; min-height: 20px; }
.hint .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); flex: none; }
.hint.still .dot { background: var(--mist); }

.picked {
  max-width: 1344px; margin: clamp(18px, 3vh, 30px) auto 0; padding-top: clamp(16px, 2.6vh, 24px);
  border-top: 1px solid color-mix(in srgb, var(--mist) 28%, transparent);
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 6px 28px; align-items: center;
}
/* The room name (Roman, 2026-11-28): bold by the quote, its mode under it */
.picked .who { margin: 0; align-self: start; padding-top: .45em; color: #fff;
  font-family: Archivo; font-weight: 750; font-variation-settings: "wdth" 100; font-size: 17px; line-height: 1.2; }
.picked .who b { font-weight: inherit; }
.picked .who small { display: block; margin-top: 4px; font-family: "IBM Plex Sans", sans-serif; font-weight: 500; font-size: 12.5px; color: var(--mist); }
/* and a tag on the top edge of the chosen dial line, in the mode colours */
.room-tag { position: absolute; left: 0; top: calc(50% - var(--row) / 2 - 5px); transform: translateY(-50%); z-index: 3;
  padding: 5px 12px 5px 11px; border-radius: 999px; background: var(--paper); color: var(--field); pointer-events: none;
  font-family: Archivo; font-weight: 750; font-variation-settings: "wdth" 100; font-size: 14px; line-height: 1.1; white-space: nowrap;
  box-shadow: 0 0 0 4px var(--field); }
.room-tag:empty { display: none; }
.room-tag i { font-style: normal; font-weight: 500; opacity: .75; }
.picked .first {
  margin: 0; font-family: "Source Serif 4", Georgia, serif; font-weight: 500;
  font-size: clamp(22px, 2.1vw, 31px); line-height: 1.22; letter-spacing: -.005em; color: #fff; text-wrap: balance; max-width: 36ch;
}
.picked .meta { margin: 6px 0 0; font-size: 13.5px; color: var(--mist); }
.picked .meta a { color: #fff; }
/* Play this session, with the quiet way to your own problem under it */
.picked .play { display: grid; justify-items: center; gap: 12px; }
.picked .own { margin: 0; font-size: 14px; color: var(--mist); max-width: 300px; text-align: center; text-wrap: balance; }
.picked .own .keep { display: inline-block; }
.picked .own a { color: #fff; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.picked .own a:hover { text-decoration-color: var(--sun); }
.swap-in { animation: swapin .55s var(--ease) both; }
@keyframes swapin { from { opacity: 0; filter: blur(6px); transform: translateY(6px); } to { opacity: 1; filter: none; transform: none; } }

/* Section heading (the card maker) */
.h2 {
  font-family: Archivo; font-weight: 850; font-variation-settings: "wdth" 112;
  font-size: clamp(40px, 4.6vw, 68px); line-height: .95; letter-spacing: -.025em; margin: 0 0 14px; text-wrap: balance;
}

/* 3. Share it */
.share { background: var(--field); color: #fff; padding: clamp(56px, 9vh, 96px) var(--gutter) clamp(64px, 10vh, 104px); scroll-margin-top: var(--top); }
.share-in { max-width: 1340px; margin: 0 auto; }
.share-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px 56px; align-items: end; margin-bottom: clamp(28px, 5vh, 44px); }
.share-head .h2 { margin: 0; color: #fff; }
.share-head p { margin: 0; font-size: 16px; line-height: 1.5; color: rgba(255, 255, 255, .9); max-width: 44ch; }
.share-head p b { color: #fff; font-weight: 600; }
.maker { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr) minmax(0, 270px); gap: clamp(24px, 3vw, 44px); align-items: start; }
.panel-title { margin: 0 0 12px; font-family: Archivo; font-weight: 700; font-variation-settings: "wdth" 96; font-size: 16px; color: #fff; }
.picker { border-top: 1px solid rgba(255, 255, 255, .28); }
.q {
  display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 12px; align-items: baseline; width: 100%; text-align: left;
  background: none; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .28); padding: 12px 12px 13px 8px; cursor: pointer; color: #fff;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.q .ring { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid currentColor; align-self: start; margin-top: .3em; display: grid; place-items: center; }
.q .ring::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.q .text { font-family: "Source Serif 4", Georgia, serif; font-size: 17px; line-height: 1.34; }
.q:hover { background: rgba(255, 255, 255, .08); }
.q[aria-checked="true"] { background: var(--paper); color: var(--ink); }
.q[aria-checked="true"] .ring::after { background: currentColor; }
.stagecard { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mount {
  width: 100%; max-width: 540px; background: var(--paper); padding: 12px;
  box-shadow: 0 26px 50px -26px rgba(0, 0, 0, .6), 0 3px 8px rgba(0, 0, 0, .12); transform: rotate(-.8deg);
}
.cardbox { position: relative; aspect-ratio: 1 / 1; }
#card { width: 100%; height: 100%; display: block; }
.cardbox.swap #card { animation: develop .55s var(--ease); }
@keyframes develop { from { filter: blur(7px) saturate(.6); opacity: .55; transform: translateY(6px); } to { filter: none; opacity: 1; transform: none; } }
.loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: #4A5080; background: #E4E6F3; }
.loading[hidden] { display: none; }
.size-note { margin: 16px 0 0; font-size: 12.5px; color: rgba(255, 255, 255, .82); text-align: center; }
.styles { display: grid; gap: 8px; margin-bottom: 26px; }
.style {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: center; text-align: left; color: #fff;
  background: none; border: 1px solid rgba(255, 255, 255, .34); padding: 7px 10px 7px 7px; cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.style:hover { border-color: #fff; }
.style[aria-checked="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.sw { width: 36px; height: 36px; display: block; position: relative; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.sw.night { background: #0D1356; }
.sw.ember { background: #CC3A0A; }
.sw.paper { background: #F4F0E6; }
.sw.paper::after { content: ""; position: absolute; left: 6px; right: 8px; top: 15px; height: 7px; background: rgba(255, 214, 0, .8); transform: rotate(-3deg); }
.sw.night::after { content: ""; position: absolute; left: 7px; top: 9px; width: 13px; height: 3px; background: #FFC94A; }
.sw.ember::after { content: ""; position: absolute; left: 7px; top: 9px; width: 13px; height: 3px; background: #2A0C05; }
.style b { display: block; font-weight: 600; font-size: 14px; }
.style small { display: block; font-size: 12px; opacity: .82; line-height: 1.3; }
.actions { display: grid; gap: 10px; }
.actions .btn-sun, .actions .btn-line { justify-content: center; width: 100%; }
.share .btn-line { color: #fff; }
.share .btn-line.done { background: #fff; color: var(--ink); border-color: #fff; }
.status { min-height: 22px; margin: 10px 0 0; font-size: 13px; color: #fff; }
.origin { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .28); font-size: 13px; color: rgba(255, 255, 255, .86); }
.origin p { margin: 0; }

/* Mid widths */
@media (max-width: 1180px) {
  .maker { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .controls-col { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
  .styles { margin: 0; }
}

/* Phone */
@media (max-width: 760px) {
  :root { --top: 40px; }
  .rail { height: 40px; justify-content: center; }
  .rail .brand { display: none; }
  .dial { grid-template-columns: 1fr; grid-template-areas: "h" "reel" "ctl"; }
  .dial h1 { font-size: clamp(38px, 11.4vw, 52px); font-variation-settings: "wdth" 112; line-height: 1; }
  .reel { --fs: clamp(32px, 9.6vw, 44px); --lines: 2; height: calc(var(--row) * 1.7); margin-top: 6px; }
  .reel .win, .reel .frame { right: 34px; }
  .reel .item span { white-space: normal; text-wrap: balance; font-variation-settings: "wdth" 68; }
  .ticks { width: 26px; }
  .pointer { right: 24px; width: 12px; }
  .controls { justify-content: space-between; padding: 8px 0 0; }
  .arrow { width: 56px; height: 56px; }
  .hint { align-items: flex-start; }
  .hint .dot { margin-top: 6px; }
  .picked { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .picked .who { padding-top: 0; }
  .picked .take { margin-top: 16px; width: 100%; justify-content: center; }
  .h2 { font-size: clamp(36px, 10.5vw, 46px); }
  .coach { font-size: 23px; }
  .send-row .btn-sun { width: 100%; justify-content: center; }
  .send-row .linkish { margin: 0 auto; }
  .mapwrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .col, .col + .col { padding: 16px 0 18px; border-left: 0; }
  .col + .col { border-top: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); }
  .next .coach { font-size: 21px; }
  .share-head { grid-template-columns: minmax(0, 1fr); }
  .maker { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pick { min-width: 0; }
  .picker {
    border: 0; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.5) transparent;
  }
  .q { flex: 0 0 auto; width: 236px; border: 1px solid rgba(255, 255, 255, .34); padding: 10px 12px 12px; scroll-snap-align: start; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; }
  .q .text { font-size: 15.5px; }
  .mount { padding: 8px; transform: none; }
  .size-note { display: none; }
  .controls-col { display: block; }
  .styles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
  .style { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 4px; gap: 6px; }
  .style small { display: none; }
  .actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .actions .btn-sun { grid-column: 1 / -1; }
  .actions .btn-line { font-size: 14px; padding: 12px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .map path.e { stroke-dashoffset: 0; }
  .map .n { opacity: 1; }
  .map .n.fresh .hlr { transform: scaleX(1); }
}
