/* Apply flow */
.ap { min-height: 100svh; }
.ap .bar { position: fixed; }
.ap__exit { margin-left: auto; }
.ap__main { min-height: 100svh; display: grid; grid-template-columns: minmax(320px, 0.9fr) 1.1fr; }
.ap__side { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; align-content: end; padding: calc(var(--zc-bar) + 2rem) clamp(1.5rem, 4vw, 3.5rem) clamp(2rem, 6vh, 4rem); isolation: isolate; border-right: 1px solid var(--zc-line); }
.ap__light { position: absolute; inset: 0; z-index: -1; background: #08090c url("../img/light-start.webp") center / cover; transition: filter 900ms; }
.ap__light::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,9,12,0.92), rgba(8,9,12,0.25) 70%); }
.ap.is-w .ap__light { background-image: url("../img/light-end.webp"); }
.ap__match { display: grid; grid-template-columns: 132px 1fr; gap: 1.4rem; align-items: end; opacity: 0.55; transition: opacity 600ms, transform 700ms var(--sc-ease-out); transform: translateY(10px); }
.ap.has-match .ap__match { opacity: 1; transform: none; }
.ap__portrait { aspect-ratio: 3 / 4; border: 1px solid var(--zc-line); }
.ap__portrait .ph__tag { left: 6px; bottom: 6px; font-size: 0.55rem; }
.ap__matchname { font-size: clamp(1.2rem, 1rem + 1vw, 1.8rem); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500; margin: 0.4rem 0 0.5rem; }
.ap__match .soft { margin: 0; font-size: 0.92rem; max-width: 34ch; }

.ap__panel { padding: calc(var(--zc-bar) + clamp(2rem, 6vh, 4rem)) clamp(1.4rem, 6vw, 6rem) 3rem; display: grid; align-content: start; gap: 1.4rem; max-width: 760px; width: 100%; }
.ap__progress { height: 1px; background: var(--zc-line); position: relative; }
.ap__progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--zc-blue), var(--zc-ice)); transition: width 600ms var(--sc-ease-out); }
.ap__step { margin: 0; font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--zc-grey); }
.q { border: 0; margin: 0; padding: 0; display: grid; gap: 1rem; min-height: 46vh; align-content: start; }
.q legend { padding: 0; margin-bottom: 0.4rem; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem); }
.q .body:empty { display: none; }
.q__body { display: grid; gap: 0.6rem; margin-top: 0.8rem; }
.q.anim { animation: qin 520ms var(--sc-ease-out); }
@keyframes qin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.opt { position: relative; display: block; cursor: pointer; }
.opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.opt span { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.05rem 1.2rem; border: 1px solid var(--zc-line); font-size: 1rem; color: #e6e8eb; transition: border-color 200ms, background 200ms; }
.opt span small { color: var(--zc-grey); font-size: 0.8rem; }
.opt span::after { content: ""; width: 14px; height: 14px; border: 1px solid rgba(255,255,255,0.4); border-radius: 50%; flex: none; }
.opt input[type="checkbox"] + span::after { border-radius: 0; }
.opt:hover span { border-color: rgba(255,255,255,0.35); }
.opt input:checked + span { border-color: var(--zc-ice); background: rgba(47,107,255,0.1); }
.opt input:checked + span::after { background: var(--zc-ice); border-color: var(--zc-ice); box-shadow: inset 0 0 0 3px #111112; }
.opt input:focus-visible + span { outline: 1px solid var(--zc-ice); outline-offset: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

.fld { display: grid; gap: 0.45rem; }
.fld label { font-size: 0.7rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--zc-grey); font-weight: 500; }
.fld input, .fld textarea, .fld select {
  background: rgba(255,255,255,0.03); border: 1px solid var(--zc-line); border-radius: 0;
  padding: 0.95rem 1rem; font-size: 16px; color: #fff; width: 100%;
  transition: border-color 200ms;
}
.fld textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--zc-ice); }
.fld input[aria-invalid="true"] { border-color: #ff6b6b; }
.chk { display: flex; gap: 0.8rem; align-items: start; font-size: 0.9rem; color: var(--zc-grey); cursor: pointer; }
.chk input { margin-top: 0.25rem; accent-color: var(--zc-blue); width: 18px; height: 18px; flex: none; }
.chk a { color: #fff; }
.q__err { min-height: 1.4em; margin: 0; color: #ff8a8a; font-size: 0.86rem; }
.ap__nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 0.6rem; }
.ap__back { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.ap__back[hidden] { display: inline-flex; visibility: hidden; }
.ap__fine { font-size: 0.8rem; color: #a4a7ab; margin: 1rem 0 0; max-width: 56ch; }
.hp { position: absolute; left: -9999px; }
.note { font-size: 0.82rem; color: var(--zc-ice); border-left: 1px solid var(--zc-ice); padding-left: 0.8rem; margin: 0.2rem 0 0; }

@media (max-width: 900px) {
  .ap__main { grid-template-columns: 1fr; }
  .ap__side { position: relative; height: auto; min-height: 0; padding: calc(var(--zc-bar) + 1.2rem) 1.2rem 1.2rem; border-right: 0; border-bottom: 1px solid var(--zc-line); }
  .ap__match { grid-template-columns: 64px 1fr; gap: 0.9rem; align-items: center; }
  .ap__match .soft { display: none; }
  .ap__matchname { font-size: 1rem; margin: 0.2rem 0 0; }
  .ap__panel { padding-top: 1.6rem; }
  .q { min-height: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .ap__nav { position: sticky; bottom: 0; background: linear-gradient(to top, #111112 70%, transparent); padding: 1rem 0 calc(0.6rem + env(safe-area-inset-bottom)); }
  .ap__nav .btn { flex: 1; }
}
/* v1.1: 13px floor */
.ap__step, .fld label { font-size: 0.8125rem; letter-spacing: 0.14em; }
.opt span small { font-size: 0.875rem; }
.ap__portrait .ph__tag { font-size: 0.75rem; }
.ap__portrait { position: relative; overflow: hidden; }
.ap__portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 24%; z-index: 1; }
.ap__back, .ap__exit { min-height: 44px; display: inline-flex; align-items: center; }

/* options: title on top, the explanation underneath, the radio on the right (no three-column squeeze on phones) */
.opt span { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; row-gap: 0.2rem; align-items: center; }
.opt span small { grid-column: 1; grid-row: 2; line-height: 1.4; }
.opt span::after { grid-column: 2; grid-row: 1 / span 2; }
.opt { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.opt:active span { background: rgba(255,255,255,0.04); }
@media (hover: none) { .opt:hover span { border-color: var(--zc-line); } }
/* no coach yet: no empty photo frame */
.ap:not(.has-match) .ap__portrait { display: none; }
.ap:not(.has-match) .ap__match { grid-template-columns: 1fr; }
.ap__time { color: var(--zc-ice); }
