/* Dice & Dungeon Tales — web site. Colours from design-system/tokens.json, frames from the game's
   UI kit (assets/ui/kit/paladino, 9-slice values of kit.json halved like the copied images). */
@font-face { font-family: 'Alegreya'; src: url('fonts/Alegreya.ttf'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Alegreya'; src: url('fonts/Alegreya-Italic.ttf'); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jersey 10'; src: url('fonts/Jersey10.ttf'); font-display: swap; }
@font-face { font-family: 'Jacquarda'; src: url('fonts/JacquardaBastarda9.ttf'); font-display: swap; }

:root {
  --night: #0b0e2a; --panel: #10163a; --panel-hi: #232b5c; --line: #6e6690;
  --text: #f2efe6; --dim: #a9a3c2; --gold: #e0a23a; --gold-l: #fff1c1;
  --danger: #e0596b; --ranged: #6c8cff; --heal: #4fc97a;
  --gem-action: #6c8cff; --gem-attack: #ff7a7a; --gem-ranged: #6fd08f;
  --lbl-atk: #ff6b7f; --lbl-def: #8fb0ff;
  --bronze: #a8803f; --bronze-d: #4a3519; --wood: #4a2e1a; --banner: #6e1c24;
  --ink: #3a2410;
  --wrap: 1180px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--text); font-family: 'Alegreya', Georgia, serif; font-size: 1.125rem; line-height: 1.6;
  background-color: var(--night);
  background-image: linear-gradient(rgba(11, 14, 42, .9), rgba(11, 14, 42, .94)), url('img/table.jpg');
  background-size: cover; background-attachment: fixed; background-position: center;
}
img { max-width: 100%; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-l); }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
#embers { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, header, footer, .topbar { position: relative; z-index: 1; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* ---- top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  background: rgba(11, 14, 42, .78); border-bottom: 1px solid rgba(168, 128, 63, .45);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold);
  font-weight: 850; font-size: 1.15rem; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--bronze); }
.topbar nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.topbar nav::-webkit-scrollbar { display: none; }
.topbar nav a { color: var(--dim); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 6px 10px;
  border-radius: 4px; white-space: nowrap; }
.topbar nav a:hover, .topbar nav a.on { color: var(--gold-l); background: rgba(224, 162, 58, .12); }
.lang { color: var(--dim); font-weight: 700; font-size: .9rem; text-decoration: none; border: 1px solid var(--bronze-d);
  padding: 4px 10px; border-radius: 4px; white-space: nowrap; }
@media (max-width: 860px) { .topbar nav { display: none; } .lang { margin-left: auto; } }

/* ---- kit pieces ---- */
.panel {
  border-style: solid; border-width: 26px; border-image: url('img/kit/panel_small.png') 55 fill / 26px stretch;
  padding: 4px 8px; position: relative;
}
.panel.orn::before {
  content: ''; position: absolute; top: -40px; left: 50%; width: 104px; height: 44px; transform: translateX(-50%);
  background: url('img/kit/ornament.png') center top / contain no-repeat; pointer-events: none;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 22px;
  border-style: solid; border-width: 16px 24px; border-image: url('img/kit/btn_primary_normal.png') 40 55 fill / 16px 24px stretch;
  color: #3a1d06; text-decoration: none; font-weight: 850; font-size: 1.2rem; letter-spacing: .02em;
  text-shadow: 0 1px 0 rgba(255, 241, 193, .55); transition: transform .15s, filter .15s; cursor: pointer; background: none;
}
.btn:hover { color: #2a1404; transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { border-image-source: url('img/kit/btn_primary_pressed.png'); transform: translateY(1px); }
.btn.blue { border-image-source: url('img/kit/btn_secondary_normal.png'); color: var(--text); text-shadow: 0 1px 2px #000; }
.btn.blue:active { border-image-source: url('img/kit/btn_secondary_pressed.png'); }
.btn img { width: 26px; height: 26px; }

/* section headings on the game's title plaque */
.sec { padding: 84px 0 12px; }
.sec-head { text-align: center; margin-bottom: 34px; }
.kicker { font-family: 'Jacquarda', serif; color: var(--gold); font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1;
  opacity: .9; margin: 0 0 6px; letter-spacing: .02em; }
.plaque {
  display: inline-block; margin: 0; padding: 10px 28px; min-width: min(520px, 100%);
  border-style: solid; border-width: 0 60px; border-image: url('img/kit/plaque_title.png') 0 170 fill / 0 60px stretch;
  color: var(--gold); font-weight: 850; font-size: clamp(1.45rem, 4vw, 2.2rem); line-height: 1.25;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .7);
}
.sec-head p.lead { max-width: 720px; margin: 16px auto 0; color: var(--dim); font-size: 1.15rem; }
h3 { color: var(--gold); font-weight: 850; font-size: 1.3rem; line-height: 1.2; margin: 0 0 8px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
.num { font-family: 'Jersey 10', monospace; line-height: 1; }

/* ---- hero ---- */
.hero { position: relative; min-height: min(92vh, 820px); display: flex; align-items: center; overflow: hidden;
  border-bottom: 2px solid var(--bronze-d); }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity 2.2s ease; transform: scale(1.06); }
.hero-bg img.on { opacity: 1; animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.14) translate(1%, 1%); } to { transform: scale(1.02) translate(0, 0); } }
.hero::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 42%, rgba(11, 14, 42, .25) 0%, rgba(11, 14, 42, .7) 60%, rgba(11, 14, 42, .96) 100%),
              linear-gradient(to bottom, rgba(11, 14, 42, .2) 60%, var(--night) 100%); }
.hero .wrap { position: relative; z-index: 2; text-align: center; padding-top: 40px; padding-bottom: 60px; }
.hero h1 { margin: 0; font-weight: 900; color: var(--gold); line-height: .95; font-size: clamp(2.8rem, 9vw, 6.4rem);
  letter-spacing: .01em; text-shadow: 0 4px 0 #5b3509, 0 8px 24px rgba(0, 0, 0, .85), 0 0 60px rgba(224, 162, 58, .35); }
.hero h1 span { display: block; color: var(--gold-l); font-size: .62em; margin-top: .08em;
  text-shadow: 0 3px 0 #5b3509, 0 8px 24px rgba(0, 0, 0, .85); }
.hero .tagline { font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 700; margin: 18px auto 6px; max-width: 760px;
  text-shadow: 0 2px 6px #000; }
.hero .sub { color: var(--gold-l); opacity: .85; font-style: italic; margin: 0 auto 28px; max-width: 640px; text-shadow: 0 2px 6px #000; }
.hero .ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .soon { margin-top: 22px; color: var(--dim); font-weight: 700; font-size: .98rem; text-shadow: 0 1px 4px #000; }

/* sprite sheets: 100×100 frames in a row (assets/data/sprites.json) */
.sprite { --s: 3; --f: 6; width: calc(100px * var(--s)); height: calc(100px * var(--s)); flex: none;
  background-repeat: no-repeat; background-size: calc(100px * var(--s) * var(--f)) calc(100px * var(--s));
  image-rendering: pixelated; animation: sheet calc(var(--f) * .14s) steps(var(--f)) infinite; }
.sprite.flip { transform: scaleX(-1); }
@keyframes sheet { from { background-position: 0 0; } to { background-position: calc(-100px * var(--s) * var(--f)) 0; } }

/* stats strip */
.strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: -46px; position: relative; z-index: 3; }
.strip .panel { text-align: center; padding: 0 4px; }
.strip .num { font-size: clamp(2.2rem, 5vw, 3.2rem); color: var(--gold); display: block; text-shadow: 0 2px 0 #000; }
.strip span.l { color: var(--dim); font-weight: 700; font-size: .95rem; line-height: 1.2; display: block; }
@media (max-width: 760px) { .strip { grid-template-columns: repeat(2, 1fr); } .strip .panel:last-child { grid-column: 1 / -1; } }

/* ---- story ---- */
.tale { display: grid; grid-template-columns: 1.1fr 1fr; gap: 34px; align-items: center; }
.tale .text p { margin: 0 0 16px; font-size: 1.2rem; }
.tale .text p:first-child::first-letter { font-weight: 900; float: left; font-size: 4.6rem; line-height: .82;
  color: var(--gold); padding: 6px 10px 0 0; text-shadow: 0 3px 0 #5b3509, 0 0 24px rgba(224, 162, 58, .35); }
.tale .chars { display: grid; gap: 12px; }
.char { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; }
.char .sprite { --s: 2.3; }
.char .portrait { width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: url('img/kit/portrait_square.png') center / 100% 100%; }
.char h3 { font-size: 1.1rem; margin: 0 0 2px; }
.char p { margin: 0; color: var(--dim); font-size: 1rem; line-height: 1.4; }
@media (max-width: 860px) { .tale { grid-template-columns: 1fr; } }

/* ---- how to play ---- */
.play { display: grid; grid-template-columns: minmax(280px, 470px) 1fr; gap: 36px; align-items: center; }
@media (max-width: 900px) { .play { grid-template-columns: 1fr; } }
.board { position: relative; width: 100%; aspect-ratio: 1234 / 1132; max-width: 470px; margin: 0 auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .7)); }
.board > img.bf { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.board .grid { position: absolute; left: 12.64%; top: 8.81%; width: 74.55%; aspect-ratio: 1; display: grid;
  grid-template-columns: repeat(6, 1fr); z-index: 1; }
.board .grid img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.board .grid .c { position: relative; }
.board .ov { position: absolute; inset: 0; pointer-events: none; }
.board .ov.reach { outline: 2px dashed rgba(255, 241, 193, .55); outline-offset: -5px; }
.board .ov.danger { background: rgba(224, 89, 107, .42); animation: pulse 1.4s ease-in-out infinite; }
.board .ov.ranged { background: rgba(108, 140, 255, .38); }
@keyframes pulse { 50% { background: rgba(224, 89, 107, .15); } }
.piece { position: absolute; z-index: 3; width: 12.425%; aspect-ratio: 1; pointer-events: none; }
.piece .sprite { --s: 1; position: absolute; left: 50%; top: 50%; width: 100px; height: 100px;
  transform: translate(-50%, -56%) scale(var(--k, 1.9)); transform-origin: center; }
.piece .sprite.flip { transform: translate(-50%, -56%) scale(calc(var(--k, 1.9) * -1), var(--k, 1.9)); }
.badges { position: absolute; top: -14%; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; z-index: 4; }
.badges b { font-family: 'Jersey 10', monospace; font-weight: 400; font-size: clamp(.8rem, 2.6vw, 1.05rem); line-height: 1;
  padding: 2px 4px 1px; border-radius: 3px; color: #fff; box-shadow: 0 1px 0 #000; }
.badges b.a { background: #b3263a; } .badges b.d { background: #2f4fc2; }
.badges.boss b { box-shadow: 0 0 0 1px var(--gold), 0 0 8px rgba(224, 162, 58, .8); }
.hp { position: absolute; right: 2%; bottom: 0; font-family: 'Jersey 10', monospace; font-size: clamp(.75rem, 2.3vw, 1rem); color: #fff;
  text-shadow: 0 1px 0 #000, 0 0 3px #000; z-index: 4; }
.hp::before { content: '♥'; color: var(--danger); margin-right: 1px; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; display: grid; gap: 14px; }
.steps li { counter-increment: st; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(st); font-family: 'Jersey 10', monospace; font-size: 2.1rem; line-height: 52px; text-align: center;
  width: 56px; height: 56px; color: var(--gold-l); background: url('img/kit/medallion_normal.png') center / contain no-repeat;
  text-shadow: 0 2px 0 #000; }
.steps h3 { font-size: 1.15rem; margin: 4px 0 2px; }
.steps p { margin: 0; color: var(--dim); }
.steps .red { color: var(--lbl-atk); font-weight: 700; } .steps .blue { color: var(--lbl-def); font-weight: 700; }

.dice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 40px; }
@media (max-width: 700px) { .dice-row { grid-template-columns: 1fr; } }
.banner { position: relative; height: 92px; display: flex; flex-direction: column; justify-content: center; align-items: center;
  border-style: solid; border-width: 0 38px 0 50px; border-image: url('img/kit/banner_attack.png') 0 115 0 150 fill / 0 38px 0 50px stretch; }
.banner.def { border-image-source: url('img/kit/banner_defense.png'); }
.banner .die { position: absolute; left: -44px; top: 50%; width: 58px; height: 58px; transform: translateY(-50%); object-fit: contain;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .7)); }
.banner .t { font-weight: 850; font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--lbl-atk); line-height: 1; }
.banner.def .t { color: var(--lbl-def); }
.banner .num { font-size: 2.3rem; color: #fff; text-shadow: 0 2px 0 #000; }
.formula { text-align: center; margin: 26px auto 0; max-width: 760px; }
.formula .num { font-size: clamp(1.6rem, 4vw, 2.4rem); color: var(--gold-l); display: block; margin-bottom: 6px; }
.formula .num i { font-style: normal; color: var(--lbl-atk); } .formula .num u { text-decoration: none; color: var(--lbl-def); }
.formula p { color: var(--dim); margin: 0; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.sub-h { text-align: center; color: var(--gold); font-weight: 850; font-size: 1.5rem; margin: 54px 0 18px;
  text-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
.sub-h::before, .sub-h::after { content: '◆'; font-size: .6em; color: var(--bronze); margin: 0 .7em; vertical-align: middle; }
.item { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.item > img, .item > .ico { width: 64px; height: 64px; object-fit: contain; }
.item h3 { font-size: 1.1rem; margin: 2px 0 2px; }
.item p { margin: 0; color: var(--dim); font-size: 1rem; line-height: 1.45; }
.item .price { color: var(--gold); font-family: 'Jersey 10', monospace; font-size: 1.25rem; white-space: nowrap; }
.item .price img { width: 18px; height: 18px; vertical-align: -3px; margin-left: 3px; }
.gem { display: inline-block; width: 12px; height: 12px; transform: rotate(45deg); margin-right: 8px; vertical-align: 1px;
  box-shadow: 0 0 0 2px var(--bronze-d), 0 0 10px currentColor; background: currentColor; }

.areas { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
@media (max-width: 700px) { .areas { grid-template-columns: repeat(3, 1fr); } }
.area { text-align: center; }
.area .mini { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 100px; margin: 0 auto 8px; }
.area .mini i { aspect-ratio: 1; background: rgba(110, 102, 144, .25); border-radius: 2px; }
.area .mini i.h { background: var(--ranged); box-shadow: 0 0 8px rgba(108, 140, 255, .7); }
.area .mini i.o { background: var(--gold); }
.area b { display: block; font-size: 1rem; } .area small { color: var(--dim); font-size: .9rem; }

.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .roles { grid-template-columns: 1fr; } }
.role { display: grid; grid-template-columns: 100px 1fr; gap: 10px; align-items: center; }
.role .stage { width: 100px; height: 100px; position: relative; overflow: hidden; border-radius: 4px;
  background: radial-gradient(circle at 50% 70%, rgba(224, 162, 58, .18), transparent 65%); }
.role .sprite { --s: 1; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%) scale(2.7) scaleX(-1); }
.role h3 { font-size: 1.1rem; margin: 0; } .role p { margin: 2px 0 0; color: var(--dim); font-size: .98rem; line-height: 1.4; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center;
  background: rgba(16, 22, 58, .72); border: 1px solid rgba(110, 102, 144, .5); border-radius: 6px; padding: 8px; }
.tile img { width: 56px; height: 56px; image-rendering: pixelated; border-radius: 3px; }
.tile b { display: block; color: var(--gold-l); } .tile span { color: var(--dim); font-size: .95rem; line-height: 1.35; display: block; }
.tile small { color: var(--gold); font-size: .85rem; }

/* ---- expeditions ---- */
.exps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 1000px) { .exps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .exps { grid-template-columns: 1fr; } }
.exp { position: relative; border-radius: 8px; overflow: hidden; background: var(--panel);
  box-shadow: 0 0 0 2px var(--bronze-d), 0 0 0 4px var(--bronze), 0 14px 30px rgba(0, 0, 0, .55);
  transition: transform .25s, box-shadow .25s; }
.exp:hover { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--bronze-d), 0 0 0 4px var(--gold), 0 18px 40px rgba(0, 0, 0, .7); }
.exp .pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.exp .pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 6s ease; }
.exp:hover .pic img { transform: scale(1.08); }
.exp .pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(11, 14, 42, .95)); }
.exp .no { position: absolute; left: 14px; top: 8px; z-index: 2; font-weight: 900; font-size: 2.4rem; line-height: 1;
  color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 16px rgba(0, 0, 0, .8); }
.exp .boss { position: absolute; right: -6px; bottom: -14px; z-index: 2; }
.exp .boss .sprite { --s: 2.2; }
.exp .body { padding: 4px 16px 16px; position: relative; }
.exp .body::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--chap); opacity: .9; }
.exp h3 { margin: 10px 0 6px; font-size: 1.3rem; }
.exp p { margin: 0 0 10px; color: var(--dim); font-size: 1rem; line-height: 1.45; }
.exp .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; font-weight: 700; line-height: 1.2;
  padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(168, 128, 63, .6); color: var(--gold-l); background: rgba(11, 14, 42, .6); }
.chip.red { border-color: rgba(224, 89, 107, .7); color: #ffc2ca; }
.chip.violet { border-color: rgba(181, 123, 255, .7); color: #e2ccff; }
.chip img { width: 16px; height: 16px; }

.edicts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .edicts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .edicts { grid-template-columns: 1fr; } }
.edict { position: relative; padding: 14px 16px 12px 52px; border-radius: 6px; background: linear-gradient(135deg, rgba(110, 28, 36, .55), rgba(16, 22, 58, .85));
  border: 1px solid rgba(224, 89, 107, .35); }
.edict::before { content: ''; position: absolute; left: 12px; top: 14px; width: 28px; height: 32px; background: url('img/kit/icon_skull_red.png') center / contain no-repeat; }
.edict b { color: var(--gold-l); font-size: 1.08rem; display: block; }
.edict span { color: var(--dim); font-size: .98rem; line-height: 1.4; display: block; }
.edict small { color: #ffc2ca; font-weight: 700; font-size: .85rem; }

/* ---- daily ---- */
.daily { display: grid; grid-template-columns: 1fr 1.15fr; gap: 26px; align-items: stretch; }
@media (max-width: 900px) { .daily { grid-template-columns: 1fr; } }
.daily ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.daily li { padding-left: 30px; position: relative; }
.daily li::before { content: ''; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; background: url('img/kit/icon_laurel.png') center / contain no-repeat; }
.score { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin: 4px 0 14px; }
.score .num { font-size: 2.6rem; color: var(--gold); display: block; }
.score .num.neg { color: var(--danger); }
.score small { color: var(--dim); font-weight: 700; font-size: .92rem; line-height: 1.2; display: block; }
.share { font-family: 'Jersey 10', monospace; font-size: 1.25rem; background: rgba(0, 0, 0, .35); border: 1px dashed var(--line);
  border-radius: 6px; padding: 10px 12px; color: var(--gold-l); text-align: center; letter-spacing: .02em; }
.odds { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; text-align: center; }
.odds div { background: rgba(11, 14, 42, .55); border: 1px solid rgba(168, 128, 63, .45); border-radius: 6px; padding: 10px 6px; }
.odds .num { font-size: 2rem; color: var(--gold-l); display: block; }
.odds small { color: var(--dim); font-size: .9rem; line-height: 1.25; display: block; }
@media (max-width: 520px) { .odds { grid-template-columns: 1fr; } }

/* ---- cards ---- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 10px; }
.filters button { font: inherit; font-weight: 700; font-size: .98rem; color: var(--dim); cursor: pointer; padding: 6px 14px;
  border-radius: 999px; border: 1px solid rgba(110, 102, 144, .7); background: rgba(16, 22, 58, .8); }
.filters button:hover { color: var(--gold-l); border-color: var(--bronze); }
.filters button[aria-pressed="true"] { color: #2a1404; background: linear-gradient(#f3c15d, #c98a24); border-color: var(--gold-l); }
.filters button small { font-family: 'Jersey 10', monospace; font-size: 1.05rem; opacity: .8; margin-left: 4px; }
.filters.types button[aria-pressed="true"] { background: var(--panel-hi); color: var(--gold-l); border-color: var(--gold); }
.group-note { text-align: center; color: var(--dim); font-style: italic; min-height: 1.6em; margin: 6px auto 20px; max-width: 760px; }
.deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 22px 18px; }
@media (max-width: 520px) { .deck { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; } }
.cardbtn { all: unset; cursor: pointer; display: block; perspective: 900px; border-radius: 10px; }
.cardbtn:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.cardbtn[hidden] { display: none; }
.card { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; aspect-ratio: 977 / 1472; container-type: inline-size;
  transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .2s ease-out, filter .2s;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .6)); }
.cardbtn:hover .card { filter: drop-shadow(0 16px 22px rgba(0, 0, 0, .7)) drop-shadow(0 0 14px rgba(224, 162, 58, .35)); }
.card .art { position: absolute; left: 10.95%; top: 12.64%; width: 78.1%; height: 39.4%; object-fit: cover; }
.card .frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.card .name { position: absolute; left: 21.7%; top: 52.45%; width: 56.8%; height: 7.81%; display: flex; align-items: center; justify-content: center;
  text-align: center; color: var(--ink); font-weight: 800; text-transform: uppercase; font-size: 7.6cqw; line-height: .95; white-space: nowrap; }
.card .name.long { font-size: 5.6cqw; white-space: normal; }
.card .txt { position: absolute; left: 14.53%; top: 65.01%; width: 71.14%; height: 21.74%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 6cqw; line-height: 1.15; gap: 1cqw; overflow: hidden; }
.card .txt.long { font-size: 5.2cqw; }
.card .rg { font-family: 'Jersey 10', monospace; font-weight: 400; font-size: 7.6cqw; line-height: 1; }
.card .ms { color: var(--danger); font-size: 5cqw; line-height: 1; }
.card .ex { color: var(--gold); font-size: 5cqw; letter-spacing: .06em; line-height: 1; }
.card.t-azione .rg { color: var(--gem-action); } .card.t-attacco .rg { color: var(--gem-attack); } .card.t-distanza .rg { color: var(--gem-ranged); }
.card .holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: color-dodge; opacity: .55;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 107, 214, .55) 36%, rgba(255, 230, 107, .6) 46%, rgba(102, 255, 200, .55) 56%, rgba(107, 168, 255, .5) 66%, transparent 80%);
  background-size: 250% 250%; background-position: var(--mx) var(--my); transition: background-position .1s; }
.card.chapter .holo { background: linear-gradient(115deg, transparent 20%, rgba(181, 123, 255, .6) 40%, rgba(230, 200, 255, .55) 50%, rgba(140, 80, 255, .55) 60%, transparent 80%);
  background-size: 250% 250%; background-position: var(--mx) var(--my); }
.card .glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s;
  -webkit-mask: var(--mask) center / 100% 100% no-repeat; mask: var(--mask) center / 100% 100% no-repeat;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .35), transparent 45%); mix-blend-mode: overlay; }
.cardbtn:hover .glare, .zoom .glare { opacity: 1; }

/* lightbox */
dialog { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 100vw; max-height: 100vh; overflow: visible; }
dialog::backdrop { background: rgba(5, 7, 22, .88); backdrop-filter: blur(4px); }
.zoom { display: grid; grid-template-columns: auto minmax(0, 340px); gap: 28px; align-items: center; padding: 16px; }
.zoom .cardwrap { width: min(360px, 78vw); perspective: 1000px; }
.zoom .info h3 { font-size: 1.6rem; }
.zoom .info p { color: var(--dim); margin: 6px 0; }
.zoom .info .chip { margin: 0 6px 6px 0; }
.close { position: fixed; top: 14px; right: 16px; font: inherit; font-size: 2rem; line-height: 1; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(16, 22, 58, .9); border: 1px solid var(--bronze); color: var(--gold-l); cursor: pointer; }
.shotbox img { display: block; max-width: min(94vw, 1500px); max-height: 88vh; border-radius: 8px; box-shadow: 0 0 0 2px var(--bronze); }
@media (max-width: 760px) { .zoom { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

/* ---- rewards ---- */
.ash-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; text-align: center; margin-bottom: 8px; }
.ash-row .num { font-size: 2.6rem; color: var(--gold); display: flex; align-items: center; justify-content: center; gap: 6px; }
.ash-row .num img { width: 32px; height: 32px; }
.ash-row small { color: var(--dim); font-weight: 700; }
.talents { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.talent { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 6px;
  background: rgba(16, 22, 58, .78); border: 1px solid rgba(110, 102, 144, .5); }
.talent img { width: 52px; height: 52px; object-fit: contain; }
.talent b { color: var(--gold-l); display: block; line-height: 1.2; } .talent span { color: var(--dim); font-size: .93rem; line-height: 1.35; display: block; }
.talent .price { color: var(--gold); font-family: 'Jersey 10', monospace; font-size: 1.3rem; display: flex; align-items: center; gap: 3px; }
.talent .price img { width: 18px; height: 18px; }
.prices { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.prices span { font-family: 'Jersey 10', monospace; font-size: 1.2rem; color: var(--gold-l); padding: 2px 8px; border-radius: 4px;
  background: rgba(11, 14, 42, .7); border: 1px solid var(--bronze-d); }
.video { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .video { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .video { grid-template-columns: 1fr; } }
.video .panel h3 { font-size: 1.08rem; } .video .panel p { margin: 0; color: var(--dim); font-size: .98rem; line-height: 1.4; }
.note { text-align: center; color: var(--dim); font-style: italic; margin-top: 14px; }

/* ---- gallery ---- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.shots button { all: unset; cursor: zoom-in; display: block; border-radius: 8px; overflow: hidden; line-height: 0;
  box-shadow: 0 0 0 2px var(--bronze-d), 0 10px 24px rgba(0, 0, 0, .55); transition: transform .2s, box-shadow .2s; }
.shots button:hover, .shots button:focus-visible { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--gold), 0 14px 30px rgba(0, 0, 0, .7); }
.shots button:first-child { grid-column: span 2; grid-row: span 2; }
.shots img { width: 100%; height: auto; display: block; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr 1fr; } .shots button:first-child { grid-column: 1 / -1; grid-row: auto; } }

/* ---- footer ---- */
.final { text-align: center; padding: 90px 0 30px; }
.final h2 { font-weight: 900; color: var(--gold); font-size: clamp(1.8rem, 5vw, 3rem); margin: 0 0 10px; line-height: 1.1;
  text-shadow: 0 3px 0 #5b3509, 0 8px 22px rgba(0, 0, 0, .8); }
.final p { color: var(--dim); margin: 0 auto 24px; max-width: 600px; }
footer.site { text-align: center; padding: 30px 16px 40px; color: var(--dim); font-size: .95rem; border-top: 1px solid rgba(168, 128, 63, .35); margin-top: 40px; }
footer.site nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 22px; margin-bottom: 10px; font-weight: 700; }
footer.site p { margin: 4px 0; }

/* reveal on scroll */
.rv { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.rv.in { opacity: 1; transform: none; }
.no-js .rv { opacity: 1; transform: none; }

/* ---- privacy page ---- */
.policy { max-width: 820px; margin: 0 auto; padding: 0 16px 40px; }
.policy header { text-align: center; padding: 56px 0 18px; }
.policy header .crest { width: 112px; height: 112px; border-radius: 22px; box-shadow: 0 0 0 3px var(--bronze), 0 0 40px rgba(224, 162, 58, .35); }
.policy h1 { margin: 22px 0 4px; font-weight: 900; color: var(--gold); font-size: clamp(2rem, 6vw, 3rem); line-height: 1.05;
  text-shadow: 0 3px 0 #5b3509, 0 8px 22px rgba(0, 0, 0, .8); }
.policy .game { font-weight: 800; color: var(--gold-l); margin: 0; font-size: 1.15rem; }
.policy .meta { color: var(--dim); margin: 8px 0 0; }
.policy .toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 22px 0 8px; }
.policy .toc a { font-size: .92rem; font-weight: 700; text-decoration: none; color: var(--dim); padding: 3px 10px; border: 1px solid rgba(110, 102, 144, .6); border-radius: 999px; }
.policy .toc a:hover { color: var(--gold-l); border-color: var(--gold); }
.policy section { margin-top: 34px; }
.policy h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 10px; color: var(--gold); font-weight: 850; font-size: 1.35rem; line-height: 1.2;
  padding-bottom: 10px; border-bottom: 1px solid var(--bronze-d); }
.policy h2 span { color: var(--danger); font-size: 1.35rem; font-weight: 900; min-width: 2.2em; }
.policy section p { margin: 0 0 12px; }
@media (max-width: 480px) { body { font-size: 1.06rem; } .panel { border-width: 20px; border-image-width: 20px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
  .hero-bg img.on { transform: none; }
}
