* { box-sizing: border-box }
:root { color-scheme: light; font-family: system-ui, sans-serif; color: #242824; background: #f7f5ef; accent-color: #23564b }
body { margin: 0 }
body:has(dialog[open]) { overflow: hidden }
.intro, main { padding-inline: max(5vw, calc((100vw - 1300px)/2)) }
.intro { padding-block: clamp(2.5rem, 7vw, 6rem) 2.5rem; border-bottom: 1px solid #d5d9ce; background: #e9eee5 }
.organizer { color: #295548; font-weight: 650 }
h1, h2, h3 { font-family: Georgia, serif; font-weight: 400; line-height: 1.04 }
h1 { margin: .25em 0; font-size: clamp(2.1rem, 7vw, 6rem); letter-spacing: -.045em }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); margin: 0 0 1.4rem }
h3 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 .7rem }
nav, .actions, .viewer-toolbar { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center }
nav { margin-block: 1.5rem; scroll-margin-top: 1rem }
#back-to-nominations { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 1; background: #23564b; color: white; padding: .65rem .9rem; border: 1px solid #fff; border-radius: .4rem; box-shadow: 0 2px 8px #0003; text-decoration: none }
#back-to-nominations:hover { text-decoration: underline }
main { padding-bottom: 4rem }
a { color: inherit; text-underline-offset: .2em }
nav a, .actions > a, button, select, .primary { display: inline-block; padding: .55rem .85rem; border: 1px solid #85958a; border-radius: .4rem; background: transparent; color: inherit; font: inherit; cursor: pointer }
nav a, .actions > a, .primary { text-decoration: none }
.primary { background: #23564b; color: white; border-color: #23564b; font-weight: 650 }
.vote { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center }
.vote small { max-width: 24rem }
a:hover, button:hover { text-decoration: underline }
:focus-visible { outline: 3px solid #258c77; outline-offset: 3px }
.nomination { padding-block: 2.7rem; border-bottom: 1px solid #d5d9ce; scroll-margin-top: 1rem }
.series + .series { margin-top: 2.6rem }
.description, figcaption, #caption { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5 }
.description { max-width: 70ch }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 1.2rem }
figure { margin: 0; min-width: 0 }
figure a { display: block; position: relative; aspect-ratio: 4 / 3; background: #eae8df; border-radius: .3rem; overflow: hidden }
figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain }
figcaption { padding: .65rem 0 }
dialog { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; color: #f3f1e9; background: #171b1b }
#viewer-screen { width: 100%; height: 100%; padding: clamp(.55rem, 2vw, 1.4rem); background: #171b1b; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: .6rem }
#viewer.photo-popup { width: min(94vw, 1180px); height: min(86dvh, 900px); margin: auto; border: 1px solid #636c66; border-radius: .75rem; box-shadow: 0 1rem 3rem #0006 }
dialog::backdrop { background: #171b1b }
#viewer.photo-popup::backdrop { background: #171b1ba6 }
.viewer-toolbar { font-size: .9rem }
.viewer-toolbar select { color-scheme: dark; background: #242b2a }
.stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .45rem; align-items: center; min-height: 0 }
.stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; touch-action: pan-y }
.stage button { padding: .55rem; font-size: 1.3rem }
.frame-details { max-width: 75ch; width: 100%; margin-inline: auto }
.frame-meta { display: flex; justify-content: space-between; gap: .5rem; font-size: .9rem }
#caption { max-height: 20dvh; overflow: auto; margin: .45rem 0 0; padding: .6rem .8rem; background: #313b36; border-radius: .35rem }
#caption:empty { display: none }
.playback { justify-content: center }
.playback[hidden] { display: none }
#viewer.browser-fullscreen { position: fixed; inset: 0; width: 100vw; height: 100dvh; border: 0; border-radius: 0 }
@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem }
  figcaption, .viewer-toolbar { font-size: .8rem }
  .viewer-toolbar button, .viewer-toolbar select { padding: .36rem }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; transition: none !important } }
