/* ============================================================
   crafting-table.css: /crafting-table/, the Minecraft terminal.
   Sister page to /jarvis/, /holocron/, /marauders-map/ and
   /citadel/: gray bevelled panels instead of glass, a square sun
   instead of an arc reactor. Every block on the page is drawn
   pixel by pixel by crafting-table.js; there are no image files.
   ============================================================ */

/* these pages load no shared stylesheet, so they carry their own reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
html.smooth { scroll-behavior: smooth; }   /* added after load, so back/forward restoration is not animated */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ct {
  --iw-a: #80ff20;   /* the shared world button, interface-world.css */
  --iw-bg: #1d1f23;
  /* the game's own GUI colors */
  --px:      "Pixelify Sans", ui-monospace, monospace;
  --panel:   #c6c6c6;
  --hi:      #ffffff;
  --lo:      #555555;
  --slot:    #8b8b8b;
  --slot-lo: #373737;
  --txt:     #3f3f3f;
  --splash:  #ffff55;
  --green:   #80ff20;

  /* the sky, by time of day (data-sky, set by crafting-table.js) */
  --sky-1: #78a7ff;
  --sky-2: #c3d9ff;

  font-family: var(--px);
  color: #fff;
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 70%, var(--sky-2));
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  image-rendering: pixelated;
}
.ct[data-sky="dusk"]  { --sky-1: #3b4f8f; --sky-2: #f0955a; }
.ct[data-sky="night"] { --sky-1: #02030a; --sky-2: #0d1630; }

canvas { display: block; image-rendering: pixelated; }

/* ───────────── the sky ───────────── */
.ct-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ct-sky > span { position: absolute; }
.ct-sun {
  top: 9vh; right: 14vw; width: 74px; height: 74px; background: #fff7c2;
  box-shadow: 0 0 0 10px rgba(255, 247, 194, .25), 0 0 60px 20px rgba(255, 240, 160, .35);
}
.ct-moon {
  top: 10vh; left: 14vw; width: 52px; height: 52px; background: #e8ecf4; opacity: 0;
  box-shadow: inset -12px 0 0 #c3c9d6, inset 0 -10px 0 #d2d8e3, 0 0 40px 6px rgba(200, 215, 255, .2);
}
.ct-stars {
  inset: 0; opacity: 0;
  background-image:
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), linear-gradient(#fff, #fff),
    linear-gradient(#fff, #fff), linear-gradient(#fff, #fff), linear-gradient(#fff, #fff);
  background-size: 3px 3px;
  background-repeat: no-repeat;
  background-position: 8% 14%, 22% 32%, 37% 8%, 52% 26%, 66% 12%, 74% 40%, 88% 22%, 12% 52%, 94% 58%;
}
.ct[data-sky="night"] .ct-sun { opacity: 0; }
.ct[data-sky="night"] .ct-moon, .ct[data-sky="night"] .ct-stars { opacity: 1; }
.ct[data-sky="dusk"] .ct-sun { top: 30vh; background: #ffd27a; box-shadow: 0 0 0 10px rgba(255, 190, 110, .3), 0 0 80px 30px rgba(255, 150, 80, .35); }

/* clouds: flat white slabs drifting east, the way they do in the game */
.ct-cloud {
  height: 26px; background: rgba(255, 255, 255, .85);
  box-shadow: 0 6px 0 rgba(220, 228, 240, .7);
  animation: ct-drift linear infinite;
}
.ct-cloud--1 { top: 18vh; width: 220px; animation-duration: 140s; animation-delay: -30s; }
.ct-cloud--2 { top: 34vh; width: 150px; animation-duration: 190s; animation-delay: -120s; }
.ct-cloud--3 { top: 8vh;  width: 300px; animation-duration: 230s; animation-delay: -60s; }
.ct-cloud--1::before, .ct-cloud--3::before {
  content: ""; position: absolute; left: 25%; top: -18px; width: 40%; height: 18px; background: inherit;
}
.ct[data-sky="night"] .ct-cloud { background: rgba(80, 90, 120, .5); box-shadow: none; }
.ct[data-sky="dusk"] .ct-cloud { background: rgba(255, 214, 190, .8); box-shadow: 0 6px 0 rgba(220, 150, 130, .6); }
@keyframes ct-drift { from { left: -320px; } to { left: 100vw; } }

/* ───────────── header ───────────── */
.ct-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) clamp(1rem, 4vw, 2.4rem) 0.8rem;
  background: rgba(0, 0, 0, .35);
  font-size: 0.9rem;
}
.ct-exit { display: inline-flex; align-items: center; gap: 0.4rem; text-shadow: 2px 2px 0 #3f3f3f; }
.ct-exit:hover { color: var(--splash); }
.ct-exit svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.ct-top-mid { color: #e0e0e0; text-shadow: 2px 2px 0 #3f3f3f; }
.ct-escbtn {
  background: rgba(0, 0, 0, .4); border: 2px solid #000; padding: 0.3rem 0.7rem; cursor: pointer;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,.25), inset -2px -2px 0 rgba(0,0,0,.4);
  text-shadow: 2px 2px 0 #3f3f3f;
}
.ct-escbtn:hover { border-color: #fff; }

/* ───────────── F3 ───────────── */
.ct-f3 {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
  padding: 0.6rem clamp(1rem, 4vw, 2.4rem) 0;
  font-size: 0.84rem; line-height: 1.15;
}
.ct-f3-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ct-f3-col--r { align-items: flex-end; text-align: right; }
.ct-f3 p { background: rgba(60, 60, 60, .72); color: #e0e0e0; padding: 1px 3px; }
@media (max-width: 720px) {
  .ct-f3 { font-size: 0.72rem; }
  .ct-f3-col--r { align-items: flex-start; text-align: left; }
}

/* ───────────── the title screen ───────────── */
.ct-main { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 16px; }
.ct-title { position: relative; text-align: center; padding: clamp(2.4rem, 7vw, 4.4rem) 0 2rem; }

/* stone letters, extruded downwards. The stone is a tile crafting-table.js
   draws (--ct-stone); the depth is stacked drop-shadows, because a
   text-shadow paints over a background clipped to the text. */
.ct-logo {
  display: inline-block; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.2rem, 8.4vw, 5.4rem); line-height: 1; letter-spacing: 0.02em;
  background: var(--ct-stone, linear-gradient(180deg, #c8c8c8, #8a8a8a));
  background-size: 48px 48px;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter:
    drop-shadow(0 3px 0 #5d5d5d) drop-shadow(0 3px 0 #474747)
    drop-shadow(0 3px 0 #333) drop-shadow(0 8px 10px rgba(0, 0, 0, .45));
}
.ct-logo span { display: inline-block; }
/* two lines on a phone, where one line made each letter a few pixels tall */
@media (max-width: 600px) {
  .ct-logo { font-size: clamp(2.2rem, 12.5vw, 3.6rem); line-height: 1.05; }
  .ct-logo span { display: block; }
}
.ct-logo-wrap { position: relative; display: inline-block; }

.ct-splash {
  position: absolute; right: -0.6rem; bottom: -1.5rem;
  color: var(--splash); font-size: clamp(0.9rem, 2.2vw, 1.25rem); font-weight: 600;
  text-shadow: 2px 2px 0 #3f3f00;
  transform: rotate(-17deg); transform-origin: center;
  animation: ct-pulse .9s ease-in-out infinite;
  white-space: nowrap;
}
@keyframes ct-pulse { 0%, 100% { scale: 1; } 50% { scale: 1.09; } }

.ct-sub {
  max-width: 60ch; margin: 2.2rem auto 0; font-size: 1rem; line-height: 1.55;
  color: #fff; text-shadow: 2px 2px 0 rgba(0, 0, 0, .55);
}

/* buttons: the game's stone-gray slab with a black rim; white rim on hover */
.ct-menu { display: grid; gap: 8px; max-width: 420px; margin: 2rem auto 0; }
.ct-menu-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ct-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 46px; padding: 0.35rem 0.8rem; cursor: pointer;
  background: linear-gradient(180deg, #8e8e8e, #6f6f6f);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .35), inset -2px -3px 0 rgba(0, 0, 0, .35);
  color: #fff; font-size: 1.05rem; text-shadow: 2px 2px 0 #3f3f3f;
  transition: none;
}
.ct-btn small { font-size: 0.72rem; color: #e0e0e0; text-shadow: 1px 1px 0 #3f3f3f; }
.ct-btn:hover, .ct-btn:focus-visible {
  outline: none; border-color: #fff;
  background: linear-gradient(180deg, #8a99c8, #6b78a6);
  color: var(--splash);
}
.ct-btn--wide { width: 100%; }
.ct-quit { max-width: 420px; margin: 2.4rem auto 0; }

/* ───────────── GUI panels ───────────── */
.ct-gui {
  position: relative; margin-top: 1.6rem;
  background: var(--panel); color: var(--txt);
  border: 2px solid #000; border-radius: 4px;
  box-shadow: inset 3px 3px 0 var(--hi), inset -3px -3px 0 var(--lo), 0 10px 0 rgba(0, 0, 0, .18);
  padding: clamp(0.9rem, 2.6vw, 1.4rem);
  scroll-margin-top: 1rem;
}
/* ── the three dimensions, pulled in from the world page ──
   The same three as /worlds/minecraft/#dimensions, set as the world-select
   screen would set them: a colored spine per dimension, GUI panels. */
.ct-dims { list-style: none; display: grid; gap: 0.6rem; }
@media (min-width: 720px) { .ct-dims { grid-template-columns: repeat(3, 1fr); } }
.ct-dims li {
  position: relative; padding: 0.7rem 0.8rem 0.75rem 1rem;
  background: var(--slot); border: 2px solid var(--slot-lo);
}
.ct-dims li::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--d, #7fbf4f);
}
.ct-dims b { display: block; font-size: 0.98rem; font-weight: 600; color: #fff; }
.ct-dims em {
  display: block; margin-top: 0.1rem; font-style: normal;
  font-size: 0.72rem; color: #d8d8d8;
}
.ct-dims p { margin-top: 0.35rem; font-size: 0.82rem; line-height: 1.5; color: #ececec; }
.ct-dims-go { display: inline-block; margin-top: 0.9rem; font-size: 0.82rem; color: #fff; text-decoration: underline; }

.ct-gui-h {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.7rem;
  font-size: 1.2rem; font-weight: 600; margin-bottom: 0.9rem;
}
.ct-gui-h span { font-size: 0.78rem; font-weight: 400; color: #6a6a6a; }
.ct-gui-sub { font-size: 1rem; font-weight: 600; margin: 1.2rem 0 0.7rem; }
.ct-think { width: 20px; height: 20px; }

/* a slot: recessed, dark at the top-left and light at the bottom-right */
.ct-slot {
  position: relative; flex: none; display: grid; place-items: center;
  width: 46px; height: 46px; background: var(--slot);
  box-shadow: inset 2px 2px 0 var(--slot-lo), inset -2px -2px 0 var(--hi);
}
.ct-slot canvas { width: 32px; height: 32px; }

/* the inventory: a slot and its name, auto-filled */
.ct-inv { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ct-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.7rem; align-items: center;
  padding: 4px; border: 2px solid transparent;
}
.ct-item .ct-slot { grid-row: span 2; }
.ct-item b { font-size: 0.98rem; font-weight: 600; align-self: end; }
.ct-item i { font-style: normal; font-size: 0.78rem; color: #5c5c5c; align-self: start; }
.ct-item:hover .ct-slot::after, .ct-item:focus-visible .ct-slot::after {
  content: ""; position: absolute; inset: 2px; background: rgba(255, 255, 255, .45);
}
.ct-item:hover, .ct-item:focus-visible { outline: none; border-color: rgba(63, 63, 63, .35); background: rgba(255, 255, 255, .18); }

/* ───────────── the map ─────────────
   The map item's paper border, then the terrain (a 128px canvas blown up
   with square pixels), the player's white arrow, and the banners. */
.ct-mapwrap { display: grid; gap: 1.2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .ct-mapwrap { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); } }
.ct-map {
  position: relative; width: 100%; aspect-ratio: 1; padding: 6%;
  background:
    repeating-linear-gradient(0deg, rgba(120, 90, 50, .08) 0 2px, transparent 2px 6px),
    #d6c49a;
  border: 3px solid #6b5232;
  box-shadow: inset 0 0 0 3px #b9a374, 0 6px 0 rgba(0, 0, 0, .2);
}
.ct-map canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.ct-map > div { position: absolute; inset: 6%; }
.ct-banner, .ct-player {
  position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%);
}
.ct-banner { display: flex; align-items: flex-start; gap: 2px; translate: -2px -100%; }
.ct-banner i {
  position: relative; width: 10px; height: 14px; background: var(--b);
  box-shadow: 0 0 0 1.5px #1b1b1b, inset 0 -3px 0 rgba(0, 0, 0, .18);
}
.ct-banner i::after {                  /* the pole */
  content: ""; position: absolute; left: 4px; top: 100%; width: 2px; height: 6px; background: #3b2a16;
}
.ct-banner b {
  font-size: 0.7rem; line-height: 1; color: #fff; font-weight: 600;
  text-shadow: 1px 0 0 #000, -1px 0 0 #000, 0 1px 0 #000, 0 -1px 0 #000;
}
.ct-banner.is-lit i { box-shadow: 0 0 0 2px #fff, 0 0 10px 2px rgba(255, 255, 255, .8); }
.ct-banner.is-lit { z-index: 2; }
/* the player marker: the game's white arrow, turned to wherever you are facing */
.ct-player {
  width: 14px; height: 14px; translate: -50% -50%; rotate: var(--r, 0deg);
  background: #fff; clip-path: polygon(50% 0, 100% 100%, 50% 76%, 0 100%);
  filter: drop-shadow(0 0 1px #000);
  transition: rotate .25s;
}
.ct-legend { list-style: none; display: grid; gap: 4px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ct-legend a {
  display: grid; grid-template-columns: 12px 1.6rem minmax(0, 1fr); align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.3rem 0.5rem; border: 2px solid transparent;
}
.ct-legend i { width: 12px; height: 16px; background: var(--b); box-shadow: 0 0 0 1.5px #1b1b1b; }
.ct-legend b { font-size: 0.9rem; color: #5c5c5c; text-align: right; }
.ct-legend span { display: flex; flex-direction: column; font-size: 0.95rem; font-weight: 600; }
.ct-legend em { font-style: normal; font-weight: 400; font-size: 0.74rem; color: #5c5c5c; }
.ct-legend a:hover, .ct-legend a:focus-visible, .ct-legend a.is-lit {
  outline: none; border-color: rgba(63, 63, 63, .35); background: rgba(255, 255, 255, .25);
}

/* ───────────── crafting and statistics ───────────── */
.ct-cols { display: grid; gap: 0 1.6rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .ct-cols { grid-template-columns: 1.1fr 1fr; } }

.ct-craft { display: flex; align-items: center; justify-content: center; gap: 0.9rem; flex-wrap: wrap; }
.ct-grid { display: grid; grid-template-columns: repeat(3, auto); gap: 4px; }
.ct-slot--big { width: 78px; height: 72px; align-content: center; gap: 2px; }
.ct-slot--big canvas { width: 32px; height: 32px; }
.ct-slot em, .ct-slot--out em { font-style: normal; font-size: 0.66rem; color: #fff; text-shadow: 1px 1px 0 #3f3f3f; }
.ct-arrow {
  width: 44px; height: 30px; flex: none;
  background: #8b8b8b;
  clip-path: polygon(0 35%, 58% 35%, 58% 5%, 100% 50%, 58% 95%, 58% 65%, 0 65%);
}
.ct-slot--out { width: 96px; height: 96px; align-content: center; gap: 3px; }
.ct-slot--out canvas { width: 48px; height: 48px; }
.ct-count {
  position: absolute; right: 6px; bottom: 4px;
  font-size: 1rem; color: #fff; text-shadow: 2px 2px 0 #3f3f3f;
}
.ct-note { margin-top: 0.9rem; text-align: center; font-size: 0.86rem; color: #5c5c5c; }
@media (max-width: 460px) {
  .ct-craft { flex-direction: column; }
  .ct-arrow { rotate: 90deg; }
  .ct-slot--big { width: 72px; }
}

.ct-stats { display: flex; flex-direction: column; }
.ct-stats div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.42rem 0.2rem; border-bottom: 2px solid rgba(85, 85, 85, .25);
}
.ct-stats div:nth-child(odd) { background: rgba(255, 255, 255, .16); }
.ct-stats dt { font-size: 0.9rem; }
.ct-stats dd { font-size: 0.95rem; font-weight: 600; white-space: nowrap; }

/* ───────────── advancements ───────────── */
.ct-advs { list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.ct-adv {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; align-items: start;
  padding: 0.7rem; background: #212121; color: #fff;
  border: 2px solid #000; box-shadow: inset 2px 2px 0 #4a4a4a, inset -2px -2px 0 #111;
}
.ct-adv b { display: block; font-size: 1rem; color: var(--splash); }
.ct-adv p { font-size: 0.86rem; line-height: 1.45; color: #e0e0e0; margin-top: 0.2rem; }
.ct-adv i { display: block; font-style: normal; font-size: 0.72rem; color: #a0a0a0; margin-top: 0.35rem; }
.ct-adv--challenge b { color: #d27fff; }
/* the three frames: a task is a square, a goal has its corners cut, and a
   challenge is the spiked purple one */
.ct-frame {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none;
  background: #c6c6c6; box-shadow: inset 3px 3px 0 #fff, inset -3px -3px 0 #555;
  border: 2px solid #000;
}
.ct-frame canvas { width: 32px; height: 32px; }
.ct-frame--goal { clip-path: polygon(14% 0, 86% 0, 100% 14%, 100% 86%, 86% 100%, 14% 100%, 0 86%, 0 14%); border: 0; }
.ct-frame--challenge {
  border: 0; background: #a35dd6; box-shadow: inset 3px 3px 0 #d9a6ff, inset -3px -3px 0 #5c2687;
  clip-path: polygon(50% 0, 62% 12%, 88% 12%, 88% 38%, 100% 50%, 88% 62%, 88% 88%, 62% 88%, 50% 100%, 38% 88%, 12% 88%, 12% 62%, 0 50%, 12% 38%, 12% 12%, 38% 12%);
}

/* ───────────── the ground ─────────────
   The page ends on it: deep enough that the hotbar stands on dirt rather
   than over the last panel, so the body needs no padding of its own. */
.ct-ground {
  position: relative; z-index: 1; height: calc(150px + 140px + env(safe-area-inset-bottom, 0px)); margin-top: 3rem;
  background-color: #79553a;
  background-image: linear-gradient(180deg, #6aae3b 0 12px, #79553a 12px);
  background-size: 48px 48px;
}

/* ───────────── the HUD ───────────── */
.ct-hud {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30;
  translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: min(calc(100vw - 16px), 460px);
}
.ct-held {
  min-height: 1.2em; font-size: 0.95rem; text-shadow: 2px 2px 0 #3f3f3f;
  opacity: 0; transition: opacity .4s;
}
.ct-held.is-on { opacity: 1; }
.ct-bars { display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: 100%; }
.ct-hearts { display: flex; gap: 1px; }
.ct-hearts canvas { width: 16px; height: 14px; }
.ct-xp {
  position: relative; height: 8px; background: #1b1b1b; border: 1px solid #000;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(5.5% - 1px), #000 calc(5.5% - 1px) 5.5%);
}
.ct-xp i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(180deg, #c8ff74, #6fd12a); }
.ct-xp b {
  position: absolute; left: 50%; bottom: 4px; translate: -50% 0;
  font-size: 1.05rem; color: var(--green);
  text-shadow: 2px 0 0 #000, -2px 0 0 #000, 0 2px 0 #000, 0 -2px 0 #000;
}
.ct-hotbar {
  display: grid; grid-template-columns: repeat(9, 1fr); width: 100%;
  background: rgba(30, 30, 30, .78); border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #5a5a5a, inset -2px -2px 0 #111;
}
.ct-hotbar a {
  position: relative; display: grid; place-items: center; aspect-ratio: 1;
  border-right: 2px solid rgba(0, 0, 0, .55);
}
.ct-hotbar a:last-child { border-right: 0; }
.ct-hotbar canvas { width: 66%; height: auto; aspect-ratio: 1; }
.ct-hotbar a.is-sel, .ct-hotbar a:focus-visible, .ct-hotbar a:hover {
  outline: 3px solid #fff; outline-offset: -1px; z-index: 1;
  box-shadow: inset 0 0 0 2px #555;
}

/* ───────────── the toast ───────────── */
.ct-toast {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 40;
  display: flex; align-items: center; gap: 0.7rem; width: 300px; max-width: calc(100vw - 28px);
  padding: 0.6rem 0.8rem; background: #212121;
  border: 2px solid #000; box-shadow: inset 2px 2px 0 #555, inset -2px -2px 0 #111, 0 8px 20px rgba(0,0,0,.35);
  translate: calc(100% + 28px) 0; transition: translate .5s cubic-bezier(.2, .9, .3, 1.1);
}
.ct-toast.is-on { translate: 0 0; }
.ct-toast canvas { width: 32px; height: 32px; flex: none; }
.ct-toast span { display: flex; flex-direction: column; font-size: 0.92rem; color: #fff; }
.ct-toast b { color: var(--splash); font-weight: 600; }

/* ───────────── the game menu ───────────── */
.ct-pause {
  margin: auto; border: 0; background: transparent; color: #fff;
  width: min(440px, calc(100vw - 32px)); text-align: center;
}
.ct-pause::backdrop { background: rgba(16, 16, 16, .72); }
.ct-pause h2 { font-size: 1.2rem; font-weight: 500; text-shadow: 2px 2px 0 #3f3f3f; margin-bottom: 1.4rem; }
.ct-pause-btns { display: grid; gap: 8px; }

/* ───────────── saving the world ───────────── */
.ct-saving {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; text-align: center;
  background-color: #2b1f16;
  background-image: var(--ct-dirt, none);
  background-size: 64px 64px;
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.ct-saving::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .62); }
.ct-saving > div { position: relative; }
.ct-saving p { font-size: 1.15rem; text-shadow: 2px 2px 0 #3f3f3f; }
.ct-saving-orb { width: 64px; height: 64px; margin: 0 auto 1rem; }
.ct-progress { display: block; width: 220px; height: 6px; margin: 1rem auto; background: #808080; border: 1px solid #000; }
.ct-progress i { display: block; height: 100%; width: 0; background: #80ff20; }
.ct.is-saving .ct-progress i { width: 100%; transition: width 1.4s steps(12); }
.ct-saving a { display: inline-block; margin-top: 0.8rem; font-size: 0.8rem; color: #a0a0a0; text-decoration: underline; }
.ct.is-saving .ct-saving { opacity: 1; pointer-events: auto; }
.ct:not(.is-saving) .ct-saving-orb { display: none; }

@media (prefers-reduced-motion: reduce) {
  .ct-cloud, .ct-splash { animation: none; }
  .ct-toast { transition: none; }
}
