@font-face {
  font-family: "Minecraft";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@south-paw/typeface-minecraft@1.0.0/files/minecraft.woff") format("woff");
}

/* ---------- tokens (provisional: no design system yet, see DESIGN.md) ---------- */
:root {
  /* primitives */
  --c-night: #2d2b4d; --c-night-2: #373659; --c-night-3: #444367; --c-night-4: #57567b; /* OKLCH 0.31–0.47, C 0.06, h 285: one violet night family */
  --c-paper: #f4f2f7; --c-ash: #ced0de;
  --c-pink: #e63271; --c-pink-hi: #ff6a9e; --c-pink-lo: #a81e50; --c-pink-ink: #0b0b0e;
  --c-stone: #e6e4df; --c-stone-ink: #16141a; --c-stone-soft: #57525c;
  /* the game's own colours, used only where they are the game's UI */
  --mc-yellow: #ffff55; --mc-gold: #ffaa00; --mc-aqua: #55ffff; --mc-red: #ff5555; --mc-green: #55ff55; --mc-pink: #ff55ff; --mc-grey: #aaaaaa;
  --mc-xp: #80ff20; --mc-gui: #c6c6c6; --mc-slot: #8b8b8b; --mc-dark: #373737; --mc-tip: #100010; --mc-tip-edge: #2d0b63;

  /* roles */
  --tint: var(--c-night);
  --ink: var(--c-paper); --muted: var(--c-ash);
  --accent: var(--c-pink); --on-accent: var(--c-pink-ink);

  --mc: "Minecraft", "Pixelify Sans", system-ui, sans-serif;
  --text: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-mc: 0.09em 0.09em 0 rgb(0 0 0 / 0.42);

  --t-small: 14px;
  --t-body: 17px;
  --t-lead: 20px;
  --t-h3: 32px; /* the Minecraft font's grid: 24 on narrow screens (below) */
  --t-h2: clamp(44px, 5.6vw, 92px);
  --t-giant: min(calc((100vw - 2 * var(--m)) / 4.75), 340px);

  --m: clamp(16px, 3vw, 48px);
  --gap: clamp(20px, 2.4vw, 36px);
  --bar-h: 72px;
  --hud-h: 108px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --dur: 240ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 24px); background: var(--c-night); }
body { margin: 0; color: var(--ink); font: 400 var(--t-body)/1.55 var(--text); overflow-x: clip; }
a { color: inherit; }
img, svg, canvas { display: block; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 3px solid var(--mc-yellow); outline-offset: 3px; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
h1, h2, h3, h4 { font-family: var(--mc); font-weight: 400; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: var(--t-h2); line-height: 0.95; text-shadow: var(--shadow-mc); }
h3 { font-size: var(--t-h3); line-height: 1.05; }
.intro { font-size: var(--t-lead); line-height: 1.45; max-width: 36ch; margin-top: 28px; }
.src, .note, .hint { font-size: var(--t-small); color: var(--muted); max-width: 54ch; }
.src a { color: inherit; }
.skip { position: fixed; left: var(--m); top: 12px; z-index: 90; background: var(--accent); color: var(--on-accent); padding: 10px 14px; font-weight: 600; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip:focus { clip-path: none; width: auto; height: auto; }

/* ---------- the world: tinted backdrop, motes, the player ---------- */
.backdrop { position: fixed; inset: 0; z-index: -1; background-color: var(--tint); background-image: radial-gradient(120% 90% at 85% -15%, rgb(255 238 170 / 0.24), rgb(255 238 170 / 0.08) 45%, transparent 70%); transition: background-color 700ms var(--ease-out); }
/* the far world: real block textures, blurred like a background out of focus; its twin is blurred along the scroll
   and only fades in when you scroll fast (opacity is the only thing that changes) */
.far { position: fixed; left: 0; top: 0; z-index: -1; width: 100%; height: 118vh; pointer-events: none; filter: blur(3.5px); transform: translateY(var(--far-y, 0)); will-change: transform; }
.far-streak { filter: url(#mblur) blur(1.5px); opacity: 0; will-change: transform, opacity; }
/* motion blur on the player: only while the page moves fast, along the scroll; text is never blurred */
.world.mblur > canvas#viewer { filter: url(#mv); }
.motes { position: fixed; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.world { position: fixed; inset: 0; z-index: 2; pointer-events: none; transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.world > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.world.off { opacity: 0; transform: translateY(6vh) scale(0.96); }
.flat { object-fit: contain; padding: 22vh 0 18vh; }
.viewer { opacity: 0; transition: opacity 500ms var(--ease-out); }
.has3d .viewer { opacity: 1; }
.has3d .flat { visibility: hidden; }
.wearing { position: fixed; z-index: 2; left: 0; bottom: calc(var(--hud-h) + 18px); transform: translateX(var(--wx, 50vw)) translateX(-50%); display: flex; gap: 10px; padding: 6px 12px; background: rgb(0 0 0 / 0.42); font: 400 16px/1.25 var(--mc); text-shadow: var(--shadow-mc); white-space: nowrap; pointer-events: none; transition: opacity 400ms var(--ease-out); }
.wearing span + span { color: var(--mc-grey); }
.world.off ~ .wearing, .wearing.moving { opacity: 0; }

/* ---------- bar ---------- */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--bar-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--m); background: var(--tint); transition: background-color 700ms var(--ease-out); }
.mark { display: flex; align-items: center; gap: 10px; font: 400 24px/1 var(--mc); text-decoration: none; text-shadow: var(--shadow-mc); }

/* buttons: the game's bevel, in pink */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: var(--t-body); text-decoration: none; border: 3px solid #000; box-shadow: inset 0 3px 0 var(--c-pink-hi), inset 0 -5px 0 var(--c-pink-lo); transition: transform 120ms var(--ease-out), box-shadow 120ms var(--ease-out), border-color 120ms linear; }
.btn:active { transform: translateY(2px); box-shadow: inset 0 2px 0 var(--c-pink-hi), inset 0 -2px 0 var(--c-pink-lo); }
.btn-s { min-height: 42px; padding: 0 16px; font-size: var(--t-small); }
.btn-dark { background: var(--c-night); color: var(--c-paper); box-shadow: inset 0 3px 0 #3a3a46, inset 0 -5px 0 #000; }
.mc-btn { display: flex; align-items: center; min-height: 48px; padding: 0 18px; background: #6f6f6f; color: #fff; font: 400 16px/1 var(--mc); text-shadow: 2px 2px 0 #3f3f3f; border: 3px solid #000; box-shadow: inset 3px 3px 0 #a8a8a8, inset -3px -4px 0 #474747; transition: border-color 100ms linear, transform 120ms var(--ease-out); }
.mc-btn:active { transform: translateY(2px); }
/* top bar: the Minigames button (the game's grey menu button, so Add me stays the one pink action) beside Add me */
.bar-go { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.mc-btn-s { min-height: 42px; padding: 0 14px; text-decoration: none; }
.bar { gap: 12px; }
@media (max-width: 380px) { /* the smallest phones: the head alone says home (the link keeps its label), buttons a little tighter */
  .mark-t { display: none; }
  .bar-go { gap: 8px; }
  .mc-btn-s, .bar .btn-s { padding: 0 12px; }
}
/* the minigames picker: a screenshot card per game, one level switch and filters (games.js runs both) */
/* v3.40: the minigames page is Minecraft's own inventory. Seventeen games and Classic sit as items in 3 rows of 6 slots on the game's
   grey GUI panel; the filters are creative-mode tabs; hovering an item shows the game's purple tooltip. The item you pick is shown
   big beside it (its picture drifting slowly), and the whole page is lit by a blurred copy of that picture, like ambient light. */
/* the backdrop: a far wall of blocks built from the held game's own colours (games.js draws it: its picture shrunk to 48×30,
   each pixel a block with a lit top edge and a shaded bottom), out of focus and drifting slowly; specks of light float up in
   front of it. Without script, the picture itself, blurred. A violet veil and a darker rim keep it the site's night. */
.mg-amb { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: var(--c-night); }
.mg-amb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(56px) saturate(1.5) brightness(0.5); transform: scale(1.25); }
.mg-amb canvas { position: absolute; inset: -8%; width: 116%; height: 116%; object-fit: cover; image-rendering: pixelated; filter: blur(2.5px) saturate(1.35) brightness(0.62); animation: mg-wall 70s ease-in-out infinite alternate; }
@keyframes mg-wall { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.06) translate(-2.5%, -1.5%); } }
.mg-amb::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 85% 75% at 55% 45%, rgb(45 43 77 / 0.38), rgb(18 16 38 / 0.82)); }
.mg-motes { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
/* the bar: no edge on this page; frosted glass that fades out into the backdrop */
body.mg .bar { background: transparent; }
body.mg .bar::before { content: ""; position: absolute; inset: 0 0 -40px; z-index: -1; background: rgb(30 28 56 / 0.5); -webkit-backdrop-filter: blur(18px) saturate(1.25); backdrop-filter: blur(18px) saturate(1.25); -webkit-mask-image: linear-gradient(#000 52%, transparent); mask-image: linear-gradient(#000 52%, transparent); pointer-events: none; }
.mg-main { box-sizing: border-box; width: min(100%, 1440px); margin: 0 auto; padding: calc(var(--bar-h) + clamp(24px, 4.4vw, 64px)) var(--m) 72px; }
.mg-main .mc-btn { text-decoration: none; }
.mg-hub { --slot: 96px; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "intro stage" "inv stage"; align-items: start; gap: 32px clamp(40px, 5vw, 80px); }
.mg-intro { grid-area: intro; display: flex; flex-direction: column; gap: 16px; max-width: calc(6 * var(--slot) + 52px); }
.mg-h { margin: 0; font: 400 clamp(56px, 7vw, 108px)/0.86 var(--mc); text-shadow: var(--shadow-mc); }
.mg-p { margin: 0; font-size: 18px; line-height: 1.5; color: var(--ink); max-width: 40ch; }

/* the inventory: creative tabs on top of the grey panel */
.mg-inv { grid-area: inv; align-self: end; width: max-content; max-width: 100%; }
.mg-filter { position: relative; z-index: 1; display: flex; gap: 4px; padding: 0 6px; margin-bottom: -3px; }
.mg-filter[hidden] { display: none; }
.mg-filter button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 4px 12px 0; font: 400 15px/1 var(--mc); color: #3f3f3f; background: #8e8e8e; border: 3px solid #000; border-bottom: 0; box-shadow: inset 3px 3px 0 #b5b5b5, inset -3px 0 0 #5e5e5e; cursor: pointer; transform: translateY(5px); transition: transform 160ms var(--ease-out); }
.mg-filter button span { font: 600 12px/1 var(--text); color: #2e2e2e; }
.mg-filter button[aria-pressed="true"] { color: #3f3f3f; background: var(--mc-gui); box-shadow: inset 3px 3px 0 #fff, inset -3px 0 0 #555; transform: none; padding-bottom: 3px; }
.mg-filter button:active { transform: translateY(7px); }
.mg-gui { padding: 12px 14px 16px; background: var(--mc-gui); border: 3px solid #000; box-shadow: inset 4px 4px 0 #fff, inset -4px -4px 0 #555; }
.mg-gui-h { margin: 2px 4px 10px; font: 400 18px/1 var(--mc); color: #3f3f3f; text-shadow: none; }
.mg-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, var(--slot)); gap: 4px; }
.mg-card { position: relative; }
.mg-card .mg-what, .mg-card .mg-tags { display: none; }
.mg-play { position: relative; display: block; width: var(--slot); aspect-ratio: 1; padding: 5px; background: var(--mc-slot); box-shadow: inset 3px 3px 0 var(--mc-dark), inset -3px -3px 0 #fff; cursor: pointer; }
.mg-play img { width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms linear, filter 200ms linear, transform 140ms var(--ease-out); }
/* the item you hold shimmers like an enchanted one: the game's violet glint sweeping across it */
.mg-glint { position: absolute; inset: 5px; z-index: 2; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 200ms linear; }
.mg-glint::before { content: ""; position: absolute; top: 0; left: 0; width: 300%; height: 100%; background: repeating-linear-gradient(115deg, transparent 0 9%, rgb(178 120 255 / 0.5) 13%, rgb(220 190 255 / 0.65) 15%, rgb(178 120 255 / 0.5) 17%, transparent 21% 33.333%); mix-blend-mode: screen; animation: mg-glint 3.2s linear infinite; }
@keyframes mg-glint { from { transform: translateX(-66.666%); } to { transform: translateX(0); } }
.mg-sel .mg-glint { opacity: 1; }
.mg-play::before { content: ""; position: absolute; inset: 5px; z-index: 2; background: #fff; opacity: 0; transition: opacity 90ms linear; } /* the game's hover: a white wash over the slot */
.mg-play::after { content: ""; position: absolute; inset: -5px; border: 4px solid #fff; box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000; z-index: 3; opacity: 0; transform: scale(0.92); transition: opacity 120ms linear, transform 200ms var(--ease-out); pointer-events: none; } /* the hotbar's selection frame */
.mg-sel .mg-play::after { opacity: 1; transform: none; }
.mg-play:focus-visible { outline: 3px solid var(--mc-yellow); outline-offset: 5px; z-index: 3; }
.mg-play:active img { transform: scale(0.96); }
.mg-off .mg-play img { opacity: 0.16; filter: grayscale(1); }
.mg-locked .mg-play img { filter: grayscale(1) brightness(0.55); }
.mg-off .mg-play { cursor: default; }

/* the tooltip, the game's own: near-black with a violet edge */
.mg-tip { position: fixed; left: 0; top: 0; z-index: 60; display: flex; flex-direction: column; gap: 4px; max-width: 300px; padding: 9px 12px 10px; background: rgb(16 0 16 / 0.95); border: 2px solid var(--mc-tip); box-shadow: inset 0 0 0 2px var(--mc-tip-edge); pointer-events: none; transition: opacity 100ms linear; }
.mg-tip[hidden] { display: none; }
.mg-tip-n { font: 400 18px/1.1 var(--mc); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
.mg-tip-w { font: 400 14px/1.4 var(--text); color: var(--mc-grey); }
.mg-tip-t { font: 600 13px/1.3 var(--text); color: var(--mc-aqua); }

/* the item in your hand: its picture big, its name, its line, Play */
.mg-stage { grid-area: stage; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.mg-view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: clamp(14px, 1.6vw, 22px); background: #0d0c1c; isolation: isolate; }
.mg-view-i { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: mg-drift 18s ease-in-out infinite alternate; }
@keyframes mg-drift { from { transform: scale(1.02); } to { transform: scale(1.09) translate(-1.6%, -1.2%); } }
/* the clip: over the still picture, faded in once it plays */
.mg-view-v, .mg-slot-v { position: absolute; z-index: 1; object-fit: cover; opacity: 0; transition: opacity 320ms var(--ease-out); pointer-events: none; }
.mg-view-v { inset: 0; width: 100%; height: 100%; }
.mg-slot-v { inset: 5px; width: calc(100% - 10px); height: calc(100% - 10px); }
.mg-view-v.on, .mg-slot-v.on { opacity: 1; }
.mg-info { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.mg-name { margin: 0; font: 400 clamp(40px, 4.6vw, 76px)/0.95 var(--mc); text-shadow: var(--shadow-mc); }
.mg-line { margin: 0; max-width: 46ch; font-size: 19px; line-height: 1.45; color: var(--ink); }
.mg-meta, .mg-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font: 600 15px/1.4 var(--text); color: var(--muted); }
.mg-meta li[hidden], .mg-tags li[hidden] { display: none; }
.mg-meta li:not([hidden]) ~ li:not([hidden])::before { content: "·"; margin: 0 9px; color: var(--c-night-4); }
.mg-two { color: var(--mc-pink); }
.mg-3dv, .mg-pc { color: var(--mc-aqua); }
.mg-best { color: var(--mc-gold); }
.mg-by { color: var(--mc-green); }
.mg-go { min-height: 62px; margin-top: 10px; padding: 0 44px; font: 400 26px/1 var(--mc); }
.mg-go[aria-disabled="true"] { pointer-events: none; color: var(--mc-yellow); background: #2a2a2a; box-shadow: inset 0 3px 0 #444, inset 0 -5px 0 #111; font-size: 20px; }

@media (hover: hover) and (pointer: fine) {
  .mg-card:not(.mg-off) .mg-play:hover::before { opacity: 0.32; }
  .mg-filter button:not([aria-pressed="true"]):hover { transform: translateY(2px); }
}
/* smaller computers: smaller slots */
@media (max-width: 1240px) { .mg-hub { --slot: 84px; } }
/* tablets and phones: one column; the picture first, then the inventory, its slots as wide as the screen allows */
@media (max-width: 1023px) {
  .mg-hub { --slot: min(104px, calc((100vw - 2 * var(--m) - 34px - 20px) / 6)); grid-template-columns: minmax(0, 1fr); grid-template-areas: "intro" "stage" "inv"; gap: 28px; }
  .mg-intro { max-width: none; }
  .mg-inv { justify-self: start; }
  .mg-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 24px; }
}
@media (max-width: 600px) {
  .mg-h { font-size: 58px; }
  .mg-p { font-size: 17px; }
  .mg-stage { display: flex; align-items: stretch; gap: 16px; }
  .mg-name { font-size: 36px; }
  .mg-line { font-size: 17px; }
  .mg-meta { font-size: 14px; }
  .mg-go { min-height: 54px; font-size: 22px; padding: 0 36px; }
  .mg-gui { padding: 10px 10px 12px; }
  .mg-filter { overflow-x: auto; scrollbar-width: none; max-width: calc(100vw - 2 * var(--m)); padding: 0 4px; }
  .mg-filter::-webkit-scrollbar { display: none; }
  .mg-filter button { flex: none; padding: 4px 10px 0; font-size: 14px; }
  .mg-play { padding: 4px; }
  .mg-play::before, .mg-glint { inset: 4px; }
  .mg-slot-v { inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
}

/* the menu: the game's picture on the left, the choices as filled buttons on the right */
.mg-sheet { width: min(820px, calc(100% - 24px)); max-height: calc(100svh - 24px); padding: 0; overflow: auto; color: var(--c-paper); background: var(--c-night-2); border: 3px solid #000; box-shadow: 0 28px 90px rgb(0 0 0 / 0.55); }
.mg-sheet::backdrop { background: rgb(12 11 26 / 0.8); }
.mg-sheet[open] { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); animation: mg-sheet-in 240ms var(--ease-out); }
.mg-sheet[open]::backdrop { animation: mg-fade 200ms var(--ease-out); }
@keyframes mg-sheet-in { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
@keyframes mg-fade { from { opacity: 0; } }
.mg-sheet-shot { position: relative; min-height: 100%; background: #0d0c1c; }
.mg-sheet-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mg-sheet-body { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 3vw, 32px); }
.mg-sheet-h { margin: 0; font: 400 clamp(28px, 3.6vw, 38px)/1 var(--mc); text-shadow: var(--shadow-mc); }
.mg-sheet-what { margin: -8px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); }
.mg-pick { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mg-pick[hidden] { display: none; }
.mg-pick-l { font: 600 14px/1 var(--text); color: var(--muted); }
.mg-pick-o { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.mg-pick label, .mg-map-o label { position: relative; display: block; }
.mg-pick label[hidden] { display: none; }
.mg-pick input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mg-pick-o label span { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; height: 100%; min-height: 52px; padding: 6px 8px; text-align: center; line-height: 1.15; font: 400 16px/1 var(--mc); color: var(--c-paper); background: var(--c-night-3); transition: background-color 140ms linear, transform 140ms var(--ease-out); }
.mg-pick-o label span small { font: 400 12px/1 var(--text); color: var(--muted); }
.mg-pick-o input:checked + span { color: var(--c-stone-ink); background: var(--lv, var(--c-paper)); }
.mg-pick-o input:checked + span small { color: rgb(22 20 26 / 0.72); }
.mg-pick-o input:active + span { transform: scale(0.97); }
.mg-pick input:focus-visible + span, .mg-map-o input:focus-visible ~ img { outline: 3px solid var(--mc-yellow); outline-offset: 2px; }
.mg-lv label:nth-of-type(1) { --lv: var(--mc-green); }
.mg-lv label:nth-of-type(2) { --lv: var(--mc-yellow); }
.mg-lv label:nth-of-type(3) { --lv: var(--mc-red); }
.mg-map-o { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; }
.mg-map-o img { display: block; width: 100%; aspect-ratio: 16 / 10; height: auto; object-fit: cover; opacity: 0.62; transition: opacity 140ms linear; }
.mg-map-o span { display: block; padding: 7px 0 0; font: 400 15px/1 var(--mc); color: var(--muted); }
.mg-map-o input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mg-map-o input:checked ~ img { opacity: 1; box-shadow: 0 0 0 3px var(--mc-yellow); }
.mg-map-o input:checked ~ span { color: var(--mc-yellow); }
.mg-sheet-rec { margin: 0; font: 400 16px/1.3 var(--mc); color: var(--mc-gold); }
.mg-sheet-rec[hidden] { display: none; }
.mg-sheet-go { display: flex; gap: 10px; margin-top: auto; padding-top: 4px; }
.mg-sheet-go .mc-btn { justify-content: center; }
.mg-sheet-play { flex: 1; font: 400 22px/1 var(--mc); }
.mg-sheet-play[hidden] { display: none; }
@media (hover: hover) and (pointer: fine) {
  .mg-pick-o label:hover input:not(:checked) + span { background: var(--c-night-4); }
  .mg-map-o label:hover img { opacity: 0.9; }
}
@media (max-width: 680px) {
  .mg-sheet[open] { grid-template-columns: minmax(0, 1fr); }
  .mg-sheet-shot { min-height: 0; aspect-ratio: 16 / 7; }
}
@media (prefers-reduced-motion: reduce) {
  .mg-view-i, .mg-glint::before, .mg-amb canvas, .mg-sheet[open], .mg-sheet[open]::backdrop { animation: none; }
  .mg-motes { display: none; }
  .mg-glint { display: none; }
  .mg-amb img, .mg-play::after, .mg-filter button, .mg-pick-o label span { transition: none; }
}
/* the game fills the screen; taps never scroll, zoom or select */
.stage { position: fixed; inset: 0; z-index: 100; background: #0d0c1c; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; }
.stage[hidden] { display: none; }
.stage:focus { outline: none; }
.stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
/* Block Tag 3D draws its world on a canvas under the game's text canvas */
.stage .mg-3d { background: #86b2ff; }
.mg-exit { position: absolute; left: 8px; top: calc(50% - 21px); }
@media (orientation: landscape) { .mg-exit { left: calc(50% - 34px); top: 8px; } }
/* Last Block's grid and Block Tag's arena fill the middle of a phone: Exit goes to the top corner, clear of the game */
@media (orientation: portrait) { .stage[data-game="block"] .mg-exit, .stage[data-game="tag"] .mg-exit, .stage[data-game="colour"] .mg-exit, .stage[data-game="crowd"] .mg-exit, .stage[data-game="king"] .mg-exit, .stage[data-game="rails"] .mg-exit, .stage[data-game="tnt"] .mg-exit { top: 8px; } }
/* Lava Climb's two shafts sit side by side: Exit goes to the top, between them */
.stage[data-game="lava"] .mg-exit { left: calc(50% - 34px); top: 8px; }
.stage[data-game="chess"] .mg-exit, .stage[data-game="throne"] .mg-exit, .stage[data-game="spike"] .mg-exit { left: 8px; top: 8px; }
body.playing { overflow: hidden; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .mc-btn:hover { border-color: #fff; }
}

/* ---------- hero: the player stands in front of the name ---------- */
.hero { position: relative; min-height: 100svh; padding: var(--bar-h) var(--m) calc(var(--hud-h) + 24px); display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: var(--gap); }
.hero h1 { position: absolute; inset: var(--bar-h) 0 auto; height: calc(100svh - var(--bar-h) - var(--hud-h)); pointer-events: none; }
.giant { position: absolute; left: 50%; top: 40%; z-index: 1; transform: translate(-50%, -50%); font-size: var(--t-giant); line-height: 0.8; white-space: nowrap; letter-spacing: -0.02em; text-shadow: 0.06em 0.06em 0 rgb(0 0 0 / 0.35); }
.sub { position: absolute; z-index: 3; right: var(--m); top: calc(40% + var(--t-giant) * 0.5 + 18px); font: 400 24px/1.2 var(--mc); text-shadow: var(--shadow-mc); }
.splash { position: absolute; z-index: 3; right: calc(50% - var(--t-giant) * 2.05); top: calc(var(--bar-h) + 13svh); color: var(--mc-yellow); font: 400 clamp(20px, 2.2vw, 34px)/1 var(--mc); text-shadow: 0.12em 0.12em 0 #3f3f15; transform: rotate(-17deg); animation: splash 0.5s ease-in-out infinite alternate; pointer-events: none; }
@keyframes splash { to { transform: rotate(-17deg) scale(1.09); } }
.hero-foot, .facts { position: relative; z-index: 3; }
.lead { font-size: var(--t-lead); line-height: 1.45; max-width: 32ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 24px; }
.uuid { font-size: var(--t-small); color: var(--muted); text-align: left; overflow-wrap: anywhere; transition: color var(--dur) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .uuid:hover { color: var(--ink); } }
.facts { justify-self: end; display: grid; justify-items: end; gap: 6px; font-size: var(--t-small); color: var(--muted); text-align: right; }
.facts b { color: var(--ink); font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; background: var(--accent); margin-right: 8px; }

/* ---------- chapters: text on one side, the player on the other ---------- */
.chapter { position: relative; z-index: 3; padding: 16vh var(--m) 8vh; }
.chapter .col { width: min(46vw, 660px); }
.side-r .col { margin-left: auto; }

/* chat, as in game */
.chat { margin-top: 40px; display: grid; font: 400 16px/1.3 var(--mc); text-shadow: 2px 2px 0 rgb(0 0 0 / 0.5); }
.chat li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 5px 10px; background: rgb(0 0 0 / 0.42); }
.chat .msg { color: #fff; overflow-wrap: anywhere; }
.chat b { font-weight: 400; color: var(--mc-yellow); }
.chat .sys .msg { color: var(--mc-yellow); }
.chat time { flex: none; font: 400 var(--t-small)/1 var(--text); color: var(--mc-grey); text-shadow: none; }

/* inventory, as in game */
.gui { position: relative; margin-top: 28px; background: var(--mc-gui); padding: 14px 14px 16px; border: 3px solid; border-color: #fff #555 #555 #fff; outline: 3px solid #000; }
.gui-title { font-size: var(--t-body); color: #404040; margin: 0 0 10px 2px; }
.inv { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); }
.slot { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: var(--mc-slot); border: 3px solid; border-color: var(--mc-dark) #fff #fff var(--mc-dark); transition: background-color 80ms linear; }
.slot img { width: 72%; height: 72%; object-fit: contain; transition: transform 160ms var(--ease-out); }
.slot:active img { transform: scale(0.86); }
.slot[aria-pressed="true"] { background: #a6a6a6; outline: 3px solid #fff; outline-offset: -1px; z-index: 1; }
.slot.carried::after { content: ""; position: absolute; top: 2px; right: 2px; width: 7px; height: 7px; background: var(--accent); }
@media (hover: hover) and (pointer: fine) { .slot:hover { background: #b8b8b8; } }
.note { margin-top: 20px; }

/* tooltips, as in game */
.tip { background: rgb(16 0 16 / 0.95); border: 3px solid var(--mc-tip-edge); outline: 2px solid var(--mc-tip); padding: 10px 14px 12px; color: #fff; font-family: var(--mc); text-shadow: 2px 2px 0 rgb(0 0 0 / 0.6); }
.tip h4 { font-size: 16px; line-height: 1.2; margin-bottom: 6px; }
.tip p, .tip li { font-size: 16px; color: var(--mc-grey); }
.tip.float { position: absolute; z-index: 5; left: 0; top: 0; min-width: 190px; max-width: 250px; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out); }
.tip.float.on { opacity: 1; transform: none; }

/* the account now: name tags */
.events { margin-top: 48px; }
.ev { min-height: 30vh; display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.ev.skin { min-height: 21vh; }
.render { flex: none; width: 72px; height: 144px; opacity: 0.35; transition: opacity 400ms var(--ease-out); }
.ev.on .render { opacity: 1; }
.ev h3 { font-size: 32px; line-height: 1.1; }
@media (min-width: 1280px) { .ev h3 { font-size: 40px; } }
.ev.skin h3 { font-size: 24px; }
.ev.skin .render { width: 56px; height: 112px; }
.plate { display: inline; padding: 0.04em 0.22em 0.08em; background: rgb(0 0 0 / 0.28); color: var(--muted); text-shadow: var(--shadow-mc); box-decoration-break: clone; -webkit-box-decoration-break: clone; overflow-wrap: anywhere; transition: color 300ms var(--ease-out), background-color 300ms var(--ease-out); }
.ev.on .plate { color: #fff; background: rgb(0 0 0 / 0.5); }
.ev.now.on .plate { color: var(--mc-yellow); }
.ev .when { margin: 8px 0 4px; font: 400 16px/1.3 var(--mc); color: var(--muted); }
.ev.on .when { color: var(--ink); }
.ev-text p:last-child { max-width: 34ch; font-size: var(--t-lead); line-height: 1.45; }

/* capes: each one an item tooltip */
.rack { margin-top: 40px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cape { width: 100%; height: 100%; display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 10px 12px 12px 10px; background: rgb(16 0 16 / 0.92); border: 3px solid var(--mc-tip-edge); outline: 2px solid var(--mc-tip); color: #fff; transition: border-color 140ms linear, transform 160ms var(--ease-out); }
.cape-slot { flex: none; width: 46px; height: 62px; display: grid; place-items: center; background: var(--mc-slot); border: 3px solid; border-color: var(--mc-dark) #fff #fff var(--mc-dark); }
.cape-slot img { width: 24px; height: 38px; }
.cape-text { display: grid; gap: 3px; min-width: 0; }
.cape b { font: 400 16px/1.15 var(--mc); text-shadow: 2px 2px 0 rgb(0 0 0 / 0.6); }
.cape .owners { font: 400 16px/1.2 var(--mc); color: var(--mc-grey); }
.cape .origin { font-size: 15px; line-height: 1.4; color: #e7e3ee; }
.cape:active { transform: scale(0.98); }
.cape[aria-pressed="true"] { border-color: var(--mc-gold); }
.cape[aria-pressed="true"] b { color: var(--mc-gold); }
@media (hover: hover) and (pointer: fine) { .cape:hover { border-color: #6a3fd1; } }
.capes .src { margin-top: 24px; }

/* ---------- SkyBlock: a stone field with a stepped top ---------- */
.sky-sec { position: relative; z-index: 3; margin-top: 0; background: var(--c-stone); color: var(--c-stone-ink); padding: calc(28px + clamp(56px, 8vw, 120px)) var(--m) clamp(80px, 9vw, 140px); clip-path: var(--edge); }
.sky-sec .src, .sky-sec .hint { color: var(--c-stone-soft); }
.sky-sec h2 { text-shadow: 0.09em 0.09em 0 rgb(0 0 0 / 0.12); }
.sky-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 30ch); gap: clamp(32px, 4vw, 64px) var(--gap); align-items: end; }
.sky-head h2 { grid-column: 1 / -1; }
.figure { font: 400 clamp(84px, 17vw, 300px)/0.8 var(--mc); letter-spacing: -0.02em; white-space: nowrap; text-shadow: 0.05em 0.05em 0 rgb(0 0 0 / 0.12); }
.figure-say { font-size: var(--t-lead); line-height: 1.4; }
.sky-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 80px); margin-top: clamp(64px, 8vw, 120px); align-items: start; }
.skills-wrap h3 { font-size: var(--t-h3); }
.skills-wrap .hint { margin-top: 8px; }
.skills { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px var(--gap); }
.skills li { display: grid; gap: 4px; }
.sk-name { font-size: var(--t-body); font-weight: 600; }
.xp { position: relative; display: grid; justify-items: center; }
.xp-lv { font: 400 24px/1 var(--mc); color: var(--mc-xp); text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000; margin-bottom: -4px; position: relative; z-index: 1; }
.xp-bar { position: relative; width: 100%; aspect-ratio: 182 / 5; background: url(mc/xp_bg.png) 0 0 / 100% 100%; image-rendering: pixelated; }
.xp-fill { position: absolute; inset: 0; background: url(mc/xp_fill.png) 0 0 / 100% 100%; image-rendering: pixelated; clip-path: inset(0 calc(100% - var(--p) * 100%) 0 0); }
.js .skills:not(.in) .xp-fill { clip-path: inset(0 100% 0 0); }
.skills.in .xp-fill { transition: clip-path 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 45ms); }

/* the SkyBlock scoreboard, as in game */
.board { background: rgb(18 18 22 / 0.9); color: #fff; padding: 14px 18px 18px; font-family: var(--mc); text-shadow: 2px 2px 0 rgb(0 0 0 / 0.6); position: sticky; top: calc(var(--bar-h) + 24px); }
.board-title { text-align: center; color: var(--mc-yellow); font-size: 22px; letter-spacing: 0.04em; }
.board-second { margin-top: 22px; padding-top: 16px; border-top: 2px solid rgb(255 255 255 / 0.12); }
.board-sub { text-align: center; color: #8e8e8e; font-size: var(--t-small); margin: 4px 0 14px; }
.board ul { display: grid; gap: 6px; font-size: 16px; }
.board b { font-weight: 400; }
.c-gold { color: var(--mc-gold); } .c-aqua { color: var(--mc-aqua); } .c-red { color: var(--mc-red); } .c-green { color: var(--mc-green); } .c-pink { color: var(--mc-pink); }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: clamp(56px, 6vw, 96px); align-items: start; }
.tips ul { display: grid; gap: 6px; }
.tips li { display: flex; justify-content: space-between; gap: 14px; }
.tips li span:first-child { color: #fff; }
.tips li span:last-child { text-align: right; }
.r-leg { color: var(--mc-gold) !important; }
.r-myth { color: var(--mc-pink) !important; }
.sky-sec > .src { margin-top: 40px; }
.sky-old { margin-top: clamp(72px, 9vw, 140px); padding-top: clamp(40px, 5vw, 64px); border-top: 3px solid rgb(22 20 26 / 0.12); }

/* ---------- servers: the multiplayer list ---------- */
.servers { position: relative; z-index: 3; background: transparent; padding: clamp(96px, 12vw, 180px) var(--m) 0; }
.srv-list { display: grid; gap: 6px; margin-top: 48px; }
/* hover: a dark layer fades in under the card (opacity only), slower in than a click so it reads as a dim, not a cut */
.srv { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px 18px 22px; background: rgb(255 255 255 / 0.04); border: 2px solid transparent; transition: border-color 420ms var(--ease-out); }
.srv::before { content: ''; position: absolute; inset: 0; z-index: -1; background: rgb(6 6 10 / 0.86); opacity: 0; transition: opacity 420ms var(--ease-out); pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .srv:hover { border-color: rgb(128 128 128 / 0.8); } .srv:hover::before { opacity: 1; } }
.motd-live { display: block; width: min(100%, 610px); background: #000; outline: 2px solid #808080; outline-offset: -2px; }
.motd-live img { display: block; width: 100%; height: auto; aspect-ratio: 1220 / 128; }
@media (hover: hover) and (pointer: fine) { .motd-live:hover { outline-color: #fff; } }
.srv-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 40px; align-items: start; }
.srv h3 { grid-column: 1 / -1; font-size: var(--t-h3); text-shadow: var(--shadow-mc); }
.motd { font: 400 16px/1.4 var(--mc); color: var(--mc-grey); text-shadow: 2px 2px 0 rgb(0 0 0 / 0.5); max-width: 46ch; }
.srv-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; font-size: var(--t-small); color: var(--muted); }
.srv-figs b { display: block; font: 400 var(--t-h3)/1.1 var(--mc); color: #fff; text-shadow: var(--shadow-mc); }
.srv-figs.addr { grid-template-columns: 1fr; }
.srv-figs.towns b { font-size: clamp(20px, 2.2vw, 28px); }
.srv-figs.towns { grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; align-items: baseline; }
.srv-figs.towns li { display: contents; }
.srv-figs.towns b { display: block; }
.motd-off { width: min(100%, 610px); aspect-ratio: 1220 / 128; display: grid; align-content: center; gap: 4px; padding: 0 4.5%; background: #000; outline: 2px solid #808080; outline-offset: -2px; font: 400 16px/1.2 var(--mc); }
.motd-off b { font-weight: 400; color: #fff; }
.motd-off span { color: #aa0000; }
.srv-lines { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.motd-off b, .motd-off span { overflow-wrap: anywhere; }
.srv-old { grid-column: 1 / -1; margin-top: 6px; }
.srv-old h4 { font: 400 16px/1.3 var(--mc); color: var(--muted); margin-bottom: 8px; }
.srv h3 small { font-size: 0.5em; color: var(--muted); text-shadow: none; margin-left: 0.4em; vertical-align: middle; }
.copy { text-align: left; transition: transform 120ms var(--ease-out); }
.copy:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .copy:hover b, .reach .copy:hover { color: var(--mc-yellow); } }
.srv .embed { grid-column: 1 / -1; margin-top: 8px; }
.servers > .src { margin-top: 24px; }

/* embeds */
.embed iframe { display: block; width: 100%; max-width: 480px; border: 0; background: var(--c-night-3); margin-bottom: 4px; }
.fb { display: flex; justify-content: space-between; gap: 16px; max-width: 480px; padding: 14px 16px; background: rgb(255 255 255 / 0.06); text-decoration: none; transition: background-color 120ms linear; }
.fb .go { color: var(--muted); font-size: var(--t-small); }
@media (hover: hover) and (pointer: fine) { .fb:hover { background: rgb(255 255 255 / 0.12); } }

/* ---------- add me: the chat bar over every skin ---------- */
.add { position: relative; z-index: 3; background: var(--c-night); padding-top: clamp(96px, 12vw, 180px); display: grid; }
.crowd { grid-area: 1 / 1; width: 100%; height: 100%; min-height: 92svh; object-fit: cover; }
.add-panel { grid-area: 1 / 1; align-self: center; justify-self: center; width: min(720px, calc(100% - 2 * var(--m))); margin: 48px 0; background: rgb(10 10 14 / 0.9); padding: clamp(24px, 3vw, 40px); display: grid; gap: 22px; outline: 3px solid #000; }
.add-panel h2 { font-size: var(--t-h2); }
.chatbar { display: flex; align-items: center; width: 100%; min-height: 64px; padding: 0 8px 0 16px; background: rgb(0 0 0 / 0.6); border: 2px solid #5a5a5a; font: 400 24px/1 var(--mc); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; text-align: left; transition: border-color 120ms linear; }
.chatbar .caret { animation: caret 1s steps(1) infinite; }
.chatbar .enter { margin-left: auto; padding: 10px 14px; background: var(--accent); color: var(--on-accent); font: 600 var(--t-small)/1 var(--text); text-shadow: none; border: 2px solid #000; }
@keyframes caret { 50% { opacity: 0; } }
@media (hover: hover) and (pointer: fine) { .chatbar:hover { border-color: #fff; } }
.chatbar:active { transform: translateY(1px); }
.reach { display: grid; gap: 4px; }
.reach li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 14px; background: rgb(255 255 255 / 0.06); }
.reach li > span { font-size: var(--t-small); color: var(--muted); }
.reach a, .reach .copy { font: 400 16px/1.2 var(--mc); text-decoration: none; }
.else { font-size: var(--t-small); color: var(--muted); }

/* ---------- crafty: a wardrobe of heads drives one live card ---------- */
.crafty { position: relative; z-index: 3; background: transparent; padding: clamp(96px, 12vw, 180px) var(--m) clamp(24px, 3vw, 48px); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap) clamp(32px, 5vw, 96px); align-items: start; }
.crafty .embed { margin-top: 28px; }
.crafty-r { background: rgb(0 0 0 / 0.35); padding: clamp(16px, 2vw, 24px); outline: 3px solid #000; }
.wardrobe { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; }
.wslot { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: rgb(139 139 139 / 0.35); border: 3px solid; border-color: #555 #2a2a2a #2a2a2a #555; transition: background-color 80ms linear, transform 140ms var(--ease-out); }
.wslot img { width: 70%; height: 70%; }
.wslot:active { transform: scale(0.92); }
.wslot[aria-pressed="true"] { outline: 3px solid #fff; outline-offset: -1px; background: rgb(160 160 160 / 0.5); position: relative; z-index: 1; }
@media (hover: hover) and (pointer: fine) { .wslot:hover { background: rgb(200 200 200 / 0.45); } }
.pick-now { margin-top: 16px; font: 400 24px/1.2 var(--mc); text-shadow: var(--shadow-mc); }
.crafty-r .embed { margin-top: 14px; }
.noframes .embed iframe { display: none; }

/* ---------- footer: the page turns pink, he waves ---------- */
.end { position: relative; min-height: 100svh; color: var(--on-accent); overflow: hidden; padding: calc(var(--bar-h) + clamp(40px, 6vw, 96px)) var(--m) 0; display: flex; flex-direction: column; }
.end-top { position: relative; z-index: 3; display: flex; justify-content: space-between; gap: var(--gap); align-items: flex-start; flex-wrap: wrap; }
.end-h { font: 400 var(--t-h2)/0.95 var(--mc); max-width: 9ch; margin-bottom: 32px; }
.end-links { display: grid; gap: 10px; font-size: var(--t-lead); justify-items: start; }
.end-links a, .end-links button { text-decoration: none; font-weight: 600; text-align: left; }
@media (hover: hover) and (pointer: fine) { .end-links a:hover, .end-links button:hover { text-decoration: underline; text-underline-offset: 4px; } }
.end :focus-visible { outline-color: var(--c-night); }
.fine { position: relative; z-index: 3; margin-top: 8px; padding: 0; max-width: min(46vw, calc(50vw - var(--m) - 220px)); flex-direction: column; gap: 4px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-size: var(--t-small); }
.huge { position: relative; z-index: 1; font: 400 26vw/0.8 var(--mc); white-space: nowrap; letter-spacing: -0.02em; margin: auto 0 calc(var(--hud-h) - 0.1em) -0.04em; text-shadow: 0.05em 0.05em 0 rgb(0 0 0 / 0.18); }

/* ---------- HUD: hotbar and XP bar at the bottom, as in game ---------- */
/* depth: whatever passes under the HUD goes soft, like the near edge of a shallow focus */
.hud-veil { position: fixed; inset: auto 0 0; z-index: 44; height: calc(var(--hud-h) + 40px); pointer-events: none; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); -webkit-mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.85) 35%, rgb(0 0 0 / 0.35) 70%, transparent); mask-image: linear-gradient(to top, #000 0%, rgb(0 0 0 / 0.85) 35%, rgb(0 0 0 / 0.35) 70%, transparent); background: linear-gradient(to top, rgb(0 0 0 / 0.14), transparent 75%); }
.hud { position: fixed; z-index: 45; left: 50%; bottom: 14px; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; }
.hud-name { min-height: 22px; font: 400 16px/1.25 var(--mc); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; opacity: 0; transition: opacity 300ms linear; }
.hud-name.on { opacity: 1; }
.hud { --s: 2.75px; }
.xp-hud { position: relative; width: calc(122 * var(--s)); height: calc(5 * var(--s)); background: url(mc/xp6_bg.png) 0 0 / 100% 100%; image-rendering: pixelated; }
.xp-hud-fill { position: absolute; inset: 0; background: url(mc/xp6_fill.png) 0 0 / 100% 100%; image-rendering: pixelated; clip-path: inset(0 100% 0 0); }
.hotbar { display: flex; width: calc(122 * var(--s)); height: calc(22 * var(--s)); padding: var(--s); background: url(mc/hotbar6.png) 0 0 / 100% 100%; image-rendering: pixelated; }
.hotbar li { display: flex; }
.hotbar a { position: relative; display: grid; place-items: center; width: calc(20 * var(--s)); height: calc(20 * var(--s)); }
.hotbar a > * { transition: transform 140ms var(--ease-out); }
.hotbar a::before { content: ""; position: absolute; left: calc(-2 * var(--s)); top: calc(-2 * var(--s)); width: calc(24 * var(--s)); height: calc(23 * var(--s)); background: url(mc/hotbar_selection.png) 0 0 / 100% 100%; image-rendering: pixelated; opacity: 0; z-index: 1; pointer-events: none; }
.hotbar a.on::before { opacity: 1; }
.hotbar a:active > * { transform: scale(0.9); }
.hotbar a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .hotbar a:hover > * { transform: scale(1.12); } }

/* ---------- toast ---------- */
.toast { position: fixed; z-index: 60; top: calc(var(--bar-h) + 12px); right: var(--m); display: flex; gap: 14px; align-items: center; padding: 12px 18px 12px 12px; background: #212121; color: #fff; border: 3px solid #000; outline: 2px solid #555; outline-offset: -5px; opacity: 0; transform: translateX(min(24px, calc(var(--m) - 2px))); pointer-events: none; transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out); } /* hidden, it waits just inside the screen edge so phones never scroll sideways */
.toast.on { opacity: 1; transform: none; }
.toast b { display: block; font: 400 var(--t-body)/1.2 var(--mc); color: var(--mc-yellow); }
.toast span { font-size: var(--t-small); }

/* ---------- entrances (content stays visible without script) ---------- */
.js .rise { opacity: 0; transform: translateY(28px); }
.js .rise.in { opacity: 1; transform: none; transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js .chat li { opacity: 0; transform: translateX(-14px); }
.js .chat.in li { opacity: 1; transform: none; transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out); transition-delay: calc(var(--i, 0) * 120ms); }
.js .giant { animation: rise-in 900ms var(--ease-out) both; }
@keyframes rise-in { from { opacity: 0; transform: translate(-50%, -38%); } }

/* ---------- tablet and phone ---------- */
@media (max-width: 1099px) {
  .rack, .tips { grid-template-columns: 1fr; }
  .srv-body { grid-template-columns: minmax(0, 1fr); } /* minmax: a long address may not widen the card past the screen */
}
@media (max-width: 859px) {
  :root { --bar-h: 60px; --hud-h: 92px; }
  .mark { font-size: 16px; }
  .world { inset: var(--bar-h) 0 auto; height: 50svh; transition: opacity 400ms var(--ease-out); }
  .world.band { height: 112px; z-index: 35; background: var(--tint); transition: background-color 700ms var(--ease-out); }
  .world.band ~ .wearing { z-index: 36; top: calc(var(--bar-h) + 34px); bottom: auto; left: 104px; right: var(--m); transform: none; display: grid; gap: 2px; background: none; padding: 0; font-size: 16px; white-space: normal; }
  .wearing { bottom: auto; top: calc(var(--bar-h) + 50svh - 34px); }
  .world.off { transform: none; }
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--bar-h) + 50svh + 8px); align-items: start; }
  .hero h1 { height: 50svh; }
  .giant { top: 44%; }
  .sub { left: var(--m); right: auto; top: calc(100% + 4px); font-size: 17px; }
  .splash { right: calc(var(--m) + 10px); top: calc(var(--bar-h) + 22svh - var(--t-giant) * 0.85); font-size: 18px; }
  .hero-foot { padding-top: 40px; }
  .facts { justify-self: start; justify-items: start; text-align: left; }
  .chapter { padding: 96px var(--m) 72px; }
  .chapter .col { width: 100%; }
  .ev { min-height: 0; padding: 18px 0; align-items: flex-start; }
  .render { width: 52px; height: 104px; }
  .ev.skin .render { width: 40px; height: 80px; }
  .sky-head, .sky-grid { grid-template-columns: 1fr; }
  .figure { font-size: 21vw; }
  .board { position: static; }
  .skills { grid-template-columns: 1fr 1fr; gap: 20px; }
  .crafty { grid-template-columns: 1fr; }
  .fine { max-width: 62ch; margin-top: 28px; }
  .wardrobe { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .hud { --s: 2.3px; }
  .hotbar a img, .hotbar a svg { width: 24px; height: auto; }
  html.banded { scroll-padding-top: calc(var(--bar-h) + 128px); }
}
@media (max-width: 480px) {
  .skills { grid-template-columns: 1fr; }
  .chat li { flex-direction: column; gap: 2px; }
  .reach li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .end-h { font-size: 13vw; }
  .fine { max-width: none; }
  .huge { font-size: 34vw; }
  .ev { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation: none !important; }
  .js .rise, .js .chat li { transform: none; }
  .far { transform: none; } .far-streak { display: none; } .world.mblur > canvas#viewer { filter: none; }
}

/* ---------- dark GUI skin from Skyblock Dark UI (CC BY-SA 4.0, see data/packs/CREDITS.md),
   drawn with nine-slice borders the way the game scales its own panels ---------- */
:root { --ui-s: 2px; } /* one texture pixel */
.gui, .board, .add-panel, .crafty-r, .toast { border: calc(6 * var(--ui-s)) solid transparent; border-image: url(mc/ui_panel.png) 6 fill / calc(6 * var(--ui-s)) / 0 stretch; image-rendering: pixelated; background: none; outline: none; }
.gui-title { color: #bdbdbd; }
.slot, .wslot { border: 0; background: url(mc/ui_slot.png) 0 0 / 100% 100%; image-rendering: pixelated; }
.slot[aria-pressed="true"], .wslot[aria-pressed="true"] { background: url(mc/ui_slot.png) 0 0 / 100% 100%; box-shadow: inset 0 0 0 100vmax rgb(255 255 255 / 0.16); }
@media (hover: hover) and (pointer: fine) { .slot:hover, .wslot:hover { background: url(mc/ui_slot.png) 0 0 / 100% 100%; box-shadow: inset 0 0 0 100vmax rgb(255 255 255 / 0.12); } }
.mc-btn { background: none; box-shadow: none; border: calc(3 * var(--ui-s)) solid transparent; border-image: url(mc/ui_button.png) 3 fill / calc(3 * var(--ui-s)) / 0 stretch; image-rendering: pixelated; }
@media (hover: hover) and (pointer: fine) { .mc-btn:hover { border-image-source: url(mc/ui_button_hover.png); } }
.mc-btn:focus-visible { border-image-source: url(mc/ui_button_hover.png); }

/* ---------- lite (phones, touch screens, data saver, low memory; class set in <head>) ----------
   Same look, cheaper to draw: the far world is a quarter-size canvas scaled up smoothly (that is the blur),
   no SVG motion blur, no backdrop blur under the HUD, and the motes are CSS squares moved by the compositor. */
.lite .far { filter: none; }
.lite .far-streak, .lite .motes { display: none; }
.lite .world.mblur > canvas#viewer { filter: none; }
.lite .hud-veil { -webkit-backdrop-filter: none; backdrop-filter: none; background: linear-gradient(to top, rgb(0 0 0 / 0.26), rgb(0 0 0 / 0.1) 55%, transparent); }
.motes-lite { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.motes-lite i { position: absolute; left: var(--x); top: 100%; width: var(--s); height: var(--s); background: var(--accent); opacity: var(--a); animation: mote var(--t) linear var(--d) infinite; will-change: transform; transition: background-color 400ms linear; }
.at-end .motes-lite i { background: #22203c; }
@keyframes mote { to { transform: translateY(calc(-100vh - 8px)); } }

/* ---------- focus: the background out of focus, the bottom of the screen soft, the edges soft at speed ----------
   Only the middle of the screen is sharp while you read. The bottom veil is three stacked blurs, each a little
   stronger and lower, so the soft edge has no line. It waits until you're past the hero and steps aside at the very
   end of the page, where nothing could scroll up into focus. */
.far { filter: blur(6px); }
.hud-veil { height: 26vh; -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; background: linear-gradient(to top, color-mix(in srgb, var(--tint) 46%, transparent), transparent); opacity: 0; transition: opacity 500ms var(--ease-out); }
.focus .hud-veil { opacity: 1; }
.hud-veil i { position: absolute; inset: 0; }
.hud-veil i:nth-child(1) { -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); -webkit-mask-image: linear-gradient(to top, #000 35%, transparent); mask-image: linear-gradient(to top, #000 35%, transparent); }
.hud-veil i:nth-child(2) { -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); -webkit-mask-image: linear-gradient(to top, #000 15%, transparent 62%); mask-image: linear-gradient(to top, #000 15%, transparent 62%); }
.hud-veil i:nth-child(3) { -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); -webkit-mask-image: linear-gradient(to top, #000, transparent 38%); mask-image: linear-gradient(to top, #000, transparent 38%); }
.wearing { z-index: 46; }
.vignette { position: fixed; inset: 0; z-index: 43; pointer-events: none; opacity: 0; visibility: hidden;
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  -webkit-mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, transparent 52%, rgb(0 0 0 / 0.6) 78%, #000 100%); mask-image: radial-gradient(ellipse 72% 62% at 50% 50%, transparent 52%, rgb(0 0 0 / 0.6) 78%, #000 100%);
  background: color-mix(in srgb, var(--tint) 30%, transparent); }
.vignette.on { visibility: visible; }
/* lite: one soft layer under the HUD, and the vignette is colour only (a full-screen blur would cost the frames it
   is meant to smooth) */
.lite .far { filter: none; }
.lite .hud-veil { height: 20vh; }
.lite .hud-veil i:nth-child(n+2) { display: none; }
.lite .hud-veil i:nth-child(1) { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); -webkit-mask-image: linear-gradient(to top, #000 30%, transparent); mask-image: linear-gradient(to top, #000 30%, transparent); }
.lite .vignette { -webkit-backdrop-filter: none; backdrop-filter: none; -webkit-mask-image: none; mask-image: none; background: radial-gradient(ellipse 80% 66% at 50% 50%, transparent 50%, color-mix(in srgb, var(--tint) 75%, transparent) 100%); }
@media (prefers-reduced-motion: reduce) { .vignette { display: none; } .hud-veil { transition: none; } }

/* ---------- loading screen: the page waits until everything is in, then shows all at once ----------
   The current head builds itself pixel by pixel, corner to corner, then bobs like the player's idle while the
   in-game XP bar fills with real progress. Only with script; without it the page is simply there. */
.loader { display: none; }
.js .loader { position: fixed; inset: 0; z-index: 200; display: grid; place-content: center; justify-items: center; gap: 22px;
  background: radial-gradient(120% 90% at 85% -15%, rgb(255 238 170 / 0.24), transparent 65%), linear-gradient(rgb(8 84 145 / 0.84), rgb(8 84 145 / 0.84)), url(mc/dirt.png) 0 0 / 64px 64px; image-rendering: pixelated;
  transition: opacity 480ms var(--ease-out), visibility 0s linear 480ms; }
.js:not(.loading) .loader { opacity: 0; visibility: hidden; pointer-events: none; }
.loading { overflow: hidden; }
.ld-head { display: grid; grid-template-columns: repeat(8, 13px); grid-auto-rows: 13px; filter: drop-shadow(5px 5px 0 rgb(0 0 0 / 0.35)); animation: ld-bob 1.1s ease-in-out 1.05s infinite alternate; }
.ld-head i { background: var(--c); animation: ld-pix 420ms var(--ease-out) calc(var(--o) * 34ms) both; }
@keyframes ld-pix { from { opacity: 0; transform: translateY(-34px) scale(0.3); } }
@keyframes ld-bob { to { transform: translateY(-7px); } }
.js:not(.loading) .ld-head, .js:not(.loading) .ld-xp, .js:not(.loading) .ld-msg { transform: translateY(-10px) scale(1.04); transition: transform 480ms var(--ease-out); }
.ld-xp { position: relative; width: 273px; height: 7.5px; background: url(mc/xp_bg.png) 0 0 / 100% 100%; image-rendering: pixelated; }
.ld-fill { position: absolute; inset: 0; background: url(mc/xp_fill.png) 0 0 / 100% 100%; image-rendering: pixelated; clip-path: inset(0 calc(100% - var(--p, 0) * 100%) 0 0); transition: clip-path 300ms var(--ease-out); }
.ld-msg { margin: 0; font: 400 16px/1.25 var(--mc); color: #e0dfe6; text-shadow: 2px 2px 0 #3f3f3f; }
/* the hero's own entrance waits for the reveal */
.loading .giant { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .ld-head, .ld-head i { animation: none !important; } }
html.aim, html.aim body { cursor: crosshair; }
html.grab, html.grab body { cursor: pointer; }

/* ---------- SkyBlock icons before each Gear, Pets and Dungeons row ----------
   Heads fold a 24×8 strip (front, side, top) into a cube seen from above-right, like the game's inventory. */
.tip li .tip-k { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }
.sbi { width: 18px; height: 18px; flex: none; image-rendering: pixelated; }
.sbh { --h: 14px; position: relative; flex: none; width: var(--h); height: var(--h); margin: 2px 2px 0; transform-style: preserve-3d; transform: rotateX(-30deg) rotateY(-45deg); }
.sbh i { position: absolute; inset: 0; background: var(--t) 0 0 / 300% 100% no-repeat; image-rendering: pixelated; backface-visibility: hidden; }
.sbh i:nth-child(1) { transform: translateZ(calc(var(--h) / 2)); }
.sbh i:nth-child(2) { background-position: 50% 0; transform: rotateY(90deg) translateZ(calc(var(--h) / 2)); filter: brightness(0.72); }
.sbh i:nth-child(3) { background-position: 100% 0; transform: rotateX(90deg) translateZ(calc(var(--h) / 2)); filter: brightness(1.1); }
.sb-icons-src { margin-top: 14px; }
@media (max-width: 480px) { .tip li .tip-k { white-space: normal; } }
/* Crafty cards load in the background; each stays hidden (its space kept, so nothing jumps) and wipes in when ready */
.embed iframe { clip-path: inset(0 0 100% 0); transition: clip-path 600ms var(--ease-out); }
.embed iframe.ready { clip-path: inset(0); }
/* Hypixel's own colours on the server figures (Minecraft formatting codes), each with the game's darker drop shadow */
.mc-a, .srv-figs b.mc-a { color: #55ff55; text-shadow: 0.09em 0.09em 0 #153f15; }
.mc-b, .srv-figs b.mc-b { color: #55ffff; text-shadow: 0.09em 0.09em 0 #153f3f; }
.mc-c, .srv-figs b.mc-c { color: #ff5555; text-shadow: 0.09em 0.09em 0 #3f1515; }
.mc-d, .srv-figs b.mc-d { color: #ff55ff; text-shadow: 0.09em 0.09em 0 #3f153f; }
.mc-e, .srv-figs b.mc-e { color: #ffff55; text-shadow: 0.09em 0.09em 0 #3f3f15; }
.mc-6, .srv-figs b.mc-6 { color: #ffaa00; text-shadow: 0.09em 0.09em 0 #2a2a00; }
.mc-7, .srv-figs b.mc-7 { color: #aaaaaa; text-shadow: 0.09em 0.09em 0 #2a2a2a; }

/* ---------- phones: safe areas, narrow toasts, older iOS without svh ---------- */
.hud { bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
.hud-veil { height: calc(26vh + env(safe-area-inset-bottom, 0px)); }
.toast { max-width: calc(100vw - 2 * var(--m)); }
.toast span { overflow-wrap: anywhere; }
.tip.float { max-width: min(250px, 100%); }
/* the travelling heading takes focus without a ring from a click */
main h2[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
@supports not (height: 1svh) {
  .hero { min-height: 100vh; }
  .hero h1 { height: calc(100vh - var(--bar-h) - var(--hud-h)); }
  .splash { top: calc(var(--bar-h) + 13vh); }
  .crowd { min-height: 92vh; }
  .end { min-height: 100vh; }
  @media (max-width: 859px) {
    .world { height: 50vh; }
    .wearing { top: calc(var(--bar-h) + 50vh - 34px); }
    .hero { padding-top: calc(var(--bar-h) + 50vh + 8px); }
    .hero h1 { height: 50vh; }
    .splash { top: calc(var(--bar-h) + 22vh - var(--t-giant) * 0.85); }
  }
}
.lite .hud-veil { height: calc(20vh + env(safe-area-inset-bottom, 0px)); }

/* ---------- v3.9: real backgrounds, a ledge before the crowd, hero counts, the fairy soul ---------- */
/* the server and Crafty sections show the world again; the "Add me" crowd stands on its own ground, cut off by the
   game's hard GUI edge (black line, light bevel) so it reads as a separate place */
/* the textures sit on their own layer, so pixelated scaling stays on the texture and nothing inside inherits it */
.sky-sec::before, .add::before { content: ''; position: absolute; inset: 0; z-index: -1; image-rendering: pixelated; pointer-events: none; }
.sky-sec::before { background: linear-gradient(rgb(230 228 223 / 0.86), rgb(230 228 223 / 0.86)), url(mc/stone.png) 0 0 / 64px 64px; }
.add::before { background: linear-gradient(rgb(45 43 77 / 0.82), rgb(45 43 77 / 0.82)), url(mc/dirt.png) 0 0 / 64px 64px; }
.add { border-top: 4px solid #000; box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.22), 0 -10px 24px rgb(0 0 0 / 0.35); }
.servers .intro, .servers .src, .crafty .src { text-shadow: 0 1px 2px rgb(0 0 0 / 0.55); }
/* the four counts in the hero line: the game's font and yellow, same words */
.lead .ct { font: 400 16px/1 var(--mc); color: var(--mc-yellow, #ffff55); text-shadow: 0.09em 0.09em 0 #3f3f15; letter-spacing: 0.01em; white-space: nowrap; }
/* fairy soul: a 6-face cube that spins and bobs like the ones hidden around SkyBlock, with pink sparks */
.fsoul { position: absolute; z-index: 2; top: calc(clamp(96px, 12vw, 180px) - 10px); right: var(--m); width: 76px; height: 76px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 500px; -webkit-tap-highlight-color: transparent; }
.fsoul:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fs-bob { position: absolute; inset: 0; transform-style: preserve-3d; animation: fs-bob 1.6s ease-in-out infinite alternate; }
.fs-cube { --s: 40px; position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); transform-style: preserve-3d; animation: fs-spin 3.6s linear infinite; }
.fs-cube i { position: absolute; inset: 0; background: url(sb/fairy_soul_6.png) 0 0 / 600% 100% no-repeat; image-rendering: pixelated; backface-visibility: hidden; }
.fs-cube i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.fs-cube i:nth-child(2) { background-position: 20% 0; transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.8); }
.fs-cube i:nth-child(3) { background-position: 40% 0; transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.fs-cube i:nth-child(4) { background-position: 60% 0; transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.8); }
.fs-cube i:nth-child(5) { background-position: 80% 0; transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); filter: brightness(1.12); }
.fs-cube i:nth-child(6) { background-position: 100% 0; transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); filter: brightness(0.6); }
.fsoul::before, .fsoul::after { content: ''; position: absolute; left: 30%; bottom: 14px; width: 4px; height: 4px; background: #ff7dff; box-shadow: 0 0 0 1px rgb(120 30 120 / 0.4); opacity: 0; animation: fs-spark 2.2s linear infinite; pointer-events: none; }
.fsoul::after { left: 66%; width: 3px; height: 3px; background: #ffc4ff; animation-delay: 1.1s; }
@keyframes fs-spin { from { transform: rotateX(-16deg) rotateY(0deg); } to { transform: rotateX(-16deg) rotateY(360deg); } }
@keyframes fs-bob { from { transform: translateY(3px); } to { transform: translateY(-5px); } }
@keyframes fs-spark { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(-58px); } }
/* collected: a quick hop and a faster turn */
.fsoul.got .fs-bob { animation: fs-got 520ms cubic-bezier(0.23, 1, 0.32, 1); }
@keyframes fs-got { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-16px) scale(1.12); } 100% { transform: translateY(0) scale(1); } }
.toast[data-kind="soul"] b { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }
@media (max-width: 859px) { .fsoul { width: 60px; height: 60px; top: calc(clamp(96px, 12vw, 180px) - 14px); } .fs-cube { --s: 32px; } }
@media (prefers-reduced-motion: reduce) { .fs-bob, .fs-cube, .fsoul::before, .fsoul::after, .fsoul.got .fs-bob { animation: none; } .fs-cube { transform: rotateX(-16deg) rotateY(-35deg); } }

/* ---------- easter-egg heads (main.js EGGS): a fairy soul in the November 2022 head, a scan on the hazmat suit ---------- */
.fx { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
/* the soul pops out of the head, hovers turning, then bursts like a collected soul */
.fx-rise { position: absolute; inset: 0; perspective: 300px; animation: fx-rise 1500ms var(--ease-out) both; }
.fx-rise .fs-cube { --s: 34px; animation: fs-spin 900ms linear infinite; }
@keyframes fx-rise { 0% { opacity: 0; transform: translateY(10%) scale(0.5); } 15% { opacity: 1; } 42% { transform: translateY(-105%) scale(1.15); } 68% { opacity: 1; transform: translateY(-115%) scale(1); } 100% { opacity: 0; transform: translateY(-140%) scale(0.35); } }
.fx-burst { position: absolute; left: 50%; top: -65%; }
.fx-burst b { position: absolute; width: 6px; height: 6px; margin: -3px; background: #ff7dff; box-shadow: 0 0 0 1px rgb(120 30 120 / 0.45); opacity: 0; animation: fx-spark 700ms var(--ease-out) 980ms both; }
.fx-burst b:nth-child(even) { width: 4px; height: 4px; margin: -2px; background: #ffc4ff; }
@keyframes fx-spark { 0% { opacity: 1; transform: rotate(var(--a)) translateY(-6px) scale(1); } 55% { opacity: 1; } 100% { opacity: 0; transform: rotate(var(--a)) translateY(-50px) scale(0.4); } }
/* hazmat: a green scan line sweeps down and back, the head glows, particles lift off like potion swirls */
.fx-haz::before { content: ''; position: absolute; inset: 0; background: rgb(85 255 85 / 0.3); opacity: 0; animation: fx-glow 1400ms ease-in-out both; }
@keyframes fx-glow { 0%, 100% { opacity: 0; } 30%, 60% { opacity: 1; } }
.fx-scan { position: absolute; left: 4%; right: 4%; top: 0; height: 3px; background: #c8ffb4; box-shadow: 0 0 6px 2px rgb(85 255 85 / 0.75); opacity: 0; animation: fx-scan 1400ms cubic-bezier(0.77, 0, 0.175, 1) both; }
@keyframes fx-scan { 0% { opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 46% { transform: translateY(calc(var(--h) - 3px)); } 88% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
.fx-haz b { position: absolute; left: var(--x); bottom: 12%; width: 4px; height: 4px; background: #55ff55; box-shadow: 0 0 0 1px rgb(10 70 10 / 0.5); opacity: 0; animation: fx-bit 1000ms var(--ease-out) calc(300ms + var(--d)) both; }
.fx-haz b:nth-of-type(3n) { background: #b8ff8c; width: 3px; height: 3px; }
@keyframes fx-bit { 0% { opacity: 0; transform: translateY(0); } 15% { opacity: 1; } 100% { opacity: 0; transform: translateY(var(--y)); } }
.toast[data-kind="haz"] b { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
@media (prefers-reduced-motion: reduce) { .fx { display: none; } }

/* ---------- v3.11: an easter egg in every inventory skin (main.js SKIN_EGGS), transform and opacity only ---------- */
.fx-p { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); margin: calc(var(--s) / -2); background: var(--c); opacity: 0; animation: fx-p var(--t) var(--ez, var(--ease-out)) var(--d) both; }
.fx-lin .fx-p { --ez: linear; }
@keyframes fx-p { 0% { opacity: 0; transform: translate(0, 0); } 10% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
.fx-p.bat { width: 6px; height: 4px; box-shadow: -6px -3px 0 var(--c), 6px -3px 0 var(--c), 0 0 0 1px rgb(255 170 0 / 0.55); }
.fx-p.heart { clip-path: polygon(50% 100%, 0 45%, 0 12%, 22% 0, 50% 22%, 78% 0, 100% 12%, 100% 45%); }
.fx-p.orb { box-shadow: inset -1px -1px 0 rgb(40 90 0 / 0.7); }
.fx-layer { position: absolute; inset: 0; background: var(--c); opacity: 0; animation: fx-glow var(--t) ease-in-out both; }
@keyframes fx-flicker { 0%, 100% { opacity: 0; } 10% { opacity: 1; } 20% { opacity: 0.35; } 30% { opacity: 1; } 46% { opacity: 0.5; } 62% { opacity: 1; } 80% { opacity: 0.7; } }
/* sculk: rings leave the core like a sensor going off */
.fx-ring { position: absolute; inset: 0; border: 3px solid #3ff3ff; box-shadow: 0 0 8px rgb(40 230 255 / 0.6); opacity: 0; animation: fx-ring 900ms var(--ease-out) var(--d) both; }
@keyframes fx-ring { 0% { opacity: 1; transform: scale(0.3); } 100% { opacity: 0; transform: scale(1.9); } }
/* detective: a lens with a handle sweeps the head */
.fx-mag { position: absolute; left: 0; top: 0; width: 56%; height: 56%; border: 3px solid #2a2a2a; outline: 2px solid #d8b86a; outline-offset: -5px; background: rgb(255 255 255 / 0.22); opacity: 0; animation: fx-mag 1500ms cubic-bezier(0.77, 0, 0.175, 1) both; }
.fx-mag::after { content: ''; position: absolute; right: -9px; bottom: -9px; width: 5px; height: 11px; background: #5b3a1a; transform: rotate(-45deg); }
@keyframes fx-mag { 0% { opacity: 0; transform: translate(-10%, 80%) scale(0.8); } 12% { opacity: 1; } 40% { transform: translate(70%, 10%) scale(1); } 70% { transform: translate(15%, 25%) scale(1.1); } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(40%, 40%) scale(1.1); } }
/* suit: a shine runs across */
.fx-shine { position: absolute; inset: 0; overflow: hidden; }
.fx-shine::before { content: ''; position: absolute; top: -40%; left: -60%; width: 34%; height: 180%; background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.85), transparent); transform: rotate(20deg); animation: fx-shine 1100ms cubic-bezier(0.77, 0, 0.175, 1) 100ms both; }
@keyframes fx-shine { from { transform: rotate(20deg) translateX(0); } to { transform: rotate(20deg) translateX(560%); } }
/* green screen: the green keys out to the transparency checkerboard and back */
.fx-key { position: absolute; inset: 12%; background: repeating-conic-gradient(#fff 0 25%, #c8c8c8 0 50%) 0 0 / 10px 10px; opacity: 0; animation: fx-key 1500ms steps(1, end) both; }
@keyframes fx-key { 0% { opacity: 0; } 15% { opacity: 1; } 30% { opacity: 0; } 42% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
/* the head itself */
.fx-half { position: absolute; background: 0 0 / 100% 100% no-repeat; image-rendering: pixelated; }
.fx-half.l { clip-path: inset(0 50% 0 0); }
.fx-half.r { clip-path: inset(0 0 0 50%); }
.fx-o_aug2022b .fx-half.l { animation: fx-split-l 1400ms var(--ease-out) both; }
.fx-o_aug2022b .fx-half.r { animation: fx-split-r 1400ms var(--ease-out) both; }
@keyframes fx-split-l { 0%, 100% { transform: none; } 30%, 70% { transform: translate(-22%, -6%) rotate(-8deg); } }
@keyframes fx-split-r { 0%, 100% { transform: none; } 30%, 70% { transform: translate(22%, 6%) rotate(8deg); } }
.fx-o_may2022c .fx-half.l { animation: fx-swap-l 1500ms cubic-bezier(0.77, 0, 0.175, 1) both; }
.fx-o_may2022c .fx-half.r { animation: fx-swap-r 1500ms cubic-bezier(0.77, 0, 0.175, 1) both; z-index: 1; }
@keyframes fx-swap-l { 0%, 100% { transform: none; } 25% { transform: translate(0, -18%); } 45%, 65% { transform: translate(50%, 0); } 82% { transform: translate(0, -18%); } }
@keyframes fx-swap-r { 0%, 100% { transform: none; } 25% { transform: translate(0, 18%); } 45%, 65% { transform: translate(-50%, 0); } 82% { transform: translate(0, 18%); } }
[data-play="split"] > img, [data-play="swap"] > img { opacity: 0; }
[data-play="flex"] > img { animation: egg-flex 1300ms var(--ease-out) both; }
@keyframes egg-flex { 0%, 100% { transform: none; } 14% { transform: scale(1.2, 1.08); } 28% { transform: scale(0.96); } 44% { transform: scale(1.24, 1.1); } 60% { transform: none; } }
[data-play="invis"] > img { animation: egg-invis 1500ms ease-in-out both; }
@keyframes egg-invis { 0%, 100% { opacity: 1; } 25%, 72% { opacity: 0.06; } }
[data-play="shake"] > img { animation: egg-shake 700ms linear both; }
@keyframes egg-shake { 0%, 100% { transform: none; } 15% { transform: rotate(-9deg); } 30% { transform: rotate(8deg); } 45% { transform: rotate(-6deg); } 60% { transform: rotate(4deg); } 75% { transform: rotate(-2deg); } }
[data-play="hop"] > img { animation: egg-hop 900ms both; }
@keyframes egg-hop { 0% { transform: none; animation-timing-function: var(--ease-out); } 12% { transform: scale(1.12, 0.86); } 45% { transform: translateY(-34%) scale(0.94, 1.06); animation-timing-function: cubic-bezier(0.55, 0, 1, 0.45); } 62% { transform: scale(1.14, 0.86); } 78%, 100% { transform: none; } }
[data-play="bounce"] > img { animation: egg-bounce 1300ms both; }
@keyframes egg-bounce { 0% { transform: none; } 12% { transform: scale(1.2, 0.8); } 24% { transform: translateY(-40%) scale(0.86, 1.14); } 38% { transform: scale(1.22, 0.8); } 52% { transform: translateY(-20%) scale(0.92, 1.08); } 66% { transform: scale(1.12, 0.9); } 80% { transform: scale(0.98, 1.02); } 100% { transform: none; } }
[data-play] > img { transform-origin: 50% 100%; }
/* the toast's title takes the game's text colour for each egg */
.toast[data-kind="aqua"] b { color: #55ffff; text-shadow: 2px 2px 0 #153f3f; }
.toast[data-kind="gold"] b { color: #ffaa00; text-shadow: 2px 2px 0 #2a2a00; }
.toast[data-kind="pink"] b { color: #ff55ff; text-shadow: 2px 2px 0 #3f153f; }
.toast[data-kind="green"] b { color: #55ff55; text-shadow: 2px 2px 0 #153f15; }
.toast[data-kind="red"] b { color: #ff5555; text-shadow: 2px 2px 0 #3f1515; }
.toast[data-kind="grey"] b { color: #aaaaaa; text-shadow: 2px 2px 0 #2a2a2a; }
.toast[data-kind="white"] b { color: #ffffff; text-shadow: 2px 2px 0 #3f3f3f; }
.toast[data-kind="yellow"] b { color: #ffff55; text-shadow: 2px 2px 0 #3f3f15; }

/* ---------- the Minecraft font on its own grid: it draws in 1/8 em pixels, so 16, 24 and 32px land every pixel on
   whole screen pixels; 15, 17 or 20px make some strokes thicker than others and the letters look squeezed ---------- */
.toast { max-width: min(440px, calc(100vw - 2 * var(--m))); }
.toast b { font-size: 16px; line-height: 20px; }
.toast span { display: block; font: 400 16px/20px var(--mc); color: #fff; text-shadow: 2px 2px 0 #3f3f3f; }
@media (max-width: 859px) { :root { --t-h3: 24px; } .ev h3 { font-size: 24px; } }

/* ---------- v3.12: a note for every skin and cape, the cape effects, two sarcastic ones ---------- */
.cape-slot { position: relative; }
.toast img { object-fit: contain; }
/* 3D glasses (and the Follower's cape's glitch): a red and a cyan copy of the picture drift apart */
.fx-ghost { position: absolute; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; mix-blend-mode: screen; opacity: 0; animation: fx-ghost-r 1400ms var(--ease-out) both; }
.fx-ghost.r { background: #ff2a55; }
.fx-ghost.c { background: #2ae8ff; animation-name: fx-ghost-c; }
@keyframes fx-ghost-r { 0%, 100% { opacity: 0; transform: none; } 15%, 75% { opacity: 0.75; } 30% { transform: translate(-6px, 0); } 45% { transform: translate(-3px, 1px); } 60% { transform: translate(-7px, -1px); } }
@keyframes fx-ghost-c { 0%, 100% { opacity: 0; transform: none; } 15%, 75% { opacity: 0.75; } 30% { transform: translate(6px, 0); } 45% { transform: translate(3px, -1px); } 60% { transform: translate(7px, 1px); } }
[data-play="ghost"] > img { animation: egg-ghost 1400ms steps(2, end) both; }
@keyframes egg-ghost { 0%, 100% { transform: none; } 30% { transform: translateX(1px); } 50% { transform: translateX(-1px); } }
/* the creeper cape swells and flashes white, then a puff of smoke */
[data-play="creeper"] > img { animation: egg-creeper 1100ms ease-in both; }
@keyframes egg-creeper { 0% { transform: none; } 20% { transform: scale(1.08); } 30% { transform: scale(1); } 50% { transform: scale(1.12); } 60% { transform: scale(1.02); } 85% { transform: scale(1.2); } 100% { transform: none; } }
@keyframes fx-boom { 0%, 15%, 25%, 45%, 55%, 100% { opacity: 0; } 20%, 50% { opacity: 0.6; } 72%, 80% { opacity: 1; } }
/* Migrator: the cape leaves for the right and comes back from the left, like an account moving house */
[data-play="migrate"] > img { animation: egg-migrate 1300ms cubic-bezier(0.77, 0, 0.175, 1) both; }
@keyframes egg-migrate { 0% { transform: none; opacity: 1; } 40% { transform: translateX(140%); opacity: 0; } 41% { transform: translateX(-140%); opacity: 0; } 100% { transform: none; opacity: 1; } }
[data-play="migrate"] { overflow: hidden; }
/* Copper oxidizes to green, then gets scraped back */
@keyframes fx-oxid { 0% { opacity: 0; } 55%, 66% { opacity: 1; } 78%, 100% { opacity: 0; } }
/* Aurora: soft bands drift across */
.fx-band { position: absolute; left: 0; width: 100%; height: 22%; background: var(--c); opacity: 0; animation: fx-band 1400ms ease-in-out var(--d) both; }
@keyframes fx-band { 0% { opacity: 0; transform: translateX(-60%); } 30%, 70% { opacity: 0.55; } 100% { opacity: 0; transform: translateX(60%); } }
.fx-aurora { overflow: hidden; }
