:root{color-scheme:dark}
body{font-family:system-ui,sans-serif;max-width:1250px;margin:20px auto;padding:0 16px;background:#0f172a;color:#e5e7eb}
button{padding:9px 12px;margin:3px;border:0;border-radius:8px;cursor:pointer;background:#e5e7eb;color:#111827;font-weight:650}
button:disabled{opacity:.42;cursor:not-allowed}
.card{background:#1e293b;padding:14px;border-radius:12px;margin:10px 0;border:1px solid #334155}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.small{font-size:13px;color:#94a3b8}.warn{color:#fbbf24}.big{font-size:30px;font-weight:800}
table{width:100%;border-collapse:collapse}td,th{padding:9px;border-bottom:1px solid #334155;text-align:left;vertical-align:top}
.price{font-weight:750}.locked{opacity:.55}
.progress{height:14px;background:#334155;border-radius:999px;overflow:hidden;margin:8px 0}
.progress>div{height:100%;background:#e5e7eb;transition:width .15s}
.tutorial{border:1px solid #64748b}
.clicker{font-size:20px;padding:16px 28px}
.badge{display:inline-block;padding:2px 8px;border-radius:999px;background:#334155;font-size:12px}
.desc{max-width:430px;line-height:1.35}
.effect{margin-top:5px;font-weight:700;color:#dbeafe}
.status{margin-top:4px;color:#93c5fd;font-size:12px}
.preview{margin-top:6px;padding:7px 9px;border-radius:8px;background:#0f172a;border:1px solid #475569;font-size:12px}
.preview b{color:#bbf7d0}
.event-log{display:flex;flex-direction:column;gap:5px;max-height:320px;overflow:auto}
.event{padding:8px 10px;border-radius:8px;background:#0f172a;border:1px solid #334155}
.event.fail{border-color:#7f1d1d;color:#fecaca}
.event.win{border-color:#14532d;color:#bbf7d0}
.latest{font-size:18px;font-weight:750;min-height:28px}
.flash{animation:flash .65s ease}
@keyframes flash{0%{background:#475569}100%{background:transparent}}
.inst-name{font-weight:800;white-space:nowrap}
.timer-chip{display:inline-block;margin-top:5px;padding:2px 7px;border-radius:999px;background:#0f172a;font-size:12px}
.notice{border-color:#7c3aed;background:#221b3b}
.cookie-card{border-color:#b45309;background:#2b2115}.cookie-big{font-size:34px;font-weight:850}.rank-table td,.rank-table th{padding:6px}.me-row{outline:1px solid #fbbf24;background:#292315}
code{color:#c4b5fd}

.auth-wrap{max-width:560px;margin:40px auto}.auth-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.auth-grid input{width:100%;box-sizing:border-box;padding:10px;border-radius:8px;border:1px solid #475569;background:#0f172a;color:#e5e7eb}.auth-grid .wide{grid-column:1/-1}.auth-error{color:#fecaca;min-height:22px}.top-user{display:flex;justify-content:space-between;align-items:center;gap:12px}.top-user button{margin-left:auto}@media(max-width:650px){.auth-grid{grid-template-columns:1fr}.auth-grid .wide{grid-column:auto}}


/* v0.14.2 UI preview — INMT corporate auth layer */
:root{
  --inmt-red:#ff0036;
  --inmt-white:#ededed;
  --inmt-black:#050000;
  --inmt-panel:#0b0809;
  --inmt-muted:#9d9799;
  --inmt-line:rgba(255,0,54,.42);
}

#authGate,#banGate{
  position:fixed;
  inset:0;
  z-index:1000;
  max-width:none;
  margin:0;
  padding:0;
  overflow:auto;
  color:var(--inmt-white);
  background:
    radial-gradient(circle at 14% 16%,rgba(255,0,54,.16),transparent 28%),
    radial-gradient(circle at 78% 74%,rgba(255,0,54,.08),transparent 30%),
    linear-gradient(135deg,#050000 0%,#090304 48%,#050000 100%);
}
#authGate::before,#banGate::before{
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.28;
  background-image:
    repeating-linear-gradient(112deg,transparent 0 54px,rgba(237,237,237,.04) 55px,transparent 56px 102px),
    repeating-linear-gradient(18deg,transparent 0 71px,rgba(255,0,54,.035) 72px,transparent 74px 129px);
  mix-blend-mode:screen;
}
.auth-stage{min-height:100%;display:flex;flex-direction:column;position:relative;isolation:isolate}
.auth-stage::before,.auth-stage::after{content:"";position:absolute;background:var(--inmt-red);z-index:-1;box-shadow:0 0 32px rgba(255,0,54,.18)}
.auth-stage::before{width:min(34vw,430px);height:42px;left:0;top:8%;clip-path:polygon(0 0,100% 0,92% 100%,0 100%)}
.auth-stage::after{width:min(20vw,240px);height:116px;right:0;bottom:7%;clip-path:polygon(24% 0,100% 0,100% 100%,0 100%)}
.auth-brandbar{min-height:78px;display:flex;align-items:center;gap:16px;padding:18px clamp(22px,4vw,64px);border-bottom:1px solid var(--inmt-line);background:rgba(5,0,0,.78);backdrop-filter:blur(14px);position:relative}
.auth-brandbar::after{content:"";position:absolute;left:clamp(22px,4vw,64px);bottom:-2px;width:136px;height:3px;background:var(--inmt-red);box-shadow:0 0 18px rgba(255,0,54,.55)}
.auth-logo-small{width:48px;height:54px;object-fit:contain;filter:brightness(0) invert(1) drop-shadow(0 0 12px rgba(255,0,54,.3))}
.auth-wordmark{font-size:27px;font-weight:900;letter-spacing:.08em;line-height:1}
.auth-wordmark small{display:block;margin-top:7px;color:#a49fa0;font-size:9px;font-weight:750;letter-spacing:.24em;text-transform:uppercase}
.auth-build{margin-left:auto;color:#8c8688;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.auth-shell{width:min(1180px,calc(100% - 36px));margin:auto;display:grid;grid-template-columns:minmax(330px,.9fr) minmax(420px,1.1fr);gap:clamp(26px,5vw,74px);align-items:center;padding:48px 0 58px}
.auth-hero{min-height:560px;display:flex;flex-direction:column;justify-content:center;position:relative;padding:34px 26px 34px 10px}
.auth-hero::before{content:"";position:absolute;left:-38px;top:10%;width:2px;height:72%;background:linear-gradient(transparent,var(--inmt-red),transparent);box-shadow:0 0 18px rgba(255,0,54,.35)}
.auth-hero-logo-wrap{width:min(330px,78vw);aspect-ratio:1/1;display:grid;place-items:center;position:relative;margin-bottom:24px}
.auth-hero-logo-wrap::before,.auth-hero-logo-wrap::after{content:"";position:absolute;border:1px solid rgba(255,0,54,.35);border-radius:50%;inset:7%;transform:rotate(8deg)}
.auth-hero-logo-wrap::after{inset:18%;border-color:rgba(237,237,237,.12);transform:rotate(-14deg)}
.auth-hero-logo{width:72%;height:72%;object-fit:contain;position:relative;z-index:1;filter:brightness(0) invert(1) drop-shadow(0 0 22px rgba(255,0,54,.28))}
.auth-kicker{display:inline-flex;align-items:center;gap:10px;color:var(--inmt-red);font-size:12px;font-weight:900;letter-spacing:.2em;text-transform:uppercase}
.auth-kicker::before{content:"";width:42px;height:3px;background:var(--inmt-red)}
.auth-hero h1{font-size:clamp(38px,5.4vw,72px);margin:15px 0 8px;line-height:.94;letter-spacing:-.03em;text-transform:uppercase}
.auth-hero h1 span{color:var(--inmt-red)}
.auth-hero p{max-width:520px;margin:12px 0 0;color:#bdb7b9;font-size:15px;line-height:1.55}
.auth-hero-marks{display:flex;gap:10px;margin-top:28px}
.auth-hero-marks i{display:block;background:var(--inmt-red);height:10px}.auth-hero-marks i:nth-child(1){width:92px}.auth-hero-marks i:nth-child(2){width:27px}.auth-hero-marks i:nth-child(3){width:54px}

.auth-panel{position:relative;background:linear-gradient(180deg,rgba(17,12,13,.98),rgba(7,3,4,.98));border:1px solid rgba(237,237,237,.12);border-top:2px solid var(--inmt-red);padding:clamp(24px,3.2vw,42px);box-shadow:0 32px 90px rgba(0,0,0,.55),inset 0 0 60px rgba(255,0,54,.025)}
.auth-panel::before,.auth-panel::after{content:"";position:absolute;width:52px;height:52px;pointer-events:none}
.auth-panel::before{left:-1px;top:-1px;border-left:5px solid var(--inmt-red);border-top:5px solid var(--inmt-red)}
.auth-panel::after{right:-1px;bottom:-1px;border-right:5px solid var(--inmt-red);border-bottom:5px solid var(--inmt-red)}
.auth-panel-head{margin-bottom:26px}.auth-panel-head h2{margin:0;font-size:28px;letter-spacing:.01em}.auth-panel-head p{margin:7px 0 0;color:#928c8e;font-size:13px;line-height:1.45}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;margin:0 0 26px;border-bottom:1px solid rgba(237,237,237,.12)}
.auth-tab{appearance:none;background:transparent!important;color:#807a7c!important;margin:0!important;padding:12px 10px 14px!important;border-radius:0!important;border-bottom:3px solid transparent!important;font-size:13px!important;text-transform:uppercase;letter-spacing:.11em;font-weight:850!important}
.auth-tab.active{color:var(--inmt-white)!important;border-bottom-color:var(--inmt-red)!important;text-shadow:0 0 14px rgba(255,0,54,.25)}
.auth-panel h3{display:none}
.auth-grid{gap:15px!important}.auth-field{display:flex;flex-direction:column;gap:7px}.auth-field label{font-size:11px;color:#a39d9f;letter-spacing:.08em;text-transform:uppercase;font-weight:800}.auth-field .small{margin-top:0;font-size:10px;color:#777173}
.auth-grid input{height:48px!important;padding:0 14px!important;border-radius:0!important;border:1px solid rgba(237,237,237,.15)!important;background:#080405!important;color:var(--inmt-white)!important;outline:none;transition:border-color .18s,box-shadow .18s,background .18s}
.auth-grid input::placeholder{color:#5f5a5c}.auth-grid input:focus{border-color:var(--inmt-red)!important;background:#0c0607!important;box-shadow:0 0 0 3px rgba(255,0,54,.10),inset 3px 0 0 var(--inmt-red)}
.auth-actions{display:flex;gap:10px;align-items:center;margin-top:22px}.auth-primary,.auth-secondary{height:50px;padding:0 22px!important;margin:0!important;border-radius:0!important;text-transform:uppercase;letter-spacing:.07em;font-weight:900!important}
.auth-primary{flex:1;background:var(--inmt-red)!important;color:#fff!important;box-shadow:0 12px 30px rgba(255,0,54,.20);clip-path:polygon(0 0,94% 0,100% 26%,100% 100%,6% 100%,0 74%)}
.auth-primary:hover{filter:brightness(1.08);box-shadow:0 14px 38px rgba(255,0,54,.32)}
.auth-secondary{background:transparent!important;color:#aaa4a6!important;border:1px solid rgba(237,237,237,.14)!important}
.auth-secondary:hover{color:var(--inmt-white)!important;border-color:rgba(255,0,54,.55)!important}
.auth-error{margin-top:15px!important;min-height:20px!important;color:#ff7894!important;font-size:12px;font-weight:700}
.auth-legal{margin:14px 0 0;color:#686365;font-size:10px;line-height:1.45}.auth-legal b{color:#918b8d}
.auth-footer{padding:16px clamp(22px,4vw,64px) 22px;color:#5f595b;border-top:1px solid rgba(237,237,237,.06);font-size:10px;letter-spacing:.04em;display:flex;justify-content:space-between;gap:18px}

#banGate .auth-shell{grid-template-columns:minmax(300px,520px);justify-content:center}.ban-panel h2{font-size:32px;margin:0 0 10px}.ban-mark{font-size:11px;color:var(--inmt-red);font-weight:900;letter-spacing:.15em;text-transform:uppercase;margin-bottom:12px}

@media(max-width:820px){
  .auth-build{display:none}.auth-shell{grid-template-columns:1fr;width:min(620px,calc(100% - 28px));padding:28px 0 36px;gap:4px}.auth-hero{min-height:auto;padding:16px 8px 24px;align-items:flex-start}.auth-hero::before{display:none}.auth-hero-logo-wrap{width:126px;margin:0 0 12px}.auth-hero h1{font-size:38px;margin-top:10px}.auth-hero p{font-size:13px}.auth-hero-marks{margin-top:18px}.auth-panel{padding:24px 20px}.auth-footer{font-size:9px}.auth-stage::before{top:66px;width:44vw;height:22px}.auth-stage::after{height:74px}
}
@media(max-width:520px){
  .auth-brandbar{padding:14px 18px;min-height:62px}.auth-logo-small{width:38px;height:42px}.auth-wordmark{font-size:22px}.auth-wordmark small{font-size:7px}.auth-shell{width:calc(100% - 20px);margin:0 auto}.auth-hero{padding-top:22px}.auth-hero-logo-wrap{width:102px}.auth-hero h1{font-size:32px}.auth-hero p{font-size:12px}.auth-panel-head h2{font-size:24px}.auth-actions{flex-direction:column}.auth-primary,.auth-secondary{width:100%;flex:auto}.auth-footer{flex-direction:column;padding:12px 18px 18px}.auth-grid{grid-template-columns:1fr!important}.auth-grid .wide{grid-column:auto!important}
}



/* v0.17 — INMT UI refinement */
html,body{width:100%;height:100%;overflow:hidden}
body{max-width:none!important;margin:0!important;padding:0!important;background:var(--inmt-black)!important;color:var(--inmt-white)!important;font-family:Inter,system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important}
button{font-family:inherit}
[hidden]{display:none!important}
#gameApp{position:fixed;inset:0;z-index:20;background:#050000;overflow:hidden}
.game-shell{position:relative;width:100%;height:100%;overflow:hidden;background:#050000;color:#ededed}
.game-shell::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;opacity:.25;background-image:repeating-linear-gradient(112deg,transparent 0 62px,rgba(237,237,237,.025) 63px,transparent 64px 117px),repeating-linear-gradient(18deg,transparent 0 74px,rgba(255,0,54,.035) 75px,transparent 77px 143px)}

.game-hud{position:absolute;z-index:40;left:0;right:0;top:0;height:78px;display:flex;align-items:stretch;background:rgba(5,0,0,.94);border-bottom:1px solid rgba(255,0,54,.65);box-shadow:0 10px 28px rgba(0,0,0,.42);backdrop-filter:blur(15px)}
.game-brand{width:290px;min-width:290px;border:0!important;border-radius:0!important;margin:0!important;padding:10px 18px!important;background:linear-gradient(115deg,rgba(255,0,54,.18),rgba(5,0,0,.1))!important;color:#ededed!important;display:flex;align-items:center;gap:11px;position:relative;text-align:left}
.game-brand::after{content:"";position:absolute;right:-18px;bottom:-1px;width:52px;height:3px;background:#ff0036;transform:skewX(-42deg)}
.game-brand img{width:45px;height:50px;object-fit:contain;filter:brightness(0) invert(1)}
.game-brand-full{display:block;font-size:14px;font-weight:900;line-height:1.08;letter-spacing:.015em;text-transform:uppercase}.game-brand-sub{display:block;margin-top:4px;color:#918b8d;font-size:7px;line-height:1.25;letter-spacing:.08em;text-transform:uppercase}
.resource-strip{flex:1;min-width:0;display:flex;justify-content:center;align-items:stretch}
.resource-btn{min-width:150px;max-width:220px;flex:1;margin:0!important;padding:8px 18px!important;border-radius:0!important;border-left:1px solid rgba(237,237,237,.09)!important;background:transparent!important;color:#ededed!important;display:grid;grid-template-columns:37px 1fr;align-items:center;gap:10px;text-align:left;position:relative}
.resource-btn:hover,.resource-btn:focus-visible{background:rgba(255,0,54,.075)!important;outline:none}.resource-btn::after{content:"";position:absolute;bottom:0;left:24%;right:24%;height:2px;background:#ff0036;transform:scaleX(0);transition:.18s}.resource-btn:hover::after{transform:scaleX(1)}
.resource-icon{width:38px;height:38px;display:grid;place-items:center;line-height:1;color:#ededed}.resource-icon svg{width:36px;height:36px;display:block;overflow:visible;filter:drop-shadow(0 4px 8px rgba(0,0,0,.42))}.resource-icon.coin svg{filter:drop-shadow(0 0 9px rgba(240,173,34,.24))}.resource-icon.coffee svg,.resource-icon.cookie svg{filter:drop-shadow(0 4px 8px rgba(0,0,0,.5))}
.icon-defs{position:absolute;width:0;height:0;overflow:hidden}.ui-icon{width:1em;height:1em;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.resource-icon .ui-icon{width:36px;height:36px}.nav-icon .ui-icon{width:28px;height:28px}.boost-glyph .ui-icon{width:34px;height:34px}.cookie-count-icon .ui-icon{width:64px;height:64px}.big-icon .ui-icon{width:31px;height:31px}.boost-cost .ui-icon,.cookie-price .ui-icon{width:20px;height:20px;display:inline-block;vertical-align:-4px;margin-right:5px}
.resource-value{display:block;font-size:18px;font-weight:900;white-space:nowrap}.resource-rate{display:block;color:#8f898b;font-size:10px;margin-top:2px;white-space:nowrap}
.user-btn{width:200px;min-width:170px;margin:0!important;border:0!important;border-radius:0!important;background:linear-gradient(135deg,rgba(10,6,7,.1),rgba(255,0,54,.09))!important;color:#ededed!important;padding:8px 18px!important;text-align:right;position:relative}.user-btn::before{content:"";position:absolute;left:0;top:19px;bottom:19px;width:1px;background:rgba(255,0,54,.7)}.user-btn strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-btn small{display:block;color:#777174;font-size:10px;margin-top:4px}

.game-main{position:absolute;inset:78px 0 82px 0;z-index:2;overflow:hidden;background:#050000}.game-view{position:absolute;inset:0;display:none;overflow:auto}.game-view.active{display:block}
#viewMap{overflow:hidden;background:#081015}
.map-viewport{position:absolute;inset:0;overflow:hidden;touch-action:none;cursor:grab;background:#071013}.map-viewport.dragging{cursor:grabbing}
.map-world{position:absolute;left:50%;top:50%;width:1600px;height:1117px;transform-origin:50% 50%;will-change:transform;user-select:none;-webkit-user-select:none;box-shadow:0 0 80px rgba(0,0,0,.52)}
.map-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;pointer-events:none;filter:saturate(1.02) contrast(1.04) brightness(.94)}
.map-world::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:4;background:linear-gradient(to bottom,rgba(5,0,0,.07),transparent 9%,transparent 90%,rgba(5,0,0,.14)),radial-gradient(ellipse at center,transparent 67%,rgba(5,0,0,.18) 100%)}
.map-markers{position:absolute;inset:0;z-index:7}
.inst-marker{--hit-w:170px;--hit-h:135px;position:absolute;width:var(--hit-w);height:var(--hit-h);margin:0!important;padding:0!important;border:0!important;border-radius:42%!important;background:transparent!important;color:#ededed!important;transform:translate(-50%,-50%);text-align:center;z-index:8;cursor:pointer;isolation:isolate;outline:none}
.inst-marker::before{content:"";position:absolute;z-index:-2;inset:-8%;border-radius:44%;opacity:0;pointer-events:none;transition:opacity .28s;background:radial-gradient(ellipse at 50% 48%,rgba(173,181,179,.16) 0,rgba(72,82,82,.27) 34%,rgba(20,24,25,.54) 66%,rgba(5,0,0,.13) 82%,transparent 100%);box-shadow:inset 0 0 26px rgba(207,216,214,.08);backdrop-filter:grayscale(.45) brightness(.72) blur(.6px)}
.inst-marker::after{content:"";position:absolute;z-index:-1;inset:7% 8% 12%;border:1px solid transparent;border-radius:42%;transition:.18s;pointer-events:none}
.inst-marker:hover::after,.inst-marker:focus-visible::after{border-color:rgba(255,0,54,.76);box-shadow:0 0 26px rgba(255,0,54,.30),inset 0 0 28px rgba(255,0,54,.06)}
.inst-marker .marker-pin{position:absolute;right:5%;top:6%;width:31px;height:31px;border:1px solid rgba(237,237,237,.45);background:rgba(5,0,0,.86);display:grid;place-items:center;border-radius:50%;box-shadow:0 5px 15px rgba(0,0,0,.62);transition:.2s}.inst-marker .marker-pin .ui-icon{width:17px;height:17px}
.inst-marker .marker-core{font-size:11px;font-weight:950;letter-spacing:-.02em}.inst-marker .marker-lock{display:grid;place-items:center}
.inst-marker .marker-label{position:absolute;left:50%;bottom:-3px;transform:translateX(-50%);display:inline-flex;align-items:center;gap:5px;min-height:25px;padding:3px 9px;background:rgba(5,0,0,.90);border-left:3px solid #6f696b;border-bottom:1px solid rgba(237,237,237,.12);font-size:10px;font-weight:900;line-height:1.05;white-space:nowrap;box-shadow:0 5px 14px rgba(0,0,0,.56);pointer-events:none}.inst-marker .marker-level{font-size:9px;color:#aaa4a6;font-weight:700}
.inst-marker.locked::before{opacity:.94}.inst-marker.buy-poor::before{opacity:.74}.inst-marker.buy-ready::before{opacity:.34}.inst-marker.owned::before,.inst-marker.upgrade-ready::before,.inst-marker.maxed::before{opacity:0}
.inst-marker.locked .marker-pin,.inst-marker.buy-poor .marker-pin{filter:grayscale(.9);opacity:.72}.inst-marker.locked .marker-label,.inst-marker.buy-poor .marker-label{color:#a29c9e;border-left-color:#5b5657}.inst-marker.owned .marker-pin{border-color:rgba(237,237,237,.75);background:rgba(7,4,5,.88)}.inst-marker.owned .marker-label{border-left-color:#ededed}
.inst-marker.upgrade-ready .marker-pin,.inst-marker.buy-ready .marker-pin{border-color:#ff0036;box-shadow:0 0 0 2px rgba(255,0,54,.18),0 0 20px rgba(255,0,54,.55);background:#170408}.inst-marker.upgrade-ready .marker-label,.inst-marker.buy-ready .marker-label{border-left-color:#ff0036;color:#fff}.inst-marker.upgrade-ready{animation:markerPulse 1.8s ease-in-out infinite}.inst-marker.maxed .marker-pin{border-color:#ff0036;background:#1d080c}.inst-marker.maxed .marker-label::after{content:"MAX";color:#ff0036;font-size:8px;margin-left:2px}.inst-marker.buff .marker-pin{box-shadow:0 0 0 3px rgba(255,0,54,.14),0 0 28px rgba(255,0,54,.7)}.inst-marker.event-flash .marker-pin{animation:eventBurst .8s ease}
@keyframes markerPulse{0%,100%{filter:brightness(1)}50%{filter:brightness(1.35)}}@keyframes eventBurst{0%{transform:scale(1)}30%{transform:scale(1.35);background:#ff0036}100%{transform:scale(1)}}
.tutorial-chip{position:absolute;z-index:18;left:18px;top:18px;width:min(350px,calc(100% - 110px));padding:12px 14px;background:rgba(5,0,0,.86);border-left:3px solid #ff0036;border-bottom:1px solid rgba(237,237,237,.12);box-shadow:0 12px 34px rgba(0,0,0,.35);backdrop-filter:blur(9px)}.tutorial-chip strong{display:block;font-size:12px}.tutorial-chip span{display:block;color:#aaa4a6;font-size:10px;line-height:1.35;margin-top:3px}.tutorial-progress{height:3px;background:#302b2c;margin-top:9px}.tutorial-progress>i{display:block;height:100%;width:0;background:#ff0036;transition:width .3s}.tutorial-chip[hidden]{display:none!important}
.map-controls{position:absolute;z-index:18;right:16px;top:17px;display:flex;flex-direction:column;gap:7px}.map-control{width:42px;height:42px;margin:0!important;padding:0!important;border:1px solid rgba(237,237,237,.14)!important;border-radius:0!important;background:rgba(5,0,0,.84)!important;color:#ededed!important;font-size:19px!important}.map-control:hover{border-color:#ff0036!important;color:#ff0036!important}.map-hint{position:absolute;z-index:17;right:16px;bottom:18px;padding:7px 10px;color:#777174;background:rgba(5,0,0,.6);font-size:9px;pointer-events:none}
.click-fx-layer{position:absolute;inset:0;z-index:30;pointer-events:none;overflow:hidden}.click-fx{position:absolute;transform:translate(-50%,-50%);font-weight:950;color:#ffd064;text-shadow:0 2px 5px #000;animation:clickFly .8s ease-out forwards}.click-fx::before{content:"●";margin-right:4px;color:#f4ad23}@keyframes clickFly{0%{opacity:0;transform:translate(-50%,-10%) scale(.75)}15%{opacity:1}100%{opacity:0;transform:translate(-50%,-130%) scale(1.06)}}

.bottom-nav{position:absolute;z-index:45;left:0;right:0;bottom:0;height:82px;display:grid;grid-template-columns:repeat(3,1fr);background:rgba(5,0,0,.97);border-top:1px solid rgba(255,0,54,.65);box-shadow:0 -12px 32px rgba(0,0,0,.45)}.nav-btn{margin:0!important;border:0!important;border-radius:0!important;background:transparent!important;color:#928c8e!important;padding:8px 10px!important;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative}.nav-btn+ .nav-btn{border-left:1px solid rgba(237,237,237,.07)!important}.nav-btn.active{color:#ededed!important;background:linear-gradient(to top,rgba(255,0,54,.14),transparent)!important}.nav-btn.active::after{content:"";position:absolute;left:22%;right:22%;top:-1px;height:3px;background:#ff0036;box-shadow:0 0 16px rgba(255,0,54,.65)}.nav-icon{font-size:24px;line-height:1;width:30px;height:30px;display:grid;place-items:center}.nav-label{font-size:11px}.nav-btn.active .nav-icon{color:#ff0036}

.inst-sheet{position:absolute;z-index:50;right:18px;top:96px;bottom:100px;width:min(440px,calc(100% - 36px));background:linear-gradient(180deg,rgba(12,7,8,.98),rgba(5,0,0,.99));border:1px solid rgba(255,0,54,.72);box-shadow:0 28px 70px rgba(0,0,0,.65);overflow:auto;transform:translateX(calc(100% + 50px));opacity:0;visibility:hidden;pointer-events:none;transition:transform .25s ease,opacity .18s ease,visibility 0s linear .25s;scrollbar-width:thin;scrollbar-color:#ff0036 #090405}.inst-sheet.open{transform:translateX(0);opacity:1;visibility:visible;pointer-events:auto;transition-delay:0s}.inst-sheet::before{content:"";position:absolute;left:-1px;top:-1px;width:74px;height:4px;background:#ff0036}.sheet-close{position:absolute;z-index:3;right:12px;top:12px;width:39px;height:39px;margin:0!important;padding:0!important;border:1px solid rgba(237,237,237,.18)!important;border-radius:0!important;background:rgba(5,0,0,.78)!important;color:#ededed!important;font-size:21px!important}.sheet-hero{height:205px;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 70%,rgba(255,0,54,.18),transparent 65%),linear-gradient(145deg,#1b1113,#070304)}.sheet-hero-img{width:100%;height:100%;object-fit:cover;display:none}.sheet-hero.has-image .sheet-hero-img{display:block}.sheet-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(transparent 38%,rgba(5,0,0,.88))}.sheet-hero-monogram{position:absolute;inset:0;display:grid;place-items:center;color:rgba(237,237,237,.075);font-size:110px;font-weight:950;letter-spacing:-.08em}.sheet-body{padding:0 18px 18px}.sheet-title-row{display:flex;justify-content:space-between;gap:14px;align-items:flex-end;margin-top:-38px;position:relative;z-index:2}.sheet-title h2{font-size:30px;margin:0;line-height:1}.sheet-title p{font-size:12px;color:#a9a3a5;margin:5px 0 0}.sheet-level{font-size:12px;color:#aaa4a6;white-space:nowrap}.sheet-level b{font-size:22px;color:#ff0036}.sheet-ability{margin-top:18px;padding:13px 0;border-top:1px solid rgba(237,237,237,.10);border-bottom:1px solid rgba(237,237,237,.10)}.sheet-ability strong{display:block;font-size:13px}.sheet-ability p{font-size:11px;color:#a9a3a5;line-height:1.45;margin:6px 0}.sheet-effect{font-size:13px!important;color:#ededed!important;font-weight:800}.sheet-status{font-size:10px;color:#7f797b;margin-top:5px}.ability-timer{display:none;margin-top:10px}.ability-timer.visible{display:block}.ability-timer-head{display:flex;justify-content:space-between;font-size:9px;color:#8f898b;margin-bottom:5px}.ability-timer-bar{height:7px;background:#292426;overflow:hidden}.ability-timer-bar i{display:block;height:100%;background:#ff0036;transition:width .5s linear}
.sheet-metrics{display:grid;grid-template-columns:1fr 1fr;gap:1px;margin-top:14px;background:rgba(237,237,237,.09)}.sheet-metric{background:#090506;padding:12px}.sheet-metric label{display:block;color:#777174;font-size:9px;text-transform:uppercase;letter-spacing:.06em}.sheet-metric strong{display:block;font-size:18px;margin-top:5px}.sheet-metric strong em{font-style:normal;color:#ff0036}.sheet-action{width:100%;height:56px;margin:14px 0 0!important;border:0!important;border-radius:0!important;background:#ff0036!important;color:white!important;font-size:17px!important;font-weight:950!important;text-transform:uppercase;letter-spacing:.04em;clip-path:polygon(0 0,96% 0,100% 22%,100% 100%,4% 100%,0 78%)}.sheet-action:disabled{background:#292426!important;color:#7d7779!important;opacity:1}.sheet-action.secondary{background:transparent!important;border:1px solid rgba(255,0,54,.55)!important;color:#ededed!important}

.page-view{min-height:100%;padding:32px max(24px,calc((100vw - 1180px)/2)) 56px;background:radial-gradient(circle at 15% -5%,rgba(255,0,54,.12),transparent 31%),linear-gradient(145deg,#080304 0,#050000 54%,#090405 100%);position:relative}.page-view::before{content:"";position:fixed;inset:78px 0 0 88px;pointer-events:none;opacity:.18;background-image:repeating-linear-gradient(112deg,transparent 0 68px,rgba(237,237,237,.028) 69px,transparent 70px 136px)}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding-bottom:18px;border-bottom:1px solid rgba(255,0,54,.55)}.page-head h1{font-size:34px;margin:0}.page-head p{color:#8c8688;font-size:12px;margin:5px 0 0}.page-kicker{color:#ff0036;font-size:9px;text-transform:uppercase;letter-spacing:.18em;font-weight:900}.boost-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:22px}.boost-card,.cookie-panel,.leader-card,.profile-panel{background:linear-gradient(160deg,#100a0b,#070304);border:1px solid rgba(237,237,237,.11);border-top:2px solid rgba(255,0,54,.6);padding:18px;position:relative;box-shadow:0 14px 40px rgba(0,0,0,.25)}.boost-card.active{border-color:#ff0036;box-shadow:0 0 30px rgba(255,0,54,.12)}.boost-glyph{width:92px;height:92px;display:grid;place-items:center;position:relative;overflow:hidden;background:linear-gradient(160deg,rgba(34,10,14,.94),rgba(11,4,6,.96));border:1px solid rgba(255,0,54,.42);box-shadow:inset 0 0 28px rgba(255,0,54,.05)}.boost-glyph::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(118deg,transparent 0 32px,rgba(237,237,237,.034) 33px,transparent 35px 68px),repeating-linear-gradient(21deg,transparent 0 54px,rgba(237,237,237,.022) 55px,transparent 57px 108px);opacity:.9;pointer-events:none}.boost-glyph::after{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#ff0036;box-shadow:0 0 20px rgba(255,0,54,.35)}.boost-glyph svg{width:56px;height:56px;position:relative;z-index:1;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round}.boost-glyph.espresso{color:#ff1746}.boost-glyph.raf{color:#ff365f}.boost-glyph.americano{color:#ff1746}.boost-card h3{margin:16px 0 6px;font-size:20px}.boost-card p{min-height:54px;color:#9e989a;font-size:11px;line-height:1.45}.boost-meta{display:flex;justify-content:space-between;align-items:flex-end;margin:16px 0}.boost-cost label{display:block;color:#777174;font-size:9px}.boost-cost strong{font-size:18px}.boost-buy{width:100%;height:43px;margin:0!important;border-radius:0!important;background:#ff0036!important;color:#fff!important;text-transform:uppercase;font-weight:900!important}.boost-buy:disabled{background:#282325!important;color:#777174!important;opacity:1}.boost-progress{height:4px;background:#2a2526;margin-top:12px}.boost-progress i{display:block;height:100%;background:#ff0036;width:0}
.cookie-layout{display:grid;grid-template-columns:minmax(300px,.8fr) minmax(380px,1.2fr);gap:16px;margin-top:22px}.cookie-hero{text-align:center;padding:28px 18px}.cookie-count-icon{font-size:58px;filter:drop-shadow(0 7px 18px rgba(0,0,0,.5))}.cookie-count{font-size:58px;font-weight:950;line-height:1;margin:4px 0}.cookie-next{color:#a49ea0;font-size:11px}.cookie-price{font-size:24px;font-weight:900;margin-top:7px}.cookie-buy{width:100%;height:51px;margin:22px 0 0!important;border-radius:0!important;background:#ff0036!important;color:#fff!important;font-size:15px!important;font-weight:950!important;text-transform:uppercase}.cookie-buy:disabled{background:#292426!important;color:#7d7779!important;opacity:1}.rank-me{display:grid;grid-template-columns:1fr auto;gap:10px;padding:14px 0 0;margin-top:18px;border-top:1px solid rgba(237,237,237,.1);text-align:left}.rank-me strong{font-size:28px}.leader-card h2{margin:0 0 12px;font-size:20px}.leader-table{width:100%;border-collapse:collapse}.leader-table th,.leader-table td{padding:9px 7px;border-bottom:1px solid rgba(237,237,237,.07);font-size:11px}.leader-table th{color:#716b6d;text-transform:uppercase;font-size:8px;letter-spacing:.08em}.leader-table tr.me{background:rgba(255,0,54,.08);outline:1px solid rgba(255,0,54,.28)}

.modal-backdrop{position:absolute;z-index:70;inset:0;background:rgba(0,0,0,.65);backdrop-filter:blur(4px);display:grid;place-items:center;padding:18px}.modal-card{width:min(430px,100%);max-height:min(680px,calc(100vh - 36px));overflow:auto;background:#080405;border:1px solid rgba(255,0,54,.7);box-shadow:0 26px 80px rgba(0,0,0,.75);padding:20px;position:relative}.modal-card::before{content:"";position:absolute;left:0;top:0;width:70px;height:4px;background:#ff0036}.modal-close{position:absolute;right:12px;top:12px;width:36px;height:36px;margin:0!important;padding:0!important;border-radius:0!important;border:1px solid rgba(237,237,237,.14)!important;background:#0f0a0b!important;color:#ededed!important}.modal-card h2{margin:3px 48px 18px 0}.resource-detail{display:grid;grid-template-columns:58px 1fr;gap:14px;padding:14px 0;border-bottom:1px solid rgba(237,237,237,.08)}.resource-detail:last-child{border-bottom:0}.resource-detail .big-icon{width:52px;height:52px;display:grid;place-items:center;background:rgba(255,0,54,.08);font-size:32px}.resource-detail label{display:block;color:#888284;font-size:10px}.resource-detail strong{display:block;font-size:24px;margin:3px 0}.resource-detail p{color:#8c8688;font-size:10px;margin:3px 0;line-height:1.4}.user-menu-head{display:flex;align-items:center;gap:13px;padding:5px 0 16px;border-bottom:1px solid rgba(237,237,237,.09)}.user-menu-logo{width:54px;height:58px;filter:brightness(0) invert(1)}.user-menu-head strong{display:block;font-size:20px}.user-menu-head span{font-size:10px;color:#827c7e}.menu-actions{display:grid;gap:8px;margin-top:15px}.menu-actions button,.menu-actions a{box-sizing:border-box;text-decoration:none;text-align:left;width:100%;height:44px;margin:0!important;padding:0 14px!important;border-radius:0!important;background:#0e090a!important;border:1px solid rgba(237,237,237,.10)!important;color:#d4cfd0!important;display:flex;align-items:center}.menu-actions button:hover,.menu-actions a:hover{border-color:#ff0036!important;color:#fff!important}.danger-action{color:#ff5c7e!important}.mini-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:15px}.mini-stat{padding:10px;background:#0e090a}.mini-stat label{font-size:8px;color:#6f696b}.mini-stat strong{display:block;font-size:15px;margin-top:3px}
.toast-stack{position:absolute;z-index:90;right:18px;top:94px;width:min(360px,calc(100% - 36px));display:flex;flex-direction:column;gap:8px;pointer-events:none}.toast{background:rgba(8,4,5,.96);border-left:4px solid #ff0036;border-bottom:1px solid rgba(237,237,237,.10);padding:11px 13px;box-shadow:0 10px 28px rgba(0,0,0,.4);animation:toastIn .25s ease}.toast.good{border-left-color:#ededed}.toast.fail{border-left-color:#ff0036}.toast b{display:block;font-size:11px}.toast span{font-size:10px;color:#918b8d}@keyframes toastIn{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}

@media(max-width:800px){
  .game-hud{height:70px}.game-brand{width:118px;min-width:118px;padding:7px 8px!important;gap:6px}.game-brand img{width:33px;height:38px}.game-brand-full{font-size:7px;line-height:1.1}.game-brand-sub{display:none}.resource-btn{min-width:0;padding:6px 4px!important;grid-template-columns:26px 1fr;gap:3px}.resource-icon{width:25px;height:25px}.resource-icon svg{width:25px;height:25px}.resource-value{font-size:12px}.resource-rate{font-size:7px}.user-btn{width:39px;min-width:39px;padding:0!important;font-size:0}.user-btn::after{content:"☰";font-size:21px;color:#ededed}.user-btn::before{top:16px;bottom:16px}
  .game-main{inset:70px 0 74px}.bottom-nav{height:74px}.nav-icon{font-size:21px}.nav-label{font-size:10px}
  .tutorial-chip{top:10px;left:10px;width:calc(100% - 78px);padding:9px 10px}.tutorial-chip span{display:none}.map-controls{right:9px;top:9px}.map-control{width:38px;height:38px}.map-hint{display:none}
  .inst-marker{transform:translate(-50%,-50%) scale(.82)}.inst-marker .marker-pin{width:34px;height:34px}.inst-marker .marker-label{font-size:8px;min-height:21px;padding:3px 5px}.inst-marker .marker-level{font-size:7px}
  .inst-sheet{left:0;right:0;top:auto;bottom:74px;width:auto;max-height:67vh;border-left:0;border-right:0;border-bottom:0;transform:translateY(calc(100% + 20px))}.inst-sheet.open{transform:translateY(0)}.sheet-hero{height:160px}.sheet-body{padding:0 14px 14px}.sheet-title h2{font-size:25px}.sheet-metrics{grid-template-columns:1fr 1fr}.sheet-action{height:50px}
  .page-view{padding:18px 12px 32px}.page-head h1{font-size:28px}.boost-grid{grid-template-columns:1fr;gap:10px}.boost-card p{min-height:0}.cookie-layout{grid-template-columns:1fr}.cookie-count{font-size:48px}.toast-stack{top:78px;right:10px;width:calc(100% - 20px)}
}
@media(min-width:1000px){
  .game-main{left:88px;bottom:0}.bottom-nav{top:78px;bottom:0;right:auto;width:88px;height:auto;grid-template-columns:1fr;grid-template-rows:repeat(3,112px);border-top:0;border-right:1px solid rgba(255,0,54,.55)}.nav-btn+ .nav-btn{border-left:0!important;border-top:1px solid rgba(237,237,237,.07)!important}.nav-btn.active::after{top:22%;bottom:22%;left:auto;right:-1px;width:3px;height:auto}.nav-label{font-size:10px}.inst-sheet{bottom:18px}.map-viewport{background:#071013}.map-world{width:1600px;height:1117px}.page-view{padding-top:36px}
}

/* v0.17 — corporate matte refinement + high-resolution map */
#authGate,#banGate{background-color:#050000!important;background-image:repeating-linear-gradient(118deg,transparent 0 42px,rgba(237,237,237,.038) 43px,transparent 45px 86px),repeating-linear-gradient(21deg,transparent 0 67px,rgba(237,237,237,.022) 68px,transparent 70px 126px),radial-gradient(circle at 14% 16%,rgba(255,0,54,.10),transparent 28%)!important;background-size:640px 400px,auto!important}
.auth-stage::before,.auth-stage::after{clip-path:none!important;box-shadow:none!important;background-color:#ff0036!important;background-image:repeating-linear-gradient(118deg,transparent 0 42px,rgba(237,237,237,.038) 43px,transparent 45px 86px),repeating-linear-gradient(21deg,transparent 0 67px,rgba(237,237,237,.022) 68px,transparent 70px 126px)!important;background-size:520px 325px!important;background-blend-mode:soft-light!important}
.auth-stage::before{height:38px!important}.auth-stage::after{height:108px!important}
.auth-panel{background:#0b0708!important;box-shadow:0 24px 64px rgba(0,0,0,.46)!important;border-top:3px solid #ff0036!important}
.auth-panel::before,.auth-panel::after{display:none!important}
.auth-primary,.sheet-action,.boost-buy,.cookie-buy{clip-path:none!important;box-shadow:none!important;background-color:#ff0036!important;background-image:repeating-linear-gradient(118deg,transparent 0 42px,rgba(237,237,237,.038) 43px,transparent 45px 86px),repeating-linear-gradient(21deg,transparent 0 67px,rgba(237,237,237,.022) 68px,transparent 70px 126px)!important;background-size:540px 338px!important;background-blend-mode:soft-light!important}
.auth-primary:hover,.sheet-action:hover:not(:disabled),.boost-buy:hover:not(:disabled),.cookie-buy:hover:not(:disabled){filter:brightness(1.07)!important;box-shadow:none!important}
.auth-hero h1{letter-spacing:-.045em!important}.auth-hero h1 .auth-accent{color:#ff0036!important}
.auth-hero-marks i{background-color:#ff0036!important;background-image:repeating-linear-gradient(118deg,transparent 0 42px,rgba(237,237,237,.038) 43px,transparent 45px 86px),repeating-linear-gradient(21deg,transparent 0 67px,rgba(237,237,237,.022) 68px,transparent 70px 126px);box-shadow:none!important}
.game-brand{background:#100608!important;background-image:repeating-linear-gradient(118deg,transparent 0 42px,rgba(237,237,237,.038) 43px,transparent 45px 86px),repeating-linear-gradient(21deg,transparent 0 67px,rgba(237,237,237,.022) 68px,transparent 70px 126px)!important;background-size:520px 325px!important;background-blend-mode:soft-light!important}
.game-brand::after{transform:none!important;right:0!important;width:58px!important;box-shadow:none!important}
.map-world{width:2800px!important;height:1954px!important;box-shadow:none!important}
.map-art{image-rendering:auto;filter:saturate(1.025) contrast(1.025)}
.map-inmt-banner,.sheet-inmt-banner{display:none!important}
.inst-marker{border-radius:36%!important}.inst-marker::before{border-radius:38%!important}.inst-marker::after{border-radius:38%!important}
@media(min-width:1000px){.map-world{width:2800px!important;height:1954px!important}.map-controls{display:none}.map-hint{display:block;right:14px;left:auto;max-width:360px}}
@media(max-width:800px){}


/* v0.18 — modular map: replace any asset in /assets/map without changing code */
.map-world.modular-map{width:1920px!important;height:1080px!important;box-shadow:none!important;overflow:visible}
.map-base{z-index:0;object-fit:cover!important;filter:saturate(1.01) contrast(1.02) brightness(.93)!important}
.modular-institutes{position:absolute;inset:0;z-index:7;pointer-events:none}
.institute-node{--node-w:280px;--node-h:235px;width:var(--node-w)!important;height:var(--node-h)!important;border-radius:0!important;pointer-events:auto;overflow:visible}
.institute-node::before,.institute-node::after{display:none!important}
.inst-asset{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:center;pointer-events:none;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 12px 14px rgba(0,0,0,.46));transition:filter .22s ease,transform .22s ease,opacity .22s ease}
.inst-fog{position:absolute;inset:8% 5% 5%;pointer-events:none;opacity:0;border-radius:45%;background:radial-gradient(ellipse at 50% 55%,rgba(156,166,166,.10),rgba(42,50,52,.36) 48%,rgba(5,0,0,.62) 78%,transparent 100%);backdrop-filter:grayscale(.7) brightness(.72) blur(1.2px);transition:opacity .22s}
.institute-node.locked .inst-asset{filter:grayscale(.88) brightness(.46) saturate(.5) drop-shadow(0 10px 12px rgba(0,0,0,.52));opacity:.76}.institute-node.locked .inst-fog{opacity:.92}
.institute-node.buy-poor .inst-asset{filter:grayscale(.55) brightness(.62) saturate(.68) drop-shadow(0 10px 12px rgba(0,0,0,.5));opacity:.86}.institute-node.buy-poor .inst-fog{opacity:.62}
.institute-node.buy-ready .inst-asset{filter:brightness(.9) saturate(.9) drop-shadow(0 0 18px rgba(255,0,54,.24))}.institute-node.buy-ready .inst-fog{opacity:.24}
.institute-node.owned .inst-asset,.institute-node.maxed .inst-asset{filter:saturate(1.04) contrast(1.02) drop-shadow(0 12px 14px rgba(0,0,0,.48));opacity:1}
.institute-node.upgrade-ready .inst-asset{filter:saturate(1.08) contrast(1.03) drop-shadow(0 0 20px rgba(255,0,54,.36))}.institute-node:hover .inst-asset,.institute-node:focus-visible .inst-asset{transform:translateY(-4px) scale(1.025);filter:saturate(1.08) brightness(1.04) drop-shadow(0 0 22px rgba(255,0,54,.38))}
.institute-node .marker-pin{right:6%;top:5%;z-index:4}.institute-node .marker-label{bottom:-4px;z-index:5}
.sheet-hero{background:radial-gradient(circle at 50% 60%,rgba(255,0,54,.12),transparent 62%),#080405}.sheet-hero-img{object-fit:contain!important;object-position:center 55%;padding:7px 20px 0;filter:drop-shadow(0 8px 18px rgba(0,0,0,.58))}.sheet-hero::after{background:linear-gradient(transparent 58%,rgba(5,0,0,.92))}.sheet-hero.has-image .sheet-hero-monogram{display:none}
@media(min-width:1000px){.map-world.modular-map{width:1920px!important;height:1080px!important}.map-controls{display:none!important}}
@media(max-width:999px){.map-world.modular-map{width:1920px!important;height:1080px!important}.institute-node{transform:translate(-50%,-50%) scale(.9)}.sheet-hero-img{padding:4px 12px 0}}

/* v0.18.2 — movable/collapsible modular-map layout editor (?layout=1) */
.layout-editor{position:absolute;z-index:80;left:14px;top:14px;width:322px;max-height:calc(100% - 28px);overflow:auto;padding:0;background:rgba(5,0,0,.95);border:1px solid rgba(237,237,237,.18);border-top:3px solid #ff0036;box-shadow:0 16px 44px rgba(0,0,0,.55);backdrop-filter:blur(12px);color:#ededed;font-size:12px;touch-action:none}
.layout-editor[hidden]{display:none!important}.layout-editor.collapsed{width:248px;max-height:none;overflow:hidden}.layout-editor.collapsed .layout-editor-body{display:none}.layout-editor-head{display:flex;align-items:center;gap:8px;padding:10px 10px 9px 14px;cursor:move;user-select:none;border-bottom:1px solid rgba(237,237,237,.1);background:rgba(255,0,54,.045)}.layout-editor-head h3{margin:0;flex:1;font-size:17px}.layout-editor-head button,.layout-editor-toggle{width:34px;height:30px;margin:0!important;padding:0!important;border-radius:0!important;border:1px solid rgba(237,237,237,.16)!important;background:#151011!important;color:#ededed!important;font-size:15px!important;font-weight:900!important}.layout-editor-head button:hover,.layout-editor-toggle:hover{border-color:#ff0036!important}.layout-editor-body{padding:12px 14px 14px}.layout-editor p{margin:0 0 12px;color:#8f898b;font-size:10px;line-height:1.35}.layout-editor label{display:block;color:#aaa4a6;font-size:9px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}.layout-editor select,.layout-editor input{width:100%;height:34px;box-sizing:border-box;background:#0b0607;color:#ededed;border:1px solid rgba(237,237,237,.18);border-radius:0;padding:5px 8px;font:inherit;outline:none}.layout-editor select:focus,.layout-editor input:focus{border-color:#ff0036}.layout-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.layout-row{margin-bottom:9px}.layout-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}.layout-actions button{min-height:36px;margin:0!important;border-radius:0!important;border:1px solid rgba(237,237,237,.16)!important;background:#151011!important;color:#ededed!important;font-size:10px!important;font-weight:800!important;text-transform:uppercase}.layout-actions button.primary{background:#ff0036!important;border-color:#ff0036!important;color:#fff!important}.layout-actions button:hover{border-color:#ff0036!important}.layout-path{margin-top:10px;padding:8px;background:#0a0607;color:#918b8d;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:9px;line-height:1.4;word-break:break-all}.layout-status{min-height:16px;margin-top:8px;color:#ff5a7d;font-size:10px}.layout-editor-toggle{position:absolute;z-index:81;left:14px;top:14px;width:auto;min-width:92px;padding:0 10px!important;font-size:10px!important;text-transform:uppercase;letter-spacing:.04em}.layout-editor-toggle[hidden]{display:none!important}.layout-mode #tutorialChip,.layout-mode .map-controls{display:none!important}.layout-mode .map-hint{left:auto!important;right:14px!important;bottom:14px!important;color:#b5afb1!important}.layout-mode .institute-node{cursor:move!important}.layout-mode .institute-node .inst-asset{opacity:1!important;filter:drop-shadow(0 12px 14px rgba(0,0,0,.52))!important}.layout-mode .institute-node .inst-fog{display:none!important}.layout-mode .institute-node.layout-selected::after{display:block!important;content:"";position:absolute;inset:-8px;border:2px solid #ff0036!important;border-radius:0!important;box-shadow:0 0 0 1px rgba(237,237,237,.5),0 0 26px rgba(255,0,54,.5);pointer-events:none}.layout-mode .institute-node.layout-selected .marker-label{background:#ff0036;color:white}.layout-mode .click-fx-layer{display:none}.institute-node{transform:translate(-50%,-100%)!important;transform-origin:50% 100%!important}.layout-anchor-dot{display:none}.layout-mode .layout-anchor-dot{display:block;position:absolute;left:50%;bottom:-5px;width:9px;height:9px;transform:translateX(-50%);border-radius:50%;background:#ededed;border:2px solid #ff0036;box-shadow:0 0 12px rgba(255,0,54,.8);z-index:9;pointer-events:none}
@media(max-width:999px){.institute-node{transform:translate(-50%,-100%) scale(.9)!important;transform-origin:50% 100%!important}.layout-editor{width:min(300px,calc(100% - 24px));max-height:55%;left:12px;top:12px}.layout-mode .map-hint{display:none!important}.layout-editor-toggle{left:12px;top:12px}}

/* v0.19 — Fog & Motion pass ------------------------------------------------- */
.institute-node{--fog-opacity:0;--fog-speed:8.5s;contain:layout style;}
.institute-node .inst-fog{
  inset:-13% -18% -7%!important;
  border-radius:0!important;
  opacity:var(--fog-opacity)!important;
  overflow:hidden;
  background:
    radial-gradient(ellipse at 7% 58%,rgba(207,214,214,.68) 0 7%,rgba(112,122,123,.54) 18%,rgba(37,44,46,.22) 34%,transparent 49%),
    radial-gradient(ellipse at 34% 42%,rgba(188,197,197,.52) 0 8%,rgba(88,98,100,.44) 20%,rgba(31,37,39,.23) 36%,transparent 53%),
    radial-gradient(ellipse at 69% 63%,rgba(194,201,201,.58) 0 9%,rgba(94,104,106,.46) 22%,rgba(32,39,41,.24) 38%,transparent 55%),
    radial-gradient(ellipse at 94% 38%,rgba(205,212,212,.56) 0 7%,rgba(91,102,104,.43) 20%,rgba(31,38,40,.20) 37%,transparent 52%);
  filter:blur(6px) saturate(.72);
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 9%,#000 91%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0,#000 9%,#000 91%,transparent 100%);
  backdrop-filter:none!important;
  transition:opacity .55s ease,filter .55s ease!important;
  animation:fogBreath var(--fog-speed) ease-in-out infinite alternate;
  transform:translateZ(0);
  z-index:2;
}
.institute-node .inst-fog::before,
.institute-node .inst-fog::after{
  content:"";
  position:absolute;
  inset:-12% -18%;
  pointer-events:none;
  background-repeat:no-repeat;
  will-change:transform,opacity;
}
.institute-node .inst-fog::before{
  opacity:.72;
  background:
    radial-gradient(ellipse at 16% 54%,rgba(222,226,226,.55) 0 7%,rgba(111,121,123,.37) 24%,transparent 49%),
    radial-gradient(ellipse at 55% 30%,rgba(183,192,193,.46) 0 9%,rgba(84,94,97,.30) 27%,transparent 51%),
    radial-gradient(ellipse at 87% 64%,rgba(214,219,219,.48) 0 8%,rgba(99,109,111,.31) 25%,transparent 50%);
  animation:fogDriftA calc(var(--fog-speed) * 1.15) ease-in-out infinite alternate;
}
.institute-node .inst-fog::after{
  opacity:.52;
  background:
    radial-gradient(ellipse at 30% 74%,rgba(155,165,167,.42) 0 10%,rgba(71,82,84,.28) 29%,transparent 54%),
    radial-gradient(ellipse at 72% 45%,rgba(204,210,210,.43) 0 7%,rgba(92,103,105,.27) 27%,transparent 52%);
  animation:fogDriftB calc(var(--fog-speed) * .92) ease-in-out infinite alternate-reverse;
}
.institute-node.locked{--fog-opacity:.96;--fog-speed:7.8s}
.institute-node.buy-poor{--fog-opacity:.72;--fog-speed:9.2s}
.institute-node.buy-ready{--fog-opacity:.36;--fog-speed:10.4s}
.institute-node.owned,.institute-node.maxed,.institute-node.upgrade-ready{--fog-opacity:0}
.institute-node.locked .inst-asset{filter:grayscale(.82) brightness(.43) saturate(.55) drop-shadow(0 10px 12px rgba(0,0,0,.52))!important;opacity:.78!important}
.institute-node.buy-poor .inst-asset{filter:grayscale(.34) brightness(.66) saturate(.74) drop-shadow(0 10px 12px rgba(0,0,0,.5))!important;opacity:.9!important}
.institute-node.buy-ready .inst-asset{filter:brightness(.92) saturate(.94) drop-shadow(0 0 19px rgba(255,0,54,.28))!important;opacity:1!important}
.institute-node.owned .inst-asset,.institute-node.maxed .inst-asset{filter:saturate(1.04) contrast(1.02) drop-shadow(0 12px 14px rgba(0,0,0,.48))!important;opacity:1!important}
.institute-node.upgrade-ready .inst-asset{filter:saturate(1.08) contrast(1.03) drop-shadow(0 0 22px rgba(255,0,54,.38))!important}
@keyframes fogBreath{0%{filter:blur(6px) saturate(.72);transform:translate3d(-1.2%,0,0) scale(1.01)}100%{filter:blur(8px) saturate(.66);transform:translate3d(1.8%,-1%,0) scale(1.035)}}
@keyframes fogDriftA{0%{transform:translate3d(-7%,2%,0) scale(1.04);opacity:.52}100%{transform:translate3d(8%,-3%,0) scale(1.10);opacity:.78}}
@keyframes fogDriftB{0%{transform:translate3d(8%,-1%,0) scale(1.02);opacity:.38}100%{transform:translate3d(-8%,3%,0) scale(1.09);opacity:.62}}

/* Institute purchase / upgrade feedback. */
.institute-node.anim-unlock{z-index:14!important}
.institute-node.anim-unlock .inst-asset{animation:instituteUnlock .95s cubic-bezier(.2,.88,.24,1.08) both}
.institute-node.anim-unlock .inst-fog{animation:fogDissolve .95s ease-out both!important}
.institute-node.anim-upgrade .inst-asset{animation:instituteUpgrade .72s cubic-bezier(.2,.84,.3,1.12) both}
.institute-node.anim-upgrade .marker-label{animation:labelUpgrade .72s ease both}
.institute-node.anim-event .inst-asset{animation:eventAssetPulse .7s ease both}
.institute-node.buff-start .inst-asset{animation:buffWake .82s ease both}
@keyframes instituteUnlock{0%{opacity:.45;transform:translateY(12px) scale(.90);filter:grayscale(.7) brightness(.55) drop-shadow(0 0 0 rgba(255,0,54,0))}45%{opacity:1;transform:translateY(-7px) scale(1.06);filter:saturate(1.22) brightness(1.18) drop-shadow(0 0 32px rgba(255,0,54,.68))}100%{opacity:1;transform:none}}
@keyframes fogDissolve{0%{opacity:.82;transform:scale(1)}45%{opacity:.50;filter:blur(11px);transform:scale(1.14) translateY(-4%)}100%{opacity:0;filter:blur(16px);transform:scale(1.28) translateY(-9%)}}
@keyframes instituteUpgrade{0%{transform:none}36%{transform:translateY(-7px) scale(1.065);filter:saturate(1.32) brightness(1.24) drop-shadow(0 0 34px rgba(255,0,54,.72))}70%{transform:translateY(2px) scale(.99)}100%{transform:none}}
@keyframes labelUpgrade{0%,100%{transform:translateX(-50%)}38%{transform:translateX(-50%) translateY(-7px) scale(1.08);background:#ff0036;color:#fff}}
@keyframes eventAssetPulse{0%,100%{transform:none}35%{transform:scale(1.055);filter:saturate(1.35) brightness(1.22) drop-shadow(0 0 30px rgba(255,0,54,.68))}}
@keyframes buffWake{0%,100%{transform:none}35%{transform:translateY(-5px) scale(1.04);filter:saturate(1.25) brightness(1.16) drop-shadow(0 0 28px rgba(255,0,54,.62))}}
.node-action-badge{position:absolute;left:50%;top:8%;z-index:12;transform:translate(-50%,8px) scale(.86);padding:6px 10px;background:#ff0036;color:white;border:1px solid rgba(237,237,237,.28);box-shadow:0 8px 22px rgba(0,0,0,.46);font-size:9px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;pointer-events:none;animation:nodeBadge 1.2s ease forwards}
.node-action-badge.upgrade{background:#ededed;color:#120508;border-color:#ff0036}
@keyframes nodeBadge{0%{opacity:0;transform:translate(-50%,14px) scale(.75)}18%{opacity:1;transform:translate(-50%,-2px) scale(1.05)}68%{opacity:1;transform:translate(-50%,-8px) scale(1)}100%{opacity:0;transform:translate(-50%,-20px) scale(.94)}}
.sheet-hero.anim-unlock .sheet-hero-img{animation:sheetUnlock .95s cubic-bezier(.2,.86,.28,1.08)}
.sheet-hero.anim-upgrade .sheet-hero-img{animation:sheetUpgrade .68s ease}
@keyframes sheetUnlock{0%{opacity:.45;transform:scale(.91);filter:grayscale(.6) brightness(.62)}45%{opacity:1;transform:scale(1.04);filter:saturate(1.24) brightness(1.15) drop-shadow(0 0 28px rgba(255,0,54,.54))}100%{transform:none}}
@keyframes sheetUpgrade{0%,100%{transform:none}38%{transform:scale(1.035);filter:saturate(1.25) brightness(1.14) drop-shadow(0 0 24px rgba(255,0,54,.48))}}

/* Click / boost / cookie feedback without extra toast noise. */
.click-fx{min-width:44px;text-align:center;overflow:visible!important;z-index:2}
.click-fx .click-value{position:relative;z-index:2}
.click-fx .click-spark{position:absolute;left:50%;top:50%;width:5px;height:5px;border-radius:50%;background:#ffd064;box-shadow:0 0 9px rgba(255,192,64,.85);opacity:0;animation:clickSpark .62s ease-out forwards;animation-delay:var(--delay,0s)}
@keyframes clickSpark{0%{opacity:0;transform:translate(-50%,-50%) rotate(var(--angle)) translateY(0) scale(1)}16%{opacity:1}100%{opacity:0;transform:translate(-50%,-50%) rotate(var(--angle)) translateY(calc(-1 * var(--distance))) scale(.18)}}
.boost-card.boost-start{animation:boostStart .9s ease both}
.boost-card.boost-start .boost-glyph{animation:boostGlyphStart .85s ease both}
@keyframes boostStart{0%{box-shadow:0 0 0 rgba(255,0,54,0)}34%{box-shadow:0 0 42px rgba(255,0,54,.28);transform:translateY(-4px)}100%{transform:none}}
@keyframes boostGlyphStart{0%,100%{transform:none}38%{transform:scale(1.10);filter:brightness(1.28)}}
.cookie-panel.cookie-pop{animation:cookiePanelPop .82s ease both}
.cookie-panel.cookie-pop .cookie-count-icon{animation:cookieIconPop .75s ease both}
@keyframes cookiePanelPop{0%,100%{box-shadow:0 14px 40px rgba(0,0,0,.25)}36%{box-shadow:0 0 40px rgba(255,0,54,.26);transform:translateY(-3px)}}
@keyframes cookieIconPop{0%,100%{transform:none}36%{transform:rotate(-10deg) scale(1.16)}}
.leader-table tr.me.rank-pop td{animation:rankPop .9s ease both}
@keyframes rankPop{0%{background:rgba(255,0,54,.30)}100%{background:transparent}}

/* Current-player row stays legible even at zero rating. */
.leader-table tr.me{background:linear-gradient(90deg,rgba(255,0,54,.10),transparent 72%)}
.leader-table tr.me td:first-child{color:#ff365f;font-weight:900}

/* Motion safety: the game remains fully usable with reduced motion. */
@media (prefers-reduced-motion:reduce){
  .inst-fog,.inst-fog::before,.inst-fog::after,.institute-node,.inst-asset,.marker-label,.sheet-hero-img,.click-fx,.click-spark,.boost-card,.boost-glyph,.cookie-panel,.cookie-count-icon,.toast{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .node-action-badge{animation:none!important;opacity:1;transform:translate(-50%,0)}
}
