/* Opening ceremony */
#judgeIntroDialog {
  padding:0; border:0; margin:auto; inset:0; width:100vw; max-width:none;
  height:100dvh; max-height:none; color:#fff8ea; background:#0d2740;
  overflow:auto; overscroll-behavior:contain;
}
#judgeIntroDialog::backdrop { background:#0d2740; }
.welcome-stage {
  box-sizing:border-box; isolation:isolate; position:relative; min-height:100%;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:clamp(8px,1.6vh,18px); text-align:center;
  padding:max(18px,env(safe-area-inset-top)) 16px max(18px,env(safe-area-inset-bottom));
  background:linear-gradient(180deg,#071c37e8 0%,#102f4e9c 29%,#10284025 52%,#0b233dd9 79%,#091b32 100%),url("../elflympics-village-desktop.avif") center/cover;
}
.welcome-heading p {margin:4px 0 7px;color:#ffe7af;font:700 clamp(9px,2.7vw,13px)/1.3 system-ui;letter-spacing:.19em;text-transform:uppercase}
.welcome-crest {width:auto;height:clamp(34px,8dvh,78px);filter:drop-shadow(0 2px 8px #06172e);}
#welcomeTitle {margin:0;color:#fff9ef;font:italic 500 clamp(18px,3.4vh,32px)/1.05 Georgia,serif;text-shadow:0 2px 8px #091c30;}
#welcomeTitle:focus {outline:none}
#welcomeTitle strong {display:block;font:700 clamp(46px,min(15vw,10vh),94px)/1 Georgia,serif;letter-spacing:-.055em;}
.welcome-judges {display:flex;justify-content:center;width:min(100%,660px);gap:clamp(0px,2vw,18px);}
.welcome-judges figure {margin:0;min-width:0;width:48%;}
.welcome-judges img {display:block;width:100%;height:clamp(140px,40dvh,420px);object-fit:contain;object-position:center bottom;filter:drop-shadow(0 5px 7px #05162383);}
.welcome-judges figcaption {display:inline-block;color:white;background:#0c263ee8;border-radius:16px;padding:4px 12px;font:600 clamp(12px,3vw,16px)/1.4 system-ui;}
.welcome-speech {width:min(100%,500px);}
.welcome-speech p {margin:0 auto 12px;max-width:28em;color:#fffaf1;font:italic 500 clamp(18px,3.3vh,29px)/1.25 Georgia,serif;text-wrap:balance;text-shadow:0 1px 6px #05162d;}
#welcomeEnter {border:1px solid #bfd9e59c;border-radius:100px;background:#122d46;color:#fff;padding:8px 20px;min-height:44px;font:650 15px/1.2 system-ui;}
#welcomeEnter span {margin-left:6px;color:#ffe7af;}
@media(max-width:600px){.welcome-stage{background-image:linear-gradient(180deg,#071c37e8 0%,#102f4ea8 29%,#10284025 52%,#0b233dd9 79%,#091b32 100%),url("../elflympics-village-mobile.avif");}}
@media(prefers-reduced-motion:no-preference){#judgeIntroDialog[open] .welcome-judges {animation:welcome-arrival .5s ease-out both;}@keyframes welcome-arrival{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}}

/* Full-screen judges' introduction, following the opening ceremony. */
#judgeIntroDialog .welcome-stage[hidden]{display:none!important}
.intro-stage{display:grid;height:100%;min-height:100%;grid-template-rows:minmax(0,1fr) 44px;justify-items:center;align-items:center;gap:clamp(8px,1.4dvh,16px)}
.intro-feature{display:grid;grid-template-rows:auto minmax(0,1fr);justify-items:center;align-items:center;gap:clamp(6px,1dvh,12px);width:min(100%,980px);height:100%;min-height:0}
#introJudgeArt{display:block;flex:none;width:min(100%,480px);height:100%;max-height:clamp(125px,64dvh,680px);min-height:0;object-fit:contain;object-position:center bottom;filter:drop-shadow(0 6px 12px #05162383)}
.intro-dialogue{width:min(100%,590px);text-align:center;font-size:clamp(16px,4.7vw,32px);height:calc(5.12em + 1.5rem + 6px);display:flex;flex-direction:column;justify-content:safe center;align-items:center;overflow:auto}
#introJudgeName{flex:none;margin:6px 0 0;color:#ffe7af;font:650 clamp(14px,3.2vw,20px)/1.2 system-ui;text-shadow:0 2px 6px #06172e}
#introJudgeSpeech{flex:none;margin:0;color:#fffaf1;font:italic 500 1em/1.28 Georgia,serif;text-wrap:balance;text-shadow:0 2px 7px #05162d}
.intro-controls{display:grid;grid-template-columns:1fr 1fr;align-items:center;width:min(100%,500px);height:44px;gap:12px}
#judgeIntroBack,#judgeIntroNext{width:min(100%,164px);height:44px;min-height:44px;font:650 15px/1.2 system-ui;color:#fff8ea;outline:none!important;border:1px solid #bfd9e59c;border-radius:100px;background:#122d46;padding:8px 10px;white-space:nowrap;text-align:center}
#judgeIntroBack{grid-column:1;grid-row:1;justify-self:start}
#judgeIntroNext{grid-column:2;grid-row:1;justify-self:end}
@media(min-width:760px) and (min-aspect-ratio:4/3){.intro-feature{gap:clamp(6px,1dvh,12px)}#introJudgeArt{max-height:clamp(140px,68dvh,740px);width:min(100%,610px)}.intro-dialogue{width:min(100%,850px)}.intro-controls{width:min(100%,580px)}}
@media(max-height:470px){#introJudgeArt{max-height:48dvh}.intro-dialogue{font-size:16px}.intro-stage,.intro-feature{gap:6px}#introJudgeName{margin-top:4px}}

@media(max-width:360px){#judgeIntroBack,#judgeIntroNext{font-size:13px;padding-inline:5px}}
