/* Kharan Studio — v6
   Quiet, dense storefront. One loud element: the two-world switch at the top.
   The accent colour follows the selected game (html[data-platform]).
   Extra game modules (./platforms/*.js) inject their own styles. */

@font-face {
  font-family: "Marston";
  src: local("Marston"), url("./assets/fonts/Marston.otf") format("opentype");
  font-display: swap;
}

:root {
  --ink: #0c0a0b;
  --ink-2: #141113;
  --ink-3: #1d191b;
  --paper: #f1ebe3;
  --muted: #a69c95;
  --muted-2: #6f6660;
  --line: rgba(241, 235, 227, .10);
  --line-2: rgba(241, 235, 227, .20);

  --rdr2: #c8202c;
  --rdr2-hi: #e1323e;

  --accent: var(--rdr2);
  --accent-hi: var(--rdr2-hi);
  --on-accent: #fff;

  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --brand: "Marston", var(--display);

  --wrap: min(100% - 40px, 1440px);
  --head: 60px;
  --r: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head) + 56px); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 15px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: var(--wrap); margin-inline: auto; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 12px; background: var(--paper); color: var(--ink); border-radius: var(--r); }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--r);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--accent { background: var(--accent); color: var(--on-accent); }
.btn--accent:hover { background: var(--accent-hi); }
.btn--line { border-color: var(--line-2); background: transparent; color: var(--paper); }
.btn--line:hover { border-color: var(--paper); }
.btn--sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .55; cursor: progress; }

.linkBtn { border: 0; background: none; padding: 0; color: var(--paper); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.dot--live { background: #3ccf7a; box-shadow: 0 0 0 3px rgba(60, 207, 122, .18); }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  background: rgba(12, 10, 11, .86);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.is-scrolled { border-bottom-color: var(--line); }
.top__in { width: var(--wrap); margin-inline: auto; height: var(--head); display: flex; align-items: center; gap: 20px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 34px; height: 34px; object-fit: contain; }
.brand__name { font-family: var(--brand); font-size: 19px; letter-spacing: .02em; line-height: 1; }

.switch { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2); flex: none; }
.switch__btn {
  height: 30px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent;
  color: var(--muted); font: 700 15px/1 var(--display); letter-spacing: .06em;
  transition: background-color .2s, color .2s;
}
.switch__btn:hover { color: var(--paper); }
.switch__btn[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }

.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { padding: 8px 10px; border-radius: var(--r); color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav a:hover { color: var(--paper); background: var(--ink-2); }

.actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.act {
  height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r); background: transparent;
  color: var(--paper); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.act:hover { border-color: var(--line-2); }
.act--account { max-width: 180px; }
.act--account span { overflow: hidden; text-overflow: ellipsis; }
.act--account.is-connected svg { color: #3ccf7a; }
.act__count {
  min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center;
  border-radius: 10px; background: var(--ink-3); color: var(--muted); font-size: 12px; font-weight: 700;
}
.act__count.is-active { background: var(--accent); color: var(--on-accent); }
.act--store { background: var(--paper); color: var(--ink); border-color: var(--paper); font-weight: 600; }
.act--store:hover { background: #fff; }
.act--menu { display: none; width: 40px; padding: 0; justify-content: center; flex-direction: column; gap: 5px; }
.act--menu span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s; }
.navOpen .act--menu span:first-child { transform: translateY(3.25px) rotate(45deg); }
.navOpen .act--menu span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- the two worlds ---------- */
.worlds {
  display: flex; gap: 6px;
  width: var(--wrap); margin: 16px auto 0;
  height: clamp(430px, 60vh, 560px);
}
.world {
  position: relative; overflow: hidden; isolation: isolate;
  flex: 1 1 0; min-width: 0;
  border-radius: 8px; background: var(--ink-2);
  transition: flex-grow .6s var(--ease);
}
.world.is-active { flex-grow: 6; }

.world__bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: center 35%; }
.world--rdr2 .world__bg { background-color: #1a0e0d; opacity: 0; transition: opacity .6s; }
.world--rdr2 .world__bg.is-loaded { opacity: 1; }
.world--rdr2::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 10, 11, .94) 0%, rgba(12, 10, 11, .72) 42%, rgba(12, 10, 11, .18) 100%),
              linear-gradient(0deg, rgba(12, 10, 11, .7), transparent 40%);
}

.world__body {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(24px, 4vw, 52px);
  max-width: 760px;
  transition: opacity .35s .2s, transform .5s .15s var(--ease);
}
/* text left, latest video right */
.world__layout {
  position: relative; z-index: 1; height: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: end;
  gap: clamp(24px, 3vw, 52px);
  padding: clamp(24px, 4vw, 52px);
}
.world__layout .world__body { padding: 0; height: auto; max-width: none; }
.world__media { margin: 0; align-self: center; transition: opacity .35s .25s, transform .5s .2s var(--ease); }
.world__media .video { box-shadow: 0 24px 70px rgba(0, 0, 0, .5); border-color: var(--line-2); }
.world__media .video > div, .world__media .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.world__now { display: flex; align-items: baseline; gap: 10px; min-width: 0; margin-top: 10px; font-size: 14px; }
.world__now span { flex: none; color: var(--muted); }
.world__now a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; text-decoration: none; }
.world__now a:hover { text-decoration: underline; text-underline-offset: 3px; }
.world:not(.is-active) :is(.world__body, .world__media) { opacity: 0; transform: translateY(10px); visibility: hidden; transition: opacity .2s, visibility 0s .2s; }

.world__game { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: var(--muted); font-size: 14px; font-weight: 500; }
.world__title {
  margin: 0; font: 900 clamp(52px, 7.4vw, 116px)/.86 var(--display);
  text-transform: uppercase; letter-spacing: -.005em;
  text-wrap: balance;
}
.world__lead { margin: 18px 0 0; max-width: 52ch; color: #d8cfc6; font-size: 17px; line-height: 1.5; }
.world__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.world__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 28px 0 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.world__facts b { color: var(--paper); font-weight: 600; }

/* collapsed state: the whole panel becomes the switch */
.world__tab {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 24px 0; border: 0; background: transparent; color: var(--paper);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.world:not(.is-active) .world__tab { opacity: 1; pointer-events: auto; transition-delay: .3s; }
.world:not(.is-active):hover { background-color: var(--ink-3); }
.world__tabName {
  writing-mode: vertical-rl; transform: rotate(180deg);
  font: 900 clamp(34px, 3.4vw, 52px)/1 var(--display); letter-spacing: .02em;
}
.world__tabState { writing-mode: vertical-rl; transform: rotate(180deg); color: var(--muted); font-size: 13px; font-weight: 500; }
.world--rdr2 .world__tabName { color: var(--rdr2-hi); }

/* ---------- towns ---------- */
.towns {
  width: var(--wrap); margin: 6px auto 0;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px;
}
.town {
  position: relative; isolation: isolate; overflow: hidden;
  height: 92px; padding: 0 12px 10px;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  border: 1px solid var(--line); border-radius: 6px; background: var(--ink-3);
  color: var(--paper); text-align: left;
  transition: border-color .2s;
}
.town img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease), filter .3s; filter: saturate(.85) brightness(.85); }
.town::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 10, 11, 0) 20%, rgba(12, 10, 11, .88) 100%); }
.town:hover { border-color: var(--line-2); }
.town:hover img { transform: scale(1.06); filter: saturate(1) brightness(.95); }
.town[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.town__name { font: 800 19px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.town__n { margin-top: 3px; color: #cfc6bd; font-size: 12px; }

/* ---------- store ---------- */
.store { padding: 44px 0 64px; }
.store__head { display: flex; align-items: flex-end; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 18px; }
.store__title { margin: 0; font: 800 clamp(32px, 3.4vw, 46px)/.95 var(--display); text-transform: uppercase; }
.store__title [data-platform-name] { color: var(--accent); }
.store__status { margin: 0 0 4px; color: var(--muted); font-size: 14px; }
.store__tools { margin-left: auto; display: flex; gap: 8px; }

.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 11px; color: var(--muted-2); pointer-events: none; }
.search input, .sort select {
  height: 38px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2);
  font-size: 14px; outline: none;
}
.search input { width: 240px; padding: 0 12px 0 34px; }
.search input::placeholder { color: var(--muted-2); }
.sort select { padding: 0 32px 0 12px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a69c95' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.search input:focus, .sort select:focus { border-color: var(--accent); }

.cats {
  position: sticky; top: var(--head); z-index: 20;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -2px; padding: 8px 2px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: none; height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px;
  border: 0; border-radius: var(--r); background: transparent; color: var(--muted);
  font-size: 14px; font-weight: 600;
}
.cat:hover { color: var(--paper); background: var(--ink-2); }
.cat__n { color: var(--muted-2); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.cat[aria-selected="true"] { color: var(--paper); background: var(--ink-3); box-shadow: inset 0 -2px 0 var(--accent); }

.subcats { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; }
.chip { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 15px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 500; }
.chip span { color: var(--muted-2); margin-left: 2px; }
.chip:hover { color: var(--paper); border-color: var(--line-2); }
.chip[aria-pressed="true"] { color: var(--paper); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

.grid {
  display: grid; gap: 14px; margin-top: 16px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}
.item { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-2); overflow: hidden; }
.item__media { position: relative; aspect-ratio: 16 / 10; background: var(--ink-3); overflow: hidden; }
.item__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.item:hover .item__media img { transform: scale(1.035); }
.item__ph { position: absolute; inset: 0; display: grid; place-items: center; font: 800 28px var(--display); color: var(--muted-2); }
.item__body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.item__cat { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 500; }
.item__name { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__name a { text-decoration: none; }
.item__name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.item__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; }
.item__price { font: 800 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.item__price.is-free { color: #3ccf7a; }
.item__actions { display: flex; gap: 6px; }
.iconBtn {
  width: 34px; height: 34px; display: inline-grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; color: var(--paper);
  transition: border-color .15s, background-color .15s;
}
.iconBtn:hover { border-color: var(--paper); }
.iconBtn.is-done { background: #3ccf7a; border-color: #3ccf7a; color: #08130c; }
.is-loading { cursor: progress; opacity: .7; }

.item--ghost .item__media { animation: pulse 1.4s ease-in-out infinite; }
.item--ghost .item__body span { display: block; height: 12px; margin: 4px 0 8px; border-radius: 2px; background: var(--ink-3); width: 40%; }
.item--ghost .item__body span + span { width: 80%; height: 16px; }
@keyframes pulse { 50% { opacity: .5; } }

.empty { grid-column: 1 / -1; padding: 48px 20px; border: 1px dashed var(--line-2); border-radius: 6px; text-align: center; color: var(--muted); }
.empty p { margin: 0 0 14px; }
.empty__cta { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }


/* ---------- studio ---------- */
.studio { padding: 56px 0 64px; border-top: 1px solid var(--line); background: var(--ink-2); }
.studio__in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.studio__yt { display: inline-block; margin-top: 18px; color: var(--paper); font-size: 14px; font-weight: 600; text-underline-offset: 3px; }
.studio__yt:hover { color: var(--accent-hi); }
.studio__title { margin: 0; font: 800 clamp(32px, 3.2vw, 46px)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }
.studio__copy > p { margin: 14px 0 0; color: var(--muted); max-width: 52ch; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }
.facts dd a { color: var(--paper); text-underline-offset: 3px; white-space: nowrap; }
.facts dd a:hover { color: var(--accent-hi); }

/* ---------- custom orders page ---------- */
.phero {
  position: relative; overflow: hidden; isolation: isolate;
  width: var(--wrap); margin: 16px auto 0; border-radius: 8px; background: var(--ink-2);
}
.phero__bg { position: absolute; inset: 0; z-index: -1; background: #1a0e0d url("./gallery/large/Giant%20Maze.webp") center 40% / cover no-repeat; }
.phero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(12, 10, 11, .95) 0%, rgba(12, 10, 11, .78) 45%, rgba(12, 10, 11, .35) 100%),
              linear-gradient(0deg, rgba(12, 10, 11, .75), transparent 45%);
}
.phero__in {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: end;
  gap: clamp(24px, 3vw, 52px);
  min-height: clamp(420px, 56vh, 540px);
  padding: clamp(24px, 4vw, 52px);
}
.phero__copy { max-width: 680px; }
.services { margin: 0; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(12, 10, 11, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.services div { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.services div:last-child { border-bottom: 0; }
.services dt { font: 800 21px/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.services dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.sec__title { margin: 0; font: 800 clamp(30px, 3vw, 44px)/.95 var(--display); text-transform: uppercase; text-wrap: balance; }

.steps { padding: 56px 0 48px; }
.steps__in { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.steps__head p { margin: 14px 0 0; color: var(--muted); max-width: 44ch; }
.steps__list { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.steps__list li { counter-increment: step; padding: 18px 18px 20px; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: 4px; background: var(--ink-2); }
.steps__list li::before { content: counter(step); display: block; margin-bottom: 12px; font: 900 40px/1 var(--display); color: var(--accent); }
.steps__list h3 { margin: 0; font-size: 16px; font-weight: 600; }
.steps__list p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.steps__list a { color: var(--paper); text-underline-offset: 3px; }

.work { padding: 8px 0 64px; }
.work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 32px; flex-wrap: wrap; margin-bottom: 18px; }
.work__head p { margin: 0; color: var(--muted); max-width: 52ch; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.gallery[aria-busy="true"] { min-height: 240px; }
.shot { margin: 0; min-width: 0; }
.shot__btn { display: block; width: 100%; padding: 0; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--ink-3); cursor: zoom-in; }
.shot__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.shot__btn:hover img { transform: scale(1.035); }
.shot figcaption { margin-top: 8px; font-size: 14px; font-weight: 600; }
.shot figcaption span { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.gallery__empty { grid-column: 1 / -1; padding: 40px 20px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); text-align: center; }

.cta { padding: 44px 0; border-top: 1px solid var(--line); background: var(--ink-2); }
.cta__in { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; }
.cta p { margin: 10px 0 0; color: var(--muted); max-width: 56ch; }

.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(6, 5, 6, .95); color: var(--paper); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox__fig { margin: 0; max-width: min(1600px, calc(100vw - 140px)); }
.lightbox__fig img { display: block; max-width: 100%; max-height: calc(100dvh - 120px); width: auto; margin: 0 auto; border-radius: 4px; object-fit: contain; }
.lightbox__fig figcaption { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; font-size: 14px; font-weight: 600; }
.lightbox__count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.lightbox__btn { position: fixed; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 50%; background: rgba(20, 17, 19, .9); color: var(--paper); }
.lightbox__btn:hover { border-color: var(--paper); }
.lightbox__btn--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__btn--close { right: 20px; top: 20px; }
.lbOpen { overflow: hidden; }
.nav a[aria-current="page"] { color: var(--paper); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }

/* ---------- footer ---------- */
.foot { padding: 28px 0 36px; border-top: 1px solid var(--line); }
.foot__in { display: grid; grid-template-columns: auto 1fr; gap: 16px 32px; align-items: center; }
.brand--foot img { width: 28px; height: 28px; }
.brand--foot .brand__name { font-size: 16px; }
.foot__nav { display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: flex-end; }
.foot__nav a { color: var(--muted); font-size: 14px; text-decoration: none; }
.foot__nav a:hover { color: var(--paper); }
.foot__legal { grid-column: 1 / -1; margin: 6px 0 0; color: var(--muted-2); font-size: 12px; max-width: 110ch; }

/* ---------- cart drawer ---------- */
.cartBackdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .25s; }
.cartOpen .cartBackdrop { opacity: 1; }
.cartOpen { overflow: hidden; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(420px, 100vw); display: flex; flex-direction: column;
  background: var(--ink-2); border-left: 1px solid var(--line);
  transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden;
}
.cartOpen .drawer { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__title { margin: 0; font: 800 28px/1 var(--display); text-transform: uppercase; }
.drawer__close { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); background: transparent; }
.drawer__close:hover { border-color: var(--line-2); }
.drawer__account { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.drawer__account #cartAccountText { flex: 1; }
.drawer__account.is-connected .dot { background: #3ccf7a; }
.drawer__account.is-connected #cartAccountText { color: var(--paper); }
.drawer__body { flex: 1; overflow-y: auto; padding: 8px 20px; }
.drawer__empty { padding: 40px 0; color: var(--muted); }
.drawer__empty p { margin: 0 0 6px; }
.drawer__empty strong { color: var(--paper); }
.drawer__empty .btn { margin-top: 12px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.line__media { aspect-ratio: 16 / 10; border-radius: 3px; overflow: hidden; background: var(--ink-3); }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.line__copy strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line__copy span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.line__remove { border: 0; background: none; padding: 4px; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.line__remove:hover { color: var(--paper); }
.drawer__foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); }
.coupon label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.coupon__row { display: flex; gap: 6px; }
.coupon__row input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); outline: none; text-transform: uppercase; }
.coupon__row input:focus { border-color: var(--accent); }
.coupon__row button { height: 38px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: transparent; font-weight: 600; font-size: 13px; }
.coupon__applied { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.coupon__applied span { padding: 2px 8px; border-radius: 3px; background: rgba(60, 207, 122, .14); color: #6be39f; font-size: 12px; font-weight: 600; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; }
.drawer__total span { color: var(--muted); }
.drawer__total strong { font: 800 30px/1 var(--display); font-variant-numeric: tabular-nums; }
.drawer__note { margin: 6px 0 14px; color: var(--muted-2); font-size: 12px; }
.drawer__fallback { display: block; margin-top: 12px; text-align: center; color: var(--muted); font-size: 13px; text-underline-offset: 3px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 80;
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 16px;
  border-radius: 6px; background: var(--paper); color: var(--ink); font-size: 14px; font-weight: 500;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .25s var(--ease), opacity .25s;
}
.toast[data-type="error"] { background: #2a1214; color: #ffd9dc; border: 1px solid #6b1f26; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .act--store { display: none; }
}
@media (max-width: 980px) {
  .act--menu { display: inline-flex; }
  .nav {
    position: fixed; top: var(--head); left: 0; right: 0; z-index: 39;
    flex-direction: column; gap: 0; margin: 0; padding: 8px 20px 16px;
    background: var(--ink); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility 0s .2s;
  }
  .nav a { padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a:hover { background: none; }
  .navOpen .nav { transform: none; opacity: 1; visibility: visible; transition: opacity .2s, transform .2s; }
  .studio__in { grid-template-columns: 1fr; }
  .phero__in { grid-template-columns: 1fr; min-height: 0; padding-top: clamp(80px, 18vw, 160px); }
  .steps__in { grid-template-columns: 1fr; }
  .worlds { height: auto; min-height: 430px; }
  .world__layout { grid-template-columns: 1fr; align-items: start; }
  .world__media { max-width: 720px; }
  .towns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --wrap: min(100% - 24px, 1440px); }
  .top__in { gap: 10px; }
  .brand__name { display: none; }
  .act--account span { display: none; }
  .act { padding: 0 10px; }

  .worlds { flex-direction: column; height: auto; gap: 6px; margin-top: 12px; }
  .world { flex: none; transition: none; }
  .world.is-active { min-height: 440px; }
  .world:not(.is-active) { height: 64px; }
  .world__tab { flex-direction: row; padding: 0 18px; }
  .world__tabName, .world__tabState { writing-mode: horizontal-tb; transform: none; }
  .world__tabName { font-size: 30px; }
  .world--rdr2::before { background: linear-gradient(0deg, rgba(12, 10, 11, .96) 20%, rgba(12, 10, 11, .45) 100%); }
  .world__lead { font-size: 16px; }
  .world__facts { gap: 6px 18px; }

  .towns {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    width: 100%; padding: 0 12px; gap: 6px; scroll-padding-inline: 12px;
  }
  .towns::-webkit-scrollbar { display: none; }
  .town { flex: 0 0 138px; height: 80px; scroll-snap-align: start; }
  .town__name { font-size: 17px; }
  .store { padding-top: 32px; }
  .store__tools { margin-left: 0; width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .item__body { padding: 10px; }
  .item__name { font-size: 14px; }
  .item__foot { flex-wrap: wrap; gap: 8px; }
  .item__price { font-size: 19px; }
  .item__actions { width: 100%; }
  .item__actions .btn { flex: 1; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .steps__list { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .shot figcaption { font-size: 13px; }
  .lightbox__fig { max-width: calc(100vw - 24px); }
  .lightbox__btn--prev, .lightbox__btn--next { top: auto; bottom: 20px; transform: none; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--accent-hi); }
  .foot__in { grid-template-columns: 1fr; }
  .foot__nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}
