/* DIES NOX — Trading Card Game · Studio Dies Nox
   Système de conception « l'écrin » : grille de 4 px, typographie avant les cadres, or réservé au précieux. */

:root {
  /* Couleurs */
  --night: #04070f; --ink: #060a16; --ink-2: #0a1122; --ink-3: #0f1830; --royal: #24427f; --royal-2: #3a5fa8;
  --ivory: #efe6d1; --ivory-2: rgba(239,230,209,.78); --ivory-3: rgba(239,230,209,.56); --ivory-4: rgba(239,230,209,.36);
  --sky: #a9c8ec; --gold: #d4b06a; --gold-2: #f0d898; --gold-3: #a8823e; --ok: #8fd8b8; --err: #ef9a9a;
  --line: rgba(239,230,209,.08); --line-2: rgba(239,230,209,.14); --gold-line: rgba(212,176,106,.32); --gold-glow: rgba(240,216,152,.22);
  --glass: rgba(10,17,34,.58); --glass-2: rgba(10,17,34,.82);
  /* Typographie */
  --serif: 'Cormorant Garamond', 'Cormorant', Georgia, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  /* Grille et espacements (multiples de 4) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --wrap: 1200px; --gutter: 24px; --r: 14px; --r-lg: 20px;
  --hud-h: 72px; --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22,.8,.24,1); --ease-out: cubic-bezier(.16,1,.3,1);
  /* Variables attendues par le moteur de cartes repris de LOT 49 */
  --font: var(--sans); --font-cond: var(--sans); --font-serif: var(--serif); --text: var(--ivory); --muted: var(--ivory-3);
  --bg-2: var(--ink-2); --bg-3: var(--ink-3); --paper: var(--ivory); --radius: var(--r);
  --r-rare: #7fb2f2; --r-mythic: #bb96ff; --r-legendary: #f1cf6a;
  --tcg-commun: #c6ccd8; --tcg-non-commun: #8fcf9b; --tcg-rare: #7fb2f2; --tcg-mythique: #bb96ff; --tcg-unique: #f0b874; --tcg-legendaire: #f1cf6a; --tcg-eternel: #f8eaff;
  color-scheme: dark;
}
@media (max-width: 760px) { :root { --gutter: 16px; --hud-h: 60px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body { margin: 0; min-height: 100dvh; font: 400 14.5px/1.6 var(--sans); color: var(--ivory); background: var(--night); -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; text-rendering: optimizeLegibility; }
img { max-width: 100%; }
button { font-family: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: rgba(212,176,106,.35); color: #fff; }
:focus-visible { outline: 1px solid var(--gold-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Décor ---------- */
.backdrop { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background:
  radial-gradient(1200px 760px at 80% -12%, rgba(58,95,168,.26), transparent 62%),
  radial-gradient(900px 640px at -12% 112%, rgba(36,66,127,.24), transparent 60%),
  linear-gradient(180deg, #08101f 0%, #04070f 100%); }
.bd-art { position: absolute; inset: -40px; background: url('assets/banner-blur.webp') center 30%/cover no-repeat; opacity: .1; }
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-100 -100 200 200'%3E%3Cg fill='none' stroke='%23d4b06a' stroke-width='.4'%3E%3Ccircle r='94'/%3E%3Ccircle r='72'/%3E%3Ccircle r='48'/%3E%3C/g%3E%3Cg fill='%23d4b06a'%3E%3Cpath d='M0-98 4-6 0 0-4-6zM0 98 4 6 0 0-4 6zM-98 0-6-4 0 0-6 4zM98 0 6-4 0 0 6 4z'/%3E%3Cpath opacity='.55' d='M-62-62-3-6 0 0-6-3zM62 62 3 6 0 0 6 3zM62-62 6-3 0 0 3-6zM-62 62-6 3 0 0-3 6z'/%3E%3C/g%3E%3C/svg%3E") center/contain no-repeat; }
.bd-grain { position: absolute; inset: 0; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.bd-vignette { position: absolute; inset: 0; background: radial-gradient(130% 95% at 50% 30%, transparent 45%, rgba(2,4,9,.72) 100%); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Typographie ---------- */
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -.005em; color: var(--ivory); overflow-wrap: anywhere; }
.display { font: 500 clamp(40px, 5.4vw, 64px)/1 var(--serif); letter-spacing: -.01em; }
h1 { font-size: clamp(34px, 4.2vw, 48px); line-height: 1.04; }
h2 { font-size: clamp(24px, 2.6vw, 30px); line-height: 1.12; }
h3 { font-size: 20px; line-height: 1.2; }
p { margin: 0; }
.caps { font: 500 10.5px/1.2 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--ivory-3); }
.caps.gold { color: var(--gold); }
.lede { font: italic 400 19px/1.45 var(--serif); color: var(--ivory-2); }
.muted { color: var(--ivory-3); }
.num { font-family: var(--serif); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; letter-spacing: 0; }
.v { font-family: var(--serif); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.v i { font-style: normal; margin-left: .18em; color: var(--gold); font-family: 'Cambria Math', 'STIX Two Math', 'Segoe UI Symbol', var(--serif); font-size: .82em; }

/* ---------- Boutons ---------- */
.btn, .primary-btn, .secondary-btn, .ghost-btn { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font: 500 11px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, border-color .3s, color .3s, opacity .2s; -webkit-user-select: none; user-select: none; }
.primary-btn { color: #1c150b; background: linear-gradient(180deg, #f2dca2, #d1ad64); box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 8px 24px -8px rgba(212,176,106,.55); }
.primary-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease-out); }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.45) inset, 0 14px 30px -10px rgba(240,216,152,.7); }
.primary-btn:hover::after { transform: translateX(120%); }
.secondary-btn { color: var(--ivory); background: rgba(239,230,209,.04); border-color: var(--line-2); }
.secondary-btn:hover { border-color: var(--gold-line); background: rgba(212,176,106,.07); color: var(--gold-2); transform: translateY(-1px); }
.ghost-btn { color: var(--ivory-2); background: transparent; border-color: var(--line-2); }
.ghost-btn:hover { color: var(--gold-2); border-color: var(--gold-line); }
.primary-btn:active, .secondary-btn:active, .ghost-btn:active { transform: translateY(0) scale(.98); transition-duration: .08s; }
.primary-btn:disabled, .secondary-btn:disabled, .ghost-btn:disabled { opacity: .35; cursor: default; transform: none; box-shadow: none; }
.btn-lg { height: 52px; padding: 0 30px; font-size: 11.5px; }
.small { height: 34px; padding: 0 14px; font-size: 10px; }
.link { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 6px 0; border: 0; background: none; color: var(--ivory-2); font: 500 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.link::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--gold); transform: scaleX(.25); transform-origin: left; opacity: .6; transition: transform .45s var(--ease), opacity .3s; }
.link:hover { color: var(--gold-2); }
.link:hover::after { transform: scaleX(1); opacity: 1; }
.link .arrow { transition: transform .35s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; color: var(--ivory-2); cursor: pointer; transition: border-color .3s, color .3s, transform .3s var(--ease); }
.icon-btn:hover { color: var(--gold-2); border-color: var(--gold-line); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }

/* ---------- Champs ---------- */
.field { display: grid; gap: 8px; font: 500 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ivory-3); }
input, select { font: 400 15px var(--sans); letter-spacing: 0; text-transform: none; color: var(--ivory); background: rgba(4,7,15,.55); border: 1px solid var(--line-2); border-radius: 12px; padding: 0 14px; height: 46px; width: 100%; transition: border-color .25s, box-shadow .25s, background .25s; }
input:hover, select:hover { border-color: rgba(239,230,209,.22); }
input:focus, select:focus { outline: none; border-color: var(--gold-line); box-shadow: 0 0 0 4px rgba(212,176,106,.1); background: rgba(4,7,15,.75); }
select { appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23d4b06a' stroke-width='1.2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 10px; }

/* ---------- Écran titre (inchangé) ---------- */
.title-screen { position: relative; z-index: 2; min-height: 100dvh; display: grid; overflow: hidden; }
.ts-art { position: absolute; inset: 0; background: url('assets/banner.webp') center 22%/cover no-repeat; transform: scale(1.06); animation: tsDrift 26s ease-in-out infinite alternate; }
@keyframes tsDrift { to { transform: scale(1.12) translate(-1.5%, -1%); } }
.ts-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,9,19,.15) 0%, rgba(5,9,19,.35) 38%, rgba(5,9,19,.92) 68%, #050913 100%); }
.ts-motes { position: absolute; inset: 0; pointer-events: none; }
.ts-motes i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px 2px rgba(242,217,149,.55); opacity: 0; animation: mote linear infinite; }
@keyframes mote { 10% { opacity: .9; } 90% { opacity: .6; } to { transform: translate(var(--dx, 20px), -105vh); opacity: 0; } }
.ts-inner { position: relative; display: grid; align-content: end; justify-items: center; gap: 22px; padding: calc(30px + var(--safe-t)) 22px calc(28px + var(--safe-b)); text-align: center; min-height: 100dvh; }
.ts-logo { width: min(560px, 88vw); filter: drop-shadow(0 6px 30px rgba(0,0,0,.7)); animation: tsIn 1.4s cubic-bezier(.2,.8,.2,1) both; }
@keyframes tsIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
.ts-tag { margin: -8px 0 6px; font: italic 500 19px/1.4 var(--serif); color: rgba(239,229,206,.85); animation: tsIn 1.4s .25s both; }
.ts-panel { width: min(420px, 100%); display: grid; gap: 14px; padding: 24px; border-radius: 18px; background: linear-gradient(180deg, rgba(17,28,54,.82), rgba(7,12,26,.9)); border: 1px solid rgba(214,176,98,.28); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); text-align: left; animation: tsIn 1.2s .45s both; }
.ts-panel h2 { text-align: center; font-size: 26px; }
.ts-panel .primary-btn { width: 100%; }
.ts-welcome { text-align: center; }
.ts-welcome p { margin: 0 0 6px; color: var(--ivory-3); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.ts-welcome b { display: block; font: 500 32px/1.1 var(--serif); color: var(--ivory); overflow-wrap: anywhere; }
.ts-switch { text-align: center; }
.ts-switch .link { letter-spacing: .14em; }
.ts-foot { display: flex; gap: 14px; align-items: center; color: rgba(239,230,209,.4); font: 500 10px var(--sans); letter-spacing: .32em; text-transform: uppercase; }
.ts-foot::before, .ts-foot::after { content: ''; width: 28px; height: 1px; background: rgba(214,176,98,.4); }
@media (min-width: 1000px) {
  .ts-art { left: 42%; background-position: center 20%; mask-image: linear-gradient(90deg, transparent 0%, #000 28%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 28%); }
  .ts-shade { background: linear-gradient(90deg, #050913 0%, #050913 36%, rgba(5,9,19,.55) 60%, rgba(5,9,19,.15) 100%), linear-gradient(0deg, rgba(5,9,19,.7), transparent 30%); }
  .ts-inner { align-content: center; justify-items: start; padding: 60px 0 60px 7vw; max-width: 46vw; text-align: left; }
  .ts-tag { margin-left: 4px; }
  .ts-foot { margin-top: 20px; }
}
@media (max-width: 999px) {
  .ts-art { background-position: center 4%; background-size: 118% auto; background-color: #050913; }
  .ts-shade { background: linear-gradient(180deg, rgba(5,9,19,.05) 0%, rgba(5,9,19,.25) 26%, rgba(5,9,19,.82) 44%, rgba(5,9,19,.96) 58%, #050913 100%); }
}

/* ---------- Structure du jeu ---------- */
.app { position: relative; z-index: 2; min-height: 100dvh; }
.hud { position: sticky; top: 0; z-index: 40; height: calc(var(--hud-h) + var(--safe-t)); padding-top: var(--safe-t); }
.hud::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4,7,15,.92), rgba(4,7,15,.66)); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border-bottom: 1px solid var(--line); }
.hud-inner, .hud { --pad: max(var(--gutter), calc((100vw - var(--wrap)) / 2)); }
.hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-left: var(--pad); padding-right: var(--pad); }
.hud-logo { justify-self: start; display: block; padding: 0; border: 0; background: none; cursor: pointer; opacity: .95; transition: opacity .3s; }
.hud-logo:hover { opacity: 1; }
.hud-logo img { display: block; height: 30px; width: auto; }
.hud-right { justify-self: end; display: flex; align-items: center; gap: var(--s3); }
.purse { display: flex; align-items: baseline; gap: 2px; padding: 0 4px; font-size: 22px; line-height: 1; }
.purse .v { color: var(--ivory); }
.purse.bump .v { animation: purseGlow 1.2s var(--ease); }
@keyframes purseGlow { 30% { color: var(--gold-2); text-shadow: 0 0 18px var(--gold-glow); } }
.hud-sep { width: 1px; height: 22px; background: var(--line-2); }
.hud-avatar { width: 38px; height: 38px; padding: 0; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold-line); background: var(--ink-3); cursor: pointer; display: grid; place-items: center; transition: border-color .3s, box-shadow .3s; }
.hud-avatar:hover { border-color: var(--gold-2); box-shadow: 0 0 0 4px rgba(212,176,106,.12); }
.hud-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.45); }
.hud-avatar span { font: 500 17px var(--serif); color: var(--gold-2); }
.nav { position: relative; display: flex; align-items: center; gap: 4px; height: 100%; }
.nav-btn { position: relative; height: 100%; padding: 0 18px; border: 0; background: none; color: var(--ivory-3); font: 500 10.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; cursor: pointer; transition: color .3s; display: flex; align-items: center; gap: 8px; }
.nav-btn:hover { color: var(--ivory); }
.nav-btn.is-on { color: var(--ivory); }
.nav-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold-2); }
.nav-ink { position: absolute; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-2), transparent); transition: left .5s var(--ease), width .5s var(--ease); pointer-events: none; }
.nav-ink::after { content: ''; position: absolute; left: 50%; top: -2px; width: 5px; height: 5px; margin-left: -2.5px; transform: rotate(45deg); background: var(--gold-2); box-shadow: 0 0 10px var(--gold-2); }
.main { position: relative; width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: var(--s7) var(--gutter) var(--s8); display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s7); }
@media (max-width: 999px) {
  .hud { grid-template-columns: 1fr auto; }
  .nav { display: none; }
  .hud-logo img { height: 26px; }
  .hud-avatar, .hud-sep { display: none; }
  .main { padding: var(--s5) var(--gutter) calc(120px + var(--safe-b)); gap: var(--s6); }
}

/* Apparition des écrans : chaque section monte doucement, en cascade */
.main > * { animation: enter .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } }

/* ---------- Sections ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3) var(--s5); margin-bottom: var(--s5); }
.section-head .caps { margin-bottom: var(--s2); }
.rule { height: 1px; border: 0; margin: 0; background: linear-gradient(90deg, var(--line-2), transparent); }
.surface { position: relative; border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.surface.pad { padding: var(--s5); }
@media (min-width: 760px) { .surface.pad { padding: var(--s6); } }
.cols-3 { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
.cols-2 { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tile { position: relative; display: grid; align-content: start; gap: var(--s3); padding: var(--s5); border-radius: var(--r-lg); background: var(--glass); border: 1px solid var(--line); transition: border-color .4s, transform .5s var(--ease), background .4s; }
.tile:hover { border-color: var(--line-2); transform: translateY(-2px); }
.tile .caps { margin-bottom: var(--s1); }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s3); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font: 500 11.5px var(--sans); color: var(--ivory-2); background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chips.pickable .chip { cursor: pointer; transition: border-color .3s, color .3s; }
.chips.pickable .chip:hover { border-color: var(--gold-line); }
.chip.is-on { border-color: var(--gold-line); color: var(--gold-2); background: rgba(212,176,106,.08); }
.bar { position: relative; height: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 2px; background: linear-gradient(90deg, var(--gold-3), var(--gold-2)); box-shadow: 0 0 10px var(--gold-glow); transform-origin: left; animation: grow 1.2s var(--ease-out) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }

/* ---------- Accueil ---------- */
.stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: center; min-height: min(560px, 72vh); padding: var(--s6) 0 var(--s4); }
@media (min-width: 900px) { .stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s7); } }
.stage-copy { position: relative; z-index: 2; display: grid; gap: var(--s4); align-content: center; }
.stage-copy .display { max-width: 11ch; }
.stage-actions { display: grid; gap: var(--s4); margin-top: var(--s3); justify-items: start; }
.charges { display: flex; align-items: center; gap: var(--s3); }
.charges .dots { display: inline-flex; gap: 6px; }
.charges .dots i { width: 7px; height: 7px; transform: rotate(45deg); border: 1px solid var(--gold); transition: background .4s; }
.charges .dots i.on { background: var(--gold-2); box-shadow: 0 0 10px var(--gold-glow); }
.charges .caps { color: var(--ivory-2); letter-spacing: .2em; }
.charges .caps b { color: var(--ivory); font-weight: 600; }
.stage-scene { position: relative; display: grid; place-items: center; min-height: 420px; perspective: 1200px; }
.stage-scene::before { content: ''; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(240,216,152,.22), rgba(58,95,168,.18) 42%, transparent 70%); filter: blur(10px); animation: breathe 6s ease-in-out infinite; }
.stage-scene::after { content: ''; position: absolute; bottom: 6%; width: 46%; height: 26px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0,0,0,.65), transparent); filter: blur(4px); }
.stage-pack { position: relative; z-index: 1; width: clamp(170px, 22vw, 250px); cursor: pointer; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), filter .5s; filter: drop-shadow(0 34px 40px rgba(0,0,0,.55)); }
.stage-pack img { display: block; width: 100%; animation: float 6s ease-in-out infinite; }
.stage-pack.is-box { width: clamp(230px, 32vw, 400px); }
.stage-pack:hover { filter: drop-shadow(0 34px 40px rgba(0,0,0,.55)) drop-shadow(0 0 34px rgba(240,216,152,.35)); }
@keyframes float { 50% { transform: translateY(-12px); } }
@keyframes breathe { 50% { transform: scale(1.06); opacity: .8; } }
.fleurons { display: flex; justify-content: center; padding: var(--s2) 0 0; min-height: 120px; }
.fleurons .f { width: 74px; margin: 0 -10px; transform: rotate(var(--rot)) translateY(var(--ty)); transform-origin: 50% 120%; transition: transform .5s var(--ease); }
.fleurons:hover .f { transform: rotate(calc(var(--rot) * 1.5)) translateY(calc(var(--ty) - 6px)); }
.daily-amount { font-size: 44px; line-height: 1; }
.timeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.timeline div { display: grid; justify-items: center; gap: 6px; font: 500 9px var(--sans); letter-spacing: .14em; color: var(--ivory-4); }
.timeline div::before { content: ''; width: 100%; height: 2px; border-radius: 2px; background: var(--line-2); }
.timeline .is-big::before { background: rgba(212,176,106,.45); }
.timeline .is-today { color: var(--gold-2); }
.timeline .is-today::before { background: var(--gold-2); box-shadow: 0 0 8px var(--gold-glow); }
.timeline .is-done { opacity: .45; }
.arc { --p: 0; position: relative; width: 84px; height: 84px; flex: none; }
.arc svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.arc circle { fill: none; stroke-width: 2; }
.arc .track { stroke: var(--line-2); }
.arc .val { stroke: url(#arcGold); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p)); transition: stroke-dashoffset 1.4s var(--ease-out); }
.arc b { position: absolute; inset: 0; display: grid; place-items: center; font: 500 24px var(--serif); }
.arc b small { font-size: 12px; color: var(--ivory-3); margin-left: 1px; }
.collect-row { display: flex; align-items: center; gap: var(--s4); }
.collect-row .meta { display: grid; gap: 2px; }
.collect-row .meta h3 { font-size: 20px; }
.claim-tile { border-color: var(--gold-line); background: radial-gradient(420px 160px at 0% 0%, rgba(212,176,106,.1), transparent), var(--glass); }

/* ---------- Boutique ---------- */
.shop-intro { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: center; }
.talyne-medallion { width: clamp(88px, 12vw, 128px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--gold-line); box-shadow: 0 0 0 6px rgba(4,7,15,.6), 0 0 0 7px rgba(212,176,106,.18), 0 20px 40px rgba(0,0,0,.45); }
.talyne-medallion img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.quote { font: italic 400 clamp(19px, 2.2vw, 24px)/1.45 var(--serif); color: var(--ivory); max-width: 46ch; min-height: 2.9em; }
.quote.is-changing { animation: quoteIn .6s var(--ease-out); }
@keyframes quoteIn { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.products { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
@media (min-width: 900px) { .products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.product { position: relative; overflow: hidden; display: grid; grid-template-rows: auto auto; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); transition: border-color .5s, transform .6s var(--ease); }
.product:hover { border-color: var(--gold-line); transform: translateY(-3px); }
.product-art { position: relative; display: grid; place-items: center; height: clamp(260px, 30vw, 340px); background: radial-gradient(60% 70% at 50% 55%, rgba(240,216,152,.14), transparent 70%), radial-gradient(80% 60% at 50% 100%, rgba(36,66,127,.35), transparent 70%); }
.product-art img { max-height: 82%; width: auto; filter: drop-shadow(0 26px 30px rgba(0,0,0,.55)); transition: transform .9s var(--ease); }
.product:hover .product-art img { transform: translateY(-8px) scale(1.03); }
.product-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: end; padding: var(--s5); border-top: 1px solid var(--line); }
.product-body h2 { font-size: 30px; }
.product-body .price { font-size: 30px; text-align: right; }
.product-body .desc { grid-column: 1/-1; color: var(--ivory-3); font-size: 13px; }
.product-body form { grid-column: 1/-1; display: flex; gap: var(--s3); align-items: end; margin-top: var(--s2); }
.product-body form .field { flex: 1; }
.product-body form .primary-btn { flex: 1; }
.tag { position: absolute; top: var(--s4); left: var(--s4); height: 26px; padding: 0 12px; display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--gold-line); background: rgba(4,7,15,.6); color: var(--gold-2); font: 500 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; }
.rate-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: var(--s6); }
.rate-list div { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--ivory-2); }
.rate-list b { font: 500 18px var(--serif); color: var(--ivory); }
.inline-form { display: flex; gap: var(--s3); flex-wrap: wrap; }
.inline-form input { flex: 1 1 200px; width: auto; }
.talyne-says { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--s4); align-items: center; }
.talyne-says img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--gold-line); }
.talyne-says p { font: italic 400 19px/1.45 var(--serif); color: var(--ivory); }

/* ---------- Classeur ---------- */
.binder-head { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .binder-head { grid-template-columns: minmax(0, 1fr) 380px; align-items: end; } }
.progress { display: grid; gap: var(--s2); }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; }
.progress-top .num { font-size: 28px; }
.filters { display: grid; gap: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.filters select { height: 40px; font-size: 13px; background-color: transparent; }
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: var(--s3) 0; border: 0; background: none; color: var(--ivory-3); font: 500 10.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; }
.tab.is-on { color: var(--ivory); }
.tab.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold-2); }
.binder { display: grid; gap: var(--s6) var(--s5); grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
@media (min-width: 760px) { .binder { grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); } }
.slot-card { position: relative; display: grid; gap: var(--s3); padding: 0; border: 0; background: none; text-align: left; cursor: pointer; perspective: 900px; }
.slot-card small { display: grid; gap: 2px; font: 500 9.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ivory-3); }
.slot-card small b { font: 500 16px/1.2 var(--serif); letter-spacing: 0; text-transform: none; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-art, .summary-art, .show-art { position: relative; display: block; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: #0a1124 url('cards/thumbs/caback.webp') center/cover no-repeat; box-shadow: 0 14px 28px -10px rgba(0,0,0,.7); transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0)); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.slot-art img, .summary-art img, .show-art img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .5s ease; }
.slot-art img.is-ok, .summary-art img.is-ok, .show-art img.is-ok { opacity: 1; }
.slot-card:hover .slot-art, .slot-card:focus-visible .slot-art { --lift: -6px; box-shadow: 0 26px 40px -14px rgba(0,0,0,.8), 0 0 0 1px rgba(240,216,152,.28); }
.slot-empty { position: relative; display: grid; place-items: center; aspect-ratio: 2/3; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15,24,48,.4), rgba(4,7,15,.4)); }
.slot-empty b { font: 400 22px var(--serif); color: var(--ivory-4); letter-spacing: .04em; }
.slot-card.is-secret .slot-empty { border-color: rgba(212,176,106,.16); }
.slot-card.is-secret .slot-empty b { color: rgba(212,176,106,.45); }
.slot-card.is-missing { cursor: default; }
.slot-card.is-missing small { color: var(--ivory-4); }
.count, .fav, .lock { position: absolute; z-index: 3; top: 8px; display: grid; place-items: center; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 999px; font-style: normal; font: 500 12px var(--serif); color: var(--ivory); background: rgba(4,7,15,.7); border: 1px solid var(--line-2); backdrop-filter: blur(6px); }
.count { right: 8px; }
.fav { left: 8px; color: #f3b6c8; font-size: 11px; }
.lock { left: 8px; top: 36px; font-size: 9px; }
.empty { grid-column: 1/-1; padding: var(--s7) 0; text-align: center; font: italic 400 20px var(--serif); color: var(--ivory-3); }

/* ---------- Trophées ---------- */
.trophy-head { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .trophy-head { grid-template-columns: minmax(0, 1fr) auto; align-items: end; } }
.trophy-score { display: flex; align-items: center; gap: var(--s5); }
.trophy-score .num { font-size: 44px; line-height: 1; }
.trophy-score .num small { font-size: 20px; color: var(--ivory-3); }
.seg { display: inline-flex; gap: var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.seg button { position: relative; flex: none; padding: var(--s3) 0; border: 0; background: none; color: var(--ivory-3); font: 500 10.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: color .3s; }
.seg button:hover { color: var(--ivory); }
.seg button.is-on { color: var(--ivory); }
.seg button.is-on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gold-2); }
.seg button sup { margin-left: 6px; color: var(--gold); font-size: 9px; letter-spacing: 0; }
.trophies { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .trophies { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s7); } }
.trophy { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: var(--s5) 0; border-bottom: 1px solid var(--line); transition: background .4s; }
.medal { position: relative; display: grid; place-items: center; width: 56px; height: 56px; color: var(--ivory-4); font-size: 18px; }
.trophy.is-done .medal, .trophy.is-claimed .medal, .medals .medal { color: var(--gold-2); text-shadow: 0 0 14px var(--gold-glow); }
.t-body { display: grid; gap: 4px; min-width: 0; }
.t-body b { font: 500 19px/1.2 var(--serif); }
.t-body small { color: var(--ivory-3); font-size: 12.5px; }
.t-prog { display: flex; align-items: center; gap: var(--s3); margin-top: 6px; }
.t-prog .bar { flex: 1; max-width: 220px; }
.t-prog span { font: 500 12px var(--serif); color: var(--ivory-3); font-variant-numeric: lining-nums tabular-nums; }
.t-side { display: grid; justify-items: end; gap: var(--s2); }
.t-reward { font-size: 18px; color: var(--ivory-2); }
.trophy.is-done .t-reward { color: var(--gold-2); }
.t-ok { font: 500 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ivory-4); }
.trophy.is-locked .t-body b { color: var(--ivory-2); }

/* ---------- Profil ---------- */
.pc { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); }
.pc-cover { position: relative; height: clamp(160px, 22vw, 240px); background: var(--pc-bg); }
.pc-cover::before { content: ''; position: absolute; inset: 0; background: url('assets/banner.webp') center 34%/cover no-repeat; opacity: .5; mix-blend-mode: luminosity; }
.pc-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,7,15,0) 25%, rgba(8,13,27,.97) 100%); }
.pc-body { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s2) var(--s5); align-items: end; padding: 0 var(--s5) var(--s5); margin-top: -64px; }
@media (min-width: 760px) { .pc-body { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 var(--s6) var(--s6); margin-top: -76px; } }
.avatar { --accent: var(--pc-accent, var(--gold)); position: relative; width: clamp(108px, 14vw, 148px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ink-3); border: 1px solid var(--accent); box-shadow: 0 0 0 6px rgba(8,13,27,1), 0 0 0 7px rgba(212,176,106,.22), 0 24px 44px rgba(0,0,0,.55); }
.avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.45); }
.avatar span { font: 500 52px var(--serif); color: var(--accent); }
.pc-id { display: grid; gap: var(--s1); padding-bottom: var(--s2); min-width: 0; }
.pc-id .caps { color: var(--pc-accent, var(--gold)); }
.pc-id h1 { font-size: clamp(34px, 4.4vw, 52px); }
.pc-id p { font-size: 13px; color: var(--ivory-3); }
.pc-actions { grid-column: 1/-1; display: flex; gap: var(--s3); }
@media (min-width: 760px) { .pc-actions { grid-column: auto; padding-bottom: var(--s3); } }
.pc-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.pc-stats div { display: grid; gap: 2px; justify-items: center; padding: var(--s5) var(--s3); border-left: 1px solid var(--line); }
.pc-stats div:first-child { border-left: 0; }
.pc-stats b { font: 500 32px/1.05 var(--serif); font-variant-numeric: lining-nums; }
@media (max-width: 560px) { .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pc-stats div:nth-child(3) { border-left: 0; } .pc-stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.prestige { display: grid; gap: var(--s3); }
.prestige-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); }
.prestige-top h3 { font-size: 24px; }
.shelf-row { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(12px, 2.4vw, 32px); padding: 0 var(--s2) var(--s5); }
.shelf-row::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(240,216,152,.6), transparent); box-shadow: 0 0 22px rgba(240,216,152,.35); }
.show-card { display: grid; gap: var(--s3); padding: 0; border: 0; background: none; text-align: center; cursor: pointer; perspective: 900px; }
.show-card small { font: 500 15px var(--serif); color: var(--ivory-2); }
.show-card:hover .show-art { --lift: -8px; box-shadow: 0 30px 44px -16px rgba(0,0,0,.85), 0 0 0 1px rgba(240,216,152,.3); }
.show-empty { display: grid; place-items: center; aspect-ratio: 2/3; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(15,24,48,.35), rgba(4,7,15,.35)); color: var(--ivory-4); transition: border-color .4s, color .4s; }
.show-empty span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); font: 300 20px var(--sans); }
.show-card:hover .show-empty { border-color: var(--gold-line); color: var(--gold-2); }
@media (max-width: 640px) { .shelf-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shelf-row > :nth-child(n+4) { display: none; } }
.medals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.medals .m { display: grid; justify-items: center; gap: var(--s2); text-align: center; }
.medals .medal { width: 72px; height: 72px; font-size: 24px; }
.medals b { font: 500 17px/1.2 var(--serif); }
.medals small { color: var(--ivory-3); font-size: 12px; line-height: 1.4; max-width: 24ch; }
.medals .m.is-empty .medal { color: var(--ivory-4); text-shadow: none; }
.ledger { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s7); }
@media (min-width: 760px) { .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.ledger span { font-size: 13px; color: var(--ivory-3); }
.ledger b { font: 500 20px var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.series-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 2fr) 56px; gap: var(--s4); align-items: center; padding: var(--s4) 0; }
.series-line b { display: block; font: 500 18px var(--serif); }
.series-line small { color: var(--ivory-3); font-size: 12px; }
.series-line > span { text-align: right; font: 500 18px var(--serif); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.share code { flex: 1 1 280px; padding: var(--s3) var(--s4); border-radius: 12px; border: 1px solid var(--line); font: 400 12.5px var(--sans); color: var(--sky); word-break: break-all; background: rgba(4,7,15,.4); }

/* Éditeur de profil */
.editor { display: grid; gap: var(--s5); }
.editor .caps { margin-bottom: calc(-1 * var(--s2)); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--s2); }
.swatches.small { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
.swatch { position: relative; display: grid; align-items: end; min-height: 64px; padding: var(--s2) var(--s3); border-radius: 12px; border: 1px solid var(--line); cursor: pointer; font: 500 10px var(--sans); letter-spacing: .08em; color: #fff; text-shadow: 0 1px 3px #000; transition: border-color .3s, box-shadow .3s; }
.swatches.small .swatch { min-height: 40px; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; cursor: inherit; }
.swatch:has(input:checked) { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(240,216,152,.18); }
.swatch.is-locked { opacity: .3; cursor: default; }
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--s3); }
@media (min-width: 760px) { .picker { max-height: 360px; overflow-y: auto; padding-right: 4px; } }
.pick { position: relative; padding: 0; border: 1px solid transparent; border-radius: 8px; overflow: hidden; aspect-ratio: 2/3; background: none; cursor: pointer; transition: border-color .3s, transform .3s var(--ease); }
.pick:hover { transform: translateY(-2px); }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick.is-on { border-color: var(--gold-2); box-shadow: 0 0 18px rgba(240,216,152,.35); }
.pick i { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--gold-2); color: #1c150b; font: 600 10px var(--sans); font-style: normal; }
.segmented { display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid var(--line-2); }
.segmented button { height: 32px; padding: 0 16px; border-radius: 999px; border: 0; background: none; color: var(--ivory-3); font: 500 10px var(--sans); letter-spacing: .18em; text-transform: uppercase; cursor: pointer; transition: background .3s, color .3s; }
.segmented button.is-on { background: rgba(212,176,106,.16); color: var(--gold-2); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ivory-2); cursor: pointer; }
.toggle input { flex: none; width: 40px; height: 22px; padding: 0; appearance: none; border-radius: 99px; background: var(--line-2); border: 0; position: relative; cursor: pointer; transition: background .3s; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ivory-3); transition: transform .35s var(--ease), background .3s; }
.toggle input:checked { background: rgba(212,176,106,.45); }
.toggle input:checked::after { transform: translateX(18px); background: var(--gold-2); }

/* ---------- Fenêtres ---------- */
.modal { position: fixed; inset: 0; z-index: 900; display: none; }
.modal.is-open { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); place-items: end center; }
@media (min-width: 760px) { .modal.is-open { place-items: center; } }
.sheet-bg { position: absolute; inset: 0; background: rgba(2,4,9,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: relative; overflow: hidden; width: min(540px, 100%); max-height: min(90dvh, 880px); display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(15,24,48,.98), rgba(6,10,22,.98)); border: 1px solid var(--line-2); border-radius: 24px 24px 0 0; box-shadow: 0 -30px 80px rgba(0,0,0,.6); animation: sheetUp .5s var(--ease-out); padding-bottom: var(--safe-b); }
@media (min-width: 760px) { .sheet { border-radius: 22px; padding-bottom: 0; animation: sheetIn .5s var(--ease-out); } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
@keyframes sheetIn { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.sheet::before { content: ''; position: absolute; left: 10%; right: 10%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(240,216,152,.6), transparent); }
.sheet-wide { width: min(900px, 100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s5) var(--s5) var(--s3); }
.sheet-head h2 { font-size: 28px; }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-content: start; padding: var(--s2) var(--s5) var(--s5); overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.sheet-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s3); margin-top: var(--s2); }
.lead { font-size: 14.5px; color: var(--ivory-2); }
.big-amount { text-align: center; font-size: 60px; line-height: 1; padding: var(--s3) 0 var(--s1); color: var(--ivory); }
.big-amount i { font-size: .6em !important; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
@media (min-width: 760px) { .summary-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.summary-card { display: grid; gap: var(--s2); padding: 0; border: 0; background: none; text-align: center; cursor: pointer; }
.summary-card b { font: 500 14px var(--serif); }
.summary-card small { display: block; color: var(--ivory-3); font-size: 11px; }
.calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: var(--s2); }
.day { display: grid; gap: 2px; padding: var(--s3) var(--s2); border-radius: 12px; border: 1px solid var(--line); text-align: center; }
.day small { font: 500 9px var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ivory-4); }
.day b { font: 500 18px var(--serif); }
.day.is-big { border-color: rgba(212,176,106,.3); }
.day.is-big b { color: var(--gold-2); }
.day.is-done { opacity: .35; }
.day.is-today { border-color: var(--gold-2); box-shadow: 0 0 22px rgba(240,216,152,.18); }
.toasts { position: fixed; z-index: 1200; left: 50%; top: calc(var(--hud-h) + var(--safe-t) + 12px); transform: translateX(-50%); display: grid; gap: var(--s2); width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { display: grid; gap: 2px; padding: var(--s3) var(--s4); border-radius: 14px; background: rgba(10,17,34,.94); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0,0,0,.5); backdrop-filter: blur(14px); opacity: 0; transform: translateY(-8px) scale(.98); transition: opacity .4s var(--ease), transform .5s var(--ease); font-size: 13.5px; }
.toast.is-in { opacity: 1; transform: none; }
.toast b { font: 500 9.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.toast-err { border-color: rgba(239,154,154,.4); }
.toast-err b { color: var(--err); }
.toast-trophy { border-color: var(--gold-line); }

/* ---------- Navigation mobile : sceau et éventail ---------- */
.seal { position: fixed; z-index: 60; left: 50%; bottom: calc(18px + var(--safe-b)); width: 64px; height: 64px; margin-left: -32px; padding: 0; border-radius: 50%; border: 1px solid var(--gold-line); background: radial-gradient(circle at 50% 35%, #172648, #070c1a 75%); box-shadow: 0 0 0 6px rgba(4,7,15,.55), 0 18px 40px rgba(0,0,0,.65), 0 0 30px rgba(240,216,152,.12) inset; display: grid; place-items: center; cursor: pointer; touch-action: none; transition: transform .45s var(--ease), box-shadow .4s; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.seal svg { width: 34px; height: 34px; transition: transform .7s var(--ease); }
.seal .seal-badge { position: absolute; top: 4px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px var(--gold-2); }
.seal.is-open { transform: scale(.92); box-shadow: 0 0 0 6px rgba(4,7,15,.55), 0 0 40px rgba(240,216,152,.35); }
.seal.is-open svg { transform: rotate(45deg); }
.seal-label { position: fixed; z-index: 59; left: 0; right: 0; bottom: calc(88px + var(--safe-b)); text-align: center; pointer-events: none; font: 500 9.5px var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--ivory-3); }
.radial { position: fixed; inset: 0; z-index: 55; background: radial-gradient(120% 70% at 50% 100%, rgba(4,7,15,.9), rgba(4,7,15,.72) 60%, rgba(4,7,15,.55)); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .35s ease; }
.radial.is-open { opacity: 1; }
.radial-item { position: absolute; left: 50%; bottom: calc(50px + var(--safe-b)); width: 64px; margin-left: -32px; display: grid; justify-items: center; gap: 6px; padding: 0; border: 0; background: none; cursor: pointer; transform: translate(0, 0) scale(.4); opacity: 0; transition: transform .5s var(--ease-out), opacity .35s ease; transition-delay: calc(var(--k) * 30ms); }
.radial.is-open .radial-item { transform: translate(var(--x), var(--y)) scale(1); opacity: 1; }
.radial-item .ri { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(10,17,34,.92); color: var(--ivory-2); transition: border-color .25s, color .25s, transform .25s var(--ease), box-shadow .25s; }
.radial-item .ri svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.radial-item .rl { font: 500 9px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-3); white-space: nowrap; }
.radial-item.is-current .ri { border-color: var(--gold-line); color: var(--gold-2); }
.radial-item.is-hover .ri, .radial-item:hover .ri { border-color: var(--gold-2); color: var(--gold-2); transform: scale(1.12); box-shadow: 0 0 24px rgba(240,216,152,.3); }
.radial-item.is-hover .rl { color: var(--ivory); }
.radial-item .rb { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--gold-2); color: #1c150b; font: 600 9px/16px var(--sans); text-align: center; }
@media (min-width: 1000px) { .seal, .seal-label, .radial { display: none !important; } }

/* ---------- Menu système ---------- */
.sysmenu { position: fixed; inset: 0; z-index: 800; pointer-events: none; }
.sysmenu.is-open { pointer-events: auto; }
.sys-bg { position: absolute; inset: 0; background: rgba(2,4,9,.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .45s ease; }
.sysmenu.is-open .sys-bg { opacity: 1; }
.sys-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; padding: calc(var(--s6) + var(--safe-t)) var(--s6) calc(var(--s6) + var(--safe-b)); background: linear-gradient(180deg, rgba(12,20,40,.98), rgba(5,8,18,.99)); border-left: 1px solid var(--line-2); transform: translateX(100%); transition: transform .6s var(--ease-out); overflow-y: auto; }
.sysmenu.is-open .sys-panel { transform: none; }
.sys-panel::before { content: ''; position: absolute; left: 0; top: 10%; bottom: 10%; width: 1px; background: linear-gradient(180deg, transparent, rgba(240,216,152,.5), transparent); }
.sys-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s7); }
.sys-top img { height: 26px; width: auto; }
.sys-list { display: grid; }
.sys-item { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding: var(--s4) 0; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; font: 500 28px/1.1 var(--serif); color: var(--ivory-2); transition: color .3s, padding .5s var(--ease); opacity: 0; transform: translateX(16px); }
.sysmenu.is-open .sys-item { opacity: 1; transform: none; transition: color .3s, padding .5s var(--ease), opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: 0s, 0s, calc(80ms + var(--k) * 45ms), calc(80ms + var(--k) * 45ms); }
.sys-item small { font: 500 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ivory-4); }
.sys-item:hover { color: var(--gold-2); padding-left: var(--s2); }
.sys-item.minor { font-size: 20px; }
.sys-foot { margin-top: auto; padding-top: var(--s6); color: var(--ivory-4); font: 500 9.5px var(--sans); letter-spacing: .28em; text-transform: uppercase; }
.sys-page { display: grid; gap: var(--s5); animation: enter .6s var(--ease-out) both; }
.sys-page h2 { font-size: 36px; }
.sys-page .back { justify-self: start; }
.prose { display: grid; gap: var(--s4); font-size: 14px; line-height: 1.75; color: var(--ivory-2); }
.prose h3 { margin-top: var(--s3); font-size: 21px; color: var(--ivory); }
.prose .chronicle { padding-left: var(--s4); border-left: 1px solid var(--gold-line); font: italic 400 18px/1.55 var(--serif); color: var(--ivory); }
.prose .chronicle cite { display: block; margin-top: var(--s2); font: 500 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-style: normal; }
.prose ul { margin: 0; padding-left: 18px; display: grid; gap: var(--s2); }

/* ---------- Moteur de cartes (ouverture, consultation) : harmonisation ---------- */
.tcg-deal-card, .tcg-preview-card, .tcg-slot, .tcg-peek span, .tcg-summary-card img, .tcg-lot-find img { aspect-ratio: 2/3 !important; }
.tcg-open::before { content: ''; position: fixed; inset: 0; background: rgba(3,5,12,.82); backdrop-filter: blur(18px) saturate(.8); -webkit-backdrop-filter: blur(18px) saturate(.8); }
.tcg-open .tcg-open-bg { background: radial-gradient(circle at 50% 42%, rgba(58,95,168,.42), rgba(4,7,15,.97) 70%); }
.tcg-open .tcg-open-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); }
/* Consultation d'une carte : un écrin */
.tcg-preview-bg { background: radial-gradient(70% 60% at 35% 45%, rgba(36,66,127,.35), transparent 70%), rgba(3,5,12,.93); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.tcg-preview-box { gap: var(--s7) !important; align-items: center; }
.tcg-preview-card { filter: drop-shadow(0 40px 60px rgba(0,0,0,.7)); }
.tcg-preview-info { gap: var(--s3) !important; max-width: 380px; }
.tcg-preview-info .tcg-kicker { font: 500 10px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.tcg-preview-info h3 { font: 500 clamp(36px, 4vw, 48px)/1 var(--serif) !important; }
.tcg-preview-info > p { font: italic 400 20px/1.4 var(--serif); color: var(--ivory-2); }
.tcg-preview-info .tags { display: flex; flex-wrap: wrap; gap: var(--s2); padding: var(--s3) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: var(--s2) 0; }
.tcg-preview-info .tags .chip { height: 26px; }
.tcg-preview-tools { display: flex !important; flex-wrap: wrap; gap: var(--s2) !important; }
.tcg-tool { height: 38px !important; padding: 0 14px !important; border-radius: 999px !important; border: 1px solid var(--line-2) !important; background: transparent !important; color: var(--ivory-2) !important; font: 500 10px var(--sans) !important; letter-spacing: .16em; text-transform: uppercase; transition: border-color .3s, color .3s !important; }
.tcg-tool:hover, .tcg-tool.is-on { border-color: var(--gold-line) !important; color: var(--gold-2) !important; }
.tcg-tool svg { width: 15px !important; height: 15px !important; stroke-width: 1.4 !important; }
.tcg-sell-box { background: transparent !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; padding: var(--s4) 0 0 !important; }
.tcg-sell-head span { font: 500 9.5px var(--sans) !important; letter-spacing: .22em !important; color: var(--ivory-3) !important; }
.tcg-sell-head strong { font: 500 22px var(--serif) !important; }
.tcg-preview-close { justify-self: start; }
.tcg-preview-x { border: 1px solid var(--line-2) !important; background: rgba(4,7,15,.6) !important; }
@media (max-width: 760px) {
  .tcg-preview-card { width: min(300px, 70vw, calc(46dvh * 2 / 3)) !important; }
  .tcg-preview-box { gap: var(--s5) !important; }
  .tcg-preview-info h3 { font-size: 34px !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.stage-pack { padding: 0; border: 0; background: none; }
.arc b { display: flex; align-items: baseline; justify-content: center; }
.product-art { overflow: hidden; }
.product-art img { height: 78%; max-height: none; width: auto; max-width: 84%; object-fit: contain; }
.tcg-preview-close { color: var(--ivory-2) !important; background: transparent !important; border: 1px solid var(--line-2) !important; box-shadow: none !important; }
.tcg-preview-close::after { display: none; }
.tcg-preview-close:hover { color: var(--gold-2) !important; border-color: var(--gold-line) !important; }
.trophy-score { flex-wrap: wrap; row-gap: var(--s4); }
.radial-item .rl { font-size: 8.5px; letter-spacing: .14em; }
.radial-item .rb { top: -4px; right: -4px; }
/* Accueil sur téléphone : le booster d'abord, puis le texte */
@media (max-width: 899px) {
  .stage { min-height: 0; padding-top: 0; gap: var(--s3); }
  .stage-scene { order: -1; min-height: 330px; }
  .stage-pack { width: 168px; }
  .stage-pack.is-box { width: min(280px, 74vw); }
  .stage-copy { text-align: center; justify-items: center; }
  .stage-copy .display { max-width: none; font-size: 40px; }
  .stage-actions { justify-items: center; }
  .stage-actions .btn-row { justify-content: center; }
}
.seal-label { display: none !important; }

/* =====================================================================
   v6 : calibrage, alignements, composants (volets, citation, fermeture, éditeur, codex)
   ===================================================================== */
/* Tailles plus mesurées */
.display { font-size: clamp(34px, 4vw, 50px); line-height: 1.04; }
h1 { font-size: clamp(30px, 3.4vw, 40px); }
h2 { font-size: clamp(22px, 2.2vw, 26px); }
.pc-id h1 { font-size: clamp(30px, 3.6vw, 42px); }
.daily-amount { font-size: 38px; }
.big-amount { font-size: 48px; }
.trophy-score .num { font-size: 36px; }
.caps + h1, .caps + h2, .caps + h3, .caps + .display { margin-top: var(--s2); }
.section-head { margin-bottom: var(--s6); }
.binder-head { margin-bottom: var(--s2); }
.lede { margin-top: var(--s2); }

/* Anneaux : chiffre centré */
.arc b { align-items: center !important; gap: 1px; line-height: 1; }
.arc b small { align-self: flex-start; margin-top: 3px; }

/* Visuels de la boutique : hauteur explicite, rien n'est rogné */
.product-art { height: clamp(250px, 26vw, 310px); }
.product-art img { height: clamp(190px, 21vw, 250px) !important; width: auto !important; max-width: 86% !important; }
.product-art img[src*="display"] { height: auto !important; width: min(84%, 380px) !important; }

/* Citation de Talyne : un vrai encadré */
.quote-box { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5); align-items: center; padding: var(--s5) var(--s6); border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(90deg, rgba(212,176,106,.07), rgba(10,17,34,.4) 40%, rgba(10,17,34,.4)); }
.quote-box::before { content: '“'; position: absolute; left: 96px; top: -18px; font: 400 96px/1 var(--serif); color: rgba(212,176,106,.28); pointer-events: none; }
.quote-box .talyne-medallion { width: 64px; box-shadow: 0 0 0 4px rgba(4,7,15,.6), 0 0 0 5px rgba(212,176,106,.22); }
.quote-box figure { margin: 0; display: grid; gap: var(--s2); min-width: 0; }
.quote-box blockquote { margin: 0; font: italic 400 clamp(17px, 1.6vw, 21px)/1.4 var(--serif); color: var(--ivory); }
.quote-box figcaption { font: 500 9.5px var(--sans); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.quote-box blockquote.is-changing { animation: quoteIn .6s var(--ease-out); }
@media (max-width: 760px) { .quote-box { grid-template-columns: auto minmax(0, 1fr); padding: var(--s4); gap: var(--s4); } .quote-box::before { left: 72px; } .quote-box .link { grid-column: 1/-1; justify-self: start; } }

/* Volets dépliables (raretés, rachat) */
.disclose { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.disclose + .disclose { border-top: 0; }
.disclose summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) 0; cursor: pointer; font: 500 20px var(--serif); color: var(--ivory); transition: color .3s; }
.disclose summary::-webkit-details-marker { display: none; }
.disclose summary small { font: 500 9.5px var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ivory-3); margin-left: auto; margin-right: var(--s3); }
.disclose summary .chev { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); transition: transform .45s var(--ease), border-color .3s; }
.disclose summary .chev svg { width: 12px; height: 12px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.disclose summary:hover { color: var(--gold-2); }
.disclose[open] summary .chev { transform: rotate(180deg); border-color: var(--gold-line); }
.disclose .disclose-body { padding: 0 0 var(--s5); animation: enter .5s var(--ease-out); }
.odds { display: grid; gap: 0; }
.odds div { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: var(--s3); align-items: baseline; padding: var(--s3) 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ivory-2); }
.odds div:last-child { border-bottom: 0; }
.odds .sym { color: var(--gold); text-align: center; }
.odds b { font: 500 17px var(--serif); color: var(--ivory); min-width: 80px; text-align: right; }
.odds .pct { font: 500 12px var(--sans); color: var(--ivory-3); min-width: 64px; text-align: right; font-variant-numeric: tabular-nums; }
.shop-aside { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .shop-aside { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }

/* Fermeture : libellé discret sur ordinateur, vrai bouton sur téléphone */
.close-btn { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 4px 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ivory-3); font: 500 10px var(--sans); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: color .3s; }
.close-btn i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); transition: border-color .3s, transform .4s var(--ease); }
.close-btn i svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.close-btn:hover { color: var(--gold-2); }
.close-btn:hover i { border-color: var(--gold-line); transform: rotate(90deg); }
.dismiss { display: none; }
@media (max-width: 760px) {
  .sheet-head .close-btn { display: none; }
  .dismiss { display: flex; justify-content: center; padding: var(--s3) var(--s5) calc(var(--s4) + var(--safe-b)); border-top: 1px solid var(--line); background: rgba(6,10,22,.96); }
  .dismiss button { width: 100%; max-width: 360px; }
  .sheet { padding-bottom: 0; }
}

/* Menu système : plein écran sur téléphone */
@media (max-width: 760px) {
  .sys-panel { width: 100%; border-left: 0; padding: calc(var(--s5) + var(--safe-t)) var(--s5) 0; }
  .sys-panel::before { display: none; }
  .sys-top .close-btn { display: none; }
  .sys-top { margin-bottom: var(--s6); }
  .sys-item { font-size: 26px; padding: var(--s4) 0; }
  .sys-item.minor { font-size: 19px; }
  .sys-dismiss { position: sticky; bottom: 0; margin: auto calc(-1 * var(--s5)) 0; display: flex; justify-content: center; padding: var(--s4) var(--s5) calc(var(--s4) + var(--safe-b)); background: linear-gradient(180deg, rgba(5,8,18,0), rgba(5,8,18,.98) 30%); }
  .sys-dismiss button { width: 100%; max-width: 360px; }
  .sys-foot { display: none; }
}
@media (min-width: 761px) { .sys-dismiss { display: none; } }

/* Fenêtre « codex » (règles, chroniques, paramètres, code, crédits) */
.sheet.codex { width: min(760px, 100%); }
.codex .sheet-head { padding: var(--s6) var(--s6) var(--s2); }
.codex .sheet-head h2 { font-size: clamp(30px, 3vw, 38px); }
.codex .sheet-body { padding: var(--s2) var(--s6) var(--s6); }
.codex-hero { position: relative; height: 150px; margin: 0 calc(-1 * var(--s6)) var(--s3); background: url('assets/banner.webp') center 30%/cover no-repeat; mask-image: linear-gradient(180deg, #000 30%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); opacity: .55; }
@media (max-width: 760px) { .codex .sheet-head { padding: var(--s5) var(--s5) var(--s2); } .codex .sheet-body { padding: var(--s2) var(--s5) var(--s5); } .codex-hero { margin: 0 calc(-1 * var(--s5)) var(--s3); } }
.prose { gap: var(--s4); font-size: 14.5px; line-height: 1.8; }
.prose p { margin: 0; }
.prose .tale-title { font: 500 clamp(26px, 3vw, 34px)/1.1 var(--serif); color: var(--ivory); margin: 0 0 var(--s2); }
.prose .dropcap::first-letter { float: left; font: 500 64px/.86 var(--serif); color: var(--gold-2); padding: 6px 10px 0 0; }
.prose .speech { padding: var(--s3) 0 var(--s3) var(--s4); border-left: 1px solid var(--gold-line); font: italic 400 19px/1.55 var(--serif); color: var(--ivory); }
.prose .aside { font: italic 400 17px/1.6 var(--serif); color: var(--ivory-2); }
.prose .fin { text-align: center; font: italic 500 19px var(--serif); color: var(--gold-2); padding-top: var(--s3); }
.prose .fin::before { content: '✦'; display: block; font-style: normal; font-size: 12px; color: var(--gold); margin-bottom: var(--s3); }
.prose h3 { margin: var(--s4) 0 0; font-size: 21px; }
.code-form { display: grid; gap: var(--s4); max-width: 440px; }

/* Icône de cadenas au trait */
.lk { width: 11px; height: 11px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; vertical-align: -1px; }
.lock { display: grid; place-items: center; padding: 0; width: 24px; }
.lock .lk { width: 11px; height: 11px; }

/* Éditeur de profil : léger et direct */
.sheet.editor-sheet { width: min(980px, 100%); }
.ed { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
@media (min-width: 860px) { .ed { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } }
.ed-preview { position: sticky; top: 0; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass-2); }
.ed-preview .cv { height: 92px; background: var(--pc-bg); position: relative; }
.ed-preview .cv::before { content: ''; position: absolute; inset: 0; background: url('assets/banner.webp') center 34%/cover no-repeat; opacity: .45; mix-blend-mode: luminosity; }
.ed-preview .cv::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(8,13,27,.96)); }
.ed-preview .id { position: relative; display: grid; justify-items: center; gap: 4px; padding: 0 var(--s4) var(--s5); margin-top: -44px; text-align: center; }
.ed-preview .avatar { width: 88px; border-color: var(--pc-accent); box-shadow: 0 0 0 4px rgba(8,13,27,1), 0 0 0 5px rgba(212,176,106,.2); }
.ed-preview .avatar span { font-size: 34px; color: var(--pc-accent); }
.ed-preview .caps { color: var(--pc-accent); margin-top: var(--s2); }
.ed-preview b { font: 500 24px var(--serif); }
.ed-preview .mini-shelf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 0 var(--s4) var(--s4); }
.ed-preview .mini-shelf span { aspect-ratio: 2/3; border-radius: 4px; border: 1px solid var(--line); background: rgba(4,7,15,.4) center/cover no-repeat; }
.ed-main { display: grid; gap: var(--s5); }
.ed-group { display: grid; gap: var(--s3); }
.ed-group > .caps { display: flex; align-items: center; justify-content: space-between; }
.opt-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.opt { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--ivory-2); font: 400 12.5px var(--sans); cursor: pointer; transition: border-color .3s, color .3s, background .3s; }
.opt:hover:not(:disabled) { border-color: var(--gold-line); color: var(--ivory); }
.opt.is-on { border-color: var(--gold-2); color: var(--gold-2); background: rgba(212,176,106,.08); }
.opt:disabled { opacity: .4; cursor: default; }
.covers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--s2); }
.cover { position: relative; height: 56px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; overflow: hidden; transition: border-color .3s, transform .3s var(--ease); }
.cover:hover:not(:disabled) { transform: translateY(-2px); }
.cover span { position: absolute; left: 8px; bottom: 6px; font: 500 9px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.9); text-shadow: 0 1px 3px #000; display: flex; gap: 5px; align-items: center; }
.cover.is-on { border-color: var(--gold-2); box-shadow: 0 0 0 3px rgba(240,216,152,.16); }
.cover:disabled { opacity: .35; cursor: default; }
.dots-row { display: flex; gap: var(--s3); flex-wrap: wrap; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset; transition: transform .3s var(--ease), box-shadow .3s; }
.dot:hover { transform: scale(1.08); }
.dot.is-on { box-shadow: 0 0 0 2px var(--ink-2), 0 0 0 3px var(--ivory); }
.ed-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: var(--s2); max-height: 248px; overflow-y: auto; padding: 2px 4px 2px 2px; }
.ed-picker .pick { border-radius: 6px; }
.ed-foot { position: sticky; bottom: calc(-1 * var(--s5)); display: flex; justify-content: flex-end; gap: var(--s3); padding: var(--s4) 0 var(--s1); background: linear-gradient(180deg, rgba(6,10,22,0), rgba(6,10,22,.96) 35%); }
@media (max-width: 760px) { .ed-preview { position: relative; } .ed-foot { justify-content: stretch; } .ed-foot .primary-btn { flex: 1; } .ed-foot .ghost-btn { display: none; } }
/* Grille de l'éditeur : hauteur des cases calculée de façon robuste */
.ed-picker { grid-auto-rows: max-content; align-items: start; }
.ed-picker .pick { aspect-ratio: auto !important; height: 0; padding: 0 0 150% 0; }
.ed-picker .pick img { position: absolute; inset: 0; }

/* =====================================================================
   v7 : anneaux, displays, menu, relevé du classeur, écran titre
   ===================================================================== */
/* Anneaux : construction propre, nombre et % centrés sur une même ligne */
.arc .arc-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.arc .arc-n { font: 500 24px/1 var(--serif); color: var(--ivory); font-variant-numeric: lining-nums; }
.arc .arc-u { font: 500 12px/1 var(--serif); color: var(--ivory-3); margin-left: 2px; align-self: center; transform: translateY(-5px); }
.trophy-score .arc { width: 84px; height: 84px; }

/* Displays : proportions mesurées */
.product-art img[src*="display"] { width: min(62%, 280px) !important; height: auto !important; }
.stage-pack.is-box { width: clamp(200px, 20vw, 270px) !important; }
@media (max-width: 899px) {
  .product-art { height: 230px; }
  .product-art img { height: 170px !important; }
  .product-art img[src*="display"] { width: min(64%, 230px) !important; height: auto !important; }
  .stage-pack.is-box { width: min(220px, 58vw) !important; }
}

/* Menu : une seule taille pour toutes les entrées */
.sys-item, .sys-item.minor { font-size: 24px !important; padding: var(--s4) 0 !important; }

/* Tuile Classeur : relevé typographique par rareté */
.tally { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); margin-top: var(--s2); }
.tally div { display: flex; justify-content: space-between; align-items: baseline; padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--ivory-3); }
.tally b { font: 500 17px var(--serif); color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; }
.tally b small { font-size: 12px; color: var(--ivory-4); }

/* Écran titre (ordinateur) : tout s'aligne sur l'axe du logo */
@media (min-width: 1000px) {
  .ts-inner { width: min(560px, 40vw); max-width: none; margin-left: 7vw; padding: 60px 0; justify-items: center; text-align: center; }
  .ts-logo { width: 100%; }
  .ts-tag { margin: -6px 0 6px; }
  .ts-panel { width: 100%; max-width: 440px; }
  .ts-foot { margin-top: 16px; }
}

/* Éditeur de profil v7 : onglets, listes de choix, couleurs discrètes */
.ed { grid-template-columns: minmax(0, 1fr); gap: var(--s6); }
@media (min-width: 860px) { .ed { grid-template-columns: 260px minmax(0, 1fr); } }
.ed-preview .cv { height: 84px; }
.ed-preview .avatar { width: 80px; }
.ed-main { display: grid; gap: var(--s5); min-width: 0; }
.ed-tabs { width: 100%; gap: var(--s5); }
.ed-panel { display: grid; gap: var(--s4); min-height: 300px; align-content: start; animation: enter .45s var(--ease-out); }
.ed-hint { color: var(--ivory-3); }
.ed-cols { display: grid; gap: var(--s5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .ed-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s6); } }
.choices { display: grid; }
.choice { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 42px; padding: var(--s2) 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ivory-2); font: 400 13.5px var(--sans); text-align: left; cursor: pointer; transition: color .25s, padding .35s var(--ease); }
.choice:hover:not(:disabled) { color: var(--ivory); padding-left: 4px; }
.choice.is-on { color: var(--gold-2); }
.choice:disabled { cursor: default; color: var(--ivory-4); }
.choice-l { flex: 1; min-width: 0; }
.choice-r { display: inline-flex; align-items: center; gap: 6px; color: var(--ivory-4); }
.choice-r small { font: 400 11px var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.choice .ck { width: 12px; height: 10px; fill: none; stroke: var(--gold-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.choice .sw { flex: none; width: 22px; height: 14px; border-radius: 4px; box-shadow: 0 0 0 1px var(--line-2); }
.choice .sw.dotsw { width: 10px; height: 10px; border-radius: 50%; box-shadow: none; }
.choice:disabled .sw { opacity: .45; }
.ed-picker { max-height: 340px; }
.ed-cols { align-items: start; }
.ed-group, .choices { align-content: start; }

/* =====================================================================
   v8 : calendrier, musique, fermeture au pouce sur téléphone
   ===================================================================== */

/* Musique */
.music-btn.is-on { color: var(--gold-2); border-color: var(--gold-line); }
.music-btn.is-on svg { animation: notePulse 2.4s ease-in-out infinite; }
@keyframes notePulse { 50% { transform: translateY(-1px) scale(1.06); } }

/* Téléphone : aucune croix en haut à droite, un bouton Fermer en bas, centré */
@media (max-width: 760px) {
  .tcg-preview-x { display: none !important; }
  .tcg-preview-close { position: sticky; bottom: calc(12px + var(--safe-b)); z-index: 5; justify-self: center; width: min(100%, 360px) !important; height: 50px !important; margin: var(--s3) auto 0 !important; background: rgba(10,17,34,.92) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .tcg-preview-info { padding-bottom: var(--s2); }
  .dismiss button, .sys-dismiss button { height: 50px; }
}
@media (max-width: 760px) {
  .tcg-preview-tools { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px !important; }
  .tcg-tool { padding: 0 8px !important; justify-content: center; letter-spacing: .1em !important; font-size: 9.5px !important; }
}

/* =====================================================================
   v9 : application mobile, nouvelle rose, tableau de bord, niveaux
   ===================================================================== */
/* Comportement d'application : pas de zoom, pas de sélection ni de glisser, défilement conservé */
html { touch-action: manipulation; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior-y: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; font-size: 16px !important; }
img { -webkit-user-drag: none; user-drag: none; }
button, a, [data-act], [data-view], [data-preview] { touch-action: manipulation; }


/* Lisibilité sans zoom sur téléphone */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .caps { font-size: 11px; letter-spacing: .2em; }
  .muted, .t-body small, .ledger span, .tally div { font-size: 13.5px; }
  .slot-card small { font-size: 10.5px; }
  .slot-card small b { font-size: 15px; }
  .link { font-size: 11px; }
  .primary-btn, .secondary-btn, .ghost-btn { height: 48px; font-size: 11.5px; }
  .small { height: 40px; font-size: 10.5px; }
}

/* Bandeau de bienvenue */
.dash-welcome { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-items: center; padding-bottom: var(--s2); }
@media (min-width: 900px) { .dash-welcome { grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); } }
.dw-id { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.dw-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ink-3); border: 1px solid var(--gold-line); box-shadow: 0 0 0 4px rgba(4,7,15,.6), 0 0 0 5px rgba(212,176,106,.18); }
.dw-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.45); }
.dw-avatar span { font: 500 26px var(--serif); color: var(--gold-2); }
.dw-id h1 { font-size: clamp(30px, 3.4vw, 40px); }
.dw-level { display: grid; gap: var(--s3); padding: var(--s4) var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); }
.dw-level-top { display: flex; align-items: center; gap: var(--s4); }
.dw-rank { font: 500 20px/1.2 var(--serif); color: var(--ivory); margin-bottom: 2px; }
.lv-badge { position: relative; flex: none; display: grid; place-items: center; align-content: center; width: 56px; height: 56px; border-radius: 50%; border: 1px solid var(--gold-line); background: radial-gradient(circle at 50% 30%, rgba(240,216,152,.16), rgba(4,7,15,.6) 70%); box-shadow: 0 0 22px rgba(240,216,152,.12) inset; }
.lv-badge::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed rgba(212,176,106,.3); }
.lv-badge b { font: 500 24px/1 var(--serif); color: var(--gold-2); }
.lv-badge small { font: 500 7.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-3); margin-top: 2px; }
.lv-badge.big { width: 92px; height: 92px; }
.lv-badge.big b { font-size: 40px; }
.lv-badge.big small { font-size: 8.5px; }
.bar.xp { height: 3px; }
.bar.xp i { background: linear-gradient(90deg, var(--royal-2), var(--sky), var(--gold-2)); }

/* Grille du tableau de bord */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 1000px) { .dash { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5); } .dash-counter { grid-column: span 5; } .dash-honor { grid-column: span 3; } .dash-side { grid-column: span 4; } .dash-recent { grid-column: span 7; } .dash-chron { grid-column: span 5; } .dash-news { grid-column: span 12; } }
.dc { position: relative; overflow: hidden; display: grid; align-content: start; gap: var(--s3); padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); transition: border-color .4s, transform .5s var(--ease); }
.dc:hover { border-color: var(--line-2); }
.dc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.dc-head h3 { font-size: 20px; margin-top: var(--s1); }
.dc-cta { justify-self: start; margin-top: var(--s1); }
.dash-side { display: grid; gap: var(--s4); align-content: start; }
@media (min-width: 1000px) { .dash-side { gap: var(--s5); } }

/* Comptoir des boosters offerts */
.dash-counter { grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: var(--s5); background: radial-gradient(70% 90% at 15% 50%, rgba(240,216,152,.12), transparent 70%), radial-gradient(90% 90% at 100% 0%, rgba(58,95,168,.22), transparent 70%), var(--glass); border-color: var(--gold-line); }
.dc-art { display: grid; place-items: center; }
.dc-art img { width: 120px; cursor: pointer; filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)); animation: float 6s ease-in-out infinite; transition: filter .4s; }
.dc-art img.is-box { width: 132px; }
.dc-art img:hover { filter: drop-shadow(0 18px 24px rgba(0,0,0,.55)) drop-shadow(0 0 22px rgba(240,216,152,.35)); }
.dc-body { display: grid; gap: var(--s3); min-width: 0; }
.dc-count { display: flex; align-items: baseline; gap: 6px; }
.dc-count .num { font-size: 52px; line-height: .9; color: var(--ivory); }
.dc-of { font: 500 18px var(--serif); color: var(--ivory-3); }
.dc-links { display: flex; flex-wrap: wrap; gap: var(--s4); }
.dash-counter .charges .dots i { width: 8px; height: 8px; }
@media (max-width: 520px) { .dash-counter { grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); padding: var(--s4); } .dc-art img { width: 92px; } .dc-art img.is-box { width: 104px; } .dc-count .num { font-size: 44px; } }

/* Carte à l'honneur */
.dash-honor { justify-items: center; text-align: center; background: radial-gradient(80% 60% at 50% 40%, rgba(240,216,152,.1), transparent 70%), var(--glass); }
.dash-honor .caps { justify-self: start; }
.honor-card { width: min(170px, 60%); padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; }
.honor-card:hover .show-art { --lift: -6px; box-shadow: 0 28px 44px -16px rgba(0,0,0,.85), 0 0 0 1px rgba(240,216,152,.3); }
.honor-meta { display: grid; gap: 4px; justify-items: center; }
.honor-meta b { font: 500 20px var(--serif); }
.honor-meta small { color: var(--ivory-3); font-size: 12px; }
@media (max-width: 999px) { .honor-card { width: 150px; } }

/* Dernières découvertes */
.recent-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 760px) { .recent-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.recent { display: grid; gap: 6px; padding: 0; border: 0; background: none; text-align: center; cursor: pointer; perspective: 900px; }
.recent small { font: 500 12.5px var(--serif); color: var(--ivory-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent:hover .slot-art { --lift: -4px; }

/* Chroniques */
.dash-chron { cursor: pointer; padding: 0; grid-template-rows: 120px auto; }
.chron-art { background: url('assets/banner.webp') center 32%/cover no-repeat; opacity: .55; mask-image: linear-gradient(180deg, #000 40%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); transition: opacity .6s, transform 1.2s var(--ease); }
.dash-chron:hover .chron-art { opacity: .75; transform: scale(1.03); }
.chron-body { display: grid; gap: var(--s2); padding: 0 var(--s5) var(--s5); }
.chron-body h3 { font-size: 24px; }
.chron-ex { font: italic 400 17px/1.5 var(--serif); color: var(--ivory-2); }
.dash-chron:hover .link { color: var(--gold-2); }
.dash-chron:hover .link::after { transform: scaleX(1); opacity: 1; }

/* Nouvelles */
.news { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 900px) { .news { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); } }
.news-item { display: grid; gap: 6px; padding-top: var(--s3); border-top: 1px solid var(--line); }
.news-item h4 { margin: 0; font: 500 19px/1.25 var(--serif); color: var(--ivory); }
.news-item p:last-child { font-size: 13.5px; line-height: 1.6; color: var(--ivory-3); }
.gold { color: var(--gold); }

/* Profil : niveau */
.levels { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); padding: var(--s5); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); }
@media (min-width: 900px) { .levels { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding: var(--s6); gap: var(--s7); } }
.lv-main { display: flex; align-items: center; gap: var(--s5); }
.lv-text { display: grid; gap: var(--s2); flex: 1; min-width: 0; }
.lv-text h3 { font-size: 30px; }
.lv-side { display: grid; gap: var(--s2); align-content: center; }

/* Annonce de niveau */
.toast-level { border-color: var(--gold-2); background: radial-gradient(120% 140% at 0% 0%, rgba(240,216,152,.2), rgba(10,17,34,.96) 60%); box-shadow: 0 20px 50px rgba(0,0,0,.5), 0 0 30px rgba(240,216,152,.25); }
.toast-level b { color: var(--gold-2); font-size: 11px; }
.toast-level span { font: 500 18px var(--serif); }
.dash-counter { align-content: center; }
.dash-honor { align-content: center; }

/* =====================================================================
   v10 : médaillon de niveau, crayon du profil, ruban, consultation sans défilement
   ===================================================================== */
/* Médaillon : chiffre au centre exact, libellé posé en bas */
.lv-badge { display: block !important; }
.lv-badge b { position: absolute; inset: 0; display: grid; place-items: center; line-height: 1; transform: translateY(-.06em); }
.lv-badge small { position: absolute; left: 0; right: 0; bottom: 17%; margin: 0; text-align: center; line-height: 1; }
.lv-badge.big small { bottom: 16%; }
.lv-badge b { padding-bottom: 0; }

/* Profil : un crayon discret pour personnaliser */
.pc-edit { position: absolute; z-index: 3; top: var(--s4); right: var(--s4); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(239,230,209,.22); background: rgba(4,7,15,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--ivory); cursor: pointer; transition: color .3s, border-color .3s, transform .4s var(--ease), box-shadow .3s; }
.pc-edit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pc-edit:hover { color: var(--gold-2); border-color: var(--gold-line); transform: rotate(-8deg); box-shadow: 0 0 20px rgba(240,216,152,.2); }
.pc-actions { display: none; }
@media (min-width: 760px) { .pc-body { grid-template-columns: auto minmax(0, 1fr); } }

/* Display : ruban en diagonale dans l'angle droit */
.product { overflow: hidden; }
.ribbon-d { position: absolute; z-index: 2; top: 26px; right: -52px; width: 210px; padding: 7px 0; transform: rotate(45deg); text-align: center; background: linear-gradient(180deg, #f2dca2, #cba559); color: #1c150b; font: 600 9px var(--sans); letter-spacing: .2em; text-transform: uppercase; box-shadow: 0 6px 18px rgba(0,0,0,.4); }

/* Consultation d'une carte : la valeur de revente disparaît */
.tcg-sell-head { display: none !important; }
.tcg-sell-box { border-top: 0 !important; padding-top: 0 !important; }

/* Téléphone : tout tient sur un écran, sans défilement */
@media (max-width: 760px) {
  .tcg-preview { overflow: hidden !important; padding: 0 !important; place-items: stretch !important; }
  .tcg-preview-box { height: 100dvh; margin: 0 !important; display: flex !important; flex-direction: column; flex-wrap: nowrap !important; justify-content: center; align-items: center; gap: 14px !important; padding: calc(var(--safe-t) + 14px) 18px calc(var(--safe-b) + 14px) !important; }
  .tcg-preview-card { flex: none; width: min(70vw, calc((100dvh - 330px) * 2 / 3)) !important; max-width: 300px; }
  .tcg-preview-info { width: 100%; max-width: 420px !important; gap: 6px !important; text-align: center; justify-items: center; }
  .tcg-preview-info .tcg-kicker { font-size: 9.5px; }
  .tcg-preview-info h3 { font-size: 28px !important; }
  .tcg-preview-info > p { font-size: 17px; }
  .tcg-preview-info .tags { justify-content: center; padding: 6px 0; margin: 2px 0; }
  .tcg-preview-tools { width: 100%; }
  .tcg-tool { height: 40px !important; }
  .tcg-sell-box { width: 100%; padding: 0 !important; margin: 0 !important; gap: 6px; }
  .tcg-sell-actions { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important; }
  .tcg-sell-actions button { height: 40px; min-height: 40px; }
  .tcg-preview-close { position: static !important; width: 100% !important; max-width: none; height: 48px !important; margin: 4px 0 0 !important; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .tcg-preview-box { gap: 10px !important; }
  .tcg-preview-card { width: min(62vw, calc((100dvh - 300px) * 2 / 3)) !important; }
  .tcg-preview-info h3 { font-size: 24px !important; }
  .tcg-preview-info > p { display: none; }
}
.ribbon-d { top: 44px; right: -64px; width: 270px; padding: 8px 0; font-size: 8.5px; letter-spacing: .16em; }
@media (max-width: 760px) { .ribbon-d { top: 38px; right: -70px; } }

/* =====================================================================
   v11 : médaillon, tutoriel avec Talyne, réinitialisation
   ===================================================================== */
/* Médaillon de niveau : le chiffre seul, au centre exact du cercle */
.lv-badge { display: flex !important; align-items: center; justify-content: center; }
.lv-badge small { display: none !important; }
.lv-badge b { position: static !important; inset: auto !important; display: block !important; transform: translateY(.03em) !important; line-height: 1 !important; font-variant-numeric: lining-nums; }

/* Tutoriel */
.coach { position: fixed; inset: 0; z-index: 950; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.coach.is-on { opacity: 1; }
.coach-ring { position: fixed; border-radius: 18px; border: 1px solid rgba(240,216,152,.75); box-shadow: 0 0 0 9999px rgba(3,5,12,.62), 0 0 0 4px rgba(240,216,152,.12), 0 0 40px rgba(240,216,152,.35); opacity: 0; transition: left .55s var(--ease-out), top .55s var(--ease-out), width .55s var(--ease-out), height .55s var(--ease-out), opacity .4s; animation: coachPulse 2.6s ease-in-out infinite; }
.coach-ring.is-on { opacity: 1; }
.coach.no-target::before { content: ''; position: fixed; inset: 0; background: rgba(3,5,12,.62); }
@keyframes coachPulse { 50% { box-shadow: 0 0 0 9999px rgba(3,5,12,.62), 0 0 0 7px rgba(240,216,152,.08), 0 0 56px rgba(240,216,152,.5); } }
.coach-bubble { position: fixed; left: 50%; bottom: calc(28px + var(--safe-b)); width: min(560px, calc(100% - 32px)); transform: translateX(-50%) translateY(12px); pointer-events: auto; display: grid; gap: var(--s3); padding: var(--s4) var(--s5) var(--s4); border-radius: 20px; border: 1px solid var(--gold-line); background: linear-gradient(180deg, rgba(17,28,56,.97), rgba(6,10,22,.97)); box-shadow: 0 30px 70px rgba(0,0,0,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: transform .55s var(--ease-out), opacity .4s; }
.coach.is-on .coach-bubble { transform: translateX(-50%); opacity: 1; }
.coach-bubble::before { content: ''; position: absolute; left: 12%; right: 12%; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(240,216,152,.7), transparent); }
.cb-head { display: flex; align-items: center; gap: var(--s3); }
.cb-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--gold-line); box-shadow: 0 0 0 3px rgba(4,7,15,.6); }
.cb-head b { display: block; font: 500 19px/1.1 var(--serif); color: var(--ivory); }
.cb-head .caps { font-size: 9px; color: var(--gold); }
.cb-dots { display: flex; gap: 5px; margin-left: auto; }
.cb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background .3s, transform .3s; }
.cb-dots i.done { background: rgba(212,176,106,.5); }
.cb-dots i.on { background: var(--gold-2); transform: scale(1.3); box-shadow: 0 0 8px var(--gold-glow); }
.cb-text { font: italic 400 18px/1.5 var(--serif); color: var(--ivory); animation: quoteIn .6s var(--ease-out); }
.cb-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.cb-hint { display: inline-flex; align-items: center; gap: 8px; font: 500 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }
.cb-hint::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 10px var(--gold-2); animation: breathe 1.6s ease-in-out infinite; }
@media (max-width: 999px) { .coach-bubble { bottom: calc(100px + var(--safe-b)); } }
@media (max-width: 760px) { .cb-text { font-size: 17px; } .coach-bubble { padding: var(--s4); } }

/* Réinitialisation */
.danger-zone { display: grid; gap: var(--s2); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); }
.ghost-btn.danger { justify-self: start; color: #f3b1a8; border-color: rgba(239,154,154,.35); }
.ghost-btn.danger:hover { color: #ffd0c9; border-color: rgba(239,154,154,.7); }
.reset-warn { padding: var(--s4) var(--s5); border-radius: 14px; border: 1px solid rgba(239,154,154,.4); background: linear-gradient(180deg, rgba(120,30,30,.22), rgba(60,15,20,.18)); }
.reset-title { font: 500 22px var(--serif); color: #ffd6cf; }
.reset-warn p:last-child { color: #e9b9b2; font-size: 13.5px; margin-top: 2px; }
.reset-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 640px) { .reset-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.reset-cols ul { margin: var(--s2) 0 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ivory-2); font-size: 13.5px; }
.primary-btn.danger-fill { color: #fff; background: linear-gradient(180deg, #b8574c, #8b3a32); box-shadow: 0 8px 24px -8px rgba(184,87,76,.6); }
.primary-btn.danger-fill::after { display: none; }
.reset-wait { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: var(--s4) 0; }
.reset-count { font: 500 44px/1 var(--serif); color: var(--ivory); font-variant-numeric: lining-nums tabular-nums; }
.coach.bubble-top .coach-bubble { bottom: auto; top: calc(var(--hud-h) + var(--safe-t) + 14px); }

/* =====================================================================
   v12 : marché entre joueurs
   ===================================================================== */
.mk-head { display: grid; gap: var(--s5); }
.mk-head .display { max-width: none; }
.mk-tabs { justify-self: start; }
.mk-filters { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .mk-filters { grid-template-columns: 2fr repeat(3, minmax(0, 1fr)); } .mk-filters .mk-price { grid-column: span 2; } .mk-filters select[name="sort"] { grid-column: span 1; } .mk-toggle { grid-column: span 1; } }
@media (min-width: 560px) and (max-width: 899px) { .mk-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mk-search { grid-column: 1 / -1; } }
.mk-filters select, .mk-filters input { height: 44px; background-color: rgba(4,7,15,.45); }
.mk-search input { padding-left: 40px; background: rgba(4,7,15,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4b06a' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M16 16l4 4'/%3E%3C/svg%3E") 14px center/16px no-repeat; }
.mk-price { display: flex; align-items: center; gap: var(--s2); }
.mk-price span { color: var(--ivory-4); }
.mk-toggle { border-bottom: 0; padding: 0; align-self: center; justify-content: flex-start; gap: var(--s3); font-size: 12.5px; }
.mk-count { margin: calc(-1 * var(--s4)) 0 calc(-1 * var(--s3)); }
.lots { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 560px) { .lots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .lots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
.lot { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s4); align-items: center; padding: var(--s4); border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--glass); transition: border-color .4s, transform .5s var(--ease); }
.lot:hover { border-color: var(--line-2); transform: translateY(-2px); }
.lot.is-mine { border-style: dashed; }
.lot-art { padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; }
.lot-body { display: grid; gap: 4px; min-width: 0; }
.lot-body h3 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-body .caps { font-size: 9.5px; }
.lot-seller { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lot-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s2); }
.lot-price { display: grid; font-size: 22px; line-height: 1; }
.lot-price .v { font-size: 22px; }
.lot-price small { font: 500 9px var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ivory-4); margin-top: 4px; }
.mk-empty { padding: var(--s7) 0; text-align: center; }
.mk-actions { display: grid; gap: var(--s3); justify-items: start; }
.mk-actions .muted { max-width: 60ch; font-size: 13px; }
.mk-rows { display: grid; }
.mk-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: var(--s4); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.mk-thumb { width: 52px; padding: 0; border: 0; background: none; cursor: pointer; }
.mk-row-main { display: grid; gap: 2px; min-width: 0; }
.mk-row-main b { font: 500 18px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-row-main .muted { font-size: 12.5px; }
.mk-badge { justify-self: start; font: 500 9px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--sky); }
.mk-badge.is-sale { color: var(--gold-2); }
.mk-amount { font: 500 20px var(--serif); white-space: nowrap; }
.mk-amount.plus { color: var(--gold-2); }
.mk-amount.minus { color: var(--ivory-2); }
@media (max-width: 560px) { .mk-row { grid-template-columns: 44px minmax(0, 1fr) auto; } .mk-row .ghost-btn, .mk-row > .lot-price { grid-column: 2 / -1; justify-self: start; } .mk-thumb { width: 44px; } }
.mk-deal { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 520px) { .mk-deal { grid-template-columns: 110px minmax(0, 1fr); gap: var(--s4); } }
.mk-deal-info { display: grid; gap: var(--s2); }
.mk-deal-info h3 { font-size: 26px; }
.mk-line { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ivory-2); }
.mk-line b { font: 500 20px var(--serif); color: var(--ivory); }
.mk-line.total b { font-size: 24px; color: var(--gold-2); }
.stepper { display: inline-flex; align-items: center; gap: var(--s3); }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: none; color: var(--ivory); font: 400 18px var(--sans); cursor: pointer; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper b { min-width: 20px; text-align: center; }
.mk-ref { font-size: 12.5px; }
.sheet.mk-sheet { width: min(760px, 100%); }
.mk-picker { max-height: 52vh; }
.mk-filters .mk-toggle input { width: 40px !important; height: 22px !important; min-height: 0; padding: 0; background-color: var(--line-2); flex: none; }
.mk-filters .mk-toggle input:checked { background-color: rgba(212,176,106,.45); }

/* =====================================================================
   v13 — Refonte « Maison Talyne » : matières, en-tête de joueur, dock, autel
   ===================================================================== */
:root {
  --enamel-1: #111d3c; --enamel-2: #0b142c; --enamel-hi: #1e3266; --brass: #d4b06a; --brass-2: #f2dca0;
  --panel-r: 24px; --panel-bd: rgba(239,230,209,.08); --panel-sh: 0 18px 40px rgba(0,0,0,.5);
  --r0: #c6ccd8; --r1: #8fcf9b; --r2: #7fb2f2; --r3: #bb96ff; --r4: #f1cf6a; --r5: #e0607a; --r6: #f8eaff;
}
body { font-size: 15px; }
.caps { letter-spacing: .14em !important; font-weight: 600; }

/* Matière : panneaux en émail */
.panel, .tile, .dc, .product, .lot, .ritual, .reserve, .quote-box, .trophy, .levels, .pc, .tally, .mk-row {
  --tw: 0;
}
.panel, .ritual, .reserve, .tile, .product, .lot, .quote-box, .levels, .pc {
  position: relative; border-radius: var(--panel-r) !important; border: 1px solid var(--panel-bd) !important;
  background: linear-gradient(180deg, var(--enamel-1), var(--enamel-2)) !important;
  box-shadow: var(--panel-sh), inset 0 1px 0 rgba(255,255,255,.05) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.panel { display: grid; align-content: start; gap: var(--s3); padding: var(--s5); overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); }
.panel-head h3 { font-size: 20px; margin-top: 4px; }

/* Bouton sceau : la seule action pleine d'un écran */
.seal-btn, .primary-btn {
  position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 56px; padding: 0 30px; border-radius: 18px; border: 0; cursor: pointer;
  font: 700 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #20170a;
  background: linear-gradient(180deg, #f7e6b4 0%, #e3c27a 48%, #c59a4c 100%);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 -3px 0 rgba(120,80,20,.45) inset, 0 10px 26px -8px rgba(240,200,120,.6);
  transition: transform .15s var(--ease), box-shadow .3s, filter .3s;
}
.seal-btn::after, .primary-btn::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.6) 50%, transparent 65%); transform: translateX(-120%); transition: transform .8s var(--ease-out); }
.seal-btn:hover::after, .primary-btn:hover::after { transform: translateX(120%); }
.seal-btn:hover, .primary-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.seal-btn:active, .primary-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 -1px 0 rgba(120,80,20,.45) inset, 0 4px 12px -6px rgba(240,200,120,.6); }
.seal-btn:disabled, .primary-btn:disabled { filter: grayscale(.6) brightness(.6); cursor: default; transform: none; }
.seal-btn.small, .primary-btn.small { height: 44px; padding: 0 20px; border-radius: 14px; font-size: 11.5px; }
.primary-btn.btn-lg { height: 56px; }
.secondary-btn { border-radius: 16px; background: linear-gradient(180deg, #1c2c58, #142245) !important; border: 1px solid rgba(212,176,106,.3) !important; }
.ghost-btn { border-radius: 14px; }

/* Gemmes, pastilles de gain, segments */
.gain-chip { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; background: rgba(242,220,160,.13); border: 1px solid rgba(242,220,160,.28); color: var(--brass-2); font: 700 12px var(--sans); white-space: nowrap; }
.gain-chip.plain { background: rgba(169,200,236,.1); border-color: rgba(169,200,236,.25); color: var(--sky); }
.gems { display: inline-flex; gap: 8px; align-items: center; }
.gems i { width: 12px; height: 12px; transform: rotate(45deg); border: 1.5px solid rgba(212,176,106,.6); border-radius: 2px; transition: background .4s, box-shadow .4s; }
.gems i.on { background: linear-gradient(135deg, #fff3cf, #d6ae5e); border-color: #f2dca0; box-shadow: 0 0 12px rgba(242,220,160,.6); }
.gems.week i { width: 10px; height: 10px; }
.seg-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.seg-bar i { height: 9px; transform: skewX(-22deg); border-radius: 2px; background: rgba(239,230,209,.1); }
.seg-bar i.on { background: linear-gradient(90deg, #6fa0e6, #a9d0ff); box-shadow: 0 0 8px rgba(127,178,242,.45); }
.rar-gem { display: inline-flex; align-items: center; gap: 7px; font: 600 11px var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.rar-gem::before { content: ''; width: 9px; height: 9px; transform: rotate(45deg); background: currentColor; box-shadow: 0 0 10px currentColor; }
.r-0 { color: var(--r0); } .r-1 { color: var(--r1); } .r-2 { color: var(--r2); } .r-3 { color: var(--r3); } .r-4 { color: var(--r4); } .r-5 { color: var(--r5); } .r-6 { color: var(--r6); }

/* ---------- En-tête de joueur ---------- */
.hud { position: sticky; top: 0; z-index: 40; display: grid !important; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s3); height: calc(76px + var(--safe-t)); padding: var(--safe-t) max(var(--gutter), calc((100vw - var(--wrap)) / 2)) 0 !important; }
.hud::before { background: linear-gradient(180deg, rgba(4,7,15,.96), rgba(6,11,24,.88)) !important; border-bottom: 1px solid rgba(212,176,106,.16) !important; }
.ph-id { justify-self: start; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; cursor: pointer; text-align: left; min-width: 0; }
.ph-avatar { position: relative; flex: none; width: 52px; height: 52px; }
.ph-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ph-ring circle { fill: none; stroke-width: 3; }
.ph-ring .tr { stroke: rgba(239,230,209,.12); }
.ph-ring .va { stroke: url(#arcGold); stroke: var(--brass-2); stroke-linecap: round; stroke-dasharray: 100; transition: stroke-dashoffset 1.2s var(--ease-out); filter: drop-shadow(0 0 4px rgba(242,220,160,.6)); }
.ph-pic { position: absolute; inset: 6px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ink-3); }
.ph-pic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transform: scale(1.45); }
.ph-pic span { font: 600 18px var(--serif); color: var(--brass-2); }
.ph-lv { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; display: grid; place-items: center; font: 700 12px/1 var(--sans); color: #20170a; background: linear-gradient(180deg, #f7e6b4, #c59a4c); box-shadow: 0 0 0 2px var(--night); }
.ph-txt { display: grid; gap: 3px; min-width: 0; }
.ph-name { font: 600 18px/1.1 var(--serif); color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.ph-rank { font: 500 11.5px var(--sans); color: var(--ivory-3); white-space: nowrap; }
.ph-xp { display: block; width: 150px; height: 4px; border-radius: 4px; background: rgba(239,230,209,.1); overflow: hidden; }
.ph-xp i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--royal-2), var(--sky), var(--brass-2)); transition: width 1.2s var(--ease-out); }
.ph-logo { height: 30px; width: auto; opacity: .9; }
.ph-res { justify-self: end; display: flex; align-items: center; gap: 8px; }
.res { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(212,176,106,.22); background: linear-gradient(180deg, #14224a, #0c1530); color: var(--ivory); cursor: pointer; }
.res b { font: 700 16px var(--sans); }
.res small { font: 600 11px var(--sans); color: var(--ivory-3); font-variant-numeric: tabular-nums; }
.res-gem { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; background: linear-gradient(135deg, #fff3cf, #d6ae5e); box-shadow: 0 0 10px rgba(242,220,160,.5); }
.res-boosters:not(.is-ready) .res-gem { background: transparent; border: 1.5px solid rgba(212,176,106,.6); box-shadow: none; }
.res-velys { cursor: default; }
.res-velys .purse { font-size: 19px; padding: 0; }
.ph-res .icon-btn { width: 42px; height: 42px; background: linear-gradient(180deg, #14224a, #0c1530); }
.ph-avatar.pulse, .res-velys.pulse { animation: resPulse .9s var(--ease-out); }
@keyframes resPulse { 40% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(242,220,160,.7)); } }
@media (max-width: 899px) { .ph-txt, .ph-logo { display: none; } .hud { grid-template-columns: auto 1fr; height: calc(66px + var(--safe-t)); } .ph-avatar { width: 46px; height: 46px; } }
@media (max-width: 480px) { .res { height: 38px; padding: 0 11px; gap: 6px; } .res b { font-size: 14px; } .res-velys .purse { font-size: 17px; } .ph-res { gap: 6px; } .ph-res .music-btn { display: none; } .ph-res .icon-btn { width: 38px; height: 38px; } }
@media (max-width: 380px) { .res-boosters small { display: none; } }

/* ---------- Dock et sceau central ---------- */
.nav, .seal, .radial, .seal-label, .hud-logo, #hudRight { display: none !important; }
.dock { position: fixed; z-index: 60; left: 50%; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: min(560px, calc(100% - 20px)); height: 72px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 0 6px 8px; border-radius: 26px; background: linear-gradient(180deg, rgba(22,36,74,.97), rgba(8,14,32,.98)); border: 1px solid rgba(212,176,106,.22); box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.dock-btn { position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 0 0; border: 0; background: none; color: var(--ivory-3); cursor: pointer; transition: color .25s; }
.dock-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.dock-btn small { font: 600 10px var(--sans); letter-spacing: .06em; }
.dock-btn:hover { color: var(--ivory); }
.dock-btn.is-on { color: var(--brass-2); }
.dock-btn.is-on svg { transform: translateY(-2px); filter: drop-shadow(0 0 8px rgba(242,220,160,.5)); }
.dock-btn.is-on::before { content: ''; position: absolute; top: -8px; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--brass-2); box-shadow: 0 0 10px var(--brass-2); }
.dock-dot { position: absolute; top: 2px; left: calc(50% + 8px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--brass-2); color: #20170a; font: 700 9.5px/16px var(--sans); text-align: center; font-style: normal; }
.dock-dot:empty { min-width: 9px; height: 9px; padding: 0; top: 6px; box-shadow: 0 0 8px var(--brass-2); }
.dock-seal { position: relative; display: grid; justify-items: center; gap: 6px; border: 0; background: none; cursor: pointer; transform: translateY(-14px); }
.ds-core { display: grid; place-items: center; width: 66px; height: 66px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #23386e, #0a1226 75%); border: 2px solid rgba(242,220,160,.7); box-shadow: 0 0 0 5px rgba(8,14,32,.98), 0 10px 28px rgba(0,0,0,.6), 0 0 22px rgba(242,220,160,.22); transition: transform .3s var(--ease), box-shadow .4s; }
.dock-seal small { font: 700 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brass-2); }
.dock-seal.is-ready .ds-core { animation: sealBreath 2.6s ease-in-out infinite; }
@keyframes sealBreath { 50% { box-shadow: 0 0 0 5px rgba(8,14,32,.98), 0 10px 28px rgba(0,0,0,.6), 0 0 38px rgba(242,220,160,.55); } }
.dock-seal:hover .ds-core { transform: scale(1.05) rotate(8deg); }
.dock-seal:active .ds-core { transform: scale(.95); }
.ds-count { position: absolute; top: -2px; right: calc(50% - 40px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: linear-gradient(180deg, #f7e6b4, #c59a4c); color: #20170a; font: 700 12px/22px var(--sans); font-style: normal; box-shadow: 0 0 0 2px #0b142c; }
.main { padding-bottom: calc(130px + var(--safe-b)) !important; }

/* Gains animés */
.gain-float { position: fixed; z-index: 1300; transform: translate(-50%, 0); pointer-events: none; padding: 6px 12px; border-radius: 999px; background: rgba(8,14,32,.92); border: 1px solid rgba(242,220,160,.5); color: var(--brass-2); font: 700 14px var(--sans); white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 20px rgba(242,220,160,.25); animation: gainUp 1.7s var(--ease-out) forwards; }
.gain-float.xp { color: var(--sky); border-color: rgba(169,200,236,.55); }
@keyframes gainUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.9); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, 18px); } }

/* ---------- Comptoir : l'autel ---------- */
.altar { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); align-items: center; }
@media (min-width: 900px) { .altar { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--s6); } }
.altar-stage { position: relative; display: grid; place-items: center; min-height: 340px; }
.altar-glow { position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(242,220,160,.28), rgba(58,95,168,.16) 45%, transparent 70%); animation: breathe 6s ease-in-out infinite; }
.altar-pack { position: relative; z-index: 1; padding: 0; border: 0; background: none; cursor: pointer; width: clamp(170px, 18vw, 230px); filter: drop-shadow(0 30px 34px rgba(0,0,0,.6)); transition: filter .4s, transform .5s var(--ease); }
.altar-pack.is-box { width: clamp(220px, 26vw, 320px); }
.altar-pack img { display: block; width: 100%; animation: float 6s ease-in-out infinite; }
.altar-pack:hover { filter: drop-shadow(0 30px 34px rgba(0,0,0,.6)) drop-shadow(0 0 30px rgba(242,220,160,.4)); transform: scale(1.02); }
.altar-panel { display: grid; gap: var(--s3); justify-items: start; padding: var(--s6); border-radius: var(--panel-r); border: 1px solid rgba(212,176,106,.28); background: radial-gradient(120% 90% at 0% 0%, rgba(242,220,160,.1), transparent 60%), linear-gradient(180deg, var(--enamel-1), var(--enamel-2)); box-shadow: var(--panel-sh), inset 0 1px 0 rgba(255,255,255,.06); }
.altar-title { font-size: clamp(28px, 3vw, 36px); }
.altar-count { display: flex; align-items: baseline; gap: 8px; line-height: .9; }
.altar-count .num { font-size: clamp(56px, 6vw, 72px); font-weight: 700; color: var(--ivory); }
.altar-count span { font: 600 22px var(--serif); color: var(--ivory-3); }
.altar-sub { color: var(--ivory-2); font-size: 14.5px; }
.altar-sub b { color: var(--ivory); font-variant-numeric: tabular-nums; }
.altar-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s2); }
@media (max-width: 899px) { .altar-stage { min-height: 280px; } .altar-pack { width: 160px; } .altar-pack.is-box { width: min(240px, 66vw); } .altar-panel { justify-items: center; text-align: center; padding: var(--s5); } .altar-actions { justify-content: center; } .altar-actions .seal-btn { width: 100%; max-width: 340px; } }

/* Rituels du jour */
.rituals { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 900px) { .rituals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); } }
@media (max-width: 899px) { .rituals { grid-auto-flow: column; grid-auto-columns: 82%; grid-template-columns: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; } .ritual { scroll-snap-align: start; } }
.ritual { display: grid; align-content: start; gap: var(--s3); padding: var(--s5); transition: transform .4s var(--ease), border-color .4s; }
.ritual:hover { transform: translateY(-3px); }
.ritual.is-ready { border-color: rgba(242,220,160,.4) !important; box-shadow: var(--panel-sh), 0 0 0 1px rgba(242,220,160,.12), 0 0 30px -6px rgba(242,220,160,.35) !important; }
.ritual-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.ritual h3 { font-size: 22px; }
.ritual-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s2); }
.ritual-foot .muted { font-size: 12.5px; }

/* Vitrine, découvertes, gazette */
.home-duo, .gazette { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
@media (min-width: 900px) { .home-duo { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--s5); } .gazette { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s5); } }
.vitrine { justify-items: center; text-align: center; background: radial-gradient(70% 55% at 50% 45%, rgba(242,220,160,.12), transparent 70%), linear-gradient(180deg, #0d1733, #070d20) !important; }
.vitrine > .caps { justify-self: start; }
.vitrine .honor-card { width: min(180px, 58%); padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; position: relative; z-index: 1; }
.vitrine-base { width: 70%; height: 14px; margin-top: -10px; border-radius: 50%; background: radial-gradient(closest-side, rgba(242,220,160,.45), transparent); filter: blur(2px); }
.honor-meta { display: grid; gap: 5px; justify-items: center; }
.honor-meta b { font: 600 22px var(--serif); }
.honor-meta small { color: var(--ivory-3); font-size: 12.5px; }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: 112px; gap: var(--s3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 6px 2px 4px; }
.carousel::-webkit-scrollbar, .rituals::-webkit-scrollbar, .pills::-webkit-scrollbar { display: none; }
.car-card { position: relative; display: grid; gap: 6px; padding: 0; border: 0; background: none; text-align: center; cursor: pointer; scroll-snap-align: start; perspective: 900px; }
.car-card small { font: 600 13px var(--serif); color: var(--ivory-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.car-card:hover .slot-art { --lift: -5px; }
.chron { padding: 0 !important; cursor: pointer; grid-template-rows: 130px auto; gap: 0 !important; }
.chron .chron-art { background: url('assets/banner.webp') center 32%/cover no-repeat; opacity: .6; mask-image: linear-gradient(180deg, #000 40%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent); transition: opacity .6s, transform 1.2s var(--ease); }
.chron:hover .chron-art { opacity: .8; transform: scale(1.03); }
.chron .chron-body { display: grid; gap: var(--s2); padding: 0 var(--s5) var(--s5); }
.chron h3 { font-size: 24px; }
.news-panel .news { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }

/* ---------- Ouvrir : réserve en tête ---------- */
.open-head .display { max-width: none; }
.reserve { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s5); align-items: center; padding: var(--s5) var(--s6); border-color: rgba(212,176,106,.3) !important; background: radial-gradient(80% 120% at 0% 50%, rgba(242,220,160,.14), transparent 60%), linear-gradient(180deg, var(--enamel-1), var(--enamel-2)) !important; }
.reserve.is-empty { border-color: var(--panel-bd) !important; }
.reserve-art img { width: 100%; filter: drop-shadow(0 18px 22px rgba(0,0,0,.55)); animation: float 6s ease-in-out infinite; }
.reserve-body { display: grid; gap: var(--s2); justify-items: start; }
.reserve-body h2 { font-size: 30px; }
@media (max-width: 560px) { .reserve { grid-template-columns: 84px minmax(0, 1fr); padding: var(--s4); gap: var(--s4); } .reserve .altar-count .num { font-size: 48px; } }

/* ---------- Classeur : filtres en pastilles ---------- */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pill { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(239,230,209,.12); background: linear-gradient(180deg, #14224a, #0c1530); color: var(--ivory-2); font: 600 12.5px var(--sans); cursor: pointer; transition: border-color .25s, color .25s, background .25s; }
.pill:hover { color: var(--ivory); border-color: rgba(212,176,106,.35); }
.pill.is-on { color: #20170a; border-color: transparent; background: linear-gradient(180deg, #f7e6b4, #c59a4c); }
.pill-gem { width: 8px; height: 8px; transform: rotate(45deg); background: currentColor; }
.pill.is-on .pill-gem { color: #20170a !important; }
.pill-gem.r-0 { color: var(--r0); } .pill-gem.r-1 { color: var(--r1); } .pill-gem.r-2 { color: var(--r2); } .pill-gem.r-3 { color: var(--r3); } .pill-gem.r-4 { color: var(--r4); } .pill-gem.r-5 { color: var(--r5); } .pill-gem.r-6 { color: var(--r6); }
.refine summary { list-style: none; display: inline-flex; align-items: center; gap: var(--s3); cursor: pointer; color: var(--ivory-3); font: 600 12.5px var(--sans); }
.refine summary::-webkit-details-marker { display: none; }
.refine .chev { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-2); transition: transform .4s var(--ease); }
.refine .chev svg { width: 10px; height: 10px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.refine[open] .chev { transform: rotate(180deg); }
.refine .filters { margin-top: var(--s3); grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.slot-empty { border-radius: 12px; background: linear-gradient(180deg, rgba(20,34,74,.55), rgba(8,14,32,.6)); border: 1px dashed rgba(239,230,209,.12); }

/* ---------- Trophées : cartes de succès et paliers ---------- */
.trophies { gap: var(--s3) !important; }
@media (min-width: 900px) { .trophies { column-gap: var(--s4) !important; } }
.trophy { grid-template-columns: 60px minmax(0, 1fr) auto; padding: var(--s4) var(--s5) !important; border-radius: 20px; border: 1px solid var(--panel-bd) !important; background: linear-gradient(180deg, var(--enamel-1), var(--enamel-2)); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.trophy .medal { width: 60px; height: 60px; border-radius: 50%; }
.trophy.is-done .medal, .trophy.is-claimed .medal { color: var(--tier) !important; background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--tier) 30%, transparent), transparent 70%); }
.trophy.is-done { border-color: rgba(242,220,160,.4) !important; box-shadow: 0 10px 26px rgba(0,0,0,.35), 0 0 26px -6px rgba(242,220,160,.4); }
.trophy.is-near { border-color: rgba(127,178,242,.35) !important; }
.trophy.is-sealed .medal { color: rgba(255,220,210,.85) !important; background: radial-gradient(circle at 40% 35%, #a5413a, #5c1a18 70%); border-radius: 50%; box-shadow: inset 0 -3px 6px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.4); }
.trophy.is-sealed .t-body b { color: var(--ivory-3); }
.t-side .t-reward { display: inline-flex; height: 26px; align-items: center; padding: 0 10px; border-radius: 999px; background: rgba(242,220,160,.1); border: 1px solid rgba(242,220,160,.22); font-size: 14px !important; }
.trophy .t-prog .bar { height: 6px; border-radius: 6px; }
.trophy .t-prog .bar i { border-radius: 6px; background: linear-gradient(90deg, #6fa0e6, #a9d0ff); }

/* Profil : registre replié */
.registre { border-radius: var(--panel-r); border: 1px solid var(--panel-bd) !important; padding: 0 var(--s5); background: linear-gradient(180deg, var(--enamel-1), var(--enamel-2)); }

/* Tutoriel : le halo épouse les panneaux arrondis */
.coach-ring { border-radius: 28px; }
/* Une bulle masquée ne capte plus les touchers */
.coach:not(.is-on) .coach-bubble { pointer-events: none; visibility: hidden; transition: transform .55s var(--ease-out), opacity .4s, visibility 0s .4s; }
/* Dock : le sceau déborde au-dessus sans agrandir la rangée ; les cinq libellés sur une même ligne */
.dock { align-items: end; }
.dock-btn, .dock-seal { height: 54px; padding: 0 !important; align-content: end; }
.dock-seal { transform: none !important; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.ds-core { position: absolute; left: 50%; top: -40px; transform: translateX(-50%); }
.dock-seal:hover .ds-core { transform: translateX(-50%) scale(1.05) rotate(8deg); }
.dock-seal:active .ds-core { transform: translateX(-50%) scale(.95); }
.ds-count { top: -44px; right: calc(50% - 42px); }
.dock-dot { top: -2px; }
.dock { background: linear-gradient(180deg, #16244a, #080e20) !important; }

/* =====================================================================
   v14 — Ouverture, détail de carte, Chroniques, filtres du marché
   ===================================================================== */
/* Déchirer le booster */
.tcg-tear-hint { position: fixed; z-index: 3; left: 50%; bottom: calc(14% + var(--safe-b)); transform: translateX(-50%) translateY(8px); display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 999px; background: rgba(8,14,32,.9); border: 1px solid rgba(242,220,160,.4); color: var(--brass-2); font: 600 13px var(--sans); letter-spacing: .04em; opacity: 0; transition: opacity .5s, transform .5s var(--ease-out); pointer-events: none; white-space: nowrap; }
.tcg-tear-hint.is-on { opacity: 1; transform: translateX(-50%); }
.tth-swipe { position: relative; width: 38px; height: 4px; border-radius: 4px; background: rgba(242,220,160,.25); overflow: hidden; }
.tth-swipe::after { content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 100%; border-radius: 4px; background: var(--brass-2); box-shadow: 0 0 8px var(--brass-2); animation: tthSwipe 1.4s ease-in-out infinite; }
@keyframes tthSwipe { to { left: 100%; } }
.tcg-pack.is-grip:not(.is-tearing) { animation: packWait 2.2s ease-in-out infinite; cursor: grab; }
@keyframes packWait { 0%, 100% { transform: rotate(0deg); } 20% { transform: rotate(-1.2deg); } 40% { transform: rotate(1.2deg); } 60% { transform: rotate(0deg); } }

/* Aura de rareté avant le retournement */
.tcg-deal-card.has-aura:not(.is-revealed)::before { content: ''; position: absolute; inset: -10%; z-index: -1; border-radius: 18px; opacity: 0; filter: blur(14px); animation: auraIn .9s var(--ease-out) forwards, auraPulse 2.2s ease-in-out infinite .9s; }
.tcg-deal-card.has-aura.r-rare:not(.is-revealed)::before { background: radial-gradient(closest-side, rgba(127,178,242,.75), transparent); }
.tcg-deal-card.has-aura.r-mythique:not(.is-revealed)::before { background: radial-gradient(closest-side, rgba(187,150,255,.85), transparent); }
.tcg-deal-card.has-aura.r-legendaire:not(.is-revealed)::before, .tcg-deal-card.has-aura.r-unique:not(.is-revealed)::before { background: radial-gradient(closest-side, rgba(241,207,106,.95), transparent); inset: -16%; }
.tcg-deal-card.has-aura.r-eternel:not(.is-revealed)::before { background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(240,200,255,.5) 50%, transparent); inset: -20%; }
@keyframes auraIn { to { opacity: 1; } }
@keyframes auraPulse { 50% { opacity: .55; transform: scale(1.04); } }
.tcg-deal-card { position: relative; isolation: isolate; }

/* Bande de gains */
.gains-band { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s5); align-items: center; width: min(560px, 100%); margin: 0 auto var(--s3); padding: var(--s4) var(--s5); border-radius: 20px; background: linear-gradient(180deg, rgba(20,34,74,.95), rgba(8,14,32,.95)); border: 1px solid rgba(242,220,160,.3); box-shadow: 0 16px 40px rgba(0,0,0,.5); animation: enter .6s var(--ease-out) both; }
.gb-item { display: grid; justify-items: center; }
.gb-item b { font: 700 28px/1 var(--serif); color: var(--brass-2); font-variant-numeric: lining-nums; }
.gb-item:last-child b { color: var(--sky); }
.gb-item small { font: 600 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ivory-3); margin-top: 4px; }
.gb-level { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; }
.gb-lv { grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--brass-2); font: 700 18px var(--sans); color: var(--brass-2); box-shadow: 0 0 16px rgba(242,220,160,.35); }
.gb-bar { height: 8px; border-radius: 8px; background: rgba(239,230,209,.1); overflow: hidden; }
.gb-bar i { display: block; height: 100%; border-radius: 8px; width: var(--to); background: linear-gradient(90deg, var(--royal-2), var(--sky), var(--brass-2)); animation: gbFill 1.4s var(--ease-out) .3s both; }
@keyframes gbFill { from { width: var(--from); } to { width: var(--to); } }
.gb-level small { font: 600 12px var(--sans); color: var(--ivory-2); }
@media (max-width: 520px) { .gains-band { gap: var(--s3); padding: var(--s3) var(--s4); } .gb-item b { font-size: 22px; } }

/* Détail de carte : navigation et glissements */
.tcg-nav { position: absolute; z-index: 4; top: 50%; width: 48px; height: 48px; margin-top: -24px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(242,220,160,.3); background: rgba(8,14,32,.8); color: var(--ivory); cursor: pointer; transition: border-color .25s, color .25s, transform .3s var(--ease); }
.tcg-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tcg-nav:hover { color: var(--brass-2); border-color: var(--brass-2); }
.tcg-nav.is-prev { left: max(16px, calc(50% - 620px)); } .tcg-nav.is-next { right: max(16px, calc(50% - 620px)); }
.tcg-nav.is-prev:hover { transform: translateX(-3px); } .tcg-nav.is-next:hover { transform: translateX(3px); }
.tcg-preview-box.slide-next { animation: slideNext .35s var(--ease-out); } .tcg-preview-box.slide-prev { animation: slidePrev .35s var(--ease-out); }
@keyframes slideNext { from { opacity: 0; transform: translateX(40px); } } @keyframes slidePrev { from { opacity: 0; transform: translateX(-40px); } }
.tcgp-market { border-color: rgba(242,220,160,.45) !important; color: var(--brass-2) !important; }
@media (max-width: 760px) { .tcg-nav { display: none; } .tcg-sell-actions { grid-template-columns: 1fr 1fr !important; } }

/* Chroniques : bibliothèque */
.chron-lib { display: grid; gap: var(--s3); }
.chron-ch { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: var(--s4); align-items: center; padding: 10px var(--s4) 10px 10px; border-radius: 20px; border: 1px solid var(--panel-bd); background: linear-gradient(180deg, var(--enamel-1), var(--enamel-2)); color: var(--ivory); text-align: left; cursor: pointer; transition: border-color .3s, transform .4s var(--ease); }
.chron-ch:hover:not(:disabled) { border-color: rgba(242,220,160,.4); transform: translateY(-2px); }
.cc-art { width: 84px; height: 84px; border-radius: 14px; background: url('assets/banner.webp') center 30%/cover no-repeat; }
.cc-body { display: grid; gap: 4px; min-width: 0; }
.cc-body b { font: 600 21px/1.15 var(--serif); }
.cc-body small { display: inline-flex; align-items: center; gap: 6px; color: var(--ivory-3); font-size: 13px; }
.cc-go { color: var(--brass-2); font-size: 20px; }
.chron-ch.is-sealed { cursor: default; }
.chron-ch.is-sealed .cc-art { filter: grayscale(.8) brightness(.45); }
.chron-ch.is-sealed .cc-body b { color: var(--ivory-3); }
.cc-seal { width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #a5413a, #5c1a18 70%); box-shadow: inset 0 -3px 6px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.4); }

/* Marché : filtres en pastilles */
.mk-filters2 { display: grid; gap: var(--s3); }
.mk-filters2 .mk-search input { height: 48px; }
.mk-refine { display: grid; gap: var(--s3); grid-template-columns: minmax(0, 1fr); margin-top: var(--s3); }
@media (min-width: 760px) { .mk-refine { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; } }
.mk-refine select, .mk-refine input { height: 44px; background-color: rgba(4,7,15,.45); }
.mk-refine .mk-toggle input { width: 40px !important; height: 22px !important; padding: 0; background-color: var(--line-2); flex: none; }
.mk-refine .mk-toggle input:checked { background-color: rgba(212,176,106,.45); }
.tcg-tear-hint { left: 0 !important; right: 0 !important; margin: 0 auto; width: max-content; max-width: calc(100% - 32px); transform: translateY(8px) !important; }
.tcg-tear-hint.is-on { transform: none !important; }
.tcg-tear-hint { white-space: normal; text-align: center; justify-content: center; }

/* =====================================================================
   v15 — Couche « jeu » : boutons fins, rail d'icônes, scène, densité, badges hexagonaux
   ===================================================================== */
/* ---------- Boutons fins et nets (remplacent les sceaux massifs) ---------- */
.seal-btn, .primary-btn, .secondary-btn, .ghost-btn {
  height: 42px !important; padding: 0 18px !important; border-radius: 10px !important; gap: 8px;
  font: 600 13px/1 var(--sans) !important; letter-spacing: .01em !important; text-transform: none !important;
  transform: none; transition: background .2s, border-color .2s, filter .2s, transform .12s !important;
}
.seal-btn, .primary-btn {
  color: #1d150a !important; border: 1px solid rgba(255,238,196,.75) !important;
  background: linear-gradient(180deg, #f2dba1, #d3ad60) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 6px 14px -8px rgba(212,176,106,.8) !important;
}
.seal-btn::after, .primary-btn::after { opacity: .6; }
.seal-btn:hover, .primary-btn:hover { filter: brightness(1.06); transform: none; }
.seal-btn:active, .primary-btn:active { transform: translateY(1px) !important; filter: brightness(.96); box-shadow: 0 1px 0 rgba(255,255,255,.4) inset !important; }
.secondary-btn { color: var(--ivory) !important; background: #18234a !important; border: 1px solid rgba(255,255,255,.1) !important; box-shadow: 0 1px 0 rgba(255,255,255,.05) inset !important; }
.secondary-btn:hover { background: #1f2d5c !important; border-color: rgba(212,176,106,.4) !important; color: var(--ivory) !important; }
.ghost-btn { color: var(--ivory-2) !important; background: rgba(255,255,255,.03) !important; border: 1px solid rgba(255,255,255,.1) !important; }
.ghost-btn:hover { color: var(--ivory) !important; border-color: rgba(255,255,255,.22) !important; }
.seal-btn.small, .primary-btn.small, .secondary-btn.small, .ghost-btn.small, .small { height: 34px !important; padding: 0 13px !important; border-radius: 9px !important; font-size: 12px !important; }
.btn-lg { height: 46px !important; padding: 0 22px !important; }
@media (max-width: 760px) { .seal-btn, .primary-btn, .secondary-btn, .ghost-btn { height: 44px !important; } }
.icon-btn { width: 40px; height: 40px; border-radius: 12px !important; background: #141f42 !important; border: 1px solid rgba(255,255,255,.08) !important; }
.icon-btn:hover { border-color: rgba(212,176,106,.45) !important; }
.link { letter-spacing: .02em !important; text-transform: none !important; font: 600 12.5px var(--sans) !important; color: var(--sky) !important; }
.link::after { display: none; }
.link:hover { color: #cfe3ff !important; }
.pill { height: 34px; padding: 0 13px; border-radius: 10px; font-size: 12px; }
.pill.is-on { box-shadow: none; }
.altar-actions .seal-btn { min-width: 200px; }

/* ---------- Panneaux denses, titres « jeu » ---------- */
:root { --panel-r: 16px; }
.panel, .ritual, .reserve, .tile, .product, .lot, .quote-box, .levels, .pc { border-radius: 16px !important; }
.panel, .ritual { padding: 18px !important; gap: 12px !important; }
.ritual h3, .panel h3, .panel-head h3, .reserve-body h2, .altar-title { font-family: var(--sans) !important; font-weight: 700 !important; letter-spacing: -.01em; }
.ritual h3, .panel h3, .panel-head h3 { font-size: 16px !important; }
.altar-title { font-size: 24px !important; }
.caps { font-size: 10.5px !important; }
.gain-chip { height: 24px; border-radius: 8px; font-size: 11.5px; }
.main { gap: var(--s5) !important; padding-top: var(--s5) !important; }
.display { font-size: clamp(28px, 3vw, 38px) !important; }

/* ---------- Rail d'icônes à gauche sur ordinateur, dock en bas sur téléphone ---------- */
@media (min-width: 1000px) {
  .dock { left: 16px; top: calc(76px + var(--safe-t) + 16px); bottom: 16px; transform: none; width: 84px; height: auto; grid-template-columns: 1fr; grid-auto-rows: min-content; align-content: start; align-items: stretch; gap: 8px; padding: 12px 10px; border-radius: 22px; }
  .dock-btn, .dock-seal { height: auto; padding: 8px 0 !important; border-radius: 14px; align-content: center; gap: 6px; }
  .dock-btn:hover { background: rgba(255,255,255,.04); }
  .dock-btn.is-on { background: rgba(242,220,160,.1); }
  .dock-btn.is-on::before { top: 12px; bottom: 12px; left: -10px; right: auto; width: 3px; height: auto; }
  .dock-seal { order: -1; margin-bottom: 8px; padding: 6px 0 10px !important; border-bottom: 1px solid rgba(255,255,255,.06); border-radius: 0; }
  .ds-core { position: static; transform: none; width: 56px; height: 56px; }
  .dock-seal:hover .ds-core { transform: scale(1.05) rotate(8deg); }
  .ds-count { top: 0; right: 4px; }
  .dock-dot { top: 4px; left: calc(50% + 10px); }
  .app { padding-left: 100px; }
  .main { padding-bottom: var(--s7) !important; }
  .hud { padding-left: 24px !important; padding-right: 24px !important; }
}

/* ---------- Accueil : une scène illustrée en plein cadre ---------- */
.altar { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid rgba(212,176,106,.22); background: #0a1228; box-shadow: var(--panel-sh); min-height: 380px; }
.altar::before { content: ''; position: absolute; inset: 0; background: url('assets/banner.webp') center 28%/cover no-repeat; opacity: .85; }
.altar::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,9,20,.2) 0%, rgba(5,9,20,.35) 45%, rgba(5,9,20,.88) 72%), linear-gradient(0deg, rgba(5,9,20,.75), transparent 40%); }
.altar > * { position: relative; z-index: 1; }
.altar-glow { opacity: .8; }
.altar-panel { margin: 20px; padding: 22px !important; border-radius: 16px !important; background: rgba(8,14,32,.78) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.1) !important; }
.altar-count .num { font-family: var(--sans) !important; font-weight: 800 !important; font-size: 52px !important; }
.altar-count span { font-family: var(--sans) !important; font-size: 18px !important; }
@media (max-width: 899px) {
  .altar { min-height: 0; }
  .altar::after { background: linear-gradient(0deg, rgba(5,9,20,.95) 30%, rgba(5,9,20,.2) 75%); }
  .altar-stage { min-height: 250px; }
  .altar-panel { margin: -40px 12px 12px; }
}

/* Chiffres des en-têtes et ressources en sans-serif de jeu */
.res b, .ph-lv, .gb-item b, .lot-price .v, .t-reward, .daily-amount .v, .pc-stats b { font-family: var(--sans) !important; font-weight: 800 !important; }

/* ---------- Trophées : badges hexagonaux colorés par palier ---------- */
.trophy .medal { width: 52px !important; height: 58px !important; border-radius: 0 !important; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: linear-gradient(160deg, #2a3866, #121c3e) !important; color: rgba(239,230,209,.4) !important; font-size: 20px; text-shadow: none !important; }
.trophy.is-done .medal, .trophy.is-claimed .medal { color: #fff !important; text-shadow: 0 1px 2px rgba(0,0,0,.35) !important; }
.trophy.is-sealed .medal { background: linear-gradient(160deg, #b0473f, #5c1a18) !important; color: rgba(255,225,215,.9) !important; }
.trophy { grid-template-columns: 52px minmax(0, 1fr) auto; }
.trophy .t-body b { font-family: var(--sans) !important; font-weight: 700 !important; font-size: 15px !important; }
@media (min-width: 1000px) { .hud { margin-left: -100px; padding-left: 124px !important; } }

/* =====================================================================
   v16 — Le monde : une scène par lieu, des personnages, du verre sombre
   ===================================================================== */
.scene { position: fixed; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; background: #060b18; }
.scene-img { position: absolute; inset: -3%; background-size: cover; background-position: center 35%; opacity: 0; transition: opacity 1.1s ease; animation: kenBurns 48s ease-in-out infinite alternate; }
.scene-img.is-on { opacity: 1; }
@keyframes kenBurns { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.09) translate(-1.5%, -1%); } }
.scene-shade { position: absolute; inset: 0; background:
  linear-gradient(180deg, rgba(4,8,20,.62) 0%, rgba(4,8,20,.18) 22%, rgba(4,8,20,.28) 48%, rgba(4,8,20,.82) 78%, rgba(4,8,20,.94) 100%),
  radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(2,4,10,.7) 100%); }
.backdrop { display: none; }
.app, #title { z-index: 2; }

/* Verre sombre sur la scène */
.panel, .ritual, .reserve, .tile, .product, .lot, .levels, .pc, .trophy, .registre, .quote-box, .mk-row, .chron-ch {
  background: rgba(7,12,28,.74) !important; backdrop-filter: blur(16px) saturate(1.15); -webkit-backdrop-filter: blur(16px) saturate(1.15);
  border: 1px solid rgba(255,255,255,.12) !important; box-shadow: 0 16px 40px rgba(0,0,0,.45) !important;
}
.mk-row { border-radius: 14px; padding-left: 12px; padding-right: 12px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12) !important; }
.hud::before { background: linear-gradient(180deg, rgba(4,8,18,.78), rgba(4,8,18,.5)) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.08) !important; }
.dock { background: rgba(6,10,24,.84) !important; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.12) !important; }
.display, h1 { text-shadow: 0 2px 16px rgba(0,0,0,.6); }
.open-head, .binder-head, .mk-head { text-shadow: 0 2px 14px rgba(0,0,0,.7); }

/* Personnages posés sur la scène */
.npc-img { display: block; height: 100%; width: auto; filter: drop-shadow(0 24px 40px rgba(0,0,0,.55)); animation: npcIdle 6s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes npcIdle { 50% { transform: translateY(-4px) scale(1.006); } }
.npc-bubble { position: absolute; z-index: 2; display: grid; gap: 6px; max-width: 300px; padding: 14px 16px; border-radius: 16px; background: rgba(8,14,32,.9); border: 1px solid rgba(242,220,160,.35); box-shadow: 0 14px 34px rgba(0,0,0,.5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: bubbleIn .6s var(--ease-out) .3s both; }
.npc-bubble::after { content: ''; position: absolute; right: 28px; bottom: -8px; width: 14px; height: 14px; transform: rotate(45deg); background: rgba(8,14,32,.9); border-right: 1px solid rgba(242,220,160,.35); border-bottom: 1px solid rgba(242,220,160,.35); }
.npc-bubble b { font: 700 12px var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brass-2); }
.npc-bubble p { font: italic 500 17px/1.4 var(--serif); color: var(--ivory); }
.npc-bubble .link { justify-self: start; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }

/* ---------- Comptoir : la salle d'accueil ---------- */
.lobby { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; }
.lobby-npc { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 420px; pointer-events: none; }
.lobby-npc .npc-bubble { pointer-events: auto; }
.lobby-offer { position: relative; z-index: 3; display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.lobby-pack { padding: 0; border: 0; background: none; cursor: pointer; filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); }
.lobby-pack img { display: block; width: 100%; animation: float 6s ease-in-out infinite; }
.lobby-pack.is-box { width: 150px; }
.lobby .altar-panel { margin: 0 !important; justify-items: start !important; text-align: left !important; background: rgba(7,12,28,.82) !important; border: 1px solid rgba(242,220,160,.3) !important; box-shadow: 0 18px 44px rgba(0,0,0,.55) !important; }
.lobby .altar-actions { justify-content: flex-start !important; }
.lobby .altar-actions .seal-btn { width: auto !important; }
@media (max-width: 899px) {
  .lobby-npc { justify-content: flex-end; height: 400px; margin: 0 calc(-1 * var(--gutter)); padding-right: 4px; }
  .lobby-npc .npc-bubble { left: var(--gutter); top: 30px; max-width: 58%; }
  .lobby-offer { margin-top: -110px; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .lobby .altar-panel { padding: 16px !important; }
  .lobby .altar-count .num { font-size: 42px !important; }
}
@media (min-width: 900px) {
  .lobby { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "offer npc"; min-height: 560px; gap: 24px; }
  .lobby-npc { grid-area: npc; height: 580px; }
  .lobby-npc .npc-bubble { right: 70%; top: 70px; width: 280px; }
  .lobby-npc .npc-bubble::after { right: -8px; bottom: 30px; transform: rotate(-45deg); }
  .lobby-offer { grid-area: offer; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-self: center; }
  .lobby-pack.is-box { width: 240px; }
}

/* ---------- Ouvrir : le comptoir de Talyne ---------- */
.shop-stage { display: grid; grid-template-columns: minmax(0, 1fr); align-items: end; }
.shop-npc { height: 340px; justify-content: flex-start; }
.shop-npc .npc-bubble { right: var(--gutter); top: 20px; max-width: 60%; }
.shop-npc .npc-bubble::after { right: auto; left: 34px; }
.shop-col { display: grid; gap: var(--s4); position: relative; z-index: 2; margin-top: -60px; }
@media (min-width: 900px) {
  .shop-stage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; }
  .shop-npc { height: 480px; justify-content: center; }
  .shop-npc .npc-bubble { right: auto; left: 55%; top: 40px; width: 300px; max-width: none; }
  .shop-col { margin-top: 0; align-self: center; }
}

/* Série II : bientôt disponible */
.s2-teaser { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: center; padding: 22px; border-radius: 18px; background: radial-gradient(90% 120% at 20% 50%, rgba(46,140,96,.25), transparent 60%), rgba(7,12,28,.78); border: 1px solid rgba(120,210,160,.3); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0,0,0,.45); }
.s2-art { position: relative; height: 230px; }
.s2-display { position: absolute; left: 0; bottom: 6px; width: min(78%, 340px); filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)) saturate(.9); }
.s2-booster { position: absolute; right: 8%; bottom: 0; height: 92%; transform: rotate(6deg); filter: drop-shadow(0 18px 24px rgba(0,0,0,.6)); animation: float 6s ease-in-out infinite; }
.s2-body { display: grid; gap: 8px; justify-items: start; }
.s2-body h2 { font: 700 24px var(--sans) !important; }
.s2-body .muted { font-size: 13.5px; max-width: 44ch; }
.s2-ribbon { position: absolute; z-index: 3; top: 30px; right: -60px; width: 250px; padding: 8px 0; transform: rotate(45deg); text-align: center; background: linear-gradient(180deg, #7fe0a9, #2f9a63); color: #06210f; font: 700 10px var(--sans); letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 6px 18px rgba(0,0,0,.4); }
@media (min-width: 900px) { .s2-teaser { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); padding: 26px 32px; } .s2-art { height: 280px; } }

/* ---------- Trophées : Nalya dans la salle d'entraînement ---------- */
.trophy-hero { position: relative; display: grid; align-items: center; min-height: 300px; padding: 24px; }
.trophy-hero .nalya { position: absolute; right: -10px; bottom: -24px; height: 360px; filter: drop-shadow(0 20px 36px rgba(0,0,0,.55)); animation: npcIdle 6s ease-in-out infinite; pointer-events: none; }
.th-copy { position: relative; z-index: 1; display: grid; gap: 8px; max-width: 56%; }
.th-copy .lede { font-size: 17px; color: var(--ivory); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.trophy-head { margin-top: -30px; position: relative; z-index: 2; }
@media (min-width: 900px) { .trophy-hero { min-height: 380px; } .trophy-hero .nalya { height: 460px; right: 4%; } .th-copy { max-width: 50%; } }
@media (max-width: 520px) { .trophy-hero { min-height: 270px; padding: 16px 0; } .trophy-hero .nalya { height: 300px; right: -30px; } .th-copy { max-width: 62%; } }

/* ---------- Tutoriel : Talyne en pied à côté de sa bulle ---------- */
.coach-bubble { overflow: visible !important; }
.cb-npc { position: absolute; pointer-events: none; height: 250px; right: calc(100% - 30px); bottom: -10px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.6)); animation: npcIdle 6s ease-in-out infinite; }
.cb-head img { display: none; }
@media (max-width: 999px) { .cb-npc { height: 150px; right: auto; left: 8px; bottom: calc(100% - 14px); } .coach.bubble-top .cb-npc { bottom: auto; top: calc(100% - 14px); height: 120px; } }
/* Ouvrir : la bulle n'hérite pas du placement de la salle d'accueil */
.shop-npc { grid-area: auto !important; }
@media (min-width: 900px) { .shop-npc .npc-bubble { right: auto !important; left: 52% !important; width: 280px !important; } .shop-npc .npc-bubble::after { right: auto; left: 34px; bottom: -8px; transform: rotate(45deg); } }
/* Personnages : le visage n'est jamais masqué par la bulle */
@media (max-width: 899px) {
  .lobby-npc { justify-content: flex-end !important; padding-right: 0 !important; }
  .lobby-npc .npc-img { margin-right: -36px; }
  .lobby-npc .npc-bubble { left: var(--gutter) !important; right: auto !important; top: 22px !important; max-width: 48% !important; }
  .lobby-npc .npc-bubble::after { right: -7px; left: auto; bottom: 26px; transform: rotate(-45deg); }
  .shop-npc { height: 330px !important; }
  .shop-col { margin-top: -50px; }
}
@media (min-width: 900px) {
  .shop-npc { height: 440px !important; }
  .shop-npc .npc-bubble { left: 64% !important; top: 24px !important; width: 260px !important; }
  .shop-npc .npc-bubble::after { left: -7px !important; right: auto !important; bottom: auto !important; top: 30px; transform: rotate(135deg) !important; }
}
/* Trophées : introduction et score sur verre sombre */
.th-copy { padding: 18px 20px; border-radius: 16px; background: rgba(7,12,28,.7); border: 1px solid rgba(255,255,255,.1); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.trophy-head { padding: 14px 18px; border-radius: 16px; background: rgba(7,12,28,.74); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); margin-top: -20px; }
.trophy-head > div:first-child:empty { display: none; }
.trophy-head { grid-template-columns: 1fr !important; }
.trophy-score { justify-content: space-between; }
/* Tutoriel : Talyne est déjà en pied dans la scène ; la bulle garde son portrait */
.cb-npc { display: none !important; }
.cb-head img { display: block !important; }

/* =====================================================================
   v17 — Lisibilité d'abord : scènes en bannière, personnages cadrés, rubans centrés
   ===================================================================== */
/* Les scènes deviennent une bannière en haut de chaque lieu */
.backdrop { display: block !important; }
.scene { position: absolute !important; top: 0; left: 0; right: 0; bottom: auto !important; height: 440px; background: transparent !important; opacity: .34; -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.scene-img { inset: 0 !important; animation: none !important; background-position: center 40% !important; }
.scene-shade { background: linear-gradient(180deg, rgba(4,8,20,.45), rgba(4,8,20,.75)) !important; }
@media (max-width: 760px) { .scene { height: 300px; opacity: .3; } }

/* Panneaux pleins et lisibles */
.panel, .ritual, .reserve, .tile, .product, .lot, .levels, .pc, .trophy, .registre, .quote-box, .mk-row, .chron-ch, .s2-teaser {
  background: linear-gradient(180deg, var(--enamel-1), var(--enamel-2)) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(255,255,255,.08) !important; box-shadow: 0 14px 34px rgba(0,0,0,.4) !important;
}
.s2-teaser { background: radial-gradient(70% 120% at 15% 50%, rgba(46,140,96,.18), transparent 60%), linear-gradient(180deg, var(--enamel-1), var(--enamel-2)) !important; border-color: rgba(120,210,160,.22) !important; }
.hud::before { background: rgba(5,9,20,.94) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.dock { background: linear-gradient(180deg, #14224a, #080e20) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.display, h1, .open-head, .binder-head, .mk-head { text-shadow: none !important; }

/* ---------- Carte cadrée avec personnage ---------- */
.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 320px; border-radius: 20px; border: 1px solid rgba(212,176,106,.25); background: linear-gradient(180deg, #111d3c, #0a1229); box-shadow: 0 18px 44px rgba(0,0,0,.45); }
.hero-card::before { content: ''; position: absolute; inset: 0; background: var(--hc-bg) center 35%/cover no-repeat; opacity: .5; -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 80%); mask-image: linear-gradient(90deg, transparent 38%, #000 80%); }
.lobby-card { --hc-bg: url('assets/scenes/comptoir.webp'); }
.trophy-card { --hc-bg: url('assets/scenes/trophees.webp'); }
.hc-main { position: relative; z-index: 1; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; align-items: center; padding: 30px 32px; margin: 0 !important; }
.trophy-card .hc-main { grid-template-columns: minmax(0, 1fr); }
.hc-info { display: grid; gap: 10px; justify-items: start; }
.hc-info .altar-count .num { font-size: 52px !important; }
.hc-info .altar-sub { font-size: 14px; }
.hc-info .lede { font-size: 17px; color: var(--ivory-2); max-width: 40ch; }
.hc-main .lobby-pack { width: 100%; }
.hc-main .lobby-pack.is-box { width: 100%; }
.hc-npc { position: relative; z-index: 1; margin: 0; min-height: 330px; overflow: hidden; }
.hc-npc img { position: absolute; left: 50%; top: 18px; height: 150%; transform: translateX(-50%); filter: drop-shadow(0 16px 28px rgba(0,0,0,.5)); }
.hc-npc figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; display: grid; gap: 4px; padding: 10px 14px; border-radius: 12px; background: rgba(6,10,24,.92); border: 1px solid rgba(242,220,160,.28); }
.hc-npc figcaption b { font: 700 10.5px var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-2); }
.hc-npc figcaption span { font: italic 500 15px/1.4 var(--serif); color: var(--ivory); }
@media (max-width: 760px) {
  .hero-card { grid-template-columns: minmax(0, 1fr); }
  .hero-card::before { -webkit-mask-image: linear-gradient(180deg, #000 10%, transparent 48%); mask-image: linear-gradient(180deg, #000 10%, transparent 48%); }
  .hc-npc { order: -1; min-height: 250px; }
  .hc-npc img { height: 230%; top: 10px; }
  .hc-main { grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 18px; }
  .hc-info .altar-count .num { font-size: 42px !important; }
  .trophy-card .hc-npc { min-height: 200px; }
}
.trophy-head { margin-top: 0 !important; background: none !important; border: 0 !important; padding: 0 !important; backdrop-filter: none !important; }

/* ---------- Rubans d'angle, texte centré ---------- */
.product, .s2-teaser { position: relative; overflow: hidden; }
.ribbon-wrap { position: absolute; z-index: 3; top: 0; right: 0; width: 150px; height: 150px; overflow: hidden; pointer-events: none; }
.ribbon { position: absolute; top: 38px; right: -42px; width: 200px; padding: 7px 0; transform: rotate(45deg); text-align: center; white-space: nowrap; font: 700 9.5px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #20170a; background: linear-gradient(180deg, #f2dca2, #cba559); box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.ribbon-wrap.is-green .ribbon { color: #06210f; background: linear-gradient(180deg, #8fe6b5, #39a46c); }
.ribbon-d, .s2-ribbon { display: none !important; }

/* Série II : présentée droite, sans rotation */
.s2-booster { transform: none !important; right: 6% !important; height: 96% !important; animation: none !important; }
.s2-display { saturate: 1; }

/* Les anciennes compositions flottantes ne sont plus utilisées */
.lobby, .lobby-npc, .shop-stage, .trophy-hero { display: none !important; }
/* Carte cadrée : neutraliser les anciennes règles de la salle d'accueil */
.hero-card .lobby-offer { grid-area: auto !important; grid-column: 1 !important; grid-row: 1 !important; grid-template-columns: 170px minmax(0, 1fr) !important; margin: 0 !important; align-self: stretch; z-index: 1; }
.hero-card .hc-npc { grid-column: 2; grid-row: 1; }
@media (max-width: 760px) {
  .hero-card .lobby-offer { grid-row: 2 !important; grid-template-columns: 92px minmax(0, 1fr) !important; }
  .hero-card .hc-npc { grid-column: 1; grid-row: 1; }
  .trophy-card .hc-main { grid-row: 2 !important; }
}
.trophy-card .hc-main { grid-column: 1; grid-row: 1; }

/* =====================================================================
   v18 — Allègement : accueil essentiel, dock fin
   ===================================================================== */
/* Aujourd'hui : des lignes fines */
.today { display: grid; gap: 8px; }
.today-title { margin-bottom: 2px; }
.today-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); }
.today-row.is-ready { border-color: rgba(242,220,160,.28); background: rgba(242,220,160,.05); }
.tr-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #141f42; color: var(--brass-2); font-size: 16px; }
.tr-txt { display: grid; gap: 2px; min-width: 0; }
.tr-txt b { font: 600 14.5px var(--sans); color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-txt small { font-size: 12.5px; color: var(--ivory-3); }
@media (min-width: 900px) { .today { grid-template-columns: repeat(2, minmax(0, 1fr)); } .today-title { grid-column: 1 / -1; } }

/* Découvertes : un simple carrousel */
.discover-lite { display: grid; gap: 10px; }
.dl-head { display: flex; align-items: baseline; justify-content: space-between; }
.discover-lite .carousel { grid-auto-columns: 96px; }
@media (min-width: 900px) { .discover-lite .carousel { grid-auto-columns: 120px; } }

/* Carte d'accueil plus compacte sur téléphone */
@media (max-width: 760px) { .hero-card .hc-npc { min-height: 200px; } .hero-card .hc-npc img { height: 260%; } .hc-npc figcaption { padding: 8px 12px; } .hc-npc figcaption span { font-size: 14px; } }

/* ---------- Dock fin ---------- */
@media (max-width: 999px) {
  .dock { height: 58px; bottom: calc(10px + var(--safe-b)); width: min(440px, calc(100% - 24px)); padding: 0 4px 6px; border-radius: 20px; background: rgba(8,13,28,.96) !important; border: 1px solid rgba(255,255,255,.07) !important; box-shadow: 0 12px 30px rgba(0,0,0,.5) !important; }
  .dock-btn, .dock-seal { height: 46px; gap: 3px; }
  .dock-btn svg { width: 20px; height: 20px; stroke-width: 1.4; }
  .dock-btn small, .dock-seal small { font: 500 9.5px var(--sans); letter-spacing: .02em; text-transform: none; }
  .dock-btn.is-on::before { top: -7px; left: 38%; right: 38%; height: 2px; box-shadow: none; }
  .dock-btn.is-on svg { filter: none; transform: none; }
  .ds-core { width: 52px; height: 52px; top: -30px; border-width: 1.5px; box-shadow: 0 0 0 4px rgba(8,13,28,.96), 0 6px 16px rgba(0,0,0,.5) !important; }
  .ds-core svg { width: 24px; height: 24px; }
  .dock-seal.is-ready .ds-core { animation: none; border-color: var(--brass-2); }
  .ds-count { top: -34px; right: calc(50% - 34px); min-width: 18px; height: 18px; font-size: 10px; line-height: 18px; padding: 0 5px; }
  .dock-dot { min-width: 14px; height: 14px; font-size: 8.5px; line-height: 14px; }
  .main { padding-bottom: calc(100px + var(--safe-b)) !important; }
  /* En-tête plus mince */
  .hud { height: calc(58px + var(--safe-t)) !important; }
  .ph-avatar { width: 40px !important; height: 40px !important; }
  .res { height: 34px !important; padding: 0 10px !important; }
  .res b { font-size: 13.5px !important; }
  .res-velys .purse { font-size: 16px !important; }
  .ph-res .icon-btn { width: 34px !important; height: 34px !important; border-radius: 10px !important; }
}
/* Ouvrir sur téléphone : produits en cartes horizontales compactes */
@media (max-width: 760px) {
  .products { gap: 12px; }
  .product { display: grid !important; grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: auto; align-items: center; }
  .product-art { height: auto !important; padding: 14px 0 14px 14px; background: none !important; }
  .product-art img, .product-art img[src*="display"] { height: auto !important; width: 100% !important; max-width: 100% !important; }
  .product-body { border-top: 0 !important; padding: 14px !important; gap: 4px 10px !important; }
  .product-body h2 { font: 700 18px var(--sans) !important; }
  .product-body .price { font-size: 20px !important; }
  .product-body .desc { font-size: 12px; }
  .product-body form { margin-top: 6px; }
  .product-body form .seal-btn, .product-body form .primary-btn { height: 38px !important; font-size: 12.5px !important; }
  .reserve { padding: 14px !important; }
}
@media (max-width: 760px) {
  .product .ribbon-wrap { display: none; }
  .product:has(.ribbon-wrap) .desc::after { content: ' · un booster offert'; color: var(--brass-2); font-weight: 600; }
}

/* =====================================================================
   v19 — Sobriété : moins de cadres, bannières atténuées, filtres du classeur
   ===================================================================== */
/* Illustrations d'arrière-plan atténuées */
.scene { opacity: .16 !important; height: 380px; }
@media (max-width: 760px) { .scene { opacity: .14 !important; height: 260px; } }
.hero-card::before { opacity: .32; }

/* Moins de cadres : l'espacement sépare, les panneaux sont réservés à l'essentiel */
.panel, .levels, .registre, .tile, .mk-row, .chron-ch {
  background: rgba(255,255,255,.025) !important; border: 1px solid transparent !important; box-shadow: none !important;
}
.trophy { background: rgba(255,255,255,.03) !important; border: 1px solid transparent !important; box-shadow: none !important; padding: 12px 16px !important; }
.trophy.is-done { border-color: rgba(242,220,160,.35) !important; background: rgba(242,220,160,.05) !important; box-shadow: none !important; }
.trophy.is-near { border-color: transparent !important; }
.today-row { background: rgba(255,255,255,.03); border-color: transparent; padding: 10px 12px; }
.today-row.is-ready { border-color: rgba(242,220,160,.28); }
.mk-row { margin-bottom: 4px; }
.quote-box, .gazette, .home-duo, .rituals { display: none !important; }
.main { gap: 28px !important; }

/* Titres de page compacts */
.display { font-size: clamp(24px, 2.4vw, 30px) !important; }
.mk-head .lede, .open-head .caps { display: none; }
.mk-head { gap: 14px; }
.trophy-card .lede { font-size: 15px; }
.hc-main { padding: 22px 26px !important; }
.hc-npc { min-height: 270px; }
@media (max-width: 760px) {
  .trophy-card .lede { display: none; }
  .trophy-card .hc-npc { min-height: 150px !important; }
  .trophy-card .hc-npc img { height: 300% !important; }
  .hero-card .hc-npc { min-height: 180px; }
}

/* L'en-tête ne répète pas la réserve là où elle est déjà affichée */
body[data-screen="home"] .res-boosters, body[data-screen="shop"] .res-boosters { display: none !important; }

/* Sceau « Ouvrir » plus petit */
@media (max-width: 999px) {
  .ds-core { width: 44px !important; height: 44px !important; top: -22px !important; }
  .ds-core svg { width: 20px; height: 20px; }
  .ds-count { top: -27px !important; right: calc(50% - 30px) !important; }
}
@media (min-width: 1000px) { .ds-core { width: 46px !important; height: 46px !important; } .ds-core svg { width: 22px; height: 22px; } }

/* ---------- Classeur : en-tête compact et filtres ---------- */
.binder-head, .pills[aria-label="Rareté"] { display: none !important; }
.binder-head2 { display: grid; gap: 10px; }
.bh-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.bh-top h2 { font: 700 20px var(--sans) !important; margin-top: 4px; }
.bh-pct { display: grid; justify-items: end; gap: 2px; }
.bh-pct b { font: 800 22px var(--sans) !important; color: var(--ivory); }
.bh-pct b small { font-size: 13px; color: var(--ivory-3); }
.bh-pct > small { font-size: 12px; color: var(--ivory-3); white-space: nowrap; }
.binder-tools { display: grid; gap: 12px; }
.seg-owned { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.04); }
.seg-owned button { min-height: 38px; padding: 0 4px; border: 0; border-radius: 9px; background: none; color: var(--ivory-3); font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .2s, color .2s; }
.seg-owned button:hover { color: var(--ivory); }
.seg-owned button.is-on { background: #1c2a56; color: var(--brass-2); }
@media (max-width: 420px) { .seg-owned button { font-size: 11px; } }
.refine2 { border-radius: 12px; background: rgba(255,255,255,.03); }
.refine2 summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px 0 14px; cursor: pointer; }
.refine2 summary::-webkit-details-marker { display: none; }
.rf-title { font: 600 13.5px var(--sans); color: var(--ivory); }
.rf-hint { flex: 1; min-width: 0; font-size: 12.5px; color: var(--ivory-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-active { flex: 1; min-width: 0; font: 600 12.5px var(--sans); color: var(--brass-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rf-count { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--brass-2); color: #20170a; font: 700 11px var(--sans); font-style: normal; }
.refine2 .chev { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; transition: transform .3s var(--ease); }
.refine2 .chev svg { width: 11px; height: 11px; fill: none; stroke: var(--gold); stroke-width: 1.6; }
.refine2[open] .chev { transform: rotate(180deg); }
.rf-body { display: grid; gap: 16px; padding: 4px 14px 16px; }
.rf-sec { display: grid; gap: 8px; }
.rf-rar { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-opt { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 11px; border-radius: 9px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: var(--ivory-2); font: 600 12px var(--sans); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.rf-opt:hover { color: var(--ivory); border-color: rgba(255,255,255,.18); }
.rf-opt.is-on { border-color: var(--brass-2); color: var(--ivory); background: rgba(242,220,160,.08); }
.rf-sym { font-size: 13px; line-height: 1; }
.rf-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 480px) { .rf-two { grid-template-columns: minmax(0, 1fr); } }
.rf-two select { height: 42px; }
.rf-reset { justify-self: start; }
.rf-count-line { margin-top: 2px; }
/* Onglets de possession : largeur naturelle, aucun libellé tronqué */
.seg-owned { display: flex !important; }
.seg-owned button { flex: 1 1 auto; padding: 0 6px; overflow: visible; text-overflow: clip; }
@media (max-width: 420px) { .seg-owned button { font-size: 11.5px; padding: 0 4px; } }
.binder-tools, .binder-tools > * { min-width: 0; }
.seg-owned { flex-wrap: wrap; }
.seg-owned button { min-width: 0; }
@media (max-width: 380px) { .seg-owned button { font-size: 10.5px; padding: 0 3px; letter-spacing: -.01em; } .seg-owned { gap: 2px; padding: 3px; } }
@media (min-width: 900px) { .seg-owned { max-width: 620px; } }

/* =====================================================================
   v21 — Barres de défilement masquées, personnages en relief, fenêtres de récompense, filtres du marché
   ===================================================================== */
/* Barres de défilement masquées (le défilement reste possible) */
html, body, * { scrollbar-width: none; }
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }

/* Personnages : ils sortent du cadre par le haut, le visage toujours visible */
.hero-card { overflow: visible !important; margin-top: 34px; }
.hero-card::before { border-radius: inherit; }
.hc-npc { overflow: visible !important; clip-path: inset(-90px 0 0 0); min-height: 270px; }
.hc-npc img, .trophy-card .hc-npc img { top: -54px !important; height: 560px !important; }
.hc-npc figcaption { bottom: 14px; }
@media (max-width: 760px) {
  .hero-card { margin-top: 44px; }
  .hc-npc, .trophy-card .hc-npc { min-height: 196px !important; clip-path: inset(-80px 0 0 0); }
  .hc-npc img, .trophy-card .hc-npc img { top: -60px !important; height: 500px !important; }
  .hc-npc figcaption { left: 12px; right: 12px; bottom: 10px; }
}

/* ---------- Fenêtres de récompense ---------- */
.sheet.reward { width: min(440px, 100%); text-align: center; background: radial-gradient(120% 70% at 50% 0%, rgba(242,220,160,.16), transparent 62%), linear-gradient(180deg, #121f42, #070c1c) !important; border: 1px solid rgba(242,220,160,.25) !important; }
.reward .sheet-head { justify-content: center; position: relative; padding: 26px 56px 4px !important; }
.reward .sheet-head h2 { font: 700 19px var(--sans) !important; letter-spacing: .01em; }
.reward .sheet-head .close-btn { position: absolute; right: 14px; top: 16px; padding: 0; }
.reward .sheet-head .close-btn span { display: none; }
.reward .sheet-body { justify-items: center; gap: 14px !important; padding: 10px 26px 26px !important; }
.reward .talyne-says { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 12px; }
.reward .talyne-says img { width: 86px; height: 86px; border: 2px solid var(--brass-2); box-shadow: 0 0 0 6px rgba(242,220,160,.1), 0 12px 28px rgba(0,0,0,.5); }
.reward .talyne-says p { max-width: 32ch; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.04); font: italic 500 16.5px/1.45 var(--serif) !important; }
.reward .big-amount { padding: 4px 0 0 !important; font: 800 46px/1 var(--sans) !important; background: linear-gradient(180deg, #fff3cf, #d6ae5e); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.reward .big-amount .v, .reward .big-amount i { color: transparent !important; }
.reward .lead { display: inline-block; padding: 5px 14px; border-radius: 999px; background: rgba(255,255,255,.05); font-size: 13px !important; color: var(--ivory-2); }
.reward .sheet-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.reward .sheet-actions:has(> :only-child) { grid-template-columns: 1fr; }
.reward .sheet-actions button { width: 100%; }
.reward .dismiss { display: none !important; }

/* ---------- Marché : filtres comme le classeur ---------- */
.mk-filters3 { display: grid; gap: 10px; }
.mk-filters3 .mk-search input { height: 46px; }
.mk-filters3 .seg-owned { max-width: 520px; }
.mk-filters3 .mk-price input { height: 42px; }
.mk-filters3 .mk-toggle { padding: 0; border: 0; font-size: 13px; }
.mk-filters3 .mk-toggle input { width: 40px !important; height: 22px !important; padding: 0; background-color: var(--line-2); flex: none; }
.mk-filters3 .mk-toggle input:checked { background-color: rgba(212,176,106,.45); }
.mk-filters2 { display: none !important; }

/* =====================================================================
   v22 — Portraits, réserve compacte, avatars, iconographie des trophées, Carnet du collectionneur
   ===================================================================== */
/* Portraits : proportions d'origine, la colonne recadre */
.hc-npc img { max-width: none !important; width: auto !important; }

/* Ouvrir : réserve de boosters offerts compacte */
.reserve { grid-template-columns: 84px minmax(0, 1fr) !important; gap: 18px !important; padding: 14px 20px !important; align-items: center; }
.reserve-art img { animation: none; }
.reserve-body { gap: 4px !important; }
.reserve-body h2 { font-size: 22px !important; }
.reserve .altar-count .num { font-size: 40px !important; }
.reserve .altar-count span { font-size: 15px !important; }
.reserve .gems i { width: 10px; height: 10px; }
.reserve .altar-sub { font-size: 13px; }
.reserve .altar-actions { margin-top: 6px; }
@media (max-width: 560px) { .reserve { grid-template-columns: 70px minmax(0, 1fr) !important; gap: 14px !important; padding: 14px 16px !important; } .reserve .altar-count .num { font-size: 36px !important; } }

/* Avatars : portraits entiers */
.ph-pic img.av-img, .avatar img.av-img { transform: none !important; object-position: center !important; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; max-height: 340px; overflow-y: auto; padding: 2px; }
.av-pick { position: relative; padding: 0; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 2px solid transparent; background: #0c1530; cursor: pointer; transition: border-color .2s, transform .2s; }
.av-pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av-pick:hover { transform: scale(1.04); }
.av-pick.is-on { border-color: var(--brass-2); box-shadow: 0 0 0 3px rgba(242,220,160,.18); }
.av-pick i { position: absolute; right: 2px; bottom: 2px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--brass-2); color: #20170a; font: 700 11px var(--sans); font-style: normal; }

/* Iconographie des trophées : une seule famille */
.trophy .medal { font-size: 0 !important; }
.trophy.is-locked .medal { color: rgba(239,230,209,.5) !important; }
.trophy.is-done .medal, .trophy.is-claimed .medal { color: #fff !important; }
.trophy.is-sealed .medal { color: rgba(255,225,215,.92) !important; }
.medals .medal { display: grid; place-items: center; color: var(--brass-2); }
.medals .m.is-empty .medal { color: rgba(239,230,209,.3); }

/* Séparateurs de section, sobres */
.sec-head { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 10.5px var(--sans) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ivory-3); }
.sec-head::before { content: ''; flex: none; width: 5px; height: 5px; transform: rotate(45deg); background: var(--gold); opacity: .8; }
.sec-head::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(212,176,106,.35), transparent); }
.dl-head { align-items: center; gap: 12px; }
.dl-head .sec-head { flex: 1; }

/* Carnet du collectionneur */
.carnet { display: grid; gap: 10px; }
.cn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cn-cell { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "ic num" "ic lbl" "sub sub"; gap: 2px 12px; align-items: center; padding: 14px 16px; border: 1px solid rgba(255,255,255,.06); border-radius: 14px; background: rgba(255,255,255,.03); color: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; min-width: 0; }
.cn-cell:hover { border-color: rgba(242,220,160,.3); background: rgba(242,220,160,.04); }
.cn-ic { grid-area: ic; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #141f42; color: var(--brass-2); }
.cn-num { grid-area: num; font: 800 21px/1 var(--sans); color: var(--ivory); font-variant-numeric: tabular-nums; }
.cn-num small { font-size: 13px; font-weight: 600; color: var(--ivory-3); }
.cn-lbl { grid-area: lbl; font: 600 12px var(--sans); color: var(--ivory-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cn-sub { grid-area: sub; margin-top: 6px; font-size: 11.5px; color: var(--ivory-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
  .cn-grid { gap: 6px; }
  .cn-cell { grid-template-columns: minmax(0, 1fr); grid-template-areas: "ic" "num" "lbl" "sub"; padding: 12px 10px; justify-items: start; gap: 4px; }
  .cn-ic { width: 32px; height: 32px; border-radius: 9px; margin-bottom: 4px; }
  .cn-num { font-size: 18px; }
  .cn-lbl { font-size: 11px; white-space: normal; line-height: 1.25; }
  .cn-sub { margin-top: 0; font-size: 10.5px; max-width: 100%; }
}

/* Classeur : compteurs explicites */
.bh-pct > small { line-height: 1.35; }
.rf-count-line { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; margin: 2px 0 0; font-size: 12px; color: var(--ivory-3); }
.rf-count-line b { font: 600 12.5px var(--sans); color: var(--ivory); }
/* Grille d'avatars : hauteur des cases robuste dans une zone défilante */
.av-grid { grid-auto-rows: max-content; align-items: start; }
.av-pick { aspect-ratio: auto !important; height: 0; padding: 0 0 100% 0 !important; }
.av-pick img { position: absolute; inset: 0; }
/* Réserve : sur grand écran, l'action à droite des informations */
@media (min-width: 761px) {
  .reserve-body { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; justify-items: start; }
  .reserve-body > * { grid-column: 1; }
  .reserve-body .altar-actions { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0 !important; }
  .reserve { grid-template-columns: 72px minmax(0, 1fr) !important; padding: 12px 22px !important; }
}
@media (max-width: 760px) { .reserve .altar-count .num { font-size: 32px !important; } .reserve-body { gap: 2px !important; } .reserve .altar-actions { margin-top: 8px; } }

/* =====================================================================
   v23 — Carte en plein écran avec gyroscope (téléphone uniquement)
   ===================================================================== */
.tcgp-cardwrap { position: relative; flex: none; }
.tcgp-full, .tcgp-fullbar { display: none; }
@media (max-width: 760px) {
  .tcgp-full { display: grid; place-items: center; position: absolute; z-index: 3; top: 8px; right: 8px; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid rgba(242,220,160,.5); background: rgba(6,10,24,.78); color: var(--brass-2); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: pointer; }
  .tcgp-full svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tcgp-full:active { transform: scale(.94); }
  #tcgPreview.is-full .tcg-preview-bg { background: #02040a !important; }
  #tcgPreview.is-full .tcg-preview-info, #tcgPreview.is-full .tcg-nav, #tcgPreview.is-full .tcgp-full, #tcgPreview.is-full .tcg-preview-x { display: none !important; }
  #tcgPreview.is-full .tcg-preview-box { justify-content: center; gap: 18px !important; }
  #tcgPreview.is-full .tcg-preview-card { width: min(92vw, calc((100dvh - 170px) * 2 / 3)) !important; max-width: none !important; transition: width .35s var(--ease-out); }
  #tcgPreview.is-full .tcgp-fullbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: min(92vw, 420px); }
  .tcgp-hint { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 12px; color: var(--ivory-3); min-height: 16px; }
}
@media (max-width: 760px) { .tcgp-full { top: -12px; right: -12px; width: 34px; height: 34px; box-shadow: 0 4px 12px rgba(0,0,0,.5); } }

/* =====================================================================
   v24 — Trophées par rareté, icônes du Comptoir, nouveau calendrier, sceau « Ouvrir »
   ===================================================================== */
/* Sceau « Ouvrir » un peu plus proche de son libellé (téléphone) */
@media (max-width: 999px) { .ds-core { top: -16px !important; } .ds-count { top: -21px !important; } }

/* Badges de trophées : symbole et couleur de rareté selon la difficulté */
.medal { --rc: var(--r0); }
.medal.tr-r0 { --rc: var(--r0); } .medal.tr-r1 { --rc: var(--r1); } .medal.tr-r2 { --rc: var(--r2); } .medal.tr-r3 { --rc: var(--r3); }
.medal.tr-r4 { --rc: var(--r4); } .medal.tr-r5 { --rc: var(--r5); } .medal.tr-r6 { --rc: var(--r6); }
.medal-sym { display: block; font: 400 24px/1 var(--sans); color: var(--rc); }
.trophy .medal { display: grid !important; place-items: center; background: linear-gradient(160deg, #1f2c56, #0f1834) !important; }
.trophy.is-locked .medal .medal-sym { opacity: .55; }
.trophy.is-done .medal, .trophy.is-claimed .medal { background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 45%, #1a2550), #0d1530 78%) !important; }
.trophy.is-done .medal .medal-sym, .trophy.is-claimed .medal .medal-sym { color: #fff; text-shadow: 0 0 12px var(--rc); }
.trophy.is-sealed .medal { background: linear-gradient(160deg, #b0473f, #5c1a18) !important; }
.trophy.is-sealed .medal .medal-sym { color: rgba(255,225,215,.92); opacity: 1; font-weight: 700; font-size: 20px; }
.medals .medal { width: 60px !important; height: 66px !important; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--rc) 40%, #1a2550), #0d1530 78%); display: grid; place-items: center; }
.medals .medal .medal-sym { color: #fff; text-shadow: 0 0 12px var(--rc); font-size: 26px; }
.medals .m.is-empty .medal { background: linear-gradient(160deg, #1f2c56, #0f1834); }
.medals .m.is-empty .medal .medal-sym { color: rgba(239,230,209,.25); text-shadow: none; }

/* Icônes du Comptoir (SVG fournis) */
.hi { display: block; width: 20px; height: 20px; flex: none; }
.cn-ic .hi { width: 20px; height: 20px; }
.sec-head.with-ic::before { display: none; }
.sec-head.with-ic .hi { width: 15px; height: 15px; color: var(--gold); }

/* ---------- Calendrier ---------- */
.sheet.cal2-sheet { width: min(560px, 100%); }
.c2 { display: grid; gap: 18px; }
.c2-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 14px; align-items: stretch; }
.c2-day { display: grid; align-content: center; gap: 2px; }
.c2-day b { font: 800 40px/1 var(--sans); color: var(--ivory); }
.c2-day small { font-size: 13px; color: var(--ivory-3); }
.c2-today { display: grid; justify-items: start; align-content: center; gap: 6px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.c2-today.is-ready { border-color: rgba(242,220,160,.45); background: radial-gradient(120% 100% at 0% 0%, rgba(242,220,160,.14), rgba(255,255,255,.03) 70%); }
.c2-today b { font: 800 26px/1 var(--sans); color: var(--brass-2); }
.c2-today small { font-size: 12.5px; color: var(--ivory-3); }
.c2-prog { display: grid; gap: 6px; }
.c2-prog small { font-size: 12px; color: var(--ivory-3); }
.c2-miles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.c2-mile { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "s t" "v v"; gap: 6px 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(242,220,160,.18); }
.c2-ms { grid-area: s; color: var(--brass-2); font-size: 15px; }
.c2-mt { grid-area: t; display: grid; min-width: 0; }
.c2-mt b { font: 700 13px var(--sans); color: var(--ivory); }
.c2-mt small { font-size: 11px; color: var(--ivory-3); }
.c2-mv { grid-area: v; font: 800 16px var(--sans); color: var(--ivory); }
.c2-mile.is-done { opacity: .5; border-color: rgba(255,255,255,.06); }
.c2-mile.is-today, .c2-mile.is-next { border-color: var(--brass-2); }
.c2-grid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 5px; }
.c2-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 9px; background: rgba(255,255,255,.035); color: var(--ivory-3); font: 600 12px var(--sans); }
.c2-n { line-height: 1; }
.c2-ok, .c2-star { position: absolute; right: 3px; top: 2px; font-style: normal; font-size: 9px; line-height: 1; }
.c2-ok { color: var(--gold); }
.c2-star { color: var(--brass-2); }
.c2-cell.is-done { background: rgba(212,176,106,.1); color: var(--ivory-2); }
.c2-cell.is-mile { box-shadow: inset 0 0 0 1px rgba(242,220,160,.35); }
.c2-cell.is-today, .c2-cell.is-next { background: linear-gradient(180deg, #f2dba1, #d3ad60); color: #20170a; box-shadow: 0 4px 14px -4px rgba(242,220,160,.6); }
.c2-cell.is-today .c2-star, .c2-cell.is-next .c2-star { color: #20170a; }
.c2-legend { margin: 0; text-align: center; font-size: 12.5px; color: var(--ivory-3); }
@media (max-width: 520px) {
  .c2-hero { grid-template-columns: minmax(0, 1fr); }
  .c2-day { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 8px; }
  .c2-day .caps { grid-column: 1 / -1; }
  .c2-day b { font-size: 32px; }
  .c2-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .c2-mile { padding: 8px 10px; }
  .c2-mv { font-size: 14px; }
}

/* Symboles de rareté des trophées : même taille et même centrage, quelle que soit la police */
.medal-sym { width: 24px !important; height: 24px !important; font-size: 0 !important; background: var(--rc); -webkit-mask: var(--sym) center / contain no-repeat; mask: var(--sym) center / contain no-repeat; }
.trophy.is-done .medal .medal-sym, .trophy.is-claimed .medal .medal-sym { background: #fff; filter: drop-shadow(0 0 6px var(--rc)); text-shadow: none; }
.trophy.is-sealed .medal .medal-sym { background: rgba(255,225,215,.92); width: 20px !important; height: 20px !important; }
.medals .medal .medal-sym { width: 28px !important; height: 28px !important; background: #fff; filter: drop-shadow(0 0 6px var(--rc)); }
.medals .m.is-empty .medal .medal-sym { background: rgba(239,230,209,.25); filter: none; }

/* =====================================================================
   v28 — Comptoir sans achat, calendrier plein écran sur téléphone
   ===================================================================== */
/* Comptoir : réserve vide, le booster et le bouton se grisent */
.lobby-pack.is-empty { cursor: default; filter: grayscale(.85) brightness(.6) drop-shadow(0 18px 24px rgba(0,0,0,.5)) !important; }
.lobby-pack.is-empty img { animation: none; }
.lobby-pack.is-empty:hover { transform: none; }
.hero-card .seal-btn:disabled { filter: grayscale(1) brightness(.55) !important; box-shadow: none !important; opacity: .8; }
.hero-card .seal-btn:disabled::after { display: none; }

/* Calendrier : plein écran sur téléphone, tout tient sans défilement */
@media (max-width: 760px) {
  #modal.is-open:has(.cal2-sheet) { place-items: stretch; }
  .sheet.cal2-sheet { width: 100%; height: 100dvh; max-height: none; border-radius: 0; border: 0 !important; padding-top: var(--safe-t); animation: fade .25s ease; }
  .cal2-sheet .sheet-head { padding: 14px 18px 4px !important; }
  .cal2-sheet .sheet-head h2 { font-size: 22px; }
  .cal2-sheet .sheet-body { overflow: hidden !important; display: flex !important; flex-direction: column; padding: 6px 18px 10px !important; }
  .cal2-sheet .c2 { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
  .cal2-sheet .c2-hero { flex: none; gap: 10px; }
  .cal2-sheet .c2-today { padding: 10px 14px; flex-direction: row; }
  .cal2-sheet .c2-today b { font-size: 22px; }
  .cal2-sheet .c2-prog, .cal2-sheet .c2-miles, .cal2-sheet .c2-legend { flex: none; }
  .cal2-sheet .c2-grid { flex: 1 1 auto; min-height: 0; grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .cal2-sheet .c2-cell { aspect-ratio: auto; min-height: 0; }
  .cal2-sheet .dismiss { flex: none; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .cal2-sheet .c2 { gap: 8px; }
  .cal2-sheet .c2-day b { font-size: 26px; }
  .cal2-sheet .c2-mile { padding: 6px 8px; }
  .cal2-sheet .c2-mv { font-size: 13px; }
  .cal2-sheet .c2-legend { font-size: 11.5px; }
}
