/* Ending archive: a quiet anomaly beneath the ordinary entrance. */
.hero-actions{display:flex;flex-direction:column;align-items:flex-start;gap:16px}
.ending-trigger{display:flex;align-items:center;gap:14px;position:relative;overflow:hidden;padding:13px 17px;min-height:60px;background:linear-gradient(110deg,#181b22ee,#0a111be8);border:1px solid #b9a27870;border-left:2px solid #d3ba87;color:#dcc698;text-align:left;box-shadow:0 8px 28px #0004;transition:border-color .25s,background .25s,transform .25s}
.ending-trigger:after{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:linear-gradient(90deg,transparent,#f3dfb690,transparent)}
.ending-trigger svg{width:22px;height:22px;flex-shrink:0}.ending-trigger strong{display:block;font-size:14px;font-weight:500;letter-spacing:.08em}.ending-trigger small{display:block;margin-top:3px;font-size:9px;color:#a8987b;letter-spacing:.13em}.ending-trigger .ending-arrow{margin-left:23px;font-size:17px;color:#c4aa78}
.ending-trigger:hover{border-color:#e3c994;background:#24241fee;transform:translateY(-2px)}.ending-trigger:focus-visible{outline:2px solid #eed9ad;outline-offset:5px}
#ending-dialog{width:680px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 28px);margin:auto;padding:0;overflow:auto;border:1px solid #a8997860;border-radius:16px;background:radial-gradient(ellipse at 50% 0%,#25303d 0%,#111922 55%,#0b121a 100%);box-shadow:0 35px 120px #0009;color:#e6edf3}
#ending-dialog::backdrop{background:#02060bd6;backdrop-filter:blur(12px)}
.ending-inner{padding:50px 40px 32px;position:relative}.ending-inner:before{content:'';position:absolute;top:0;left:20%;right:20%;height:1px;background:linear-gradient(90deg,transparent,#ddc792,transparent)}
.ending-close{position:absolute;right:15px;top:13px;width:38px;height:38px;background:#ffffff05;border:1px solid #c5d6e220;border-radius:50%;color:#a5b6c5;font-size:26px;line-height:1;z-index:1}.ending-close:hover{color:white;background:#ffffff10}
.ending-insignia{display:grid;place-items:center;width:53px;height:53px;margin-bottom:25px;border:1px solid #cdb27a60;border-radius:12px;background:#b89c5810;color:#dcc18c}.ending-insignia svg{width:26px;height:26px}
.ending-kicker{font-size:10px;letter-spacing:.24em;font-weight:500;color:#c5b18c;margin:0 0 12px}#ending-dialog h2{font-size:32px;letter-spacing:-.04em;line-height:1.35;margin:0 0 16px}.ending-description{font-size:14px;line-height:1.8;color:#a4b5c5;margin:0;word-break:keep-all}
.ending-form{margin-top:34px}.ending-code-label{display:block;color:#c8d5df;font-size:12px;margin-bottom:13px;letter-spacing:.08em}.ending-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) 14px repeat(4,minmax(0,1fr)) 14px repeat(4,minmax(0,1fr));gap:6px;align-items:center}
.ending-slots input{appearance:none;-webkit-appearance:none;min-width:0;width:100%;height:58px;border:1px solid #91a5b144;border-radius:6px;background:#060c138c;color:#edf6ff;font:500 25px/1 ui-monospace,Consolas,monospace;text-align:center;padding:0;caret-color:#e2c998;transition:border-color .2s,box-shadow .2s,background .2s}
.ending-slots input[data-filled=true]{border-color:#a8bdcd70;background:#1a283580}.ending-slots input:focus{outline:none;border-color:#e4c78a;background:#25303b;box-shadow:0 0 0 3px #e4c78a19}.ending-separator{text-align:center;color:#8997a3;font-size:20px}.ending-slots input[aria-invalid=true]{border-color:#ee7c8490}
.ending-feedback{min-height:25px;margin:12px 0;color:#a0b0be;font-size:12px;line-height:1.8}.ending-feedback.is-error{color:#ff858d}.ending-submit{display:flex;align-items:center;justify-content:space-between;width:100%;padding:15px 19px;min-height:51px;border-radius:7px;background:#d6c198;color:#151b23;font-size:14px;font-weight:600;transition:background .2s,transform .2s}.ending-submit:hover{background:#ecd8b0}.ending-submit:active{transform:scale(.99)}
.ending-footnote{display:flex;justify-content:space-between;gap:15px;margin-top:27px;padding-top:18px;border-top:1px solid #acbac71c;font-size:10px;letter-spacing:.07em;color:#778b9d}.ending-success{padding-top:18px}.ending-success h3{font-size:25px;font-weight:500;margin:0 0 15px}.ending-success .ending-description{margin-bottom:28px}.ending-success-mark{color:#bbd9ce;font-size:35px;margin-bottom:18px}.ending-inner button:focus-visible{outline:2px solid #e2c998;outline-offset:4px}
@media(max-width:650px){.hero:has(.hero-actions){min-height:780px;height:auto}.hero-actions{gap:14px}.ending-trigger{min-height:58px}#ending-dialog h2{font-size:27px}.ending-inner{padding:45px 22px 25px}.ending-form{margin-top:26px}.ending-slots{gap:clamp(2px,.8vw,6px);grid-template-columns:repeat(2,minmax(0,1fr)) 8px repeat(4,minmax(0,1fr)) 8px repeat(4,minmax(0,1fr))}.ending-slots input{height:46px;font-size:20px;border-radius:4px}.ending-description{font-size:13px}.ending-insignia{margin-bottom:20px}.ending-footnote{font-size:9px}}
@media(max-width:350px){.ending-inner{padding-left:16px;padding-right:16px}.ending-slots input{font-size:18px}.ending-footnote{letter-spacing:0}}
@media(prefers-reduced-motion:reduce){.ending-trigger,.ending-slots input,.ending-submit{transition:none}.ending-trigger:hover{transform:none}}
