/* Hexstory fantasy skin: carved stone, aged wood, gold filigree. Loaded after style.css (the admin does not use it).
   Textures live in /img/tex/*.jpg (generated, see scripts/generate-textures.mjs). Paths are stable. */
:root {
  --bg: #14110d; --bg2: #1d1812; --card: #26201a; --line: #4a3a26;
  --text: #f1e6cc; --muted: #bfae8c; --gold: #d9a441; --gold2: #f4cb70;
  --ink: #120e08; --wood: #5a3b21; --moss: #6f9a42; --rune: #7fd1c0;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --radius: 12px;
  --tex-wood: url('/img/tex/wood-planks.jpg'); --tex-wood-dark: url('/img/tex/wood-dark.jpg');
  --tex-stone: url('/img/tex/stone-dark.jpg'); --tex-stone-light: url('/img/tex/stone-blocks.jpg');
  --tex-leather: url('/img/tex/leather.jpg'); --tex-parchment: url('/img/tex/parchment.jpg'); --tex-gold: url('/img/tex/gold-trim.jpg');
  --orn-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='' fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2 42V13C2 7 6 2 13 2H42'/%3E%3Cpath d='M8 42V17C8 12 12 8 17 8H42' opacity='.5'/%3E%3Cpath d='M14 14c7 0 11 3 11 8s-7 6-9 3-1-7 4-6'/%3E%3Cpath d='M25 9c0 5 3 8 9 8'/%3E%3Cpath d='M9 25c5 0 8 3 8 9'/%3E%3Ccircle cx='14' cy='14' r='2.2' fill='%23d9a441' stroke='none'/%3E%3C/g%3E%3C/svg%3E"); --orn-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='translate(44 0) scale(-1 1)' fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2 42V13C2 7 6 2 13 2H42'/%3E%3Cpath d='M8 42V17C8 12 12 8 17 8H42' opacity='.5'/%3E%3Cpath d='M14 14c7 0 11 3 11 8s-7 6-9 3-1-7 4-6'/%3E%3Cpath d='M25 9c0 5 3 8 9 8'/%3E%3Cpath d='M9 25c5 0 8 3 8 9'/%3E%3Ccircle cx='14' cy='14' r='2.2' fill='%23d9a441' stroke='none'/%3E%3C/g%3E%3C/svg%3E"); --orn-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='translate(0 44) scale(1 -1)' fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2 42V13C2 7 6 2 13 2H42'/%3E%3Cpath d='M8 42V17C8 12 12 8 17 8H42' opacity='.5'/%3E%3Cpath d='M14 14c7 0 11 3 11 8s-7 6-9 3-1-7 4-6'/%3E%3Cpath d='M25 9c0 5 3 8 9 8'/%3E%3Cpath d='M9 25c5 0 8 3 8 9'/%3E%3Ccircle cx='14' cy='14' r='2.2' fill='%23d9a441' stroke='none'/%3E%3C/g%3E%3C/svg%3E"); --orn-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg transform='translate(44 44) scale(-1 -1)' fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M2 42V13C2 7 6 2 13 2H42'/%3E%3Cpath d='M8 42V17C8 12 12 8 17 8H42' opacity='.5'/%3E%3Cpath d='M14 14c7 0 11 3 11 8s-7 6-9 3-1-7 4-6'/%3E%3Cpath d='M25 9c0 5 3 8 9 8'/%3E%3Cpath d='M9 25c5 0 8 3 8 9'/%3E%3Ccircle cx='14' cy='14' r='2.2' fill='%23d9a441' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  --swirl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 26'%3E%3Cg fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M6 13H116'/%3E%3Cpath d='M116 13c10 0 14-9 22-9 6 0 8 6 4 8s-7-3-3-5'/%3E%3Cpath d='M116 13c10 0 14 9 22 9 6 0 8-6 4-8s-7 3-3 5'/%3E%3Cpath d='M204 13c-10 0-14-9-22-9-6 0-8 6-4 8s7-3 3-5'/%3E%3Cpath d='M204 13c-10 0-14 9-22 9-6 0-8-6-4-8s7 3 3 5'/%3E%3Cpath d='M204 13H314'/%3E%3C/g%3E%3Cpath d='M160 4l6 9-6 9-6-9z' fill='%23d9a441'/%3E%3C/svg%3E"); --swirl-l: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 22'%3E%3Cg fill='none' stroke='%23d9a441' stroke-width='1.5' stroke-linecap='round'%3E%3Cpath d='M4 11h96'/%3E%3Cpath d='M100 11c8 0 12-8 19-8 5 0 7 5 3 7s-6-2-3-4'/%3E%3Cpath d='M100 11c8 0 12 8 19 8 5 0 7-5 3-7s-6 2-3 4'/%3E%3Cpath d='M132 11h60' opacity='.6'/%3E%3Cpath d='M200 11l5-5 5 5-5 5z' fill='%23d9a441'/%3E%3C/g%3E%3C/svg%3E");
  --tabbar-h: 64px;
}
html { scroll-behavior: smooth; }
body {
  font-family: var(--font); font-size: 16px; color: var(--text);
  background: radial-gradient(1200px 600px at 50% -8%, #6a4a2599 0%, transparent 70%), linear-gradient(#100c08c4, #0b0805dd), var(--tex-leather) 0 0 / 420px;
  min-height: 100vh;
}
html { background: #0b0805; }
::selection { background: #d9a44166; }
a { color: var(--gold2); }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0.035em; text-shadow: 0 2px 0 #000a; }
h1 { color: var(--text); }
h2 { color: var(--text); }
.page > h2::after, .page > .section-title::after { content: ""; display: block; width: 230px; height: 22px; margin-top: 0.15rem; background: var(--swirl-l) left center / contain no-repeat; }
.lead, .muted + p.lead { font-family: var(--serif); font-size: 1.35rem; font-style: italic; color: #e3d4b3; line-height: 1.45; }
.eyebrow { font-family: var(--display); letter-spacing: 0.3em; color: var(--gold); display: flex; align-items: center; gap: 0.8rem; }
.eyebrow::after { content: ""; height: 1px; width: 64px; background: linear-gradient(90deg, var(--gold), transparent); }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 2px; }

/* ---- header: aged wood + gold rail ---- */
.site-header {
  background: linear-gradient(#0005, #0009), var(--tex-wood-dark) center / 1040px 100%;
  border-bottom: 0; box-shadow: 0 10px 28px #000b; padding: 0.55rem 1.5rem; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 5px; background: var(--tex-gold) 0 0 / 220px 100%; box-shadow: 0 2px 0 #000a; }
.logo { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--gold2); text-shadow: 0 2px 0 #000, 0 0 22px #e0a84a66; letter-spacing: 0.06em; }
.logo-hex { font-size: 1.7rem; line-height: 1; filter: drop-shadow(0 2px 0 #000); }
.nav a { font-family: var(--display); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; color: #e8dac0; text-shadow: 0 1px 0 #000; padding: 0.55em 0.9em; border-radius: 6px; }
.nav a:hover { background: #0006; color: var(--gold2); }
.nav a.active { background: #0007; color: var(--gold2); box-shadow: inset 0 0 0 1px #d9a44177, inset 0 -2px 0 var(--gold); }
.nav a::before { display: none; }
.cart-link { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8a5a35, #3a2616); border: 2px solid var(--gold); box-shadow: 0 3px 8px #000a, inset 0 1px 0 #ffffff33; padding: 0; }
.seg { background: #0008; border-color: #d9a44155; }
.seg button { color: #d8c9a8; font-weight: 600; }
.seg button.active { background: linear-gradient(#f4cb70, #c58f2e); color: #2a1a07; box-shadow: 0 1px 0 #fff6 inset; }

/* ---- buttons: beveled gold / carved wood ---- */
button, .button { font-family: var(--font); font-weight: 700; letter-spacing: 0.02em; border-radius: 10px; border: 1px solid #0009; min-height: 44px; padding: 0.5em 1.1em;
  background: linear-gradient(#0003, #0006), var(--tex-wood-dark) 0 0 / 360px; color: var(--text); text-shadow: 0 1px 0 #000;
  box-shadow: inset 0 1px 0 #ffffff26, inset 0 0 0 1px #d9a44133, 0 3px 0 #0a0705, 0 6px 12px #0007; }
button:hover, .button:hover { border-color: #0009; box-shadow: inset 0 1px 0 #ffffff33, inset 0 0 0 1px #d9a44199, 0 3px 0 #0a0705, 0 8px 16px #0008; filter: brightness(1.1); }
button:active, .button:active { transform: translateY(2px); box-shadow: inset 0 1px 0 #ffffff1a, 0 1px 0 #0a0705; }
.primary { background: linear-gradient(#ffe29a, #d9a441 52%, #a8721f); color: #2a1a07; text-shadow: 0 1px 0 #ffeebb88; border-color: #5a3a10;
  box-shadow: inset 0 1px 0 #fff8, inset 0 -2px 0 #0003, 0 3px 0 #5a3a10, 0 8px 16px #0009; }
.primary:hover { background: linear-gradient(#fff0b8, #e8b34d 52%, #b9822b); filter: none; }
.ghost { background: #0005; box-shadow: inset 0 0 0 1px #d9a44155, 0 2px 0 #0a0705; }
.big { min-height: 52px; font-size: 1.02rem; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 800; }
.icon { min-width: 44px; }
input, select, textarea { background: #120e09; border: 1px solid #5a4528; color: var(--text); box-shadow: inset 0 2px 6px #000a; min-height: 44px; font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #f4cb7088; border-color: var(--gold); }
.chip { background: #0006; border-color: #d9a44144; color: #d8c9a8; min-height: 36px; display: inline-flex; align-items: center; }
.chip.active, .chip:hover { color: #2a1a07; background: linear-gradient(#f4cb70, #c58f2e); border-color: #5a3a10; }
.badge { border-color: #d9a44177; color: var(--gold2); background: #0006; font-family: var(--display); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.66rem; }

/* ---- cards: carved stone with gold filigree corners ---- */
.card {
  position: relative; border: 0; border-radius: var(--radius); color: var(--text);
  background:
    linear-gradient(180deg, #0000 55%, #0008),
    linear-gradient(#17130ec4, #17130ec4),
    var(--tex-stone) 0 0 / 360px;
  box-shadow: 0 0 0 1px #0b0805, 0 0 0 4px #4a3220, 0 0 0 5px #0b0805, 0 16px 28px #000a, inset 0 0 40px #0009;
}
.tile-card, .package-card, .theme-card, .step, .hextory-card, .checkout, .summary .get-map {
  background:
    var(--orn-tl) top 7px left 7px / 32px no-repeat,
    var(--orn-tr) top 7px right 7px / 32px no-repeat,
    var(--orn-bl) bottom 7px left 7px / 32px no-repeat,
    var(--orn-br) bottom 7px right 7px / 32px no-repeat,
    linear-gradient(180deg, #0000 55%, #0008),
    linear-gradient(#17130ec4, #17130ec4),
    var(--tex-stone) 0 0 / 360px;
}
.tile-card::before, .package-card::before, .theme-card::before, .step::before, .hextory-card::before { content: ""; position: absolute; inset: 7px; border: 1px solid #d9a44166; border-radius: 7px; pointer-events: none; z-index: 2; }
.tile-card, .theme-card, .step { transition: transform .2s ease, box-shadow .2s ease; }
.tile-card:hover, .theme-card:hover, .package-card:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px #0b0805, 0 0 0 4px #6b4a2a, 0 0 0 5px #0b0805, 0 22px 34px #000b, 0 0 30px #d9a44122, inset 0 0 40px #0009; }
.tile-card { padding: 1.1rem; }
.tile-card img { background: radial-gradient(circle at 50% 62%, #5d4a2e66, transparent 68%); transition: transform .3s ease; filter: drop-shadow(0 8px 10px #000a); }
.tile-card:hover img { transform: scale(1.06) rotate(-2deg); }
.tile-meta h3 { font-size: 1rem; }
.tile-meta h3 a, .pkg-body h3 a { color: var(--gold2); }
.buy b { font-family: var(--display); font-size: 1.2rem; color: var(--text); }
.pkg-thumbs { background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--theme) 45%, transparent), transparent 70%); padding: 1.4rem 1rem 0.4rem; }
.pkg-thumbs img, .theme-thumbs img { filter: drop-shadow(0 6px 8px #000a); }
.pkg-body, .theme-card > * { position: relative; z-index: 1; }
.theme-card { background-blend-mode: normal; }
.theme-card h3 { color: var(--gold2); }
.step .num { display: inline-grid; place-items: center; width: 52px; height: 58px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(#f4cb70, #b57d22); color: #2a1a07; font-size: 1.4rem; text-shadow: none; margin-bottom: 0.4rem; }
.card.warn, p.warn { background: linear-gradient(#3a1d16, #2a140f); color: #ffcbb4; box-shadow: 0 0 0 1px #0b0805, 0 0 0 3px #8a3a26; }
.card.note { background: linear-gradient(#352a14, #251d0e); box-shadow: 0 0 0 1px #0b0805, 0 0 0 3px #8a6a2a; }
.theme-card.soon { opacity: 0.7; }

/* ---- hero ---- */
.hero { padding-top: 3rem; position: relative; }
.hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); line-height: 1.1; text-shadow: 0 3px 0 #000a, 0 0 40px #d9a44133; }
.hero-img { border-radius: 14px; box-shadow: 0 0 0 1px #0b0805, 0 0 0 5px var(--wood), 0 0 0 6px #0b0805, 0 0 0 8px var(--gold), 0 0 0 9px #0b0805, 0 28px 50px #000c; }
.hero-view { border-radius: 14px; }
.hero-facts span::first-letter { color: var(--gold); }
.theme-switch { background: #0a0705dd; border-color: #d9a44166; }
.theme-switch { max-width: calc(100% - 20px); overflow-x: auto; scrollbar-width: none; }
.theme-switch button { min-height: 36px; box-shadow: none; background: transparent; border: 0; color: #d8c9a8; }
.theme-switch button.active { background: linear-gradient(#f4cb70, #c58f2e); color: #2a1a07; }

/* ---- wooden panels ---- */
.hextory-card, .callout { background: linear-gradient(90deg, #0006, #0001 35%, #0006), linear-gradient(#0002, #0005), var(--tex-wood) 0 0 / 520px; box-shadow: 0 0 0 1px #0b0805, 0 0 0 4px var(--gold), 0 0 0 5px #0b0805, 0 22px 40px #000b, inset 0 0 60px #000b; }
.hextory-card h2, .callout h3 { color: var(--gold2); }
.hextory-card .muted, .hextory-card p { color: #f4e8cc; text-shadow: 0 1px 2px #000a; }
.hextory-card .eyebrow { color: #ffe29a; }
.hextory-card::before { border-color: #00000055; inset: 10px; }

/* ---- composer chrome (viewport itself stays bright) ---- */
.composer { height: calc(100vh - 62px); }
.palette, .summary { background: linear-gradient(#0008, #000a), var(--tex-leather) 0 0 / 360px; border-color: #0009; box-shadow: inset -8px 0 18px #0008; }
.summary { box-shadow: inset 8px 0 18px #0008; background-attachment: local; }
.toolbar { background: linear-gradient(#0004, #0008), var(--tex-wood-dark) 0 0 / 480px; border-bottom: 3px solid #0a0705; position: relative; }
.toolbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: var(--tex-gold) 0 0 / 200px 100%; }
.toolbar .tools button { min-height: 40px; }
.pal-tile { background: linear-gradient(#0004, #0007), var(--tex-stone) 0 0 / 240px; min-height: 0; padding: 0.5rem 0.4rem; text-shadow: none; }
.pal-tile.active { background: linear-gradient(#5a431c88, #2e2210cc), var(--tex-stone) 0 0 / 240px; border-color: var(--gold2); box-shadow: 0 0 0 2px var(--gold), 0 0 18px #d9a44166; }
.pal-tile img { filter: drop-shadow(0 4px 5px #000a); }
.pal-tile small { color: #b9a782; }
.theme-tabs .chip { font-family: var(--display); letter-spacing: 0.04em; }
.quality-btn { font-size: 0.78rem; min-height: 36px; }
.viewport { background: #cfe0ec; box-shadow: inset 0 0 0 3px #0a0705, inset 0 0 40px #0006; }
.get-map { padding: 1rem 0.9rem 1.1rem; margin-top: 0.9rem; border-radius: 10px; }
.get-map h3 { margin: 0 0 0.5rem; color: var(--gold2); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; }
.out-option { position: relative; z-index: 1; padding: 0.6rem 0 0.2rem; }
.out-option + .out-option { margin-top: 0.8rem; padding-top: 0.9rem; border-top: 1px solid #d9a44144; }
.out-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.out-head b { font-family: var(--display); letter-spacing: 0.04em; }
.out-option .field { margin: 0.5rem 0 0.3rem; }
.out-option button { width: 100%; }
.plate-info { margin: 0.2rem 0 0.7rem; color: var(--gold2); }
.price-box { border-top: 0; margin: 0.4rem 0 0.7rem; padding: 0; }
.line.total { border-top: 1px solid #d9a44155; }
.line.total b { font-family: var(--display); font-size: 1.5rem; color: var(--gold2); }
.mobile-bar { display: none; }

/* ---- dialog ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; background: radial-gradient(circle at 50% 40%, #1a120acc, #000d); backdrop-filter: blur(4px); overflow-y: auto; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
body.modal-open { overflow: hidden; }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; padding: 2rem 1.8rem 1.6rem; border-radius: 14px; text-align: center;
  background:
    var(--orn-tl) top 9px left 9px / 40px no-repeat, var(--orn-tr) top 9px right 9px / 40px no-repeat, var(--orn-bl) bottom 9px left 9px / 40px no-repeat, var(--orn-br) bottom 9px right 9px / 40px no-repeat,
    linear-gradient(#17130ee0, #17130ef0), var(--tex-stone) 0 0 / 360px;
  box-shadow: 0 0 0 1px #0b0805, 0 0 0 5px var(--wood), 0 0 0 6px #0b0805, 0 0 0 8px var(--gold), 0 0 0 9px #0b0805, 0 30px 60px #000d; animation: rise .25s ease; }
@keyframes rise { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal h2 { margin: 0.3rem 0 0.5rem; color: var(--gold2); }
.modal h2::after { content: ""; display: block; height: 22px; margin: 0.3rem auto 0; background: var(--swirl) center / 220px no-repeat; }
.modal p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.4; color: #eadcbc; margin: 0.6rem 0; }
.modal p.small { font-family: var(--font); font-size: 0.86rem; }
.modal-hex { font-size: 2.6rem; color: var(--gold2); line-height: 1; text-shadow: 0 0 24px #f4cb7088, 0 3px 0 #000; }
.modal-hex.big { font-size: 4rem; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 3; font-size: 1.5rem; min-width: 44px; min-height: 44px; }
.modal-summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0 0.4rem; padding: 0.7rem 1rem; border-radius: 10px; background: #0007; box-shadow: inset 0 0 0 1px #d9a44155; text-align: left; }
.modal-summary b { font-family: var(--display); font-size: 1.5rem; color: var(--gold2); }
.modal form { text-align: left; margin-top: 1rem; }
.rating { display: flex; gap: 0.35rem; }
.rate-hex { flex: 1; min-height: 52px; padding: 0; font-size: 1.9rem; line-height: 1; color: #5a4a30; background: #0006; box-shadow: inset 0 0 0 1px #d9a44144; }
.rate-hex.on { color: var(--gold2); text-shadow: 0 0 14px #f4cb7088; box-shadow: inset 0 0 0 1px var(--gold); }
.rating-ends { display: flex; justify-content: space-between; }
.modal-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.8rem; }
.modal-actions > * { flex: 1; min-width: 150px; }
.modal-status { color: #ffb4a0; min-height: 1.2em; margin: 0.2rem 0; font-family: var(--font); }

/* ---- misc surfaces ---- */
.toast { background: linear-gradient(#0004, #0008), var(--tex-wood-dark) 0 0 / 360px; border-color: var(--gold); color: var(--text); }
.site-footer { position: relative; border: 0; background: linear-gradient(#0005, #000b), var(--tex-wood-dark) center / 1040px 100%; color: #d8c9a8; padding-top: 1.6rem; box-shadow: 0 -8px 24px #0009; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -3px; height: 5px; background: var(--tex-gold) 0 0 / 220px 100%; }
.msg { background: linear-gradient(#17130ec4, #17130ec4), var(--tex-stone) 0 0 / 300px; border-color: #5a4528; }
.progress li::before { color: #4a3a26; }
.progress li.done::before { color: var(--gold); text-shadow: 0 0 10px #d9a44188; }
.faq { background: linear-gradient(#17130ec4, #17130ec4), var(--tex-stone) 0 0 / 300px; }
tr.click:hover td { background: #ffffff0d; }

/* ---- tablet ---- */
@media (max-width: 1000px) {
  .composer { height: auto; padding-bottom: 4.5rem; }
  .stage { height: 62vh; min-height: 360px; position: sticky; top: 0; z-index: 4; }
  .palette { box-shadow: none; }
  .palette-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 96px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 0.4rem; }
  .pal-tile { scroll-snap-align: start; }
  .palette-help { display: none; }
  .toolbar { overflow-x: auto; scrollbar-width: none; }
  .toolbar .hover-info { display: none; }
}

/* ---- phone: bottom tab bar, thumb-sized controls ---- */
@media (max-width: 820px) {
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  .site-header { padding: 0.45rem 0.9rem; gap: 0.6rem; flex-wrap: nowrap; }
  .site-header .header-right { margin-left: auto; }
  .nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; width: 100%; order: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; flex-wrap: nowrap;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: linear-gradient(#0003, #000a), var(--tex-wood-dark) 0 0 / 420px; border-top: 3px solid var(--gold); box-shadow: 0 -10px 24px #000c; }
  .nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; padding: 4px 0; font-size: 0.6rem; letter-spacing: 0.06em; border-radius: 8px; }
  .nav a::before { content: ""; display: block; width: 24px; height: 24px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
  .nav a.active { box-shadow: inset 0 0 0 1px #d9a44166; color: var(--gold2); }
  .nav a.active::before { filter: drop-shadow(0 0 6px #f4cb70aa); }
  .nav a[href="#/"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3 2 12h3v8h5v-6h4v6h5v-8h3z'/%3E%3C/svg%3E"); }
  .nav a[href="#/tegels"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 20.5 7v10L12 22 3.5 17V7zm0 3.2L6.3 8.5v7L12 18.8l5.7-3.3v-7z'/%3E%3C/svg%3E"); }
  .nav a[href="#/packages"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2 4 5v6c0 5 3.5 9.4 8 11 4.5-1.6 8-6 8-11V5zm0 3 4.5 1.7V11c0 3.2-2 6.1-4.5 7.4C9.5 17.100 7.500 14.200 7.500 11V6.700z'/%3E%3C/svg%3E"); }
  .nav a[href="#/composer"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 1.500l2.800 6.700 7.200.8-5.400 4.800 1.600 7.100L12 17.300 5.800 20.900l1.600-7.100L2 9l7.200-.8z'/%3E%3C/svg%3E"); }
  .nav a[href="#/support"] { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h16a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H9l-5 4v-4H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E"); }
  .hero { padding: 1.4rem 1rem 0; min-height: 0; gap: 0.2rem; text-align: left; }
  .hero-view { height: 300px; order: -1; margin: 6px 6px 22px; }
  .hero h1 { font-size: 2rem; }
  .lead { font-size: 1.2rem; }
  .cta { flex-direction: column; }
  .cta .button, .cta button { width: 100%; }
  .page { padding: 1.4rem 1rem; }
  .grid.tiles { grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
  .tile-card { padding: 0.8rem; }
  .buy { flex-wrap: wrap; }
  .buy button { width: 100%; margin-left: 0; }
  .grid.packages, .grid.themes { grid-template-columns: 1fr; }
  .hextory-card { padding: 1.4rem 1.1rem; }
  .site-footer { padding-bottom: 1.2rem; }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom)); }
  .stage { height: 52vh; min-height: 300px; top: 52px; }
  .composer { padding-bottom: 8.5rem; }
  .summary { padding-bottom: 5rem; }
  .mobile-bar { position: fixed; z-index: 55; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 0.8rem; padding: 0.55rem 0.9rem;
    background: linear-gradient(#0006, #000b), var(--tex-leather) 0 0 / 300px; border-top: 2px solid #d9a44199; box-shadow: 0 -8px 20px #000a; }
  .mobile-bar .mb-total { flex: 1; line-height: 1.15; }
  .mobile-bar .mb-total b { display: block; font-family: var(--display); font-size: 1.25rem; color: var(--gold2); }
  .mobile-bar .mb-total span { font-size: 0.78rem; color: var(--muted); }
  .mobile-bar button { min-height: 48px; padding: 0 1.4rem; font-size: 0.95rem; }
  .modal { padding: 1.6rem 1.1rem 1.2rem; }
  .modal-actions > * { min-width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ===== review round 1 ===== */
/* viewport: bright daylight stays (clear colours), but it is framed like the rest of the artefact */
.viewport { box-shadow: inset 0 0 0 3px #0a0705, inset 0 0 0 7px var(--wood), inset 0 0 0 8px var(--gold), inset 0 0 0 9px #0a0705, inset 0 0 70px #0007; }
.get-map h3 { padding-left: 1.8rem; }
.palette { box-shadow: inset -10px 0 20px #000c, inset -1px 0 0 #d9a44166; }
.card:not(.tile-card):not(.package-card):not(.theme-card):not(.step):not(.hextory-card)::before { content: ""; position: absolute; inset: 7px; border: 1px solid #d9a44144; border-radius: 7px; pointer-events: none; z-index: 0; }
.card:not(.tile-card):not(.package-card):not(.theme-card):not(.step):not(.hextory-card) > * { position: relative; z-index: 1; }
.faq::before { inset: 4px; }
input, select, textarea { background: linear-gradient(#000a, #000c), var(--tex-leather) 0 0 / 260px; border: 1px solid #6a5230; border-radius: 8px; box-shadow: inset 0 2px 8px #000, 0 1px 0 #d9a44133; }
::placeholder { color: #cdbd9b; opacity: 0.85; }
.hextory-card::before { border-color: #0a07054d; }
.hextory-card::after, .callout::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(circle, #f1cf86 0 2px, #8a5a1c 4px, #0000 6px) 18px 18px / 12px 12px no-repeat, radial-gradient(circle, #f1cf86 0 2px, #8a5a1c 4px, #0000 6px) calc(100% - 18px) 18px / 12px 12px no-repeat,
    radial-gradient(circle, #f1cf86 0 2px, #8a5a1c 4px, #0000 6px) 18px calc(100% - 18px) / 12px 12px no-repeat, radial-gradient(circle, #f1cf86 0 2px, #8a5a1c 4px, #0000 6px) calc(100% - 18px) calc(100% - 18px) / 12px 12px no-repeat; }
.tile-card img, .pkg-thumbs { border-radius: 8px; box-shadow: inset 0 0 0 1px #000, inset 0 0 26px #000b; }
.tile-card img { filter: drop-shadow(0 8px 10px #000a); background-color: #0006; }
.hero h1::after { content: ""; display: block; height: 22px; width: 260px; margin-top: 0.5rem; background: var(--swirl-l) left / contain no-repeat; }
.seg button { white-space: nowrap; }
.primary:active { filter: brightness(0.92); }
/* prices, totals and buttons use the UI face (Inter), headings stay Cinzel */
.price-big b, .line.total b, .mb-total b, .modal-summary b, .buy b { font-family: var(--font); font-weight: 800; letter-spacing: 0; }
.rate-hex { color: #9c8660; }
.rate-hex.on { color: var(--gold2); }
.modal-close { top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; background: #000a; font-size: 1.7rem; }
.nav a.active { background: #d9a44122; box-shadow: inset 0 3px 0 var(--gold); }
@media (hover: hover) { .tile-card:hover, .theme-card:hover, .package-card:hover { transform: translateY(-4px); } }
@media (hover: none) { .tile-card:hover, .theme-card:hover, .package-card:hover { transform: none; } .tile-card:hover img { transform: none; } }
@media (pointer: coarse) { .chip, .quality-btn, .theme-switch button, .toolbar .tools button, .qty button { min-height: 44px; min-width: 44px; } .seg button { min-height: 40px; } }
@media (max-width: 1000px) {
  .palette .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 0.5rem; padding-bottom: 2px; }
  .palette .chip { flex: 0 0 auto; white-space: nowrap; }
  .toolbar { -webkit-mask: linear-gradient(90deg, #000 90%, transparent); mask: linear-gradient(90deg, #000 90%, transparent); padding-right: 2rem; }
}
@media (max-width: 820px) {
  .nav a { font-size: 0.7rem; font-weight: 600; }
  .eyebrow { font-size: 0.7rem; letter-spacing: 0.2em; }
  .eyebrow::after { display: none; }
  .site-header .seg button { font-size: 0.82rem; padding: 0.3em 0.6em; }
  .stage { top: 66px; height: 46svh; min-height: 300px; }
  .composer { padding-bottom: calc(var(--tabbar-h) + 84px + env(safe-area-inset-bottom)); }
  .theme-switch { -webkit-mask: linear-gradient(90deg, #000 88%, transparent); mask: linear-gradient(90deg, #000 88%, transparent); scroll-snap-type: x proximity; }
  .theme-switch button { scroll-snap-align: start; }
}

/* currency picker (header) */
.currency-picker { font: inherit; font-size: 0.8rem; color: #e8dac0; background: #0006; border: 1px solid #d9a44166; border-radius: 6px; padding: 0 0.4rem; height: 34px; min-width: 56px; }
.currency-picker[hidden] { display: none; }
@media (max-width: 820px) {
  .currency-picker { height: 40px; font-size: 14px; min-width: 0; width: 62px; padding: 0 0.2rem; }
  .site-header { gap: 0.4rem; }
  .site-header .logo { font-size: 1.05rem; min-width: 0; }
  .site-header .header-right { gap: 0.4rem; flex-shrink: 0; }
  .site-header .size-picker button { padding-left: 0.55rem; padding-right: 0.55rem; }
}

@media (max-width: 440px) { .site-header .logo-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
