/* The secret entrance uses the same cobalt, amber and pink arcade frame as the garden. */
body[data-gate="locked"] #game-shell{display:none!important}
body[data-gate="locked"]{overflow-x:hidden;overflow-y:auto;min-height:100svh;padding:0;background:#080d2b;color:#e4eaff}
.story-gate{position:relative;isolation:isolate;display:flex;flex-direction:column;align-items:center;justify-content:center;width:100%;min-height:100svh;padding:max(42px,env(safe-area-inset-top)) max(30px,env(safe-area-inset-right)) max(28px,env(safe-area-inset-bottom)) max(30px,env(safe-area-inset-left));overflow:hidden;background:radial-gradient(ellipse at 24% 45%,#273a8c66 0,transparent 62%),radial-gradient(ellipse at 85% 60%,#68255638 0,transparent 48%);transition:opacity .45s ease}
.story-gate::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(#7796f708 1px,transparent 1px),linear-gradient(90deg,#7796f708 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(transparent,#000 25%,#000 75%,transparent)}
.story-gate .gate-shell{position:relative;display:grid;grid-template-columns:minmax(0,1.38fr) minmax(0,1fr);grid-template-rows:auto minmax(550px,auto);align-items:stretch;width:min(1120px,100%);border:3px solid #6774b2;background:#0c1438;box-shadow:0 0 0 2px #101837,0 0 0 5px #263263,8px 9px 0 #04091e,0 25px 90px #00092a99}
.story-gate .gate-shell::before,.story-gate .gate-shell::after{content:"";position:absolute;top:-5px;width:64px;height:3px;background:#f7ca77;box-shadow:0 0 8px #ffcd6d55;pointer-events:none;z-index:5}
.story-gate .gate-shell::before{left:-5px}
.story-gate .gate-shell::after{right:-5px}
.story-gate .gate-topbar{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:41px;padding:11px 17px;border-bottom:2px solid #46568a;background:#111b42;color:#b5c8ef;font-size:8px;line-height:1.8;letter-spacing:.4px}
.story-gate .gate-topbar>span:first-child{display:flex;align-items:center;gap:11px}
.story-gate .gate-topbar .status-light{display:inline-block;width:6px;height:6px;background:#ffd583;box-shadow:0 0 9px #ffb95788;flex:0 0 auto}
.story-gate .gate-sound{flex:0 0 auto;min-height:40px;padding:8px 10px;border:1px solid #6476ad;background:#15234b;color:#e7d7ad;font-size:7px;line-height:1.5;letter-spacing:0;white-space:nowrap;box-shadow:2px 2px #050c25}
.story-gate .gate-sound:hover{background:#26386b;border-color:#efc47b}
.story-gate .gate-sound[aria-pressed="true"]{color:#b8efe4;border-color:#659d9d}
.story-gate .gate-sound svg{width:16px;height:16px}
.story-gate .gate-sound:focus-visible{outline:2px solid #ffd16c;outline-offset:4px}
.story-gate .gate-topbar-hearts{display:flex;align-items:center;gap:7px;color:#ff7ab5;font-size:13px;line-height:1;letter-spacing:4px;filter:drop-shadow(0 0 4px #ff6aaf44)}
.story-gate .gate-art{position:relative;min-width:0;min-height:550px;overflow:hidden;border-right:2px solid #46568a;background:#0d1d4c}
.story-gate .gate-art::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;box-shadow:inset 0 0 0 1px #e9ba6b24,inset -18px 0 32px #03092535; background:linear-gradient(0deg,#060c3088 0,transparent 23%)}
.story-gate .gate-illustration{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;object-position:50% 55%;image-rendering:pixelated;image-rendering:crisp-edges}
.story-gate #gate-scene{position:absolute;inset:0;z-index:2;display:block;width:100%;height:100%;pointer-events:none;image-rendering:pixelated;image-rendering:crisp-edges}
.story-gate .gate-cat-note{position:absolute;top:var(--cat-note-top,43%);left:var(--cat-note-left,61%);right:auto;bottom:auto;transform:none;z-index:3;box-sizing:border-box;width:166px;max-width:calc(100% - 16px);height:48px;margin:0;padding:8px 10px;border:2px solid #e3c38d;background:#111b42f5;box-shadow:3px 3px #04091e;color:#ffe5b2;font-size:7px;line-height:1.9;white-space:pre;text-align:center;pointer-events:none;opacity:0;visibility:hidden;transition:opacity .3s ease,visibility .3s ease}
.story-gate .gate-cat-note[data-note-state="visible"]{opacity:1;visibility:visible}
.story-gate .gate-cat-note[hidden]{display:none}
.story-gate .gate-cat-note::before{content:"";position:absolute;top:auto;bottom:-8px;left:calc(var(--cat-note-tail,50%) - 7px);width:10px;height:8px;background:#e3c38d;clip-path:polygon(0 0,100% 0,100% 25%,80% 25%,80% 50%,60% 50%,60% 75%,40% 75%,40% 50%,20% 50%,20% 25%,0 25%)}
.story-gate .gate-cat-note::after{content:"";position:absolute;bottom:-4px;left:calc(var(--cat-note-tail,50%) - 5px);width:6px;height:4px;background:#111b42;clip-path:polygon(0 0,100% 0,100% 50%,67% 50%,67% 100%,33% 100%,33% 50%,0 50%)}
.story-gate .gate-content{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;min-width:0;padding:38px 38px 40px;background:radial-gradient(ellipse at 90% 0,#28377580,transparent 63%),linear-gradient(150deg,#111c46,#0c1334)}
.story-gate .gate-content::after{content:"";position:absolute;inset:9px;border:1px solid #52649926;pointer-events:none}
.story-gate #gate-title{margin:0 0 23px;font-size:clamp(25px,2.8vw,33px);font-weight:400;line-height:1.65;letter-spacing:-1px;color:#f7e5bf;text-shadow:3px 3px #18214b,0 0 22px #ffe0a51c}
.story-gate #gate-title span{color:#ff91c8;text-shadow:3px 3px #5b245b,0 0 20px #fc5cb533}
.story-gate .gate-copy{max-width:390px;margin:0 0 29px;color:#b0c2e7;font-size:9px;line-height:2.25;letter-spacing:0}
.story-gate #gate-form{width:100%;margin:0}
.story-gate #gate-form label{display:block;margin:0 0 11px;color:#ffe1a5;font-size:8px;line-height:1.8}
.story-gate .gate-input-wrap{position:relative;border:2px solid #596faa;background:#080f2e;box-shadow:inset 0 0 0 3px #101b42,2px 2px #04091e;transition:border-color .2s,box-shadow .2s}
.story-gate .gate-input-wrap:focus-within{border-color:#efc47b;box-shadow:inset 0 0 0 3px #101b42,0 0 0 2px #ffd16b22,0 0 20px #ffd16b18}
.story-gate #gate-password{display:block;width:100%;height:57px;padding:13px 45px 13px 15px;border:0;border-radius:0;background:transparent;outline:none;font-family:var(--pixel);font-size:16px;line-height:1.5;letter-spacing:3px;color:#fff0cf;caret-color:#ffd58c;touch-action:manipulation;-webkit-user-select:text;user-select:text}
.story-gate #gate-password::placeholder{font-size:9px;letter-spacing:0;color:#859dce;opacity:1}
.story-gate .gate-input-star{position:absolute;right:16px;top:50%;transform:translateY(-50%);font-size:17px;color:#f2c47a;pointer-events:none}
.story-gate .gate-feedback{min-height:43px;margin:12px 0 12px;font-size:8px;line-height:2.1;color:#90aad7}
.story-gate .gate-submit{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:57px;padding:16px 17px;border:2px solid #ffbfcb;background:linear-gradient(0deg,#a9337a,#c34491);box-shadow:4px 4px #55214d,0 0 0 1px #2c153b,inset 0 2px #e46daa55;color:#fff2d8;text-shadow:1px 2px #602455;font-family:var(--pixel);font-size:9px;line-height:1.9;transition:transform .12s,background .18s,box-shadow .12s;touch-action:manipulation}
.story-gate .gate-submit:hover{background:#d7559f;box-shadow:4px 4px #55214d,0 0 0 1px #2c153b,0 0 25px #ff60a12e}
.story-gate .gate-submit:active{transform:translate(3px,3px);box-shadow:1px 1px #55214d,0 0 0 1px #2c153b}
.story-gate .gate-submit:focus-visible{outline:2px solid #ffe0a0;outline-offset:5px}
.story-gate .gate-submit span{color:#ffe1a5;font-size:17px}
.story-gate .gate-submit:disabled{cursor:default;pointer-events:none;background:#184c61;border-color:#7de6db;box-shadow:4px 4px #102d48;color:#cffcf3;text-shadow:none}
.story-gate .gate-stars{position:absolute;inset:0;z-index:-1;pointer-events:none}
.story-gate .gate-stars i{position:absolute;left:6%;top:13%;width:3px;height:11px;background:#7994e1;opacity:.45;animation:gate-spark 6s ease-in-out infinite}
.story-gate .gate-stars i::after{content:"";position:absolute;left:-4px;top:4px;width:11px;height:3px;background:inherit}
.story-gate .gate-stars i:nth-child(2){left:88%;top:10%;transform:scale(.7);animation-delay:-2s;background:#ffd16c}
.story-gate .gate-stars i:nth-child(3){left:96%;top:55%;transform:scale(.5);animation-delay:-4s;background:#ff91c8}
.story-gate .gate-stars i:nth-child(4){left:3%;top:74%;transform:scale(.6);animation-delay:-1s;background:#61e7e0}
.story-gate .gate-stars i:nth-child(5){left:30%;top:93%;transform:scale(.4);animation-delay:-3s}
.story-gate .gate-stars i:nth-child(6){left:73%;top:90%;transform:scale(.6);animation-delay:-5s;background:#ffd16c}
.story-gate[data-state="error"] .gate-input-wrap{border-color:#ff91b3;animation:gate-nope .3s ease-out}
.story-gate[data-state="error"] .gate-feedback{color:#ffadcb}
.story-gate[data-state="opening"] .gate-feedback{color:#8fe7d9}
.story-gate[data-state="opening"] .gate-input-wrap{border-color:#7de6db}
.story-gate[data-state="opening"] .gate-shell{border-color:#d4b66e;transition:border-color .5s}
.story-gate[data-state="opening"]{animation:gate-depart .9s ease forwards}
body[data-gate="open"] .story-gate{opacity:0;pointer-events:none}
@keyframes gate-depart{0%,72%{opacity:1}100%{opacity:0}}
@keyframes gate-spark{0%,100%{opacity:.25}50%{opacity:.7}}
@keyframes gate-nope{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}65%{transform:translateX(3px)}}
@media(min-width:801px) and (max-width:950px){
  .story-gate{padding-left:24px;padding-right:24px}
  .story-gate .gate-shell{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);grid-template-rows:auto minmax(520px,auto)}
  .story-gate .gate-art{min-height:520px}
  .story-gate .gate-content{padding:31px 25px 33px}
  .story-gate #gate-title{font-size:26px;letter-spacing:-.8px}
  .story-gate .gate-copy{font-size:8px}
  .story-gate .gate-submit{font-size:8px;padding-left:13px;padding-right:13px}
}
@media(min-width:801px) and (max-height:750px){
  .story-gate{padding-top:max(25px,env(safe-area-inset-top));padding-bottom:max(20px,env(safe-area-inset-bottom))}
  .story-gate .gate-shell{grid-template-rows:auto minmax(510px,auto)}
  .story-gate .gate-art{min-height:510px}
  .story-gate .gate-content{padding-top:28px;padding-bottom:28px}
  .story-gate .gate-copy{margin-bottom:23px}
  .story-gate #gate-title{font-size:clamp(24px,2.8vw,29px);margin-bottom:18px}
}
@media(max-width:800px){
  .story-gate{min-height:100svh;justify-content:center;padding:max(22px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));overflow:visible}
  .story-gate .gate-shell{grid-template-columns:1fr;grid-template-rows:auto auto auto;max-width:450px;box-shadow:0 0 0 2px #101837,0 0 0 4px #263263,5px 6px 0 #04091e,0 20px 50px #00092a99}
  .story-gate .gate-shell::before,.story-gate .gate-shell::after{width:42px}
  .story-gate .gate-topbar{min-height:35px;padding:8px 11px;font-size:6px;letter-spacing:.1px}
  .story-gate .gate-topbar>span:first-child{gap:8px}
  .story-gate .gate-sound{font-size:6px;gap:6px;min-height:44px;padding:8px}
  .story-gate .gate-topbar-hearts{font-size:11px;letter-spacing:3px}
  .story-gate .gate-art{width:100%;height:clamp(205px,59vw,248px);min-height:0;border-right:0;border-bottom:2px solid #46568a}
  .story-gate .gate-illustration{object-position:50% 55%}
  .story-gate .gate-art::after{box-shadow:inset 0 0 0 1px #e9ba6b24;background:linear-gradient(0deg,#060c3099,transparent 35%)}
  .story-gate .gate-cat-note{width:142px;height:42px;padding:6px 8px;font-size:6px;line-height:1.9}
  .story-gate .gate-content{padding:25px 24px 29px}
  .story-gate .gate-content::after{inset:7px}
  .story-gate #gate-title{text-align:center;font-size:25px;line-height:1.5;letter-spacing:-.7px;margin:0 0 17px;max-width:none}
  .story-gate .gate-copy{font-size:8px;line-height:2.1;text-align:center;max-width:340px;margin:0 auto 23px}
  .story-gate #gate-form label{font-size:8px;margin-bottom:9px}
  .story-gate #gate-password{height:53px;padding-left:13px}
  .story-gate #gate-password::placeholder{font-size:8px}
  .story-gate .gate-feedback{min-height:35px;margin:10px 0 11px;font-size:7px;line-height:2.1}
  .story-gate .gate-submit{min-height:54px;padding:14px;font-size:8px}
}
@media(max-width:360px){
  .story-gate{padding-left:max(15px,env(safe-area-inset-left));padding-right:max(15px,env(safe-area-inset-right))}
  .story-gate .gate-content{padding-left:19px;padding-right:19px}
  .story-gate .gate-art{height:193px}
  .story-gate #gate-title{font-size:23px}
  .story-gate .gate-copy{font-size:7px}
  .story-gate .gate-submit{font-size:7px}
}
@media(max-width:800px) and (max-height:740px){
  .story-gate{justify-content:flex-start;padding-top:max(17px,env(safe-area-inset-top))}
  .story-gate .gate-art{height:190px}
  .story-gate .gate-content{padding-top:21px;padding-bottom:25px}
  .story-gate #gate-title{font-size:23px;margin-bottom:14px}
  .story-gate .gate-copy{margin-bottom:20px}
}
@media(prefers-reduced-motion:reduce){.story-gate,.story-gate *,.story-gate *::before,.story-gate *::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
