*{box-sizing:border-box}
:root{color-scheme:dark;--paper:#f4f2ee;--muted:#bbb9b5;--line:#454448;--orange:#ff921a;--stage:#161618;font-family:"Segoe UI",Inter,Arial,sans-serif;background:#19191b;color:var(--paper)}
body{margin:0;min-height:100svh}
[hidden]{display:none!important}
button,input,a{font:inherit}
button,a{touch-action:manipulation}
button{cursor:pointer;color:inherit;border:1px solid #646367;border-radius:7px;background:#262628;font-weight:650}
button:active{filter:brightness(.88)}
:focus-visible{outline:3px solid var(--orange);outline-offset:3px}
h1:focus{outline:none}
.mast{background:#171719;border-bottom:1px solid #39383a}
.mast>div{max-width:1024px;margin:auto;display:flex;align-items:center;gap:10px;padding:10px clamp(16px,4vw,42px)}
.mast img{width:34px;height:34px;object-fit:contain;filter:brightness(1.8)}
.mast strong{font-size:1.5rem;letter-spacing:-.045em}
.mast span{margin-left:auto;font-size:.8rem;letter-spacing:.04em;color:var(--muted)}
main{max-width:1024px;margin:auto}
#wizard{padding:16px clamp(16px,4.4vw,42px) max(18px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr);gap:12px}
h1{font-size:clamp(1.9rem,7.7vw,3rem);line-height:1.05;letter-spacing:-.043em;margin:0;text-wrap:balance}
p{line-height:1.4;margin:0}
#lead{color:#dbd9d5;margin-top:8px;font-size:1.05rem}
#progress{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;padding:0 0 10px;border-bottom:1px solid var(--line);font-size:.9rem}
.segments{display:flex;justify-content:flex-end;gap:3px;width:48%;min-width:0}
.intro,.controls{min-width:0}
.segments i{flex:0 1 24px;min-width:2px;width:24px;height:5px;border-radius:5px;background:#515155}
.segments .filled{background:var(--orange)}
#stage{position:relative;isolation:isolate;overflow:hidden;min-height:165px;height:clamp(185px,42svh,490px);background:var(--stage);border-radius:8px}
#reference,#orbit{position:absolute;inset:0;width:100%;height:100%;border:0;display:block}
#reference{pointer-events:none}
#orbit{z-index:1;touch-action:none;cursor:grab;border-radius:inherit}
#orbit:active{cursor:grabbing}
#orbit:focus-visible{outline-offset:-4px}
.orbitHint,#loading{position:absolute;pointer-events:none;z-index:2}
.orbitHint{bottom:8px;left:50%;transform:translateX(-50%);font-size:.75rem;color:#ddd;background:#19191bd9;border-radius:20px;padding:4px 10px;white-space:nowrap}
#loading{inset:0;display:grid;place-content:center;padding:20px;background:var(--stage);text-align:center;color:var(--muted)}
#stage:has(#loading:not([hidden])) .orbitHint{display:none}
.controls{display:grid;gap:10px}
@media(min-height:700px) and (max-width:759px){
  #wizard:has(#progress:not([hidden])) #stage{height:clamp(290px,46svh,510px)}
}
#wizard:has(#progress:not([hidden])) #instruction{min-height:2.7em}

#instruction{font-size:clamp(1rem,2.6vw,1.25rem);line-height:1.35}
.fieldHead{display:flex;align-items:center;justify-content:space-between;gap:10px}
label{font-size:1.03rem;font-weight:650}
.units{display:flex;border:1px solid #656469;border-radius:7px;overflow:hidden}
.units button{border:0;border-radius:0;background:transparent;min-width:44px;min-height:40px;line-height:1}
.units button[aria-pressed=true]{color:#19100a;background:var(--orange)}
.units button:focus-visible{outline-offset:-3px;outline-color:currentColor}
.entry{display:flex;align-items:center;background:#202022;border:1.5px solid #aca9a5;border-radius:7px;min-width:0}
.entry:focus-within{border-color:var(--orange);outline:1px solid var(--orange)}
input{color:var(--paper);background:transparent;width:100%;min-width:0;border:0;outline:0!important;padding:6px 15px;font-size:clamp(2rem,6vw,2.7rem);font-weight:650;line-height:1.18}
#suffix{padding-right:16px;color:var(--muted);font-size:1.4rem}
.actions{display:flex;gap:10px;margin-top:4px}
.actions button{flex:1;min-height:48px;font-size:1.13rem}
.primary{border:0;background:var(--orange);color:#1b1003}
.primary:hover{background:#ffa02e}
#handoff,#previewNote,#reviewIntro{color:var(--muted)}
#handoff,.textButton{text-align:center;font-size:.88rem}
.textButton{color:#e9cead;text-underline-offset:3px;justify-self:center}
.textButton{background:transparent;border:0;text-decoration:underline;padding:8px}
#bodyTypeControl{padding:12px 0}
#bodyType{padding:0;margin:0;width:100%;min-height:44px;accent-color:var(--orange)}
#bodyType:focus-visible{outline:2px solid var(--orange)!important;outline-offset:2px}
.rangeLabels{display:grid;grid-template-columns:1fr 1fr 1fr;font-size:.92rem;color:var(--muted)}
.rangeLabels span:nth-child(2){text-align:center}
.rangeLabels span:last-child{text-align:right}
#previewRange,#estimateNote,.reviewRow small{color:var(--muted);font-size:.83rem}
.reviewRow small{display:block}
.problem{color:#ffba80;font-size:.94rem}
#review{max-width:640px;margin:0 auto;padding:28px clamp(16px,4.4vw,42px)}
#reviewIntro{margin:12px 0 20px}
#groups h2{font-size:1rem;color:#ffb261;margin:20px 0 3px}
.reviewRow{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;border-bottom:1px solid var(--line);min-height:50px}
.reviewRow strong{font-variant-numeric:tabular-nums}
.reviewRow button{border:0;background:transparent;color:var(--paper);text-decoration:underline;text-underline-offset:3px;padding:12px 4px}
.reviewEnd{display:grid;gap:10px;margin-top:22px}
.reviewEnd .primary{min-height:48px}
#previewNote,#result{font-size:.93rem}
@media(min-width:760px),(min-width:650px) and (max-height:520px){
  #wizard{grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr);column-gap:clamp(28px,4vw,54px);padding-top:36px;align-items:start}
  .intro{grid-column:2;grid-row:1;align-self:end}
  #stage{grid-column:1;grid-row:1/3;align-self:stretch;height:auto;min-height:min(580px,75svh)}
  .controls{grid-column:2;grid-row:2;align-self:start;gap:14px}
  #progress{margin-bottom:20px}
}
@media(min-width:650px) and (max-height:520px){
  .mast>div{padding-top:5px;padding-bottom:5px}
  #wizard{padding-top:10px;row-gap:7px}
  #stage{min-height:265px}
  h1{font-size:1.8rem}
  #progress{margin-bottom:7px;padding-bottom:5px}
  .controls{gap:6px}
  #instruction{font-size:1rem}
  input{font-size:1.8rem}
  .actions button{min-height:44px}
}
@media(max-width:649px) and (max-height:650px){#stage{height:30svh;min-height:150px}#wizard{gap:8px}.controls{gap:7px}}
@media(max-width:759px){
  #wizard.keyboard #stage{height:72px;min-height:72px}
  #wizard.liveFit.keyboard #stage{height:clamp(140px,23svh,200px);min-height:140px}
  #wizard.liveFit.keyboard .orbitHint{display:none}
}
@media(max-width:759px) and (max-height:500px){
  #stage{height:92px;min-height:92px}
  .actions{position:sticky;bottom:0;background:#19191b;padding:4px 0}
}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s}}
@media(max-width:759px) {
  #wizard.finalFit #stage{height:clamp(240px,65svh,700px)}
}

/* Recipient invitation and its delivery receipt share the same reading width. */
#forgeBrand {padding-left:12px;border-left:1px solid var(--line);font-size:.86rem}
.requestCard {max-width:38rem;margin:clamp(22px,6svh,64px) auto;padding:0 clamp(18px,5vw,42px) 32px;overflow-wrap:anywhere}
.eyebrow {color:#ffb261;font-size:.9rem;font-weight:650;margin-bottom:14px}
.requestCard h1 {font-size:clamp(2rem,8vw,3rem)}
.requestMessage {margin:14px 0 20px;color:var(--paper);font-size:1.1rem}
#requestDetails {border-block:1px solid var(--line);padding:16px 0;color:var(--muted)}
#consentPanel h2 {margin:0 0 8px;font-size:1.1rem;color:var(--paper)}
#requestedSteps {margin:0 0 16px;padding-left:1.25rem;line-height:1.6}
#requestAction {width:100%;margin-top:18px;min-height:48px;padding:10px}
#consentPanel {display:grid;gap:10px;border-top:1px solid var(--line);padding-top:18px}
.consentChoice {display:flex;align-items:flex-start;gap:12px;padding:12px;border:1px solid var(--line);border-radius:7px;line-height:1.45;cursor:pointer}
.consentChoice input {width:20px;height:20px;flex:none;accent-color:var(--orange);margin:2px 0;padding:0}
.consentChoice:focus-within {outline:2px solid var(--orange);outline-offset:2px}
.policyLinks a {color:#ffbb74;text-underline-offset:3px;display:inline-block;padding:8px 0}
#review {overflow-wrap:anywhere}
#sendAvatar,#finish {padding:10px;min-height:48px}
#sendAvatar:disabled {background:#353436;color:#c1bebc;cursor:default}
#result:not([hidden]) {border-inline-start:3px solid var(--orange);padding:8px 12px}
#scopeList {margin-bottom:12px}
#requestScope {color:var(--paper);cursor:pointer;padding:8px 0;font-weight:650}
#requestedSteps {margin-bottom:8px}
