/* Roulette tension comes from a steady glow; the photo never shakes. */
.photo-shell,
.is-spinning .photo-shell,
.is-result .photo-shell{
  transform:none!important;
  transition:none;
  will-change:auto;
}
.photo-shell{--draw-glow:0}
.is-spinning .photo-shell{
  box-shadow:
    0 0 0 calc(1px + 2px * var(--draw-glow,0)) rgba(255,220,101,calc(.62 * var(--draw-glow,0))),
    0 0 calc(8px + 26px * var(--draw-glow,0)) rgba(255,220,101,calc(.5 * var(--draw-glow,0))),
    6px 6px 0 var(--lavender,#d7dff2);
}

/* Thin blue outlines and a white halo make every detected face readable. */
body.is-editing .candidate-ring{
  stroke:var(--blue,#2455db);
  stroke-width:1.5;
  vector-effect:non-scaling-stroke;
  filter:drop-shadow(0 0 1.25px rgba(255,255,255,.98));
}
body.is-editing .candidate.is-drawn .candidate-ring{
  stroke:rgba(67,130,92,.85);
  stroke-width:1.5;
  stroke-dasharray:4 4;
  vector-effect:non-scaling-stroke;
}
.candidate-number-label{
  fill:#fff;
  font-weight:850;
  pointer-events:none;
}
.candidate-hit:focus-visible{
  outline:none;
  stroke:var(--blue,#2455db);
  stroke-width:2.5;
  vector-effect:non-scaling-stroke;
  fill:rgba(36,85,219,.08);
}
@media(hover:hover){
  body.is-editing .candidate-hit:hover{
    stroke:rgba(36,85,219,.55);
    stroke-width:1.5;
    vector-effect:non-scaling-stroke;
  }
}
.spotlight-ring{
  stroke:var(--yellow,#ffdc65);
  stroke-width:3;
  vector-effect:non-scaling-stroke;
  filter:none;
}
.is-spinning .spotlight-ring{
  filter:drop-shadow(0 0 calc(1px + 7px * var(--draw-glow,0)) rgba(255,220,101,calc(.18 + .65 * var(--draw-glow,0))));
}
.winner-ring{
  stroke:var(--yellow,#ffdc65);
  stroke-width:3.5;
  vector-effect:non-scaling-stroke;
}
.photo-stage .winner-reveal{background:rgba(14,24,37,.16)}

/* One compact setup column, with the two real photo sources equally clear. */
.home-copy>.eyebrow,
.home-copy>.hero-description,
.home-features,
.hero-visual,
.visual-tape,
.visual-note{display:none}
.home-screen{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:start;
  max-width:760px;
  margin-inline:auto;
  padding-top:34px;
  padding-bottom:40px;
  gap:30px;
}
.home-copy{width:100%;min-width:0}
.home-copy h1{
  margin:0 0 26px;
  font-size:42px;
  line-height:1.25;
  letter-spacing:-.035em;
}
.home-copy .highlight:after{height:12px;bottom:1px;right:2px}
.home-copy .setting-group{padding-top:15px}
.home-copy .setting-group legend{font-size:13px}
.home-copy .choice-row{gap:12px;margin-bottom:18px}
.home-copy .choice{min-height:48px;font-size:14px}
.home-copy .settings-bottom{
  grid-template-columns:minmax(0,1fr) minmax(170px,.6fr);
  align-items:center;
  gap:24px;
  margin-bottom:25px;
}
.home-copy .switch-label{min-height:48px}
.home-copy .switch-label strong{font-size:13px}
.home-copy .duration-label{
  display:flex;
  flex-direction:row;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  font-size:12px;
}
.home-copy .duration-label select{min-width:105px;min-height:46px;font-size:13px;padding:9px 11px}
.photo-source-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px;
  align-items:stretch;
}
.photo-source-actions .home-secondary{display:contents}
#openCamera,
#chooseHomePhoto{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  min-height:64px;
  margin:0;
  padding:17px 21px;
  border:2px solid var(--ink,#202d38);
  border-radius:3px;
  box-shadow:4px 4px 0 var(--ink,#202d38);
  font-size:15px;
  line-height:1.5;
  font-weight:800;
  text-align:left;
  text-decoration:none;
}
#openCamera{background:var(--coral,#f57950)}
#chooseHomePhoto{background:var(--blue,#2455db);color:#fff}
#chooseHomePhoto:not(:disabled):hover{background:#1946c2;text-decoration:none}
#chooseHomePhoto>span:last-child,#openCamera>span:last-child{margin-left:auto;font-size:21px;line-height:1}
.home-copy>.home-secondary{margin-top:15px}
.home-copy>.privacy-note{margin-top:14px;font-size:11px}

/* Keep the existing sound control readable without changing its behavior. */
#soundToggle{background:var(--mint,#d6ebdc)}
#soundToggle[aria-pressed=false]{background:#f0eee7;color:var(--muted,#60656b)}
#soundIcon{display:grid;place-items:center;line-height:1}
#soundIcon svg{display:block;width:22px;height:22px}

@media(max-width:800px){
  .home-screen{padding-top:29px;padding-bottom:34px;gap:27px}
  .game-panel>.draw-button{
    grid-column:2;
    grid-row:1/4;
    align-self:center;
    margin:0 0 10px;
  }
  .game-panel>#editCandidates{grid-column:2;grid-row:4}
  .game-panel>#resetHistory{grid-column:2;grid-row:5}
}
@media(max-width:620px){
  .home-screen{padding-top:27px;padding-bottom:30px;gap:25px}
  .home-copy h1{margin:0 0 23px;font-size:34px}
  .home-copy .choice-row{gap:10px}
  .home-copy .choice{font-size:13px}
  .home-copy .settings-bottom{grid-template-columns:minmax(0,1fr) auto;gap:16px;margin-bottom:23px}
  .home-copy .switch-label strong{font-size:12px}
  .home-copy .duration-label{gap:8px;font-size:11px}
  .home-copy .duration-label select{min-width:87px;padding-inline:9px;font-size:12px}
  .photo-source-actions{grid-template-columns:minmax(0,1fr);gap:13px}
  #openCamera,#chooseHomePhoto{min-height:62px;font-size:15px;padding:16px 19px}
}
@media(max-width:360px){
  .home-copy .settings-bottom{gap:11px}
  .home-copy .duration-label{gap:6px;font-size:10px}
  .home-copy .duration-label select{min-width:78px;padding-inline:7px}
}
@media(prefers-reduced-motion:reduce){
  .photo-shell,
  .is-spinning .photo-shell,
  .is-result .photo-shell{
    transform:none!important;
    transition:none!important;
    will-change:auto!important;
  }
  .is-spinning .photo-shell{box-shadow:0 0 0 2px rgba(255,220,101,.4),6px 6px 0 var(--lavender,#d7dff2)}
  .is-spinning .spotlight-ring{filter:none;stroke:var(--yellow,#ffdc65)}
}
