/* The full-screen verdict (mountVerdictCinema in verdict-scene.js). A condemnation opens on the
   scene alone, edge to edge, with the verdict line over the night sky. After five seconds, or a
   tap, the votes and Continue come up over the settling scene: below the verdict on an upright
   phone, in a panel on the right when the screen is wider than it is tall. Loaded last, so it
   wins over the dialog styles of every look. A council that spares everyone keeps the card. */
html:root body .overlay:has(.verdict-cinema) { padding:0; background:#05080b; overflow:hidden; }
html:root body .overlay .reveal-dialog.verdict-cinema {
  position:absolute; inset:0; width:auto; max-width:none; height:auto; max-height:none; margin:0;
  border:0; border-radius:0; box-shadow:none; background:#05080b; overflow:hidden; text-align:center;
  display:flex; flex-direction:column; gap:10px;
  padding:calc(env(safe-area-inset-top,0px) + 18px) calc(env(safe-area-inset-right,0px) + 18px) calc(env(safe-area-inset-bottom,0px) + 16px) calc(env(safe-area-inset-left,0px) + 18px);
}
html:root body .reveal-dialog.verdict-cinema:focus { outline:none; }
/* Scene at the back, a shade over it once the votes are up, words in front. */
html:root body .reveal-dialog.verdict-cinema .verdict-summary { display:block; position:static; margin:0; min-height:0; flex-shrink:0; }
html:root body .reveal-dialog.verdict-cinema .verdict-summary .condemnation-scene {
  position:absolute; inset:0; z-index:0; width:100%; height:100%; max-width:none; max-height:none; aspect-ratio:auto;
  margin:0; border-radius:0; background:#101a22;
}
.reveal-dialog.verdict-cinema::before { content:''; position:absolute; inset:0; z-index:1; pointer-events:none; opacity:0; transition:opacity .5s ease; }
.reveal-dialog.verdict-cinema[data-verdict-stage="summary"]::before { opacity:1; }
.reveal-dialog.verdict-cinema > :not(.verdict-summary), .reveal-dialog.verdict-cinema .verdict-copy { position:relative; z-index:2; }

/* The verdict line, large over the sky. */
html:root body .reveal-dialog.verdict-cinema .verdict-heading { justify-content:center; margin:0; font-size:15px; text-shadow:0 1px 8px #000; }
html:root body .reveal-dialog.verdict-cinema h2 { margin:0; font-size:34px; line-height:1.12; color:#f6ead0; text-shadow:0 2px 14px #000, 0 0 2px #000; text-wrap:balance; }
html:root body .reveal-dialog.verdict-cinema :is(.verdict-heading, h2) { transition:transform .6s cubic-bezier(.2,.7,.2,1); }

/* While the scene plays, only the verdict line and a quiet way to skip are shown. */
.reveal-dialog.verdict-cinema :is(.verdict-copy, .ballot-groups, .verdict-continue) { transition:opacity .4s ease .1s, transform .45s cubic-bezier(.2,.7,.2,1) .1s, visibility 0s; }
.reveal-dialog.verdict-cinema:not([data-verdict-stage="summary"]) :is(.verdict-copy, .ballot-groups, .verdict-continue) { visibility:hidden; opacity:0; transform:translateY(14px); transition:none; }
.reveal-dialog.verdict-cinema:not(.verdict-ready) .verdict-continue { pointer-events:none; }
html:root body .reveal-dialog.verdict-cinema .verdict-skip {
  position:absolute; z-index:2; left:50%; bottom:calc(env(safe-area-inset-bottom,0px) + 18px); transform:translateX(-50%);
  min-height:44px; padding:10px 20px; border:1px solid #deba7a66; border-radius:999px; background:#0a0e0fb8; color:#ecdfc2;
  font:500 15px/1.2 var(--lk-sans, inherit); white-space:nowrap; cursor:pointer; animation:verdict-skip-in .6s ease 1.2s both;
}
.reveal-dialog.verdict-cinema[data-verdict-stage="summary"] .verdict-skip { display:none; }
@keyframes verdict-skip-in { from { opacity:0; } to { opacity:1; } }

/* The votes: the condemned brother's badge beside what he was, then the tally. */
html:root body .reveal-dialog.verdict-cinema .verdict-copy { display:grid; grid-template-columns:auto minmax(0,1fr); gap:2px 12px; align-items:center; width:auto; max-width:440px; margin:0 auto; text-align:left; }
html:root body .reveal-dialog.verdict-cinema .verdict-identity { grid-row:span 2; float:none; margin:0; }
html:root body .reveal-dialog.verdict-cinema .verdict-identity .monk-badge { width:36px; height:47px; }
html:root body .reveal-dialog.verdict-cinema .verdict-copy .verdict { margin:0; font-size:22px; line-height:1.2; text-shadow:0 1px 8px #000; }
html:root body .reveal-dialog.verdict-cinema .verdict-copy p { margin:0; font-size:15px; line-height:1.4; color:#e2dccb; text-shadow:0 1px 6px #000; }
html:root body .reveal-dialog.verdict-cinema .ballot-groups { flex:0 1 auto; min-height:0; overflow-y:auto; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:start; gap:8px; width:100%; max-width:520px; margin:0 auto; }
html:root body .reveal-dialog.verdict-cinema .ballot-group { background:#141c19e0; border-color:#5d6a52; border-radius:10px; padding:7px 10px; }
html:root body .reveal-dialog.verdict-cinema .ballot-recipient>.monk-badge { height:32px; width:25px; }
html:root body .reveal-dialog.verdict-cinema .verdict-continue { margin-top:auto!important; width:100%; max-width:520px; align-self:center; }
html:root body .reveal-dialog.verdict-cinema p.verdict-continue { text-shadow:0 1px 6px #000; }

/* Upright: the verdict line sits in the sky while the scene plays, then rises to the top with
   the votes beneath it; Continue waits at the bottom, over the watching brothers. */
@media (orientation:portrait) {
  .reveal-dialog.verdict-cinema:not([data-verdict-stage="summary"]) :is(.verdict-heading, h2) { transform:translateY(min(15dvh, 120px)); }
  .reveal-dialog.verdict-cinema::before { background:linear-gradient(#05080be6 0, #05080bcc 38%, #05080b66 56%, #05080b00 70%, #05080b00 82%, #05080bb3 100%); }
}
/* Wider than tall: the verdict line in the sky to the left of the bell tower; the votes in a
   panel on the right, clear of the stake and the fire. */
@media (orientation:landscape) {
  html:root body .overlay .reveal-dialog.verdict-cinema {
    display:grid; grid-template-columns:minmax(0,1fr) min(40%,420px); grid-template-rows:auto auto minmax(0,1fr) auto; gap:8px 28px; align-content:start; text-align:left;
  }
  html:root body .reveal-dialog.verdict-cinema :is(.verdict-heading, h2) { grid-column:1; max-width:min(30vw,340px); }
  html:root body .reveal-dialog.verdict-cinema .verdict-heading { justify-content:flex-start; }
  html:root body .reveal-dialog.verdict-cinema h2 { font-size:clamp(24px, 3.4vw, 40px); }
  html:root body .reveal-dialog.verdict-cinema .verdict-summary { grid-column:2; grid-row:1 / span 2; align-self:start; }
  html:root body .reveal-dialog.verdict-cinema .verdict-copy { margin:0; max-width:none; }
  html:root body .reveal-dialog.verdict-cinema .ballot-groups { grid-column:2; grid-row:3; align-self:start; max-height:100%; margin:0; max-width:none; grid-template-columns:repeat(2,minmax(0,1fr)); }
  html:root body .reveal-dialog.verdict-cinema .verdict-continue { grid-column:2; grid-row:4; max-width:none; margin:0!important; text-align:center; }
  .reveal-dialog.verdict-cinema::before { background:linear-gradient(90deg, #05080b00 0, #05080b00 50%, #05080bd9 62%, #05080be6 100%), linear-gradient(#05080b99, #05080b00 34%); }
}
/* A short screen, sideways: the tally tightens so it fits above Continue. */
@media (orientation:landscape) and (max-height:500px) {
  html:root body .overlay .reveal-dialog.verdict-cinema { gap:6px 22px; padding-top:calc(env(safe-area-inset-top,0px) + 12px); padding-bottom:calc(env(safe-area-inset-bottom,0px) + 10px); }
  html:root body .reveal-dialog.verdict-cinema .verdict-heading { font-size:13px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-copy .verdict { font-size:19px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-copy p { font-size:13px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-identity .monk-badge { width:28px; height:37px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-groups { gap:6px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-group { padding:5px 8px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-recipient { font-size:12px; padding-bottom:3px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-recipient>.monk-badge { height:26px; width:20px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-voters { margin-top:4px; gap:5px; }
  html:root body .reveal-dialog.verdict-cinema .ballot-voters .monk-badge { height:22px; width:17px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-skip { bottom:calc(env(safe-area-inset-bottom,0px) + 10px); }
}
/* A small upright phone: the same order, a little tighter. */
@media (orientation:portrait) and (max-height:700px) {
  html:root body .reveal-dialog.verdict-cinema h2 { font-size:29px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-copy .verdict { font-size:19px; }
  html:root body .reveal-dialog.verdict-cinema .verdict-copy p { font-size:14px; }
}
@media (prefers-reduced-motion:reduce) {
  .reveal-dialog.verdict-cinema::before, .reveal-dialog.verdict-cinema :is(.verdict-heading, h2, .verdict-copy, .ballot-groups, .verdict-continue) { transition:none!important; }
  html:root body .reveal-dialog.verdict-cinema .verdict-skip { animation:none; }
}
