:root { --ink:#221841; --paper:#fff7ea; --pink:#e56886; --coral:#ff8c72; --lime:#b6df61; --purple:#5d428c; --line:#382559; }
* { box-sizing:border-box; }
body { margin:0; min-width:320px; color:var(--ink); background:#32234f; font-family:"Courier New", monospace; font-weight:700; }
button { font:inherit; cursor:pointer; }
.game-shell { width:min(1120px,100%); min-height:100vh; margin:auto; padding:20px 32px 38px; background:var(--paper); overflow:hidden; position:relative; }
.topbar { display:flex; align-items:center; justify-content:space-between; border-bottom:3px solid var(--ink); padding:0 0 16px; }
.brand { color:var(--ink); text-decoration:none; display:flex; gap:9px; align-items:center; letter-spacing:-1px; font-size:18px; }
.brand-mark { display:grid; place-items:center; width:26px; height:26px; color:var(--paper); background:var(--pink); box-shadow:3px 3px 0 var(--ink); }
.pixel-button { min-height:44px; border:3px solid var(--ink); padding:9px 14px; background:var(--paper); color:var(--ink); box-shadow:3px 3px 0 var(--ink); }
.pixel-button:active, .tool-card:active, .level-card:active, .d-pad button:active { box-shadow:0 0 0 var(--ink); transform:translate(3px,3px); }
.pixel-button.primary { color:var(--paper); background:var(--pink); font-size:17px; padding:12px 16px; }.pixel-button.primary span { font-size:25px; line-height:0; margin-left:10px; }.quiet { background:#e7dff3; }
.screen { display:none; }.screen.is-active { display:block; }
.home-screen { min-height:calc(100vh - 100px); display:grid; grid-template-columns:1fr 1fr; align-items:center; gap:38px; }.home-screen.is-active { display:grid; }
.eyebrow { color:var(--purple); letter-spacing:1px; font-size:12px; margin:0 0 10px; }.hero-copy h1 { margin:0; font-size:clamp(48px,8vw,90px); line-height:.86; letter-spacing:-7px; }.hero-copy h1 em { color:var(--pink); font-style:normal; text-shadow:4px 4px 0 var(--ink); }.intro { max-width:390px; margin:24px 0; line-height:1.7; font-size:15px; }.hero-actions { display:flex; align-items:center; gap:20px; }.text-button { color:var(--ink); border:0; border-bottom:2px solid var(--ink); background:transparent; padding:5px 0; }.tip-line { margin-top:28px; color:var(--purple); font-size:12px; }.tip-line span { display:inline-grid; place-items:center; width:17px; height:17px; border:2px solid var(--purple); margin-right:7px; }
.hero-art { height:390px; position:relative; overflow:hidden; border:4px solid var(--ink); background:#f9c8b7; box-shadow:8px 8px 0 var(--ink); }.tunnel { position:absolute; border:32px solid #e77980; border-radius:45%; }.tunnel-one { width:260px; height:250px; top:35px; left:20px; border-right-color:#b45674; }.tunnel-two { width:210px; height:235px; right:-46px; bottom:-50px; border-color:#d96b79; border-left-color:#ad4f70; }.tunnel-three { width:110px; height:260px; left:192px; top:-150px; border-color:#ed8a80; }.sprite { position:absolute; z-index:2; image-rendering:pixelated; }.doctor { left:105px; top:168px; width:50px; height:64px; background:#f7f0e5; border:5px solid var(--ink); box-shadow:inset 0 14px #f5b865, 7px 7px 0 #9b5271; }.doctor:before { content:""; position:absolute; width:30px; height:15px; top:-13px; left:5px; background:#f7f0e5; border:5px solid var(--ink); }.doctor i { display:block; width:9px; height:9px; background:var(--ink); margin:25px 0 0 9px; box-shadow:20px 0 var(--ink); }.stool { right:96px; top:202px; width:54px; height:45px; background:#9b5a43; border:5px solid var(--ink); border-radius:45% 45% 35% 35%; box-shadow:7px 7px 0 #734039; }.exit-gate { position:absolute; z-index:3; right:13px; top:155px; background:var(--lime); border:4px solid var(--ink); padding:14px 7px; box-shadow:5px 5px 0 var(--ink); }.spark { width:10px; height:10px; position:absolute; background:var(--ink); }.spark-a { top:46px; right:38px; }.spark-b { bottom:37px; left:42px; background:var(--lime); }.spark-c { top:106px; left:48%; background:#fff; }
.game-screen { padding-top:31px; }.game-head, .panel-title { display:flex; justify-content:space-between; align-items:flex-start; }.game-head h2, .panel-title h2 { margin:0; font-size:36px; letter-spacing:-3px; }.stats { display:flex; gap:14px; color:var(--purple); font-size:12px; }.stats b { display:block; color:var(--ink); font-size:20px; margin-top:4px; }.game-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:22px; margin-top:26px; }.maze-wrap { position:relative; overflow:hidden; isolation:isolate; background:#da7d86; padding:27px 25px 20px; border:4px solid var(--ink); border-radius:42% 53% 38% 47% / 28% 39% 42% 34%; box-shadow:6px 6px 0 var(--ink); }.maze-wrap:before,.maze-wrap:after { content:""; position:absolute; z-index:-1; opacity:.72; border:10px solid #b85670; border-radius:48% 52% 55% 45%; }.maze-wrap:before { inset:9px -24px 14px 17px; }.maze-wrap:after { inset:21px 8px -18px -18px; border-color:#eea08c; }.maze-wrap.is-complete { animation:gut-pulse .72s steps(2) 3; }.gut-label { margin:0 0 10px; color:#572d58; font-size:10px; letter-spacing:1px; }.maze { width:min(100%,560px); aspect-ratio:7/6; display:grid; grid-template-columns:repeat(7,1fr); gap:2px; margin:auto; padding:8px; border:4px solid var(--ink); border-radius:44% 35% 38% 48% / 31% 38% 43% 38%; background:#722d58; transform:rotate(-1deg); }.tile { position:relative; display:grid; place-items:center; min-width:0; overflow:hidden; font-size:clamp(13px,3vw,27px); }.floor { background:radial-gradient(circle at 40% 35%,#ffdbb7 0 18%,transparent 20%),linear-gradient(135deg,#f5a08a,#e47779); border-radius:46% 32% 53% 38%; }.floor:before { content:""; position:absolute; width:150%; height:30%; top:4%; border-top:3px solid rgba(132,48,74,.42); border-radius:50%; transform:rotate(-12deg); }.floor:nth-child(3n) { border-radius:31% 54% 35% 57%; }.floor:nth-child(4n) { filter:hue-rotate(8deg); }.wall { background:radial-gradient(circle at 50% 25%,#a74c71 0 13%,transparent 15%),linear-gradient(145deg,#552b58,#2e2245); border-radius:39% 50% 43% 32%; }.wall:after { content:""; width:45%; height:45%; border:3px solid #c26078; border-radius:50%; opacity:.65; }.exit { background:radial-gradient(circle,#f8f3a6 0 20%,#b8e070 23% 45%,#5eab6d 47%); border-radius:46% 52% 41% 54%; }.exit-core { position:relative; z-index:1; color:#265746; font-style:normal; text-shadow:2px 2px #eaf68c; }.doctor-token,.stool-token { position:relative; z-index:2; display:grid; place-items:center; font-style:normal; }.doctor-token { width:70%; height:70%; color:white; background:#4c83a5; border:3px solid var(--ink); box-shadow:2px 2px 0 #253650; }.stool-token { width:70%; height:56%; color:#764230; border:3px solid var(--ink); border-radius:48% 52% 40% 46%; background:#a96544; box-shadow:3px 3px 0 #713c43; }.objective { margin:14px 0 0; font-size:12px; line-height:1.5; }.game-message { min-height:20px; margin:6px 0 0; color:#572d58; font-size:11px; }.toolbox { display:grid; gap:9px; align-content:start; }.tool-card { width:100%; min-height:64px; display:grid; grid-template-columns:40px 1fr auto; align-items:center; text-align:left; gap:8px; padding:7px; color:var(--ink); background:#f2e8d7; border:3px solid var(--ink); box-shadow:3px 3px 0 var(--ink); }.tool-card.active { background:#dceca3; }.tool-card small { display:block; color:var(--purple); font-size:10px; margin-top:4px; }.tool-icon { display:grid; place-items:center; width:33px; height:33px; color:white; background:var(--pink); border:2px solid var(--ink); }.bubble { border-radius:50%; color:#b6df61; }.basket { background:#f5a54b; }.spray { background:#708bc8; }.glove { background:#e68cb2; }.control-row { display:flex; justify-content:space-between; align-items:center; margin-top:24px; }.d-pad { display:grid; grid-template-columns:repeat(3,44px); grid-template-areas:'. up .' 'left down right'; gap:3px; }.d-pad button { border:3px solid var(--ink); background:#e3dbf0; box-shadow:2px 2px 0 var(--ink); }.d-pad button:nth-child(1){grid-area:up}.d-pad button:nth-child(2){grid-area:left}.d-pad button:nth-child(3){grid-area:down}.d-pad button:nth-child(4){grid-area:right}.game-actions { display:flex; gap:10px; } @keyframes gut-pulse { 50% { transform:scale(1.018) rotate(.5deg); filter:saturate(1.3); } }
.panel-screen { padding:70px 0; }.close { border:3px solid var(--ink); width:42px; height:42px; background:var(--pink); color:white; font-size:24px; box-shadow:3px 3px 0 var(--ink); }.level-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:18px; margin-top:30px; }.level-card { min-height:155px; padding:20px; text-align:left; border:4px solid var(--ink); background:#f6be9d; box-shadow:5px 5px 0 var(--ink); }.level-card b { display:block; color:var(--pink); font-size:30px; }.level-card span, .level-card small { display:block; margin-top:8px; }.level-card small { color:var(--purple); }.level-card.locked { opacity:.45; background:#d9cadd; }.health-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:30px 0; }.health-grid article { min-height:190px; padding:20px; border:4px solid var(--ink); box-shadow:5px 5px 0 var(--ink); background:#dceca3; }.health-grid article:nth-child(2){background:#f7be9e}.health-grid article:nth-child(3){background:#c8bae5}.health-grid span { color:var(--pink); font-size:28px; }.health-grid h3 { font-size:20px; }.health-grid p,.notice { font-size:13px; line-height:1.6; }.notice { border-left:5px solid var(--pink); padding-left:14px; max-width:680px; }
.maze .tile { border:0; padding:0; cursor:crosshair; }.maze .tile:focus-visible { outline:3px solid #fff7a4; outline-offset:-3px; z-index:4; }.biofilm { color:#dff66b; background:radial-gradient(circle at 28% 28%,#e5ff88 0 8%,transparent 10%),radial-gradient(circle at 70% 70%,#a5db61 0 13%,transparent 15%),#665080; border-radius:54% 35% 47% 39%; }.fiber-gap { color:#d8b08c; background:repeating-linear-gradient(135deg,#552948 0 5px,#7b3956 6px 10px); border-radius:47% 38% 52% 33%; }.slide { color:#d7f7fd; background:linear-gradient(120deg,#71b7cd 0 28%,#d8f7f3 30% 42%,#6fa8c3 44% 70%,#c8f2ee 73%); border-radius:31% 54% 45% 50%; }.rock { color:#e7b980; background:radial-gradient(circle at 35% 28%,#f0c38c 0 9%,transparent 11%),#8e5b61; border-radius:49% 43% 37% 54%; }.narrow { color:#ffc4b2; background:linear-gradient(90deg,#522748 0 34%,#f49b86 36% 61%,#522748 63%); border-radius:48% 45% 35% 52%; }.obstacle-icon { font-style:normal; position:relative; z-index:1; text-shadow:2px 2px #3c2548; }.stool-token { width:76%; height:68%; display:block; position:relative; border:3px solid #40263a; border-radius:48% 43% 39% 51%; background:linear-gradient(140deg,#df9b62 0 15%,#9d593f 16% 46%,#6e3d36 48%); box-shadow:3px 4px 0 #482838,inset 6px 5px 0 rgba(255,212,150,.35); transform:rotate(-5deg); }.stool-token:before { content:""; position:absolute; left:15%; top:-24%; width:70%; height:44%; border:3px solid #40263a; border-bottom:0; border-radius:52% 48% 0 0; background:#a75f42; }.stool-token:after { content:""; position:absolute; left:21%; bottom:-24%; width:58%; height:42%; border:3px solid #40263a; border-top:0; border-radius:0 0 48% 48%; background:#7c4438; }.stool-token b { position:absolute; z-index:2; width:7%; height:7%; border-radius:50%; background:#f2c378; }.stool-token b:nth-child(1){left:23%;top:26%}.stool-token b:nth-child(2){left:54%;top:47%}.stool-token b:nth-child(3){left:65%;top:21%}.tool-card:disabled { opacity:.43; cursor:not-allowed; }.level-card:not(.selected) { background:#e7dff3; }
@media (max-width:720px) { .game-shell{padding:16px 17px 28px}.home-screen,.home-screen.is-active{grid-template-columns:1fr; padding:45px 0}.hero-art{height:300px;order:-1}.hero-copy h1{font-size:58px}.game-layout{grid-template-columns:1fr}.toolbox{grid-template-columns:repeat(2,1fr)}.toolbox .eyebrow{grid-column:1/-1}.tool-card{grid-template-columns:30px 1fr}.tool-card b{display:none}.control-row{align-items:flex-end}.game-actions{flex-direction:column}.health-grid{grid-template-columns:1fr}.level-grid{grid-template-columns:1fr}.stats{gap:8px}.topbar .quiet{font-size:11px;padding:6px 8px}.panel-screen{padding-top:42px} }

.tool-card { grid-template-columns:40px minmax(0, 1fr) auto; }
.tool-detail { display:grid; grid-template-columns:auto auto 1fr; align-items:baseline; gap:7px; margin-top:12px; padding:9px 11px; border-left:4px solid var(--lime); background:rgba(255,247,234,.78); color:#43264c; font-size:12px; line-height:1.45; }
.tool-detail-label { color:var(--purple); font-size:10px; letter-spacing:.5px; }
.tool-detail strong { color:#253650; white-space:nowrap; }

@media (max-width:720px) {
  .tool-card { grid-template-columns:30px minmax(0,1fr) auto; font-size:11px; }
  .tool-card b { display:block; font-size:10px; }
  .tool-detail { grid-template-columns:auto 1fr; }
  .tool-detail strong { grid-column:2; }
  .tool-detail #tool-description { grid-column:1 / -1; }
}

.maze { grid-template-columns:repeat(9, 1fr); aspect-ratio:9 / 6; }
.level-copy { margin-top:15px; padding:12px 15px; border:3px solid var(--ink); background:#f5e7d4; box-shadow:4px 4px 0 var(--ink); }
.level-copy .objective { margin:0; font-size:13px; }
.level-copy .game-message { min-height:0; margin:7px 0 0; }
.level-copy .tool-detail { margin:10px 0 0; }

.pixel-button, .level-card { text-decoration:none; }
.level-card { color:var(--ink); }
.level-card.locked { pointer-events:none; }

.completion-banner { margin-top:26px; padding:26px 22px; border:4px solid var(--ink); text-align:center; background:linear-gradient(135deg,#ff8c72 0 33%,#f7d960 33% 66%,#b6df61 66%); box-shadow:7px 7px 0 var(--ink); }
.completion-banner p { margin:0 0 8px; color:var(--purple); font-size:12px; letter-spacing:1px; }
.completion-banner h2 { margin:0; font-size:clamp(34px,6vw,58px); letter-spacing:-4px; text-shadow:3px 3px 0 var(--paper); }
.completion-banner > span { display:block; max-width:510px; margin:14px auto 20px; line-height:1.55; }
.completion-banner .pixel-button { display:inline-block; }

.stool-art { background:transparent; border:0; box-shadow:none; border-radius:0; width:92px; height:92px; right:75px; top:174px; }
.stool-image { width:100%; height:100%; object-fit:contain; display:block; background:transparent; border:0; box-shadow:none; border-radius:0; transform:none; image-rendering:auto; }
.maze .stool-image { width:92%; height:92%; }

.top-actions { display:flex; align-items:center; gap:12px; }
.lang-switch { display:flex; border:3px solid var(--ink); box-shadow:3px 3px 0 var(--ink); background:var(--paper); }
.lang-switch button { min-height:38px; border:0; padding:6px 10px; color:var(--ink); background:transparent; }
.lang-switch button.active { color:var(--paper); background:var(--purple); }

@media (max-width:720px) {
  .top-actions { gap:7px; }
  .lang-switch button { min-height:31px; padding:5px 6px; font-size:10px; }
}
