/* helloJAKco — palette from moodPictures/mood_01–04 (leaning on 04) */
@view-transition { navigation: auto; }

:root {
  --ink: #1d1b1f;
  --ink-2: #3b383c;
  --muted: #5e5753;
  --paper: #ece6de;
  --paper-2: #e2dad0;
  --card: #f5f0e9;
  --taupe: #9d9591;
  --line: rgba(29, 27, 31, .12);
  --accent: #b07a55;
  --accent-deep: #8a5534;
  --accent-glow: rgba(176, 122, 85, .35);
  --umber: #6b5546;
  --night: #1d1b1f;
  --night-2: #2a272b;
  --on-night: #efe8dd;
  --on-night-muted: #b9afa6;

  --accent-2: #b07a55;
  --accent-soft: rgba(214, 160, 122, .14);
  --accent-on-night: #d6a07a;
  --accent-on-night-2: #d6a07a;
  --on-night-line: rgba(239, 232, 221, .14);
  --mark: url("/assets/logo.svg");
  --cubes: url("/assets/cubes.svg");
  --cube-blend: multiply;
  /* hero cubes: top / left / right faces */
  --c1t: #cfc6bc; --c1l: #2a272b; --c1r: #5b5559;
  --c2t: #c08a62; --c2l: #6b5546; --c2r: #8f6a50;
  --c3t: #efe8dd; --c3l: #3b383c; --c3r: #9d9591;
  --c4t: #8a7b70; --c4l: #1d1b1f; --c4r: #4a4649;
  --c5t: #e9e0d3; --c5l: #7a4d30; --c5r: #b07a55;

  --radius: 22px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 20px 40px -24px rgba(29,27,31,.35);
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #efe8dd;
    --ink-2: #d4cbc1;
    --muted: #a99f97;
    --paper: #171518;
    --paper-2: #1f1c20;
    --card: #232025;
    --line: rgba(239, 232, 221, .1);
    --accent: #c8916a;
    --accent-deep: #d9a37c;
    --accent-glow: rgba(200, 145, 106, .28);
    --accent-2: #c8916a;
    --cube-blend: normal;
    --night: #0f0e10;
    --night-2: #1a181b;
    --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #efe8dd; --ink-2: #d4cbc1; --muted: #a99f97;
  --paper: #171518; --paper-2: #1f1c20; --card: #232025;
  --line: rgba(239, 232, 221, .1);
  --accent: #c8916a; --accent-deep: #d9a37c; --accent-glow: rgba(200,145,106,.28); --accent-2: #c8916a; --cube-blend: normal;
  --night: #0f0e10; --night-2: #1a181b;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- palette: plum (garnet + violet) — opt in with ?palette=plum ---------- */
:root[data-palette="plum"] {
  --ink: #1f1424;
  --ink-2: #3d2a45;
  --muted: #6b5872;
  --paper: #f4eef3;
  --paper-2: #ebe2ea;
  --card: #fcf9fb;
  --taupe: #a28fa6;
  --line: rgba(31, 20, 36, .12);
  --accent: #b0234a;
  --accent-deep: #8c1c3b;
  --accent-2: #6b2fa0;
  --accent-glow: rgba(176, 35, 74, .28);
  --accent-soft: rgba(232, 106, 140, .14);
  --accent-on-night: #f07a9a;
  --accent-on-night-2: #b78cf0;
  --umber: #5a2d5f;
  --night: #1b0f20;
  --night-2: #261630;
  --on-night: #f5edf3;
  --on-night-muted: #c1b0c6;
  --on-night-line: rgba(245, 237, 243, .14);
  --mark: url("/assets/logo-plum.svg");
  --cubes: url("/assets/cubes-plum.svg");
  --c1t: #e6d6e4; --c1l: #2a1830; --c1r: #5a3a63;
  --c2t: #d23b5e; --c2l: #6e1f3a; --c2r: #9c2a4c;
  --c3t: #f7eff5; --c3l: #3b2742; --c3r: #a48fa8;
  --c4t: #8b62a8; --c4l: #1f1424; --c4r: #4b3157;
  --c5t: #f2dce6; --c5l: #5b2a86; --c5r: #b0234a;
}
@media (prefers-color-scheme: dark) {
  :root[data-palette="plum"]:not([data-theme="light"]) {
    --ink: #f5edf3; --ink-2: #ddd0dc; --muted: #ad9db2;
    --paper: #150c19; --paper-2: #1d1222; --card: #221628;
    --line: rgba(245, 237, 243, .1);
    --accent: #e8517a; --accent-deep: #f07a9a; --accent-2: #a978e8; --cube-blend: normal;
    --accent-glow: rgba(232, 81, 122, .26);
    --night: #0e0711; --night-2: #1a0f1f;
  }
}
:root[data-palette="plum"][data-theme="dark"] {
  --ink: #f5edf3; --ink-2: #ddd0dc; --muted: #ad9db2;
  --paper: #150c19; --paper-2: #1d1222; --card: #221628;
  --line: rgba(245, 237, 243, .1);
  --accent: #e8517a; --accent-deep: #f07a9a; --accent-2: #a978e8; --cube-blend: normal;
  --accent-glow: rgba(232, 81, 122, .26);
  --night: #0e0711; --night-2: #1a0f1f;
}

/* ---------- palettes: berry, wine & slate, violet, night ---------- */
:root[data-palette="berry"] {
  --ink: #22102a; --ink-2: #43234f; --muted: #6e5876;
  --paper: #fbf1f6; --paper-2: #f3e2ec; --card: #fffafd; --line: rgba(34,16,42,.12);
  --accent: #d1196b; --accent-deep: #a3104f; --accent-2: #7b2cbf;
  --accent-glow: rgba(209,25,107,.28); --accent-soft: rgba(240,90,160,.16);
  --accent-on-night: #ff6fae; --accent-on-night-2: #c49bff;
  --night: #2a0f36; --night-2: #3a1748;
  --on-night: #fbeef6; --on-night-muted: #d2b8d8; --on-night-line: rgba(251,238,246,.14);
  --mark: url("/assets/logo-berry.svg"); --cubes: url("/assets/cubes-berry.svg");
  --c1t: #f6d7e6; --c1l: #2a0f36; --c1r: #5c2a72;
  --c2t: #ec3f8a; --c2l: #8a0f47; --c2r: #c2186a;
  --c3t: #fff4fa; --c3l: #43234f; --c3r: #b99ac4;
  --c4t: #9d5bd2; --c4l: #22102a; --c4r: #56307a;
  --c5t: #ffd6e8; --c5l: #7b2cbf; --c5r: #d1196b;
}
:root[data-palette="wine"] {
  --ink: #1b1f26; --ink-2: #363c47; --muted: #5d6470;
  --paper: #e9ebef; --paper-2: #dde0e6; --card: #f6f7f9; --line: rgba(27,31,38,.12);
  --accent: #9e1b3c; --accent-deep: #7d1530; --accent-2: #6b2d6e;
  --accent-glow: rgba(158,27,60,.26); --accent-soft: rgba(220,90,120,.14);
  --accent-on-night: #f0708f; --accent-on-night-2: #c48fd0;
  --night: #1d2128; --night-2: #282d36;
  --on-night: #eef0f4; --on-night-muted: #aab1bd; --on-night-line: rgba(238,240,244,.14);
  --mark: url("/assets/logo-wine.svg"); --cubes: url("/assets/cubes-wine.svg");
  --c1t: #d6dae1; --c1l: #1d2128; --c1r: #4a515d;
  --c2t: #c0304f; --c2l: #5e1024; --c2r: #8e1d3a;
  --c3t: #f4f5f8; --c3l: #363c47; --c3r: #9aa1ad;
  --c4t: #7a5a8a; --c4l: #1b1f26; --c4r: #454b57;
  --c5t: #e9dfe6; --c5l: #6b2d6e; --c5r: #9e1b3c;
}
:root[data-palette="violet"] {
  --ink: #1a1430; --ink-2: #352b55; --muted: #625a7d;
  --paper: #f1eef9; --paper-2: #e6e1f4; --card: #fbfaff; --line: rgba(26,20,48,.12);
  --accent: #6a3fd1; --accent-deep: #5230ad; --accent-2: #d0245c;
  --accent-glow: rgba(106,63,209,.26); --accent-soft: rgba(150,120,255,.16);
  --accent-on-night: #a98bff; --accent-on-night-2: #ff6f99;
  --night: #17112c; --night-2: #221a3d;
  --on-night: #f2effa; --on-night-muted: #bbb3d6; --on-night-line: rgba(242,239,250,.14);
  --mark: url("/assets/logo-violet.svg"); --cubes: url("/assets/cubes-violet.svg");
  --c1t: #ddd5f3; --c1l: #1a1430; --c1r: #4b3d7a;
  --c2t: #8b63f0; --c2l: #3b2490; --c2r: #6a3fd1;
  --c3t: #f8f6ff; --c3l: #352b55; --c3r: #a79ccc;
  --c4t: #d0245c; --c4l: #1a1430; --c4r: #7a1840;
  --c5t: #e6defc; --c5l: #d0245c; --c5r: #6a3fd1;
}
:root[data-palette="night"] {
  --ink: #f6eef5; --ink-2: #e0d2df; --muted: #b3a2b8;
  --paper: #140b18; --paper-2: #1c1121; --card: #22152a; --line: rgba(246,238,245,.1);
  --accent: #ff4d7d; --accent-deep: #ff7fa0; --accent-2: #b07cff;
  --accent-glow: rgba(255,77,125,.3); --accent-soft: rgba(255,77,125,.16);
  --accent-on-night: #ff7fa0; --accent-on-night-2: #c49bff;
  --night: #0c0610; --night-2: #170d1c;
  --on-night: #f6eef5; --on-night-muted: #b8a6bd; --on-night-line: rgba(246,238,245,.12);
  --mark: url("/assets/logo-night.svg"); --cubes: url("/assets/cubes-night.svg");
  --c1t: #5a3a66; --c1l: #1c0f22; --c1r: #3a2346;
  --c2t: #ff4d7d; --c2l: #8a1238; --c2r: #c41e52;
  --c3t: #e9dbe8; --c3l: #3a2444; --c3r: #8d7896;
  --c4t: #9a6be0; --c4l: #2a1640; --c4r: #5b3a8c;
  --c5t: #ffd0e0; --c5l: #7a3ad0; --c5r: #ff4d7d;
  --cube-blend: normal;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- more dark palettes: crimson, aubergine, midnight, obsidian ---------- */
:root[data-palette="crimson"] {
  --ink: #f7eef0; --ink-2: #e3d3d7; --muted: #b8a3a9;
  --paper: #120a0d; --paper-2: #1a0f13; --card: #21131a; --line: rgba(247,238,240,.1);
  --accent: #ff3344; --accent-deep: #ff6b76; --accent-2: #b07cff;
  --accent-glow: rgba(255,51,68,.32); --accent-soft: rgba(255,51,68,.16);
  --accent-on-night: #ff5a66; --accent-on-night-2: #c49bff;
  --night: #0a0507; --night-2: #150a0e;
  --on-night: #f7eef0; --on-night-muted: #bba5ab; --on-night-line: rgba(247,238,240,.12);
  --mark: url("/assets/logo-crimson.svg"); --cubes: url("/assets/cubes-crimson.svg");
  --c1t: #4a2a33; --c1l: #170b10; --c1r: #2e1820;
  --c2t: #ff3344; --c2l: #7a0e1a; --c2r: #c01c2c;
  --c3t: #ecdde1; --c3l: #3a2229; --c3r: #8f7a80;
  --c4t: #8a5ad6; --c4l: #22122f; --c4r: #53337f;
  --c5t: #ffd3d7; --c5l: #6a2fc0; --c5r: #ff3344;
  --cube-blend: normal;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-palette="aubergine"] {
  --ink: #f6eefa; --ink-2: #e2d4ea; --muted: #b9a6c6;
  --paper: #1d0f2b; --paper-2: #251536; --card: #2c1a40; --line: rgba(246,238,250,.11);
  --accent: #ff4060; --accent-deep: #ff7088; --accent-2: #c08bff;
  --accent-glow: rgba(255,64,96,.3); --accent-soft: rgba(255,64,96,.16);
  --accent-on-night: #ff6680; --accent-on-night-2: #cfa6ff;
  --night: #13081d; --night-2: #1c0f29;
  --on-night: #f6eefa; --on-night-muted: #c0aecb; --on-night-line: rgba(246,238,250,.12);
  --mark: url("/assets/logo-aubergine.svg"); --cubes: url("/assets/cubes-aubergine.svg");
  --c1t: #5b3a7a; --c1l: #1a0b28; --c1r: #3a2152;
  --c2t: #ff4060; --c2l: #8a1430; --c2r: #c8224a;
  --c3t: #eadff2; --c3l: #3d2655; --c3r: #9581a8;
  --c4t: #a77bff; --c4l: #2a1650; --c4r: #6243a8;
  --c5t: #ffd6df; --c5l: #7a3ad0; --c5r: #ff4060;
  --cube-blend: normal;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-palette="midnight"] {
  --ink: #eef0fa; --ink-2: #d5d9ee; --muted: #a2a8c6;
  --paper: #0d0f1f; --paper-2: #13162b; --card: #191c35; --line: rgba(238,240,250,.1);
  --accent: #ff3d5a; --accent-deep: #ff6f85; --accent-2: #8b7bff;
  --accent-glow: rgba(255,61,90,.28); --accent-soft: rgba(255,61,90,.15);
  --accent-on-night: #ff6680; --accent-on-night-2: #a99cff;
  --night: #080915; --night-2: #10122a;
  --on-night: #eef0fa; --on-night-muted: #a9aecb; --on-night-line: rgba(238,240,250,.12);
  --mark: url("/assets/logo-midnight.svg"); --cubes: url("/assets/cubes-midnight.svg");
  --c1t: #2f3560; --c1l: #0b0d1c; --c1r: #1d2140;
  --c2t: #ff3d5a; --c2l: #7d1028; --c2r: #c41f40;
  --c3t: #dfe2f3; --c3l: #2a2f55; --c3r: #7f86ad;
  --c4t: #7b6bff; --c4l: #1e1a4d; --c4r: #4b3fb0;
  --c5t: #ffd2da; --c5l: #5a4ad0; --c5r: #ff3d5a;
  --cube-blend: normal;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-palette="obsidian"] {
  --ink: #f2f0f1; --ink-2: #d8d5d7; --muted: #a39ea1;
  --paper: #0f0f11; --paper-2: #161619; --card: #1c1c20; --line: rgba(242,240,241,.1);
  --accent: #ff3b3b; --accent-deep: #ff6b6b; --accent-2: #a06bff;
  --accent-glow: rgba(255,59,59,.28); --accent-soft: rgba(255,59,59,.15);
  --accent-on-night: #ff5c5c; --accent-on-night-2: #b98cff;
  --night: #08080a; --night-2: #121214;
  --on-night: #f2f0f1; --on-night-muted: #a8a3a6; --on-night-line: rgba(242,240,241,.12);
  --mark: url("/assets/logo-obsidian.svg"); --cubes: url("/assets/cubes-obsidian.svg");
  --c1t: #3a3a40; --c1l: #0c0c0e; --c1r: #24242a;
  --c2t: #ff3b3b; --c2l: #7a1010; --c2r: #c21e1e;
  --c3t: #e6e4e6; --c3l: #2e2e33; --c3r: #85838a;
  --c4t: #8c5cf0; --c4l: #1f1433; --c4r: #553a99;
  --c5t: #ffd0d0; --c5l: #6a3ad0; --c5r: #ff3b3b;
  --cube-blend: normal;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 40px -24px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .27 0 0 0 0 .25 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { mix-blend-mode: screen; opacity: .06; } }
:root[data-theme="dark"] body::before { mix-blend-mode: screen; opacity: .06; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.03em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -.015em; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
em.serif, .serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
h1 .serif, h2 .serif {
  color: var(--accent);
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  padding-right: .08em;
}
.on-night h1 .serif, .on-night h2 .serif { background: linear-gradient(100deg, var(--accent-on-night), var(--accent-on-night-2)); -webkit-background-clip: text; background-clip: text; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font: 500 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 1.6em; height: 1px; background: currentColor; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 200; background: var(--card); padding: .6em 1em; border-radius: 8px; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--ink); --fg: var(--paper);
  display: inline-flex; align-items: center; gap: .55em;
  padding: .9em 1.4em;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--bg); color: var(--fg);
  font: 500 .98rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px var(--accent-glow); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-accent { --bg: var(--accent); --fg: #fff; }
.btn-ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { padding: .65em 1.1em; font-size: .9rem; }
.on-night .btn-ghost { --fg: var(--on-night); border-color: var(--on-night-line); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: color-mix(in srgb, var(--paper) 72%, transparent);
  border-bottom: 1px solid var(--line);
  view-transition-name: header;
}
.nav { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.02em; font-size: 1.12rem; }
.mark { display: inline-block; flex: none; background: var(--mark) center / contain no-repeat; width: 30px; height: 30px; transition: transform .6s var(--ease); }
.brand:hover .mark { transform: rotate(-12deg) scale(1.06); }
.brand b { font-weight: 700; color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  text-decoration: none; padding: .5em .85em; border-radius: 999px;
  font-size: .95rem; color: var(--muted); transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--line); }
.nav-links a[aria-current="page"] { color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .nav { gap: 8px; padding-block: 10px; }
  .nav .btn { margin-left: auto; }
  .nav-links { order: 3; width: 100%; margin: 0 -.85em; overflow-x: auto; scrollbar-width: none; }
  .nav-links a { white-space: nowrap; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); isolation: isolate; overflow-x: clip; }
.hero::after {
  content: ""; position: absolute; z-index: -1;
  width: 60vw; height: 60vw; right: -15vw; top: -20vw;
  background: radial-gradient(closest-side, var(--accent-glow), transparent);
  filter: blur(20px);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin-block: 22px 26px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
/* ---------- cube puzzle (pieces are links) ---------- */
.puzzle-wrap { position: relative; }
.puzzle {
  position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; margin-left: auto;
  isolation: isolate; touch-action: manipulation;
}
.pc {
  position: absolute;
  left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%);
  aspect-ratio: 360 / 424;
  translate: -50% -50%;
  text-decoration: none; color: inherit; outline: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;                  /* only the hexagon (.pc-hit) takes the mouse */
}
.pc-hit {
  position: absolute; inset: 0; z-index: 1; cursor: pointer; pointer-events: auto;
  clip-path: polygon(50% 0, 100% 24.5%, 100% 75.5%, 50% 100%, 0 75.5%, 0 24.5%);
}
.pc-body {
  display: block; position: relative; width: 100%; height: 100%;
  transform: translateY(var(--lift, 0px));
  transition: transform .35s var(--ease), filter .35s var(--ease);
}
.pc img {
  display: block; width: 100%; height: 100%;
  translate: var(--jx, 0px) var(--jy, 0px);          /* the grinding shudder, set by puzzle.js */
  user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35));
}

/* the cube's name: read out by screen readers, shown only in the floating tag */
.pc-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* hover / keyboard focus / just clicked: the cube lifts a little and the name comes out of it */
.pc:hover .pc-body, .pc:focus-visible .pc-body, .pc.is-picked .pc-body {
  --lift: -8px; filter: brightness(1.12) drop-shadow(0 16px 22px var(--accent-glow));
}
.pc-decor:hover .pc-body { --lift: -4px; filter: brightness(1.08); }
.pc[aria-current="page"] .pc-body { filter: brightness(1.1) drop-shadow(0 10px 18px var(--accent-glow)); }
.puzzle.is-leaving .pc:not(.is-picked) .pc-body { filter: brightness(.6); }

/* the floating name tag (one per puzzle, follows the cube it names) */
.pc-tip {
  position: absolute; z-index: 5000;
  left: calc(var(--tx, 50) * 1%); top: calc(var(--ty, 0) * 1%);
  translate: -50% -100%;
  padding: .5em .9em; border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font: 600 clamp(.74rem, 1.3vw, .95rem)/1 var(--sans); letter-spacing: .01em; white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6), 0 0 18px -4px var(--accent-glow);
  pointer-events: none;
  opacity: 0; filter: blur(5px); transform: translateY(16px) scale(.88);
  transition: opacity .3s var(--ease), filter .35s var(--ease), transform .4s var(--ease);
}
.pc-tip.is-on { opacity: 1; filter: none; transform: none; }

.puzzle-hint { margin-top: 8px; text-align: right; font-size: .85rem; color: var(--muted); }

@media (hover: none) { .puzzle-hint { text-align: center; } }
@keyframes drift { from { transform: translateY(-10px); } to { transform: translateY(12px); } }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .puzzle-wrap { order: -1; }
  .puzzle { max-width: 420px; margin: 0 auto; }
}

.page-hero { padding-block: clamp(56px, 8vw, 104px) clamp(32px, 5vw, 64px); position: relative; }
.page-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.page-hero h1 { margin-block: 20px 22px; font-size: clamp(2.4rem, 6vw, 4.6rem); }
.deco { display: block; aspect-ratio: 600 / 520; background: var(--cubes) center / contain no-repeat; }
.deco-logo { aspect-ratio: 1; background-image: var(--mark); }
.page-hero .deco { width: clamp(120px, 18vw, 220px); animation: drift 10s ease-in-out infinite alternate; }
@media (max-width: 720px) { .page-hero .wrap { grid-template-columns: 1fr; } .page-hero .deco { display: none; } }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding-block: clamp(64px, 10vw, 128px); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin-top: 18px; }
@media (max-width: 760px) { .section-head { grid-template-columns: 1fr; } }

.on-night { background: var(--night); color: var(--on-night); overflow: hidden; }
.on-night .lede, .on-night p { color: var(--on-night-muted); }
.on-night .eyebrow { color: var(--on-night-muted); }


/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  position: relative; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  text-decoration: none;
  transition: transform .4s var(--ease), border-color .3s;
}
a.tile:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.tile p { color: var(--muted); font-size: .98rem; }
.tile .num { font: 500 .78rem/1 var(--sans); letter-spacing: .12em; color: var(--accent); }
.tile .more { margin-top: auto; padding-top: 12px; font-size: .9rem; font-weight: 500; color: var(--accent-deep); }
.span-4 { grid-column: span 4; } .span-3 { grid-column: span 3; } .span-2 { grid-column: span 2; }
@media (max-width: 900px) { .span-4, .span-3, .span-2 { grid-column: span 6; } }
.mock { margin-top: 18px; margin-bottom: 4px; }

/* mock: schedule (stylised: event card + cube map + my schedule, layered) */
.tool-row.is-wide { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.tool-visual.tv-app { padding: clamp(18px, 3vw, 32px); overflow: hidden; }
.m-stage { position: relative; height: 380px; font-size: .78rem; line-height: 1.35; }
.m-stage::before { content: ""; position: absolute; left: 30%; top: 35%; width: 60%; height: 60%; border-radius: 50%; background: var(--accent-glow); filter: blur(60px); opacity: .7; }
.m-label { position: absolute; top: 10px; left: 12px; z-index: 2; font: 500 .62rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.m-map { position: absolute; top: 0; right: 0; width: 68%; height: 74%; border-radius: 18px; overflow: hidden; background: var(--night-2); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(2.5deg); }
.m-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-map .water { fill: color-mix(in srgb, var(--accent-2) 18%, var(--night-2)); }
.m-map .shore { fill: none; stroke: color-mix(in srgb, var(--accent-2) 45%, transparent); stroke-width: 1.5; stroke-dasharray: 3 5; }
.m-map .street path { stroke: var(--line); stroke-width: 6; fill: none; }
.m-map .main { stroke: color-mix(in srgb, var(--accent) 35%, transparent); stroke-width: 7; fill: none; }
.m-cube { position: absolute; left: var(--px); top: var(--py); width: 30px; height: auto; margin: -26px 0 0 -15px; filter: drop-shadow(0 8px 6px rgba(0,0,0,.45)); animation: m-drop .7s var(--ease) var(--d) both; }
.m-cube.is-hot { width: 38px; margin: -32px 0 0 -19px; animation: m-drop .7s var(--ease) var(--d) both, m-bob 7s 1.2s infinite; }
@keyframes m-drop { from { opacity: 0; transform: translateY(-18px); } to { opacity: 1; transform: none; } }
@keyframes m-bob { 0%, 32% { transform: none; } 38% { transform: translateY(-10px); } 46%, 100% { transform: none; } }

.m-week { position: absolute; left: 0; bottom: 0; width: 60%; height: 54%; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); transform: rotate(-2deg); padding: 48px 10px 10px; }
.m-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: 100%; }
.m-cols > div { position: relative; border-radius: 10px; background: var(--paper); }
.m-cols b { position: absolute; top: -17px; left: 0; right: 0; text-align: center; font-size: .66rem; font-weight: 600; color: var(--ink-2); }
.m-blk { position: absolute; left: 4px; right: 4px; top: var(--t); height: var(--h); padding: 5px 6px; border-radius: 7px; font-size: .62rem; font-weight: 600; line-height: 1.15; color: #fff; background: linear-gradient(150deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 60%, #000)); overflow: hidden; }
.m-blk.b2 { background: linear-gradient(150deg, color-mix(in srgb, var(--accent-2) 50%, var(--accent)), color-mix(in srgb, var(--accent-2) 40%, #000)); }
.m-blk.is-new { background: linear-gradient(150deg, var(--accent), var(--accent-deep)); box-shadow: 0 6px 18px -4px var(--accent-glow); opacity: 0; animation: m-blk 7s 1.2s infinite; }
@keyframes m-blk { 0%, 34% { opacity: 0; transform: translateY(-14px) scale(.9); } 42%, 92% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.m-card { position: absolute; left: 6%; top: 8%; width: 54%; z-index: 3; display: grid; gap: 6px; padding: 18px 18px 16px; border-radius: 18px; background: var(--night); color: var(--on-night); border: 1px solid var(--on-night-line); box-shadow: 0 30px 50px -24px rgba(0,0,0,.7), inset 0 2px 0 var(--accent); transform: rotate(-3deg); }
.m-card strong { font-size: 1.35rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.m-card .serif { color: var(--accent-on-night); }
.m-when { font: 500 .64rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--on-night-muted); }
.m-where { color: var(--on-night-muted); font-size: .74rem; }
.m-flag { position: absolute; top: -10px; right: 14px; font: 600 .58rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.m-add { display: grid; margin-top: 8px; justify-self: start; }
.m-add > span { grid-area: 1 / 1; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: .74rem; white-space: nowrap; }
.m-add > span:first-child { background: var(--accent); color: #fff; animation: m-out 7s 1.2s infinite; }
.m-add > span:last-child { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-on-night); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); opacity: 0; animation: m-in 7s 1.2s infinite; }
@keyframes m-out { 0%, 28% { opacity: 1; transform: scale(1); } 31% { transform: scale(.92); } 34%, 92% { opacity: 0; } 100% { opacity: 1; } }
@keyframes m-in { 0%, 31% { opacity: 0; } 34%, 92% { opacity: 1; } 100% { opacity: 0; } }

@media (max-width: 520px) {
  .m-stage { height: 420px; }
  .m-card { left: 0; width: 82%; }
  .m-map { width: 78%; top: 30%; height: 40%; }
  .m-week { width: 72%; height: 40%; }
}
@media (prefers-reduced-motion: reduce) {
  .m-blk.is-new, .m-add > span:last-child { opacity: 1; }
  .m-add > span:first-child { opacity: 0; }
}
.m-map .m-label { top: auto; left: auto; bottom: 12px; right: 14px; }
/* end mock: schedule */

/* mock: ticket */
.m-ticket { display: flex; border-radius: 14px; overflow: hidden; background: var(--night); color: var(--on-night); font-size: .85rem; transform: rotate(-2deg); transition: transform .5s var(--ease); }
a.tile:hover .m-ticket { transform: rotate(0); }
.m-ticket .main { padding: 16px 18px; flex: 1; }
.m-ticket .main strong { display: block; font-size: 1rem; margin-top: 4px; }
.m-ticket .main span { color: var(--on-night-muted); }
.m-ticket .stub { width: 74px; border-left: 2px dashed var(--on-night-line); display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 600; writing-mode: vertical-rl; letter-spacing: .12em; font-size: .72rem; }

/* mock: admin */
.m-admin { display: flex; align-items: end; gap: 8px; height: 110px; padding: 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.m-admin i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--ink-2); opacity: .7; height: var(--h); transform-origin: bottom; }
.m-admin i:nth-child(3n) { background: var(--accent); opacity: 1; }

/* mock: hunt */
.m-hunt { position: relative; height: 150px; border-radius: 12px; border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
    var(--paper); }
.m-hunt svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-hunt .found { position: absolute; right: 10px; bottom: 10px; font-size: .75rem; padding: 4px 10px; border-radius: 999px; background: var(--night); color: var(--on-night); }
.pin { animation: pulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pin:nth-of-type(2) { animation-delay: .6s; } .pin:nth-of-type(3) { animation-delay: 1.2s; }
@keyframes pulse { 50% { transform: scale(1.35); } }

/* ---------- features / values ---------- */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--on-night-line); border-radius: var(--radius); overflow: hidden; }
.values > div { background: var(--night); padding: 32px 28px; display: grid; gap: 12px; align-content: start; }
.values .icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-on-night); }
.values h3 { color: var(--on-night); }
@media (max-width: 900px) { .values { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .values { grid-template-columns: 1fr; } }

.glow { position: absolute; width: 50vw; height: 50vw; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-glow), transparent); pointer-events: none; }

/* ---------- tool detail rows ---------- */
.tool-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.tool-row:nth-child(even) .tool-visual { order: -1; }
.tool-row h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-block: 16px 18px; }
.tool-row .lede { margin-bottom: 24px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.ticks li::before { content: ""; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.tool-visual { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); }
@media (max-width: 860px) { .tool-row, .tool-row.is-wide { grid-template-columns: 1fr; } .tool-row:nth-child(even) .tool-visual { order: 0; } }

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: step; }
.step { display: grid; grid-template-columns: 88px .8fr 1.2fr; gap: 24px; align-items: start; padding: 32px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); counter-increment: step; position: relative; overflow: hidden; }
.step::before { content: "0" counter(step); font: 400 3.4rem/1 var(--serif); font-style: italic; color: var(--accent); }
.step h3 { font-size: 1.5rem; }
.step p { color: var(--muted); }
@media (max-width: 760px) { .step { grid-template-columns: 1fr; gap: 10px; } .step::before { font-size: 2.6rem; } }

/* ---------- people ---------- */
.jak { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.jak .tile { align-items: flex-start; }
.jak .letter { font: 400 5.5rem/.9 var(--serif); font-style: italic; color: var(--accent); }
.jak .role { margin-top: -4px; font: 500 .74rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 900px) { .jak { grid-template-columns: 1fr; } }
.hero-more { margin-top: 16px; max-width: 52ch; color: var(--muted); }

/* ---------- CTA ---------- */
.cta { border-radius: calc(var(--radius) + 8px); padding: clamp(40px, 7vw, 88px); position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.cta .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
.cta-cubes { position: absolute; right: -60px; bottom: -80px; width: 340px; aspect-ratio: 600 / 520; background: var(--cubes) center / contain no-repeat; opacity: .18; pointer-events: none; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } .cta .actions { justify-content: flex-start; } }

/* ---------- form ---------- */
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.form { display: grid; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 40px); box-shadow: var(--shadow); }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field label, .field legend { font-size: .9rem; font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
input, textarea, select {
  width: 100%; font: inherit; color: var(--ink);
  padding: .85em 1em; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--paper);
  transition: border-color .2s, box-shadow .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
textarea { min-height: 150px; resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: inline-block; padding: .55em 1em; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; background: var(--paper); transition: all .2s; }
.chips input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 14px 18px; border-radius: var(--radius-sm); font-size: .95rem; display: none; }
.notice.show { display: block; }
.notice.error { background: color-mix(in srgb, #b4483a 14%, transparent); border: 1px solid color-mix(in srgb, #b4483a 40%, transparent); }
.contact-aside { display: grid; gap: 28px; }
.contact-aside dl { margin: 0; display: grid; gap: 18px; }
.contact-aside dt { font-weight: 600; }
.contact-aside dd { margin: 4px 0 0; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { padding-block: 64px 40px; border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot p { color: var(--muted); max-width: 34ch; margin-top: 14px; font-size: .95rem; }
.foot h4 { margin: 0 0 12px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }
.fine { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; color: var(--muted); }
@media (max-width: 720px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

/* ---------- motion ---------- */
@supports (animation-timeline: view()) {
  .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%; }
  @keyframes rise { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
  .m-admin i { animation: grow linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
  @keyframes grow { from { transform: scaleY(.1); } }
}
.load { animation: load-in .9s var(--ease) both; }
.load-2 { animation-delay: .1s; } .load-3 { animation-delay: .2s; } .load-4 { animation-delay: .3s; }
@keyframes load-in { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } }

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

/* dark-paper palettes: lighter grain */
:root[data-palette="night"] body::before,
:root[data-palette="crimson"] body::before,
:root[data-palette="aubergine"] body::before,
:root[data-palette="midnight"] body::before,
:root[data-palette="obsidian"] body::before { mix-blend-mode: screen; opacity: .06; }

/* ---------- palette picker (only shown in preview mode) ---------- */
.palette-picker {
  position: fixed; left: 16px; bottom: 16px; z-index: 150;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100vw - 32px);
  padding: 8px 10px 8px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); box-shadow: 0 12px 30px -12px rgba(0,0,0,.35);
  font: 500 .8rem/1 var(--sans); color: var(--ink);
}
.palette-picker .pp-name { min-width: 7.5em; }
.palette-picker button {
  width: 28px; height: 28px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--line); background: linear-gradient(135deg, var(--a) 50%, var(--b) 50%);
  transition: transform .2s;
}
.palette-picker button:hover { transform: scale(1.12); }
.palette-picker button[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card) inset; }
.palette-picker .pp-close { width: 24px; height: 24px; background: none; border: 0; color: var(--muted); font-size: 1rem; }

/* ---------- puzzle: small version on sub-pages ---------- */
.puzzle-wrap-sm { width: clamp(200px, 24vw, 300px); align-self: start; } /* same spot on every page */
.puzzle-sm { max-width: none; }
.puzzle-sm .pc-tip { font-size: .7rem; }
/* phones: a small puzzle tucked into the top corner of every page, so the cubes keep moving between pages */
@media (max-width: 720px) {
  .page-hero .puzzle-wrap-sm { order: -1; justify-self: center; width: 148px; margin: -28px 0 -12px; }
}



/* ---------- cubes fly between pages (cross-document view transitions) ---------- */
.puzzle > .pc:nth-child(1) { view-transition-name: pc-1; }
.puzzle > .pc:nth-child(2) { view-transition-name: pc-2; }
.puzzle > .pc:nth-child(3) { view-transition-name: pc-3; }
.puzzle > .pc:nth-child(4) { view-transition-name: pc-4; }
.puzzle > .pc:nth-child(5) { view-transition-name: pc-5; }
.puzzle > .pc:nth-child(6) { view-transition-name: pc-6; }
.puzzle > .pc:nth-child(7) { view-transition-name: pc-7; }
.puzzle > .pc:nth-child(8) { view-transition-name: pc-8; }
.puzzle > .pc:nth-child(9) { view-transition-name: pc-9; }
::view-transition-group(pc-1), ::view-transition-group(pc-2), ::view-transition-group(pc-3),
::view-transition-group(pc-4), ::view-transition-group(pc-5), ::view-transition-group(pc-6),
::view-transition-group(pc-7), ::view-transition-group(pc-8), ::view-transition-group(pc-9) {
  animation-duration: .8s;
  animation-timing-function: cubic-bezier(.3, .8, .25, 1);
}
::view-transition-group(pc-2) { animation-delay: 30ms; }
::view-transition-group(pc-3) { animation-delay: 60ms; }
::view-transition-group(pc-4) { animation-delay: 90ms; }
::view-transition-group(pc-5) { animation-delay: 120ms; }
::view-transition-group(pc-6) { animation-delay: 150ms; }
::view-transition-group(pc-7) { animation-delay: 180ms; }
::view-transition-group(pc-8) { animation-delay: 210ms; }
::view-transition-group(pc-9) { animation-delay: 240ms; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }
/* no cross-fade for the cubes: the new page's cube just flies over (no ghost copy) */
::view-transition-old(pc-1), ::view-transition-old(pc-2), ::view-transition-old(pc-3), ::view-transition-old(pc-4), ::view-transition-old(pc-5), ::view-transition-old(pc-6), ::view-transition-old(pc-7), ::view-transition-old(pc-8), ::view-transition-old(pc-9) { animation: none; opacity: 0; }
::view-transition-new(pc-1), ::view-transition-new(pc-2), ::view-transition-new(pc-3), ::view-transition-new(pc-4), ::view-transition-new(pc-5), ::view-transition-new(pc-6), ::view-transition-new(pc-7), ::view-transition-new(pc-8), ::view-transition-new(pc-9) { animation: none; }


.tile-note { margin-top: 6px; font-size: .85rem; color: var(--muted); }

/* games: Eldritch Beacon phone screenshots */
.game-row { border-top: 0; padding-top: 0; }
.g-phones { position: relative; height: clamp(440px, 46vw, 560px); }
.g-phones::before { content: ""; position: absolute; inset: 20% 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255,176,64,.32), rgba(40,140,150,.18) 60%, transparent); filter: blur(40px); }
.g-phone { position: absolute; margin: 0; width: 52%; border-radius: 26px; overflow: hidden; border: 7px solid #0a0a0c; background: #0a0a0c; box-shadow: 0 0 0 1px var(--line), 0 40px 60px -30px rgba(0,0,0,.8); transition: transform .6s var(--ease); }
.g-phone img { display: block; width: 100%; height: auto; }
.g-back { left: 2%; top: 8%; transform: rotate(-6deg); }
.g-front { right: 2%; top: 0; z-index: 2; transform: rotate(4deg); }
.g-phones:hover .g-back { transform: rotate(-3deg) translateX(-8px); }
.g-phones:hover .g-front { transform: rotate(1.5deg) translateY(-6px); }
.tool-row.is-wide.g-flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); }
.g-flip .g-phones { order: -1; }
.game-row + .game-row { border-top: 1px solid var(--line); padding-top: clamp(48px, 7vw, 88px); }
.g-trio { height: clamp(460px, 48vw, 600px); }
.g-trio::before { background: radial-gradient(closest-side, rgba(214,170,90,.30), rgba(40,150,150,.20) 60%, transparent); }
.g-trio .g-phone { width: 38%; }
.g-l { left: 0; top: 9%; transform: rotate(-7deg); }
.g-c { left: 31%; top: 0; z-index: 2; transform: rotate(0deg); }
.g-r { right: 0; top: 9%; z-index: 1; transform: rotate(7deg); }
.g-trio:hover .g-l { transform: rotate(-9deg) translateX(-10px); }
.g-trio:hover .g-c { transform: translateY(-8px); }
.g-trio:hover .g-r { transform: rotate(9deg) translateX(10px); }
@media (max-width: 860px) { .tool-row.is-wide.g-flip { grid-template-columns: 1fr; } .g-flip .g-phones { order: 0; } }
@media (max-width: 520px) { .g-phones { height: 420px; } .g-phone { width: 58%; border-width: 5px; border-radius: 20px; } .g-trio { height: 380px; } .g-trio .g-phone { width: 42%; } .g-c { left: 29%; } }

/* mock: market planner (stylised park plan, tents by status) */
.soon { margin-left: .4em; padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-deep); letter-spacing: .1em; }
.mk { position: relative; }
.mk-map { position: relative; aspect-ratio: 400 / 260; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--night-2); transform: rotate(-1.5deg); box-shadow: var(--shadow); }
.mk-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.mk-grass { fill: color-mix(in srgb, #3fa86b 12%, var(--night-2)); }
.mk-path { fill: none; stroke: color-mix(in srgb, var(--on-night) 22%, transparent); stroke-width: 12; stroke-linecap: round; }
.mk-path-2 { stroke-width: 8; }
.mk-gazebo { fill: color-mix(in srgb, var(--on-night) 10%, transparent); stroke: color-mix(in srgb, var(--on-night) 35%, transparent); stroke-dasharray: 3 3; }
.mk-gz { font: 600 6px var(--sans); letter-spacing: .14em; fill: var(--on-night-muted); text-anchor: middle; }
.mk-tree { fill: color-mix(in srgb, #3fa86b 45%, var(--night-2)); stroke: color-mix(in srgb, #3fa86b 70%, transparent); stroke-width: 1.5; }
.mk-tent rect, .mk-live rect { stroke-width: 1.5; }
.mk-tent text, .mk-live text { font: 700 7px var(--sans); text-anchor: middle; dominant-baseline: central; fill: #fff; }
.mk-tent.is-paid rect, .mk-live .s-paid { fill: var(--accent); stroke: color-mix(in srgb, var(--accent) 60%, #fff); }
.mk-tent.is-applied rect, .mk-live .s-applied { fill: color-mix(in srgb, var(--accent-2) 45%, var(--night-2)); stroke: var(--accent-2); }
.mk-tent.is-open rect, .mk-live .s-open { fill: transparent; stroke: var(--on-night-muted); stroke-dasharray: 3 2; }
.mk-tent.is-open text { fill: var(--on-night-muted); }
.mk-live rect { transform-box: fill-box; transform-origin: center; }
.mk-live .s-applied { opacity: 0; animation: mk-applied 9s infinite; }
.mk-live .s-paid { opacity: 0; animation: mk-paid 9s infinite; filter: drop-shadow(0 0 6px var(--accent-glow)); }
@keyframes mk-applied { 0%, 28% { opacity: 0; transform: scale(.6); } 34%, 62% { opacity: 1; transform: none; } 66%, 100% { opacity: 0; } }
@keyframes mk-paid { 0%, 62% { opacity: 0; transform: scale(.6); } 68%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.mk-legend { display: flex; gap: 14px; margin-top: 14px; font-size: .74rem; color: var(--muted); }
.mk-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; vertical-align: -1px; box-sizing: border-box; }
.mk-legend .l-paid::before { background: var(--accent); }
.mk-legend .l-applied::before { background: color-mix(in srgb, var(--accent-2) 45%, var(--night-2)); box-shadow: inset 0 0 0 1.5px var(--accent-2); }
.mk-legend .l-open::before { border: 1.5px dashed var(--muted); }
.mk-card { position: absolute; right: -8px; top: -18px; width: min(210px, 50%); padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 24px 40px -20px rgba(0,0,0,.7); transform: rotate(2deg); font-size: .78rem; }
.mk-num { display: block; font: 500 .62rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.mk-states { display: grid; }
.mk-states > span { grid-area: 1 / 1; display: grid; gap: 2px; color: var(--muted); opacity: 0; }
.mk-states b { color: var(--ink); font-weight: 600; font-size: .86rem; }
.mk-states i { font-style: normal; color: var(--accent); font-weight: 700; }
.mk-states .st-open { animation: mk-c-open 9s infinite; }
.mk-states .st-applied { animation: mk-c-applied 9s infinite; }
.mk-states .st-paid { animation: mk-c-paid 9s infinite; }
@keyframes mk-c-open { 0%, 28% { opacity: 1; } 32%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes mk-c-applied { 0%, 30% { opacity: 0; } 34%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes mk-c-paid { 0%, 64% { opacity: 0; } 68%, 94% { opacity: 1; } 98%, 100% { opacity: 0; } }
@media (max-width: 520px) { .mk-card { position: relative; right: auto; bottom: auto; width: auto; margin-top: 12px; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mk-live .s-paid, .mk-states .st-paid { opacity: 1; } }
