/* ============================================================
   ARISE — Royaume enluminé  (royaume.css)
   Intention : un manuscrit royal tenu à la lumière d'une chandelle.
   Le vélin porte tout ; l'encre dit, l'or désigne l'important,
   le sceau vermillon appelle l'action. L'ornement (filet double,
   fleurons d'angle, lettrine) range l'information, il ne la couvre pas.
   Chargé en dernier. Chaque règle est bornée à la peau :
   html[data-skin="royaume"]. Textures : CSS et SVG en ligne seulement.
   ============================================================ */

/* ---------- 1. Jetons du manuscrit ---------- */
html[data-skin="royaume"] {
  --rx-v1: #f8f0d9;           /* vélin clair */
  --rx-v2: #f1e5c6;
  --rx-v3: #e4d3aa;           /* vélin patiné */
  --rx-ink: #2a1f14;
  --rx-gold: #a47c1c;         /* or bruni : filets, ornements */
  --rx-gold-soft: rgba(164, 124, 28, 0.55);
  --rx-gold-hi: #d4aa46;      /* or vif : reflets */
  --rx-gold-ink: #6c4f0e;     /* or lisible en texte (≥ 5:1 sur vélin) */
  --rx-seal: #8e1b24;         /* sceau vermillon */
  --rx-seal-hi: #b42d36;
  --rx-seal-lo: #5e1017;
  --rx-seal-ink: #fbf1dc;     /* texte sur sceau */
  --rx-red-ink: #8e1b24;      /* vermillon lisible en texte */
  --rx-lapis: #1d3a7e;        /* lapis-lazuli des enluminures (accord avec les fresques) */
  --rx-lapis-lo: #12235a;
  --rx-malachite: #2f7a55;
  --rx-lettrine: #f2cf6e;
  --rx-lettrine-sh: rgba(8, 14, 40, 0.8);
  --rx-shade: rgba(120, 82, 24, 0.22);
  --rx-paper: linear-gradient(180deg, rgba(255, 252, 238, 0.6) 0, rgba(255, 252, 238, 0) 42%, rgba(150, 105, 35, 0.14) 100%);
  --rx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 0.45 0 0 0 0 0.3 0 0 0 0 0.1 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  --rx-stain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='3' seed='7' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 0.55 0 0 0 0 0.38 0 0 0 0 0.12 0 0 0 0.34 0'/%3E%3C/filter%3E%3Crect width='360' height='360' filter='url(%23f)'/%3E%3C/svg%3E");
  --rx-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cdefs%3E%3Cg id='c' fill='%23a47c1c' stroke='%23a47c1c' stroke-width='1' stroke-linecap='round'%3E %3Cpath d='M4.5 1.6 7.4 4.5 4.5 7.4 1.6 4.5z' stroke='none'/%3E%3Cpath d='M10 4.5H20M4.5 10V20' fill='none'/%3E%3Ccircle cx='23' cy='4.5' r='1.1' stroke='none'/%3E%3Ccircle cx='4.5' cy='23' r='1.1' stroke='none'/%3E %3Cpath d='M9 14.5A5.5 5.5 0 0 0 14.5 9' fill='none'/%3E%3Ccircle cx='11.5' cy='11.5' r='.9' stroke='none'/%3E%3C/g%3E%3C/defs%3E %3Cg fill='none' stroke='%23a47c1c'%3E%3Cpath d='M0 .75H80M0 79.25H80M.75 0V80M79.25 0V80' stroke-width='1.5'/%3E%3Cpath d='M4.5 4.5H75.5M4.5 75.5H75.5M4.5 4.5V75.5M75.5 4.5V75.5' stroke-width='1' opacity='.6'/%3E%3C/g%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 80 0)'/%3E%3Cuse href='%23c' transform='matrix(1 0 0 -1 0 80)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 80 80)'/%3E%3C/svg%3E");
  --rx-line: rgba(70, 48, 20, 0.42);          /* filet d'encre des cartes courantes */
  --rx-ink-line: rgba(42, 31, 20, 0.62);      /* bordure d'encre des boutons secondaires */
  --rx-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 12'%3E%3Cg fill='%23a47c1c' stroke='%23a47c1c' stroke-linecap='round'%3E %3Cpath d='M6 6H74M106 6H174' stroke-width='1' fill='none'/%3E%3Cpath d='M14 3.2H66M114 3.2H166' stroke-width='.6' fill='none' opacity='.7'/%3E %3Cpath d='M90 1 96 6 90 11 84 6z' stroke='none' fill='%238e1b24'/%3E%3Cpath d='M90 3.4 93 6 90 8.6 87 6z' stroke='none' fill='%23a47c1c'/%3E %3Ccircle cx='3' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='177' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='78' cy='6' r='1.2' stroke='none'/%3E%3Ccircle cx='102' cy='6' r='1.2' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  --rx-tex-bar: linear-gradient(180deg, var(--rx-v1), var(--rx-v2));
  --rx-edge: inset 0 0 22px var(--rx-shade);
  /* variables des autres modules, recalées sur le manuscrit */
  --card: var(--rx-v1);
  --surface: #f0e3c2;
  --surface-2: #e6d6ae;
  --chip-bg: #f4e9cc;
  --card-border: rgba(138, 100, 22, 0.78);
  --card-border-2: rgba(110, 76, 20, 0.30);
  --ar-cta: #8e1b24;
  --ar-cta-ink: #fbf1dc;
  --ok: #2f6b4a;
  --ac: #6c4f0e;
  --ay: #7a560a;
  --am: #8e1b24;
  --ao: #6a4406;
  --danger: #9b2226;
  --red: #8e1b24;
  --head: #251a10;
  --text: #33261a;
  --text-soft: #43341f;
  --text-mute: #5d4a30;
  --font-display: 'Cinzel', 'Marcellus', serif;
  --font-body: 'Cormorant Garamond', 'EB Garamond', serif;
  --rx-script: 'IM Fell English', 'Cormorant Garamond', serif;
  --rx-initial: 'Cinzel Decorative', 'Cinzel', serif;
  --panel-glow: 0 1px 0 rgba(255, 250, 230, 0.7), 0 3px 10px rgba(70, 46, 10, 0.16);
}
html[data-skin="royaume"][data-theme="dark"] {
  --rx-v1: #33231a;
  --rx-v2: #2a1c13;
  --rx-v3: #1f150e;
  --rx-ink: #f3e4c4;
  --rx-gold: #d4aa46;
  --rx-gold-soft: rgba(212, 170, 70, 0.5);
  --rx-gold-hi: #f0cf6a;
  --rx-gold-ink: #f0cf6a;
  --rx-seal: #a82430;
  --rx-seal-hi: #cc3d47;
  --rx-seal-lo: #66101a;
  --rx-seal-ink: #fdf3dc;
  --rx-red-ink: #f08088;
  --rx-lapis: #223f8a;
  --rx-lapis-lo: #0f1c4a;
  --rx-malachite: #4fa57a;
  --rx-lettrine: #f4d27a;
  --rx-lettrine-sh: rgba(0, 0, 0, 0.7);
  --rx-shade: rgba(0, 0, 0, 0.5);
  --rx-paper: linear-gradient(180deg, rgba(212, 170, 70, 0.10) 0, rgba(212, 170, 70, 0) 42%, rgba(0, 0, 0, 0.30) 100%);
  --rx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 0.95 0 0 0 0 0.78 0 0 0 0 0.42 0 0 0 0.075 0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  --rx-stain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='360'%3E%3Cfilter id='f' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='3' seed='7' stitchTiles='stitch'/%3E %3CfeColorMatrix values='0 0 0 0 0.8 0 0 0 0 0.55 0 0 0 0 0.2 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='360' height='360' filter='url(%23f)'/%3E%3C/svg%3E");
  --rx-frame: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cdefs%3E%3Cg id='c' fill='%23d4aa46' stroke='%23d4aa46' stroke-width='1' stroke-linecap='round'%3E %3Cpath d='M4.5 1.6 7.4 4.5 4.5 7.4 1.6 4.5z' stroke='none'/%3E%3Cpath d='M10 4.5H20M4.5 10V20' fill='none'/%3E%3Ccircle cx='23' cy='4.5' r='1.1' stroke='none'/%3E%3Ccircle cx='4.5' cy='23' r='1.1' stroke='none'/%3E %3Cpath d='M9 14.5A5.5 5.5 0 0 0 14.5 9' fill='none'/%3E%3Ccircle cx='11.5' cy='11.5' r='.9' stroke='none'/%3E%3C/g%3E%3C/defs%3E %3Cg fill='none' stroke='%23d4aa46'%3E%3Cpath d='M0 .75H80M0 79.25H80M.75 0V80M79.25 0V80' stroke-width='1.5'/%3E%3Cpath d='M4.5 4.5H75.5M4.5 75.5H75.5M4.5 4.5V75.5M75.5 4.5V75.5' stroke-width='1' opacity='.6'/%3E%3C/g%3E %3Cuse href='%23c'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 1 80 0)'/%3E%3Cuse href='%23c' transform='matrix(1 0 0 -1 0 80)'/%3E%3Cuse href='%23c' transform='matrix(-1 0 0 -1 80 80)'/%3E%3C/svg%3E");
  --rx-line: rgba(232, 214, 176, 0.30);
  --rx-ink-line: rgba(243, 228, 196, 0.55);
  --rx-rule: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 12'%3E%3Cg fill='%23d4aa46' stroke='%23d4aa46' stroke-linecap='round'%3E %3Cpath d='M6 6H74M106 6H174' stroke-width='1' fill='none'/%3E%3Cpath d='M14 3.2H66M114 3.2H166' stroke-width='.6' fill='none' opacity='.7'/%3E %3Cpath d='M90 1 96 6 90 11 84 6z' stroke='none' fill='%23c9414b'/%3E%3Cpath d='M90 3.4 93 6 90 8.6 87 6z' stroke='none' fill='%23d4aa46'/%3E %3Ccircle cx='3' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='177' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='78' cy='6' r='1.2' stroke='none'/%3E%3Ccircle cx='102' cy='6' r='1.2' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  --rx-tex-bar: linear-gradient(180deg, var(--rx-v1), var(--rx-v3));
  --rx-edge: inset 0 0 26px var(--rx-shade);
  --card: var(--rx-v1);
  --surface: #26190f;
  --surface-2: #1b120b;
  --chip-bg: #2e2016;
  --card-border: rgba(212, 170, 70, 0.72);
  --card-border-2: rgba(212, 170, 70, 0.28);
  --ar-cta: #a82430;
  --ar-cta-ink: #fdf3dc;
  --ok: #6fc096;
  --ac: #e0bb58;
  --ay: #f0cf6a;
  --am: #ee8088;
  --danger: #f08088;
  --red: #e0707a;
  --head: #f6e8c8;
  --text: #e8d6b0;
  --text-soft: #e0cca2;
  --text-mute: #c8b58c;
  --panel-glow: 0 1px 0 rgba(240, 207, 106, 0.10), 0 4px 14px rgba(0, 0, 0, 0.45);
}

/* ---------- 2. Page et texte ---------- */
html[data-skin="royaume"] body {
  font-weight: 500;
  background-color: var(--bg);
  background-image: var(--rx-noise), radial-gradient(120% 60% at 50% -10%, var(--bg-grad-a), transparent 70%), radial-gradient(90% 50% at 100% 100%, var(--bg-grad-b), transparent 70%);
  background-size: 200px 200px, auto, auto;
  background-attachment: scroll, fixed, fixed;
}
html[data-skin="royaume"] ::selection { background: var(--rx-gold-hi); color: #2a1f14; }
html[data-skin="royaume"] :is(a, button, [role="button"], input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--rx-seal-hi); outline-offset: 2px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--rx-gold-hi) 55%, transparent);
}
html[data-skin="royaume"] .tab-sub { font-family: var(--font-body); font-style: italic; font-weight: 600; font-size: 16px; color: var(--text-soft); letter-spacing: 0.02em; }

/* ---------- 3. En-tête : bandeau de vélin, double filet d'or ---------- */
html[data-skin="royaume"] .app-header {
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--rx-gold), var(--rx-gold)), linear-gradient(var(--rx-gold-soft), var(--rx-gold-soft)),
    var(--rx-noise), var(--rx-tex-bar);
  background-size: 100% 1.5px, 100% 1px, 200px 200px, 100% 100%;
  background-position: 0 100%, 0 calc(100% - 4px), 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  border-bottom: 0; box-shadow: 0 1px 0 var(--rx-seal), 0 3px 8px rgba(40, 26, 6, 0.18);
  padding-bottom: 12px;
}
html[data-skin="royaume"] .app-header-left { gap: 8px; min-width: 0; }
html[data-skin="royaume"] .app-blason { border: 1px solid var(--rx-gold); border-radius: 2px; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--rx-gold-soft); }
html[data-skin="royaume"] .app-title { font-family: var(--rx-initial); font-weight: 700; font-size: 13px; letter-spacing: 0.1em; color: var(--head); text-shadow: none; white-space: nowrap; }
html[data-skin="royaume"] .app-title-y { color: var(--rx-seal); margin-left: 4px; }
html[data-skin="royaume"][data-theme="dark"] .app-title-y { color: var(--rx-gold-hi); }
html[data-skin="royaume"] :is(.app-rank-pill, .app-title-pill) {
  font-family: var(--font-display); font-weight: 700; color: var(--rx-gold-ink); background: transparent;
  border: 1px solid var(--rx-ink-line); border-radius: 1px; margin: 0 2px;
}
html[data-skin="royaume"] .app-icon-btn {
  width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 0; color: var(--head);
  background: transparent; border: 1px solid transparent; border-radius: 2px;
}
html[data-skin="royaume"] .app-header-right { gap: 0; }
html[data-skin="royaume"] .app-icon-btn::before { content: ''; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat; }
html[data-skin="royaume"] .app-icon-btn > * { font-size: 0; }
html[data-skin="royaume"] #btn-rappels { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 16.5V11a6 6 0 0 1 12 0v5.5l1.6 2H4.4zM10 21a2 2 0 0 0 4 0M12 3v2'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] #btn-menu { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5h16M4 12h16M4 17.5h16'/%3E%3Cpath d='M12 4.6 13.4 6.5 12 8.4 10.6 6.5z' fill='black' stroke='none'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] #btn-sync { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 18.5h10.5a4 4 0 0 0 .4-8A6 6 0 0 0 6.3 11 3.8 3.8 0 0 0 7 18.5z'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .app-urne-btn { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v16M7 20h10M5 7h14M5 7l-2.5 6a3 3 0 0 0 5 0zM19 7l-2.5 6a3 3 0 0 0 5 0z'/%3E%3C/svg%3E"); color: var(--rx-seal-ink); background: var(--rx-seal); border-color: var(--rx-gold); }
html[data-skin="royaume"] .sync-dot { top: 8px; right: 8px; box-shadow: 0 0 0 1.5px var(--surface); }
@media (hover: hover) { html[data-skin="royaume"] .app-icon-btn:hover { background: color-mix(in srgb, var(--rx-gold-hi) 22%, transparent); border-color: var(--rx-gold-soft); } }
@media (max-width: 400px) {
  html[data-skin="royaume"] .app-header { padding-left: 12px; padding-right: 6px; }
  html[data-skin="royaume"] .app-title { font-size: 11.5px; letter-spacing: 0.06em; }
  html[data-skin="royaume"] :is(.app-rank-pill, .app-title-pill) { letter-spacing: 0.06em; padding: 3px 5px 2px; }
}

/* ---------- 4. Barre d'onglets : le rang du bas, icônes dessinées ---------- */
html[data-skin="royaume"] .tab-bar {
  background-color: var(--surface);
  background-image: linear-gradient(var(--rx-gold), var(--rx-gold)), linear-gradient(var(--rx-gold-soft), var(--rx-gold-soft)), var(--rx-noise), var(--rx-tex-bar);
  background-size: 100% 1.5px, 100% 1px, 200px 200px, 100% 100%;
  background-position: 0 0, 0 4px, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, no-repeat;
  border-top: 0; box-shadow: 0 -3px 10px rgba(40, 26, 6, 0.14);
}
html[data-skin="royaume"] .tab-bar .tab-btn { border-right: 0; min-height: 52px; padding-top: 9px; }
html[data-skin="royaume"] .tab-bar .tab-btn::after { content: ''; position: absolute; right: 0; top: 14px; bottom: 10px; width: 1px; background: linear-gradient(180deg, transparent, var(--rx-gold-soft), transparent); }
html[data-skin="royaume"] .tab-bar .tab-btn:last-of-type::after { display: none; }
html[data-skin="royaume"] .tab-bar .tab-btn .tab-icon {
  font-size: 0; width: 24px; height: 24px; min-height: 24px; display: block; background: currentColor;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
html[data-skin="royaume"] .tab-btn[data-tab="qg"] .tab-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 18.5h17M4.2 17.5 3.4 7.6 8.4 11.8 12 4.6l3.6 7.2 5-4.2-.8 9.9z'/%3E%3Ccircle cx='12' cy='13.6' r='.9' fill='black'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .tab-btn[data-tab="jour"] .tab-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9.5h14V21M4 9.5h16M5 9.5V5h3v2.4h2.4V5h3.2v2.4H16V5h3v4.5M3.5 21h17M10 21v-4.2a2 2 0 0 1 4 0V21'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .tab-btn[data-tab="projets"] .tab-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3.6h11a1.8 1.8 0 0 1 1.8 1.8v9.2H9.2V5.4A1.8 1.8 0 0 0 7 3.6zM7 3.6a1.8 1.8 0 0 0-1.8 1.8v1.4h4M9.2 14.6v2.2a1.8 1.8 0 0 1-1.8 1.8M12 8h5M12 11h5'/%3E%3Ccircle cx='15.8' cy='18.4' r='2.5'/%3E%3Cpath d='m14.6 20.6-.8 1.9 2-.8 2 .8-.8-1.9'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .tab-btn[data-tab="armee"] .tab-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.8 5.8v5.6c0 4.6 3.1 8 7.2 9.6 4.1-1.6 7.2-5 7.2-9.6V5.8z'/%3E%3Cpath d='M12 7.2v9.4M8 11.2h8'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .tab-btn[data-tab="progres"] .tab-icon { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.2 13.9 8.1 18.8 6.2 16.9 11.1 21.8 12 16.9 12.9 18.8 17.8 13.9 15.9 12 20.8 10.1 15.9 5.2 17.8 7.1 12.9 2.2 12 7.1 11.1 5.2 6.2 10.1 8.1z' transform='translate(0 -.4) scale(.98)'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .tab-bar .tab-lbl { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; }
html[data-skin="royaume"] .tab-bar .tab-btn.active { color: var(--head); }
html[data-skin="royaume"] .tab-bar .tab-btn.active .tab-icon { color: var(--rx-red-ink); filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--rx-gold-hi) 70%, transparent)); }
html[data-skin="royaume"] .tab-bar .tab-btn.active::before {
  top: -4px; left: 50%; right: auto; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg);
  background: var(--rx-seal); border: 1px solid var(--rx-gold-hi); box-shadow: 0 0 0 2px var(--surface); border-radius: 0;
}
html[data-skin="royaume"] .cap-fab {
  color: var(--rx-seal-ink); border: 2px solid var(--rx-gold); font-weight: 400;
  background: radial-gradient(circle at 34% 28%, var(--rx-seal-hi), var(--rx-seal) 58%, var(--rx-seal-lo));
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--rx-gold-soft), 0 5px 12px rgba(50, 10, 14, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* ---------- 5. Ruban de segments ---------- */
html[data-skin="royaume"] #seg-bar, html[data-skin="royaume"] .qg-seg {
  background-color: var(--surface-2); background-image: var(--rx-noise), var(--rx-tex-bar); background-size: 200px 200px, 100% 100%;
  border: 1px solid var(--rx-ink-line); border-bottom-width: 1px;
  box-shadow: var(--panel-glow); border-radius: 1px;
}
html[data-skin="royaume"] :is(.seg-btn, .qg-seg-btn) {
  min-height: 48px; font-family: var(--font-display); font-weight: 600; letter-spacing: 0.04em; border-right: 1px solid var(--rx-line);
}
html[data-skin="royaume"] :is(.seg-btn, .qg-seg-btn):last-child { border-right: 0; }
html[data-skin="royaume"] :is(.seg-btn.on, .seg-btn[aria-selected="true"], .qg-seg-btn[aria-selected="true"]) {
  color: var(--head); font-weight: 700;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rx-gold-hi) 38%, var(--card)), color-mix(in srgb, var(--rx-gold-hi) 14%, var(--card)));
  box-shadow: inset 0 0 0 1px var(--rx-gold-soft);
}
html[data-skin="royaume"] :is(.seg-btn, .qg-seg-btn)::after { background: var(--rx-seal); height: 3px; left: 14%; right: 14%; }
html[data-skin="royaume"] .seg-btn .seg-ico {
  font-size: 0; width: 17px; height: 17px; min-width: 17px; background: currentColor; -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
html[data-skin="royaume"] .seg-btn[data-vue="accueil"] .seg-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V9.5h14V21M4 9.5h16M5 9.5V5h3v2.4h2.4V5h3.2v2.4H16V5h3v4.5M3.5 21h17M10 21v-4.2a2 2 0 0 1 4 0V21'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .seg-btn[data-vue="quetes"] .seg-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 3.8C13 4 8.4 8 7.6 15.4L6 19.6l1 .6 3.2-1.6C17 18 20 12 20 3.8zM7.6 15.4c3-1.2 6.4-4.2 8-8.600M4 21l4-4'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .seg-btn[data-vue="reves"] .seg-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.4 20.4 12 12 20.6 3.6 12z M12 8.2 15.8 12 12 15.8 8.2 12z'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .seg-btn[data-vue="registre"] .seg-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5c2.7-.9 5.4-.7 8 1 2.6-1.7 5.3-1.9 8-1V18c-2.7-.9-5.4-.7-8 1-2.6-1.7-5.3-1.9-8-1zM12 6.5V19'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .seg-btn[data-vue="triomphes"] .seg-ico { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.8 5.8v5.6c0 4.6 3.1 8 7.2 9.6 4.1-1.6 7.2-5 7.2-9.6V5.8z'/%3E%3Cpath d='M12 7.2v9.4M8 11.2h8'/%3E%3C/svg%3E"); }
html[data-skin="royaume"] .seg-btn.on .seg-ico, html[data-skin="royaume"] .seg-btn[aria-selected="true"] .seg-ico { color: var(--rx-red-ink); }
@media (max-width: 400px) { html[data-skin="royaume"] #seg-bar:has(.seg-btn:nth-child(4)) .seg-ico { width: 14px; height: 14px; min-width: 14px; } }

/* ---------- 6. Titres d'écran : lettrine enluminée ---------- */
html[data-skin="royaume"] .tab-head { margin-bottom: 20px; }
html[data-skin="royaume"] .tab-title {
  font-family: var(--font-display); font-weight: 700; font-size: 24px; letter-spacing: 0.14em; line-height: 1.25; color: var(--head); text-shadow: none;
}
html[data-skin="royaume"] .tab-title::before { content: none; display: none; }
html[data-skin="royaume"] .tab-title::first-letter {
  /* lettrine : or sur tuile de lapis ; le paraphe de la capitale reste dans la tuile (marge droite élargie) */
  font-family: var(--rx-initial); font-weight: 900; font-size: 1.22em; line-height: 1.12; letter-spacing: 0;
  padding: 0.02em 0.62em 0.1em 0.16em; margin-right: 0.14em;
  color: var(--rx-lettrine); background: linear-gradient(160deg, var(--rx-lapis), var(--rx-lapis-lo)); border: 1px solid var(--rx-gold-hi); text-shadow: 0 1px 0 var(--rx-lettrine-sh);
}
html[data-skin="royaume"] .tab-title::after {
  content: ''; display: block; width: 180px; max-width: 70%; height: 12px; margin: 8px auto 0; background: var(--rx-rule) center / contain no-repeat;
}

/* ---------- 7. Cartes : vélin partout ; or et fleurons réservés aux cartes majeures ---------- */
/* Cartes courantes : parchemin, un seul filet d'encre */
html[data-skin="royaume"] :is(.card, .qg-card, .qg-empty, .px-sheet, .ar-empty, .tresor-card, .jalon-panel, .dream-card, .qs-card, .ar-unit, .qg-kpi, .px-tile, .ar-tile, .hs-pill, .trophy, .pj-card, .px-okr-obj, .qg-stat, .qg-action, .qg-proj-row, .tr-row, .hudstrip > div, .focus-card, .ep-card, .urne-card, .qg-hero, .ar-dash, .ar-fiche-hero, .modal, .levelup-modal, .toast) {
  background-image: var(--rx-noise), var(--rx-stain), var(--rx-paper);
  background-position: 0 0, 0 0, 0 0; background-size: 200px 200px, 360px 360px, 100% 100%; background-repeat: repeat, repeat, no-repeat;
  background-origin: border-box; background-clip: border-box;
  box-shadow: inset 0 0 14px var(--rx-shade), var(--panel-glow);
}
html[data-skin="royaume"] :is(.card, .qg-card, .qg-empty, .px-sheet, .ar-empty, .tresor-card, .jalon-panel, .ar-unit, .qg-kpi, .px-tile, .ar-tile, .hs-pill, .trophy, .px-okr-obj, .qg-stat, .qg-action, .qg-proj-row, .tr-row) { border: 1px solid var(--rx-line); border-radius: 1px; outline: 0; }
html[data-skin="royaume"] :is(.dream-card, .qs-card, .pj-card) { border-top: 1px solid var(--rx-line); border-right: 1px solid var(--rx-line); border-bottom: 1px solid var(--rx-line); border-radius: 1px; outline: 0; }
html[data-skin="royaume"] :is(.card, .qg-card, .px-sheet, .ar-unit)::after { content: none; display: none; }
html[data-skin="royaume"] .hero-card::before { content: none; }
html[data-skin="royaume"] .ar-unit { border-top: 3px solid var(--ar-c); --ar-pat: none; }
html[data-skin="royaume"] .pj-card { border-left-width: 4px; }
html[data-skin="royaume"] :is(.qg-kpi, .hs-pill) { border-top: 2px solid var(--rx-gold); }
html[data-skin="royaume"] :is(.qg-card, .qg-kpi)::before { opacity: 0.55; }

/* Cartes majeures : cadre enluminé (double filet d'or + quatre fleurons), une seule image SVG en 9 tranches */
html[data-skin="royaume"] :is(.hero-card, .focus-card, .urne-card, .ep-card, .modal, .levelup-modal, .qg-hero, .ar-dash, .ar-fiche-hero, .qg-view[data-v="synthese"] .qg-card) {
  border: 1.5px solid var(--rx-gold); border-radius: 0; outline: 0;
  border-image-source: var(--rx-frame); border-image-slice: 26; border-image-width: 26px; border-image-repeat: stretch;
}
html[data-skin="royaume"] .ep-card { box-shadow: inset 4px 0 0 var(--danger), inset 0 0 14px var(--rx-shade), var(--panel-glow); }
html[data-skin="royaume"] .constellation-wrap { border: 1.5px solid var(--rx-gold); outline: 0; }

/* Cartes d'en-tête de rubrique */
html[data-skin="royaume"] .qg-card-head::before { content: none; }
html[data-skin="royaume"] .qg-card-head { padding-left: 0; }
html[data-skin="royaume"] .qg-card-head::after, html[data-skin="royaume"] .ar-group-h::after {
  height: 5px; margin-top: 7px; border-top: 1px solid var(--rx-gold); border-bottom: 1px solid var(--rx-gold-soft);
}
html[data-skin="royaume"] :is(.qg-card-title, .ar-group-h, .qs-sec, .jalons-section-title, .trophies-section, .pj-group-name, .qg-group-title, .focus-k, .wk-title) {
  font-family: var(--font-display); font-weight: 700; letter-spacing: 0.1em; color: var(--head);
}
html[data-skin="royaume"] :is(.qs-sec, .jalons-section-title, .trophies-section) { color: var(--rx-gold-ink); }
/* Script italique (IM Fell) : casse de phrase seulement. Étiquettes en capitales : Cinzel romain. */
html[data-skin="royaume"] :is(.qg-card-sub, .qs-hint, .hero-xp-row) { font-family: var(--rx-script); font-style: italic; font-weight: 400; letter-spacing: 0.02em; }
html[data-skin="royaume"] :is(.hero-lbl, .hs-lbl) { font-family: var(--font-display); font-style: normal; font-weight: 600; letter-spacing: 0.16em; }
html[data-skin="royaume"] .hs-lbl { font-size: 10px; }

/* ---------- 8. Boutons : sceau vermillon et boutons d'étude ---------- */
html[data-skin="royaume"] :is(.btn-primary, .qg-btn--primary, .ar-add, .levelup-cta, .urne-cta, .ar-actions .btn-primary) {
  position: relative; min-height: 46px; color: var(--rx-seal-ink); font-family: var(--font-display); font-weight: 700; letter-spacing: 0.12em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  background: radial-gradient(120% 140% at 30% 15%, var(--rx-seal-hi), var(--rx-seal) 55%, var(--rx-seal-lo));
  border: 1px solid var(--rx-seal-lo); border-radius: 3px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx-gold-hi) 70%, transparent), inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 3px 0 var(--rx-seal-lo), 0 6px 10px rgba(60, 10, 14, 0.28);
}
@media (hover: hover) { html[data-skin="royaume"] :is(.btn-primary, .qg-btn--primary, .ar-add, .levelup-cta, .urne-cta):hover { filter: brightness(1.08); background: radial-gradient(120% 140% at 30% 15%, var(--rx-seal-hi), var(--rx-seal) 55%, var(--rx-seal-lo)); border-color: var(--rx-seal-lo); } }
html[data-skin="royaume"] :is(.btn-primary, .qg-btn--primary, .ar-add, .levelup-cta, .urne-cta):active { transform: translateY(2px); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rx-gold-hi) 60%, transparent), 0 1px 0 var(--rx-seal-lo); }
html[data-skin="royaume"] :is(.btn, .qg-btn, .ar-sort, .ar-params, .qg-chip, .ar-chip, .pj-chip, .projets-refresh-btn, .focus-edit, .qs-plus):not(.btn-primary):not(.qg-btn--primary) {
  color: var(--head); background-color: transparent; background-image: linear-gradient(180deg, color-mix(in srgb, var(--rx-v1) 88%, transparent), color-mix(in srgb, var(--rx-v3) 70%, transparent));
  border: 1px solid var(--rx-ink-line); border-radius: 2px; box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--head) 14%, transparent);
}
html[data-skin="royaume"] :is(.btn, .qg-btn, .ar-sort, .ar-params, .projets-refresh-btn, .pj-chip):not(.btn-primary):not(.qg-btn--primary) { min-height: 44px; font-family: var(--font-display); }
html[data-skin="royaume"] :is(.btn-ghost, .qg-btn--ghost) { color: var(--head); }
html[data-skin="royaume"] .qg-btn--danger { color: var(--rx-red-ink); border-color: var(--rx-seal); }
html[data-skin="royaume"] :is(.qg-chip[aria-pressed="true"], .ar-chip.on, .pj-chip.on, .pj-chip.active) {
  color: var(--head); background-image: linear-gradient(180deg, color-mix(in srgb, var(--rx-gold-hi) 42%, var(--card)), color-mix(in srgb, var(--rx-gold-hi) 18%, var(--card)));
  border-color: var(--rx-gold); border-bottom: 3px solid var(--rx-seal);
}
html[data-skin="royaume"] :is(.qg-chip, .ar-chip) { min-height: 44px; }

/* ---------- 9. Héros, constellation, exploits, quêtes ---------- */
html[data-skin="royaume"] .hero-card { padding: 22px 16px 18px; }
html[data-skin="royaume"] :is(.hero-laurel-left, .hero-laurel-right) { color: var(--rx-gold); font-size: 22px; }
html[data-skin="royaume"] .hero-numeral {
  font-family: var(--rx-initial); font-weight: 900; font-size: 64px; color: var(--rx-seal); text-shadow: 1px 2px 0 var(--rx-lettrine-sh), 0 0 18px color-mix(in srgb, var(--rx-gold-hi) 35%, transparent);
}
html[data-skin="royaume"][data-theme="dark"] .hero-numeral { color: var(--rx-gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.55), 0 0 22px rgba(240, 207, 106, 0.4); }
html[data-skin="royaume"] .hero-numeral::before { color: var(--rx-gold); }
html[data-skin="royaume"] .hero-lbl { color: var(--text-soft); }
html[data-skin="royaume"] .hero-rank {
  font-family: var(--font-display); color: var(--rx-seal-ink); background: radial-gradient(120% 160% at 30% 10%, var(--rx-seal-hi), var(--rx-seal) 60%, var(--rx-seal-lo));
  border: 1px solid var(--rx-gold); padding: 4px 16px 3px; letter-spacing: 0.2em;
}
html[data-skin="royaume"] .hero-portrait img { border: 2px solid var(--rx-lapis); box-shadow: 0 0 0 1px var(--rx-gold), 0 6px 16px rgba(40, 24, 4, 0.4); outline: 1px solid var(--rx-gold-soft); outline-offset: 3px; }
html[data-skin="royaume"] .xp-bar-track { height: 14px; border: 1px solid var(--rx-gold); background: var(--bar-track); box-shadow: inset 0 1px 3px rgba(40, 24, 4, 0.35); }
html[data-skin="royaume"] .xp-bar-fill { background: linear-gradient(180deg, var(--rx-gold-hi), var(--rx-gold) 55%, #7c5a10); box-shadow: 0 0 8px color-mix(in srgb, var(--rx-gold-hi) 55%, transparent); }
html[data-skin="royaume"] .xp-bar-track::after { opacity: 0.5; }
html[data-skin="royaume"] .hs-val { font-family: var(--font-display); color: var(--head); }
html[data-skin="royaume"] .trophy { border: 1px solid var(--rx-gold-soft); }
html[data-skin="royaume"] :is(.trophy.unlocked, .trophy.r-legend.unlocked) { border-color: var(--rx-gold); }
html[data-skin="royaume"] .trophy.locked { border-style: dashed; }
html[data-skin="royaume"] .trophy-name { font-family: var(--font-display); letter-spacing: 0.06em; }
html[data-skin="royaume"] :is(.qs-chk, .qs-hold) { border-color: var(--rx-gold); min-width: 44px; min-height: 44px; background: color-mix(in srgb, var(--rx-v1) 80%, transparent); }
html[data-skin="royaume"] .qs-chk.on { background: var(--rx-seal); border-color: var(--rx-gold); color: var(--rx-seal-ink); }
html[data-skin="royaume"] .qs-card.done { border-left-color: var(--ok); }
html[data-skin="royaume"] :is(.qs-n, .dream-card-title) { font-family: var(--font-display); color: var(--head); }
html[data-skin="royaume"] .dream-card-pct { color: var(--rx-gold-ink); font-family: var(--font-display); }
html[data-skin="royaume"] .dream-card-bar { border: 1px solid var(--rx-gold-soft); height: 8px; }

/* ---------- 10. QG, Projets, Armée, Registre ---------- */
html[data-skin="royaume"] .qg-hero { outline-offset: -5px; }
html[data-skin="royaume"] .qg-kpi-val, html[data-skin="royaume"] .ar-big { font-family: var(--font-display); color: var(--head); }
html[data-skin="royaume"] .qg-kpi { border-top-color: var(--rx-gold); }
html[data-skin="royaume"] .qg-card-head::after { flex: 1 0 100%; content: ''; }
html[data-skin="royaume"] .ar-group-h::before, html[data-skin="royaume"] .pj-group-name::after { display: none; }
html[data-skin="royaume"] .pj-group-name::before { content: '\2766'; color: var(--rx-gold); margin-right: 6px; }
html[data-skin="royaume"] .pj-card { border: 1px solid var(--rx-gold-soft); border-left-width: 4px; }
html[data-skin="royaume"] .ar-plat { border-color: var(--rx-gold); }
html[data-skin="royaume"] .ar-dash::before { background: radial-gradient(closest-side, color-mix(in srgb, var(--rx-gold-hi) 24%, transparent), transparent); }
html[data-skin="royaume"] :is(.ar-dash, .ar-fiche .ar-king)::after { content: none; display: none; }
html[data-skin="royaume"] .tresor-card #tresor-wrap { gap: 14px; }
html[data-skin="royaume"] :is(.cal-lbl, .cal-h) { font-family: var(--font-display); color: var(--rx-gold-ink); }
html[data-skin="royaume"] .cal-d.has { background-color: color-mix(in srgb, var(--rx-gold-hi) 16%, var(--card)); }
html[data-skin="royaume"] .cal-d.today.has, html[data-skin="royaume"] .cal-d.today { border-color: var(--rx-seal); color: var(--head); font-weight: 700; box-shadow: inset 0 0 0 1px var(--rx-seal); }
html[data-skin="royaume"] .cal-d.sel { background: color-mix(in srgb, var(--rx-gold-hi) 34%, var(--card)); border-color: var(--rx-gold); }
html[data-skin="royaume"] .cal-btn { min-width: 44px; min-height: 44px; border: 1px solid var(--rx-ink-line); color: var(--head); }
html[data-skin="royaume"] :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
  background-color: color-mix(in srgb, var(--rx-v1) 70%, var(--rx-v3)); border: 1px solid var(--rx-line); border-bottom: 2px solid var(--rx-ink-line); border-radius: 1px; color: var(--head);
}

/* ---------- 11. Menu ☰, modales, toasts, level-up, démarrage ---------- */
html[data-skin="royaume"] .modal { background-color: var(--surface); box-shadow: 0 -10px 40px rgba(20, 10, 2, 0.45), var(--rx-edge); }
html[data-skin="royaume"] .modal::before { content: ''; left: 0; right: 0; top: 0; height: 5px; background: var(--rx-lapis); opacity: 1; }
html[data-skin="royaume"] .tp-header { padding-bottom: 8px; border-bottom: 1px solid var(--rx-line); }
html[data-skin="royaume"] .tp-system { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.22em; color: var(--rx-gold-ink); }
html[data-skin="royaume"] .tp-close { width: 44px; height: 44px; border: 1px solid var(--rx-ink-line); color: var(--head); background: transparent; border-radius: 2px; }
html[data-skin="royaume"] .tp-name, html[data-skin="royaume"] .tp-status { font-family: var(--font-display); }
html[data-skin="royaume"] #menu-sheet .menu-groupe-titre { font-family: var(--font-display); color: var(--rx-gold-ink); letter-spacing: 0.2em; }
html[data-skin="royaume"] #menu-sheet .menu-item { border-bottom: 1px solid var(--rx-line); }
html[data-skin="royaume"] #menu-sheet :is(.menu-saut, .menu-sauts > *) { border: 1px solid var(--rx-ink-line); background-image: linear-gradient(180deg, color-mix(in srgb, var(--rx-v1) 90%, transparent), color-mix(in srgb, var(--rx-v3) 70%, transparent)); }
html[data-skin="royaume"] #menu-search { border: 1px solid var(--rx-ink-line); border-bottom: 2px solid var(--rx-gold); }
html[data-skin="royaume"] #menu-search::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; cursor: pointer; background: var(--head); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat; }

html[data-skin="royaume"] .toast {
  background-color: var(--surface); background-image: var(--rx-noise), var(--rx-paper); background-size: 200px 200px, 100% 100%;
  border: 1px solid var(--rx-ink-line); border-left: 5px solid var(--rx-seal);
  box-shadow: 0 8px 22px rgba(30, 16, 2, 0.4);
}
html[data-skin="royaume"] .toast.success { border-left-color: var(--ok); }
html[data-skin="royaume"] .toast.gold { border-left-color: var(--rx-gold-hi); }
html[data-skin="royaume"] .toast.danger { border-left-color: var(--danger); }
html[data-skin="royaume"] .toast-title { font-family: var(--font-display); color: var(--rx-gold-ink); letter-spacing: 0.12em; }
html[data-skin="royaume"] .toast-body { color: var(--text); font-size: 15px; }

html[data-skin="royaume"] .levelup-overlay { background: radial-gradient(circle at 50% 40%, rgba(60, 36, 8, 0.55), var(--overlay) 75%); }
html[data-skin="royaume"] .levelup-modal { background-color: var(--surface); padding: 38px 24px 26px; }
html[data-skin="royaume"] .levelup-modal::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--rx-lapis); }
html[data-skin="royaume"] .levelup-aura { background: radial-gradient(circle at 50% 28%, color-mix(in srgb, var(--rx-gold-hi) 34%, transparent), transparent 58%); }
html[data-skin="royaume"] .levelup-status { font-family: var(--font-display); color: var(--rx-red-ink); letter-spacing: 0.22em; }
html[data-skin="royaume"] .levelup-name { font-family: var(--rx-initial); font-weight: 900; color: var(--rx-seal); text-shadow: 1px 2px 0 var(--rx-lettrine-sh); }
html[data-skin="royaume"][data-theme="dark"] .levelup-name { color: var(--rx-gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5), 0 0 18px rgba(240, 207, 106, 0.45); }
html[data-skin="royaume"] .levelup-narrative { color: var(--text); font-size: 17px; }

html[data-skin="royaume"] .boot-overlay { background: radial-gradient(circle at 50% 38%, #2f1e12, #120c08 70%); }
html[data-skin="royaume"] .boot-overlay .bootlines { font-family: var(--rx-script); font-style: italic; font-size: 15px; color: #e9d6a8; }
html[data-skin="royaume"] .boot-overlay .bl-dim { color: rgba(233, 214, 168, 0.72); }
html[data-skin="royaume"] .boot-overlay .bl-warn { color: #f0cf6a; }
html[data-skin="royaume"] .boot-overlay .boot-final { background: radial-gradient(circle at 50% 42%, #2f1e12, #120c08 72%); gap: 10px; }
html[data-skin="royaume"] .boot-overlay .bf-1 { font-family: var(--font-display); letter-spacing: 0.4em; color: #e9777f; }
html[data-skin="royaume"] .boot-overlay .bf-2 { font-family: var(--rx-initial); font-weight: 900; font-size: 32px; letter-spacing: 0.1em; color: #f6e8c8; text-shadow: 0 2px 0 #000; }
html[data-skin="royaume"] .boot-overlay .bf-2::after { content: ''; display: block; width: 180px; height: 12px; margin: 12px auto 0; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 12'%3E%3Cg fill='%23d4aa46' stroke='%23d4aa46' stroke-linecap='round'%3E %3Cpath d='M6 6H74M106 6H174' stroke-width='1' fill='none'/%3E%3Cpath d='M14 3.2H66M114 3.2H166' stroke-width='.6' fill='none' opacity='.7'/%3E %3Cpath d='M90 1 96 6 90 11 84 6z' stroke='none' fill='%23c9414b'/%3E%3Cpath d='M90 3.4 93 6 90 8.6 87 6z' stroke='none' fill='%23d4aa46'/%3E %3Ccircle cx='3' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='177' cy='6' r='1.6' stroke='none'/%3E%3Ccircle cx='78' cy='6' r='1.2' stroke='none'/%3E%3Ccircle cx='102' cy='6' r='1.2' stroke='none'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat; }
html[data-skin="royaume"] .boot-overlay .bf-y { color: #f0cf6a; }
html[data-skin="royaume"] .boot-overlay .bf-3 { font-family: var(--rx-script); font-style: italic; font-size: 15px; color: rgba(233, 214, 168, 0.8); }
html[data-skin="royaume"] .boot-overlay .boot-skip { font-family: var(--font-display); color: rgba(233, 214, 168, 0.7); }

/* ---------- 11 bis. Ville : habitants en livrée du manuscrit (encre, vermillon, lapis, or, malachite) ---------- */
html[data-skin="royaume"] .cityfig [fill="#07080c"] { fill: #2a1f14; }
html[data-skin="royaume"] .cityfig.fig-courier [fill="#fcee0a"] { fill: #2b4ea0; }
html[data-skin="royaume"] .cityfig.fig-legionary [fill="#f75049"] { fill: #a8262e; }
html[data-skin="royaume"] .cityfig.fig-senator [fill="#ffb020"] { fill: #c9972b; }
html[data-skin="royaume"] .cityfig.fig-builder [fill="#00f0ff"] { fill: #2f7a55; }
html[data-skin="royaume"] .cityfig.fig-merchant [fill="#ffb020"] { fill: #8a5a2a; }
html[data-skin="royaume"] .cityfig.fig-pilgrim [fill="#f6f0e0"] { fill: #e9dcbc; }
html[data-skin="royaume"] .cityfig.fig-avatar [fill="#f6f0e0"] { fill: #8e1b24; }
html[data-skin="royaume"] .cityfig .fig-laurel [stroke="#fcee0a"] { stroke: #d4aa46; }
html[data-skin="royaume"] .cityfig .fig-laurel [fill="#fcee0a"] { fill: #f0cf6a; }
html[data-skin="royaume"] .cityfig [fill="#ff003c"] { fill: #8e1b24; }
html[data-skin="royaume"] .cityfig.fig-courier, html[data-skin="royaume"] .cityfig.fig-builder, html[data-skin="royaume"] .cityfig.fig-pilgrim { filter: drop-shadow(0 1px 1.5px rgba(30, 18, 6, 0.75)); }
html[data-skin="royaume"] .cityfig.fig-avatar { filter: drop-shadow(0 0 4px rgba(240, 207, 106, 0.9)) drop-shadow(0 1px 1px rgba(30, 18, 6, 0.7)); }
/* incident « drones » : volée d'oiseaux d'encre le jour, lucioles d'or la nuit (plus de pointillé cyan) */
html[data-skin="royaume"] .fresco-panel[data-incident="drones"] .incident-fx { background: radial-gradient(circle, rgba(32, 24, 52, 0.9) 1.2px, transparent 2.4px) 0 18% / 34px 12px repeat-x; }
html[data-skin="royaume"] .fresco-panel[data-phase="nuit"][data-incident="drones"] .incident-fx { background: radial-gradient(circle, rgba(240, 207, 106, 0.95) 1.2px, transparent 2.6px) 0 18% / 34px 12px repeat-x; }

/* Textes d'appoint : jamais sous 4,5:1 */
html[data-skin="royaume"] :is(.cf-etat-txt, .qs-seal, .qs-gage, .ar-badge, .qs-m, .qs-lbl) { color: var(--text-soft); }
html[data-skin="royaume"] :is(.ar-chip-val.neg, .hud-v.m) { color: var(--rx-red-ink); }

html[data-skin="royaume"] .qs-give { font-family: var(--font-display); font-size: 12px; letter-spacing: 0.08em; color: var(--text-soft); opacity: 1; min-height: 44px; padding: 2px 6px; text-decoration: underline; text-decoration-color: var(--rx-gold-soft); text-underline-offset: 3px; }
html[data-skin="royaume"] .verse-ref { font-family: var(--font-display); font-size: 12px; color: var(--rx-gold-ink); }
html[data-skin="royaume"] :is(.urne-sub b, .qs-gage, .qs-fire) { color: var(--rx-gold-ink); }

/* ---------- 12. Mouvement : sobre, respecté ---------- */
@media (prefers-reduced-motion: reduce) {
  html[data-skin="royaume"] *, html[data-skin="royaume"] *::before, html[data-skin="royaume"] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
