:root{color-scheme:dark;background:#090d15;font-family:"Malgun Gothic","Apple SD Gothic Neo",sans-serif;color:#f4e8cf}*{box-sizing:border-box}.gate-body{margin:0;min-height:100svh;background:#090d15}.gate-art{position:fixed;inset:0;height:100svh;overflow:hidden;perspective:1400px}.gate-backdrop,.gate-atmosphere{position:absolute;inset:0}.gate-backdrop{background:url('/assets/entrance/sanctuary.webp') center/cover;animation:gate-arrival 1.8s ease-out both}.gate-atmosphere{background:linear-gradient(180deg,#04071344,#080c1322 30%,#080c1388 65%,#090d15f5)}.gate-leaf{position:absolute;background-image:url('/assets/entrance/sanctuary.webp');z-index:1;transition:transform 1s cubic-bezier(.2,.65,.2,1),filter 1s;backface-visibility:hidden}.gate-leaf.left{transform-origin:left center}.gate-leaf.right{transform-origin:right center}.gate-portal{position:absolute;background:radial-gradient(ellipse at 50% 40%,#ead29f 0%,#765b38 42%,#0b1019 80%);opacity:0;transition:opacity .2s,box-shadow 1s}.gate-main{position:relative;z-index:3;max-width:860px;margin:auto;padding:42px 24px 24px;min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:28px}.gate-heading{text-align:center;text-shadow:0 2px 20px #000}.gate-heading>p{font-size:10px;letter-spacing:.27em;color:#ead2a3}.gate-heading h1{font-family:Georgia,"Batang",serif;font-size:clamp(26px,4vw,42px);font-weight:500;letter-spacing:.06em;margin:13px 0}.gate-heading>span{font-size:13px;color:#eedab4}.gate-panel{width:100%;margin-top:100px;padding:24px 32px 20px;background:linear-gradient(145deg,#111724ef,#0b111eea);border:1px solid #b9955766;border-radius:22px;box-shadow:0 15px 70px #0008;backdrop-filter:blur(10px);text-align:center;transition:opacity .8s}.gate-seals{list-style:none;padding:0;display:flex;justify-content:center;gap:26px;margin:0 0 20px}.gate-seals[aria-busy="true"]{visibility:hidden}.gate-seals li{width:52px;display:grid;justify-items:center;gap:12px;color:#ae9b7b}.gate-seal-mark{height:35px;width:35px;display:grid;place-items:center;border:1px solid #9981596b;transform:rotate(45deg);border-radius:7px}.gate-seal-mark b{transform:rotate(-45deg);font:400 16px Georgia,serif}.gate-seal-label{font-size:11px;line-height:1.4;min-height:16px}.gate-seals [data-state="done"]{color:#b7c9a6}.gate-seals [data-state="done"] .gate-seal-mark{background:#81956a26;border-color:#a1b58c}.gate-seals [data-state="current"]{color:#ffe7af}.gate-seals [data-state="current"] .gate-seal-mark{color:#35240d;background:#ecd092;box-shadow:0 0 22px #e6b55870;border:2px solid #fff0c3}.gate-seals [data-state="current"] .gate-seal-label{font-weight:700}.gate-overline{font-size:10px;letter-spacing:.2em;color:#d6b474;margin:12px 0}.gate-panel h2{font-family:Georgia,"Batang",serif;font-size:25px;font-weight:500;margin:12px 0}.gate-prompt{font-size:14px;line-height:1.8;margin:14px auto 22px;max-width:520px;color:#e9e2d3}.gate-input{display:grid;gap:8px;text-align:left;max-width:420px;margin:0 auto 15px;font-size:12px;color:#cab791}.gate-input input{background:#080e19;border:1px solid #8d7755;border-radius:10px;padding:14px;color:#fff5df;font:inherit;font-size:17px;width:100%;min-height:48px}.gate-submit,#gate-retry,#gate-skip{font:inherit;min-height:48px;border:1px solid #e8cb8b;border-radius:10px;background:linear-gradient(120deg,#e8ca8d,#bb9857);color:#241c0f;padding:12px 25px;cursor:pointer;font-weight:700}.gate-submit{min-width:220px;display:inline-flex;align-items:center;justify-content:space-between;gap:24px}.gate-submit:disabled{opacity:.55;cursor:wait}.gate-choices{border:0;display:grid;grid-template-columns:repeat(5,1fr);gap:12px;padding:0;margin:0 0 22px}.gate-choice{position:relative;cursor:pointer;min-width:0}.gate-choice input{position:absolute;opacity:0;inset:0}.gate-choice span{display:block;border:2px solid #8c796047;border-radius:12px;padding:5px;background:#ffffff0a;transition:transform .2s,border-color .2s,box-shadow .2s}.gate-choice img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border-radius:7px}.gate-choice b{display:block;margin:6px;color:#e4d0a9;font-size:12px}.gate-choice input:checked+span{border-color:#ffe3a5;box-shadow:0 0 18px #e5b65b55;transform:translateY(-3px)}:focus-visible{outline:3px solid #a4d2f0;outline-offset:4px}.gate-choice input:focus-visible+span{outline:3px solid #a4d2f0;outline-offset:3px}.gate-main footer{font-size:11px;letter-spacing:.14em;color:#bca782;margin-top:8px}#gate-error{color:#ffcfad;font-size:13px;line-height:1.8;min-height:1.8em;margin:12px 0 0}.gate-black{position:fixed;z-index:8;inset:0;background:#000;opacity:0;pointer-events:none}#gate-skip{position:fixed;z-index:9;right:20px;bottom:20px;background:#111b;color:#e5d7b9;font-size:12px;border-color:#93836a}.gate-entering .gate-leaf.left{transform:rotateY(-82deg);filter:brightness(1.4)}.gate-entering .gate-leaf.right{transform:rotateY(82deg);filter:brightness(1.4)}.gate-entering .gate-portal{opacity:1;box-shadow:0 0 90px #ffc15b66}.gate-entering .gate-panel{animation:gate-panel-away 1.1s both}.gate-entering .gate-black{animation:gate-black-in .2s .95s both}.gate-particles{position:fixed;inset:0;overflow:hidden;pointer-events:none;z-index:2}.gate-particles i{position:absolute;left:var(--x);bottom:-10px;width:3px;height:3px;border-radius:50%;background:#efd79e;box-shadow:0 0 9px #f1bc62;animation:gate-drift var(--speed) var(--delay) linear infinite}.gate-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}[hidden]{display:none!important}@keyframes gate-drift{from{transform:translate(0,0);opacity:0}20%{opacity:.65}80%{opacity:.25}to{transform:translate(var(--drift),-100vh);opacity:0}}@keyframes gate-arrival{from{opacity:0;transform:scale(1.035)}to{opacity:1;transform:scale(1)}}@keyframes gate-panel-away{0%,25%{opacity:1}70%,100%{opacity:0}}@keyframes gate-black-in{from{opacity:0}to{opacity:1}}.gate-reduced *{animation:none!important;transition:none!important}.gate-reduced .gate-particles{display:none}.gate-reduced.gate-entering .gate-black{opacity:1}@media(max-width:600px){.gate-art{height:380px;position:absolute}.gate-atmosphere{background:linear-gradient(#03071055,transparent 30%,#090d15 100%)}.gate-main{padding:24px 14px 22px;gap:16px;justify-content:flex-start}.gate-heading h1{font-size:28px}.gate-heading>span{font-size:12px}.gate-panel{margin-top:105px;padding:20px 14px 14px;border-radius:18px}.gate-choices{grid-template-columns:repeat(3,1fr);gap:8px}.gate-choice span{padding:3px}.gate-panel h2{font-size:22px}.gate-prompt{font-size:13px;margin-bottom:18px}.gate-input input{font-size:16px}.gate-submit{width:100%}.gate-main footer{margin-top:auto;padding-top:10px}.gate-heading>p{font-size:8px}.gate-seals{margin-bottom:16px}}
#gate-sound {display:block;margin:12px auto 0;min-height:44px;border:1px solid #c6a96e;background:#182031;color:#f8eccd;padding:8px 18px;border-radius:20px;font:inherit;cursor:pointer;}
#gate-sound:focus-visible {outline:3px solid #ffe4a4;outline-offset:3px;}

/* Question two: a single, uncropped picture, with the quiz's shuffled order. */
.gate-enlarge{display:flex;align-items:center;justify-content:center;gap:9px;margin:0 0 14px auto;min-height:44px;padding:9px 15px;border:1px solid #bda16b8c;border-radius:10px;background:#ead19b0c;color:#f4dca8;font:inherit;font-size:14px;cursor:pointer}
.gate-enlarge:before{content:"";width:14px;height:14px;border:1.5px solid currentColor;border-radius:3px;box-shadow:inset 0 0 0 3px #15202e}
.gate-enlarge:hover{background:#ead19b20;border-color:#e6c68a}
.gate-enlarge,.gate-picture-dialog button{touch-action:manipulation;-webkit-user-select:none;user-select:none}
.gate-viewing-picture{overflow:hidden}
.gate-picture-dialog{width:min(640px,calc(100vw - 24px));max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);padding:20px;margin:auto;overflow:auto;overscroll-behavior:contain;color:#f4e8cf;background:linear-gradient(145deg,#1b2534,#0c1320);border:1px solid #d7b575a6;border-radius:20px;box-shadow:0 24px 90px #000a}
.gate-picture-dialog[open]{display:grid;gap:16px}
.gate-picture-dialog::backdrop{background:#030710dc}
.gate-picture-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.gate-picture-heading h2{margin:0;font:500 20px "Batang",Georgia,serif;color:#f9e5bb}
.gate-picture-dialog button{font:inherit;cursor:pointer;min-height:44px;border:1px solid #b79a6666;border-radius:10px;padding:9px 14px;background:#e6c68a0c;color:#f6dfb2}
.gate-picture-dialog button:hover{background:#e6c68a20;border-color:#e6c68a}
.gate-picture-close{display:flex;align-items:center;gap:10px;font-size:14px!important;flex:none}
.gate-picture-close span{font-size:22px;line-height:1}
.gate-picture-stage{position:relative;display:grid;place-items:center;margin:0;min-width:0;min-height:80px;aspect-ratio:1;max-height:calc(100vh - 252px);max-height:calc(100svh - 252px);border-radius:12px;overflow:hidden;background:#070c14}
.gate-picture-stage img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.gate-picture-stage[aria-busy="true"]:after{content:"그림을 불러오는 중…";position:absolute;bottom:10px;left:10px;right:10px;padding:9px;background:#0c1320e8;border-radius:8px;font-size:13px;text-align:center}
.gate-picture-error{position:absolute;inset:auto 8px 8px;margin:0;padding:18px;background:#0c1320f5;border-radius:8px;font-size:15px;line-height:1.7;text-align:center}
.gate-picture-dialog .gate-picture-select:disabled{opacity:.6;cursor:wait}
.gate-picture-navigation{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px}
.gate-picture-navigation button{display:flex;align-items:center;justify-content:center;gap:10px}
.gate-picture-position{margin:0;font-size:14px;color:#e9d3a5;font-variant-numeric:tabular-nums}
.gate-picture-dialog .gate-picture-select{background:linear-gradient(120deg,#e8ca8d,#bb9857);border-color:#e8cb8b;color:#241c0f;font-weight:700;min-height:48px}
.gate-picture-dialog .gate-picture-select:hover{background:#ebcc8b}
@media(max-width:420px){.gate-picture-dialog{padding:14px;border-radius:16px}.gate-picture-dialog[open]{gap:12px}.gate-picture-heading h2{font-size:18px}.gate-picture-navigation{gap:10px}.gate-picture-navigation button{padding-inline:8px}.gate-picture-stage{max-height:calc(100svh - 212px)}}
@media(max-height:500px) and (min-width:600px){
 .gate-picture-dialog{width:min(760px,calc(100vw - 24px));padding:14px}
 .gate-picture-dialog[open]{grid-template-columns:minmax(0,1fr) minmax(260px,.9fr);grid-template-rows:auto 1fr auto;gap:14px}
 .gate-picture-stage{grid-column:1;grid-row:1 / 4;max-height:calc(100svh - 68px)}
 .gate-picture-heading{grid-column:2;grid-row:1}
 .gate-picture-heading h2{font-size:18px}
 .gate-picture-navigation{grid-column:2;grid-row:2;gap:8px}
 .gate-picture-select{grid-column:2;grid-row:3}
}

/* The guardian speaks before the quiz; its dialogue progress is not quiz progress. */
.gate-welcoming .gate-main{max-width:1080px;justify-content:center;gap:28px;padding-top:26px}
.gate-welcoming .gate-heading>span,.gate-welcoming .gate-seals{display:none}
.gate-welcoming .gate-heading h1{font-size:clamp(25px,3vw,34px);margin-bottom:4px}
.gate-welcoming #gate-sound{font-size:12px;min-height:36px;padding:7px 14px;border-color:#9d855b66;background:#101725ba}
.gate-welcoming .gate-atmosphere{background:linear-gradient(180deg,#05091666,#080c1488 45%,#090d15e8)}
.gate-welcoming .gate-panel{margin:0;padding:0;background:none;border:0;box-shadow:none;backdrop-filter:none;border-radius:0}
.gate-welcoming #gate-error:empty{display:none}
.gate-welcoming .gate-main footer{margin:0;text-align:center;line-height:1.8;letter-spacing:.02em}
.gate-welcome{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);align-items:center;gap:14px;text-align:left}
.gate-guardian{position:relative;isolation:isolate;align-self:center;padding:15px 0 0;min-width:0;text-align:center;animation:guardian-appear 900ms ease-out both}
.gate-guardian img{position:relative;z-index:1;display:block;width:100%;height:auto;filter:drop-shadow(0 12px 22px #0009)}
.gate-guardian>p{color:#d3b477;font:10px Georgia,serif;letter-spacing:.23em;margin:18px 0 0;text-shadow:0 1px 12px #000}
.gate-guardian-halo{position:absolute;z-index:0;inset:0 -5% 15%;background:radial-gradient(ellipse,#efbb6330,transparent 68%);pointer-events:none}
.gate-guardian-halo:before,.gate-guardian-halo:after{content:"";position:absolute;top:1%;left:14%;width:72%;aspect-ratio:1;border-radius:50%;border:1px solid #d7b16e38;box-shadow:0 0 35px #d6a45312;animation:guardian-halo 6s ease-in-out infinite}
.gate-guardian-halo:after{top:5%;left:18%;width:64%;border-style:dashed;opacity:.45;animation-delay:-3s}
.gate-dialogue{position:relative;padding:30px 32px 15px;background:linear-gradient(135deg,#1b2432f5,#0c1321f5 75%);border:1px solid #c7a66c70;border-radius:20px;box-shadow:0 20px 70px #0006,inset 0 1px #ffe6b52b}
.gate-dialogue:before{content:"";position:absolute;top:-1px;left:16%;right:16%;height:1px;background:linear-gradient(90deg,transparent,#ffe1a6,transparent);box-shadow:0 0 16px #d9b16e55}
.gate-speaker{display:flex;align-items:center;gap:12px;color:#bca477}
.gate-speaker>span{width:8px;height:8px;transform:rotate(45deg);background:#e8cc8e;box-shadow:0 0 14px #edbd5c55;flex:none}
.gate-speaker p{margin:0;font-size:11px;letter-spacing:.08em}
.gate-speaker strong{display:block;margin-top:5px;font-size:17px;font-weight:500;color:#f1d59d;letter-spacing:.03em}
.gate-dialogue-copy{min-height:235px;padding-top:15px}
.gate-dialogue-copy h2{font-family:"Batang",Georgia,serif;font-size:clamp(23px,2.35vw,29px);line-height:1.65;letter-spacing:-.04em;color:#fff1d7;margin:10px 0 18px;text-wrap:pretty;word-break:keep-all;overflow-wrap:break-word}
.gate-dialogue-copy p{font-size:16px;line-height:1.95;font-weight:400;color:#d9d6ce;word-break:keep-all;overflow-wrap:break-word;margin:0}
.gate-dialogue-copy span{display:block}
.gate-welcome-position{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:18px 0 16px;color:#b6a88d;font-size:11px;letter-spacing:.04em}
.gate-welcome-dots{display:flex;gap:5px}
.gate-welcome-dots i{width:17px;height:3px;background:#bca36d30;border-radius:2px;transition:background .25s,box-shadow .25s}
.gate-welcome-dots .lit{background:#e7c98d;box-shadow:0 0 6px #e4b56545}
.gate-welcome-next{width:100%;min-width:0;font-size:15px;padding:14px 18px;box-shadow:0 4px 20px #bc92471c}
.gate-welcome-next b{font-size:20px;font-weight:400}
.gate-welcome-back{min-height:38px;display:flex;justify-content:center;padding-top:4px}
.gate-welcome-back button{background:none;color:#c8b48e;font:inherit;font-size:12px;border:0;min-height:36px;padding:6px 20px;cursor:pointer;text-decoration:underline;text-underline-offset:4px}
@keyframes guardian-appear{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes guardian-halo{0%,100%{opacity:.45}50%{opacity:1}}
@media(max-width:700px){
 .gate-welcoming .gate-main{max-width:500px;gap:14px;padding:18px 18px 20px;justify-content:flex-start}
 .gate-welcoming .gate-heading>p{font-size:8px;letter-spacing:.2em;margin:0 0 8px}
 .gate-welcoming .gate-heading h1{font-size:25px;margin:0}
 .gate-welcoming #gate-sound{margin-top:8px;min-height:38px}
 .gate-welcome{grid-template-columns:minmax(0,1fr);gap:0}
 .gate-guardian{width:225px;max-width:65%;margin:0 auto -7px;padding:0}
 .gate-guardian>p{display:none}
 .gate-guardian-halo{inset:-6% -8% 8%}
 .gate-dialogue{padding:22px 22px 8px;border-radius:17px}
 .gate-dialogue-copy{min-height:200px;padding-top:10px}
 .gate-dialogue-copy h2{font-size:23px;line-height:1.55;margin:8px 0 16px}
 .gate-dialogue-copy p{font-size:15px;line-height:1.85}
 .gate-speaker strong{display:inline;margin:0 0 0 8px;font-size:15px}
 .gate-speaker p{font-size:10px;letter-spacing:.02em}
 .gate-welcome-position{margin:10px 0 13px}
 .gate-welcoming .gate-main footer{font-size:10px;padding-top:0;letter-spacing:0}
}
@media(max-width:360px){
 .gate-welcoming .gate-main{padding-inline:12px;gap:10px}
 .gate-guardian{width:180px}
 .gate-dialogue{padding:18px 18px 5px}
 .gate-dialogue-copy{min-height:220px}
 .gate-dialogue-copy h2{font-size:22px}
 .gate-welcome-next{font-size:14px;padding-inline:14px}
}

/* Questions and responses continue the guardian's introductory conversation. */
.gate-conversation .gate-main{max-width:1120px;justify-content:center;gap:20px;padding-top:24px}
.gate-conversation .gate-heading>span{display:none}
.gate-conversation .gate-heading h1{font-size:clamp(25px,3vw,34px);margin-bottom:4px}
.gate-conversation #gate-sound{font-size:12px;min-height:36px;padding:7px 14px;border-color:#9d855b66;background:#101725ba}
.gate-conversation .gate-panel{margin:0;padding:0;border:0;background:none;box-shadow:none;backdrop-filter:none;text-align:left}
.gate-conversation .gate-atmosphere{background:linear-gradient(180deg,#05091666,#080c1488 45%,#090d15e8)}
.gate-conversation .gate-seals{margin:0 0 20px;gap:24px}
.gate-conversation .gate-seals li{gap:8px}
.gate-quiz{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:22px}
.gate-quiz .gate-guardian{animation:none;scroll-margin-top:16px}
.gate-quiz .gate-dialogue{padding:28px 30px 30px}
.gate-quiz .gate-overline{font-size:12px;letter-spacing:.04em;margin:22px 0 10px;color:#cbb889}
.gate-quiz #gate-title{font-size:clamp(23px,2.4vw,29px);line-height:1.55;margin:10px 0 18px;word-break:keep-all;overflow-wrap:break-word}
.gate-quiz #gate-title:focus{outline:none}
.gate-quiz .gate-prompt{font-size:16px;line-height:1.85;margin:0 0 22px;max-width:none;word-break:keep-all;overflow-wrap:break-word}
.gate-quiz .gate-input{max-width:none;margin:0 0 18px;font-size:13px}
.gate-quiz .gate-input input{min-height:50px;font-size:17px}
.gate-quiz .gate-submit{width:100%;min-width:0;font-size:15px}
.gate-quiz .gate-choices{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 22px}
.gate-quiz .gate-choice b{text-align:center;font-size:13px;margin:5px}
.gate-quiz .gate-choice span{padding:5px;background:#fff5db0b}
.gate-quiz .gate-choice input:checked+span{border-color:#ffe3a5;box-shadow:0 0 0 1px #ffe3a5}
.gate-quiz #gate-error:empty{display:none}
.gate-quiz #gate-error:not(:empty){padding:14px 16px;border-left:3px solid #d7b575;border-radius:0 9px 9px 0;background:#efd2a610;color:#f7dfb4;margin:0 0 20px;font-size:15px;line-height:1.85;word-break:keep-all}
.gate-answer-correct .gate-dialogue{border-color:#d6bc7b;background:linear-gradient(135deg,#222d2bf5,#0c1820f5 75%)}
.gate-answer-correct .gate-prompt{margin-bottom:30px}
.gate-answer-correct .gate-guardian-halo{background:radial-gradient(ellipse,#efcb7947,transparent 70%)}
@media(max-width:700px){
 .gate-conversation .gate-main{max-width:500px;padding:18px 14px 24px;gap:14px;justify-content:flex-start}
 .gate-conversation .gate-heading>p{font-size:8px;letter-spacing:.2em;margin:0 0 8px}
 .gate-conversation .gate-heading h1{font-size:25px;margin:0}
 .gate-conversation #gate-sound{margin-top:8px;min-height:38px}
 .gate-conversation .gate-seals{margin:0 0 10px;gap:20px}
 .gate-conversation .gate-seal-mark{width:28px;height:28px}
 .gate-conversation .gate-seals li{gap:7px}
 .gate-quiz{grid-template-columns:minmax(0,1fr);gap:0}
 .gate-quiz .gate-guardian{width:190px;margin:0 auto -5px;padding:0}
 .gate-quiz .gate-dialogue{padding:22px 20px 24px}
 .gate-quiz .gate-overline{margin-top:18px}
 .gate-quiz #gate-title{font-size:23px;line-height:1.5;margin-bottom:16px}
 .gate-quiz .gate-prompt{font-size:16px;line-height:1.8;margin-bottom:20px}
 .gate-quiz .gate-choices{gap:8px}
 .gate-quiz .gate-choice span{padding:3px}
}
@media(max-width:360px){
 .gate-conversation .gate-main{padding-inline:12px}
 .gate-quiz .gate-guardian{width:160px}
 .gate-quiz .gate-dialogue{padding:20px 16px}
 .gate-quiz #gate-title{font-size:22px}
 .gate-quiz .gate-submit{padding-inline:15px}
}
