
main>canvas{cursor:grab}
main>canvas:active{cursor:grabbing}

@media(max-width:1200px){footer small{display:none}}

#skin-picker{position:absolute;width:max-content;max-width:calc(100vw - 20px);left:50%;bottom:calc(clamp(46px,5vh,50px) + var(--model-footer-lift,0px));transform:translateX(-50%);z-index:3;display:flex;align-items:center;justify-content:center;gap:20px;height:90px;margin:0;pointer-events:auto}
.skin-choice{font-size:30px;transition:width .34s cubic-bezier(.18,.85,.28,1),height .34s cubic-bezier(.18,.85,.28,1),font-size .34s cubic-bezier(.18,.85,.28,1),transform .18s ease}
.skin-choice[aria-pressed="true"]{width:90px;height:90px;color:var(--pos-ink);font-size:48px}
.skin-choice[aria-pressed="true"] path{fill:var(--pos-paper);stroke:var(--pos-title);stroke-width:4}
@keyframes skin-pop{0%{transform:scale(1)}48%{transform:scale(1.075,.96)}76%{transform:scale(.985,1.025)}100%{transform:scale(1)}}
.skin-choice[aria-pressed="true"] svg{transform-origin:center;animation:skin-pop .34s ease-out both}

#scene-link{position:absolute;width:48px;height:48px;z-index:1;transform:translate(-50%,-50%);border-radius:50%;cursor:pointer}
#scene-link:focus-visible{outline:3px solid var(--pos-focus-blue);outline-offset:3px}

@media(min-width:821px){#skin-picker{bottom:calc(clamp(46px,5vh,50px) + 30px + var(--model-footer-lift,0px))}}
@media(max-width:820px){#skin-picker{gap:10px;height:72px;bottom:calc(64px + var(--model-footer-lift,0px))}.skin-choice{width:36px;height:36px;font-size:26px}.skin-choice[aria-pressed="true"]{width:72px;height:72px;font-size:39px}}

@media(max-width:540px){
  main{--picker-bottom:calc(38px + var(--model-footer-lift,0px));--picker-width:min(340px,calc(100vw - 32px));--picker-row:46px;--picker-gap:4px}
  #skin-picker{display:grid;grid-template-columns:repeat(12,1fr);grid-auto-rows:var(--picker-row);row-gap:var(--picker-gap);column-gap:0;bottom:var(--picker-bottom);width:var(--picker-width);height:auto;align-items:center;justify-items:center}
  #skin-picker .skin-choice{width:32px;height:32px;font-size:22px;grid-row:2;grid-column:span 2}
  #skin-picker .skin-choice:nth-child(-n+4){grid-row:1}
  #skin-picker .skin-choice:nth-child(1){grid-column:3/5}#skin-picker .skin-choice:nth-child(2){grid-column:5/7}
  #skin-picker .skin-choice:nth-child(3){grid-column:7/9}#skin-picker .skin-choice:nth-child(4){grid-column:9/11}
  #skin-picker .skin-choice[aria-pressed="true"]{width:44px;height:44px;font-size:28px}
}
@media(prefers-reduced-motion:reduce){.skin-choice{transition:none}.skin-choice[aria-pressed="true"] svg{animation:none}}

#pdf{position:absolute;left:var(--pos-gutter);bottom:calc(clamp(46px,5vh,50px) + 48px + var(--model-footer-lift,0px));z-index:3;display:inline-flex;align-items:center;justify-content:center;height:54px;padding:0 40px;font-size:38px;line-height:16px;border-width:3px;--bw:3px}
@media(max-width:900px){#pdf{left:0;right:0;margin:0 auto;width:max-content;bottom:calc(152px + var(--model-footer-lift,0px))}}
@media(min-width:821px) and (max-width:1500px){#pdf{left:0;right:0;margin:0 auto;width:max-content;bottom:calc(clamp(46px,5vh,50px) + 134px + var(--model-footer-lift,0px))}}

@media(max-width:540px){
  #reset{position:fixed;top:calc(var(--row3,98px) + 21px);left:18px;z-index:4}
  #pdf{left:0;right:0;margin:0 auto;width:max-content;bottom:calc(126px + var(--model-footer-lift,0px));height:48px;font-size:29px;padding:0 24px}
}

#callout{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;overflow:visible}
#callout g{transition:opacity .3s ease}
#callout g.gone{opacity:0}
#callout path{fill:none;stroke:var(--callout,var(--callout-1));stroke-linecap:round;stroke-linejoin:round}

#debug{position:fixed;left:12px;top:50%;transform:translateY(-50%);z-index:8;width:min(380px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:14px;background:white;border:1px solid #aaa;border-radius:4px;color:#222;font:14px/1.4 system-ui,sans-serif;display:grid;gap:8px}
.debug-heading,.debug-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
.debug-heading{justify-content:space-between}
#debug h2,#debug h3{margin:0;font:600 16px/1.25 system-ui,sans-serif;color:inherit}
#debug h3{border-top:1px solid #ddd;padding-top:8px;font-size:14px}
#debug button{appearance:auto;background:#f5f5f5;color:#222;border:1px solid #aaa;border-radius:3px;padding:4px 9px;font:inherit;line-height:1.2}
#debug button:hover{background:#e9e9e9}
.debug-options{display:grid;gap:3px}
.debug-options label{display:flex;align-items:center;gap:6px}
.debug-options input{margin:0}
#camText,#camInfo,.debug-metrics{font:12px/1.45 ui-monospace,Consolas,monospace;font-variant-numeric:tabular-nums}
#camText{width:100%;resize:vertical;border:1px solid #aaa;padding:5px}
#camInfo{white-space:pre-line;overflow-wrap:anywhere}
#camMessage:empty{display:none}

#skin-picker{--skin-time:10s}
.skin-choice>svg.ring{display:none;z-index:0;overflow:visible}
.skin-choice>svg.ring circle{fill:none;stroke:var(--pos-orange);stroke-width:3px;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:100}
.skin-choice[aria-pressed="true"]>svg.ring{display:block;animation:none}
.skin-choice[aria-pressed="true"]>svg.ring circle{animation:skin-ring var(--skin-time) linear forwards}
@keyframes skin-ring{to{stroke-dashoffset:0}}
#skin-picker:hover .ring circle,body.scene-paused .ring circle,body.auto-paused .ring circle,body:has(#reset:not([hidden])) .ring circle{animation-play-state:paused!important}
@media(prefers-reduced-motion:reduce){.skin-choice[aria-pressed="true"]>svg.ring{display:none}}

@keyframes skin-loading{0%,100%{opacity:1}50%{opacity:.45}}
.skin-choice.loading{animation:skin-loading .8s ease-in-out infinite}
@media(prefers-reduced-motion:reduce){.skin-choice.loading{animation:none;opacity:.6}}

.debug-colors{display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}
.debug-colors label{display:flex;align-items:center;gap:6px;min-width:0;font-size:12px}
.debug-colors label span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.debug-colors input[type=color]{flex:none;width:30px;height:22px;padding:0;border:1px solid #aaa;background:none;cursor:pointer}
#uiColorsMessage{font-size:12px}

#cta-row{position:absolute;z-index:3;left:var(--pos-gutter);right:var(--pos-gutter);bottom:calc(clamp(46px,5vh,50px) + 48px + var(--model-footer-lift,0px));display:flex;align-items:center;justify-content:space-between;gap:14px;pointer-events:none}
#cta-row>*{pointer-events:auto}
#cta-row #pdf{position:static!important;margin:0!important;left:auto!important;right:auto!important;bottom:auto!important;width:max-content!important}
#toPaint{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:54px;padding:0 34px;font-size:38px;line-height:16px;border-width:3px;--bw:3px;text-decoration:none}
#toPaint .to-paint-icon{width:26px;height:26px;flex:none}
@media(max-width:1500px){#cta-row{left:0;right:0;justify-content:center;gap:16px;bottom:calc(clamp(46px,5vh,50px) + 134px + var(--model-footer-lift,0px))}}
@media(max-width:900px){#cta-row{bottom:calc(152px + var(--model-footer-lift,0px))}}
@media(max-width:540px){
  #cta-row{gap:10px}
  #toPaint{width:48px;height:48px;padding:0}
  #toPaint .to-paint-label{display:none}
}

#toPaint.pill.primary{--fill:var(--pos-lime);--edge:var(--fill);color:var(--pos-ink)}
#toPaint.pill.primary:hover:not(:disabled):not([data-c]){--fill:color-mix(in srgb,var(--pos-lime) 70%,var(--pos-paper));--edge:var(--fill);color:var(--pos-ink)}

.skin-choice .blank-tip.blank-tip{position:absolute;z-index:4;left:-60px;right:-60px;margin:0 auto;width:max-content;bottom:calc(100% + 12px);padding:7px 12px 6px;white-space:nowrap;font:normal 18px/1 Piece,sans-serif;color:var(--pos-ink);pointer-events:none}

.skin-choice .blank-tip::before,.skin-choice .blank-tip::after{content:"";position:absolute;clip-path:polygon(0 0,100% 0,50% 100%)}
.skin-choice .blank-tip::before{left:calc(50% - 8px);bottom:-8px;width:16px;height:11px;background:var(--pos-ink)}
.skin-choice .blank-tip::after{left:calc(50% - 5.75px);bottom:-2.9px;width:11.5px;height:7.9px;background:var(--pos-paper)}
@media(max-width:540px){.skin-choice .blank-tip.blank-tip{font-size:15px;padding:5px 9px 4px;bottom:calc(100% + 9px)}}

@media(max-width:1500px){#cta-row{bottom:calc(clamp(46px,5vh,50px) + 160px + var(--model-footer-lift,0px))}}
@media(max-width:900px){#cta-row{bottom:calc(178px + var(--model-footer-lift,0px))}}
@media(max-width:540px){

  #cta-row{bottom:calc(var(--picker-bottom) + 2 * var(--picker-row) + var(--picker-gap) + 24px)}
  .skin-choice .blank-tip.blank-tip{animation:none!important}
  .skin-choice:first-child .blank-tip.blank-tip{left:50%;right:auto;margin:0;bottom:4px;transform:translateX(calc(-50% - var(--picker-width) / 6))}
  .skin-choice:first-child .blank-tip::before,.skin-choice:first-child .blank-tip::after{left:auto;clip-path:polygon(0 0,100% 50%,0 100%)}
  .skin-choice:first-child .blank-tip::before{right:-8px;bottom:calc(50% - 8px);width:11px;height:16px}
  .skin-choice:first-child .blank-tip::after{right:-2.9px;bottom:calc(50% - 5.75px);width:7.9px;height:11.5px}
}
.skin-choice[aria-pressed="true"] .blank-tip{display:none}
.skin-choice .blank-tip.blank-tip{animation-delay:1.7s}
.skin-choice .year-tip{--panel-fill:var(--pos-lime)}
.skin-choice .year-tip::after{background:var(--pos-lime)}
.skin-choice[aria-pressed="true"] .year-tip{display:block}
.skin-choice .year-tip.year-tip{animation-delay:3.1s}
