/* Registre des épreuves : Black Myth: Wukong
   Encre, laque, bronze. L'or est réservé à la progression (le bâton), le cinabre à la validation (le sceau). */
:root {
  --ink: #17130f;
  --ink-2: #1d1814;
  --lacquer: #241b16;
  --lacquer-2: #2e231c;
  --lacquer-3: #3a2c22;
  --hairline: #4a3b2d;
  --hairline-soft: #362a21;
  --bronze: #a48a5a;
  --bronze-dim: #7d6a48;
  --gold: #d6b25e;
  --gold-hi: #f1d68d;
  --gold-deep: #9c7a2c;
  --cinnabar: #b8392b;
  --cinnabar-hi: #d4513f;
  --jade: #7c9e86;
  --jade-dim: #4f6b58;
  --rice: #ebe2ce;
  --rice-2: #d9cfba;
  --stone: #a39a8d;
  --stone-dim: #776f65;
  --r-common: #a9a59c;
  --r-uncommon: #86a86f;
  --r-rare: #6b97bd;
  --r-epic: #a17fc0;
  --r-legendary: #d69f4f;
  --r-mythical: #cf5f50;
  --serif: "Alegreya", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --brush: "Ma Shan Zheng", "STKaiti", "KaiTi", serif;
  --step--1: .86rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 1.95rem;
  --step-4: 2.8rem;
  --radius-s: 3px;
  --radius-m: 6px;
  --top-h: 74px;
  --side-w: 248px;
  --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--rice); font-family: var(--serif); font-size: 17px; line-height: 1.5;
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 78% -10%, rgba(214,178,94,.07), transparent 60%),
    radial-gradient(900px 700px at -10% 110%, rgba(184,57,43,.06), transparent 60%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6  0 0 0 0 0.5  0 0 0 0 0.4  0 0 0 .08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  font-variant-numeric: lining-nums;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lacquer); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 2rem; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 20px;
  padding: 0 22px; background: linear-gradient(180deg, rgba(23,19,15,.97), rgba(23,19,15,.9));
  border-bottom: 1px solid var(--hairline-soft); backdrop-filter: blur(6px);
}
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--hairline); background: transparent; border-radius: var(--radius-s); padding: 9px 8px; }
.nav-toggle span { display: block; height: 2px; background: var(--rice-2); margin: 4px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--rice); }
.brand-glyph { font-family: var(--brush); font-size: 34px; line-height: 1; color: var(--rice); width: 46px; height: 46px; display: grid; place-items: center;
  border: 1px solid var(--hairline); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a2c22, #1d1814); }
.brand-mark { width: 46px; height: 46px; flex: none; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-weight: 800; letter-spacing: .01em; font-size: 1.05rem; }
.brand-sub { font-family: var(--sans); font-size: .78rem; color: var(--stone); }
.top-staff { min-width: 0; max-width: 620px; display: flex; align-items: center; gap: 14px; }
.top-meta { display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); background: var(--ink-2); color: var(--stone); border-radius: 999px; padding: 7px 12px; font-family: var(--sans); font-size: .9rem; }
.search-trigger svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.search-trigger kbd { font-family: var(--sans); font-size: .72rem; color: var(--stone-dim); border: 1px solid var(--hairline-soft); border-radius: 4px; padding: 1px 5px; }

/* ---------- the staff (global progress) ---------- */
.staff { position: relative; flex: 1; height: 18px; display: flex; align-items: center; min-width: 120px; }
.staff .shaft { position: relative; flex: 1; height: 10px; border-radius: 6px; overflow: hidden;
  background: linear-gradient(180deg, #3b1f19, #24130f 55%, #170c09); box-shadow: inset 0 1px 2px rgba(0,0,0,.6), 0 0 0 1px rgba(164,138,90,.25); }
.staff .fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 6px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-deep)); box-shadow: 0 0 10px rgba(214,178,94,.35);
  transition: width 900ms var(--ease); }
.staff .fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,250,230,.55) 48%, transparent 62%);
  transform: translateX(-120%); }
.staff.glint .fill::after { animation: glint 1600ms 500ms var(--ease) 1 forwards; }
@keyframes glint { to { transform: translateX(160%); } }
.staff .hoop { position: relative; width: 22px; height: 18px; border-radius: 3px; flex: none;
  background: repeating-linear-gradient(90deg, var(--gold-deep) 0 2px, var(--gold) 2px 5px, var(--gold-hi) 5px 6px), var(--gold);
  box-shadow: 0 0 0 1px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.25); }
.staff .hoop.l { margin-right: -2px; }
.staff .hoop.r { margin-left: -2px; }
.staff-value { font-weight: 800; font-size: 1.35rem; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.staff-value small { font-family: var(--sans); font-weight: 500; font-size: .78rem; color: var(--stone); margin-left: 6px; }

.meta-chip { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--hairline); background: var(--ink-2); border-radius: var(--radius-s);
  padding: 4px 9px; font-family: var(--sans); font-size: .9rem; color: var(--rice-2); white-space: nowrap; }
.meta-chip b { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.meta-chip:hover { border-color: var(--bronze-dim); background: var(--lacquer); }
.save-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stone-dim); flex: none; box-shadow: 0 0 0 3px rgba(0,0,0,.25); }
.save-dot.ok { background: var(--jade); }
.save-dot.busy { background: var(--gold); animation: pulse 900ms ease-in-out infinite; }
.save-dot.err { background: var(--cinnabar-hi); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 18px 14px 40px; border-right: 1px solid var(--hairline-soft);
  font-family: var(--sans); scrollbar-width: thin; scrollbar-color: var(--hairline) transparent; }
.side h2 { font-family: var(--serif); font-size: .95rem; font-weight: 700; color: var(--bronze); margin: 18px 10px 6px; letter-spacing: .02em; }
.side a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: var(--radius-s); color: var(--rice-2);
  text-decoration: none; font-size: .95rem; }
.side a:hover { background: var(--lacquer); color: var(--rice); }
.side a[aria-current="page"] { background: var(--lacquer-2); color: var(--rice); box-shadow: inset 2px 0 0 var(--gold); }
.side .pct { font-size: .78rem; color: var(--stone); font-variant-numeric: lining-nums tabular-nums; }
.side .pct.done { color: var(--cinnabar-hi); }
main { padding: 28px 34px 80px; min-width: 0; outline: none; }
main:focus, main:focus-visible { outline: none; }
.page-head { display: grid; grid-template-columns: 1fr auto; gap: 12px 24px; align-items: end; margin-bottom: 22px; }
.page-title { font-size: var(--step-3); font-weight: 800; line-height: 1.1; margin: 0; }
.page-title .en { display: block; font-size: var(--step-0); font-weight: 400; font-style: italic; color: var(--stone); margin-top: 4px; }
.page-intro { color: var(--rice-2); max-width: 70ch; margin: 8px 0 0; }
.muted { color: var(--stone); }
.small { font-size: var(--step--1); }
.en-name { font-style: italic; color: var(--stone); font-size: .86rem; }

/* ---------- meters ---------- */
.dims { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 6px 0 4px; }
.dim { min-width: 190px; flex: 1 1 190px; max-width: 320px; font-family: var(--sans); }
.dim-row { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; color: var(--rice-2); }
.dim-row b { font-family: var(--serif); color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: #2a1d17; overflow: hidden; margin-top: 5px; box-shadow: inset 0 0 0 1px rgba(164,138,90,.18); }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); transition: width 600ms var(--ease); }
.bar.done > i { background: linear-gradient(90deg, #8f2c21, var(--cinnabar)); }
.bar.jade > i { background: linear-gradient(90deg, var(--jade-dim), var(--jade)); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 18px; padding: 12px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-m);
  background: rgba(36,27,22,.55); font-family: var(--sans); }
.filters input[type="search"] { flex: 1 1 240px; min-width: 180px; background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 7px 10px; }
.seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: var(--radius-s); overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 6px 11px; font-size: .9rem; color: var(--rice-2); border-right: 1px solid var(--hairline-soft); }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--lacquer-3); color: var(--rice); }
.filters select { background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 6px 8px; }
.filters input[type="search"], .filters select { font-family: var(--sans); font-size: .95rem; }
.f-more { display: contents; }
.f-toggle { display: none; border: 1px solid var(--hairline); background: transparent; border-radius: var(--radius-s); padding: 6px 11px; font-size: .9rem; color: var(--rice-2); }
.f-toggle[aria-expanded="true"] { background: var(--lacquer-3); color: var(--rice); }
.toggle-chip { border: 1px solid var(--hairline); background: transparent; border-radius: 999px; padding: 4px 11px; font-size: .86rem; color: var(--rice-2); }
.toggle-chip[aria-pressed="true"] { border-color: var(--bronze); background: var(--lacquer-2); color: var(--rice); }
.count-line { font-family: var(--sans); color: var(--stone); font-size: .9rem; margin: -6px 0 14px; }

/* ---------- item tiles ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 10px; }
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.tile { position: relative; display: grid; grid-template-columns: 60px 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 10px 10px 10px;
  border: 1px solid var(--hairline-soft); border-radius: var(--radius-s); background: linear-gradient(180deg, rgba(46,35,28,.55), rgba(36,27,22,.55));
  content-visibility: auto; contain-intrinsic-size: 92px; }
.tile:hover { border-color: var(--hairline); }
.tile.done { border-color: rgba(184,57,43,.45); background: linear-gradient(180deg, rgba(60,30,24,.5), rgba(36,27,22,.6)); }
.tile.partial { border-color: rgba(124,158,134,.4); }
.tile.future { opacity: .72; }
.tile .open { position: absolute; inset: 0; background: transparent; border: 0; border-radius: inherit; z-index: 0; }
.tile > *:not(.open) { position: relative; z-index: 1; }
.tile .open:focus-visible { outline-offset: -2px; }
.frame { width: 56px; height: 56px; border-radius: var(--radius-s); display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #3b2d23, #1b1511 75%); box-shadow: inset 0 0 0 1px var(--rarity, var(--hairline)), inset 0 -10px 18px rgba(0,0,0,.35); }
.frame img { width: 52px; height: 52px; object-fit: contain; image-rendering: auto; }
.frame.portrait img { width: 56px; height: 56px; object-fit: cover; }
.frame .ph { font-family: var(--brush); font-size: 26px; color: var(--bronze-dim); }
.tile .names { min-width: 0; pointer-events: none; }
.tile .fr { font-weight: 700; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }
.tile.has-lv > .frame { grid-row: 1 / span 2; }
.tile .lv { grid-column: 2 / -1; display: flex; align-items: center; min-height: 18px; }
.tile .fr.unverified { color: var(--rice-2); }
.tile .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; pointer-events: none; }
.chip { font-family: var(--sans); font-size: .74rem; line-height: 1; padding: 3px 6px; border-radius: 3px; border: 1px solid var(--hairline); color: var(--rice-2); white-space: nowrap; }
.chip.warn { border-color: rgba(214,159,79,.55); color: #e3b878; }
.chip.miss { border-color: rgba(184,57,43,.6); color: #e88a7c; }
.chip.ng { border-color: rgba(161,127,192,.55); color: #c3a8dc; }
.chip.fr { border-style: dashed; color: var(--stone); }
.chip.ok { border-color: rgba(124,158,134,.55); color: #a9c7b2; }
.tile .act { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* the seal: validation */
.seal { width: 38px; height: 38px; border-radius: 5px; border: 1.5px dashed var(--bronze-dim); background: transparent; display: grid; place-items: center;
  font-family: var(--brush); font-size: 22px; line-height: 1; color: rgba(164,138,90,.35); transform: rotate(-4deg); transition: background 160ms, color 160ms, border-color 160ms; }
.seal:hover { border-color: var(--bronze); color: rgba(214,178,94,.6); }
.seal[aria-pressed="true"] { background: radial-gradient(circle at 40% 35%, var(--cinnabar-hi), var(--cinnabar) 60%, #8d2a1f); border: 1.5px solid #7e2219; color: #f6e7d8;
  box-shadow: 0 1px 0 rgba(0,0,0,.4), inset 0 0 0 2px rgba(246,231,216,.18); }
.seal.stamp { animation: stamp 420ms var(--ease); }
@keyframes stamp { 0% { transform: rotate(-12deg) scale(1.7); opacity: 0; filter: blur(2px); } 60% { transform: rotate(-3deg) scale(.92); opacity: 1; filter: none; } 100% { transform: rotate(-4deg) scale(1); } }
.seal.sm { width: 28px; height: 28px; font-size: 16px; }

/* pips: levels / tiers / ranks */
.pips { display: inline-flex; gap: 4px; align-items: center; }
.pip { width: 13px; height: 13px; padding: 0; border: 1px solid var(--bronze-dim); background: transparent; transform: rotate(45deg); border-radius: 2px; transition: background 140ms; }
.pip[aria-pressed="true"] { background: linear-gradient(135deg, var(--gold-hi), var(--gold-deep)); border-color: var(--gold-deep); }
.pip:hover { border-color: var(--gold); }
.pips .lvl { font-family: var(--sans); font-size: .76rem; color: var(--stone); margin-left: 6px; min-width: 30px; text-align: right; font-variant-numeric: lining-nums tabular-nums; }

/* ---------- panels ---------- */
.panel { border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); background: rgba(36,27,22,.6); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
.cols > .panel + .panel { margin-top: 0; }
.panel h3 { margin: 0 0 10px; font-size: var(--step-1); }
.panel h3 .en { font-weight: 400; font-style: italic; font-size: .9rem; color: var(--stone); margin-left: 8px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.section-title { font-size: var(--step-2); font-weight: 800; margin: 34px 0 12px; }
.section-title .en { font-weight: 400; font-style: italic; font-size: .95rem; color: var(--stone); margin-left: 10px; }

/* ---------- dashboard hero ---------- */
.hero { position: relative; padding: 30px 32px 28px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); overflow: hidden;
  background: linear-gradient(180deg, rgba(46,35,28,.75), rgba(29,24,20,.85)); }
.hero::before { content: ""; position: absolute; inset: auto -5% -2px -5%; height: 120px; opacity: .22; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'><path d='M0 120 L0 88 C60 70 90 40 140 52 C190 64 210 22 268 30 C330 38 350 84 420 76 C480 70 500 12 566 18 C630 24 660 70 720 64 C790 58 812 30 870 36 C930 42 960 86 1030 80 C1090 74 1120 50 1200 58 L1200 120 Z' fill='%23a48a5a'/></svg>") bottom/100% 100% no-repeat; }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px 40px; align-items: end; }
.hero-label { font-family: var(--sans); color: var(--bronze); font-size: .95rem; margin: 0 0 6px; }
.hero-num { font-size: clamp(3.2rem, 7vw, 5.6rem); font-weight: 800; line-height: .95; letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums; }
.hero-num small { font-size: .38em; font-weight: 500; color: var(--stone); margin-left: 4px; }
.hero .staff { height: 30px; margin: 18px 0 8px; }
.hero .staff .shaft { height: 16px; border-radius: 9px; }
.hero .staff .fill { border-radius: 9px; }
.hero .staff .hoop { width: 34px; height: 30px; }
.hero-caption { color: var(--rice-2); font-family: var(--sans); font-size: .95rem; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { border-left: 2px solid var(--hairline); padding: 4px 0 4px 14px; }
.kpi b { display: block; font-size: 1.7rem; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.kpi span { font-family: var(--sans); color: var(--stone); font-size: .88rem; }
.kpi.seal-k { border-left-color: var(--cinnabar); }
.kpi.jade-k { border-left-color: var(--jade); }

.catlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px 22px; }
.catrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 2px; border-bottom: 1px solid var(--hairline-soft); text-decoration: none; color: inherit; }
.catrow:hover .catname { color: var(--gold-hi); }
.catname { font-weight: 700; }
.catnum { font-family: var(--sans); color: var(--stone); font-size: .9rem; font-variant-numeric: lining-nums tabular-nums; }
.catrow .bar { grid-column: 1 / -1; }

/* checklist */
.check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 9px 0; border-bottom: 1px solid var(--hairline-soft); }
.check:last-child { border-bottom: 0; }
.check .t { font-weight: 600; }
.check .d { color: var(--rice-2); font-size: .95rem; }
.check input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--cinnabar); margin-top: 3px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(8,6,5,.55); z-index: 50; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 60; transform: translateX(104%); visibility: hidden;
  transition: transform 280ms var(--ease), visibility 0s linear 280ms; overscroll-behavior: contain;
  background: linear-gradient(180deg, #261c16, #1b1511); border-left: 1px solid var(--hairline); overflow-y: auto; padding: 22px 24px 60px; }
.drawer.open { transform: none; visibility: visible; transition: transform 280ms var(--ease); }
.drawer-close { position: sticky; top: 0; float: right; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--hairline); background: var(--ink-2); font-size: 20px; line-height: 1; }
.d-head { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: center; margin: 4px 0 16px; clear: both; }
.d-head .frame { width: 88px; height: 88px; }
.d-head .frame img { width: 82px; height: 82px; }
.d-head .frame.portrait img { width: 88px; height: 88px; }
.d-title { font-size: var(--step-2); font-weight: 800; line-height: 1.15; margin: 0; }
.d-sec { margin-top: 18px; }
.d-sec h4 { margin: 0 0 6px; font-size: 1rem; color: var(--bronze); font-weight: 700; }
.d-sec p { margin: 4px 0; }
.d-en { color: var(--stone); font-style: italic; font-size: .93rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .95rem; }
.kv dt { color: var(--stone); font-family: var(--sans); }
.kv dd { margin: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: .92rem; font-family: var(--sans); }
table.t th, table.t td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--hairline-soft); vertical-align: top; }
table.t th { color: var(--bronze); font-weight: 500; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.fr-status { border: 1px dashed var(--hairline); border-radius: var(--radius-s); padding: 10px 12px; font-family: var(--sans); font-size: .9rem; color: var(--rice-2); }
.fr-status .lab { color: var(--rice); font-weight: 700; }
.fr-edit { display: flex; gap: 8px; margin-top: 8px; }
.fr-edit input { flex: 1; background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 6px 8px; }
.btn { border: 1px solid var(--hairline); background: var(--lacquer-2); border-radius: var(--radius-s); padding: 7px 13px; font-family: var(--sans); color: var(--rice); }
.btn:hover { border-color: var(--bronze); }
.btn.primary { background: linear-gradient(180deg, #3d2c1c, #2c2016); border-color: var(--bronze-dim); }
.btn.danger { border-color: rgba(184,57,43,.6); color: #f0b3a8; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.src-list { font-family: var(--sans); font-size: .85rem; color: var(--stone); padding-left: 18px; margin: 4px 0; word-break: break-word; }

/* ---------- modal / search / toast ---------- */
.modal { position: fixed; inset: 0; display: grid; place-items: center; z-index: 70; padding: 16px; background: rgba(8,6,5,.6); }
.modal[hidden] { display: none; }
.modal-box { width: min(620px, 100%); max-height: 88vh; overflow: auto; background: #241b16; border: 1px solid var(--hairline); border-radius: var(--radius-m); padding: 22px 24px; }
.modal-box h3 { margin-top: 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.search { position: fixed; inset: 0; z-index: 80; background: rgba(8,6,5,.65); display: flex; justify-content: center; padding: 10vh 16px 16px; }
.search[hidden] { display: none; }
.search-box { width: min(680px, 100%); background: #241b16; border: 1px solid var(--hairline); border-radius: var(--radius-m); overflow: hidden; align-self: flex-start; }
.search-box input { width: 100%; border: 0; border-bottom: 1px solid var(--hairline); background: transparent; padding: 16px 18px; font-size: 1.1rem; }
.search-box input:focus { outline: none; }
.search-results { max-height: 60vh; overflow: auto; }
.sr-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 8px 14px; border: 0; background: transparent; border-bottom: 1px solid var(--hairline-soft); }
.sr-item:hover, .sr-item[aria-selected="true"] { background: var(--lacquer-2); }
.sr-item .frame { width: 40px; height: 40px; }
.sr-item .frame img { width: 36px; height: 36px; }
.sr-cat { font-family: var(--sans); font-size: .8rem; color: var(--stone); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, calc(100% + 40px)); z-index: 90; background: #2b211a; border: 1px solid var(--hairline); border-radius: 999px;
  padding: 9px 18px; font-family: var(--sans); font-size: .95rem; max-width: calc(100% - 32px); opacity: 0; visibility: hidden;
  transition: transform 260ms var(--ease), opacity 200ms, visibility 0s linear 260ms; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform 260ms var(--ease), opacity 200ms; }

/* ---------- special views ---------- */
.relics { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.relic { border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); background: rgba(36,27,22,.6); padding: 16px; }
.relic.done { border-color: rgba(184,57,43,.5); }
.relic-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; }
.relic-head .frame { width: 64px; height: 64px; }
.relic-head .frame img { width: 60px; height: 60px; }
.talents { margin-top: 12px; display: grid; gap: 8px; }
.talent { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-s); }
.talent .frame { width: 34px; height: 34px; }
.talent .frame img { width: 30px; height: 30px; }
.talent .cyc { font-family: var(--sans); font-size: .76rem; color: var(--stone); }

.tree { margin-bottom: 26px; }
.tree-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 8px; }
.tree-head h3 { margin: 0; font-size: var(--step-2); }
.branches { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.branch { border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); padding: 12px; background: rgba(36,27,22,.55); }
.branch h4 { margin: 0 0 8px; display: flex; justify-content: space-between; gap: 10px; font-size: 1.02rem; }
.node { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--hairline-soft); }
.node:first-of-type { border-top: 0; }
.node .frame { width: 34px; height: 34px; }
.node .frame img { width: 30px; height: 30px; }
.node .nm { min-width: 0; }
.node .nm button { all: unset; cursor: pointer; font-weight: 600; line-height: 1.2; }
.node .nm button:focus-visible { outline: 2px solid var(--gold); }
.node .meta { font-family: var(--sans); font-size: .76rem; color: var(--stone); }
.sparks { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.journal-group { margin-bottom: 26px; }
.portraits { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.portrait { position: relative; border: 1px solid var(--hairline-soft); border-radius: var(--radius-s); background: rgba(36,27,22,.6); padding: 8px; text-align: center; }
.portrait.done { border-color: rgba(184,57,43,.5); }
.portrait .frame { width: 100%; height: auto; aspect-ratio: 1; margin-bottom: 6px; }
.portrait .frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait .nm { font-size: .86rem; font-weight: 600; line-height: 1.15; min-height: 2.3em; overflow-wrap: break-word; hyphens: auto; }
.portrait .seal { position: absolute; top: 6px; right: 6px; }
.portrait .open { position: absolute; inset: 0; background: transparent; border: 0; }

.list { border-top: 1px solid var(--hairline-soft); }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--hairline-soft); }
.row .nm button { all: unset; cursor: pointer; font-weight: 700; }
.row .nm button:focus-visible { outline: 2px solid var(--gold); }
.row .loc { color: var(--rice-2); font-size: .93rem; }
.group-title { margin: 24px 0 8px; font-size: 1.15rem; color: var(--bronze); font-weight: 700; }
.group-title .en-name, .group-title .small { font-weight: 400; }
.group-title .small { font-family: var(--sans); }
.link-btn { border: 0; background: none; padding: 0 0 0 10px; font-family: var(--sans); font-size: .84rem; font-weight: 500; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link-btn:hover { color: var(--gold-hi); }
.objlist { list-style: none; padding: 0; margin: 0; }
.objlist li { padding: 2px 0; }
.d-act { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-s); background: rgba(23,19,15,.45); }
.d-act .small { flex: 1 1 160px; }
.d-lv { flex-basis: 100%; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 0; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--hairline-soft); }
.steps li input { accent-color: var(--cinnabar); width: 17px; height: 17px; margin-top: 3px; }
.steps .where { font-family: var(--sans); font-size: .85rem; color: var(--stone); }

.cycles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.cycle { border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); padding: 14px; background: rgba(36,27,22,.6); }
.cycle.current { border-color: var(--bronze); box-shadow: inset 0 0 0 1px rgba(214,178,94,.25); }
.cycle h4 { margin: 0 0 6px; }
.cycle ul { margin: 6px 0 0; padding-left: 18px; color: var(--rice-2); font-size: .93rem; }

.reg-table td .bar { min-width: 90px; }
.legend { display: grid; gap: 6px; font-family: var(--sans); font-size: .9rem; }
.st-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.st-C { background: var(--jade); } .st-P { background: var(--gold); } .st-U { background: var(--r-legendary); } .st-D { background: var(--r-rare); } .st-N { background: var(--cinnabar); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.stat { border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); padding: 14px; background: rgba(36,27,22,.6); }
.stat h4 { margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.stat .big { font-size: 1.5rem; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; }
.stat ul { margin: 8px 0 0; padding-left: 18px; font-size: .9rem; color: var(--rice-2); }
.dose-row { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hairline-soft); }
.dose-row .frame { width: 44px; height: 44px; }
.dose-row .frame img { width: 40px; height: 40px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--hairline); border-radius: var(--radius-s); overflow: hidden; font-family: var(--sans); }
.stepper button { width: 32px; height: 32px; border: 0; background: var(--lacquer-2); font-size: 1.1rem; }
.stepper button:hover { background: var(--lacquer-3); }
.stepper output { min-width: 64px; text-align: center; font-variant-numeric: lining-nums tabular-nums; }
.inline-input { width: 74px; background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 5px 7px; text-align: right; }
.need-table td.def { color: #e88a7c; font-weight: 700; }
.empty { padding: 30px; text-align: center; color: var(--stone); border: 1px dashed var(--hairline); border-radius: var(--radius-m); }

/* ---------- app shell additions ---------- */
.boot { color: var(--stone); font-family: var(--sans); }
.top-meta-chips { display: flex; align-items: center; gap: 8px; }
.top-meta .save-dot { margin-left: 4px; }
.top-staff .save-dot { display: none; }
.search-hint { margin: 0; padding: 16px 18px; color: var(--stone); font-family: var(--sans); font-size: .95rem; }
.sr-names { min-width: 0; display: flex; flex-direction: column; }
.sr-fr { font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.sr-cat { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.sr-cat b { font-weight: 500; color: var(--rice-2); font-variant-numeric: lining-nums tabular-nums; }
.sr-item.done .sr-cat b { color: var(--cinnabar-hi); }
.mform label { display: grid; gap: 5px; font-family: var(--sans); font-size: .9rem; color: var(--rice-2); }
.mform input, .mform select { background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 8px 10px; font-size: 1.05rem; color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 4px; }
.mrow.one { grid-template-columns: minmax(0, 260px); }
.cycle-seg { flex-wrap: wrap; margin-top: 4px; font-family: var(--sans); }
.cycle-seg button { padding: 7px 12px; }
.warn-text { color: #e3b878; }
@media (min-width: 981px) {
  .top-staff { transition: opacity 260ms var(--ease); }
  body.is-home:not(.hero-out) .top-staff { opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease), visibility 0s linear 260ms; }
}

.intro { margin-top: 18px; border-color: var(--bronze-dim); }
.intro ul { margin: 0; padding-left: 20px; color: var(--rice-2); }
.intro li { margin: 4px 0; }
.seal-ref { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: var(--cinnabar); color: #f6e7d8; font-family: var(--brush); font-size: 14px; line-height: 1; transform: rotate(-4deg); vertical-align: -3px; }
.foot { margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--hairline-soft); font-family: var(--sans); font-size: .82rem; color: var(--stone-dim); max-width: 90ch; }
.foot p { margin: 4px 0; }
.foot a { color: var(--stone); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .search-trigger span, .search-trigger kbd { display: none; }
  .top { gap: 14px; }
  .top-staff { gap: 10px; }
  .top-staff .staff { min-width: 40px; }
  .top-meta-chips { gap: 6px; }
  .top-meta .meta-chip { padding: 4px 7px; }
}
@media (max-width: 980px) {
  :root { --top-h: 112px; }
  .top { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-rows: 56px 46px; height: var(--top-h); padding: 0 14px; gap: 0 10px; }
  .acct { grid-column: 4; grid-row: 1; }
  .nav-toggle { display: block; }
  .brand { grid-column: 2; }
  .brand-glyph { width: 38px; height: 38px; font-size: 28px; }
  .brand-mark { width: 38px; height: 38px; }
  .search-trigger { grid-column: 3; grid-row: 1; }
  .top-staff { grid-column: 1 / -1; grid-row: 2; }
  .top-meta { display: none; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; top: var(--top-h); left: 0; bottom: 0; width: min(300px, 86vw); height: auto; z-index: 55; background: #1d1713;
    transform: translateX(-105%); visibility: hidden; transition: transform 260ms var(--ease), visibility 0s linear 260ms; border-right: 1px solid var(--hairline); overscroll-behavior: contain; }
  .side.open { transform: none; visibility: visible; transition: transform 260ms var(--ease); }
  .top-staff .save-dot { display: block; }
  main { padding: 20px 16px 90px; }
  .hero { padding: 22px 18px; }
  .hero-grid { grid-template-columns: 1fr; }
  .page-head { grid-template-columns: 1fr; }
  .meta-mobile { display: flex !important; }
}
.meta-mobile { display: none; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
@media (max-width: 760px) {
  .f-toggle { display: inline-block; }
  .filters { gap: 8px; }
  .filters:not(.open) .f-more { display: none; }
  .filters.open .f-more { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .dims { gap: 8px 16px; }
  .dim { flex: 1 1 140px; min-width: 140px; }
  .hero::before { height: 56px; opacity: .12; }
  .grid, .grid.compact { grid-template-columns: 1fr; }
  .tile { grid-template-columns: 52px 1fr auto; }
  .frame { width: 50px; height: 50px; }
  .frame img { width: 46px; height: 46px; }
  .staff-value { font-size: 1.1rem; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .d-head { grid-template-columns: 72px 1fr; }
  .d-head .frame { width: 72px; height: 72px; }
  .drawer { padding: 18px 16px 60px; }
  .portraits { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
.tile .lv, .tile .act { pointer-events: none; }
.tile .lv .pips, .tile .lv .stepper, .tile .lv .rladder, .tile .act > * { pointer-events: auto; }
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 28px; align-items: start; }
.dash-stack { display: grid; gap: 16px; }
.dash-stack > .panel + .panel { margin-top: 0; }
@media (max-width: 980px) { .dash-cols { grid-template-columns: 1fr; } }

/* ---------- objectif : 100 % réel / Platine ---------- */
.goal-switch { display: inline-flex; border: 1px solid var(--hairline); border-radius: var(--radius-m); overflow: hidden; background: rgba(23,19,15,.5); font-family: var(--sans); flex: none; }
.goal-switch button { display: grid; gap: 1px; justify-items: start; border: 0; border-right: 1px solid var(--hairline-soft); background: transparent; padding: 7px 14px 8px; color: var(--stone); text-align: left; min-width: 112px; }
.goal-switch button:last-child { border-right: 0; }
.goal-switch button:hover { background: var(--lacquer); color: var(--rice-2); }
.goal-switch button[aria-pressed="true"] { background: var(--lacquer-3); color: var(--rice); box-shadow: inset 0 -2px 0 var(--gold); }
.goal-switch .g-l { font-size: .82rem; white-space: nowrap; }
.goal-switch .g-v { font-family: var(--serif); font-size: 1.15rem; font-weight: 800; line-height: 1.15; color: inherit; font-variant-numeric: lining-nums tabular-nums; }
.goal-switch.sm { border-radius: var(--radius-s); }
.goal-switch.sm button { display: inline-flex; align-items: center; min-width: 0; padding: 5px 11px; }
.goal-switch.sm .g-l { font-size: .88rem; }
.goal-switch.hdr button { padding: 4px 9px; }
.goal-switch.hdr .g-l { font-size: .8rem; }
.top-goal { display: inline-flex; flex: none; }
.staff-value small { display: none; }
.hero-bar { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-bottom: 10px; }
.hero-bar .hero-label { margin: 0; }
.goal-banner { font-family: var(--sans); font-size: .92rem; color: var(--rice-2); border-left: 2px solid var(--gold-deep); background: rgba(36,27,22,.5); padding: 7px 12px; margin: 0 0 14px; max-width: 80ch; }
.goal-banner.off { border-left-color: var(--stone-dim); color: var(--stone); }
/* éléments qui ne comptent pas dans le mode choisi : visuel et texte atténués, étiquette lisible */
.tile.off > .frame, .tile.info > .frame, .row.off > .frame, .row.info > .frame { opacity: .5; filter: grayscale(.75); }
.tile.off .names > :not(.chips), .tile.info .names > :not(.chips), .row.off .nm > :not(.chips), .row.info .nm > :not(.chips),
.tile.off > .act, .tile.off > .lv, .row.off > .act { opacity: .55; }
.tile.off:hover > *, .tile.off:focus-within > *, .row.off:hover > *, .row.off:focus-within > * { opacity: 1; filter: none; }
.tile.off:hover .names > *, .tile.off:focus-within .names > *, .row.off:hover .nm > *, .row.off:focus-within .nm > * { opacity: 1; }
.chip.bonus { border-color: rgba(214,178,94,.5); color: var(--gold-hi); background: rgba(214,178,94,.08); }
.chip.info { border-style: dotted; border-color: var(--hairline); color: var(--rice-2); }
.chip.off { border-style: dashed; color: var(--stone-dim); }
.gt-n { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--hairline-soft); border-radius: 999px; font-family: var(--sans); font-size: .78rem; font-weight: 500; color: var(--stone); vertical-align: 2px; }
.group-note { margin: -4px 0 10px; max-width: 80ch; font-family: var(--sans); font-size: .88rem; color: var(--stone); }
.group-title.sec-in { color: var(--gold); }
.group-title.sec-plat, .group-title.sec-opt, .group-title.sec-info { color: var(--stone); }
.side .pct.off { color: var(--stone-dim); }
.near { padding: 7px 0; border-bottom: 1px solid var(--hairline-soft); }
.near-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.near-row a { color: var(--rice); font-weight: 600; text-decoration: none; }
.near-row a:hover { color: var(--gold-hi); }
.req-meter { margin-top: 8px; max-width: 360px; }
.req-meter .dim { max-width: none; }
details.req { margin-top: 6px; }
.req-list { list-style: none; margin: 6px 0 0; padding: 0; font-family: var(--sans); font-size: .9rem; }
.req-grp { padding: 4px 0; }
.req-cat { color: var(--bronze); }
.req-grp ul { list-style: none; margin: 3px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 14px; }
.req-grp li { color: var(--rice-2); }
.req-grp li.done { color: var(--stone); }
.req-mark { display: inline-block; width: 1.3em; color: var(--stone-dim); }
.req-grp li.done .req-mark { color: var(--cinnabar-hi); }
.req-grp a { color: inherit; text-decoration-color: var(--hairline); }
.chip.ready { border-color: rgba(124,158,134,.85); color: #c3dccb; }
@media (max-width: 560px) {
  .goal-switch button { min-width: 0; padding: 6px 10px 7px; }
  .goal-switch .g-v { font-size: 1.05rem; }
  .goal-switch.hdr button { padding: 4px 7px; }
  .hero-bar { align-items: flex-start; }
}

/* ---------- jeux : onglets, page des jeux, page « Prochainement » ---------- */
.side .game-tabs { display: grid; gap: 6px; margin: 0 0 8px; }
.side .game-tab { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 8px 9px;
  border: 1px solid var(--hairline-soft); border-radius: var(--radius-s); background: rgba(36,27,22,.5); color: var(--rice-2); text-decoration: none; }
.side .game-tab:hover { background: var(--lacquer); }
.side .game-tab[aria-current="true"] { background: var(--lacquer-2); border-color: var(--bronze-dim); box-shadow: inset 0 2px 0 var(--gold); }
.gt-glyph { grid-row: 1 / span 2; font-family: var(--brush); font-size: 26px; line-height: 1; color: var(--bronze); }
.game-tab[aria-current="true"] .gt-glyph { color: var(--rice); }
.gt-name { font-weight: 700; font-size: .92rem; color: var(--rice); line-height: 1.2; }
.gt-meta { font-size: .74rem; color: var(--stone); line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.game-tab.soon .gt-meta { color: #a9c7b2; }
.soon-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 30px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-m);
  background: linear-gradient(180deg, rgba(46,35,28,.75), rgba(29,24,20,.85)); }
.soon-glyph { width: 1.35em; height: 1.35em; display: grid; place-items: center; font-family: var(--brush); font-size: clamp(64px, 10vw, 118px); line-height: 1; color: var(--rice);
  border: 1px solid var(--hairline); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #3a2c22, #1d1814); box-shadow: inset 0 0 0 6px rgba(23,19,15,.55); }
.soon-hero .hero-label { margin-bottom: 4px; }
.soon-hero .page-title .en { font-style: normal; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--hairline); max-width: 78ch; }
.timeline li { position: relative; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 10px 0 10px 18px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 18px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold-deep); box-shadow: 0 0 0 3px var(--ink); }
.timeline b { font-family: var(--sans); font-weight: 600; color: var(--bronze); }
.timeline a { white-space: nowrap; font-family: var(--sans); font-size: .88rem; }

/* ---------- signalements ---------- */
.ticket fieldset { border: 0; padding: 0; margin: 0 0 10px; min-width: 0; }
.ticket legend { font-family: var(--sans); font-size: .9rem; color: var(--rice-2); margin-bottom: 6px; padding: 0; }
.t-type .seg { flex-wrap: wrap; }
.t-type label { position: relative; display: block; }
.t-type input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.t-type span { display: block; padding: 6px 12px; font-family: var(--sans); font-size: .92rem; color: var(--rice-2); border-right: 1px solid var(--hairline-soft); cursor: pointer; }
.t-type label:last-child span { border-right: 0; }
.t-type label:hover span { background: var(--lacquer); }
.t-type input:checked + span { background: var(--lacquer-3); color: var(--rice); box-shadow: inset 0 -2px 0 var(--gold); }
.t-type input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -2px; }
.ticket > label { display: block; font-family: var(--sans); font-size: .9rem; color: var(--rice-2); margin: 12px 0 5px; }
.ticket textarea, .ticket input[type="email"] { width: 100%; background: var(--ink); border: 1px solid var(--hairline); border-radius: var(--radius-s); padding: 8px 10px; font-size: 1rem; color: var(--rice); }
.ticket textarea { resize: vertical; min-height: 120px; line-height: 1.45; }
.ticket textarea:focus, .ticket input[type="email"]:focus { border-color: var(--bronze-dim); }
.t-ctx { font-family: var(--sans); font-size: .92rem; color: var(--rice-2); margin: 2px 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.t-status { color: #e3b878; margin: 8px 0 0; }
.t-status:empty { display: none; }
.ticket-ok .t-ref { font-family: var(--sans); letter-spacing: .04em; color: var(--gold-hi); }
.tips { margin: 0; padding-left: 18px; color: var(--rice-2); }
.tips li { margin: 5px 0; }
.foot-report { padding: 0; font-size: .92rem; }
.d-report { border-top: 1px solid var(--hairline-soft); padding-top: 14px; }
.d-report .small { margin-top: 6px; }
@media (max-width: 560px) {
  .soon-hero { grid-template-columns: 1fr; padding: 22px 18px; gap: 16px; }
  .soon-glyph { font-size: 64px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .t-type span { padding: 6px 10px; }
}
.row .nm { min-width: 0; overflow-wrap: anywhere; }

a.btn { display: inline-block; text-decoration: none; }

/* ---------- rareté des armures (couleurs du jeu) ---------- */
.rladder { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 5px; font-family: var(--sans); }
.rsteps { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0 3px 3px; }
.rlab { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.25; }
.rstep { width: 13px; height: 13px; padding: 0; border-radius: 2px; transform: rotate(45deg); background: transparent;
  border: 1.5px solid var(--rc); border: 1.5px solid color-mix(in srgb, var(--rc) 65%, transparent); transition: background 140ms, box-shadow 140ms; }
.rstep.on { background: var(--rc); border-color: var(--rc); box-shadow: 0 0 7px color-mix(in srgb, var(--rc) 50%, transparent); }
button.rstep:hover { background: color-mix(in srgb, var(--rc) 35%, transparent); }
button.rstep.on:hover { background: var(--rc); filter: brightness(1.12); }
.rstep.base { width: 9px; height: 9px; margin-right: 2px; }
.rname { font-size: .82rem; font-weight: 700; color: var(--rc); }
.rmax { font-size: .74rem; color: var(--stone); }
.rladder.pending .rname { color: var(--stone); font-weight: 500; }
.tile.rar { box-shadow: inset 3px 0 0 var(--rc); }
.tile.rar.todo { box-shadow: inset 3px 0 0 color-mix(in srgb, var(--rc) 40%, transparent); }
.chip.rar { border-color: var(--rc); color: var(--rc); }
.rdot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--rc); margin: 0 7px 1px 2px; }
.rar-table tr.cur td { background: color-mix(in srgb, var(--lacquer-3) 70%, transparent); }
.rar-table tr.cur td:first-child { box-shadow: inset 2px 0 0 var(--gold); }
table.t tr.done td { color: var(--stone); }
.rar-legend { margin: 0 0 14px; max-width: 80ch; }
.rar-legend p { margin: 0 0 6px; }
.rar-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-family: var(--sans); font-size: .86rem; color: var(--rice-2); }
.rar-keys span { display: inline-flex; align-items: center; gap: 8px; }
.rar-keys i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); background: var(--rc); }
.chip.homo { border-color: rgba(214,178,94,.55); color: var(--gold-hi); }
.chip.set-chip { border-style: dotted; }

/* ---------- édition Deluxe : bascule d'en-tête et du tableau de bord ---------- */
.top-goal { gap: 8px; align-items: center; }
.hero-ctrl { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.dx-toggle { display: inline-flex; align-items: center; gap: 8px; flex: none; border: 1px solid var(--hairline); border-radius: var(--radius-s);
  background: rgba(23,19,15,.5); color: var(--stone); font-family: var(--sans); font-size: .8rem; line-height: 1.25; padding: 4px 10px; white-space: nowrap; }
.dx-toggle:hover { background: var(--lacquer); color: var(--rice-2); }
.dx-mark { width: 9px; height: 9px; flex: none; border-radius: 2px; transform: rotate(45deg); border: 1.5px solid var(--bronze); transition: background 140ms, box-shadow 140ms; }
.dx-toggle[aria-pressed="true"] { color: var(--rice); background: var(--lacquer-3); border-color: var(--bronze-dim); box-shadow: inset 0 -2px 0 var(--gold); }
.dx-toggle[aria-pressed="true"] .dx-mark { background: var(--gold); border-color: var(--gold); box-shadow: 0 0 6px rgba(214,178,94,.55); }
.dx-toggle.idle { border-style: dashed; color: var(--stone-dim); }
.dx-toggle.idle[aria-pressed="true"] { box-shadow: none; color: var(--stone); }
.dx-toggle.lg { border-radius: var(--radius-m); padding: 7px 14px 8px; gap: 10px; }
.dx-t { display: grid; gap: 1px; text-align: left; }
.dx-toggle.lg .dx-l { font-size: .82rem; }
.dx-v { font-family: var(--serif); font-size: 1.15rem; font-weight: 800; line-height: 1.15; color: inherit; }
@media (max-width: 560px) { .dx-toggle { padding: 4px 8px; gap: 7px; } .dx-toggle.lg { padding: 6px 10px 7px; } .top-goal { gap: 6px; }
  .top-staff { gap: 8px; } .top-staff .staff { min-width: 56px; } }

/* ---------- lignées d'évolution (gourdes, boissons) ---------- */
.grid.lines { margin-bottom: 20px; }
.lcard { grid-column: 1 / -1; container-type: inline-size; position: relative; min-width: 0; padding: 12px 14px 10px; border: 1px solid var(--hairline-soft); border-radius: var(--radius-s);
  background: linear-gradient(180deg, rgba(46,35,28,.55), rgba(36,27,22,.55)); }
.lcard.short { grid-column: span 2; }
.lcard.done { border-color: rgba(184,57,43,.45); background: linear-gradient(180deg, rgba(60,30,24,.5), rgba(36,27,22,.6)); }
.lcard.partial { border-color: rgba(124,158,134,.4); }
.lcard.off { opacity: .55; }
.lcard.off:hover, .lcard.off:focus-within { opacity: 1; }
.lc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 16px; margin-bottom: 10px; }
.lc-names { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
.lc-title { margin: 0; font-size: 1.06rem; font-weight: 800; line-height: 1.2; color: var(--rice); }
.lc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 14px; font-family: var(--sans); font-size: .84rem; color: var(--stone); }
.lc-count b { font-family: var(--serif); font-size: 1.05rem; color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.evo { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ev { position: relative; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; text-align: center; gap: 6px; padding: 4px 6px 2px; min-width: 0; }
.ev + .ev::before { content: ""; position: absolute; top: 31px; left: calc(-50% + 36px); right: calc(50% + 38px); height: 2px; background: var(--hairline); }
.ev + .ev::after { content: ""; position: absolute; top: 27px; right: calc(50% + 32px); width: 0; height: 0;
  border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid var(--hairline); }
.ev.on + .ev.on::before { background: var(--gold-deep); }
.ev.on + .ev.on::after { border-left-color: var(--gold-deep); }
.ev:not(.on) .frame { opacity: .5; filter: saturate(.55); }
.ev.cur .frame { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(214,178,94,.35); }
.ev.future, .ev.off { opacity: .7; }
.ev-body { display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; }
.ev-name { border: 0; background: none; padding: 0; color: var(--rice); font: inherit; font-weight: 700; font-size: .92rem; line-height: 1.2; text-align: center;
  overflow-wrap: anywhere; hyphens: auto; cursor: pointer; }
.ev-name:hover { color: var(--gold-hi); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ev-name.unverified { color: var(--rice-2); }
.ev-how { font-family: var(--sans); font-size: .76rem; color: var(--stone); line-height: 1.3; }
.ev .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.ev-act { min-height: 30px; display: grid; place-items: center; }
.ev-start { font-family: var(--sans); font-size: .74rem; color: var(--stone); border: 1px dotted var(--hairline); border-radius: var(--radius-s); padding: 3px 7px; white-space: nowrap; }
@container (max-width: 860px) {
  .lcard.long .evo { grid-auto-flow: row; grid-auto-columns: auto; }
  .lcard.long .ev { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: none; justify-items: start; align-items: center; text-align: left; gap: 4px 12px; padding: 7px 0; }
  .lcard.long .ev-body { justify-items: start; }
  .lcard.long .ev-name { text-align: left; }
  .lcard.long .ev .chips { justify-content: flex-start; }
  .lcard.long .ev + .ev::before, .lcard.long .ev::after { content: ""; position: absolute; left: 27px; right: auto; width: 2px; height: auto; border: 0; background: var(--hairline); }
  .lcard.long .ev + .ev::before { top: 0; bottom: calc(50% + 28px); }
  .lcard.long .ev::after { top: calc(50% + 28px); bottom: 0; }
  .lcard.long .ev:last-child::after { display: none; }
  .lcard.long .ev.on + .ev.on::before, .lcard.long .ev.on:has(+ .ev.on)::after { background: var(--gold-deep); }
}
@container (max-width: 420px) {
  .lcard.short .evo { grid-auto-flow: row; grid-auto-columns: auto; }
  .lcard.short .ev { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: none; justify-items: start; align-items: center; text-align: left; gap: 4px 12px; padding: 7px 0; }
  .lcard.short .ev-body { justify-items: start; }
  .lcard.short .ev-name { text-align: left; }
  .lcard.short .ev .chips { justify-content: flex-start; }
  .lcard.short .ev + .ev::before, .lcard.short .ev::after { content: ""; position: absolute; left: 27px; right: auto; width: 2px; height: auto; border: 0; background: var(--hairline); }
  .lcard.short .ev + .ev::before { top: 0; bottom: calc(50% + 28px); }
  .lcard.short .ev::after { top: calc(50% + 28px); bottom: 0; }
  .lcard.short .ev:last-child::after { display: none; }
  .lcard.short .ev.on + .ev.on::before, .lcard.short .ev.on:has(+ .ev.on)::after { background: var(--gold-deep); }
}
@media (max-width: 640px) { .lcard.short { grid-column: 1 / -1; } }
.evo-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; gap: 6px; }
.evo-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 8px; }
.evo-list li > .seal, .evo-list li > .ev-start { justify-self: center; }
.evo-list li.me b { color: var(--gold-hi); }
.evo-list .ev-how { display: block; }
.evo-list .ev-start { font-size: .7rem; padding: 2px 5px; }

/* ---------- collectibles vus comme conditions : « Nécessaire pour » ---------- */
.use-list li { display: block; padding: 2px 0; }
.use-list li.done { color: var(--stone); }
.use-list li.done .req-mark { color: var(--cinnabar-hi); }
.use-list li.nc a { color: var(--stone); }
.d-act:empty { display: none; }

/* ---------- corrélations : message avec actions, fenêtre d'explication ---------- */
.toast.act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; border-radius: 12px; padding: 10px 14px 10px 18px; width: max-content; max-width: min(640px, calc(100% - 32px)); }
.toast .t-msg { flex: 1 1 260px; }
.toast .t-acts { display: flex; gap: 8px; flex: none; }
.toast .t-acts .btn { padding: 5px 12px; font-size: .88rem; }
.link-list { margin: 8px 0 12px; padding-left: 18px; font-family: var(--sans); font-size: .95rem; }
.link-list li { margin: 3px 0; }
.link-list .k { color: var(--stone); font-size: .82rem; margin-left: 4px; }

/* ---------- Mon espace : bouton d'en-tête, compte, propositions, notifications ---------- */
.acct { position: relative; display: flex; align-items: center; gap: 8px; border: 1px solid var(--hairline); background: var(--ink-2); color: var(--stone);
  border-radius: 999px; padding: 7px 12px; font-family: var(--sans); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.acct svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex: none; }
.acct:hover { color: var(--rice-2); border-color: var(--bronze-dim); }
.acct.on svg { stroke: var(--jade); }
.acct.err svg { stroke: var(--cinnabar-hi); }
body[data-route="espace"] .acct { color: var(--rice); border-color: var(--bronze-dim); background: var(--lacquer-2); }
.acct-n { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--cinnabar); color: #f6e7d8;
  font-size: .74rem; font-weight: 700; line-height: 19px; text-align: center; font-variant-numeric: lining-nums tabular-nums; box-shadow: 0 0 0 2px var(--ink); }
@media (max-width: 1180px) { .acct-l { display: none; } .acct { padding: 7px 9px; } }
.espace { display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr); gap: 16px; align-items: start; }
.espace-side, .espace-main { display: grid; gap: 16px; min-width: 0; }
.espace .panel + .panel { margin-top: 0; }
@media (max-width: 980px) {
  .espace { grid-template-columns: minmax(0, 1fr); }
  .espace-side, .espace-main { display: contents; }
  .espace .privacy { order: 9; }
}
.acc h4, .inbox h4 { margin: 18px 0 6px; font-family: var(--sans); font-size: .92rem; font-weight: 700; color: var(--rice-2); }
.acc-form h4 { margin-top: 4px; }
.acc-google { display: block; width: 100%; margin: 14px 0 4px; padding: 10px 14px; font-size: 1rem; text-align: center; }
.acc-or { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; color: var(--stone); font-family: var(--sans); font-size: .86rem; }
.acc-or::before, .acc-or::after { content: ""; flex: 1; border-top: 1px solid var(--hairline-soft); }
.acc-modes { display: flex; flex-wrap: wrap; margin: 6px 0 2px; }
.acc-modes button { flex: 1 1 auto; }
.acc-form { margin: 4px 0 6px; }
.acc-form label { margin-top: 12px; }
.acc-form input { width: 100%; font-size: 1rem; }
.acc-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 6px; }
.acc-msg { margin: 12px 0; padding: 9px 12px; border: 1px solid var(--hairline); border-radius: var(--radius-s); font-family: var(--sans); font-size: .95rem; }
.acc-msg.ok { border-color: var(--jade-dim); background: rgba(124,158,134,.12); }
.acc-msg.err { border-color: rgba(184,57,43,.6); background: rgba(184,57,43,.12); }
.acc-who, .acc-sync { display: flex; align-items: center; gap: 9px; margin: 8px 0; overflow-wrap: anywhere; }
.acc-sync { font-family: var(--sans); font-size: .93rem; color: var(--rice-2); }
.acc-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stone-dim); flex: none; }
.acc-dot.on { background: var(--jade); }
.acc-dot.wait { background: var(--bronze); }
.acc-dot.busy { background: var(--gold); animation: pulse 900ms ease-in-out infinite; }
.acc-dot.err { background: var(--cinnabar-hi); }
.acc-manage { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--hairline-soft); }
.acc-manage summary, .props-later summary { cursor: pointer; font-family: var(--sans); color: var(--rice-2); }
.acc-danger { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.props-list { list-style: none; margin: 10px 0; padding: 0; font-family: var(--sans); }
.props-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 8px 0; border-bottom: 1px solid var(--hairline-soft); }
.props-list .k, .inbox-list .k { color: var(--stone); font-size: .82rem; }
.props-list .acts { margin-left: auto; display: flex; gap: 6px; }
.props-list .acts .btn { padding: 4px 11px; font-size: .88rem; }
.inbox-n { margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: rgba(184,57,43,.18); border: 1px solid rgba(184,57,43,.5); color: #f0b3a8;
  font-family: var(--sans); font-size: .78rem; font-weight: 700; vertical-align: 2px; }
.inbox-list { list-style: none; margin: 0; padding: 0; }
.inbox-list li { position: relative; display: grid; grid-template-columns: 7.6em minmax(0, 1fr); gap: 4px 14px; padding: 9px 0 9px 16px; border-bottom: 1px solid var(--hairline-soft); }
.inbox-list li:last-child { border-bottom: 0; }
.inbox-list li.new::before { content: ""; position: absolute; left: 1px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--cinnabar-hi); }
.inbox-list time { font-family: var(--sans); font-size: .82rem; color: var(--stone); font-variant-numeric: lining-nums tabular-nums; padding-top: 2px; }
.inbox-list p { margin: 0; }
.inbox-list .k { display: block; margin-bottom: 1px; }
.inbox-list.changes b { color: var(--rice); }
.inbox-list.changes p { color: var(--rice-2); font-size: .95rem; margin-top: 2px; }
.inbox details { margin-top: 6px; }
.privacy ul { margin: 0; padding-left: 20px; color: var(--rice-2); }
.privacy li { margin: 7px 0; }
@media (max-width: 560px) {
  .inbox-list li { grid-template-columns: 1fr; }
  .props-list .acts { margin-left: 0; }
}
@media (max-width: 340px) {
  .top-staff { gap: 6px; }
  .top-staff .staff { min-width: 22px; }
  .goal-switch.hdr button { padding: 5px 7px; }
  .dx-toggle { padding: 4px 6px; gap: 5px; }
}
.acc-msg p { margin: 0; }
.acc-msg .acc-acts { margin-bottom: 0; }

/* ---------- tableau de bord : onglets par chapitre, accès différé ---------- */
.ch-tabs { display: flex; gap: 2px; margin: 2px 0 18px; border-bottom: 1px solid var(--hairline-soft); overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tab { position: relative; flex: 0 0 auto; display: grid; justify-items: start; gap: 1px; padding: 8px 15px 13px; border: 0; background: transparent; color: var(--stone);
  font-family: var(--sans); text-align: left; border-radius: var(--radius-s) var(--radius-s) 0 0; }
.ch-tab .ch-l { font-size: .95rem; font-weight: 700; white-space: nowrap; }
.ch-tab .ch-s { display: none; font-size: .95rem; font-weight: 700; }
.ch-tab .ch-p { font-size: .8rem; color: var(--stone-dim); font-variant-numeric: lining-nums tabular-nums; min-height: 1.15em; }
.ch-tab::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 6px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--gold-deep) var(--p, 0%), var(--hairline-soft) var(--p, 0%)); }
.ch-tab.full::after { background: var(--cinnabar); }
.ch-tab:hover { color: var(--rice-2); background: var(--lacquer); }
.ch-tab[aria-pressed="true"] { color: var(--rice); background: var(--lacquer-2); box-shadow: inset 0 -2px 0 var(--gold); }
.ch-tab[aria-pressed="true"] .ch-p { color: var(--rice-2); }
.ch-head { margin: 0 0 4px; }
.ch-name { margin: 0; font-size: var(--step-1); color: var(--rice); }
.ch-sum { margin: 4px 0 0; color: var(--rice-2); max-width: 82ch; }
.ch-sum b { color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.ch-note { margin: 16px 0 0; }
.ch-panels { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-top: 18px; }
.later-list { list-style: none; margin: 8px 0 0; padding: 0; }
.later-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; padding: 9px 0; border-bottom: 1px solid var(--hairline-soft); }
.later-list li:last-child { border-bottom: 0; }
.later-list p { flex-basis: 100%; margin: 2px 0 0; color: var(--rice-2); font-size: .93rem; }
.later-list .k { color: var(--stone); font-size: .82rem; font-family: var(--sans); }
.ch-later details, .ch-pass details { margin-top: 6px; }
.chip.later { border-color: rgba(124,158,134,.6); color: #a9c7b2; }
.d-later h4 { color: #a9c7b2; }
@media (max-width: 760px) {
  .ch-tab { padding: 7px 11px 12px; }
  .ch-tab::after { left: 11px; right: 11px; }
  .ch-tab.has-short .ch-l { display: none; }
  .ch-tab.has-short .ch-s { display: inline; }
  .ch-panels { grid-template-columns: minmax(0, 1fr); }
}
.portrait .p-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 4px; }
.portrait .p-tags .chip { font-size: .7rem; }

/* ---------- Steam ---------- */
.chip.steam { border-color: rgba(107,151,189,.65); color: #a9c8e2; }
.d-steam h4 { color: #a9c8e2; }
.meta-chip.synced { box-shadow: inset 0 -2px 0 rgba(107,151,189,.85); }
.steam-facts { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-family: var(--sans); color: var(--rice-2); }
.steam-facts b { color: var(--rice); font-variant-numeric: lining-nums tabular-nums; }
.steam-props h3 { color: #c7dbec; }

/* ---------- pages statiques (page des jeux, annonces) et lien vers tous les jeux ---------- */
body.static .top { grid-template-columns: auto minmax(0, 1fr); }
.static-main { max-width: 1180px; margin: 0 auto; padding: 34px 34px 80px; }
.static-main .games-grid .bar { margin-top: 8px; }
.static-main > .foot { max-width: 1000px; margin-left: auto; margin-right: auto; }
.side .all-games { display: block; margin: 0 0 6px; padding: 4px 10px; font-family: var(--sans); font-size: .86rem; color: var(--stone); }
.side .all-games:hover { color: var(--rice); background: transparent; }
@media (max-width: 980px) {
  body.static { --top-h: 64px; }
  body.static .top { grid-template-columns: minmax(0, 1fr); grid-template-rows: 64px; padding: 0 16px; }
  body.static .brand { grid-column: 1; }
  .static-main { padding: 22px 16px 60px; }
}

/* ---------- accueil : promesse, reprise de la complétion, collections par studio, cartes de jeu ---------- */
.hub-hero { text-align: center; margin: 0 auto 30px; max-width: 760px; }
.hub-logo { display: block; width: min(440px, 80vw); height: auto; margin: 0 auto 4px; }
.hub-title { font-size: clamp(2rem, 1.2rem + 3vw, 3rem); font-weight: 800; line-height: 1.05; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.hub-intro { color: var(--rice-2); max-width: 60ch; margin: 12px auto 0; font-size: 1.06rem; line-height: 1.6; text-wrap: pretty; }
.resume { max-width: 1000px; margin: 0 auto 38px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px 22px;
  border: 1px solid var(--bronze-dim); border-radius: var(--radius-m); background: linear-gradient(100deg, rgba(58,44,34,.9), rgba(29,24,20,.92)); }
.resume[hidden] { display: none; }
.resume-ring { position: relative; width: 92px; height: 92px; }
.resume-ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.resume-ring circle { fill: none; stroke-width: 9; }
.rr-track { stroke: #2a1d17; }
.rr-fill { stroke: var(--gold); stroke-linecap: round; transition: stroke-dasharray 900ms var(--ease); }
.resume-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: 1rem; font-variant-numeric: lining-nums tabular-nums; }
.resume-title { font-size: var(--step-1); font-weight: 800; margin: 0; }
.resume-game { margin: 2px 0 0; font-weight: 700; color: var(--gold-hi); }
.resume-goals, .resume-at { margin: 2px 0 0; font-family: var(--sans); font-size: .92rem; color: var(--rice-2); font-variant-numeric: lining-nums tabular-nums; }
.resume-at { color: var(--stone); font-size: .86rem; }
.resume-at:empty { display: none; }
.resume .btn.resume-cta { padding: 10px 22px; font-weight: 700; color: #1d1408; border-color: var(--gold-deep); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); }
.resume .btn.resume-cta:hover { border-color: var(--gold-hi); background: linear-gradient(180deg, #f6e2a6, var(--gold-hi)); }
.collection { max-width: 1000px; margin: 0 auto 34px; }
.coll-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 0 0 12px; }
.coll-title { font-size: var(--step-2); font-weight: 800; margin: 0; }
.coll-meta { margin: 0; font-family: var(--sans); font-size: .92rem; color: var(--stone); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.game-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--hairline-soft); border-radius: var(--radius-m); overflow: hidden;
  background: rgba(36,27,22,.6); color: var(--rice); text-decoration: none; }
.game-card:hover, .game-card:focus-visible { border-color: color-mix(in srgb, var(--g-accent, var(--bronze)) 55%, var(--hairline)); }
.game-card.soon { border-style: dashed; }
.gc-visual { position: relative; display: block; height: 196px; background: var(--g-deep, var(--lacquer)); overflow: hidden; }
.gc-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.6  0 0 0 0 0.5  0 0 0 0 0.4  0 0 0 .1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.gc-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.gc-art path { transition: transform 1100ms var(--ease); }
.game-card:hover .gc-art .l3, .game-card:focus-visible .gc-art .l3 { transform: translateX(-12px); }
.game-card:hover .gc-art .l2, .game-card:focus-visible .gc-art .l2 { transform: translateX(-5px); }
.game-card.soon .gc-art { filter: saturate(.75); }
.gc-mark { position: absolute; left: 22px; bottom: 2px; font-family: var(--brush); font-size: 108px; line-height: 1; color: var(--g-accent, var(--gold)); text-shadow: 0 2px 22px rgba(0,0,0,.6); }
.gc-flag { position: absolute; left: 14px; top: 12px; padding: 2px 10px; border-radius: 999px; font-family: var(--sans); font-size: .84rem; color: var(--rice);
  background: rgba(13,17,18,.72); border: 1px solid color-mix(in srgb, var(--g-accent, var(--rice)) 40%, transparent); }
.gc-body { display: grid; align-content: start; gap: 4px; padding: 16px 18px 18px; min-width: 0; }
.gc-name { font-weight: 800; font-size: 1.28rem; line-height: 1.2; }
.gc-status { font-family: var(--sans); font-size: .92rem; color: var(--stone); }
.gc-prog { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-family: var(--sans); font-size: .9rem; color: var(--rice-2); font-variant-numeric: lining-nums tabular-nums; }
.gc-prog[hidden] { display: none; }
.gc-cta { margin-top: 10px; font-family: var(--sans); font-weight: 700; font-size: .92rem; color: var(--g-accent, var(--gold)); }
@media (prefers-reduced-motion: reduce) { .gc-art path, .rr-fill { transition: none; } }
@media (max-width: 560px) {
  .resume { grid-template-columns: auto minmax(0, 1fr); padding: 16px; gap: 14px 16px; }
  .resume-ring { width: 76px; height: 76px; }
  .resume-cta { grid-column: 1 / -1; text-align: center; }
  .gc-visual { height: 168px; }
  .gc-mark { font-size: 92px; }
}
