/* Live colour drape. Loads after suits.css and only adds what the camera
   studio needs: the stage, the A and B swatches, the candidates and the fan.
   The studio sits on the night hero, the story below on white. */
.page-drape .hero { padding: 32px max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut))) 56px; }
@media (min-width: 960px) { .page-drape .hero { padding-top: 64px; padding-bottom: 88px; } }
.page-drape .hero h1 { max-width: 14ch; }
.page-drape .hero .lede { margin-bottom: 28px; }

.studio { display: grid; gap: 20px; scroll-margin-top: 8px; }
@media (min-width: 960px) { .studio { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px; align-items: start; } }
.studio .stage { aspect-ratio: 3 / 4; max-height: 70svh; min-height: 0; background: var(--mist); }
/* Before the camera starts, keep the start button in the first screen. */
.studio[data-state="idle"] .stage { max-height: 30svh; }
.studio[data-state="live"] .stage, .studio[data-state="loading"] .stage { max-height: 50svh; }
@media (min-width: 960px) { .studio .stage, .studio[data-state="live"] .stage, .studio[data-state="idle"] .stage { max-height: 78svh; } }
@media (max-width: 959px) { .studio[data-state="idle"] { display: flex; flex-direction: column-reverse; } }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.stage video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.stage-idle { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; text-align: center; color: var(--muted); font: 500 18px/1.3 var(--text); }
.stage-idle { place-content: end center; padding-bottom: 16px; }
.stage-idle p { position: relative; z-index: 2; margin: 0; padding: 9px 14px; border-radius: 12px; background: rgba(15, 15, 16, .62); color: #fff; font: 600 14px/1.25 var(--text); }
/* Before the camera starts, a sample face cycles through the twelve drapes. */
.idle-face { position: absolute; inset: 0; }
.idle-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; display: block; }
.idle-face i { position: absolute; inset: 0; background: #B8956A; -webkit-mask: var(--m) 50% 28% / cover no-repeat; mask: var(--m) 50% 28% / cover no-repeat; mix-blend-mode: multiply; animation: drapes 18s steps(1) infinite; }
@keyframes drapes { 0% { background: #F4B183; } 8.3% { background: #F26B3A; } 16.6% { background: #FF4F5E; } 25% { background: #A8C5E6; } 33.3% { background: #6A8EC2; } 41.6% { background: #8A9BAE; } 50% { background: #B8956A; } 58.3% { background: #C1652F; } 66.6% { background: #7B2D26; } 75% { background: #26285E; } 83.3% { background: #C8102E; } 91.6% { background: #E4007C; } }
.studio:not([data-state="idle"]) .stage-idle { display: none; }

.studio .panel { max-width: 480px; }
.step { margin: 0 0 6px; font: 500 12px/1.3 var(--text); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.test-q { margin: 0 0 16px; font-size: clamp(28px, 4vw, 36px); line-height: 1.08; }
.btn.ghost { border-color: var(--hair); }
.btn:focus-visible, .swatch-btn:focus-visible, .cand:focus-visible, .mini:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.start .btn.big { max-width: 440px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch-btn { display: flex; align-items: center; gap: 12px; padding: 8px; min-height: 68px; border: 1px solid var(--hair); border-radius: 16px; background: var(--mist); font: 600 17px var(--text); color: var(--ink); cursor: pointer; touch-action: manipulation; text-align: left; transition: border-color 160ms var(--ease); }
.swatch-btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch-btn .chip { flex: none; width: 48px; height: 48px; min-height: 0; padding: 0; border-radius: 12px; border: 0; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.hint { margin: 12px 0; font-size: 15px; color: var(--muted); }
.answers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.answers .btn { padding-left: 10px; padding-right: 10px; }
.answers #ans-none { grid-column: 1 / -1; }
.toggle { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 15px; cursor: pointer; }
.toggle input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.tools { margin-top: 14px; padding-top: 6px; border-top: 1px solid var(--hair); }

.cands { display: grid; gap: 8px; margin-bottom: 10px; }
.cand { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 16px; background: var(--mist); font: 600 17px var(--text); color: var(--ink); cursor: pointer; text-align: left; touch-action: manipulation; min-height: 58px; }
.cand[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.cand .dots { display: flex; gap: 2px; margin-left: auto; }
.cand .dots i { width: 14px; height: 30px; display: block; }
#final-pick { width: 100%; }

.season { font-size: clamp(38px, 6vw, 52px); margin: 0 0 6px; }
.res-note { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.fan { display: flex; margin: 6px 0 18px; padding-left: 10px; }
.fan i { width: 50px; height: 100px; border-radius: 12px; margin-left: -10px; border: 2px solid var(--paper); display: block; transform-origin: 50% 110%; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.fan i:nth-child(1) { transform: rotate(-9deg); }
.fan i:nth-child(2) { transform: rotate(-3deg); }
.fan i:nth-child(3) { transform: rotate(3deg); }
.fan i:nth-child(4) { transform: rotate(9deg); }
.res-sub { font-size: 15px; margin: 0 0 10px; }
.all { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mini { display: grid; gap: 6px; justify-items: center; padding: 6px 4px; border: 1px solid transparent; border-radius: 16px; background: var(--mist); font: 500 13px/1.2 var(--text); color: var(--ink); cursor: pointer; touch-action: manipulation; min-height: 64px; }
.mini[aria-pressed="true"] { border-color: var(--ink); }
.mini span.sw { width: 100%; height: 24px; display: block; }
.mini .badge { font-size: 12px; color: var(--accent); min-height: 14px; }
.marks, .studio .saves { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.studio .saves { grid-template-columns: 1fr; }
.marked { font-size: 15px; color: var(--muted); margin: 8px 0 0; min-height: 1px; }
.feedback { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hair); display: grid; gap: 12px; }
.feedback h3 { margin: 0; }
.feedback label, .feedback legend { font-size: 15px; }
.feedback select { font: 16px var(--text); min-height: 48px; padding: 8px 12px; border-radius: 16px; border: 1px solid var(--hair); background: var(--mist); color: var(--ink); }
.feedback fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.feedback fieldset label { display: flex; gap: 10px; align-items: center; min-height: 32px; }
.fb-note { font-size: 13px; color: var(--muted); margin: 0; }
.fb-done { margin: 0; font-size: 15px; color: var(--ink); }
#restart { margin-top: 14px; width: 100%; }

.drape-story { max-width: 760px; margin: 0 auto; padding: 72px var(--gut) 8px; }
.drape-story h2 { font-size: clamp(30px, 4.6vw, 42px); margin: 56px 0 14px; }
.drape-story h2:first-child { margin-top: 0; }
.look { width: 100%; border-collapse: collapse; font-size: 15px; margin: 16px 0; }
.look th, .look td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--hair); text-align: left; vertical-align: top; }
.look thead th { font: 500 12px/1.2 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
.look td:first-child { color: var(--ink); font-weight: 500; }
.back { margin-top: 32px; padding: 24px; background: var(--mist); border-left: 3px solid var(--accent); }
