@font-face { font-family: 'VT323'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/vt323-vietnamese-400-normal.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'VT323'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/vt323-latin-ext-400-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'VT323'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(../assets/fonts/vt323-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #14161c;
  --panel: #2b2b2b;
  --panel-2: #232323;
  --panel-3: #333436;
  --border: #4a4a4a;
  --text: #f2f2f2;
  --muted: #a0a4ab;
  --green: #1ac645;
  --green-d: #128a30;
  --yellow: #f5b82e;
  --orange: #e8901c;
  --red: #e0453c;
  --blue: #3a7bd5;
  --u: 2px;
  --stage-w: 1024px;
  --font: 'VT323', 'Courier New', monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --bg: #14161c; --text: #f2f2f2; } }
:root[data-theme="dark"] { --bg: #14161c; --text: #f2f2f2; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 20px; line-height: 1.15; overflow: hidden; -webkit-tap-highlight-color: transparent; }
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }
button { font-family: var(--font); font-size: 1em; color: inherit; }
input { font-family: var(--font); font-size: 1em; }
.hidden { display: none !important; }
.px-icon { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }

#app { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
#main { display: flex; flex-direction: column; align-items: center; gap: 0; }
body.side #main { flex-direction: row; align-items: stretch; }
#stage { position: relative; font-size: clamp(12px, calc(var(--u) * 8.5), 24px); touch-action: none; user-select: none; -webkit-user-select: none; background: #0c0d11; overflow: hidden; }
#world, #overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
#world { image-rendering: pixelated; image-rendering: crisp-edges; }
#overlay { pointer-events: none; }

#hud { width: var(--app-w, var(--stage-w)); max-width: 100vw; height: 46px; display: grid; grid-template-columns: 1fr minmax(120px, 1.1fr) 1fr auto; align-items: center; gap: 10px; padding: 0 8px; background: var(--panel-2); border: 2px solid #000; box-shadow: inset 0 -2px 0 rgba(255,255,255,.05); }
.hud-left { min-width: 0; line-height: 1; }
.hud-name { font-size: 1.2em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 1px 1px 0 #000; }
.hud-rating { color: #ffd23f; font-size: .85em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-pop { text-align: center; min-width: 0; }
.pop-title { font-size: .95em; color: #64ff96; text-shadow: 1px 1px 0 #000; line-height: 1; margin-bottom: 1px; }
.pop-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-short { display: none; }
@media (max-width: 520px) { .pop-long { display: none; } .pop-short { display: inline; } }
.pop-bar { position: relative; height: 16px; background: #262626; border: 2px solid #646464; border-radius: 9px; overflow: hidden; }
.pop-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 50%; background: #5dca85; border-radius: 7px; transition: width .4s, background .4s; box-shadow: inset 0 3px 0 rgba(255,255,255,.35); }
.pop-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .85em; text-shadow: 1px 1px 0 #000; }
.pop-bar.up { animation: popUp .5s; } .pop-bar.down { animation: popDown .5s; }
@keyframes popUp { 30% { box-shadow: 0 0 10px #6fe38c; } }
@keyframes popDown { 30% { box-shadow: 0 0 10px #ff6464; } }
.hud-right { min-width: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 0; line-height: 1; }
.hud-money { font-size: 1.2em; color: #ffe08a; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
.hud-sub { display: flex; gap: 8px; color: var(--muted); font-size: .85em; align-items: center; white-space: nowrap; }
.hud-weather { display: inline-flex; }
.hud-weather img { width: 14px; height: 14px; }

#toolbar { width: var(--stage-w); max-width: 100vw; height: 70px; display: flex; gap: 4px; justify-content: center; align-items: center; flex-wrap: nowrap; padding: 3px 4px; background: var(--panel-2); border: 2px solid #000; overflow-x: auto; scrollbar-width: none; }
body.side #toolbar { width: var(--tb-side); height: var(--stage-h); flex-direction: column; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; padding: 4px 3px; }
body.side .tool { width: 100%; min-width: 0; flex: 1 1 0; max-height: 104px; }
#toolbar::-webkit-scrollbar { display: none; }
.tool { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-width: 70px; padding: 4px 6px 3px; background: var(--panel-3); border: 2px solid #1a1a1a; border-radius: 4px; cursor: pointer; box-shadow: inset -2px -3px 0 rgba(0,0,0,.35), inset 2px 2px 0 rgba(255,255,255,.12); }
.tool:hover { background: #3d3f42; }
.tool:active { transform: translateY(1px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.35); }
.tool img { width: 42px; height: 42px; }
.tool-label { font-size: .8em; white-space: nowrap; color: #e6e6e6; }
.tool.active { background: var(--green-d); border-color: #0a4d1b; }
.tool.warn { background: #6b2a2a; }
.tool.pulse { animation: pulse 1s infinite; }
.tool.glow { outline: 3px solid #ffd23f; outline-offset: 1px; animation: glow 1s infinite; }
.tool.carry { background: #5a4a1e; }
.tool-meter { display: flex; align-items: center; gap: 2px; margin: -4px 0 1px; font-style: normal; }
.tool .tool-meter img { width: 12px; height: 12px; flex: none; }
.tm-bar { position: relative; display: block; font-style: normal; width: 46px; height: 15px; background: #1b1c1f; border: 1px solid #000; border-radius: 4px; overflow: hidden; }
.tm-bar b { position: absolute; left: 0; top: 0; bottom: 0; width: 0; transition: width .3s linear, background .3s; }
.tm-bar span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; color: #fff; text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000; }
.tool.stinky { outline: 3px solid #9fd84a; outline-offset: 1px; animation: stinky 1.2s infinite; }
@keyframes stinky { 50% { outline-color: #e8f2b0; background: #3d4a22; } }
body.compact .tool-meter { margin: -2px 0 0; }
body.compact:not(.side) .tool-meter { margin: 1px 0 0; }
body.compact:not(.side) .tool[data-key="spray"] .tool-label { display: none; }
body.compact .tool .tool-meter img { width: 12px; height: 12px; }
body.compact .tm-bar { width: 34px; height: 13px; }
body.compact .tm-bar span { font-size: 13px; }
@keyframes pulse { 50% { background: #8a6d1a; } }
@keyframes glow { 50% { outline-color: #fff6c4; } }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--red); color: #fff; font-size: .85em; line-height: 20px; text-align: center; border: 2px solid #000; }

#banners { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 3px; align-items: center; pointer-events: none; width: 92%; }
.banner { padding: 2px 10px; background: rgba(20,20,26,.88); border: 2px solid #4a4a4a; border-radius: 4px; font-size: .85em; text-align: center; max-width: 100%; }
.banner.alarm, .banner.hacker { background: rgba(120,10,10,.92); border-color: #ff6b6b; animation: blink .6s infinite; }
body.game-paused .banner, body.game-paused .tool { animation-play-state: paused; }
#smell-meter { position: absolute; top: 4px; left: 50%; transform: translateX(-50%); z-index: 2; pointer-events: none; }
body.smell-on #banners { top: 38px; }
@media (max-width: 600px) {
  #smell-meter { top: auto; bottom: 8px; }
  body.smell-on #banners { top: 4px; }
}
.smell-meter { display: flex; align-items: center; gap: 6px; padding: 2px 8px 2px 4px; background: rgba(20,20,26,.9); border: 2px solid #7f8f3a; border-radius: 6px; }
.smell-meter.hidden { display: none; }
.smell-meter img { width: 24px; height: 24px; }
.sm-label { color: #e8f2b0; font-size: .9em; }
.sm-bar { position: relative; width: min(190px, 38vw); height: 16px; background: #262626; border: 2px solid #646464; border-radius: 9px; overflow: hidden; }
.sm-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 7px; transition: width .2s linear, background .3s; box-shadow: inset 0 3px 0 rgba(255,255,255,.3); }
.sm-bar b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .85em; font-weight: normal; text-shadow: 1px 1px 0 #000; }
.smell-meter.high { border-color: #e0625a; animation: smellPulse 1s infinite; }
.smell-meter.spraying .sm-bar { border-color: #9ff0ff; box-shadow: 0 0 8px rgba(159,240,255,.7); }
@keyframes smellPulse { 50% { background: rgba(70,20,20,.92); } }
body.game-paused .smell-meter { animation-play-state: paused; }
.banner.closed { border-color: #ff9f43; color: #ffd8a8; }
.banner.broken { border-color: #e0625a; color: #ffd0cc; }
@keyframes blink { 50% { background: rgba(60,10,10,.92); } }

#social { position: absolute; top: 14%; left: 50%; transform: translateX(-50%); width: min(380px, 66%); pointer-events: none; font-size: .9em; z-index: 3; }
.post { display: block; width: 100%; text-align: left; pointer-events: auto; cursor: pointer; font-family: var(--font); font-size: 1em; background: #fff; color: #141414; border: 2px solid #dcdcdc; border-radius: 10px; padding: 6px 10px; box-shadow: 0 6px 20px rgba(0,0,0,.45); transform: translateY(-20px); opacity: 0; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .3s; }
.post.in { transform: translateY(0); opacity: 1; }
.post.out { transform: translateY(-14px); opacity: 0; }
.post.neg { border-left: 5px solid #e0453c; }
.post.pos { border-left: 5px solid #1ac645; }
.post-head { display: flex; align-items: center; gap: 6px; color: #555; font-size: .9em; }
.post-pin { width: 28px; height: 28px; }
.post-kind { flex: 1; }
.post-pop { font-size: .85em; padding: 0 5px; border-radius: 4px; }
.post-pop.up { background: #d9f7e2; color: #128a30; } .post-pop.down { background: #fde2e0; color: #b3261e; }
.post-body { display: flex; gap: 8px; align-items: flex-start; margin-top: 3px; }
.post-ava { width: 33px; height: 33px; image-rendering: pixelated; border-radius: 50%; background: #e6e6e6; flex-shrink: 0; }
.post-user { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.post-user b { font-weight: normal; color: #1e1e1e; }
.post-stars { color: #e8a200; letter-spacing: 1px; }
.post-text { font-size: 1.02em; line-height: 1.15; color: #222; }

#tutorial { position: absolute; left: 6px; top: 6px; max-width: 62%; font-size: .9em; z-index: 4; }
.tut { display: flex; align-items: center; gap: 6px; background: rgba(22,22,28,.92); border: 2px solid #ffd23f; border-radius: 6px; padding: 3px 4px 3px 5px; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.tut b { font-weight: normal; color: #ffe08a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tut-step { background: #ffd23f; color: #1a1a1a; border-radius: 3px; padding: 0 5px; flex-shrink: 0; }
.tut-skip { flex-shrink: 0; margin-left: 2px; padding: 0 6px; background: none; border: 1px solid #6a6a6a; border-radius: 3px; color: #c9c9c9; font-size: .9em; cursor: pointer; }
.tut-skip:hover { color: #fff; border-color: #aaa; }

.guide { position: fixed; z-index: 60; pointer-events: none; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -100%); filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)); }
.guide-arrow { width: 44px; height: auto; image-rendering: pixelated; }
.guide-label { margin-bottom: 2px; padding: 2px 9px 3px; background: #1b1622; border: 2px solid #ffd23f; border-radius: 6px; color: #ffe08a; font-size: 19px; white-space: nowrap; }
.guide.bounce .guide-arrow { animation: guideBob .7s ease-in-out infinite; }
.guide.flip { transform: translate(-50%, 0); flex-direction: column-reverse; }
.guide.flip .guide-arrow { transform: rotate(180deg); }
.guide.flip.bounce .guide-arrow { animation: guideBobUp .7s ease-in-out infinite; }
.guide.right { transform: translate(-100%, -50%); flex-direction: row; }
.guide.right .guide-label { margin: 0 2px 0 0; }
.guide.right .guide-arrow { transform: rotate(-90deg); }
.guide.right.bounce .guide-arrow { animation: guideBobRight .7s ease-in-out infinite; }
@keyframes guideBobRight { 0%, 100% { transform: rotate(-90deg); } 50% { transform: rotate(-90deg) translateY(-7px); } }
@keyframes guideBob { 50% { transform: translateY(-7px); } }
@keyframes guideBobUp { 0%, 100% { transform: rotate(180deg); } 50% { transform: rotate(180deg) translateY(-7px); } }
body.compact .guide-arrow { width: 32px; }
body.compact .guide-label { font-size: 17px; padding: 1px 7px 2px; }

.goal { position: absolute; left: 6px; top: 6px; z-index: 4; display: flex; align-items: flex-start; max-width: min(44%, 340px); background: rgba(22,22,28,.9); border: 2px solid #5a5f6b; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.4); font-size: .82em; line-height: 1.05; }
.goal-body { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; padding: 4px 2px 4px 5px; background: none; border: 0; color: inherit; font: inherit; line-height: inherit; text-align: left; cursor: default; }
.goal-body.link { cursor: pointer; }
.goal:has(.goal-body.link:hover) { border-color: #ffd23f; background: rgba(34,34,42,.95); }
.goal-min { flex-shrink: 0; width: 22px; height: 22px; margin: 1px 1px 0 0; padding: 0; background: none; border: 0; border-radius: 4px; color: #9aa0ab; font: inherit; font-size: 1.3em; line-height: 1; cursor: pointer; }
.goal-min:hover { background: rgba(255,255,255,.1); color: #fff; }
.goal-chip { position: absolute; left: 6px; top: 6px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 3px 4px 4px; background: rgba(22,22,28,.88); border: 2px solid #5a5f6b; border-radius: 6px; box-shadow: 0 3px 10px rgba(0,0,0,.4); cursor: pointer; }
.goal-chip:hover { border-color: #ffd23f; }
.goal-chip .goal-ico { width: 24px; height: 24px; }
.goal-chip-bar { display: block; width: 24px; height: 4px; background: #2e3038; border-radius: 2px; overflow: hidden; }
.goal-chip-bar b { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #f5b82e, #ffe08a); }
.goal-chip.done { animation: goalDone .9s; }
.goal-ico { width: 24px; height: 24px; flex-shrink: 0; }
.goal-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.goal-head { color: #a8adb8; font-size: .85em; text-transform: uppercase; letter-spacing: .04em; }
.goal-text { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-bar { display: block; height: 5px; background: #2e3038; border-radius: 3px; overflow: hidden; }
.goal-bar i { display: block; height: 100%; background: linear-gradient(90deg, #f5b82e, #ffe08a); border-radius: 3px; transition: width .4s; }
.goal-foot { display: flex; justify-content: space-between; gap: 8px; color: #c9cdd6; font-size: .9em; }
.goal-foot b { font-weight: normal; color: #6fe38c; margin-left: auto; }
.goal-go { display: inline-flex; align-items: center; gap: 3px; min-width: 0; padding: 0 4px 0 2px; border: 1px solid #ffd23f; border-radius: 3px; color: #ffd23f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-go img { width: 12px; height: 12px; flex-shrink: 0; }
.goal-body.link:hover .goal-go { background: #ffd23f; color: #1b1c1f; }
.goal.done { animation: goalDone .9s; }
@keyframes goalDone { 0% { border-color: #6fe38c; box-shadow: 0 0 0 0 rgba(111,227,140,.9); } 60% { box-shadow: 0 0 0 10px rgba(111,227,140,0); transform: scale(1.04); } }
.confetti { position: fixed; z-index: 70; width: 6px; height: 9px; pointer-events: none; animation: confetti 1s ease-out forwards; }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }
body.compact .goal { font-size: .86em; max-width: min(48%, 300px); }
body.compact .goal-body { padding: 3px 1px 3px 4px; }
body.compact .goal-head { display: none; }
body.compact .goal-min { width: 20px; height: 20px; }
body.compact .goal-chip .goal-ico { width: 18px; height: 18px; }
body.compact .goal-chip-bar { width: 18px; height: 3px; }
body.compact .goal-ico { width: 18px; height: 18px; }

.hud-money.bump { animation: moneyBump .3s; }
@keyframes moneyBump { 40% { transform: scale(1.18); color: #fff6c4; } }

#toasts { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; width: 90%; }
.toast { padding: 3px 12px; background: rgba(20,20,26,.94); border: 2px solid #4a4a4a; border-radius: 5px; font-size: .85em; text-align: center; animation: toastIn .25s; max-width: 100%; }
.toast.good { border-color: var(--green); color: #c3f5cf; }
.toast.bad { border-color: var(--red); color: #ffd0cc; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 12px; background: #4a4c50; border: 2px solid #1a1a1a; border-radius: 4px; cursor: pointer; color: #fff; box-shadow: inset -2px -3px 0 rgba(0,0,0,.35), inset 2px 2px 0 rgba(255,255,255,.15); white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(1px); box-shadow: inset 2px 2px 0 rgba(0,0,0,.35); }
.btn:disabled { opacity: .55; cursor: default; filter: grayscale(.4); }
.btn.green { background: var(--green); color: #0b2412; }
.btn.yellow { background: var(--yellow); color: #2b1c00; }
.btn.red { background: var(--red); }
.btn.ghost { background: #333; }
.btn.big { font-size: 1.2em; padding: 8px 18px; }
.btn.small { padding: 2px 8px; font-size: .9em; }
.btn.tiny { padding: 0 6px; font-size: .8em; }
.btn.cant, .cell.cant { filter: grayscale(.8) brightness(.7); }
.btn.price.on { background: var(--green); color: #0b2412; }

#modals { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; pointer-events: auto; padding: 8px; animation: fadeIn .15s; }
@keyframes fadeIn { from { opacity: 0; } }
.win { background: var(--panel); border: 2px solid var(--border); border-radius: 6px; box-shadow: 0 0 0 2px #000, 0 14px 40px rgba(0,0,0,.6); width: min(520px, 96vw); max-height: 92vh; display: flex; flex-direction: column; animation: winIn .18s ease-out; }
.win.wide { width: min(980px, 98vw); height: min(640px, 94vh); }
@keyframes winIn { from { transform: scale(.96); opacity: 0; } }
.win-title { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: #1e1f22; border-bottom: 2px solid #000; border-radius: 4px 4px 0 0; }
.win-name { flex: 1; font-size: 1.1em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dots { display: flex; gap: 4px; } .dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.dots .d1 { background: #e0453c; } .dots .d2 { background: #f5b82e; } .dots .d3 { background: #1ac645; }
.win-close { background: #3a3a3a; border: 2px solid #111; border-radius: 4px; width: 30px; height: 26px; cursor: pointer; }
.win-close:hover { background: var(--red); }
.win-close, .os-wbtn { display: inline-flex; align-items: center; justify-content: center; padding: 0; font-size: 0; line-height: 0; }
.win-close::before, .os-wbtn::before { content: ''; display: block; width: 14px; height: 14px; background: center / 100% 100% no-repeat; image-rendering: pixelated; }
.ico-x::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23e6e6e6' d='M0 0h1v1H0zM6 0h1v1H6zM1 1h1v1H1zM5 1h1v1H5zM2 2h1v1H2zM4 2h1v1H4zM3 3h1v1H3zM2 4h1v1H2zM4 4h1v1H4zM1 5h1v1H1zM5 5h1v1H5zM0 6h1v1H0zM6 6h1v1H6z'/%3E%3C/svg%3E"); }
.ico-min::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23e6e6e6' d='M0 5h7v1H0z'/%3E%3C/svg%3E"); }
.ico-max::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23e6e6e6' d='M0 0h7v2H0zM0 2h1v4H0zM6 2h1v4H6zM0 6h7v1H0z'/%3E%3C/svg%3E"); }
.win-body { padding: 10px 12px 12px; overflow: auto; flex: 1; min-height: 0; }
.win h3 { margin: 4px 0 6px; font-weight: normal; color: #64ff96; font-size: 1.3em; }
.win h4 { margin: 4px 0; font-weight: normal; font-size: 1.1em; }
.hint { color: var(--muted); font-size: .9em; margin: 2px 0 6px; }
.err { color: #ff8a80; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.tag { display: inline-block; padding: 3px 8px; border-radius: 4px; background: #3a3a3a; border: 1px solid #555; font-size: .9em; }
.tag.green { background: #123d20; border-color: var(--green); color: #9ff0b6; }
.tag.gold { background: #3d3212; border-color: #c9a227; color: #ffe08a; }
.tag.big { font-size: 1.05em; margin-bottom: 6px; }
.inp { flex: 1; min-width: 0; padding: 5px 8px; background: #1b1c1f; color: #fff; border: 2px solid #555; border-radius: 4px; }
.confirm p { font-size: 1.05em; margin: 4px 0 10px; }
.confirm .row { justify-content: flex-end; }
.gray-popup .win { width: min(440px, 94vw); }

.app-head h3 { margin: 0 0 4px; }
.app-head .hint { max-width: 70ch; }
.tut-glow { outline: 3px solid #ffd23f; outline-offset: 1px; animation: glow 1s infinite; }
.cat-dot { position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ffd23f; border: 1px solid #000; }
.perks { margin: 0 0 6px; padding-left: 18px; color: #c9ccd1; font-size: .92em; flex: 1; }
.empty-box { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px 10px; gap: 2px; }
.empty-box img { width: 56px; height: 56px; }
.empty-box p { margin: 2px 0; }
.cats { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0 8px; }
.cat { position: relative; display: flex; align-items: center; gap: 4px; padding: 3px 8px; background: #3a3b3e; border: 2px solid #1a1a1a; border-radius: 4px; cursor: pointer; }
.cat img { width: 24px; height: 24px; }
.cat.on { background: var(--green-d); border-color: var(--green); }
.table-wrap { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.shop-table { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 600px; }
.shop-table th { font-weight: normal; padding: 2px 4px; background: #232427; border-radius: 3px; vertical-align: top; }
.shop-table th.locked { opacity: .55; }
.tier-name { font-size: .9em; }
.tier-star { color: #ffd23f; font-size: .85em; }
.line-cell { min-width: 120px; padding: 2px 4px; }
.line-cell b { font-weight: normal; font-size: 1.05em; }
.line-cell .ok { color: #6fe38c; font-size: .85em; } .line-cell .miss { color: #ffb36b; font-size: .85em; }
.cell { width: 100%; padding: 6px 4px; border-radius: 4px; border: 2px solid #1a1a1a; cursor: pointer; font-size: .92em; box-shadow: inset -2px -2px 0 rgba(0,0,0,.3); }
.cell.buy { background: var(--yellow); color: #2b1c00; }
.cell.replace { background: #e8a23a; }
.cell.owned { background: #123d20; border-color: var(--green); color: #9ff0b6; cursor: default; }
.cell.locked { background: #2f3033; color: #8a8d93; cursor: default; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 10px; }
.cards.three { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.cards.four { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cards.five { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.card { background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; padding: 8px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card img.px-icon { width: 36px; height: 36px; }
.card p { margin: 0 0 4px; color: #c9ccd1; font-size: .9em; flex: 1; }
.card.bought { border-color: var(--green-d); }
.card.dim { opacity: .6; }
.card.staff { align-items: center; text-align: center; }
.portrait { width: 66px; height: auto; image-rendering: pixelated; background: #1e2128; border-radius: 6px; padding: 4px; }
.stars span { color: #4f5562; font-size: 1.3em; } .stars span.on { color: #ffd23f; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.set-block { background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; padding: 8px 10px; }
.swatch { width: 30px; height: 30px; border: 2px solid #111; border-radius: 4px; cursor: pointer; }
.swatch.on { outline: 3px solid #fff; }
.color-pick { width: 40px; height: 28px; border: 2px solid #111; background: none; padding: 0; vertical-align: middle; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 0; }
.switch { min-width: 64px; padding: 3px 8px; border-radius: 12px; border: 2px solid #111; background: #4a4a4a; cursor: pointer; }
.switch.on { background: var(--green); color: #0b2412; }

.pm-cards .card { align-items: stretch; }
.pm-frame { display: flex; align-items: flex-end; justify-content: center; height: 132px; background: #1e1f22; border-radius: 4px; padding: 4px; }
.pm-thumb { image-rendering: pixelated; max-width: 100%; border: 2px solid #111; }
.card.pm h4 { margin-top: 2px; }

.comfort { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 8px; }
.comfort-label { color: #c9ccd1; }
.comfort .stars span { font-size: 1.2em; }
.comfort .hint { margin: 0; }
.reno-sec { background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; padding: 6px 8px 8px; margin-bottom: 8px; min-width: 0; }
.reno-sec h4 { margin: 0 0 6px; }
.reno-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.reno-opt { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 4px; background: #2b2b2d; border: 2px solid #1a1a1a; border-radius: 5px; text-align: center; }
.reno-opt.on { border-color: var(--green); }
.reno-opt.dim { opacity: .6; }
.reno-sw { width: 72px; height: 60px; image-rendering: pixelated; border: 2px solid #111; border-radius: 3px; }
.reno-name { font-size: .92em; line-height: 1.05; min-height: 2.1em; display: flex; align-items: center; }
.reno-cf { color: #6fe38c; font-size: .85em; }
.reno-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 8px; }
.reno-levels { display: flex; flex-direction: column; gap: 4px; }
.reno-lv { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: #2b2b2d; border: 2px solid #1a1a1a; border-radius: 5px; }
.reno-lv.on { border-color: var(--green); }
.reno-lv.dim { opacity: .6; }
.reno-lv img.px-icon { width: 28px; height: 28px; flex-shrink: 0; }
.reno-lv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.1; }
.reno-lv-text b { font-weight: normal; }
.reno-lv-text .hint { margin: 0; }

.pr-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 4px; }
.pr-row { display: grid; grid-template-columns: minmax(160px, 1fr) auto minmax(220px, 1.4fr); gap: 10px; align-items: center; padding: 6px 8px; background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; }
.pr-row.dim { opacity: .62; }
.pr-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pr-name img.px-icon { width: 28px; height: 28px; flex-shrink: 0; }
.pr-name b { font-weight: normal; font-size: 1.08em; display: block; }
.pr-name .hint { margin: 0; display: block; }
.pr-ctrl { display: flex; align-items: center; gap: 6px; }
.btn.pr-btn { min-width: 36px; font-size: 1.3em; padding: 0 8px; line-height: 1.2; }
.pr-val { min-width: 92px; text-align: center; font-size: 1.3em; color: #ffe08a; }
.pr-val small { font-size: .65em; color: var(--muted); margin-left: 2px; }
.pr-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.pr-meta { color: var(--muted); font-size: .88em; }
.pr-crowd { font-size: .92em; color: #dfe3e8; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; border: 1px solid; font-size: .9em; }
.chip.v-cheap { background: #123d20; border-color: var(--green); color: #9ff0b6; }
.chip.v-fair { background: #12303d; border-color: #4fc3f7; color: #b3e5fc; }
.chip.v-high { background: #3d2c12; border-color: #f5a623; color: #ffd28a; }
.chip.v-exp { background: #3d1512; border-color: var(--red); color: #ffb0a8; }
.row-locked .cell.locked { text-align: center; }
body.compact .pr-row { grid-template-columns: 1fr auto; }
body.compact .pr-info { grid-column: 1 / -1; }

.away-win .win { width: min(520px, 94vw); }
.away-head { display: flex; gap: 12px; align-items: center; }
.away-head .portrait { width: 64px; flex-shrink: 0; }
.away-head p { margin: 0 0 4px; }
.away-quote { font-style: italic; color: #d6dae0; }
.away-sum { display: flex; flex-direction: column; align-items: center; margin: 10px 0 6px; padding: 6px; background: #1e2128; border: 2px solid #4a4a4a; border-radius: 6px; }
.away-sum small { color: var(--muted); }
.away-sum b { font-size: 1.8em; color: #ffe08a; }
.away-btns { justify-content: center; flex-wrap: wrap; }

.sf-cards .card.staff { gap: 3px; }
button.card.staff { cursor: pointer; color: inherit; font: inherit; text-align: center; }
button.card.staff:hover { border-color: #8a8d93; }
.card.staff.has-ev { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow) inset; }
.card.staff h4 { margin: 2px 0 0; }
.card.staff h4 small { color: var(--muted); font-weight: normal; }
.portrait.ghost { opacity: .9; }
.portrait.big { width: 92px; }
.sf-line { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sf-line.left { justify-content: flex-start; }
.sf-line small { color: var(--muted); }
.sf-bar { display: inline-block; width: 44px; height: 6px; background: #1e2128; border: 1px solid #555; border-radius: 3px; overflow: hidden; vertical-align: middle; }
.sf-bar b { display: block; height: 100%; background: #6fb3ff; }
.sf-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.tag.sf-happy { background: #123d20; border-color: var(--green); color: #9ff0b6; }
.tag.sf-sad { background: #2a2f3d; border-color: #6b7a99; color: #b9c6e4; }
.sf-quote { font-style: italic; color: #d6dae0; font-size: .88em; }
.sf-job { color: #c9ccd1; font-size: .88em; margin: 0; min-height: 2.4em; }
.sf-trait { display: flex; flex-direction: column; gap: 1px; margin: 0; font-size: .88em; }
.sf-trait small { color: #c9ccd1; font-size: 1em; }
.card.staff.hired > small.muted { margin-top: -3px; }
.sf-skill { color: #9ff0b6; font-size: .88em; flex: 0 !important; }
.sf-ev { background: #3d3212; border: 1px solid #c9a227; color: #ffe08a; border-radius: 4px; padding: 3px 6px; font-size: .88em; }
.sf-trait b { color: #ffe08a; font-weight: normal; }
.card.cand .btn { width: 100%; margin-top: 2px; }
.sf-back { margin-bottom: 4px; }
.btn.ghost.red { color: #ff8a80; border-color: #6b2620; }
.sf-profile { display: flex; flex-direction: column; gap: 8px; }
.sf-evbox { background: #3d3212; border: 2px solid #c9a227; border-radius: 6px; padding: 6px 10px; }
.sf-evbox p { margin: 0 0 2px; color: #ffe08a; }
.sf-evbox small { display: block; color: #d9c48a; margin-bottom: 4px; }
.sf-evbox .row { flex-wrap: wrap; }
.sf-head { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; padding: 8px 12px; }
.sf-who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sf-who h3 { margin: 0; font-size: 1.25em; }
.sf-who .sf-tags { justify-content: flex-start; }
.sf-say { position: relative; margin-top: 4px; background: #f4f1e8; color: #23252a; border-radius: 8px; padding: 5px 10px; font-style: italic; font-size: .92em; max-width: 560px; }
.sf-say::before { content: ''; position: absolute; left: -7px; top: 10px; border: 7px solid transparent; border-left: 0; border-right-color: #f4f1e8; }
.sf-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.sf-tile { background: #2b2c2f; border: 2px solid #404146; border-radius: 6px; padding: 4px 10px 5px; min-width: 0; }
.sf-tile > small { display: block; color: var(--muted); font-size: .85em; margin-bottom: 2px; }
.sf-trait-name { color: #ffe08a; font-weight: normal; }
.sf-sub { color: #c9ccd1; font-size: .88em; }
.sf-fire { position: absolute; top: 6px; right: 6px; font-size: .8em; padding: 2px 8px; }
body.compact .portrait.big { width: 72px; }
@media (max-width: 600px) {
  .sf-tiles { grid-template-columns: repeat(2, 1fr); }
  .sf-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .sf-who .sf-line.left, .sf-who .sf-tags { justify-content: center; }
  .sf-say::before { display: none; }
  .sf-fire { position: static; order: 9; justify-self: center; }
}

.green { color: #6fe38c; }
.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.fix-win .win { width: min(460px, 96vw); }
.fix-err { display: flex; align-items: center; gap: 6px; color: #ff8a80; }
.err-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.fix h4 { color: #ffd23f; }
.fix-area { position: relative; height: 230px; background: #1b1c1f; border: 2px solid #555; border-radius: 6px; overflow: hidden; touch-action: none; }
.fix-btn { position: absolute; border: 2px solid #111; border-radius: 6px; cursor: pointer; font-size: 1.4em; box-shadow: inset -2px -3px 0 rgba(0,0,0,.35); }
.fix-btn.num { background: var(--blue); color: #fff; }
.fix-btn.num.done { background: var(--green-d); }
.fix-btn.virus { border-radius: 50%; background: radial-gradient(circle at 40% 35%, #c8ff7a, #4caf2a 60%, #1f5c12); }
.fix-btn.virus::before { content: ''; position: absolute; inset: 10px; border-radius: 50%; border: 3px dotted #1f5c12; }
.fix-btn.virus.pop { transform: scale(1.4); opacity: 0; transition: .15s; }
.fix-btn.wire { width: 84px; height: 36px; font-size: 1em; color: #111; }
.fix-btn.wire.l { left: 10px; } .fix-btn.wire.r { right: 10px; }
.fix-btn.wire.sel { outline: 3px solid #fff; }
.fix-btn.wire:disabled { opacity: .6; }
.wires { position: absolute; inset: 0; pointer-events: none; }
.center-col { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.fix-btn.hold, .fix-btn.react { position: static; width: 150px; height: 70px; font-size: 1.6em; }
.fix-btn.hold { background: var(--yellow); color: #2b1c00; }
.fix-btn.hold.active { background: #ffd56b; transform: translateY(2px); }
.hold-bar { width: 220px; height: 18px; border: 2px solid #555; border-radius: 9px; background: #111; overflow: hidden; }
.hold-fill { height: 100%; width: 0; background: var(--green); }
.fix-btn.react.wait { background: #555; color: #ddd; }
.fix-btn.react.go { background: var(--green); color: #0b2412; }
.fix-btn.react.early { background: var(--red); }
.react-count { font-size: 1.3em; }
.fix-win-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 1.4em; color: #6fe38c; }
.fix-win-msg .check { width: 70px; height: 70px; border-radius: 50%; background: var(--green); color: #0b2412; font-size: 2.2em; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }

.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; cursor: pointer; }
.pick img { width: 40px; height: 40px; }
.pick.wanted { border-color: var(--yellow); }
.pick small { color: #ffd23f; font-size: .8em; }
.pick-robot { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 8px 10px; background: #2c2d30; border: 2px dashed #5a5a5a; border-radius: 6px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pick-robot:hover { border-color: var(--yellow); }
.pick-robot img { width: 30px; height: 30px; flex: none; }
.pick-robot span { display: flex; flex-direction: column; gap: 2px; }
.pick-robot small { color: #b9b9b9; font-size: .8em; }

#start { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; background: #0a0f22; transition: opacity .35s; overflow: hidden; }
#start.hide { opacity: 0; pointer-events: none; }
#start-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; image-rendering: crisp-edges; filter: saturate(.8) brightness(.82); }
#start::after { content: ''; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(130% 95% at 50% 42%, rgba(6,9,20,0) 50%, rgba(6,9,20,.5) 100%),
  linear-gradient(180deg, rgba(6,9,20,.55) 0%, rgba(6,9,20,.2) 32%, rgba(6,9,20,.26) 58%, rgba(6,9,20,.8) 100%); }
.start-box { position: relative; z-index: 1; text-align: center; height: 100%; padding: max(3vh, 12px) 16px max(3vh, 12px); max-width: 94vw; display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.start-bottom { display: flex; flex-direction: column; align-items: center; }
.start-logos { display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
.start-logos img { display: block; height: auto; image-rendering: auto; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 18px rgba(0,0,0,.55)); }
.logo-main { width: min(460px, 82vw); max-height: 38vh; object-fit: contain; animation: stickerIn .6s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes stickerIn { from { transform: scale(.6) rotate(-6deg); opacity: 0; } }
@media (max-height: 520px) and (orientation: landscape) {
  .logo-main { max-height: 42vh; }
}
@media (prefers-reduced-motion: reduce) { .logo-main { animation: none; } }
.start-title { font-weight: normal; font-size: 3em; margin: 0 0 10px; color: #6fe38c; text-shadow: 3px 3px 0 #000; }
#start-btn { font-size: 1.8em; padding: 12px 44px; min-width: min(300px, 80vw); border-radius: 6px; margin-top: 4px;
  box-shadow: 0 0 0 2px #000, 0 6px 18px rgba(0,0,0,.6), inset -3px -4px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.15); animation: ctaGlow 2.6s ease-in-out infinite; }
#start-btn:hover { filter: brightness(1.08); }
#start-btn:active { transform: translateY(2px); }
@keyframes ctaGlow { 50% { box-shadow: 0 0 0 2px #000, 0 6px 18px rgba(0,0,0,.6), inset -3px -4px 0 rgba(0,0,0,.35), inset 3px 3px 0 rgba(255,255,255,.15), 0 0 24px 6px rgba(26,198,69,.55); } }
@media (prefers-reduced-motion: reduce) { #start-btn { animation: none; } }

.backdrop.pc-backdrop { padding: 8px; background: rgba(4,6,8,.62); }
.os-shell { width: min(1180px, 100%); height: min(760px, 100%); display: flex; animation: winIn .18s ease-out; }
.os-bezel { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 12px 0; background: linear-gradient(180deg, #2c2f36, #1b1d22); border: 2px solid #000; border-radius: 12px; box-shadow: inset 0 0 0 1px #3d4048, 0 18px 50px rgba(0,0,0,.7); }
.os-screen { position: relative; flex: 1; min-height: 0; overflow: hidden; border: 2px solid #000; border-radius: 4px; background: #0b2a22; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.os-screen img.px-icon { image-rendering: pixelated; }
.os-chin { position: relative; height: 40px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8a909c; }
.os-brand { letter-spacing: .3em; font-size: .9em; }
.os-led { width: 6px; height: 6px; border-radius: 50%; background: #1ac645; box-shadow: 0 0 6px #1ac645; }
.os-power { position: absolute; right: 6px; top: 4px; display: flex; align-items: center; justify-content: center; width: 64px; height: 32px; padding: 0; background: #6a2a24; border: 2px solid #111; border-radius: 6px; cursor: pointer; box-shadow: inset 0 -3px 0 rgba(0,0,0,.3); }
.os-power:hover { background: #8a342b; }
.os-power img { width: 20px; height: 20px; }
.os-wall { position: absolute; inset: 0; background: radial-gradient(ellipse at 68% 34%, rgba(26,198,69,.20), transparent 62%), linear-gradient(160deg, #10402f 0%, #0a2621 55%, #071a17 100%); }
.os-wall::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 16px 16px; }
.os-wall-logo { position: absolute; left: 60%; top: 44%; width: min(44%, 500px); transform: translate(-50%, -50%) rotate(-3deg); opacity: .92; filter: drop-shadow(0 10px 24px rgba(0,0,0,.5)); pointer-events: none; user-select: none; }
.os-wall-mark { position: absolute; right: 12px; bottom: 48px; color: rgba(255,255,255,.35); letter-spacing: .12em; font-size: .9em; }
.os-desk { position: absolute; left: 0; top: 0; bottom: 40px; padding: 8px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 84px); grid-auto-columns: 84px; gap: 2px 4px; align-content: start; }
.os-icon { width: 84px; height: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 2px; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; color: #fff; text-shadow: 1px 1px 0 #000, 0 0 3px #000; }
.os-icon:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); }
.os-icon.goal-glow { background: rgba(255,210,63,.16); border-color: #ffd23f; outline: 2px solid #ffd23f; outline-offset: 1px; animation: glow 1s infinite; }
.os-icon:active { background: rgba(26,198,69,.28); }
.os-icon-img { position: relative; display: block; }
.os-icon-img > img.px-icon { width: 42px; height: 42px; }
.os-icon-name { font-size: .9em; line-height: 1; text-align: center; }
.os-icon.locked .os-icon-img > img.px-icon { filter: grayscale(1) brightness(.6); }
.os-lock { position: absolute; right: -7px; bottom: -4px; }
.os-lock img { width: 14px; height: 14px; }
.os-badge { position: absolute; top: -6px; right: -12px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 13px; line-height: 16px; text-align: center; border: 1px solid #000; text-shadow: none; }
.os-icon.glow { background: rgba(255,210,63,.18); outline: 2px solid #ffd23f; animation: glow 1s infinite; }
.os-note { position: absolute; right: 14px; top: 14px; z-index: 800; width: 214px; padding: 12px 12px 8px; background: #fff3a6; color: #3a2e00; border-radius: 2px; box-shadow: 0 6px 16px rgba(0,0,0,.45); transform: rotate(1.5deg); font-size: .92em; }
.os-screen.has-max .os-note { top: auto; bottom: 50px; transform: rotate(-1deg); opacity: .96; }
.os-note-pin { position: absolute; top: -6px; left: 50%; width: 12px; height: 12px; border-radius: 50%; background: #e0453c; box-shadow: 0 2px 0 #7a1f1a; }
.os-note-head { font-size: .85em; color: #8a6d00; letter-spacing: .05em; text-transform: uppercase; }
.os-note b { display: block; font-weight: normal; font-size: 1.15em; margin: 2px 0; }
.os-note p { margin: 2px 0 4px; }
.os-note ul { list-style: none; margin: 0 0 4px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; }
.os-note li.done { color: #178a3c; }
.os-note-skip { background: none; border: none; padding: 0; color: #8a6d00; text-decoration: underline; cursor: pointer; font-size: .85em; }
.os-wins { position: absolute; left: 0; top: 0; right: 0; bottom: 40px; z-index: 10; pointer-events: none; }
.os-win { position: absolute; pointer-events: auto; display: flex; flex-direction: column; min-width: 260px; overflow: hidden; background: var(--panel); border: 2px solid #000; border-radius: 6px; box-shadow: inset 0 0 0 1px #4a4a4a, 0 12px 30px rgba(0,0,0,.55); animation: osWinIn .14s ease-out; }
.os-win.max { border-radius: 0; }
.os-win.min { display: none; }
.os-win.dragging { opacity: .93; }
@keyframes osWinIn { from { transform: scale(.95); opacity: 0; } }
.os-win-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 4px 0 6px; flex-shrink: 0; background: #1e1f22; border-bottom: 2px solid #000; cursor: move; user-select: none; touch-action: none; }
.os-win.active .os-win-bar { background: linear-gradient(180deg, #21402e, #183024); box-shadow: inset 0 -2px 0 var(--green-d); }
.os-win.max .os-win-bar { cursor: default; }
.os-win-bar > img { width: 28px; height: 28px; }
.os-win-title { flex: 1; font-size: 1.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-win:not(.active) .os-win-title { color: #9aa0ac; }
.os-win-btns { display: flex; gap: 3px; }
.os-wbtn { display: flex; align-items: center; justify-content: center; width: 28px; height: 24px; padding: 0; background: #3a3a3a; border: 2px solid #111; border-radius: 4px; color: #e6e6e6; font-size: 14px; line-height: 1; cursor: pointer; }
.os-wbtn:hover { background: #4f5562; }
.os-wbtn.close:hover { background: var(--red); }
.os-win-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px 14px; }
.os-taskbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 900; height: 40px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: rgba(10,14,13,.95); border-top: 2px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.os-start { display: flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 4px; flex-shrink: 0; background: linear-gradient(180deg, #22b24f, #128a30); border: 2px solid #0a4d1b; border-radius: 6px; color: #fff; font-size: 1.05em; text-shadow: 1px 1px 0 #0a4d1b; cursor: pointer; }
.os-start img { width: 28px; height: 28px; }
.os-back { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 8px; flex-shrink: 0; background: linear-gradient(180deg, #d0573f, #a63a2a); border: 2px solid #5a1c14; border-radius: 6px; color: #fff; font-size: 1.05em; text-shadow: 1px 1px 0 #5a1c14; cursor: pointer; white-space: nowrap; }
.os-back img { width: 20px; height: 20px; }
.os-back:hover { filter: brightness(1.12); }
.os-start.on, .os-start:hover { filter: brightness(1.12); }
.os-task-apps { flex: 1; display: flex; gap: 3px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.os-task-apps::-webkit-scrollbar { display: none; }
.os-task { display: flex; align-items: center; gap: 4px; flex-shrink: 0; height: 32px; max-width: 160px; padding: 0 8px 0 2px; background: #24272c; border: 2px solid #111; border-radius: 4px; color: #d0d3d9; cursor: pointer; }
.os-task img { width: 28px; height: 28px; }
.os-task span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-task.on { background: #2f4a38; border-color: var(--green-d); color: #fff; box-shadow: inset 0 -3px 0 var(--green); }
.os-task.min { opacity: .7; }
.os-tray { display: flex; align-items: center; gap: 8px; padding-left: 6px; flex-shrink: 0; }
.os-tray-btn { position: relative; display: flex; padding: 0; background: none; border: none; cursor: pointer; }
.os-tray-btn img { width: 28px; height: 28px; }
.os-dot { position: absolute; top: -3px; right: -6px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--red); color: #fff; font-size: 12px; line-height: 14px; text-align: center; border: 1px solid #000; }
.os-money { color: #ffe08a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.os-clock { padding: 1px 6px; color: #d0d3d9; background: #1b1d22; border: 1px solid #333; border-radius: 4px; font-variant-numeric: tabular-nums; }
.os-menu { position: absolute; left: 6px; bottom: 44px; z-index: 950; width: 330px; max-height: calc(100% - 56px); display: flex; flex-direction: column; overflow: hidden; background: #1c1f24; border: 2px solid #000; border-radius: 8px; box-shadow: inset 0 0 0 1px #3a3d44, 0 14px 30px rgba(0,0,0,.6); animation: osWinIn .12s ease-out; }
.os-menu-head { display: flex; align-items: center; gap: 8px; padding: 10px; background: linear-gradient(180deg, #21402e, #172b20); border-bottom: 2px solid #000; }
.os-menu-head img { width: 42px; height: 42px; }
.os-menu-head b { display: block; font-weight: normal; font-size: 1.15em; }
.os-menu-apps { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 6px; overflow-y: auto; }
.os-menu-app { display: flex; align-items: center; gap: 6px; padding: 4px 6px; background: none; border: 1px solid transparent; border-radius: 4px; color: #e6e6e6; text-align: left; cursor: pointer; }
.os-menu-app img { width: 28px; height: 28px; }
.os-menu-app:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.os-menu-app.locked { opacity: .5; }
.os-menu-foot { display: flex; justify-content: flex-end; padding: 6px; background: #16181c; border-top: 1px solid #000; }
.os-menu-power { display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; background: #2b2f38; border: 2px solid #111; border-radius: 4px; color: #ffd0cc; cursor: pointer; }
.os-menu-power img { width: 28px; height: 28px; }
.os-toasts { position: absolute; right: 10px; bottom: 50px; z-index: 960; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; max-width: min(360px, 80%); pointer-events: none; }
.os-toast { padding: 6px 12px; background: #1c1f24; border: 2px solid #4a4a4a; border-left-width: 6px; border-radius: 6px; box-shadow: 0 6px 16px rgba(0,0,0,.5); animation: toastIn .2s; }
.os-toast.good { border-color: var(--green); color: #c3f5cf; }
.os-toast.bad { border-color: var(--red); color: #ffd0cc; }
.os-toast.out { opacity: 0; transform: translateX(10px); transition: .3s; }

.mp-place { display: flex; gap: 12px; align-items: center; padding: 2px 0 10px; border-bottom: 1px solid #3a3a3a; }
.mp-cover { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 76px; height: 76px; background: linear-gradient(160deg, #2e6b4f, #1b3a2c); border: 2px solid #000; border-radius: 8px; }
.mp-cover img { width: 56px; height: 56px; }
.mp-info { min-width: 0; flex: 0 1 auto; }
.mp-place .mp-hist { flex: 1 1 160px; max-width: 260px; margin-left: auto; }
.mp-info h2 { margin: 0; font-weight: normal; font-size: 1.6em; line-height: 1; text-shadow: 1px 1px 0 #000; overflow-wrap: anywhere; }
.mp-rate-line { display: flex; align-items: center; gap: 6px; font-size: 1.1em; }
.mp-rate-line b { font-weight: normal; color: #ffd23f; }
.muted { color: var(--muted); }
.mp-open.on { color: #6fe38c; } .mp-open.off { color: #ff8a80; }
.stars5 { white-space: nowrap; letter-spacing: 1px; }
.stars5 i { font-style: normal; color: #4f5562; }
.stars5 i.on { color: #ffd23f; }
.mp-hist { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mp-hrow { display: grid; grid-template-columns: 14px 1fr 40px; gap: 6px; align-items: center; font-size: .9em; }
.mp-hbar { height: 10px; overflow: hidden; background: #1b1c1f; border: 1px solid #000; border-radius: 5px; }
.mp-hbar i { display: block; height: 100%; background: #ffd23f; }
.mp-hn { color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.chip { padding: 2px 10px; background: #333436; border: 1px solid #555; border-radius: 12px; color: #e6e6e6; font-size: .92em; cursor: pointer; }
.chip:hover { background: #3d3f42; }
.chip.on { background: #2f4a38; border-color: var(--green); color: #c3f5cf; }
.mp-sort { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; margin: 4px 0 8px; overflow: hidden; border: 2px solid #111; border-radius: 6px; }
.seg { padding: 3px 10px; background: #2b2b2b; border: none; border-right: 1px solid #111; color: #c9ccd1; cursor: pointer; }
.seg:last-child { border-right: none; }
.seg.on { background: var(--green-d); color: #fff; }
.mp-list { display: flex; flex-direction: column; gap: 8px; }
.rv { display: flex; gap: 10px; padding: 8px; background: #303134; border: 1px solid #3d3e41; border-radius: 8px; }
.rv.bad { border-left: 3px solid #e0453c; }
.rv.flash { animation: rvFlash 1.8s; }
@keyframes rvFlash { 0%, 50% { box-shadow: 0 0 0 3px #ffd23f; } }
.rv-ava { width: 44px; height: 44px; flex-shrink: 0; image-rendering: pixelated; border-radius: 50%; border: 2px solid #111; }
.rv-main { flex: 1; min-width: 0; }
.rv-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rv-name b { font-weight: normal; font-size: 1.08em; }
.rv-type { padding: 0 5px; border-radius: 3px; background: #3a3a3a; color: #ddd; font-size: .78em; }
.rv-type.t-YouTuber { background: #5a1f1f; color: #ffb3b3; }
.rv-type.t-VIP { background: #4a3a10; color: #ffe08a; }
.rv-type.t-Regular { background: #1f3a4a; color: #b3e0ff; }
.rv-new { padding: 0 5px; border-radius: 3px; background: var(--red); color: #fff; font-size: .75em; }
.rv-stars { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 1px 0 3px; }
.rv-stars .rv-reply-btn { margin-left: auto; }
.rv-time { color: var(--muted); font-size: .88em; }
.rv-edited { color: #9fd3ff; font-size: .85em; }
.rv-pop { padding: 0 5px; border-radius: 3px; font-size: .8em; }
.rv-pop.up { background: #123d20; color: #9ff0b6; }
.rv-pop.down { background: #4a1a1a; color: #ff8a80; }
.rv-text { margin: 2px 0 4px; line-height: 1.2; overflow-wrap: anywhere; }
.rv-update { margin: 2px 0 4px; padding: 4px 8px; border-left: 3px solid #4fc3f7; background: rgba(79,195,247,.08); color: #d6eefc; }
.rv-owner { margin-top: 6px; padding: 6px 8px; background: #26272a; border-left: 3px solid var(--green); border-radius: 4px; }
.rv-owner.tone-rude { border-left-color: var(--red); }
.rv-owner-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .92em; }
.rv-owner-head b { font-weight: normal; color: #9ff0b6; }
.rv-owner p { margin: 2px 0 0; overflow-wrap: anywhere; }
.linkish { padding: 0; background: none; border: none; color: #7fb2e5; text-decoration: underline; font-size: .92em; cursor: pointer; }
.mp-compose { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; padding: 8px; background: #26272a; border: 1px solid #4a4a4a; border-radius: 6px; }
.mp-sugg { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.mp-sugg small { color: var(--muted); }
.mp-ta { width: 100%; min-height: 64px; resize: vertical; padding: 6px 8px; background: #1b1c1f; color: #fff; border: 2px solid #555; border-radius: 4px; font-family: var(--font); font-size: 1em; }
.mp-ta:focus { outline: none; border-color: var(--green); }
.mp-compose-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mp-tone { flex: 1; min-width: 0; color: var(--muted); font-size: .9em; }
.mp-tone.great { color: #6fe38c; } .mp-tone.ok { color: #c3f5cf; } .mp-tone.flat { color: #ffd23f; }
.rv-owner.removed { border-left-color: #6a7180; background: #232427; }
.rv-owner .rv-removed { color: #8f96a3; font-style: italic; }
.mp-count { color: var(--muted); font-size: .85em; }
.mp-more { display: flex; margin: 8px auto 0; }

.lg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; margin-bottom: 8px; }
.lg-card { display: flex; flex-direction: column; padding: 6px 8px; background: #333436; border: 2px solid #4a4a4a; border-radius: 6px; }
.lg-card small { color: var(--muted); font-size: .85em; }
.lg-card b { font-weight: normal; font-size: 1.35em; font-variant-numeric: tabular-nums; }
.lg-card b.money { color: #ffe08a; }
.lg-chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 140px; padding: 6px; background: #1b1c1f; border: 2px solid #3a3a3a; border-radius: 6px; }
.lg-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; height: 100%; min-width: 0; }
.lg-bar { width: 100%; max-width: 26px; min-height: 1px; background: linear-gradient(180deg, #6fe38c, #1ac645); border: 1px solid #0a4d1b; border-radius: 2px 2px 0 0; }
.lg-val { max-width: 100%; overflow: hidden; white-space: nowrap; color: #c9ccd1; font-size: .7em; }
.lg-h { color: var(--muted); font-size: .75em; }
.lg-table { width: 100%; border-collapse: collapse; font-size: .95em; }
.lg-table td { padding: 3px 6px; border-bottom: 1px solid #3a3a3a; }
.lg-time { width: 3.5em; color: var(--muted); }
.lg-who { color: var(--muted); text-align: center; }
.lg-amt { text-align: right; color: #6fe38c; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-table tr.neg .lg-amt { color: #ff8a80; }
.lg-tip { color: #ffd23f; }

body.compact { font-size: 17px; }
body.compact #hud { height: 36px; padding: 0 6px; gap: 6px; }
body.compact .hud-name { font-size: 1.05em; }
body.compact .hud-rating { font-size: .82em; }
body.compact .pop-title { font-size: .85em; }
body.compact .hud-money { font-size: 1.05em; }
body.compact .hud-sub { font-size: .82em; }
body.compact .pop-bar { height: 12px; }
body.compact #toolbar { height: 52px; }
body.compact .tool { min-width: 50px; padding: 2px 3px; }
body.compact .tool img { width: 28px; height: 28px; }
body.compact .tool-label { font-size: .68em; }
body.compact.side #toolbar { height: var(--stage-h); }
body.compact.side .tool-label { display: none; }
body.compact.side .tool { padding: 3px 2px; }
body.compact .win.wide { height: 96vh; }
body.compact .backdrop.pc-backdrop { padding: 2px; }
body.compact .os-bezel { padding: 4px 4px 0; border-radius: 6px; }
body.compact .os-chin { height: 34px; }
body.compact .os-power { top: 3px; width: 56px; height: 28px; }
body.compact .os-back { height: 28px; }
body.compact .os-taskbar { height: 34px; }
body.compact .os-start, body.compact .os-task { height: 28px; }
body.compact .os-start span, body.compact .os-task span, body.compact .os-wall-mark { display: none; }
body.compact .os-desk { bottom: 34px; padding: 4px; grid-template-rows: repeat(auto-fill, 62px); grid-auto-columns: 68px; }
body.compact .os-icon { width: 68px; height: 62px; padding-top: 3px; }
body.compact .os-icon-img > img.px-icon { width: 28px; height: 28px; }
body.compact .os-icon-name { font-size: .8em; }
body.compact .os-wins { bottom: 34px; }
body.compact .os-win-bar { height: 30px; }
body.compact .os-win-body { padding: 8px; }
body.compact .os-note { width: 190px; font-size: .8em; padding: 9px 9px 6px; }
body.compact .os-screen.has-max .os-note { bottom: 40px; }
body.compact .os-menu { bottom: 38px; }
body.compact .os-toasts { bottom: 42px; }
body.compact .win-body { padding: 8px; }
body.compact #tutorial { left: 4px; top: 4px; font-size: .85em; }
body.compact #social { top: 10%; width: 74%; }
body.compact .fix-area { height: 180px; }
@media (max-width: 460px) {
  .hud-rating { display: none; }
  #hud { grid-template-columns: 1fr 1fr 1fr auto; }
}


.start-loading { width: min(260px, 60vw); height: 10px; border: 2px solid #000; background: #1b1e26; box-shadow: 0 0 0 2px #3a3f4b; overflow: hidden; }
.start-loading i { display: block; height: 100%; width: 40%; background: var(--green); animation: loadSlide 1.1s ease-in-out infinite; }
@keyframes loadSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.start-panel { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 14px 12px; background: rgba(10,13,24,.9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 2px solid #000; box-shadow: 0 0 0 2px #3a3f4b, 0 10px 30px rgba(0,0,0,.55); border-radius: 6px; max-width: min(440px, 92vw); }
.lang-pick { position: relative; display: inline-flex; align-items: center; gap: 4px; padding: 1px 4px 1px 6px; background: #2b2f38; border: 2px solid #111; border-radius: 12px; cursor: pointer; max-width: 100%; }
.lang-pick:focus-within { border-color: #ffd23f; }
.lang-pick .lang-ico { width: 24px; height: 24px; flex: none; image-rendering: pixelated; }
.lang-select { appearance: none; -webkit-appearance: none; font-family: var(--font); font-size: 1em; color: #fff; background: transparent; border: none; padding: 0 18px 0 2px; cursor: pointer; min-width: 0; max-width: 100%; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, #ffd23f 50%), linear-gradient(135deg, #ffd23f 50%, transparent 50%);
  background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
.lang-select:focus { outline: none; }
.lang-select option { background: #1e2128; color: #fff; }
.lang-select:disabled { opacity: .6; cursor: wait; }
.start-label { color: #e8edf7; text-shadow: 1px 1px 0 #000; margin-top: 2px; }
.start-name-row { display: flex; gap: 4px; width: 100%; }
.start-name { flex: 1; min-width: 0; font-size: 1.15em; padding: 4px 8px; background: #f4f1e8; color: #1b1622; border: 2px solid #000; border-radius: 4px; text-align: center; }
.start-name:focus { outline: 3px solid #ffd23f; outline-offset: 1px; }
.start-dice { width: 38px; font-size: 1.1em; background: #3a3f4b; border: 2px solid #000; border-radius: 4px; cursor: pointer; }
.start-err { color: #ff9a8a; min-height: 1em; font-size: .85em; text-shadow: 1px 1px 0 #000; }
.start-err:empty { display: none; }
.start-panel .start-shop { margin: 0; font-size: 1.35em; color: #ffe45c; text-shadow: 2px 2px 0 #000; overflow-wrap: anywhere; text-align: center; }
@media (max-height: 420px) {
  .start-panel { padding: 6px 10px 8px; gap: 4px; }
  .logo-main { max-height: 30vh; }
  #start-btn { font-size: 1.45em; padding: 8px 30px; }
}

.hud-btns { display: flex; gap: 4px; }
.acct-name { color: #6fe38c; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#modals.over-start { z-index: 150; }
.pirate-url { text-align: center; font-size: 1.2em; color: #ffd23f; user-select: text; -webkit-user-select: text; word-break: break-all; }
.hud-fs { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; font-size: 0; background: var(--panel-3); border: 2px solid #111; border-radius: 4px; cursor: pointer; box-shadow: inset -2px -3px 0 rgba(0,0,0,.35), inset 2px 2px 0 rgba(255,255,255,.12); }
.hud-fs:hover { background: #3d3f42; }
.hud-fs::before { content: ''; display: block; width: 18px; height: 18px; background: center / 100% 100% no-repeat; image-rendering: pixelated; }
.ico-fs-on::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23e6e6e6' d='M0 0h3v1H0zM0 1h1v2H0zM6 0h3v1H6zM8 1h1v2H8zM0 6h1v2H0zM0 8h3v1H0zM8 6h1v2H8zM6 8h3v1H6z'/%3E%3C/svg%3E"); }
.ico-fs-off::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 9' shape-rendering='crispEdges'%3E%3Cpath fill='%23e6e6e6' d='M2 0h1v3H0V2h2zM6 0h1v2h2v1H6zM0 6h3v3H2V7H0zM6 6h3v1H7v2H6z'/%3E%3C/svg%3E"); }
body.compact .hud-fs { width: 30px; height: 28px; }
body.compact .hud-fs::before { width: 14px; height: 14px; }
.hud-pause { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; padding: 0; background: var(--panel-3); border: 2px solid #111; border-radius: 4px; cursor: pointer; box-shadow: inset -2px -3px 0 rgba(0,0,0,.35), inset 2px 2px 0 rgba(255,255,255,.12); }
.hud-pause:hover { background: #3d3f42; }
.hud-pause img { width: 24px; height: 24px; }
body.compact .hud-pause { width: 30px; height: 28px; }
body.compact .hud-pause img { width: 18px; height: 18px; }
.hud-ads { display: inline-flex; align-items: center; gap: 1px; padding: 0 4px; background: #3d3212; border: 1px solid #c9a227; border-radius: 8px; color: #ffe08a; cursor: pointer; font-size: .95em; line-height: 1.1; }
.hud-ads img { width: 13px; height: 13px; }
.hud-ads span { margin-left: 2px; }
body.paused #stage { filter: saturate(.7) brightness(.85); }

.backdrop.pause-win .win { width: min(440px, 94vw); }
.pause { display: flex; flex-direction: column; gap: 6px; }
.pause-resume { align-self: stretch; }
.pause-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 3px 0; border-bottom: 1px solid #3a3a3a; flex-wrap: wrap; }
.pause-sub { color: var(--muted); font-size: .8em; margin: -2px 0 2px; text-align: right; }
.segs { display: inline-flex; flex-wrap: wrap; overflow: hidden; border: 2px solid #111; border-radius: 6px; }

.win-body, .os-win-body { overscroll-behavior: contain; }

.demo-ad { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.86); }
.demo-ad-box { width: min(360px, 86vw); padding: 14px; background: #1e1f22; border: 2px solid #4a4a4a; border-radius: 6px; text-align: center; color: #e6e6e6; }
.demo-ad-box p { color: var(--muted); font-size: .9em; }
.demo-ad-bar { height: 10px; border: 2px solid #000; background: #2b2b2b; }
.demo-ad-bar i { display: block; height: 100%; width: 0; background: #7b6cf0; }

.btn.reward { background: #5b4bc8; color: #fff; border-color: #241a5c; }
.btn.reward img { width: 22px; height: 22px; }

.mk-cap { display: inline-block; margin-top: 2px; padding: 2px 8px; border: 1px solid #555; border-radius: 4px; background: #2b2b2b; font-size: .9em; }
.mk-cap.full { border-color: #f5a623; color: #ffd28a; }
.mk-block-note { margin-top: 6px; padding: 6px 10px; background: #4a1414; border: 2px solid #ff5a4a; border-radius: 6px; color: #ffd6d0; box-shadow: 0 0 0 1px #000 inset; }
.btn.goal-pick { outline: 3px solid #ffd23f; outline-offset: 2px; animation: glow 1s infinite; }
.mk-sec { margin: 10px 0 4px; color: #64ff96; }
.mk-run { display: flex; flex-direction: column; gap: 4px; }
.mk-run-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; background: #333436; border: 2px solid #c9a227; border-radius: 6px; }
.mk-run-row img { width: 24px; height: 24px; }
.mk-run-main { min-width: 0; }
.mk-bar { height: 6px; margin-top: 3px; background: #1b1b1b; border: 1px solid #000; }
.mk-bar i { display: block; height: 100%; background: #ffd23f; }
.mk-run-stat { color: #ffe08a; font-size: .9em; white-space: nowrap; }
.mk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.mk-card { align-items: stretch; }
.mk-card.on { border-color: #c9a227; }
.mk-card-head { display: flex; align-items: center; gap: 6px; }
.mk-card-head h4 { margin: 0; }
.mk-desc { margin: 0; color: #c9ccd1; font-size: .88em; }
.mk-stats { color: #9ff0b6; font-size: .9em; }
.mk-pow { font-size: .85em; color: #c9ccd1; }
.mk-pow.low { color: #ffd28a; }
.mk-lock { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .88em; }
.mk-lock img { width: 14px; height: 14px; }
.mk-card .btn { width: 100%; }
.mk-card .mk-video { font-size: .9em; padding: 3px 8px; }
.tag.mk-free { margin-left: 4px; padding: 0 4px; }
.mk-log { width: 100%; border-collapse: collapse; font-size: .92em; }
.mk-log th, .mk-log td { padding: 2px 6px; border-bottom: 1px solid #3a3a3a; text-align: right; }
.mk-log th:first-child, .mk-log td:first-child { text-align: left; }
.mk-log .good { color: #9ff0b6; } .mk-log .bad { color: #ffb0a8; }
.hint.small { font-size: .8em; }
