:root{color-scheme:dark;--ink:#f6e9de;--muted:#d8c5da;--gold:#ffcf81;--plum:#aa75d5;--dark:#110d25}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{background:#0d0a1a;color:var(--ink);font-family:'DM Sans',sans-serif}.app-shell{height:100%;display:flex;justify-content:center;align-items:center;gap:clamp(42px,7vw,130px);background:radial-gradient(circle at 26% 45%,#352044 0,#18142e 35%,#0b0a18 78%);padding:0 4vw}.desktop-note{width:min(35vw,480px);align-self:center}.desktop-note__eyebrow,.eyebrow,.chapter,.modal__eyebrow{font-size:10px;font-weight:700;letter-spacing:.31em;color:#f1c78b}.desktop-note h1{font:clamp(40px,5vw,78px)/1.04 'Marcellus',serif;letter-spacing:-.045em;margin:30px 0 22px}.desktop-note h1 em{font-style:normal;color:#b88adf}.desktop-note p{max-width:300px;line-height:1.65;color:#c7b5ca;font-size:15px}.desktop-note__rule{width:68px;height:1px;background:#a77a65;margin:38px 0 22px}.desktop-note span{color:#a99ab7;font-size:12px;line-height:1.7}.game{height:min(96vh,920px);aspect-ratio:9/16;max-width:100%;position:relative;overflow:hidden;background:#17112c;box-shadow:0 30px 100px #0009,0 0 0 1px #d8b77c35;border-radius:20px;isolation:isolate;touch-action:none}.game__backdrop{position:absolute;inset:-3%;background:url('assets/noite-maker.png') center center/auto 100% no-repeat;opacity:.95;transform:scale(1.04)}.game__veil{position:absolute;inset:0;background:linear-gradient(180deg,#12102e35 0%,#15102b05 35%,#130d2695 100%),linear-gradient(90deg,#07061740,transparent 28%,transparent 72%,#07061740)}canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.ambient{pointer-events:none;position:absolute;width:320px;height:320px;border-radius:50%;filter:blur(60px);opacity:.17;mix-blend-mode:screen}.ambient--a{background:#a361d7;right:-160px;top:12%}.ambient--b{background:#df9c52;left:-220px;bottom:10%}.hud{position:absolute;z-index:4;inset:0 0 auto;padding:env(safe-area-inset-top,0px) 22px 0;pointer-events:none;background:linear-gradient(#100c21b8,transparent);min-height:148px}.hud__top{display:flex;justify-content:space-between;align-items:center;margin-top:15px}.hud__brand{font:16px 'Marcellus',serif;letter-spacing:.19em;text-shadow:0 2px 8px #000}.hud__brand-star{color:var(--gold);margin-right:4px}.hud__brand small{color:var(--gold)}.icon-btn{pointer-events:auto;border:1px solid #e8d6bc6b;background:#20182da8;color:#f8ebda;width:36px;height:36px;border-radius:50%;font-size:16px;cursor:pointer}.hud__progress-row{display:flex;justify-content:space-between;color:#f7e8d9;font-size:8px;letter-spacing:.16em;font-weight:700;margin:14px 0 7px;text-shadow:0 1px 4px #000}.progress{height:5px;border:1px solid #cdb4ca80;border-radius:20px;background:#1e1632ba;position:relative;overflow:visible}.progress>div{height:100%;width:0;border-radius:20px;background:linear-gradient(90deg,#9e5cc9,#f9cb83);box-shadow:0 0 12px #d089eb}.progress__marker{position:absolute;left:50%;top:-4px;width:2px;height:12px;background:#f6e8d9a1}.hud__bottom{display:flex;align-items:center;justify-content:space-between;margin-top:10px}.gear-count{display:flex;gap:5px;align-items:baseline;color:#fff2e5;font-size:16px;text-shadow:0 1px 5px #000}.gear-count span{color:var(--gold);font-size:20px}.gear-count small{font-size:9px;color:#e3c9d6}.tools{display:flex;gap:5px}.tool-pill{height:27px;min-width:27px;border:1px solid #eac9ad80;background:#21192ebd;border-radius:50%;display:grid;place-items:center;color:#ffd993;font-size:14px;box-shadow:0 0 9px #a36ce380}.toast{position:absolute;z-index:8;left:50%;top:155px;transform:translate(-50%,-12px);padding:10px 18px;border:1px solid #f1d09a8a;border-radius:22px;background:#1b142be8;box-shadow:0 8px 35px #0008;color:#fff4e8;font-size:11px;font-weight:600;text-align:center;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .25s,transform .25s}.toast.show{opacity:1;transform:translate(-50%,0)}.ability{position:absolute;right:18px;bottom:calc(89px + env(safe-area-inset-bottom,0px));z-index:5;border:1px solid #ffd7a1;border-radius:50%;width:67px;height:67px;background:radial-gradient(circle at 30% 25%,#af7fe6,#553774 75%);box-shadow:0 7px 25px #0008,0 0 16px #aa7addaa;color:white;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer}.ability>span{font-size:22px;line-height:1}.ability small{font-size:7px;letter-spacing:.08em;font-weight:700}.ability.cooldown{filter:grayscale(.8);opacity:.65}.touch-controls{position:absolute;z-index:4;left:0;right:0;bottom:calc(14px + env(safe-area-inset-bottom,0px));display:flex;align-items:center;justify-content:space-between;padding:0 18px;pointer-events:none}.touch-controls button{pointer-events:auto;width:65px;height:56px;border-radius:16px;border:1px solid #f2d1b474;background:#180f2b7d;color:#fff1e7;font-size:24px;backdrop-filter:blur(8px);touch-action:none}.touch-controls button:active{background:#b17ad275}.touch-controls span{font-size:8px;letter-spacing:.2em;color:#eee1e9a8}.screen{position:absolute;z-index:10;inset:0}.screen--intro{display:flex;flex-direction:column;justify-content:flex-end;background:linear-gradient(180deg,#0d0a1d48 0%,#130e26a6 46%,#100c20 85%)}.intro__top{position:absolute;top:calc(24px + env(safe-area-inset-top,0px));left:25px;right:25px;display:flex;justify-content:space-between;align-items:center}.tiny-star{color:#f9ca8c;font-size:20px}.intro__hero{position:absolute;top:8%;left:3%;right:3%;height:54%;display:flex;justify-content:center;align-items:center;pointer-events:none}.intro__hero:after{content:'';position:absolute;bottom:0;left:0;right:0;height:30%;background:linear-gradient(transparent,#160f29)}.intro__hero img{height:108%;max-width:110%;object-fit:contain;filter:drop-shadow(0 8px 30px #0c061e9c);transform:rotate(-6deg) translateY(2%)}.intro__content{position:relative;z-index:1;padding:0 30px calc(25px + env(safe-area-inset-bottom,0px))}.chapter{color:#d3abec}.intro__content h2{font:clamp(34px,4.6vh,52px)/1.03 'Marcellus',serif;letter-spacing:-.045em;margin:12px 0 11px;text-shadow:0 3px 15px #000}.intro__content h2 em{font-style:normal;color:#e1b2ed}.intro__content>p{font-size:12px;line-height:1.55;color:#ebdae9;max-width:400px;margin:0 0 18px}.primary-btn{width:100%;height:53px;border:1px solid #ffe1b4;border-radius:9px;background:linear-gradient(100deg,#f8d49e,#e7ab78);color:#2d1931;font-size:10px;font-weight:700;letter-spacing:.15em;cursor:pointer;box-shadow:0 8px 25px #0006,0 0 20px #e9ab7252;display:flex;align-items:center;justify-content:center;gap:16px}.primary-btn span{font-size:19px;line-height:0}.primary-btn:active{transform:scale(.985)}.intro__instructions{display:flex;gap:11px;align-items:flex-start;margin-top:13px;color:#c9b6ce}.intro__instructions>span{color:#ffd796;font-size:25px;line-height:1}.intro__instructions p{font-size:10px;line-height:1.45;margin:0}.intro__instructions strong{color:#f1dfec}.modal{position:absolute;z-index:20;inset:0;display:grid;place-items:center;padding:24px}.modal__shade{position:absolute;inset:0;background:#100b21dd;backdrop-filter:blur(9px)}.modal__card{position:relative;width:100%;max-width:410px;background:linear-gradient(160deg,#2c203f,#1a142f 80%);border:1px solid #e9c2927b;border-radius:18px;padding:30px 25px 25px;box-shadow:0 20px 70px #000a,0 0 60px #9c5ed230;text-align:center}.modal__sigil{width:54px;height:54px;border:1px solid #f7d6a6;border-radius:50%;display:grid;place-items:center;margin:0 auto 17px;background:#8b5caf5c;color:#ffdb9f;font-size:25px;box-shadow:0 0 24px #bd7fdf7e}.modal__eyebrow{color:#d9a3ef}.modal__card h2{font:clamp(30px,8vw,42px)/1.1 'Marcellus',serif;letter-spacing:-.035em;margin:12px 0 18px}.modal__copy{font-size:13px;line-height:1.6;color:#eadce9;margin-bottom:24px}.modal__copy p{margin:0 0 11px}.dialogue{background:#140f24b2;border-left:2px solid #d0a3e9;text-align:left;border-radius:0 8px 8px 0;padding:10px 12px;margin:10px 0}.dialogue strong{display:block;color:#ffcd91;font-size:9px;letter-spacing:.16em;margin-bottom:4px}.dialogue--violet{border-color:#f3cb92}.dialogue--violet strong{color:#dfabf5}.modal__card .primary-btn{height:49px}.rotate-hint{display:none;position:absolute;z-index:30;inset:0;background:#130d27;color:#f4deec;align-items:center;justify-content:center;text-align:center;padding:25px;font:22px 'Marcellus',serif}[hidden]{display:none!important}@media(max-width:800px){.app-shell{padding:0;background:#0d0a1d}.desktop-note{display:none}.game{width:100vw;height:100dvh;max-height:none;aspect-ratio:auto;border-radius:0;box-shadow:none}}@media(max-height:620px){.intro__hero{top:4%;height:48%}.intro__content{padding-bottom:15px}.intro__content h2{font-size:31px}.intro__content>p{font-size:10px;margin-bottom:10px}.intro__instructions{margin-top:7px}.intro__instructions p{font-size:9px}}@media(orientation:landscape) and (max-width:800px){.rotate-hint{display:flex}}
.intro__actions{display:flex;gap:9px}.intro__actions .primary-btn{flex:1}.restart-btn{width:53px;min-width:53px;height:53px;border:1px solid #e4c29ca3;border-radius:9px;background:#241831a8;color:#ffe0ae;font-size:25px;cursor:pointer}.restart-btn:active{transform:scale(.96)}

.modal__secondary{display:block;width:100%;margin-top:12px;padding:9px 12px;border:0;background:transparent;color:#e8c7ee;font:700 10px 'DM Sans',sans-serif;letter-spacing:.15em;cursor:pointer}.modal__secondary:hover,.modal__secondary:focus-visible{color:#fff1db;text-decoration:underline}
.modal__card{max-height:calc(100dvh - 32px);overflow-y:auto;overscroll-behavior:contain}
.rotate-hint{display:none!important}
@media(orientation:landscape) and (max-height:500px){
  .app-shell{padding:0;gap:0}
  .desktop-note{display:none}
  .game{flex:none;width:390px;height:693px;max-width:none;max-height:none;aspect-ratio:9/16;border-radius:0;box-shadow:none;transform:scale(var(--stage-scale,1))}
}
