:root {
  --blue: #2448d8;
  --blue-2: #2d6cf3;
  --cyan: #66b5ff;
  --ink: #1435b4;
  --paper: #f8f3e5;
  --paper-2: #fffdf5;
  --line: rgba(36, 72, 216, 0.28);
  --shadow: 7px 7px 0 rgba(22, 54, 177, 0.24);
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --font-ui: "Trebuchet MS", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  user-select: none;
}
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }

.boot-screen {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center;
  align-content: center; gap: 18px;
  background: var(--blue);
  color: white;
  transition: opacity .55s ease, visibility .55s ease;
}
.boot-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-ring {
  width: 118px; height: 118px; border-radius: 50%;
  border: 14px solid #fff;
  box-shadow: inset 0 0 0 7px var(--cyan), 0 0 0 6px rgba(255,255,255,.2);
  animation: bootSpin 1.6s cubic-bezier(.7,.05,.2,1) infinite;
}
.boot-title { font: 700 24px var(--font-hand); letter-spacing: 2px; }
.boot-status { font: 700 12px var(--font-ui); opacity: .85; letter-spacing: 1.5px; }
.boot-bar { width: min(320px, 75vw); height: 9px; border: 2px solid white; padding: 1px; }
.boot-bar span { display: block; height: 100%; background: white; animation: bootLoad 1.8s ease forwards; transform-origin: left; }
@keyframes bootLoad { from { transform: scaleX(.05); } to { transform: scaleX(1); } }
@keyframes bootSpin { 0% { transform: rotate(0deg) scale(.96); } 50% { transform: rotate(190deg) scale(1.04); } 100% { transform: rotate(360deg) scale(.96); } }

.cursor-ring {
  position: fixed; width: 34px; height: 34px; border: 2px solid var(--blue);
  border-radius: 50%; pointer-events: none; z-index: 100000; transform: translate(-50%, -50%);
  mix-blend-mode: multiply; opacity: .8; transition: width .16s ease, height .16s ease, opacity .16s ease;
}
.cursor-ring.is-clicking { width: 56px; height: 56px; opacity: .35; }

.doodle-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }
.doodle-canvas.is-active { pointer-events: auto; cursor: crosshair; }

.desktop {
  min-height: 100vh;
  position: relative;
  padding: 60px 18px 78px 128px;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px;
  overflow: hidden;
}
.desktop::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .24;
  background: radial-gradient(circle at 12% 22%, rgba(45,108,243,.16), transparent 22%), radial-gradient(circle at 80% 72%, rgba(102,181,255,.2), transparent 24%);
}
.wallpaper-doodles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.wall-ring { position: absolute; border-radius: 50%; border: 10px solid rgba(36,72,216,.08); }
.ring-a { width: 300px; height: 300px; right: 7vw; top: 10vh; transform: rotate(8deg); }
.ring-b { width: 160px; height: 160px; left: 38%; bottom: 12%; border-width: 7px; }
.ring-c { width: 76px; height: 76px; left: 24%; top: 15%; border-width: 5px; }
.wall-scribble { position: absolute; font: 900 74px var(--font-hand); color: rgba(36,72,216,.045); transform: rotate(-12deg); }
.scribble-a { top: 35%; left: 47%; }
.scribble-b { bottom: 10%; right: 4%; font-size: 190px; }
.scribble-c { top: 7%; left: 28%; font-size: 92px; }

.top-strip {
  position: fixed; z-index: 8500; left: 0; right: 0; top: 0; height: 42px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 14px; background: var(--blue); color: white; border-bottom: 2px solid white;
  box-shadow: 0 2px 0 var(--blue);
}
.top-strip__brand, .top-strip__ticker { font: 700 13px var(--font-hand); letter-spacing: 1.1px; display: flex; align-items: center; gap: 8px; }
.top-strip__ticker { font-size: 18px; }
.top-strip__buttons { display: flex; gap: 7px; }
.tiny-btn { background: transparent; color: white; border: 1px solid rgba(255,255,255,.75); padding: 4px 7px; font: 700 9px var(--font-ui); cursor: pointer; }
.tiny-btn:hover { background: white; color: var(--blue); }
.mini-ring { width: 16px; height: 16px; display: inline-block; border-radius: 50%; border: 3px solid currentColor; }

.desktop-icons {
  position: fixed; z-index: 100; left: 10px; top: 58px; bottom: 62px;
  width: 96px; display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.desktop-icon {
  width: 90px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; gap: 4px;
  font: 700 11px var(--font-ui); color: var(--ink); text-shadow: 1px 1px 0 white;
}
.desktop-icon > span:first-child {
  width: 48px; height: 48px; display: grid; place-items: center; background: var(--paper-2); border: 2px solid var(--blue); box-shadow: 4px 4px 0 rgba(36,72,216,.18); font: 900 26px var(--font-hand); transition: transform .14s ease, box-shadow .14s ease;
}
.desktop-icon:hover > span:first-child { transform: translate(-2px,-3px) rotate(-3deg); box-shadow: 7px 7px 0 rgba(36,72,216,.18); }
.desktop-icon:focus-visible { outline: 2px dashed var(--blue); outline-offset: 4px; }

.window {
  position: absolute; z-index: 1000; width: min(760px, calc(100vw - 160px)); min-width: 330px;
  background: var(--paper-2); border: 2px solid var(--blue); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px) scale(.985);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.window.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
.window.is-minimized { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(40px) scale(.92); }
.window.is-focused { box-shadow: 10px 10px 0 rgba(22,54,177,.28), 0 0 0 1px rgba(36,72,216,.12); }
.window-titlebar {
  height: 34px; background: var(--blue); color: white; display: flex; align-items: center; justify-content: space-between; padding-left: 10px; cursor: grab; touch-action: none;
}
.window-titlebar:active { cursor: grabbing; }
.window-title { font: 800 11px var(--font-ui); letter-spacing: .7px; display: flex; gap: 7px; align-items: center; }
.title-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid white; }
.window-controls { height: 100%; display: flex; }
.window-control { width: 34px; height: 100%; background: transparent; color: white; border: 0; border-left: 1px solid rgba(255,255,255,.45); cursor: pointer; font: 700 16px Arial; }
.window-control:hover { background: white; color: var(--blue); }
.window-body { position: relative; overflow: hidden; }

.hero-window { left: 13%; top: 10%; width: min(1060px, calc(100vw - 180px)); }
.hero-body { min-height: 600px; display: grid; grid-template-columns: 1.12fr .88fr; }
.hero-copy { padding: 52px 44px 42px; position: relative; z-index: 2; }
.eyebrow { display: inline-block; border-bottom: 3px solid var(--blue); font: 800 11px var(--font-ui); letter-spacing: 1.7px; padding-bottom: 4px; transform: rotate(-1deg); }
h1 { margin: 22px 0 12px; font: 900 clamp(58px, 8vw, 108px)/.82 var(--font-hand); letter-spacing: -7px; color: var(--blue); }
h1 span { display: block; }
h1 em { font-style: normal; font-size: .4em; letter-spacing: -1px; background: var(--blue); color: white; padding: 5px 12px 4px; display: inline-block; transform: rotate(-2deg); }
.hero-sub { max-width: 620px; font: 700 18px/1.45 var(--font-hand); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.marker-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 9px 15px;
  background: var(--paper-2); border: 2px solid var(--blue); color: var(--blue); text-decoration: none; cursor: pointer;
  font: 900 11px var(--font-ui); letter-spacing: .6px; box-shadow: 4px 4px 0 var(--blue); transition: transform .14s ease, box-shadow .14s ease, background .14s ease, color .14s ease;
}
.marker-btn:hover { transform: translate(2px,2px) rotate(-1deg); box-shadow: 2px 2px 0 var(--blue); background: var(--blue); color: white; }
.marker-btn.ghost { border-style: dashed; box-shadow: none; }
.marker-btn.compact { min-height: 30px; padding: 5px 9px; font-size: 9px; box-shadow: 2px 2px 0 var(--blue); }
.ca-card { margin-top: 30px; max-width: 630px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; border: 2px dashed var(--blue); background: rgba(255,255,255,.55); transform: rotate(.35deg); }
.ca-label { padding: 12px 14px; background: var(--blue); color: white; font: 900 13px var(--font-hand); }
.ca-card code { padding: 10px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; font: 700 11px monospace; }
.ca-card button { height: 100%; border: 0; border-left: 2px dashed var(--blue); background: transparent; padding: 0 12px; cursor: pointer; font: 900 10px var(--font-ui); }
.ca-card button:hover { background: var(--blue); color: white; }
.social-row { margin-top: 19px; display: flex; gap: 18px; flex-wrap: wrap; }
.scribble-link { font: 800 12px var(--font-hand); text-decoration-thickness: 2px; text-underline-offset: 4px; }

.hero-art-wrap { position: relative; min-height: 600px; background: var(--blue); display: grid; place-items: center; overflow: hidden; border-left: 2px solid var(--blue); }
.hero-art-wrap::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.33) 1px, transparent 1px); background-size: 22px 22px; }
.hero-art-frame { position: relative; width: min(360px, 78%); aspect-ratio: 1; display: grid; place-items: center; background: var(--paper-2); border: 3px solid white; box-shadow: 12px 12px 0 rgba(0,0,0,.12); transform: rotate(2deg); }
.hero-art { max-width: 82%; max-height: 82%; object-fit: contain; position: relative; z-index: 2; filter: drop-shadow(5px 6px 0 rgba(36,72,216,.15)); }
.orbit { position: absolute; border: 2px dashed var(--blue); border-radius: 50%; animation: orbit 13s linear infinite; }
.orbit-1 { inset: 8%; }
.orbit-2 { inset: 22%; animation-direction: reverse; animation-duration: 9s; border-style: dotted; }
.orbit-label { position: absolute; bottom: 10px; right: 10px; z-index: 4; background: var(--blue); color: white; padding: 6px 8px; font: 900 9px var(--font-hand); transform: rotate(-3deg); }
@keyframes orbit { to { transform: rotate(360deg); } }
.sticky-note { position: absolute; z-index: 5; background: #fff6ad; color: #1736a8; padding: 12px 13px; width: 145px; min-height: 80px; font: 800 11px/1.35 var(--font-hand); box-shadow: 6px 6px 0 rgba(0,0,0,.12); }
.note-one { left: 20px; bottom: 25px; transform: rotate(-7deg); }
.note-two { right: 18px; top: 20px; transform: rotate(8deg); }

.story-window { left: 20%; top: 17%; width: min(810px, calc(100vw - 180px)); }
.story-body { background: #f7f3e8; min-height: 520px; }
.story-file-header { height: 30px; border-bottom: 1px solid var(--blue); display: flex; gap: 18px; align-items: center; padding: 0 12px; font: 700 10px var(--font-ui); }
.story-sheet { min-height: 490px; display: grid; grid-template-columns: 48px 1fr; background-image: linear-gradient(rgba(36,72,216,.11) 1px, transparent 1px); background-size: 100% 30px; }
.story-margin { border-right: 2px solid rgba(36,72,216,.2); color: rgba(36,72,216,.46); text-align: right; padding: 14px 10px 0 0; font: 10px/30px monospace; }
.story-copy { padding: 34px 42px 40px; user-select: text; }
.story-copy h2 { font: 900 28px/1.1 var(--font-hand); margin: 0 0 18px; max-width: 640px; }
.story-copy p { font: 700 15px/1.72 var(--font-hand); max-width: 650px; }
.story-manifesto { display: inline-block; background: var(--blue); color: white; padding: 8px 10px; transform: rotate(-1deg); }

.market-window { left: 24%; top: 13%; width: min(960px, calc(100vw - 180px)); }
.market-body { background: #f9f7ef; }
.market-toolbar { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 2px solid var(--blue); font: 900 10px var(--font-ui); }
.market-toolbar .marker-btn { margin-left: auto; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: #31ce66; box-shadow: 0 0 0 4px rgba(49,206,102,.15); animation: livePulse 1.2s ease infinite; }
@keyframes livePulse { 50% { transform: scale(.75); opacity: .65; } }
.chart-shell { height: min(610px, 65vh); min-height: 430px; position: relative; background: #fff; }
#dexFrame { width: 100%; height: 100%; border: 0; display: none; }
.chart-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; font: 800 12px var(--font-ui); text-align: center; }
.chart-placeholder code { user-select: text; }
.placeholder-chart-lines { width: min(620px, 82%); height: 230px; border-left: 2px solid var(--blue); border-bottom: 2px solid var(--blue); display: flex; align-items: end; gap: 8px; padding: 8px; overflow: hidden; position: relative; }
.placeholder-chart-lines::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 36px, rgba(36,72,216,.12) 36px 37px); }
.placeholder-chart-lines i { width: 16%; background: transparent; border: 4px solid var(--blue); border-radius: 50%; height: 70%; transform: translateY(28px) rotate(var(--r, 0deg)); opacity: .7; }
.placeholder-chart-lines i:nth-child(2){height:45%;--r:8deg}.placeholder-chart-lines i:nth-child(3){height:82%;--r:-9deg}.placeholder-chart-lines i:nth-child(4){height:52%;--r:6deg}.placeholder-chart-lines i:nth-child(5){height:91%;--r:-4deg}.placeholder-chart-lines i:nth-child(6){height:62%;--r:12deg}

.roadmap-window { left: 17%; top: 20%; width: min(980px, calc(100vw - 180px)); }
.roadmap-body { padding: 38px 30px 44px; min-height: 500px; background: var(--paper-2); }
.roadmap-body h2 { font: 900 35px var(--font-hand); margin: 0 0 34px; }
.road-line { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.road-line::before { content:""; position:absolute; left:5%; right:5%; top:47px; height:3px; background:var(--blue); z-index:0; transform:rotate(-.5deg); }
.road-step { position:relative; z-index:1; text-align:center; padding:8px 8px 16px; }
.step-circle { width:72px; height:72px; margin:0 auto 14px; border:5px solid var(--blue); border-radius:50%; background:var(--paper-2); display:grid; place-items:center; font:900 24px var(--font-hand); box-shadow:4px 5px 0 rgba(36,72,216,.16); }
.road-step:nth-child(2) .step-circle { transform:rotate(5deg); }
.road-step:nth-child(3) .step-circle { transform:rotate(-6deg); }
.road-step:nth-child(4) .step-circle { border-style:dashed; }
.road-step h3 { font:900 18px var(--font-hand); margin:0 0 6px; }
.road-step p { font:700 12px/1.5 var(--font-hand); }

.game-window { left: 14%; top: 9%; width: min(1020px, calc(100vw - 180px)); }
.game-body { background: #ece9df; }
.game-info { height: 45px; border-bottom: 2px solid var(--blue); display: flex; gap: 26px; align-items: center; padding: 0 14px; background: var(--paper-2); }
.game-info div { display:flex; gap:7px; align-items:baseline; }
.game-info span { font:900 9px var(--font-ui); opacity:.7; }
.game-info strong { font:900 14px var(--font-hand); }
.game-stage-wrap { position: relative; padding: 12px; background-image: linear-gradient(rgba(36,72,216,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(36,72,216,.1) 1px, transparent 1px); background-size: 26px 26px; }
#gameCanvas { display:block; width:100%; max-height:64vh; background:#f8f3e5; border:2px solid var(--blue); image-rendering:auto; }
.game-overlay { position:absolute; inset:12px; display:grid; place-items:center; align-content:center; gap:10px; text-align:center; padding:20px; background:rgba(248,243,229,.92); backdrop-filter:blur(2px); border:2px solid var(--blue); }
.game-overlay.is-hidden { display:none; }
.game-overlay img { width:120px; height:120px; object-fit:contain; filter:drop-shadow(4px 5px 0 rgba(36,72,216,.15)); }
.game-overlay h3 { margin:0; font:900 36px var(--font-hand); }
.game-overlay p { max-width:530px; margin:0 0 10px; font:700 13px/1.5 var(--font-hand); }

.gallery-window { left: 25%; top: 15%; width: min(880px, calc(100vw - 180px)); }
.gallery-body { padding: 40px 30px 46px; background: var(--blue); min-height: 520px; }
.gallery-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:24px; align-items:start; }
.polaroid { margin:0; background:#fffdf5; padding:12px 12px 34px; border:2px solid white; box-shadow:8px 9px 0 rgba(0,0,0,.13); transition:transform .18s ease, box-shadow .18s ease; }
.polaroid img { width:100%; aspect-ratio:1/1.08; object-fit:cover; background:#e6e0d2; border:1px solid rgba(36,72,216,.25); }
.polaroid figcaption { text-align:center; padding-top:9px; font:900 11px var(--font-hand); color:var(--blue); }
.tilt-left { transform:rotate(-5deg) translateY(10px); }.tilt-right{transform:rotate(4deg)}.tilt-mid{transform:rotate(-1deg) translateY(18px)}
.polaroid:hover { transform:rotate(0) translateY(-6px) scale(1.03); box-shadow:14px 15px 0 rgba(0,0,0,.14); z-index:3; }

.taskbar {
  position:fixed; z-index:9000; left:0; right:0; bottom:0; height:48px; background:var(--blue); color:white; display:flex; align-items:center; border-top:2px solid white; box-shadow:0 -2px 0 var(--blue);
}
.start-btn { height:100%; padding:0 16px; border:0; border-right:1px solid rgba(255,255,255,.5); background:transparent; color:white; display:flex; align-items:center; gap:8px; cursor:pointer; font:900 11px var(--font-ui); }
.start-btn:hover, .start-btn.is-active { background:white; color:var(--blue); }
.taskbar-apps { flex:1; display:flex; gap:4px; padding:0 7px; overflow:hidden; }
.task-app { min-width:110px; max-width:180px; height:31px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; background:rgba(255,255,255,.13); border:1px solid rgba(255,255,255,.5); color:white; cursor:pointer; font:800 9px var(--font-ui); }
.task-app.is-active { background:white; color:var(--blue); }
.taskbar-status { height:100%; padding:0 14px; border-left:1px solid rgba(255,255,255,.5); display:flex; gap:8px; align-items:center; font:800 11px monospace; }
.status-loop { animation:statusSpin 7s linear infinite; display:inline-block; } @keyframes statusSpin{to{transform:rotate(360deg)}}

.start-menu { position:fixed; z-index:9100; left:0; bottom:48px; width:290px; min-height:320px; background:var(--paper-2); border:2px solid var(--blue); box-shadow:8px -8px 0 rgba(22,54,177,.22); display:grid; grid-template-columns:48px 1fr; transform:translateY(12px); opacity:0; visibility:hidden; transition:.15s ease; }
.start-menu.is-open { transform:translateY(0); opacity:1; visibility:visible; }
.start-menu__side { background:var(--blue); color:white; writing-mode:vertical-rl; transform:rotate(180deg); display:flex; align-items:center; padding:12px 0; font:900 20px var(--font-hand); letter-spacing:4px; }
.start-menu__items { padding:10px; display:flex; flex-direction:column; gap:4px; }
.start-menu__items button,.start-menu__items a { border:0; background:transparent; color:var(--ink); text-align:left; padding:10px 9px; cursor:pointer; text-decoration:none; font:800 12px var(--font-ui); }
.start-menu__items button:hover,.start-menu__items a:hover { background:var(--blue); color:white; }
.start-menu__items hr { width:100%; border:0; border-top:1px dashed var(--blue); }
.desktop-toast { position:fixed; z-index:9200; right:18px; bottom:66px; background:var(--blue); color:white; padding:10px 14px; font:900 10px var(--font-ui); box-shadow:4px 4px 0 rgba(22,54,177,.25); transform:translateY(20px); opacity:0; pointer-events:none; transition:.18s ease; }
.desktop-toast.is-visible { opacity:1; transform:translateY(0); }

@media (max-width: 900px) {
  .cursor-ring { display:none; }
  .desktop { padding:58px 10px 76px; min-height:auto; overflow:visible; }
  .desktop-icons { position:relative; left:auto; top:auto; bottom:auto; width:100%; flex-direction:row; flex-wrap:wrap; justify-content:center; margin:4px 0 18px; gap:10px; }
  .desktop-icon { width:72px; }
  .desktop-icon > span:first-child { width:42px; height:42px; }
  .top-strip__buttons { display:none; }
  .window, .hero-window, .story-window, .market-window, .roadmap-window, .game-window, .gallery-window {
    position:relative !important; left:auto !important; top:auto !important; width:100%; min-width:0; margin:0 0 18px; transform:none !important; opacity:1; visibility:visible; pointer-events:auto; box-shadow:5px 5px 0 rgba(22,54,177,.18);
  }
  .window:not(.is-open) { display:none; }
  .window.is-minimized { display:none; }
  .window-titlebar { cursor:default; }
  .hero-body { grid-template-columns:1fr; }
  .hero-copy { padding:32px 22px; }
  .hero-art-wrap { min-height:440px; border-left:0; border-top:2px solid var(--blue); }
  .road-line { grid-template-columns:1fr 1fr; }
  .road-line::before { display:none; }
  .gallery-grid { grid-template-columns:1fr; max-width:440px; margin:0 auto; }
  .gallery-body { padding:30px 24px; }
  .polaroid { transform:none !important; }
  .story-copy { padding:26px 22px; }
  .taskbar-apps { display:none; }
}

@media (max-width: 560px) {
  .top-strip__brand { font-size:10px; }
  .top-strip__ticker { font-size:15px; }
  .hero-copy { padding:28px 18px; }
  h1 { font-size:62px; letter-spacing:-5px; }
  .hero-sub { font-size:15px; }
  .ca-card { grid-template-columns:auto 1fr; }
  .ca-card button { grid-column:1 / -1; border-left:0; border-top:2px dashed var(--blue); min-height:36px; }
  .hero-art-wrap { min-height:360px; }
  .sticky-note { width:120px; font-size:9px; }
  .road-line { grid-template-columns:1fr; }
  .story-sheet { grid-template-columns:1fr; }
  .story-margin { display:none; }
  .story-copy h2 { font-size:22px; }
  .gallery-body { min-height:auto; }
  .taskbar-status { padding:0 9px; }
  .start-btn { padding:0 12px; }
  .game-overlay h3 { font-size:28px; }
}
