/* ============================================================
   Negative Client — website
   Flat, light, Minecraft-native. No glass, no gradients, no
   glow — just paper, ink, the logo's periwinkle, and details
   borrowed from the game itself (item tooltips, hotbar, MC
   buttons that press).
   ============================================================ */

:root {
  --paper: #f5f4f0;
  --ink: #17181f;
  --muted: #5d5f6d;
  --line: #ddd9cf;

  --accent: #6b72e0; /* sampled from the logo */
  --accent-deep: #575ed1;
  --accent-pale: #eceafd;

  --dark: #14121f; /* launcher logo tile */
  --dark-edge: #0d0b16;
  --tip-edge: #4a1d8f; /* the purple of a Minecraft tooltip border */
  --tip-name: #cf8df2;
  --tip-lore: #a9a4bd;

  --font-body: "Rubik", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "Silkscreen", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #fff; }

img { max-width: 100%; display: block; }
a { color: var(--accent-deep); text-decoration-thickness: 1px; text-underline-offset: 2px; }

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.86em;
  background: #edece6;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.08em 0.35em;
  word-break: break-all;
}

.wrap { width: min(1080px, 100% - 48px); margin-inline: auto; }

/* ================= masthead ================= */
.mast {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 244, 240, 0.94);
  border-bottom: 2px solid var(--ink);
}
.mast-in {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.logo img { width: 30px; height: 30px; border-radius: 7px; }
.logo span { font-size: 16.5px; letter-spacing: -0.01em; }
.logo b { font-weight: 800; }

.mast-nav { display: flex; gap: 22px; }
.mast-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
}
.mast-nav a:hover { color: var(--ink); text-decoration: underline; }

.burger {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 9px;
  background: #fff;
  border: 2px solid var(--ink);
  cursor: pointer;
}
.burger span { height: 2px; background: var(--ink); }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ================= MC-style buttons ================= */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-body);
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--dark-edge);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22),
    3px 3px 0 var(--dark-edge);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  text-decoration: none;
  cursor: pointer;
  padding: 12px 22px;
  font-size: 15.5px;
  transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.15s ease;
}
.mc-btn:hover { background: var(--accent-deep); }
.mc-btn:active {
  transform: translate(3px, 3px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    0 0 0 var(--dark-edge);
}
.mc-btn-sm { padding: 8px 14px; font-size: 13.5px; box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -3px 0 rgba(0,0,0,.22), 2px 2px 0 var(--dark-edge); }
.mc-btn-sm:active { transform: translate(2px, 2px); }
.mc-btn-lg { padding: 15px 28px; font-size: 16.5px; }
.mc-btn-wide { width: 100%; }

.ghost-btn {
  display: inline-flex;
  align-items: center;
  padding: 13px 22px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  text-decoration: none;
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}
.ghost-btn:hover { background: var(--accent-pale); }
.ghost-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--ink); }

/* ================= hero ================= */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(44px, 7vw, 84px) 0 clamp(30px, 4vw, 48px);
}

.crumb {
  font-family: var(--font-pixel);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(44px, 6.4vw, 78px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.lede {
  font-size: clamp(16px, 1.8vw, 18.5px);
  color: var(--muted);
  margin: 0 0 26px;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }

.fineprint { color: var(--muted); font-size: 13.5px; margin: 0; }

/* the Minecraft-item-tooltip frame (stretched wider than its column) */
.tip-frame {
  margin: 0 clamp(-52px, -4vw, -14px);
  background:
    linear-gradient(180deg, rgba(38, 12, 66, 0.97), rgba(19, 6, 36, 0.97));
  border: 2px solid #000;
  box-shadow:
    inset 0 0 0 2px var(--tip-edge),
    6px 6px 0 rgba(23, 24, 31, 0.9);
  padding: 10px;
}
.tip-frame img { width: 100%; }
.tip-frame figcaption { padding: 14px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.tip-name { color: var(--tip-name); font-weight: 600; font-size: 17px; }
.tip-lore { color: var(--tip-lore); font-size: 14.5px; }
.tip-rare { color: #7ddfc3; font-size: 14.5px; margin-top: 4px; }

/* ================= hotbar divider ================= */
.hotbar {
  display: flex;
  justify-content: center;
  padding: clamp(10px, 2vw, 22px) 0 clamp(34px, 5vw, 60px);
}
.slot {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--dark);
  border: 2px solid var(--dark-edge);
  box-shadow: inset 0 0 0 2px #37344a;
  margin-left: -2px;
  transition: transform 0.12s ease;
  cursor: default;
}
.slot:first-child { border-radius: 0; }
.slot img { width: 26px; height: 26px; image-rendering: pixelated; }
.slot:hover { transform: translateY(-5px); z-index: 2; }
.slot::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: linear-gradient(180deg, rgba(38, 12, 66, 0.97), rgba(19, 6, 36, 0.97));
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--tip-edge);
  color: var(--tip-name);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 6px 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.slot:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================= sections ================= */
.sec { padding: clamp(30px, 5vw, 56px) 0; }
.sec-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 30px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

/* what it does — plain two-column list */
.dolist {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px clamp(28px, 5vw, 64px);
}
.doitem { padding: 16px 0; border-bottom: 1px solid var(--line); }
.doitem h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doitem h3::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--accent);
  box-shadow: 2px 2px 0 var(--dark-edge);
}
.doitem p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* ================= download plate ================= */
.dl-plate {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  background: var(--dark);
  border: 2px solid var(--dark-edge);
  box-shadow: inset 0 0 0 2px var(--tip-edge), 6px 6px 0 rgba(23, 24, 31, 0.9);
  padding: clamp(26px, 4vw, 46px);
}
.dl-copy h2 {
  color: #fff;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.dl-list { margin: 0; padding: 0; list-style: none; color: var(--tip-lore); font-size: 15px; }
.dl-list li { padding: 7px 0 7px 24px; position: relative; }
.dl-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.55);
}
.dl-actions { display: flex; flex-direction: column; gap: 14px; }
.dl-alt {
  color: #fff;
  text-align: center;
  font-size: 14px;
}
.dl-hint {
  margin: 0;
  text-align: center;
  color: #7b7594;
  font-size: 12.5px;
  word-break: break-all;
}

.smarc {
  margin: 22px auto 0;
  max-width: 860px;
  background: #fdf6dd;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(23, 24, 31, 0.85);
  padding: 14px 18px;
  font-size: 14.5px;
  color: #4d4632;
}
.smarc b { color: var(--ink); }

/* ================= install steps ================= */
.gsteps { list-style: none; margin: 0; padding: 0; }
.gstep {
  display: flex;
  gap: clamp(16px, 3vw, 30px);
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.gnum {
  font-family: var(--font-pixel);
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 3px 3px 0 var(--dark-edge);
  flex-shrink: 0;
  min-width: 44px;
}
.gstep h3 { margin: 2px 0 6px; font-size: 18px; font-weight: 700; }
.gstep p { margin: 0; color: var(--muted); font-size: 15px; }

.patch {
  margin-top: 30px;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(23, 24, 31, 0.85);
  background: #fff;
  padding: 18px 22px;
}
.patch-tag {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--dark);
  color: var(--tip-name);
  padding: 4px 8px;
  margin-bottom: 10px;
}
.patch p { margin: 0 0 6px; font-size: 15px; }
.patch-note { color: var(--muted); font-size: 13.5px; margin: 0; }

/* ================= faq ================= */
.sec-faq { max-width: 860px; }
.faqs details { border-bottom: 1px solid var(--line); }
.faqs summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 4px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faqs summary::-webkit-details-marker { display: none; }
.faqs summary::after {
  content: "+";
  font-family: var(--font-pixel);
  color: var(--accent-deep);
  font-size: 18px;
  flex-shrink: 0;
}
.faqs details[open] summary::after { content: "\2013"; }
.faqs details p { margin: 0; padding: 0 4px 18px; color: var(--muted); font-size: 15px; max-width: 700px; }

/* ================= end ================= */
.endwrap { border-top: 2px solid var(--ink); background: var(--accent-pale); }
.end {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 4vw, 44px);
  padding: clamp(36px, 6vw, 64px) 0;
  flex-wrap: wrap;
  text-align: left;
}
.end-logo { width: clamp(72px, 9vw, 104px); border-radius: 20px; box-shadow: 6px 6px 0 rgba(23,24,31,.85); }
.end .crumb { margin-bottom: 12px; }

/* ================= footer ================= */
.foot { border-top: 2px solid var(--ink); background: var(--paper); }
.foot-in {
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot p { margin: 0; color: var(--muted); font-size: 12.5px; max-width: 640px; }
.foot nav { display: flex; gap: 18px; }
.foot nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* ================= reveal (single subtle motion) ================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

/* ================= responsive ================= */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .lede { max-width: none; }
  .tip-frame { max-width: 560px; }
  .dolist { grid-template-columns: 1fr; }
  .dl-plate { grid-template-columns: 1fr; }

  .mast-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 2px solid var(--ink);
    padding: 6px 24px 14px;
  }
  .mast-nav.open { display: flex; }
  .mast-nav a { padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .mast-nav a:last-child { border-bottom: none; }
  .burger { display: flex; }
  .mast .mc-btn { display: none; }
}

@media (max-width: 560px) {
  .wrap { width: min(1080px, 100% - 32px); }
  .slot { width: 38px; height: 38px; }
  .slot img { width: 21px; height: 21px; }
  .hero-actions .mc-btn, .hero-actions .ghost-btn { width: 100%; }
  .gstep { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .slot, .mc-btn, .ghost-btn { transition: none; }
}

/* ============================================================
   Motion pack — game-flavored animations
   ============================================================ */

/* ---------- XP-bar scroll progress ---------- */
.xpbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  z-index: 90;
  background: #141219;
  border-bottom: 2px solid #000;
  pointer-events: none;
}
.xpbar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(0, 0, 0, 0.4) 22px 24px);
}
.xpbar-fill {
  height: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: #7ce32b;
  box-shadow: inset 0 2px 0 #b8ff7d, inset 0 -3px 0 #4e9418;
}

/* ---------- splash text (main-menu style) ---------- */
.hero-title-wrap { position: relative; display: inline-block; }
.splash {
  position: absolute;
  top: -16px;
  right: clamp(-26px, -1vw, -10px);
  transform: rotate(-12deg);
  z-index: 2;
  pointer-events: none;
  font-family: var(--font-pixel);
  font-size: clamp(10px, 1.4vw, 14px);
  color: #ffff55;
  text-shadow: 2px 2px 0 #3d3d00;
  white-space: nowrap;
}
.splash-txt {
  display: inline-block;
  animation: splashpulse 0.9s ease-in-out infinite;
}
.splash.swap .splash-txt { animation: splashin 0.32s ease, splashpulse 0.9s ease-in-out 0.32s infinite; }
@keyframes splashpulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes splashin {
  from { transform: scale(0.4) rotate(8deg); opacity: 0; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* ---------- floating block particles in hero ---------- */
.hero { position: relative; }
.hero-copy, .hero-shot { position: relative; z-index: 1; }
.px {
  position: absolute;
  bottom: -12px;
  z-index: 0;
  animation-name: pxrise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
@keyframes pxrise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: 0.75; }
  85% { opacity: 0.5; }
  100% { transform: translate3d(var(--dx, 30px), calc(-100vh - 40px), 0); opacity: 0; }
}

/* ---------- hotbar: pop-in + cycling selector ---------- */
.hotbar { position: relative; }
.hotbar.in .slot {
  animation: slotpop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--i, 0) * 70ms);
}
.slot:nth-child(1) { --i: 0; } .slot:nth-child(2) { --i: 1; }
.slot:nth-child(3) { --i: 2; } .slot:nth-child(4) { --i: 3; }
.slot:nth-child(5) { --i: 4; } .slot:nth-child(6) { --i: 5; }
.slot:nth-child(7) { --i: 6; } .slot:nth-child(8) { --i: 7; }
.slot:nth-child(9) { --i: 8; }
@keyframes slotpop {
  0% { transform: scale(0) translateY(10px); }
  70% { transform: scale(1.18) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}
.hb-sel {
  position: absolute;
  top: 0;
  left: 0;
  width: 50px;
  height: 50px;
  border: 3px solid #ececec;
  border-radius: 2px;
  box-shadow: 0 0 0 2px #000, inset 0 0 0 2px #000;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
  z-index: 3;
}
.hotbar.in .hb-sel { opacity: 1; }

/* ---------- MC button: game-style hover outline ---------- */
.mc-btn:hover {
  outline: 2px solid #fff;
  outline-offset: 3px;
}
.mc-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- tooltip frame: dropped-item bob ---------- */
.tip-frame { animation: itembob 3.2s ease-in-out infinite; }
@keyframes itembob {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-9px) rotate(0.4deg); }
}

/* ---------- section title underline draws in ---------- */
.sec-title {
  border-bottom: none;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat;
  background-size: 0% 3px;
  background-position: left bottom;
  transition: background-size 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.sec-title.in { background-size: 100% 3px; }

/* ---------- feature list: marker bounce on hover ---------- */
.doitem h3::before { transition: transform 0.18s ease; }
.doitem:hover h3::before { transform: translate(-2px, -2px) rotate(8deg); }

/* ---------- FAQ: content slides in when opened ---------- */
.faqs details p { animation: fqin 0.28s ease; }
@keyframes fqin {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: none; }
}
.faqs summary::after { transition: transform 0.2s ease; }
.faqs details[open] summary::after { transform: rotate(180deg); }

/* ---------- install numbers bounce when revealed ---------- */
.gstep.in .gnum {
  animation: gnumbounce 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.gstep:nth-child(2) .gnum { animation-delay: 0.08s; }
.gstep:nth-child(3) .gnum { animation-delay: 0.16s; }
.gstep:nth-child(4) .gnum { animation-delay: 0.24s; }
@keyframes gnumbounce {
  0% { transform: scale(0) rotate(-14deg); }
  70% { transform: scale(1.25) rotate(4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* ---------- achievement toast ---------- */
.toast {
  position: fixed;
  top: 18px;
  right: -420px;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: min(400px, calc(100vw - 32px));
  background: #17151f;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px var(--tip-edge), 4px 4px 0 rgba(23, 24, 31, 0.9);
  padding: 13px 20px 13px 15px;
  transition: right 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast.show { right: 18px; }
.toast img { width: 30px; height: 30px; image-rendering: pixelated; flex-shrink: 0; }
.toast-title {
  display: block;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: #ffff55;
  text-shadow: 1px 1px 0 #3d3d00;
  margin-bottom: 3px;
}
.toast span {
  display: block;
  color: #fff;
  font-size: 13.5px;
  word-break: break-all;
}

/* ---------- reduced motion: calm everything ---------- */
@media (prefers-reduced-motion: reduce) {
  .splash-txt, .splash.swap .splash-txt { animation: none; }
  .px { display: none; }
  .hb-sel { opacity: 0 !important; transition: none; }
  .hotbar.in .slot { animation: none; }
  .gstep.in .gnum { animation: none; }
  .tip-frame { animation: none; }
  .toast { transition: none; }
  .sec-title { transition: none; }
}

/* ============================================================
   Juice pack v2 — tilt, bursts, back-to-top, responsive polish
   ============================================================ */

/* ---------- 3D tilt wrapper (JS-driven) ---------- */
.hero-shot { perspective: 950px; }
.tilt {
  transition: transform 0.12s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

/* ---------- click burst (block-break puffs) ---------- */
.burst {
  position: fixed;
  z-index: 400;
  width: 6px;
  height: 6px;
  pointer-events: none;
  animation: burstfly 0.55s ease-out forwards;
}
@keyframes burstfly {
  to { transform: translate(var(--bx), var(--by)) scale(0.2); opacity: 0; }
}

/* ---------- back to top (MC button, pixel arrow) ---------- */
.totop {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 250;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-family: var(--font-pixel);
  font-size: 18px;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
  background: var(--accent);
  border: 2px solid var(--dark-edge);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.28),
    inset 0 -4px 0 rgba(0, 0, 0, 0.22),
    3px 3px 0 var(--dark-edge);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--accent-deep); outline: 2px solid #fff; outline-offset: 2px; }
.totop:active { transform: translate(3px, 3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.28), inset 0 -2px 0 rgba(0,0,0,.22); }

/* ---------- responsive polish ---------- */
@media (max-width: 920px) {
  .tip-frame { margin: 0 auto; max-width: 640px; }
  .splash { right: -4px; top: -14px; }
}

@media (max-width: 760px) {
  .hero { padding-top: 34px; }
  .dolist { grid-template-columns: 1fr; }
  .slot { width: 42px; height: 42px; }
  .slot img { width: 23px; height: 23px; }
  .sec-title { margin-bottom: 22px; }
  .dl-plate { padding: 22px; }
}

@media (max-width: 400px) {
  .slot { width: 36px; height: 36px; margin-left: -2px; }
  .slot img { width: 20px; height: 20px; }
  .totop { right: 12px; bottom: 12px; width: 40px; height: 40px; }
  .toast { max-width: calc(100vw - 24px); }
  .crumb { font-size: 10px; }
}

/* height-constrained landscape phones */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding-top: 20px; padding-bottom: 10px; }
  .tip-frame { animation: none; }
  .hotbar { padding-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .burst { display: none; }
  .tilt { transition: none; }
  .totop { transition: none; }
}


/* ---- applied hero: option 3 "into the world" ---- */
.world { padding: clamp(20px, 3.5vw, 40px) 0 0; }
.world-strip {
  position: relative;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: url("../img/hero.jpg") center 38% / cover no-repeat;
  min-height: clamp(440px, 62vh, 620px);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.world-strip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(23, 20, 38, 0.72) 0%, rgba(23, 20, 38, 0.42) 46%, rgba(23, 20, 38, 0.1) 75%);
  z-index: 1;
}
.world-strip .wrap { position: relative; z-index: 2; width: min(1080px, 100% - 48px); }

.world-card {
  position: relative;
  max-width: 480px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(10, 8, 18, 0.55);
  padding: clamp(24px, 4vw, 40px);
  border-radius: 4px;
}
.world-card .crumb { color: var(--accent-deep); }
.world-card h1 {
  position: relative;
  display: inline-block;
  font-size: clamp(40px, 5.6vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  color: var(--ink);
}
.world-card .splash { top: -14px; right: -18px; }
.world-card .lede { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.world-ghost { background: var(--paper); }

/* pixel clouds drifting */
.clouds { position: absolute; top: 26px; left: 0; right: 0; height: 70px; z-index: 2; pointer-events: none; }
.clouds i {
  position: absolute;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.5);
  animation: clouddrift linear infinite;
}
.clouds i::before {
  content: "";
  position: absolute;
  left: 18%;
  top: -55%;
  width: 45%;
  height: 60%;
  background: inherit;
}
.clouds i:nth-child(1) { width: 120px; height: 22px; top: 0; animation-duration: 46s; }
.clouds i:nth-child(2) { width: 80px; height: 16px; top: 34px; animation-duration: 60s; animation-delay: -20s; }
.clouds i:nth-child(3) { width: 150px; height: 26px; top: 8px; animation-duration: 52s; animation-delay: -35s; }
.clouds i:nth-child(4) { width: 60px; height: 14px; top: 48px; animation-duration: 70s; animation-delay: -10s; }
.clouds i:nth-child(5) { width: 100px; height: 20px; top: 22px; animation-duration: 40s; animation-delay: -28s; }
@keyframes clouddrift {
  from { left: -180px; }
  to { left: 105%; }
}

/* wooden sign with the version */
.sign {
  position: absolute;
  right: clamp(20px, 6vw, 90px);
  bottom: 0;
  z-index: 2;
  text-align: center;
  animation: itembob 3.6s ease-in-out infinite;
}
.sign-board {
  display: block;
  background: #8a6a43;
  border: 2px solid #000;
  box-shadow: inset 0 0 0 2px #a58155, 3px 3px 0 rgba(0, 0, 0, 0.45);
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 15px;
  padding: 8px 16px 9px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.sign-post { display: block; width: 10px; height: 34px; background: #6d5233; border: 2px solid #000; border-top: none; margin: 0 auto; }

@media (max-width: 920px) {
  .world-card { margin-inline: auto; }
  .world-strip::after { background: linear-gradient(180deg, rgba(23,20,38,.55), rgba(23,20,38,.7)); }
}
@media (max-width: 560px) {
  .world-strip { min-height: 520px; }
  .sign { display: none; }
}


/* particles need to sit above the panorama overlay in the world hero */
.world-strip .px { z-index: 2; }
