.scene-vote {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(12px, 2.6vw, 22px);
}

.scene-vote .scene-main { display: contents; }
.scene-vote > .round-steps,
.scene-vote .scene-main > :not(.scene-utility) { grid-column: 1 / -1; }
.scene-vote .scene-header { align-self: center; }
.scene-vote .scene-utility { grid-column: 2; justify-content: end; }
.scene-vote .stage-title { font-size: clamp(1.9rem, 6.3vw, 3.75rem); }
.scene-vote .stage-progress { border-bottom: 1px solid var(--frame); padding-bottom: 7px; }
.vote-form { display: grid; gap: 12px; min-width: 0; }

.vote-form .phase-dock:has(.vote-lock-time) {
  grid-template-columns: max-content minmax(0, 420px);
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vote-lock-time { width: 100%; }
.vote-lock-time .phase-time {
  width: 100%;
  min-inline-size: 3.65rem;
  min-block-size: var(--dock-height);
  font-size: 1.05rem;
}

.vote-list, .recruit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-inline-size: 0;
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
}

.recruit-list > li { min-width: 0; }
.candidate-identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  text-align: start;
  line-height: 1.15;
}

.candidate-identity .player-avatar {
  width: clamp(25px, 7vw, 37px);
  height: clamp(25px, 7vw, 37px);
  border-radius: 50%;
}

.vote-option, .recruitment .button.recruit-choice {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid #79836b;
  border-radius: 5px;
  color: var(--ink);
  background: linear-gradient(154deg, #385144, #253d33 82%);
  box-shadow: inset 0 1px 0 #f7eed51c, 0 2px 0 #071912;
  font-size: .95rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.vote-option { cursor: pointer; }
.vote-option:has(input:disabled) { cursor: wait; }
.vote-option:not(:has(input:disabled)):active { transform: translateY(1px); }

@media (hover: hover) {
  .vote-option:not(:has(input:disabled, input:checked)):hover { border-color: #beba91; background: #435847; }
}

.vote-option input {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 20%;
  width: 1px;
  height: 1px;
  margin: 0;
  clip-path: inset(50%);
  transform: none;
}

.vote-mark {
  position: absolute;
  inset-inline-start: calc(7px + clamp(25px, 7vw, 37px) - 9px);
  inset-block-start: calc(50% + 4px);
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  border: 1px solid #c0ad80;
  border-radius: 50%;
  background: #233830;
  pointer-events: none;
}

.vote-option:has(input:checked) {
  border-color: #ffc568;
  color: #332418;
  background: linear-gradient(158deg, #f6dfb3, #e6bb75);
  box-shadow: inset 0 1px 0 #fff1cf, 0 2px 0 #9b5b33;
}

.vote-option:has(input:checked) .vote-mark { border-color: #ffeac2; background: #85502f; color: #fff3d8; }
.vote-option:has(input:checked):active { background: #edc789; }
.vote-option:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.vote-option input:focus-visible { outline: none; }

.vote-option:has(input:checked) .vote-mark::after, .receipt-check::after {
  width: 45%;
  height: 65%;
  margin-top: -12%;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(42deg);
  content: '';
}

.choice-receipt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 10px 13px;
  border: 1px solid #ae895b;
  border-radius: 5px;
  color: #fff0cf;
  background: linear-gradient(105deg, #513d2b, #3b3928);
  animation: choice-receipt-appear 220ms var(--ease-out) both;
}

@keyframes choice-receipt-appear {
  from { opacity: .6; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.receipt-check {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 4px;
  border: 1px solid #cc9b59;
  border-radius: 50%;
  color: #ffeab9;
  background: #65472d;
}

.receipt-copy { display: grid; gap: 1px; min-width: 0; }
.receipt-copy strong { font: 700 1.2rem/1.08 var(--serif); }
.receipt-copy .player-name { font-size: .95rem; }

.recruitment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid #8e6556;
  border-inline-start: 3px solid #e3a879;
  border-radius: 5px;
  color: #fff0d9;
  background: linear-gradient(105deg, #4e342f, #392c2a);
}

.recruitment h3 { min-width: 0; }
.recruit-note { color: #efc5af; font-size: .78rem; }
.recruit-list { grid-column: 1 / -1; }
.recruitment .button.recruit-choice {
  height: 100%;
  border-color: #b48164;
  background: #523732;
  box-shadow: inset 0 1px 0 #f7eed521, 0 2px 0 #2c201c;
}

@media (hover: hover) {
  .recruitment .button.recruit-choice:hover:not(:disabled, [aria-disabled='true']) { border-color: #f3b985; background: #694936; }
}

@media (max-width: 430px) {
  .vote-list, .recruit-list { gap: 6px; }
  .vote-option, .recruitment .button.recruit-choice { padding: 6px; font-size: .88rem; }
  .candidate-identity { gap: 6px; }
  .vote-mark { inset-inline-start: calc(clamp(25px, 7vw, 37px) - 3px); }
}

@media (max-width: 350px) {
  .scene-vote { row-gap: 10px; }
  .scene-vote .stage-title { font-size: clamp(1.6rem, 8.8vw, 1.9rem); }
  .recruitment { gap: 7px; }
  .recruitment h3 { font-size: 1.13rem; }
  .recruit-note { font-size: .74rem; }
}

@media (min-width: 520px) and (max-height: 465px) and (orientation: landscape) {
  .scene.scene-vote { row-gap: 8px; }
  .scene-vote .stage-title { font-size: clamp(1.8rem, 4.2vw, 2.65rem); }
  .scene-vote .stage-progress { padding-bottom: 5px; }
  .vote-form:has(.phase-dock) { grid-template-columns: minmax(0, 1fr) minmax(132px, 23%); }
  .vote-form .phase-dock {
    position: sticky;
    inset: max(10px, var(--safe-top)) auto auto;
    inset-block-start: max(10px, var(--safe-top), calc(40dvh - 42px));
    align-self: start;
    padding: 0;
    background: none;
  }
  .vote-form .phase-dock:has(.vote-lock-time) { grid-template-columns: minmax(0, 1fr); }
  .vote-lock-time .phase-time { min-block-size: 35px; }
  .vote-form .phase-dock > .button { width: 100%; }
  body:has(.scene-vote .phase-dock) .game-shell { padding-block-end: max(22px, calc(var(--safe-bottom) + 12px)); }
  :root:has(.scene-vote .phase-dock) { scroll-padding-block-end: calc(var(--safe-bottom) + 12px); }
}

@media (min-width: 650px) and (max-height: 465px) and (orientation: landscape) {
  .vote-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
