/* SPAWN POINT: Minecraft theme. Light = Overworld day, dark = Cave / Nether. Original pixel art only. */
:root, :root[data-theme="light"] {
  --bg: #dff1ff; --panel: #fff4d6; --ink: #2a2118; --ink-soft: #5a4a38; --accent: #a8420c; --link: #0a6b8a;
  --edge: #2a2118; --hi: #ffffff; --lo: #d2bf92; --grass: #3f8a2a; --tex: var(--tex-planks);
  --sky1: #6fb7ff; --sky2: #d4efff; --sunc: #ffd34d; --cloud: #ffffff; --ph: rgba(255,211,77,.5); --tex-block: var(--tex-grass-side); --sky-img: none; --glass: rgba(255,255,255,.55); --glass-edge: rgba(255,255,255,.75);
  color-scheme: light;
}
:root[data-theme="nether"] {
  --bg: #1a0707; --panel: #3b1517; --ink: #ffe9dc; --ink-soft: #d6a99a; --accent: #ff9a3c; --link: #ffd27a;
  --edge: #0d0202; --hi: #5a2325; --lo: #220a0b; --grass: #8a2f2f; --tex: var(--tex-nbrick);
  --sky1: #2a0606; --sky2: #8a2a0c; --sunc: #ff7a1a; --cloud: #5a2a2a; --ph: rgba(255,154,60,.3);
  --tex-block: var(--tex-netherrack); --glass: rgba(70,20,20,.5); --glass-edge: rgba(255,160,100,.38);
  --sky-img: radial-gradient(2px 2px at 10% 30%, #ff9a3c, transparent), radial-gradient(2px 2px at 35% 60%, #ffb347, transparent), radial-gradient(3px 3px at 62% 25%, #ff7a1a, transparent), radial-gradient(2px 2px at 85% 55%, #ffb347, transparent), radial-gradient(2px 2px at 48% 15%, #ff9a3c, transparent);
  color-scheme: dark;
}
:root[data-theme="end"] {
  --bg: #0b0713; --panel: #1f1736; --ink: #efe6ff; --ink-soft: #b9a8de; --accent: #d58bff; --link: #8affd9;
  --edge: #05020a; --hi: #3a2c63; --lo: #120c22; --grass: #6a5aa0; --tex: var(--tex-obsidian);
  --sky1: #03010a; --sky2: #1b1038; --sunc: #e6d6ff; --cloud: #3a2a66; --ph: rgba(213,139,255,.3);
  --tex-block: var(--tex-endstone); --glass: rgba(45,28,90,.5); --glass-edge: rgba(200,160,255,.38);
  --sky-img: radial-gradient(1.5px 1.5px at 8% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 55%, #d9c6ff, transparent), radial-gradient(2px 2px at 40% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 57% 48%, #fff, transparent), radial-gradient(2px 2px at 71% 22%, #d9c6ff, transparent), radial-gradient(1.5px 1.5px at 88% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 33% 80%, #d9c6ff, transparent), radial-gradient(1.5px 1.5px at 93% 75%, #fff, transparent);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; } html.sp-blank { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Space Grotesk", system-ui, sans-serif; line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, .btn, .badge, .brand, .kicker, .role { font-family: Silkscreen, monospace; }
h1 { font-size: clamp(2.2rem, 8vw, 4.6rem); line-height: 1.05; margin: 0 0 .3em; text-shadow: 4px 4px 0 rgba(0,0,0,.35); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); margin: 0 0 .3em; } h2.sub { margin-top: 2rem; } h3 { font-size: 1.05rem; margin: .4rem 0; color: var(--accent); }
h1, h2, h3 { position: relative; isolation: isolate; }
.title-text { position: relative; display: inline-block; max-width: 100%; isolation: isolate; }
p { margin: 0 0 1em; max-width: 62ch; } a { color: var(--link); }
.term, .coords, .code, .fetch, .ascii, .titlebar, .hint { font-family: VT323, ui-monospace, monospace; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* states: blank → building → live */
html.sp-blank .page, html.sp-building .page { visibility: hidden; }
html:not(.sp-live) .hotbar, html:not(.sp-live) #xp { display: none; }
html:not(.sp-blank) .start { display: none; }
/* Title sequence: loading screen → Minecraft-style title screen */
.start { position: fixed; inset: 0; z-index: 97; overflow: hidden; background: #1a120b; transition: opacity .45s steps(6); }
.start[hidden], .start [hidden] { display: none !important; }
.start.leaving { opacity: 0; pointer-events: none; }

.loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; background-color: #4a3221; background-image: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.55)), var(--tex-dirt, linear-gradient(#6b4a2f, #4a3221)); background-size: auto, 64px 64px; image-rendering: pixelated; transition: opacity .3s steps(5); }
.loading.is-out { opacity: 0; pointer-events: none; }
.loading-box { display: grid; justify-items: center; gap: 10px; }
.loading-step { margin: 0; font-family: Silkscreen, monospace; font-size: 1.05rem; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; text-align: center; }
.loading-bar { width: min(400px, 80vw); height: 16px; padding: 2px; background: #000; border: 2px solid #fff; }
.loading-bar i { display: block; height: 100%; width: 0; background: #80ff20; box-shadow: inset 0 -3px 0 #3d8a0a; transition: width .12s linear; }
.loading-pct { margin: 0; font-family: Silkscreen, monospace; font-size: .9rem; color: #dcdcdc; text-shadow: 2px 2px 0 #3f3f3f; }
.start .loading-skip { margin-top: 18px; min-height: 36px; padding: .25rem .9rem; font-family: Silkscreen, monospace; font-size: .75rem; color: #ddd; background: transparent; border: 2px solid #888; box-shadow: none; }
.start .loading-skip:hover { color: #fff; border-color: #fff; background: rgba(0,0,0,.2); }

.title { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; padding: 32px 16px 56px; overflow: hidden; background: #000; color: #fff; }
.title.is-in { animation: title-in .45s steps(6) both; }
@keyframes title-in { from { opacity: 0; } }
.title-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.pano-sky { position: absolute; inset: 0; background-image: var(--sky-img), linear-gradient(var(--sky1), var(--sky2)); }
.pano-sun { position: absolute; top: 11%; right: 13%; width: clamp(56px, 9vw, 106px); aspect-ratio: 1; background: var(--sunc); box-shadow: 0 0 0 10px rgba(255,255,255,.2), 0 0 70px var(--sunc); }
.pano-cloud { position: absolute; height: 30px; background: var(--cloud); opacity: .85; box-shadow: 30px -16px 0 var(--cloud), 64px 0 0 var(--cloud), 30px 0 0 var(--cloud); }
.pano-cloud.c1 { left: 5%; top: 16%; width: 64px; animation: pano-drift 50s linear infinite alternate; }
.pano-cloud.c2 { left: 62%; top: 8%; width: 42px; opacity: .6; animation: pano-drift 70s linear infinite alternate-reverse; }
@keyframes pano-drift { to { translate: 10vw 0; } }
.pano-block { position: absolute; background-size: cover; image-rendering: pixelated; border: 4px solid rgba(0,0,0,.35); box-shadow: 10px 10px 0 rgba(0,0,0,.22); }
.pano-block.b1 { right: 8%; bottom: 23%; width: clamp(48px, 7vw, 92px); aspect-ratio: 1; background-image: var(--tex-grass-side, linear-gradient(#7a5a35, #5a3d28)); rotate: -6deg; animation: pano-bob 7s ease-in-out infinite; }
.pano-block.b2 { left: 7%; bottom: 31%; width: clamp(32px, 4.5vw, 58px); aspect-ratio: 1; background-image: var(--tex-stone, linear-gradient(#9a9a9a, #6e6e6e)); rotate: 8deg; animation: pano-bob 9s ease-in-out infinite reverse; }
@keyframes pano-bob { 50% { translate: 0 -10px; } }
.pano-ground { position: absolute; left: 0; right: 0; bottom: 0; height: 17vh; min-height: 90px; background-color: #5a3d28; background-image: linear-gradient(rgba(0,0,0,.06), rgba(0,0,0,.3)), var(--tex-grass-side, linear-gradient(#5c8a3a, #5a3d28)); background-size: auto, 64px 64px; image-rendering: pixelated; border-top: 8px solid #2e5a20; box-shadow: 0 -18px 50px rgba(0,0,0,.3); }
.pano-ground::before { content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; background: var(--tex-grass, #4f8a2a) 0 0 / 64px; image-rendering: pixelated; }
.title::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse at 50% 42%, rgba(0,0,0,.1), rgba(0,0,0,.55)); pointer-events: none; }
.title-logo, .title-menu { position: relative; z-index: 2; }
.title-logo { align-self: end; margin-bottom: 36px; text-align: center; max-width: 96vw; }
.mc-logo { margin: 0; font-family: Silkscreen, monospace; font-size: clamp(2rem, 11vw, 6.5rem); line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: transparent; background-image: linear-gradient(rgba(255,255,255,.14), rgba(0,0,0,.28)), var(--tex-stone, linear-gradient(#a0a0a0, #6e6e6e)); background-size: auto, 48px 48px; -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 3px #1a1a1a; paint-order: stroke fill; filter: drop-shadow(5px 6px 0 rgba(0,0,0,.75)); image-rendering: pixelated; }
.mc-edition { margin: 6px 0 0; font-family: Silkscreen, monospace; font-size: clamp(.62rem, 1.5vw, .82rem); letter-spacing: .24em; text-transform: uppercase; color: #e8e8e8; text-shadow: 2px 2px 0 #2a2a2a; }
.mc-splash { position: absolute; right: -8%; bottom: 56%; font-family: Silkscreen, monospace; font-size: clamp(.7rem, 1.8vw, 1rem); white-space: nowrap; color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; transform: rotate(-18deg); animation: splash .5s ease-in-out infinite alternate; }
@keyframes splash { to { transform: rotate(-18deg) scale(1.12); } }
.title-menu { display: grid; gap: 10px; width: min(400px, 100%); }
.title-menu .btn { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; font-family: Silkscreen, monospace; font-size: .9rem; text-align: center; }
.title-menu .btn:hover, .title-menu .btn:focus-visible { background-color: #8f8f8f; color: #ffffa0; }
.enter-wrap { position: relative; display: grid; }
.enter-wrap #enter-world { padding-right: 108px; }
.enter-cat { position: absolute; right: 10px; bottom: 0; z-index: 2; width: 96px; height: 64px; padding: 0; border: 0; background: none; box-shadow: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.enter-cat img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; pointer-events: none; user-select: none; transition: transform .15s steps(3); }
.enter-cat:hover img, .enter-cat:focus-visible img { transform: translateY(-4px) rotate(-2deg); }
.enter-cat:focus-visible { outline: 3px dashed #ffe066; outline-offset: 2px; }
.enter-cat.poked img { animation: cat-poke .18s steps(2); }
@keyframes cat-poke { 50% { transform: translateY(-7px) scale(1.06, .94); } }
.title-menu.cat-shake { animation: cat-shake .32s steps(4); }
@keyframes cat-shake { 25% { translate: -4px 2px; } 50% { translate: 4px -2px; } 75% { translate: -2px 1px; } }
.cat-boom { position: fixed; z-index: 100; pointer-events: none; }
.cat-boom i { position: absolute; left: 0; top: 0; width: 6px; height: 6px; animation: cat-shard .75s cubic-bezier(.1,.6,.4,1) forwards; }
@keyframes cat-shard { from { transform: translate(-50%, -50%); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rt)); opacity: 0; } }
.cat-boom b { position: absolute; left: 0; top: 0; width: 12px; height: 12px; margin: -6px; background: #fff; box-shadow: 0 0 0 6px #ffd34d, 0 0 38px 18px #ff9a3c; animation: cat-blast .35s steps(5) forwards; }
@keyframes cat-blast { from { transform: scale(.4); opacity: 1; } to { transform: scale(4); opacity: 0; } }
.title-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.title-options { display: grid; gap: 8px; padding: 12px; background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.3); }
.opt-label { margin: 0; font-family: Silkscreen, monospace; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: #ddd; }
.opt-dims { display: flex; gap: 8px; }
.opt-dims .dim { flex: 1; height: 46px; border: 3px solid #1a1a1a; cursor: pointer; image-rendering: pixelated; background-size: 40px; }
.opt-dims .dim[aria-pressed="true"] { outline: 3px solid #ffe066; outline-offset: -8px; }
.title-version, .title-legal { position: absolute; bottom: 10px; margin: 0; z-index: 3; font-family: Silkscreen, monospace; font-size: .62rem; color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.title-version { left: 14px; } .title-legal { right: 14px; }
@media (max-width: 560px) {
  .title { padding: 24px 14px 64px; }
  .title-logo { margin-bottom: 28px; }
  .mc-splash { right: 0; bottom: 60%; }
  .pano-block, .pano-cloud.c2 { display: none; }
  .title-legal { left: 14px; right: auto; bottom: 30px; }
  .title-version { bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pano-cloud, .pano-block, .mc-splash, .title.is-in { animation: none; }
  .enter-cat.poked img, .title-menu.cat-shake, .cat-boom i { animation: none; }
  .cat-boom i { display: none; }
  .cat-boom b { animation: none; transform: scale(2.5); opacity: .8; }
}
.tools { position: fixed; top: 10px; right: 10px; z-index: 90; display: flex; gap: 6px; }
.tool { width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; color: var(--ink); background: var(--panel); border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo); }
.tool[aria-pressed="false"]#cursor-toggle { opacity: .5; }
.dims { display: flex; gap: 6px; }
.dim { background-size: 32px; background-position: center; image-rendering: pixelated; }
.dim[data-dim="light"] { background-image: var(--tex-grass); } .dim[data-dim="nether"] { background-image: var(--tex-netherrack); } .dim[data-dim="end"] { background-image: var(--tex-endstone); }
.dim[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: -7px; }
@media (prefers-reduced-motion: no-preference) { html.sp-live body, html.sp-live .panel, html.sp-live .card, html.sp-live .hero .sky { transition: background-color .5s, color .5s; } }

/* MC bevel + textures */
.panel, .card, .terminal, .site-header, .inv, .btn, .slot, .hb {
  border: 4px solid var(--edge); box-shadow: inset 4px 4px 0 var(--hi), inset -4px -4px 0 var(--lo);
}
.panel, .site-header, .card { background: var(--tex) 0 0 / 64px, var(--panel); background-blend-mode: soft-light; image-rendering: pixelated; }
.panel, .card { padding: 1.1rem; }
.btn { display: inline-block; color: #fff; background: var(--tex-stone) 0 0 / 48px, #7d7d7d; background-blend-mode: multiply; text-shadow: 2px 2px 0 #333; padding: .75rem 1.3rem; text-decoration: none; cursor: pointer; min-height: 44px; image-rendering: pixelated; }
.btn:hover { background-color: #6d8bd6; }
.btn:active { box-shadow: inset 4px 4px 0 var(--lo); }
.btn--alt { background-color: #b06a3a; }
.btn.big { font-size: 1.6rem; padding: 1rem 3.5rem; }
.page { max-width: 70rem; margin: 0 auto; padding: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; padding: .6rem 1rem; }
.site-header nav { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.site-header nav a { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .35rem .55rem .3rem;
  color: #fff; background: var(--tex-stone) 0 0 / 42px, #7d7d7d; background-blend-mode: multiply; image-rendering: pixelated;
  border: 3px solid var(--edge); box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo);
  font-family: Silkscreen, monospace; font-size: .66rem; line-height: 1; letter-spacing: .01em; text-decoration: none;
  text-shadow: 2px 2px 0 #2a2a2a; transition: background-color .12s, transform .12s steps(2); }
.site-header nav a:hover, .site-header nav a:focus-visible { background-color: #6d8bd6; transform: translateY(-1px); }
.site-header nav a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.site-header nav .nav-ico { flex: 0 0 18px; width: 18px; height: 18px; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.55)); }
.brand { text-decoration: none; color: var(--accent); }
section { padding: 3.5rem 0 1rem; }
.rule { border: 0; height: 6px; background: var(--tex-stone) 0 0 / 24px; image-rendering: pixelated; margin: 0 0 1.5rem; }

/* Hero */
.hero { position: relative; min-height: 86vh; padding: 4rem 0 0; display: flex; flex-direction: column; }
.hero .sky { position: absolute; inset: 0 0 72px; border: 4px solid var(--edge); background: var(--sky-img), linear-gradient(var(--sky1), var(--sky2)); }
.hero .sun { position: absolute; right: 8%; top: 12%; width: 72px; height: 72px; background: var(--sunc); box-shadow: 0 0 0 8px rgba(255,255,255,.35), 0 0 40px var(--sunc); }
.cloud { position: absolute; height: 28px; background: var(--cloud); box-shadow: 28px -16px 0 var(--cloud), 64px 0 0 var(--cloud), 28px 0 0 var(--cloud); opacity: .9; }
.c1 { left: 6%; top: 10%; width: 56px; } .c2 { left: 48%; top: 22%; width: 40px; }
.hero-text { position: relative; padding: 1.5rem; margin-top: auto; }
.kicker { color: var(--accent); background: rgba(0,0,0,.0); } .role { letter-spacing: .3em; }
.tagline { font-size: 1.25rem; font-weight: 600; } .coords { font-size: 1.3rem; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.row { position: relative; display: flex; overflow: hidden; height: 72px; margin-top: -4px; }
.block { flex: 0 0 72px; height: 72px; border: 0; padding: 0; cursor: pointer; background: var(--tex-block) 0 0 / 72px; image-rendering: pixelated; box-shadow: inset 0 0 0 2px rgba(0,0,0,.25); position: relative; }
/* Crack overlay for anything being mined (blocks, cards, text, sections) */
[data-hits]::after { content: ""; position: absolute; inset: 0; z-index: 2; background: center / 64px 64px repeat; image-rendering: pixelated; pointer-events: none; }
[data-hits="1"]::after { background-image: var(--crack1); }
[data-hits="2"]::after { background-image: var(--crack2); }
.block.mined { visibility: hidden; }
.hint { position: absolute; bottom: 82px; right: 1rem; font-size: 1.3rem; margin: 0; }

.split { display: grid; gap: var(--gap, 1.25rem); grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); align-items: start; }
.stats { list-style: none; padding: 0; margin: 0; } .stats b { color: var(--accent); }
.terminal { background: #0c0d11; color: #c9f2c7; } .titlebar { display: flex; justify-content: space-between; background: #3d4350; color: #fff; padding: .1rem .6rem; font-size: 1.2rem; }
.term-body { display: flex; gap: 1.2rem; padding: 1rem; font-size: 1.3rem; flex-wrap: wrap; } .ascii { margin: 0; color: #5fe08a; line-height: 1; } .fetch b { color: #ffb347; font-weight: 400; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.card { padding: 0 1rem 1rem; } .card p { margin-bottom: .6rem; } .code { color: var(--ink-soft); font-size: 1.15rem; }
.cover { height: 72px; margin: 0 -1rem .6rem; border-bottom: 4px solid var(--edge); image-rendering: pixelated; background-size: 48px; }
.cv-stone { background-image: var(--tex-stone); } .cv-dirt { background-image: var(--tex-dirt); } .cv-planks { background-image: var(--tex-planks); } .cv-grass { background-image: var(--tex-grass); }
.badge { display: inline-block; font-size: .7rem; background: var(--accent); color: #fff; padding: .1rem .5rem; border: 2px solid var(--edge); }
.ph { font-family: VT323, monospace; background: var(--ph); outline: 1px dashed var(--ink-soft); padding: 0 .25em; }
.inv { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 72px)); gap: 6px; padding: 10px; background: var(--lo); max-width: 44rem; }
.slot { position: relative; width: 100%; aspect-ratio: 1; background: var(--panel); padding: 0; cursor: pointer; display: grid; place-items: center; }
.ico { display: block; width: 36px; height: 36px; background: center / contain no-repeat; image-rendering: pixelated; }
.tip { position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%); z-index: 20; width: 11rem; padding: .4rem .6rem; font-size: .85rem; text-align: left; color: #fff; background: #1b0b2e; border: 3px solid #5a2d98; opacity: 0; visibility: hidden; pointer-events: none; }
.slot:hover .tip, .slot:focus-visible .tip { opacity: 1; visibility: visible; }
.contact { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.site-footer { padding: 3rem 0 6rem; color: var(--ink-soft); font-size: .9rem; } .site-footer p { margin-bottom: .3rem; }

/* skills: Minecraft XP bars */
.xpbars { display: grid; gap: .8rem; max-width: 46rem; }
.xpbar { display: grid; grid-template-columns: 2.4rem 6.5rem 1fr 3rem; align-items: center; gap: .8rem; padding: .5rem .9rem; background-blend-mode: soft-light; }
.lang { font-family: Silkscreen, monospace; font-size: .85rem; }
.lvl { font-family: Silkscreen, monospace; font-size: 1.15rem; color: #80ff20; text-shadow: 2px 2px 0 #1c3a00; text-align: right; }
.track { position: relative; height: 20px; background: #1a1a1a; border: 3px solid var(--edge); }
.fill { position: absolute; left: 0; top: 0; bottom: 0; display: block;
  background: repeating-linear-gradient(90deg, transparent 0 14px, rgba(0,0,0,.28) 14px 16px), linear-gradient(#b6f57a, #5cb82f); box-shadow: inset 0 3px 0 rgba(255,255,255,.4); }
.card .btn { margin-top: .3rem; }

/* chickens */
#chickens { position: absolute; left: 0; top: 0; width: 100%; height: 0; overflow: visible; z-index: 55; pointer-events: none; }
.chick { position: absolute; left: 0; top: 0; image-rendering: pixelated; pointer-events: auto; cursor: pointer; will-change: transform; }
.bok { position: absolute; font-family: Silkscreen, monospace; font-size: .7rem; background: #fff; color: #111; border: 2px solid #111; padding: 0 .3rem; pointer-events: none; animation: bok 1s steps(8) forwards; }
@keyframes bok { to { transform: translateY(-26px); opacity: 0; } }

/* hotbar, XP, toasts (live only) */
#xp { position: fixed; inset: 0 0 auto; height: 8px; background: var(--lo); z-index: 60; border-bottom: 2px solid var(--edge); }
#xp i { display: block; height: 100%; width: 0; background: #7bd34a; }

/* Diamond counter — top-center, hidden until the first diamond is found */
#diamond-counter {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: none; white-space: nowrap;
  font-family: Silkscreen, monospace; font-size: 1rem;
  color: #5ff3e0; text-shadow: 2px 2px 0 #1fa6a0;
  background: rgba(0,0,0,.55); padding: .35rem .8rem;
  border: 3px solid #5ff3e0; border-radius: 8px; pointer-events: none;
}

/* Diamond pickup — pops out of the mined element, floats up, fades */
.diamond-drop {
  position: fixed; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  background: center / contain no-repeat; image-rendering: pixelated;
  pointer-events: none; z-index: 200;
  filter: drop-shadow(0 0 8px #5ff3e0);
  animation: diamond-pop 1.4s cubic-bezier(.2,.9,.3,1) forwards;
}
@keyframes diamond-pop {
  0% { transform: scale(.2) rotate(-20deg); opacity: 0; }
  18% { transform: scale(1.5) rotate(0deg); opacity: 1; }
  38% { transform: scale(1) translateY(0); opacity: 1; }
  70% { transform: scale(1) translateY(-24px); opacity: 1; }
  100% { transform: scale(.9) translateY(-90px) rotate(12deg); opacity: 0; }
}

/* Mine mode — the pickaxe hotbar slot makes everything clickable */
html.mine-mode, html.mine-mode a, html.mine-mode button,
html.mine-mode [data-box], html.mine-mode .block { cursor: crosshair; }
html.mine-mode .tools button, html.mine-mode .hotbar * { cursor: pointer; }
html.mine-mode a { opacity: .85; }
html.mine-mode [data-hits="1"] { filter: brightness(.85) saturate(.9); }
html.mine-mode [data-hits="2"] { filter: brightness(.68) saturate(.8); }
.mined { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { .diamond-drop { animation: none; } }

.hotbar { position: fixed; bottom: 8px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; gap: 3px; background: var(--edge); padding: 3px; }
.hb { position: relative; width: clamp(40px, 12vw, 56px); aspect-ratio: 1; display: grid; place-items: center; background: var(--panel); }
.hb[aria-current] { box-shadow: inset 0 0 0 4px #fff; } .hb kbd { position: absolute; right: 3px; bottom: 0; font-family: VT323; font-size: .9rem; }
.toasts { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 99; display: grid; gap: 6px; }
.toast { background: #20201e; color: #fff; border: 3px solid #fff; padding: .5rem .9rem; display: grid; font-size: .9rem; animation: toast 4.2s steps(14) forwards; }
.toast b { color: #ffe066; font-family: Silkscreen; font-size: .8rem; }
@keyframes toast { 0% { transform: translateY(-140%); } 8%, 88% { transform: none; } 100% { transform: translateY(-140%); } }
@media (max-width: 700px) {
  #diamond-counter { top: 62px; font-size: .8rem; }
  .toasts { top: 106px; }
}

/* live-only motion (not present when the engine snapshots the page) */
@media (prefers-reduced-motion: no-preference) {
  html.sp-live .cloud { animation: drift 40s linear infinite alternate; }
  html.sp-live .sun { animation: bob 6s steps(12) infinite alternate; }
  html.sp-live .card, html.sp-live .btn { transition: transform .15s steps(3); }
  html.sp-live .card:hover { transform: translateY(-6px); }
  html.sp-live .block:hover { transform: translateY(-4px); }
  html.sp-live .slot:hover .ico { animation: hop .5s steps(4) infinite alternate; }
  html.sp-live .block.mined { animation: pop .2s steps(3); }
}
@keyframes drift { to { transform: translateX(60vw); } } @keyframes bob { to { transform: translateY(14px); } }
@keyframes hop { to { transform: translateY(-5px); } } @keyframes pop { from { visibility: visible; transform: scale(1); } to { transform: scale(.3); } }

/* build engine */
#sp-layer { position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; z-index: 60; pointer-events: none; }
.sp-ph { background: rgba(140,140,175,.28) !important; background-image: none !important; box-shadow: none !important; border-color: var(--ink-soft) !important; outline: 1px dashed var(--ink-soft); }
.sp-agent { position: absolute; left: 0; top: 0; width: 30px; height: 30px; image-rendering: pixelated; z-index: 5; will-change: transform; }
.sp-badge { position: absolute; z-index: 6; display: none; font-family: VT323, monospace; font-size: 1.1rem; background: var(--accent); color: #fff; padding: 0 .4rem; }
.sp-fx { position: fixed; inset: 0; pointer-events: none; z-index: 88; }
.sp-ctl { position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 92; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; background: var(--panel); border: 4px solid var(--edge); padding: 6px; max-width: 96vw; }
.sp-ctl button { font-family: Silkscreen; font-size: .75rem; background: var(--bg); color: var(--ink); border: 2px solid var(--edge); padding: .5rem .8rem; min-height: 40px; cursor: pointer; }
.sp-ctl button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* pickaxe cursor */
html.has-cursor, html.has-cursor * { cursor: none !important; }
.sp-cursor { position: fixed; left: 0; top: 0; z-index: 99; pointer-events: none; }
.sp-cursor canvas { display: block; image-rendering: pixelated; transform: rotate(-45deg); transition: transform .12s; }
.sp-cursor.is-link canvas { transform: rotate(-75deg) scale(1.15); filter: drop-shadow(0 0 6px var(--accent)); }
.sp-cursor.swing canvas { animation: swing .22s ease-out; }
@keyframes swing { 0% { transform: rotate(-45deg); } 40% { transform: rotate(10deg); } 100% { transform: rotate(-45deg); } }
.sp-fx2 { position: fixed; inset: 0; pointer-events: none; z-index: 98; }
@media (prefers-reduced-motion: reduce) { .sp-cursor.swing canvas, .sp-cursor canvas { animation: none; transition: none; } }
