/* ==========================================================================
   Auction Oracle — "Le Sanctuaire de l'Oracle" (design/FANTASY_ART_DIRECTION.md)
   Loaded after theme.css + style.css. Tokens apply to the default theme (oracle-dark = "Sanctum");
   ornaments are scoped to it with [data-theme="oracle-dark"] (shortcut below: S). Other themes keep their look,
   with the shared typography and motion upgrades.
   ========================================================================== */

/* ---------- fonts (self-hosted, SIL OFL 1.1 — see assets/sanctum/fonts/OFL-*.txt) ---------- */
@font-face { font-family: "Cinzel"; font-weight: 600; font-display: swap; src: url(/ui/assets/sanctum/fonts/cinzel-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 700; font-display: swap; src: url(/ui/assets/sanctum/fonts/cinzel-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Cinzel"; font-weight: 500; font-display: swap; src: url(/ui/assets/sanctum/fonts/cinzel-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(/ui/assets/sanctum/fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(/ui/assets/sanctum/fonts/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url(/ui/assets/sanctum/fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url(/ui/assets/sanctum/fonts/inter-latin-700-normal.woff2) format("woff2"); }

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

/* ---------- tokens ---------- */
:root {
  /* palette */
  --gold-300: #f2d38a; --gold-500: #d4a94f; --gold-700: #8e6a2c; --bronze: #9a6a35;
  --arcane-300: #c4a7ff; --arcane-500: #8b5cf6; --arcane-700: #5b2fc2; --aqua: #3fd0c9; --ivory: #efe6d2;
  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1); --dur-fast: 150ms; --dur: 260ms; --dur-data: 600ms;
  /* spacing & shape */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px;
  --icon-accent: var(--gold-500);
  /* type scale */
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-base: 13.5px; --fs-lg: 16px; --fs-xl: 22px; --fs-2xl: 30px;
  --font-ui: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num: "Inter", "Segoe UI", system-ui, sans-serif;
}
:root, [data-theme="oracle-dark"] {
  --bg: #060813; --bg2: #0a0f1e; --panel: rgba(13, 19, 36, .82); --panel-solid: #0d1324; --panel2: rgba(32, 38, 66, .5);
  --line: rgba(212, 169, 79, .12); --line2: rgba(212, 169, 79, .26);
  --fg: #efe6d2; --muted: #a79f8d; --dim: #7a7466;
  --accent: #8b5cf6; --on-accent: #ffffff; --accent-2: #3fd0c9; --premium: #d4a94f;
  --link: #8fe0da; --up: #3ccf8e; --down: #ef5b5b; --warn: #f0a640; --info: #6aa8ff; --predicted: #c4a7ff;
  --gold: #e8c46e; --silver: #c7ccd6; --copper: #d39060;
  --nav-bg: linear-gradient(180deg, rgba(10, 12, 26, .96), rgba(6, 8, 18, .97));
  --top-bg: rgba(6, 8, 19, .78);
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 18px 42px rgba(0, 0, 0, .55);
  --glow: 0 0 0 1px rgba(196, 167, 255, .5), 0 0 22px rgba(139, 92, 246, .3);
  --font-display: "Cinzel", "Palatino Linotype", Georgia, serif; --display-case: uppercase; --display-spacing: .06em;
  --frame-premium: linear-gradient(140deg, rgba(242, 211, 138, .6), rgba(154, 106, 53, .22) 38%, rgba(139, 92, 246, .32) 100%);
  --frame-legendary: conic-gradient(from var(--spin), #f2d38a, #8b5cf6 25%, #3fd0c9 45%, #d4a94f 65%, #8b5cf6 85%, #f2d38a);
  --glass: none;  /* measured: backdrop blur + ambient animation = 15 fps; panels are near-opaque anyway */
  --art-opacity: .30; --art-filter: saturate(1.1) brightness(.85);
  --art-overlay: radial-gradient(120% 80% at 70% 0%, rgba(6, 8, 19, .25), rgba(6, 8, 19, .86) 55%, var(--bg) 85%);
}

/* ---------- base typography (all themes) ---------- */
html, body { font: var(--fs-base)/1.5 var(--font-ui); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
.money, td.num, th.num, .kpi .v, .stat-strip b, .bell span, .hero-val, .rec-side { font-variant-numeric: tabular-nums lining-nums; }
h1, h2, h3 { text-wrap: balance; }

/* ==========================================================================
   SANCTUM ornaments — default theme only
   ========================================================================== */
[data-theme="oracle-dark"] body {
  background:
    radial-gradient(900px 520px at 12% -8%, rgba(139, 92, 246, .16), transparent 70%),
    radial-gradient(800px 600px at 105% 108%, rgba(212, 169, 79, .10), transparent 70%),
    radial-gradient(600px 400px at 60% 40%, rgba(63, 208, 201, .035), transparent 70%),
    var(--bg);
}
/* constellation + grain veil over the whole app */
[data-theme="oracle-dark"] #bgArt::after {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cg fill='%23f2d38a'%3E%3Ccircle cx='22' cy='40' r='.9' opacity='.5'/%3E%3Ccircle cx='140' cy='18' r='.6' opacity='.4'/%3E%3Ccircle cx='260' cy='70' r='1.1' opacity='.55'/%3E%3Ccircle cx='300' cy='210' r='.7' opacity='.35'/%3E%3Ccircle cx='190' cy='160' r='.8' opacity='.45'/%3E%3Ccircle cx='70' cy='250' r='1' opacity='.5'/%3E%3Ccircle cx='110' cy='120' r='.5' opacity='.3'/%3E%3Ccircle cx='230' cy='290' r='.6' opacity='.35'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 320px 320px,
    var(--art-overlay);
}

/* ---------- panels: stone & glass, engraved hairline ---------- */
[data-theme="oracle-dark"] .panel {
  background: linear-gradient(180deg, rgba(22, 28, 52, .80), rgba(10, 14, 28, .86));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(242, 211, 138, .07), inset 0 0 0 1px rgba(255, 255, 255, .015), 0 10px 30px rgba(0, 0, 0, .35);
  border-radius: var(--radius); padding: 15px 17px;
}
[data-theme="oracle-dark"] .panel h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 12.5px; letter-spacing: .12em; color: var(--gold-300);
  text-shadow: 0 0 18px rgba(212, 169, 79, .25); padding-bottom: 9px; margin-bottom: 12px; position: relative;
}
[data-theme="oracle-dark"] .panel h2::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(212, 169, 79, .55), rgba(212, 169, 79, .12) 45%, transparent);
}
[data-theme="oracle-dark"] .panel h2 .dim, [data-theme="oracle-dark"] .panel h2 small, [data-theme="oracle-dark"] .panel h2 .xs {
  font-family: var(--font-ui); letter-spacing: .02em; text-transform: none; text-shadow: none; color: var(--muted); font-weight: 500;
}
[data-theme="oracle-dark"] .panel h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: .05em; color: var(--ivory); font-size: 13.5px; }

/* filigree corners: premium & legendary only */
[data-theme="oracle-dark"] .panel.premium::after, [data-theme="oracle-dark"] .panel.legendary::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none; opacity: .55; filter: drop-shadow(0 0 4px rgba(212, 169, 79, .35));
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' fill='none' stroke='%23d4a94f' stroke-width='1.1'%3E%3Cg transform=''%3E%3Cpath d='M1 25V9a8 8 0 0 1 8-8h16'/%3E%3Cpath d='M5 25V12a7 7 0 0 1 7-7h13' opacity='.45'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23f2d38a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") top left / 18px 18px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' fill='none' stroke='%23d4a94f' stroke-width='1.1'%3E%3Cg transform='translate(26 0) scale(-1 1)'%3E%3Cpath d='M1 25V9a8 8 0 0 1 8-8h16'/%3E%3Cpath d='M5 25V12a7 7 0 0 1 7-7h13' opacity='.45'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23f2d38a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") top right / 18px 18px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' fill='none' stroke='%23d4a94f' stroke-width='1.1'%3E%3Cg transform='translate(0 26) scale(1 -1)'%3E%3Cpath d='M1 25V9a8 8 0 0 1 8-8h16'/%3E%3Cpath d='M5 25V12a7 7 0 0 1 7-7h13' opacity='.45'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23f2d38a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") bottom left / 18px 18px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='26' fill='none' stroke='%23d4a94f' stroke-width='1.1'%3E%3Cg transform='translate(26 26) scale(-1 -1)'%3E%3Cpath d='M1 25V9a8 8 0 0 1 8-8h16'/%3E%3Cpath d='M5 25V12a7 7 0 0 1 7-7h13' opacity='.45'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23f2d38a' stroke='none'/%3E%3C/g%3E%3C/svg%3E") bottom right / 18px 18px no-repeat;
}
[data-theme="oracle-dark"] .panel.premium, [data-theme="oracle-dark"] .kpi.premium {
  background: linear-gradient(180deg, rgba(24, 28, 52, .97), rgba(11, 14, 29, .97)) padding-box, var(--frame-premium) border-box;
}
[data-theme="oracle-dark"] .panel.legendary {
  background: linear-gradient(180deg, rgba(26, 24, 54, .97), rgba(10, 12, 27, .98)) padding-box, var(--frame-legendary) border-box;
  box-shadow: 0 0 40px rgba(139, 92, 246, .14), 0 0 18px rgba(212, 169, 79, .10), var(--shadow);
}
html.fx-full[data-theme="oracle-dark"] .panel.legendary { animation: ao-spin 18s linear infinite; }
@keyframes ao-spin { to { --spin: 360deg; } }
[data-theme="oracle-dark"] .panel.legendary::before {
  width: 14px; height: 14px; top: -8px;
  background: radial-gradient(circle at 35% 30%, #fff6da, #f2d38a 35%, #b5832f 75%);
  border: 1px solid #5e4214; box-shadow: 0 0 14px rgba(242, 211, 138, .7), 0 0 30px rgba(139, 92, 246, .35);
}
[data-theme="oracle-dark"] .panel.legendary h2 { color: var(--gold-300); }

/* ---------- KPI artefacts ---------- */
[data-theme="oracle-dark"] .kpi {
  background: linear-gradient(165deg, rgba(28, 32, 60, .85), rgba(10, 13, 27, .9) 60%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 14px; min-height: 104px;
  box-shadow: inset 0 1px 0 rgba(242, 211, 138, .07), 0 8px 24px rgba(0, 0, 0, .3);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast), box-shadow var(--dur-fast);
}
[data-theme="oracle-dark"] .kpi::after { height: 1px; opacity: .9; background: linear-gradient(90deg, transparent, rgba(242, 211, 138, .65), transparent); }
[data-theme="oracle-dark"] .kpi:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: inset 0 1px 0 rgba(242, 211, 138, .1), 0 14px 30px rgba(0, 0, 0, .4), 0 0 0 1px rgba(212, 169, 79, .08); }
[data-theme="oracle-dark"] .kpi .l { font-family: var(--font-display); font-weight: 700; letter-spacing: .07em; font-size: 10.5px; color: var(--muted); padding-right: 36px; }
[data-theme="oracle-dark"] .kpi .v { font-size: 24px; font-weight: 600; color: var(--ivory); margin-top: 8px; letter-spacing: -.01em; }
[data-theme="oracle-dark"] .kpi .s { color: var(--muted); }
.kpi-seal { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(242, 211, 138, .22), rgba(20, 22, 42, .9) 70%);
  border: 1px solid rgba(212, 169, 79, .45); box-shadow: inset 0 0 10px rgba(0, 0, 0, .6), 0 0 14px rgba(212, 169, 79, .12); color: var(--gold-300); }
.kpi-seal svg { width: 17px; height: 17px; }
.kpi[data-art="crystal"] .kpi-seal, .kpi[data-art="grimoire"] .kpi-seal { color: var(--arcane-300); --icon-accent: var(--aqua); border-color: rgba(139, 92, 246, .5);
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, .3), rgba(20, 22, 42, .9) 70%); }
html:not([data-theme="oracle-dark"]) .kpi-seal { display: none; }

/* ---------- buttons: arcane gem & gilded ghost ---------- */
[data-theme="oracle-dark"] button, [data-theme="oracle-dark"] .btn {
  background: linear-gradient(180deg, #a07cff 0%, #7c4ff0 48%, #5f35d0 100%); color: #fff; border: 1px solid rgba(196, 167, 255, .55);
  border-radius: var(--radius-sm); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 18px rgba(91, 47, 194, .35);
  text-shadow: 0 1px 1px rgba(30, 10, 70, .5); letter-spacing: .01em;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast), filter var(--dur-fast);
}
[data-theme="oracle-dark"] button:hover, [data-theme="oracle-dark"] .btn:hover { filter: brightness(1.1); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(196, 167, 255, .55), 0 0 24px rgba(139, 92, 246, .45); transform: translateY(-1px); }
[data-theme="oracle-dark"] button:active { transform: translateY(1px); }
[data-theme="oracle-dark"] button.ghost, [data-theme="oracle-dark"] .btn.ghost, [data-theme="oracle-dark"] .fav-btn, [data-theme="oracle-dark"] button.icon-btn {
  background: rgba(212, 169, 79, .04); color: var(--ivory); border: 1px solid rgba(212, 169, 79, .35); box-shadow: none; text-shadow: none; }
[data-theme="oracle-dark"] button.ghost:hover, [data-theme="oracle-dark"] .fav-btn:hover, [data-theme="oracle-dark"] button.icon-btn:hover {
  border-color: var(--gold-300); color: var(--gold-300); background: rgba(212, 169, 79, .09); box-shadow: 0 0 16px rgba(212, 169, 79, .18); }
[data-theme="oracle-dark"] button.danger { background: rgba(239, 91, 91, .06); color: var(--down); border-color: rgba(239, 91, 91, .45); box-shadow: none; text-shadow: none; }
[data-theme="oracle-dark"] .chip, [data-theme="oracle-dark"] .tabs button { background: rgba(32, 38, 66, .55); color: var(--muted); border: 1px solid var(--line2); text-shadow: none; box-shadow: none; }
[data-theme="oracle-dark"] .tabs button.on { color: var(--gold-300); border-color: var(--gold-500); box-shadow: 0 0 14px rgba(212, 169, 79, .2); background: rgba(212, 169, 79, .08); }

/* ---------- inputs ---------- */
[data-theme="oracle-dark"] input, [data-theme="oracle-dark"] select, [data-theme="oracle-dark"] textarea {
  background: rgba(5, 7, 16, .7); border: 1px solid rgba(212, 169, 79, .22); border-radius: var(--radius-sm); color: var(--ivory);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
[data-theme="oracle-dark"] input:focus, [data-theme="oracle-dark"] select:focus, [data-theme="oracle-dark"] textarea:focus {
  border-color: var(--gold-500); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45), 0 0 0 3px rgba(212, 169, 79, .16); }
[data-theme="oracle-dark"] :focus-visible { outline-color: var(--gold-300); }

/* ---------- tables: parchment header, bronze hairlines ---------- */
[data-theme="oracle-dark"] th { background: linear-gradient(180deg, #151a30, #10142a); color: var(--gold-300); font-weight: 600; letter-spacing: .08em;
  border-bottom: 1px solid rgba(212, 169, 79, .35); font-size: 10.5px; }
[data-theme="oracle-dark"] td { border-bottom: 1px solid rgba(212, 169, 79, .07); }
[data-theme="oracle-dark"] tr:hover td { background: linear-gradient(90deg, rgba(139, 92, 246, .09), rgba(139, 92, 246, .02)); }
[data-theme="oracle-dark"] .item-link { border-bottom-color: rgba(212, 169, 79, .3); }
[data-theme="oracle-dark"] .item-link:hover { color: var(--gold-300); }

/* ---------- badges: set gems ---------- */
[data-theme="oracle-dark"] .badge { border-radius: 5px; padding: 1px 7px; background: rgba(255, 255, 255, .025); letter-spacing: .06em; font-size: 10px; font-weight: 700; }
[data-theme="oracle-dark"] .b-OBSERVED { background: rgba(60, 207, 142, .08); }
[data-theme="oracle-dark"] .b-ESTIMATED { background: rgba(106, 168, 255, .08); }
[data-theme="oracle-dark"] .b-PREDICTED { background: rgba(196, 167, 255, .09); }
[data-theme="oracle-dark"] .bar { background: rgba(255, 255, 255, .06); height: 6px; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .5); }
[data-theme="oracle-dark"] .bar > i { background: linear-gradient(90deg, var(--arcane-500), var(--arcane-300)); box-shadow: 0 0 8px rgba(139, 92, 246, .5);
  transition: width var(--dur-data) var(--ease); }
[data-theme="oracle-dark"] .bar.green > i { background: linear-gradient(90deg, #2fae77, #6fe3b0); box-shadow: 0 0 8px rgba(60, 207, 142, .45); }

/* ---------- empty states: closed grimoire ---------- */
[data-theme="oracle-dark"] .empty { border: 1px dashed rgba(212, 169, 79, .25); background: radial-gradient(circle at 50% 0, rgba(139, 92, 246, .08), transparent 70%), rgba(10, 13, 27, .5);
  padding: 22px 18px 18px; }
[data-theme="oracle-dark"] .empty::before { content: ""; display: block; width: 46px; height: 46px; margin: 0 auto 8px; opacity: .85;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23d4a94f' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M10 8h24a4 4 0 0 1 4 4v28H14a4 4 0 0 1-4-4z'/%3E%3Cpath d='M10 36a4 4 0 0 1 4-4h24' opacity='.6'/%3E%3Cpath d='M24 15l2 4.5 4.5 2-4.5 2-2 4.5-2-4.5-4.5-2 4.5-2z' fill='%23c4a7ff' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat; }
[data-theme="oracle-dark"] .empty b { color: var(--gold-300); font-family: var(--font-display); letter-spacing: .06em; }

/* ---------- loading: arcane shimmer, AI crystal ---------- */
[data-theme="oracle-dark"] .loading { color: var(--muted); }
[data-theme="oracle-dark"] .loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  transform: rotate(45deg); background: linear-gradient(135deg, var(--arcane-300), var(--arcane-700)); box-shadow: 0 0 10px var(--arcane-500);
  animation: ao-pulse 1.4s ease-in-out infinite; }
@keyframes ao-pulse { 0%, 100% { opacity: .45; transform: rotate(45deg) scale(.85); } 50% { opacity: 1; transform: rotate(45deg) scale(1.1); } }
[data-theme="oracle-dark"] .msg.bot .loading, [data-theme="oracle-dark"] .msg.bot.loading {
  display: inline-flex; align-items: center; gap: 4px; color: var(--arcane-300); font-family: var(--font-display); letter-spacing: .08em; }
[data-theme="oracle-dark"] .msg.bot:has(.loading), [data-theme="oracle-dark"] .msg.bot.loading {
  border-color: rgba(139, 92, 246, .55); box-shadow: 0 0 0 1px rgba(139, 92, 246, .2), 0 0 26px rgba(139, 92, 246, .25);
  animation: ao-oracle-think 2.2s ease-in-out infinite; }
@keyframes ao-oracle-think { 50% { box-shadow: 0 0 0 1px rgba(196, 167, 255, .45), 0 0 36px rgba(139, 92, 246, .45); } }
[data-theme="oracle-dark"] .msg { border-radius: 12px; }
[data-theme="oracle-dark"] .msg.user { background: linear-gradient(135deg, rgba(139, 92, 246, .28), rgba(91, 47, 194, .2)); border: 1px solid rgba(196, 167, 255, .3); }
[data-theme="oracle-dark"] .msg.bot { background: linear-gradient(180deg, rgba(24, 28, 52, .9), rgba(12, 15, 30, .9)); border: 1px solid var(--line2); animation: ao-rise var(--dur) var(--ease); }

/* ==========================================================================
   Navigation: guild banner
   ========================================================================== */
[data-theme="oracle-dark"] #nav { background: var(--nav-bg); border-right: 1px solid rgba(212, 169, 79, .16);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, .6), 8px 0 30px rgba(0, 0, 0, .35); }
[data-theme="oracle-dark"] #nav::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(260px 220px at 50% 0, rgba(139, 92, 246, .16), transparent 70%),
    repeating-linear-gradient(90deg, transparent 0 22px, rgba(212, 169, 79, .018) 22px 23px); }
[data-theme="oracle-dark"] .brand { border-bottom: 1px solid rgba(212, 169, 79, .16); position: relative; padding: 16px 14px 14px; }
[data-theme="oracle-dark"] .brand::after { content: ""; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent); }
[data-theme="oracle-dark"] .brand-text b { font-family: var(--font-display); font-weight: 700; letter-spacing: .07em; font-size: 13.5px;
  background: linear-gradient(180deg, #fff3cf, #e0b75e 55%, #9a6a35); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-theme="oracle-dark"] .brand-text small { letter-spacing: .04em; }
.brand-emblem { width: 40px; height: 40px; flex: none; }
.brand-emblem svg { width: 100%; height: 100%; overflow: visible; }
html:not([data-theme="oracle-dark"]) .brand-emblem { display: none; }
[data-theme="oracle-dark"] .brand-emblem + .brand-mark, [data-theme="oracle-dark"] .brand .brand-mark { display: none; }

.si { width: 20px; height: 20px; flex: none; color: currentColor; }
.nav-socket { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; position: relative;
  color: var(--muted); background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .06), rgba(8, 10, 22, .9) 70%);
  border: 1px solid rgba(212, 169, 79, .22); box-shadow: inset 0 0 8px rgba(0, 0, 0, .7);
  transition: color var(--dur-fast), border-color var(--dur-fast), box-shadow var(--dur), transform var(--dur-fast) var(--ease); }
.nav-socket .si { width: 18px; height: 18px; }
html:not([data-theme="oracle-dark"]) .nav-socket { display: none; }
[data-theme="oracle-dark"] .nav-link .nav-ic { display: none; }
[data-theme="oracle-dark"] .nav-link { padding: 6px 10px; gap: 11px; border-radius: 10px; color: var(--muted); font-weight: 500; letter-spacing: .01em; }
[data-theme="oracle-dark"] .nav-link.nav-section { font-family: var(--font-display); font-weight: 600; letter-spacing: .07em; font-size: 12.5px; }
[data-theme="oracle-dark"] .nav-link:hover { background: rgba(212, 169, 79, .05); color: var(--ivory); }
[data-theme="oracle-dark"] .nav-link:hover .nav-socket { color: var(--gold-300); border-color: rgba(212, 169, 79, .5); transform: scale(1.05); }
[data-theme="oracle-dark"] .nav-link.active { background: linear-gradient(90deg, rgba(139, 92, 246, .2), rgba(139, 92, 246, .04) 70%, transparent);
  border-color: rgba(196, 167, 255, .25); color: var(--ivory); }
[data-theme="oracle-dark"] .nav-link.active .nav-socket { color: #fff; --icon-accent: var(--gold-300); border-color: rgba(196, 167, 255, .8);
  background: radial-gradient(circle at 40% 35%, #a68bff, #5b2fc2 70%); box-shadow: 0 0 0 3px rgba(139, 92, 246, .15), 0 0 18px rgba(139, 92, 246, .6); }
[data-theme="oracle-dark"] .nav-link.active::before { left: -9px; width: 4px; top: 8px; bottom: 8px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold-300), var(--gold-700)); box-shadow: 0 0 12px rgba(242, 211, 138, .8); }
html.fx-full[data-theme="oracle-dark"] .nav-link.active .nav-socket { animation: ao-socket 3.6s ease-in-out infinite; }
@keyframes ao-socket { 50% { box-shadow: 0 0 0 4px rgba(139, 92, 246, .1), 0 0 26px rgba(139, 92, 246, .75); } }
[data-theme="oracle-dark"] .nav-subs { border-left: 1px solid transparent; border-image: linear-gradient(180deg, rgba(212, 169, 79, .55), rgba(212, 169, 79, .05)) 1; margin-left: 26px; }
[data-theme="oracle-dark"] .nav-sub { position: relative; color: var(--muted); }
[data-theme="oracle-dark"] .nav-sub.active { color: var(--gold-300); background: rgba(212, 169, 79, .07); }
[data-theme="oracle-dark"] .nav-sub.active::before { content: ""; position: absolute; left: -14px; top: 50%; width: 7px; height: 7px; transform: translateY(-50%) rotate(45deg);
  background: var(--gold-300); box-shadow: 0 0 8px var(--gold-500); }
[data-theme="oracle-dark"] .nav-secondary, [data-theme="oracle-dark"] .nav-foot { border-top: 1px solid rgba(212, 169, 79, .12); }
[data-theme="oracle-dark"] .nav-secondary .nav-socket { width: 26px; height: 26px; } [data-theme="oracle-dark"] .nav-secondary .si { width: 15px; height: 15px; }
[data-theme="oracle-dark"] .nav-badge { background: linear-gradient(180deg, #ff7a7a, #c93636); box-shadow: 0 0 10px rgba(239, 91, 91, .5); }

/* ---------- top bar ---------- */
[data-theme="oracle-dark"] #topbar { border-bottom: 1px solid rgba(212, 169, 79, .14); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
[data-theme="oracle-dark"] #topbar h1 { font-family: var(--font-display); font-weight: 700; letter-spacing: .09em; font-size: 19px;
  background: linear-gradient(180deg, #fff6dc, #e8c46e 60%, #a8762f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-socket { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--gold-300); flex: none;
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, .35), rgba(12, 14, 30, .95) 70%); border: 1px solid rgba(212, 169, 79, .4);
  box-shadow: 0 0 18px rgba(139, 92, 246, .25), inset 0 0 10px rgba(0, 0, 0, .6); --icon-accent: var(--aqua); }
.page-socket .si { width: 22px; height: 22px; }
html:not([data-theme="oracle-dark"]) .page-socket { display: none; }
[data-theme="oracle-dark"] .page-socket + .page-ic, [data-theme="oracle-dark"] #pageIcon { display: none; }
[data-theme="oracle-dark"] .search-trigger { background: rgba(5, 7, 16, .6); border-color: rgba(212, 169, 79, .22); color: var(--muted); text-shadow: none; box-shadow: none; }
[data-theme="oracle-dark"] .search-trigger:hover { border-color: var(--gold-500); color: var(--ivory); box-shadow: 0 0 16px rgba(212, 169, 79, .15); transform: none; }
[data-theme="oracle-dark"] .bell { background: rgba(5, 7, 16, .6); border-color: rgba(212, 169, 79, .25); }
[data-theme="oracle-dark"] .data-banner { border-radius: 10px; background: linear-gradient(90deg, rgba(212, 169, 79, .08), rgba(212, 169, 79, .02)); border-color: rgba(212, 169, 79, .25); }
[data-theme="oracle-dark"] .data-banner.warn { background: linear-gradient(90deg, rgba(240, 166, 64, .12), rgba(240, 166, 64, .03)); border-color: rgba(240, 166, 64, .45); }
[data-theme="oracle-dark"] .ask-fab { background: linear-gradient(135deg, #8b5cf6, #5b2fc2 60%, #3fd0c9 140%); border: 1px solid rgba(196, 167, 255, .6);
  box-shadow: 0 10px 30px rgba(91, 47, 194, .5), 0 0 24px rgba(139, 92, 246, .35); font-family: var(--font-display); letter-spacing: .05em; }

/* ==========================================================================
   Sanctum hero (Oracle home)
   ========================================================================== */
.sanctum-hero { position: relative; overflow: hidden; border-radius: 16px; margin-bottom: 16px; min-height: 210px; isolation: isolate;
  border: 1px solid rgba(212, 169, 79, .3); box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(242, 211, 138, .12);
  background: #090b1a; display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 26px; }
.sanctum-hero::before { content: ""; position: absolute; inset: 0; z-index: -2;
  background: image-set(url(/ui/assets/backgrounds/fantasy/background-oracle-arcane-library.avif) type("image/avif"),
    url(/ui/assets/backgrounds/fantasy/background-oracle-arcane-library.webp) type("image/webp")) center 35% / cover no-repeat;
  opacity: .5; filter: saturate(1.15) brightness(.8); }
.sanctum-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(420px 260px at 12% 50%, rgba(139, 92, 246, .32), transparent 70%),
    linear-gradient(90deg, rgba(6, 8, 19, .55), rgba(6, 8, 19, .72) 45%, rgba(6, 8, 19, .92)),
    linear-gradient(0deg, rgba(6, 8, 19, .85), transparent 55%); }
.sanctum-hero .hero-emblem { width: 132px; height: 132px; position: relative; }
.sanctum-hero .hero-emblem svg { width: 100%; height: 100%; overflow: visible; }
.sanctum-hero .hero-kicker { font: 600 11px/1 var(--font-ui); letter-spacing: .28em; text-transform: uppercase; color: var(--aqua); opacity: .9; }
.sanctum-hero h2.hero-title { margin: 8px 0 6px; font-family: "Cinzel", Georgia, serif; font-weight: 700; font-size: clamp(22px, 2.6vw, 34px);
  letter-spacing: .08em; line-height: 1.1; background: linear-gradient(180deg, #fff7df, #eccb7a 55%, #a8762f);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 12px rgba(212, 169, 79, .25)); }
.sanctum-hero .hero-sub { color: var(--muted); max-width: 520px; }
.sanctum-hero .hero-sub b { color: var(--ivory); }
.hero-sigils { display: grid; grid-template-columns: repeat(2, minmax(118px, 1fr)); gap: 10px; }
.sigil { position: relative; padding: 10px 12px 10px 44px; border-radius: 12px; background: rgba(8, 10, 22, .72); border: 1px solid rgba(212, 169, 79, .22);
  box-shadow: inset 0 1px 0 rgba(242, 211, 138, .06); min-width: 0; }
.sigil .si { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--gold-300); --icon-accent: var(--aqua); }
.sigil .k { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.sigil .v { font-size: 17px; font-weight: 600; color: var(--ivory); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sigil.good .v { color: var(--up); } .sigil.mid .v { color: var(--warn); } .sigil.bad .v { color: var(--down); }

/* emblem animation (SVG classes set in sanctum.js) */
.em-ring { transform-origin: 60px 60px; }
html.fx-full .em-ring.r1 { animation: ao-rot 60s linear infinite; }
html.fx-full .em-ring.r2 { animation: ao-rot 38s linear infinite reverse; }
html.fx-full .em-core { animation: ao-core 5s ease-in-out infinite; transform-origin: 60px 60px; }
html.fx-full .em-glow { animation: ao-glow 5s ease-in-out infinite; }
@keyframes ao-rot { to { transform: rotate(360deg); } }
@keyframes ao-core { 50% { transform: scale(1.04); filter: brightness(1.15); } }
@keyframes ao-glow { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }

/* ---------- Oracle of the day: legendary item cards ---------- */
[data-theme="oracle-dark"] .oracle-hero h2 { font-size: 14px; }
[data-theme="oracle-dark"] .hero-actions { gap: 14px; }
[data-theme="oracle-dark"] .hero-card { --rar: var(--gold-500); position: relative; overflow: hidden; padding: 14px 14px 14px 12px; border-radius: 12px;
  grid-template-columns: 34px 1fr auto; background: linear-gradient(160deg, rgba(30, 30, 60, .9), rgba(10, 12, 26, .95) 70%);
  border: 1px solid color-mix(in srgb, var(--rar) 45%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 1px rgba(0, 0, 0, .4), 0 10px 28px rgba(0, 0, 0, .4), 0 0 22px color-mix(in srgb, var(--rar) 12%, transparent);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur), border-color var(--dur); }
[data-theme="oracle-dark"] .hero-card[data-q="0"] { --rar: #9d9d9d; } [data-theme="oracle-dark"] .hero-card[data-q="1"] { --rar: #cfc7b5; }
[data-theme="oracle-dark"] .hero-card[data-q="2"] { --rar: #1eff00; } [data-theme="oracle-dark"] .hero-card[data-q="3"] { --rar: #3d8ff0; }
[data-theme="oracle-dark"] .hero-card[data-q="4"] { --rar: #b257f5; } [data-theme="oracle-dark"] .hero-card[data-q="5"] { --rar: #ff8000; }
[data-theme="oracle-dark"] .hero-card::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 244, 214, .16), transparent); transform: skewX(-18deg) translateX(-30%); opacity: 0; }
html.fx-full[data-theme="oracle-dark"] .hero-card:hover::after { animation: ao-shine .9s var(--ease); }
@keyframes ao-shine { 0% { opacity: 0; transform: skewX(-18deg) translateX(-40%); } 30% { opacity: 1; } 100% { opacity: 0; transform: skewX(-18deg) translateX(480%); } }
[data-theme="oracle-dark"] .hero-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--rar) 80%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 36px rgba(0, 0, 0, .5), 0 0 30px color-mix(in srgb, var(--rar) 25%, transparent); }
[data-theme="oracle-dark"] .hero-n { width: 30px; height: 30px; font-family: var(--font-display); background: radial-gradient(circle at 35% 30%, #fff1c6, #d4a94f 45%, #7b5520);
  color: #2a1a05; box-shadow: 0 0 12px rgba(212, 169, 79, .5); border: 1px solid #5e4214; }
[data-theme="oracle-dark"] .hero-item img.item-ic, [data-theme="oracle-dark"] .hero-item .item-ic.ph { width: 42px; height: 42px; border-radius: 8px; border-width: 2px;
  box-shadow: 0 0 14px color-mix(in srgb, var(--rar) 35%, transparent); }
[data-theme="oracle-dark"] .hero-item b { font-size: 14px; color: var(--ivory); }
[data-theme="oracle-dark"] .hero-val b { font-size: 15px; }

/* ---------- personal dashboard (D-01) ---------- */
[data-theme="oracle-dark"] .rec { background: linear-gradient(160deg, rgba(28, 30, 58, .8), rgba(10, 12, 26, .9)); border: 1px solid var(--line2); border-radius: 12px;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast), box-shadow var(--dur-fast); }
[data-theme="oracle-dark"] .rec:hover { transform: translateX(3px); border-color: rgba(212, 169, 79, .5); box-shadow: 0 0 22px rgba(212, 169, 79, .12); }
[data-theme="oracle-dark"] .rec-n { font-family: var(--font-display); color: var(--gold-300); }
[data-theme="oracle-dark"] .rec-glyph { color: var(--gold-300); border-color: rgba(212, 169, 79, .35); background: radial-gradient(circle, rgba(139, 92, 246, .25), rgba(8, 10, 22, .9)); }
[data-theme="oracle-dark"] .dash-title { font-family: var(--font-display); color: var(--gold-300); letter-spacing: .08em; }

/* ---------- auth cards ---------- */
[data-theme="oracle-dark"] .auth-card { max-width: 440px; margin: 4vh auto 0; padding: 26px 28px;
  background: linear-gradient(180deg, rgba(26, 24, 54, .96), rgba(10, 12, 27, .98)) padding-box, var(--frame-premium) border-box; border: 1px solid transparent; }
[data-theme="oracle-dark"] .auth-card h2 { justify-content: center; font-size: 16px; }
[data-theme="oracle-dark"] .auth-card h2::before { content: ""; width: 22px; height: 22px; margin-right: 6px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f2d38a' stroke-width='1.6' stroke-linejoin='round'%3E%3Cpath d='M12 2.5 19.5 12 12 21.5 4.5 12z'/%3E%3Ccircle cx='12' cy='12' r='1.6' fill='%23c4a7ff' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- item page ---------- */
[data-theme="oracle-dark"] .item-hero h2 { font-family: var(--font-display); letter-spacing: .05em; color: var(--ivory); text-transform: none; }
[data-theme="oracle-dark"] .stat-strip > div { background: rgba(8, 10, 22, .6); border: 1px solid rgba(212, 169, 79, .14); border-radius: 9px; }
[data-theme="oracle-dark"] .stat-strip span { color: var(--gold-300); opacity: .8; }

/* ---------- charts ---------- */
svg.chart path.ao-line { stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 55%, transparent)); }
html.fx-full svg.chart path.ao-line { stroke-dasharray: var(--len, 4000); stroke-dashoffset: var(--len, 4000); animation: ao-draw 900ms var(--ease) forwards; }
@keyframes ao-draw { to { stroke-dashoffset: 0; } }
svg.chart path.ao-area { opacity: .9; }
[data-theme="oracle-dark"] svg.chart text { fill: var(--muted); font-family: var(--font-num); }
[data-theme="oracle-dark"] .tip { background: linear-gradient(180deg, #1a1d36, #0d1024); border: 1px solid rgba(212, 169, 79, .4); border-radius: 9px; color: var(--ivory);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .6), 0 0 18px rgba(139, 92, 246, .15); }

/* ---------- modal / palette / toasts ---------- */
[data-theme="oracle-dark"] .modal-box, [data-theme="oracle-dark"] .palette-box, [data-theme="oracle-dark"] .ask-panel {
  background: linear-gradient(180deg, #11152b, #080b18); border-color: rgba(212, 169, 79, .3); }
[data-theme="oracle-dark"] .toast { background: linear-gradient(180deg, #15192f, #0b0e20); border-color: rgba(212, 169, 79, .3); border-left-color: var(--arcane-500); }

/* ==========================================================================
   Motion: page transitions, staggered reveal (only when effects are on)
   ========================================================================== */
@keyframes ao-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.fx-full #view.ao-enter > *, html.fx-lite #view.ao-enter > * { animation: ao-rise var(--dur) var(--ease) both; }
html.fx-full #view.ao-enter .grid > .panel, html.fx-full #view.ao-enter .grid > .kpi,
html.fx-full #view.ao-enter .hero-actions > .hero-card { animation: ao-rise 380ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
#fxCanvas { position: fixed; inset: 0 0 0 var(--nav-w); z-index: 0; pointer-events: none; }
html:not(.fx-full) #fxCanvas { display: none; }

/* ==========================================================================
   Mobile: compact header, bottom tab bar
   ========================================================================== */
#tabbar { display: none; }
@media (max-width: 900px) {
  [data-theme="oracle-dark"] #topbar { padding: 8px 12px; gap: 8px; }
  #topbar .top-right { width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; padding-bottom: 2px; }
  #topbar .top-right::-webkit-scrollbar { display: none; }
  #topbar .top-right > * { flex: none; }
  .page-socket { width: 34px; height: 34px; }
  [data-theme="oracle-dark"] #topbar h1 { font-size: 17px; }
  #tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(10, 12, 26, .94), rgba(5, 6, 14, .98));
    border-top: 1px solid rgba(212, 169, 79, .25); box-shadow: 0 -10px 30px rgba(0, 0, 0, .5); }
  #tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 48px; justify-content: center; color: var(--muted);
    font-size: 10px; letter-spacing: .04em; border-radius: 10px; text-decoration: none; }
  #tabbar a .si { width: 22px; height: 22px; }
  #tabbar a.on { color: var(--gold-300); background: radial-gradient(circle at 50% 30%, rgba(139, 92, 246, .3), transparent 70%); }
  #tabbar a.on .si { filter: drop-shadow(0 0 6px rgba(139, 92, 246, .8)); }
  #view { padding-bottom: 96px !important; }
  .ask-fab { display: none !important; }
  .sanctum-hero { grid-template-columns: 1fr; text-align: center; padding: 18px 16px; gap: 12px; }
  .sanctum-hero .hero-emblem { width: 96px; height: 96px; margin: 0 auto; }
  .sanctum-hero .hero-kicker { letter-spacing: .14em; }
  .hero-sigils { grid-template-columns: 1fr 1fr; text-align: left; }
  [data-theme="oracle-dark"] .kpi .v { font-size: 21px; }
}
@media (min-width: 901px) and (max-width: 1250px) {
  .sanctum-hero { grid-template-columns: auto 1fr; } .hero-sigils { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
}

/* accessibility: motion off */
html.fx-none *, html.fx-none *::before, html.fx-none *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { #fxCanvas { display: none; } }

[data-theme="oracle-dark"] { --nav-w: 244px; }
html.nav-collapsed[data-theme="oracle-dark"] { --nav-w: 68px; }
@media (max-width: 900px) { [data-theme="oracle-dark"], html.nav-collapsed[data-theme="oracle-dark"] { --nav-w: 0px; } }

/* auth pages: emblem + sanctum art */
[data-theme="oracle-dark"][data-page="login"], [data-theme="oracle-dark"][data-page="register"], [data-theme="oracle-dark"][data-page="forgot"],
[data-theme="oracle-dark"][data-page="reset"], [data-theme="oracle-dark"][data-page="verify"] {
  --page-art: image-set(url(/ui/assets/backgrounds/fantasy/background-oracle-arcane-library.avif) type("image/avif"), url(/ui/assets/backgrounds/fantasy/background-oracle-arcane-library.webp) type("image/webp"));
  --art-opacity: .42; }
.auth-emblem { width: 92px; height: 92px; margin: -64px auto 6px; filter: drop-shadow(0 8px 24px rgba(139, 92, 246, .45)); }
.auth-emblem svg { width: 100%; height: 100%; overflow: visible; }
html:not([data-theme="oracle-dark"]) .auth-emblem { display: none; }
[data-theme="oracle-dark"] .auth-card { margin-top: 9vh; overflow: visible; }
[data-theme="oracle-dark"] .auth-card button { width: 100%; padding: 9px 14px; font-size: 14px; margin-top: 6px; }
[data-theme="oracle-dark"] .auth-links { text-align: center; margin-top: 12px; }
[data-theme="oracle-dark"] .auth-card[data-em] h2::before { display: none; }

/* Oracle AI presence crystal */
.oracle-presence { position: absolute; top: -18px; right: 18px; width: 64px; height: 64px; pointer-events: none; opacity: .75;
  transition: opacity var(--dur), filter var(--dur); filter: drop-shadow(0 6px 16px rgba(139, 92, 246, .35)); }
.oracle-presence svg { width: 100%; height: 100%; overflow: visible; }
.oracle-presence.thinking { opacity: 1; filter: drop-shadow(0 0 22px rgba(196, 167, 255, .9)) brightness(1.25); }
html.fx-full .oracle-presence.thinking .em-ring.r1 { animation-duration: 6s; }
html.fx-full .oracle-presence.thinking .em-ring.r2 { animation-duration: 4s; }
@media (max-width: 900px) { .oracle-presence { width: 46px; height: 46px; top: -10px; } }
[data-theme="oracle-dark"] .brand-text { overflow: hidden; } [data-theme="oracle-dark"] .brand-text small { display: block; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Codex (encyclopedia) ---------- */
.codex-search { position: relative; margin: 4px 0 10px; }
.codex-search .si { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--gold-300, var(--accent)); }
.codex-search input { width: 100%; padding: 12px 14px 12px 44px; font-size: 15px; border-radius: 12px; }
.codex-results { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.cx-row { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.codex-link { color: var(--fg); border-bottom: 1px dotted var(--dim); }
.codex-link:hover { color: var(--gold-300, var(--accent)); text-decoration: none; }
.codex-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.codex-kind { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; gap: 2px 12px; align-items: center; padding: 14px; border-radius: 12px;
  background: linear-gradient(160deg, rgba(28, 30, 58, .85), rgba(10, 12, 26, .92)); border: 1px solid var(--line2); color: var(--fg);
  transition: transform var(--dur-fast, .15s) var(--ease, ease), border-color var(--dur-fast, .15s), box-shadow var(--dur-fast, .15s); }
.codex-kind:hover { transform: translateY(-2px); border-color: rgba(212, 169, 79, .55); box-shadow: 0 0 22px rgba(212, 169, 79, .14); text-decoration: none; }
.codex-kind .ck-ic { grid-row: span 2; }
.codex-kind b { font-family: var(--font-display); letter-spacing: .05em; font-size: 13px; }
.codex-kind .ck-n { font-size: 18px; font-weight: 600; color: var(--gold-300, var(--fg)); font-variant-numeric: tabular-nums; }
.ck-ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-300, var(--accent));
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, .3), rgba(8, 10, 22, .9) 70%); border: 1px solid rgba(212, 169, 79, .4); --icon-accent: var(--aqua, #3fd0c9); }
.ck-ic .si { width: 22px; height: 22px; } .ck-ic.big { width: 56px; height: 56px; } .ck-ic.big .si { width: 28px; height: 28px; }
.ck-ic img.item-ic { margin: 0; border-radius: 50%; }
.codex-title { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.codex-name { font-family: var(--font-display); font-size: 22px; margin: 0 0 4px; letter-spacing: .04em; text-transform: none; }
.panel h2.codex-name::after { display: none; }
.codex-desc { color: var(--muted); font-style: italic; }
.codex-tooltip { max-width: 380px; padding: 12px 14px; border-radius: 10px; margin: 6px 0 14px; background: linear-gradient(180deg, rgba(8, 10, 26, .97), rgba(4, 6, 16, .97));
  border: 1px solid rgba(212, 169, 79, .45); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 13px; line-height: 1.55; }
.codex-tooltip b { display: block; font-size: 15px; margin-bottom: 4px; }
.codex-kv { margin-top: 10px; } .codex-children { max-height: 420px; overflow: auto; }
.codex-credit { margin-top: 12px; }

.codex-item-grid { display: grid; grid-template-columns: minmax(0, 380px) 1fr; gap: 18px; }
@media (max-width: 900px) { .codex-item-grid { grid-template-columns: 1fr; } }

.upg-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.upg-list { display: flex; flex-direction: column; gap: 6px; }
.upg { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--fg);
  background: rgba(10, 13, 27, .6); border: 1px solid var(--line); }
.upg:hover { border-color: rgba(212, 169, 79, .5); text-decoration: none; }
.upg-price { text-align: right; white-space: nowrap; }
@media (max-width: 760px) { .upg-row { grid-template-columns: 1fr; } }

/* ---------- mobile: tables as cards, collapsible data banner ---------- */
@media (max-width: 760px) {
  #view table[data-lbl] thead { display: none; }
  #view table[data-lbl], #view table[data-lbl] tbody, #view table[data-lbl] tr, #view table[data-lbl] td { display: block; width: 100%; }
  #view table[data-lbl] tr { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px;
    background: linear-gradient(160deg, rgba(28, 30, 58, .6), rgba(10, 12, 26, .75)); }
  #view table[data-lbl] td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  #view table[data-lbl] td::before { content: attr(data-label); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; text-align: left; flex: none; max-width: 45%; }
  #view table[data-lbl] td:first-child { font-weight: 600; font-size: 14px; text-align: left; }
  #view table[data-lbl] td:first-child::before { display: none; }
  #view table[data-lbl] td:empty { display: none; }
  .panel > div > table, .panel > table { overflow-x: visible !important; }
  .data-banner { max-height: 3.1em; overflow: hidden; position: relative; cursor: pointer; }
  .data-banner::after { content: "⌄"; position: absolute; right: 10px; bottom: 2px; color: var(--gold-300, var(--muted)); }
  .data-banner.open { max-height: none; } .data-banner.open::after { content: "⌃"; }
}

/* ---------- Oracle Champions ---------- */
.champ-head { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: center; }
.champ-crest { width: 120px; height: 120px; } .champ-crest svg { width: 100%; height: 100%; overflow: visible; }
.champ-head .hero-title { font-family: "Cinzel", Georgia, serif; font-size: 28px; margin: 6px 0; color: var(--gold-300, var(--fg)); letter-spacing: .06em; }
.champ-head .hero-kicker { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--aqua, var(--accent)); }
.xp-bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; margin: 8px 0 4px; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6); max-width: 460px; }
.xp-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #8e6a2c, #f2d38a, #c4a7ff); box-shadow: 0 0 12px rgba(242, 211, 138, .6); transition: width .8s var(--ease, ease); }
.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.mission { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 12px; border: 1px solid var(--line2);
  background: linear-gradient(160deg, rgba(28, 30, 58, .8), rgba(10, 12, 26, .9)); }
.mission.done { border-color: rgba(60, 207, 142, .45); } .mission.locked { opacity: .55; }
.mission b { font-size: 13px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 10px; align-items: end; margin: 6px 0 14px; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px 12px 4px 4px; text-align: center;
  background: linear-gradient(180deg, rgba(40, 34, 70, .9), rgba(12, 12, 28, .95)); border: 1px solid rgba(212, 169, 79, .35); }
.pod-1 { min-height: 150px; border-color: rgba(242, 211, 138, .8); box-shadow: 0 0 30px rgba(242, 211, 138, .25); }
.pod-2 { min-height: 120px; } .pod-3 { min-height: 100px; } .pod-empty { border: 0; background: none; }
.pod.me { outline: 2px solid var(--arcane-300, var(--accent)); }
.pod-crest { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-family: "Cinzel", serif; font-weight: 700; color: #2a1a05;
  background: radial-gradient(circle at 35% 30%, #fff1c6, #d4a94f 45%, #7b5520); border: 1px solid #5e4214; }
.pod-2 .pod-crest { background: radial-gradient(circle at 35% 30%, #ffffff, #c7ccd6 45%, #6e7480); }
.pod-3 .pod-crest { background: radial-gradient(circle at 35% 30%, #ffe0c4, #c07a45 45%, #6b3d1d); }
tr.me td { background: rgba(139, 92, 246, .14) !important; }
.hof { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); }
.hof-r { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #2a1a05; background: #d4a94f; }
.hof-r.r2 { background: #c7ccd6; } .hof-r.r3 { background: #c07a45; }
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.ach { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 10px; border: 1px dashed var(--line2); opacity: .55; }
.ach.on { opacity: 1; border-style: solid; border-color: rgba(212, 169, 79, .5); box-shadow: 0 0 16px rgba(212, 169, 79, .12); }
.ach .si { width: 26px; height: 26px; color: var(--gold-300, var(--accent)); flex: none; }
@media (max-width: 900px) { .champ-head { grid-template-columns: 1fr; text-align: center; } .champ-crest { margin: 0 auto; width: 90px; height: 90px; } .xp-bar { margin-inline: auto; } }
