@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&display=swap');
:root {color-scheme:dark;--night:#080b1d;--panel:#14182cdb;--panel2:#151a30ec;--line:#a1a4c43d;--gold:#e7d2ab;--ink:#eceefc;--muted:#a8aac8;--accent:#c4b0f5}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#080b1d;font-family:'DM Sans',system-ui,sans-serif;color:var(--ink)}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:2px solid #f3d594;outline-offset:3px}button:disabled{opacity:.5;cursor:not-allowed}a{color:inherit;text-decoration:none}.hidden{display:none!important}
.game-shell{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 42%,#303653,#17162e 56%,#0b1021)}.stars{position:absolute;inset:0;pointer-events:none;opacity:.6;background:radial-gradient(1px 1px at 12% 20%,#fff 95%,transparent) 0 0/170px 200px,radial-gradient(1px 1px at 57% 30%,#e5bcff 95%,transparent) 0 0/230px 190px}
.game-topbar{height:75px;flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:0 clamp(18px,3.2vw,56px);z-index:20;border-bottom:1px solid #cdcaf02d;background:linear-gradient(90deg,#0c1027e8,#15162fe3,#0b1025ee);backdrop-filter:blur(18px);box-shadow:0 8px 30px #05041250}.brand{display:flex;align-items:center;gap:11px}.brand-mark{width:43px;height:43px;border:1px solid #b3a6e399;border-radius:50%;display:grid;place-items:center;font-size:32px;color:#e9d8ff;box-shadow:inset 0 0 18px #b492c430,0 0 18px #bb95ff18}.brand-text{font-family:Cinzel,Georgia,serif;letter-spacing:.15em;font-size:17px;font-weight:600;white-space:nowrap}.brand-text strong{color:#f3dfb8;font-weight:600}.brand-text small{display:block;letter-spacing:.24em;color:#aab0d1;font:8px 'DM Sans',sans-serif;margin-top:4px}.top-mid{display:flex;gap:16px;align-items:center;color:#c6c5da;font-size:10px;letter-spacing:.3em;font-weight:600}.top-mid b{color:#d5b79a}.chapter-sigil{color:#edce9d;font-size:21px}.topnav{display:flex;gap:22px;align-items:center;font-size:11px;letter-spacing:.03em;color:#bbc0d9}.topnav a:hover{color:#f1d1d8}.alpha-tag{color:#eddbb5;border:1px solid #d8b98c72;padding:7px 11px;border-radius:3px;font-size:10px;letter-spacing:.16em}
.game-stage{position:relative;flex:1;min-height:690px;overflow:hidden;background:radial-gradient(circle at 51% 43%,#59688445 0%,transparent 41%),linear-gradient(180deg,#212849 0%,#23233e 41%,#2b2a45 70%,#0d152a 100%)}.scene-backdrop{position:absolute;inset:-5%;background:linear-gradient(180deg,#171b3d58,#27234378 55%,#15172df5),url('moonlit-street.webp') center 43%/cover no-repeat;filter:blur(17px) saturate(.66);opacity:.53;transform:scale(1.05)}.scene-backdrop:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#090e27ab 0%,transparent 35%,transparent 65%,#090e27b7 100%)}.mist{position:absolute;width:53vw;height:27vh;border-radius:50%;filter:blur(52px);opacity:.36;pointer-events:none}.mist-1{left:13%;bottom:8%;background:#8f77c0a0;animation:floatMist 12s ease-in-out infinite alternate}.mist-2{right:0;top:22%;background:#536fafff;animation:floatMist 16s ease-in-out infinite alternate-reverse}@keyframes floatMist{to{transform:translate(8%,9%)}}
#world{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab}#world:active{cursor:grabbing}.stage-vignette{pointer-events:none;position:absolute;inset:0;box-shadow:inset 0 0 160px 40px #090e2640;z-index:1}.particles{position:absolute;inset:0;pointer-events:none;z-index:2}.particles i{position:absolute;left:var(--x);top:var(--y);width:3px;height:3px;background:#ffecce;border-radius:50%;box-shadow:0 0 14px 4px #e0b3e083;animation:twinkle var(--d) ease-in-out infinite alternate}.particles i:nth-child(1){--x:17%;--y:19%;--d:3s}.particles i:nth-child(2){--x:24%;--y:56%;--d:2.3s}.particles i:nth-child(3){--x:42%;--y:14%;--d:4s}.particles i:nth-child(4){--x:61%;--y:28%;--d:3s}.particles i:nth-child(5){--x:78%;--y:18%;--d:3.7s}.particles i:nth-child(6){--x:91%;--y:62%;--d:2.5s}.particles i:nth-child(7){--x:5%;--y:74%;--d:4s}.particles i:nth-child(8){--x:83%;--y:77%;--d:3s}.particles i:nth-child(9){--x:55%;--y:65%;--d:4.4s}.particles i:nth-child(10){--x:45%;--y:83%;--d:2.1s}.particles i:nth-child(11){--x:71%;--y:49%;--d:3.6s}.particles i:nth-child(12){--x:30%;--y:32%;--d:2.8s}@keyframes twinkle{from{opacity:.13;transform:scale(.6)}to{opacity:.95;transform:scale(1.8)}}
.hero-title{pointer-events:none;z-index:3;position:absolute;top:1%;left:50%;transform:translateX(-50%);text-align:center;min-width:320px}.hero-title p{font-size:10px;font-weight:700;letter-spacing:.33em;color:#e1cfae;margin:0 0 11px}.hero-title h1{font:500 clamp(23px,2.6vw,35px) Cinzel,Georgia,serif;margin:0;color:#f8f4ff;text-shadow:0 2px 18px #08091d88}.hero-title h1 em{font-style:italic;color:#edd1ea}.hero-title>span{font-size:11px;letter-spacing:.03em;color:#cbc7dc;display:block;margin-top:8px}.game-hint{position:absolute;z-index:4;bottom:10%;left:50%;transform:translateX(-50%);padding:8px 17px;border:1px solid #c8bbdd54;background:#0c10369c;border-radius:20px;color:#dedcf1;font-size:11px;pointer-events:none;white-space:nowrap}
.glass{position:absolute;z-index:7;background:linear-gradient(155deg,#172039ee,#10152cfa 65%);border:1px solid #d3ccf044;box-shadow:0 14px 45px #050916a1,0 0 40px #b2a2ed10;backdrop-filter:blur(24px);border-radius:5px}.glass:before{position:absolute;content:'';pointer-events:none;inset:6px;border:1px solid #bdb5d422;border-radius:3px}.customizer{left:clamp(12px,2vw,35px);top:6%;bottom:6%;width:clamp(265px,24vw,340px);display:flex;flex-direction:column;padding:25px 20px 15px}.customizer-intro .micro,.micro{font-size:9px;color:#cfbb95;letter-spacing:.27em;font-weight:700}.customizer-intro h2{margin:7px 0 6px;font:500 25px Cinzel,Georgia,serif}.customizer-intro h2 em{color:#edcddb;font-style:italic}.customizer-intro p{font-size:11px;color:#b1b7d0;margin:0 0 20px;line-height:1.4}.field-label{font-size:9px;font-weight:700;letter-spacing:.2em;color:#d1c3bf}.name-input{display:flex;align-items:center;gap:7px;margin:8px 0 16px;padding:0 10px;border:1px solid #a7aace65;background:#0a1025b9;height:39px}.name-input span{color:#e3cda5}.name-input input{color:#f3f0ff;background:transparent;border:0;min-width:0;width:100%;font-size:13px;outline:none}.name-input input::placeholder{color:#9796b0}.tab-rail{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px;margin-bottom:13px;border-bottom:1px solid #acacc449;padding-bottom:8px}.tab-rail button{border:0;color:#a9aec8;background:#1b243f8e;padding:10px 2px 8px;display:flex;align-items:center;justify-content:center;gap:3px;flex-direction:column;font-size:17px;border-radius:3px 3px 0 0}.tab-rail button span{font-size:10px;font-weight:600}.tab-rail button.active{color:#f4d8b4;background:linear-gradient(180deg,#57547677,#33344c8d);box-shadow:inset 0 -2px #e7c89f}.option-scroll{overflow:auto;padding:2px 5px 8px 1px;min-height:0;flex:1;scrollbar-width:thin;scrollbar-color:#756f9a #131b32}.option-group{padding-bottom:16px;margin-bottom:15px;border-bottom:1px solid #b3b8d52d}.option-group h3{font-size:10px;letter-spacing:.15em;color:#dcd5e6;margin:0 0 10px;text-transform:uppercase}.swatches{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.swatch{width:100%;aspect-ratio:1;border-radius:4px;border:1px solid #e2dcf350;position:relative;background:var(--swatch);padding:0}.swatch.selected{outline:2px solid #e7cc94;outline-offset:2px}.swatch.selected:after{content:'✓';position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:11px;text-shadow:0 1px 2px #000}.item-list{display:grid;grid-template-columns:repeat(2,1fr);gap:7px}.item-choice{padding:10px 6px;border:1px solid #afb3d53c;background:#242a455e;border-radius:4px;text-align:center;color:#d9d7ea;font-size:11px;min-height:51px;display:flex;flex-direction:column;justify-content:center;gap:3px}.item-choice span{color:#bab6d2;font-size:9px}.item-choice.selected{border-color:#d8b78d;background:#7862834d;color:#fff1db;box-shadow:inset 0 0 20px #d2a7ce10}.range-row{display:grid;grid-template-columns:1fr auto;align-items:center;gap:10px;margin:0 0 8px;font-size:11px;color:#d7d4ec}.range-row input{width:100%;accent-color:#d1b3df;grid-column:1/-1}.range-value{color:#e4cda6}.hint-copy{font-size:11px;color:#b5b2ce;line-height:1.5;margin:8px 0}.customizer-bottom{padding-top:10px;display:flex;gap:6px;border-top:1px solid #aaa8c035}.ghost-button{flex:1;border:1px solid #a2a7c34b;background:#1f27416e;color:#dbd8ed;border-radius:3px;padding:9px 5px;font-size:11px}.ghost-button:hover,.secondary-button:hover,.backup-actions>*:hover{background:#56517588}
.passport{right:clamp(12px,2vw,35px);top:12%;width:clamp(225px,19.5vw,295px);padding:22px 19px 18px}.passport-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}.passport-title h2{font:500 20px Cinzel,serif;color:#f7efff;margin:7px 0 0;overflow-wrap:anywhere}.crest{color:#f2dfb9;font-size:37px;text-shadow:0 0 22px #aa9de3}.portrait-frame{height:132px;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;border:1px solid #c5b5cb55;margin-bottom:12px;background:radial-gradient(circle at 50% 45%,#686d8a66 0%,#29314b99 45%,#10192e 100%);overflow:hidden}.portrait-frame:before{content:'';position:absolute;inset:10px;border:1px solid #e6ccaf33}.portrait-star{position:absolute;top:8px;right:14px;color:#f4daa4;font-size:23px}#portraitGlyph{font:80px Georgia,serif;color:#ddc6ec;line-height:1;text-shadow:0 0 35px #ceb4e5}.portrait-frame p{position:absolute;bottom:7px;font-size:8px;font-weight:600;letter-spacing:.23em;color:#e5d7c8}.trait-line{display:flex;justify-content:space-between;align-items:center;gap:7px;border-bottom:1px solid #bcb9d135;padding:10px 2px}.trait-line span{color:#aaa8c4;font-size:9px;letter-spacing:.1em}.trait-line strong{color:#efe6ef;font-size:11px;font-weight:500;text-align:right}.camera-actions{display:flex;gap:5px;justify-content:space-between;align-items:center;margin:15px 0}.camera-actions button{width:37px;height:31px;border:1px solid #a7a7c348;background:#29304d8f;color:#f6e4e6;border-radius:3px;font-size:17px}.camera-actions span{font-size:9px;letter-spacing:.13em;color:#b9bbd3}.primary-button{width:100%;display:flex;align-items:center;justify-content:space-between;border:1px solid #f5ddb7c2;background:linear-gradient(110deg,#e0c6a0,#f8e6c8 55%,#c9aaca);color:#272437;box-shadow:0 8px 20px #e6c59e26;padding:12px 14px;font-weight:700;font-size:12px;border-radius:3px}.primary-button:hover{filter:brightness(1.08)}.secondary-button{border:1px solid #b9afcd6b;background:#2a324e93;color:#eae5f3;width:100%;margin-top:8px;padding:10px;font-size:11px;border-radius:3px}.backup-actions{display:flex;gap:7px;margin-top:7px}.backup-actions>*{flex:1;text-align:center;border:1px solid #9794bb53;background:#191f379a;color:#c9c9e3;padding:8px;font-size:10px;border-radius:3px}.backup-actions label{cursor:pointer}.save-note{text-align:center;color:#aeb6ca;font-size:10px;margin:11px 0 0;line-height:1.5}
.statusbar{height:33px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#0a0f20ef;padding:0 26px;color:#a6a9c4;letter-spacing:.07em;font-size:9px;border-top:1px solid #a9a8c039}.status-orb{display:inline-block;width:6px;height:6px;margin-right:7px;background:#b3d8a9;border-radius:50%;box-shadow:0 0 6px #a3e4d0}.bottom-filigree{position:absolute;bottom:2%;left:50%;transform:translateX(-50%);color:#dbc7e280;z-index:2;font-size:16px;letter-spacing:.3em;pointer-events:none}.toast{position:fixed;z-index:100;left:50%;bottom:45px;transform:translateX(-50%) translateY(20px);opacity:0;transition:.25s;pointer-events:none;border:1px solid #dec9b5a1;border-radius:4px;background:#1b2242f2;box-shadow:0 8px 35px #0008;padding:12px 22px;text-align:center;color:#f0e6f3;font-size:12px;max-width:90vw}.toast.visible{opacity:1;transform:translateX(-50%) translateY(0)}
.mode-scene-overlay{position:absolute;inset:0;z-index:4;pointer-events:none}.explore-top{position:absolute;top:70px;left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap}.area-title{display:block;font:500 24px Cinzel,serif;text-shadow:0 2px 16px #000}.area-sub{color:#edd6bb;font-size:10px;letter-spacing:.3em}.play-controls{position:absolute;bottom:6%;left:4%;display:flex;gap:20px;align-items:center}.play-dpad{pointer-events:auto}.play-dpad>button{display:block;margin:auto auto 2px}.play-dpad div{display:flex;gap:4px}.play-dpad button{width:43px;height:43px;border-radius:8px;border:1px solid #d2c0e680;background:#181e3da8;color:#f7e6f7;font-size:21px;touch-action:none}.play-instructions{font-size:11px;color:#e5dbf1;line-height:1.8;text-shadow:0 1px 7px #000}.explore-nav{position:absolute;top:16px;left:20px;right:20px;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:7;pointer-events:none}.explore-nav button{pointer-events:auto;color:#f0e2f1;border:1px solid #d9c9d65e;background:#161f3ac9;padding:11px 15px;border-radius:4px;font-size:12px}.explore-nav div{color:#efe3cd;font:500 15px Cinzel,Georgia,serif}
.exploring .customizer,.exploring .passport,.exploring .hero-title,.exploring .game-hint,.exploring .bottom-filigree{display:none}.exploring .scene-backdrop{opacity:.2}
@media(max-width:1180px){.top-mid{display:none}.game-stage{min-height:660px}.customizer{width:258px;top:5%;bottom:5%;padding:18px 14px}.passport{width:226px;right:12px;top:10%;padding:18px 13px}.hero-title{top:3%}.hero-title h1{font-size:24px}.hero-title>span{font-size:10px}}
@media(max-width:830px){.game-topbar{height:62px;padding:0 12px}.brand-mark{width:34px;height:34px;font-size:25px}.brand-text{font-size:13px}.brand-text small{font-size:7px}.topnav{gap:10px;font-size:10px}.topnav a{display:none}.alpha-tag{padding:6px 7px}.game-stage{min-height:1050px}.hero-title{top:2.5%;width:90%;min-width:0}.hero-title h1{font-size:clamp(20px,4.7vw,29px)}.hero-title p{font-size:9px}.hero-title>span{font-size:10px}.customizer{top:auto;bottom:12px;left:12px;width:calc(60% - 15px);height:430px;max-width:none;padding:16px 12px}.passport{top:auto;bottom:12px;right:12px;width:calc(40% - 15px);height:430px;padding:16px 12px;overflow:auto}.portrait-frame{height:85px}.passport-title h2{font-size:16px}.passport-title{margin-bottom:7px}.trait-line{padding:7px 0}.game-hint{top:49%;bottom:auto}.bottom-filigree{display:none}.statusbar span:nth-child(2){display:none}.exploring .game-stage{min-height:calc(100dvh - 95px)}.play-controls{bottom:6%}}
@media(max-width:570px){.game-stage{min-height:1160px}.hero-title{top:2%}.hero-title p{letter-spacing:.17em}.hero-title h1{font-size:21px}.hero-title>span{font-size:9px}.customizer{width:calc(100% - 24px);left:12px;bottom:260px;height:344px}.customizer-intro h2{font-size:20px}.customizer-intro p{display:none}.name-input{margin:7px 0}.tab-rail{margin-bottom:7px}.tab-rail button{padding:5px 2px}.customizer-bottom{padding-top:5px}.passport{width:calc(100% - 24px);height:239px;bottom:12px;left:12px;right:auto;display:grid;grid-template-columns:1fr 1fr;column-gap:12px;align-content:start}.passport-title{grid-column:1/-1}.portrait-frame,.trait-line{display:none}.camera-actions{margin:4px 0 7px;grid-column:1/-1;justify-content:center}.camera-actions button{flex:1}.camera-actions span{padding:0 9px}.primary-button{grid-column:1/-1}.secondary-button,.backup-actions{margin-top:5px}.save-note{display:none}.game-hint{top:47%;font-size:9px}.explore-nav{top:9px;left:8px;right:8px}.explore-nav div{display:none}.explore-nav button{font-size:10px;padding:8px}.play-controls{bottom:8%;left:12px;gap:8px}.play-instructions{font-size:9px}.statusbar{padding:0 10px;font-size:8px}}
@media(prefers-reduced-motion:reduce){.particles i,.mist{animation:none!important}}

/* Moonlit Refinement Alpha 0.5 — secret legacy character */
.legacy-trigger{cursor:pointer;background:transparent;border:1px solid transparent;color:#e9c7a9;display:grid;place-items:center;border-radius:50%;font:inherit;transition:background .25s,transform .25s}
.legacy-trigger:hover,.legacy-trigger:focus-visible{background:#be9dd622;transform:rotate(-18deg);outline:1px solid #c8a9f1}
.legacy-trigger[aria-pressed="true"]{border-color:#a88dc9;box-shadow:0 0 22px #af7cf355;color:#ffcaed}
.legacy-status{font-size:10px;line-height:1.3;text-align:center;letter-spacing:.08em;color:#f3bdde;background:#9e48781c;border:1px solid #cc91b755;border-radius:7px;padding:8px;margin:7px 0}
.legacy-status[hidden]{display:none}

/* Alpha 0.5.1: approved Tsuki Izakaya Studio brand art, cropped without redrawing. */
img.approved-studio-mark{display:block;flex:none;width:54px;height:47px;object-fit:contain;filter:drop-shadow(0 0 9px rgba(251,122,204,.33));}
@media(max-width:830px){img.approved-studio-mark{width:42px;height:38px;}}

.anime-upgrade-link{color:#f0d1e9!important;border-bottom:1px solid #edcae0;padding-bottom:3px;font-weight:700}.anime-launch{display:block;text-align:center;margin:7px 0 12px;padding:12px 9px;border:1px solid #e8c9da;background:linear-gradient(110deg,#4c395f,#744e73);color:#fff1fa;font-size:11px;letter-spacing:.03em}.anime-launch:hover{background:#82628f}
