/* Codex des Héros — thème médiéval (parchemin, cuir, dorures) */
:root {
  --parch: #efe2c2; --parch2: #e4d2a6; --parch3: #d3bb85; --ink: #2a1c10; --ink2: #5b4630; --muted: #8a7353;
  --bar: #3a2214; --bar-l: #4a2b18; --bar-d: #24140b; --on-bar: #f0d27a; --on-bar-m: #d9c493;
  --acc: #8e1b1b; --acc-l: #a72c22; --acc-d: #6e140f; --acc-dd: var(--acc-dd); --on-acc: #fbe8b8; --acc-ink: #8e1b1b;
  --leather: var(--bar); --leather2: var(--bar-d); --gold: #c9a13b; --gold2: #f0d27a; --goldd: #8c6a1c;
  --red: var(--acc-ink); --red2: var(--acc-l); --green: #2f6b2f; --blue: #26507d;
  --line: rgba(90, 60, 25, .35); --shadow: 0 2px 6px rgba(40, 20, 5, .25);
  --ft: 'Cinzel', 'Trajan Pro', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
  --fd: 'MedievalSharp', 'Cinzel', 'Palatino Linotype', Georgia, serif;
  --fb: 'IM Fell English', 'Palatino Linotype', 'Book Antiqua', Palatino, Georgia, serif;
  --radius: 10px; --tabh: 62px;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--fb); color: var(--ink); font-size: 16px; line-height: 1.35;
  background-color: var(--bar-d);
  background-image: radial-gradient(ellipse at top, var(--bar-l) 0%, var(--bar-d) 70%);
  overscroll-behavior: none;
}
body.noscroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { opacity: .45; cursor: not-allowed; }
h1, h2, h3, h4 { font-family: var(--ft); margin: 0; letter-spacing: .02em; }
small { font-size: .8em; }
.muted { color: var(--muted); } .small { font-size: .85em; } .center { text-align: center; }
[hidden] { display: none !important; }

/* texture de parchemin */
.parchment, .screen .content, .dialog {
  background-color: var(--parch);
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35 0 0 0 0 .22 0 0 0 0 .08 0 0 0 .12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"),
    radial-gradient(ellipse at 50% 0%, rgba(255, 248, 225, .7), transparent 60%),
    radial-gradient(ellipse at 100% 100%, rgba(150, 100, 40, .28), transparent 55%),
    radial-gradient(ellipse at 0% 80%, rgba(150, 100, 40, .22), transparent 50%);
}

#app { height: 100%; max-width: 900px; margin: 0 auto; }
.screen { height: 100%; display: flex; flex-direction: column; position: relative; box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
.screen .content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 14px calc(var(--tabh) + 24px); }
.roster .content { padding-bottom: 30px; }

/* ---------- en-têtes en cuir ---------- */
.top {
  position: relative; color: var(--parch); padding: calc(env(safe-area-inset-top) + 10px) 12px 12px;
  background: linear-gradient(180deg, var(--bar-l), var(--bar) 55%, var(--bar-d));
  border-bottom: 3px solid var(--goldd); box-shadow: inset 0 -1px 0 var(--gold2), 0 3px 8px rgba(0, 0, 0, .5);
}
.top::after { content: ''; position: absolute; inset: 5px; border: 1px dashed rgba(240, 210, 122, .25); border-radius: 6px; pointer-events: none; }
.roster-top { text-align: center; padding-top: calc(env(safe-area-inset-top) + 22px); padding-bottom: 18px; }
.roster-top .crest { font-size: 30px; color: var(--gold); text-shadow: 0 0 10px rgba(240, 210, 122, .5); }
.roster-top h1 { font-family: var(--fd); font-size: 30px; color: var(--on-bar); text-shadow: 0 2px 0 #000, 0 0 14px rgba(201, 161, 59, .4); }
.roster-top .sub { margin: 4px 0 0; font-style: italic; color: var(--on-bar-m); }
.gear { position: absolute; right: 14px; top: calc(env(safe-area-inset-top) + 14px); font-size: 22px; color: var(--on-bar); z-index: 2; }

.sheet-top { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 6px; padding-bottom: 16px; }
.sheet-top .back { font-size: 34px; line-height: 1; color: var(--on-bar); width: 30px; z-index: 2; }
.sheet-top .who { display: flex; align-items: center; gap: 10px; text-align: left; min-width: 0; z-index: 2; }
.sheet-top .who h2 { font-family: var(--fd); font-size: 21px; color: var(--on-bar); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-top .who p { margin: 1px 0 0; font-size: 13px; color: var(--on-bar-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-top .who > div { min-width: 0; }
.lvl { z-index: 2; width: 46px; height: 52px; color: var(--leather2); display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--gold2), var(--gold) 60%, var(--goldd)); clip-path: polygon(50% 100%, 0 78%, 0 0, 100% 0, 100% 78%); }
.lvl span { font-size: 10px; font-family: var(--ft); margin-top: -6px; } .lvl b { font-family: var(--ft); font-size: 20px; line-height: 1; }
.dots { font-size: 24px; width: 30px; color: var(--ink2); }
.dots.light { color: var(--on-bar); z-index: 2; }
.xpbar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, .45); overflow: hidden; z-index: 2; cursor: pointer; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--goldd), var(--gold2)); }
.levelup-banner { display: block; width: 100%; padding: 9px; font-family: var(--ft); font-size: 14px; color: var(--leather2);
  background: linear-gradient(90deg, var(--goldd), var(--gold2), var(--goldd)); animation: glow 2s infinite; }
@keyframes glow { 50% { filter: brightness(1.15); } }

/* ---------- médaillons ---------- */
.medal { flex: none; border-radius: 50%; position: relative; background-size: cover; background-position: center;
  box-shadow: 0 0 0 2px var(--goldd), 0 0 0 4px var(--gold2), 0 0 0 5px var(--leather2), 0 3px 8px rgba(0, 0, 0, .5); }
.medal svg { display: block; border-radius: 50%; }

/* ---------- barre d'onglets ---------- */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; height: calc(var(--tabh) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: linear-gradient(0deg, var(--leather2), var(--leather)); border-top: 3px solid var(--goldd); box-shadow: 0 -3px 10px rgba(0, 0, 0, .45); z-index: 5; }
.tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--on-bar-m); font-family: var(--ft); font-size: 9.5px; letter-spacing: 0; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--on-bar); background: radial-gradient(ellipse at 50% 100%, rgba(240, 210, 122, .22), transparent 70%); }
.tab.on svg { filter: drop-shadow(0 0 4px rgba(240, 210, 122, .6)); }

/* ---------- panneaux ---------- */
.panel { position: relative; margin: 0 0 14px; padding: 12px 12px 10px; border-radius: var(--radius);
  background: rgba(255, 250, 235, .45); border: 1px solid var(--line); box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .35), var(--shadow); }
.ptitle { text-align: center; margin: -2px 0 10px; font-size: 14px; color: var(--red); text-transform: uppercase; letter-spacing: .1em; display: flex; align-items: center; gap: 8px; }
.ptitle::before, .ptitle::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--goldd), transparent); }
.ptitle span::before, .ptitle span::after { content: '❦'; color: var(--goldd); font-size: 11px; margin: 0 6px; }
details.panel > summary { list-style: none; cursor: pointer; margin-bottom: 0; }
details.panel[open] > summary { margin-bottom: 10px; }
summary::-webkit-details-marker { display: none; }
.divider { text-align: center; color: var(--goldd); margin: 10px 0; }
h4.sub { font-family: var(--ft); font-size: 14px; margin: 16px 0 8px; color: var(--red); border-bottom: 1px solid var(--line); padding-bottom: 3px; }
.cols2 { display: grid; gap: 0 14px; }
@media (min-width: 680px) { .cols2 { grid-template-columns: 1fr 1.4fr; } }

/* ---------- boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; font-family: var(--ft); font-size: 14px; letter-spacing: .03em;
  background: linear-gradient(180deg, #f6ebcf, #dcc590); border: 1px solid var(--goldd); color: var(--ink); box-shadow: 0 1px 0 #fff8 inset, var(--shadow); }
.btn.primary { background: linear-gradient(180deg, var(--acc-l), var(--acc-d)); color: var(--on-acc); border-color: var(--acc-dd); text-shadow: 0 1px 0 #000; box-shadow: 0 1px 0 #ffb4 inset, 0 0 0 1px var(--gold) inset, var(--shadow); }
.btn.ghost { background: rgba(255, 250, 235, .5); border-color: var(--line); }
.btn.danger { background: linear-gradient(180deg, #5a1d1d, #3a0f0f); color: #f7d9c4; border-color: #200; }
.btn.good { background: linear-gradient(180deg, #3f7e3a, #24521f); color: #eaf6dd; border-color: #142d10; }
.btn.small { padding: 7px 11px; font-size: 13px; } .btn.tiny { padding: 4px 9px; font-size: 12px; border-radius: 6px; }
.btn.wide { display: flex; width: 100%; margin-top: 12px; padding: 13px; font-size: 16px; }
.filebtn { cursor: pointer; }
.addrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 4px 0 14px; }
.tiny-x { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; color: var(--red); font-weight: bold; }
.edit-only { display: none !important; }
.editing .edit-only { display: revert !important; }
.editing .abedit { display: flex !important; }
.editing .pdot { outline: 2px dashed var(--gold); outline-offset: 2px; }

/* ---------- formulaires ---------- */
input[type=text], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 9px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(255, 252, 242, .75); color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--goldd); box-shadow: 0 0 0 2px rgba(201, 161, 59, .35); }
textarea { resize: vertical; line-height: 1.45; }
.field { display: block; margin: 10px 0; font-family: var(--ft); font-size: 13px; color: var(--ink2); }
.field input, .field select, .field textarea { margin-top: 4px; font-family: var(--fb); font-size: 16px; }
.field small { display: block; font-family: var(--fb); color: var(--muted); margin-top: 3px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.fgrid label { font-family: var(--ft); font-size: 12px; color: var(--ink2); }
.fgrid input, .fgrid select { margin-top: 3px; font-family: var(--fb); font-size: 15px; }
.check { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }
.inline { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; font-size: 14px; }
.search { margin-bottom: 10px; }

/* ---------- liste des héros ---------- */
.card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 12px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(135deg, rgba(255, 252, 240, .7), rgba(230, 210, 160, .55)); border: 1px solid var(--goldd); box-shadow: inset 0 0 0 3px rgba(255, 250, 235, .5), 0 3px 8px rgba(40, 20, 5, .3); }
.card:active { transform: scale(.99); }
.hero-info { flex: 1; min-width: 0; }
.hero-info h3 { font-family: var(--fd); font-size: 20px; color: var(--red); }
.hero-info p { margin: 3px 0 0; }
.empty { text-align: center; padding: 30px 20px; color: var(--ink2); }
.big-ico { font-size: 52px; margin-bottom: 6px; }

/* ---------- fiche ---------- */
.advbar { display: flex; align-items: center; justify-content: center; gap: 8px; margin: -4px 0 12px; }
.seg { display: flex; border: 1px solid var(--goldd); border-radius: 8px; overflow: hidden; margin: 6px 0 12px; }
.seg button { flex: 1; padding: 8px 6px; font-family: var(--ft); font-size: 13px; background: rgba(255, 250, 235, .5); border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: linear-gradient(180deg, var(--acc-l), var(--acc-d)); color: var(--on-acc); }
.seg.tiny { margin: 0; } .seg.tiny button { padding: 5px 9px; font-size: 11.5px; }
.quickrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.qbox, .stat { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 9px; background: rgba(255, 250, 235, .5); border: 1px solid var(--line); box-shadow: var(--shadow); text-align: center; }
.qbox span, .stat span { font-family: var(--ft); font-size: 10px; color: var(--ink2); text-transform: uppercase; letter-spacing: .03em; }
.qbox b, .stat b { font-family: var(--ft); font-size: 22px; color: var(--ink); }
.qbox.on { background: linear-gradient(180deg, #f8e7a6, #e2c062); border-color: var(--goldd); }
.qbox.on b { color: var(--red); }
.abgrid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .abgrid6 { grid-template-columns: repeat(6, 1fr); } }
.ab { display: flex; flex-direction: column; align-items: stretch; }
.abbtn { position: relative; display: flex; flex-direction: column; align-items: center; padding: 8px 4px 16px; border-radius: 12px 12px 40% 40% / 12px 12px 22% 22%;
  background: linear-gradient(180deg, rgba(255, 252, 240, .85), rgba(225, 205, 155, .7)); border: 2px solid var(--goldd); box-shadow: inset 0 0 0 2px rgba(255, 250, 235, .6), var(--shadow); }
.abn { font-family: var(--ft); font-size: 10.5px; text-transform: uppercase; color: var(--red); letter-spacing: .04em; }
.abm { font-family: var(--ft); font-size: 30px; line-height: 1.1; }
.abs { position: absolute; bottom: -11px; min-width: 36px; padding: 1px 6px; border-radius: 10px; background: var(--leather); color: var(--gold2); font-family: var(--ft); font-size: 14px; border: 1px solid var(--gold); }
.abedit { flex-direction: column; align-items: center; margin-top: 16px; gap: 2px; }
.abedit input { text-align: center; padding: 4px; }
.abedit small { font-size: 10px; color: var(--muted); text-align: center; }
.srow2 { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px dotted var(--line); }
.srow2:last-child { border-bottom: 0; }
.srow2 span { flex: 1; } .srow2 small { color: var(--muted); font-size: 11px; }
.pdot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink2); flex: none; }
.pdot.on { background: var(--ink); } .pdot.exp { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 2px var(--gold2); }
.bonus { min-width: 44px; padding: 4px 8px; border-radius: 6px; font-family: var(--ft); font-weight: bold; background: rgba(255, 250, 235, .7); border: 1px solid var(--line); }
.profrow { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px dotted var(--line); }
.profrow > b { width: 72px; flex: none; font-family: var(--ft); font-size: 12px; color: var(--ink2); padding-top: 4px; }
.profrow > div { display: flex; flex-wrap: wrap; gap: 5px; }
.chip2 { display: inline-flex; align-items: center; gap: 2px; padding: 3px 8px; border-radius: 12px; background: rgba(140, 106, 28, .15); border: 1px solid var(--line); font-size: 14px; }
.chip2 .x { width: auto; height: auto; color: var(--red); padding-left: 4px; }

/* combat */
.hp-panel { padding: 14px; }
.hp-main { text-align: center; }
.hp-num { font-family: var(--ft); }
.hp-num b { font-size: 46px; color: var(--red); text-shadow: 0 1px 0 #fff8; }
.hp-num span { font-size: 22px; color: var(--ink2); margin-left: 4px; }
.hp-bar { height: 12px; border-radius: 6px; background: rgba(60, 30, 10, .25); border: 1px solid var(--goldd); overflow: hidden; margin: 6px 0; }
.hp-bar i { display: block; height: 100%; background: linear-gradient(180deg, #4fa04a, #2a6d27); transition: width .3s; }
.hp-bar.mid i { background: linear-gradient(180deg, #d7a63a, #9a6c12); } .hp-bar.low i { background: linear-gradient(180deg, #c8403a, #7d1611); }
.hp-temp { font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.hp-ctl { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 6px; margin-top: 10px; }
.hp-ctl .btn { padding: 8px 4px; font-size: 12.5px; }
.statrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat b { font-size: 26px; }
.death { border-color: var(--red); }
.deathrow { display: flex; justify-content: space-around; text-align: center; font-family: var(--ft); font-size: 12px; }
.deathrow span { display: block; margin-bottom: 4px; }
.pip { width: 24px; height: 24px; margin: 2px; border-radius: 50%; border: 2px solid var(--goldd); background: radial-gradient(circle at 35% 30%, #fff6d8, #e8c868); box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .2); }
.pip.used { background: rgba(60, 30, 10, .2); border-color: var(--muted); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3); }
.pip.fail { background: radial-gradient(circle at 35% 30%, #f9d7d0, #c75d52); } .pip.fail.used { background: #3a0f0f; }
.pips { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.hdrow2 { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hdchip { padding: 5px 12px; border-radius: 14px; border: 1px solid var(--goldd); background: rgba(255, 250, 235, .6); font-family: var(--ft); }
.restrow { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.hdrow { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.atk { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.atk:last-child { border-bottom: 0; }
.atk-name { flex: 1; min-width: 0; } .atk-name small { display: block; color: var(--muted); }
.atk-btn { display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--goldd); background: rgba(255, 250, 235, .7); font-family: var(--ft); font-weight: bold; font-size: 15px; }
.atk-btn small { font-size: 9px; font-weight: normal; color: var(--ink2); text-transform: uppercase; }
.atk-btn.dmg { background: rgba(142, 27, 27, .1); }
.spellline { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--gold); background: rgba(255, 250, 235, .35); font-size: 14px; }
.infochips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.ichip { display: flex; flex-direction: column; align-items: center; padding: 6px 12px; border-radius: 10px; background: var(--leather); color: var(--on-bar); border: 1px solid var(--gold); }
.ichip small { font-family: var(--ft); font-size: 9.5px; color: var(--on-bar-m); text-transform: uppercase; }
.ichip b { font-family: var(--ft); font-size: 17px; }
.res { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.res:last-child { border-bottom: 0; }
.res-name { flex: 1; min-width: 0; } .res-name small { display: block; color: var(--muted); }
.pool { font-family: var(--ft); display: flex; align-items: center; gap: 6px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--goldd); border-radius: 8px; overflow: hidden; background: rgba(255, 250, 235, .7); }
.stepper button { width: 34px; height: 32px; font-size: 18px; font-weight: bold; color: var(--red); }
.stepper b { min-width: 38px; text-align: center; font-family: var(--ft); }
.conds { display: flex; flex-wrap: wrap; gap: 6px; }
.cond { padding: 5px 10px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 250, 235, .5); font-size: 13.5px; }
.cond.on { background: var(--acc); color: var(--on-acc); border-color: var(--acc-dd); }
.condinfo { font-size: 14px; margin: 8px 0 0; padding: 6px 10px; border-left: 3px solid var(--red); background: rgba(142, 27, 27, .07); }
.exh { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-family: var(--ft); font-size: 13px; }

/* sorts */
.conc-banner { display: flex; align-items: center; gap: 8px; justify-content: center; padding: 8px; margin-bottom: 12px; border-radius: 8px; background: rgba(38, 80, 125, .15); border: 1px solid var(--blue); color: var(--blue); }
.caster { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 12px; margin-bottom: 12px; border-radius: 10px; background: linear-gradient(135deg, var(--bar-l), var(--bar-d)); color: var(--on-bar); border: 1px solid var(--gold); }
.caster b { font-family: var(--ft); color: var(--on-bar); } .caster small { display: block; color: var(--on-bar-m); }
.cstats { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: center; }
.cstats span { display: flex; flex-direction: column; justify-content: space-between; padding: 6px 4px; border-radius: 8px; border: 1px solid rgba(201, 161, 59, .45); background: rgba(255, 255, 255, .05); }
.cstats small { font-size: 11px; line-height: 1.2; } .cstats b { font-size: 24px; }
.cbtns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.caster .btn.ghost { color: var(--on-bar); background: rgba(255, 250, 235, .08); border-color: var(--goldd); }
.slotrow { display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; gap: 6px; padding: 4px 0; font-family: var(--ft); font-size: 13px; }
.slotrow small { text-align: right; color: var(--muted); }
.slotrow .pips { justify-content: flex-start; }
.slotrow.pact .pip { background: radial-gradient(circle at 35% 30%, #e8d6ff, #8a5fc2); }
.slotrow.pact .pip.used { background: rgba(60, 30, 10, .2); }
.spell { border-bottom: 1px dotted var(--line); }
.spell:last-child { border-bottom: 0; }
.spell-main { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.spell-main > div { flex: 1; min-width: 0; }
.spell-main small { display: block; color: var(--muted); }
.spell.inactive { opacity: .7; }
.btn.cast { background: linear-gradient(180deg, #2f5f8f, #18385a); color: #e5f0ff; border-color: #0d2238; }
.spell-acts { display: flex; gap: 6px; justify-content: flex-end; padding-bottom: 8px; }
.sp-detail { padding: 6px 10px 10px; margin-bottom: 6px; border-left: 3px solid var(--gold); background: rgba(255, 250, 235, .4); font-size: 15px; }
.sp-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; font-size: 13.5px; }
.sp-detail dt { font-family: var(--ft); color: var(--ink2); font-size: 11.5px; padding-top: 2px; } .sp-detail dd { margin: 0; }
.sp-detail p { margin: 4px 0; }
.tag { display: inline-block; padding: 1px 6px; margin: 2px 3px 0 0; border-radius: 5px; font-size: 11px; font-family: var(--ft); background: rgba(142, 27, 27, .12); color: var(--red); border: 1px solid rgba(142, 27, 27, .25); vertical-align: middle; }
.tag.alt { background: rgba(38, 80, 125, .1); color: var(--blue); border-color: rgba(38, 80, 125, .25); }
.tag.gold { background: rgba(201, 161, 59, .25); color: var(--goldd); border-color: var(--gold); }
.bookpanel summary { margin: 0; }

/* sac */
.coins { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.coin { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.coin span { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-family: var(--ft); font-size: 12px; font-weight: bold; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .3), 0 1px 2px rgba(0, 0, 0, .3); }
.coin.pp span { background: radial-gradient(circle at 35% 30%, #fff, #b8c0c8); } .coin.po span { background: radial-gradient(circle at 35% 30%, #fff1a8, #c99a1e); }
.coin.pe span { background: radial-gradient(circle at 35% 30%, #f6f0c8, #a99b5a); } .coin.pa span { background: radial-gradient(circle at 35% 30%, #fff, #9ea4a8); }
.coin.pc span { background: radial-gradient(circle at 35% 30%, #f2c19a, #a5582a); }
.coin input { text-align: center; padding: 6px 2px; }
.weight { margin: 0 0 12px; font-family: var(--ft); font-size: 13px; text-align: center; }
.item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px dotted var(--line); }
.item:last-child { border-bottom: 0; }
.item-main { flex: 1; min-width: 0; cursor: pointer; } .item-main small { display: block; color: var(--muted); }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; }
.qty button { width: 26px; height: 28px; font-weight: bold; color: var(--red); } .qty b { min-width: 22px; text-align: center; font-size: 14px; }
.equip { padding: 5px 8px; border-radius: 7px; font-family: var(--ft); font-size: 11.5px; border: 1px solid var(--line); background: rgba(255, 250, 235, .6); min-width: 64px; }
.equip.on { background: linear-gradient(180deg, #3f7e3a, #24521f); color: #eaf6dd; border-color: #142d10; }

/* capacités */
details.feat { border-bottom: 1px dotted var(--line); padding: 6px 0; }
details.feat:last-child { border-bottom: 0; }
details.feat summary { cursor: pointer; display: flex; align-items: center; gap: 6px; }
details.feat summary::before { content: '▸'; color: var(--goldd); transition: transform .2s; }
details.feat[open] summary::before { transform: rotate(90deg); }
details.feat p { margin: 6px 0 2px 16px; font-size: 15px; }

/* notes et histoire */
.notes-top { display: flex; gap: 8px; align-items: flex-start; } .notes-top .search { flex: 1; }
.note { padding: 12px; margin-bottom: 10px; border-radius: 8px; cursor: pointer; background: rgba(255, 250, 235, .55); border: 1px solid var(--line); border-left: 4px solid var(--red); box-shadow: var(--shadow); }
.note-head { display: flex; justify-content: space-between; gap: 8px; } .note-head small { color: var(--muted); white-space: nowrap; }
.note p { margin: 6px 0 0; color: var(--ink2); font-size: 15px; white-space: pre-wrap; }
.noteedit .dlg-body { display: flex; flex-direction: column; }
.note-title { font-family: var(--fd) !important; font-size: 20px !important; margin-bottom: 8px; }
.note-body { flex: 1; min-height: 50vh; font-size: 16px; background: repeating-linear-gradient(transparent, transparent 27px, rgba(90, 60, 25, .15) 28px) !important; line-height: 28px !important; }
.story-head { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.story-head h2 { font-family: var(--fd); color: var(--red); font-size: 24px; }
.story-head p { margin: 2px 0; }

/* ---------- fenêtres modales ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 8, 3, .7); animation: fade .18s; }
@keyframes fade { from { opacity: 0; } }
.dialog { position: relative; width: 100%; max-width: 560px; max-height: 92vh; display: flex; flex-direction: column; border-radius: 12px; border: 2px solid var(--goldd); box-shadow: 0 0 0 4px var(--leather), 0 10px 40px rgba(0, 0, 0, .7); animation: pop .2s; }
@keyframes pop { from { transform: translateY(14px); opacity: 0; } }
.small .dialog { max-width: 420px; }
.full { padding: 0; } .full .dialog { max-width: 720px; height: 100%; max-height: 100%; border-radius: 0; }
@media (min-width: 760px) { .full { padding: 20px; } .full .dialog { border-radius: 12px; max-height: 96vh; } }
.dlg-head { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) * 0 + 12px) 14px 10px; border-bottom: 2px solid var(--goldd); background: linear-gradient(180deg, var(--bar-l), var(--bar)); border-radius: 10px 10px 0 0; }
.full .dlg-head { padding-top: calc(env(safe-area-inset-top) + 12px); border-radius: 0; }
.dlg-head h2 { flex: 1; font-family: var(--fd); font-size: 19px; color: var(--on-bar); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dlg-head .x { font-size: 20px; color: var(--on-bar); width: 32px; height: 32px; }
.dlg-body { flex: 1; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
.dlg-foot { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 10px 14px calc(env(safe-area-inset-bottom) + 10px); border-top: 1px solid var(--line); background: rgba(212, 187, 133, .55); }
.dlg-foot .btn { flex: 1; max-width: 220px; }
.dlg-foot .counter { flex: 1; font-family: var(--ft); font-size: 13px; color: var(--ink2); }
.msg { font-size: 16px; }
.menu-list { display: flex; flex-direction: column; gap: 8px; }
.menu-list .btn { justify-content: flex-start; }
.hint { margin: 0 0 10px; padding: 8px 10px; border-radius: 7px; background: rgba(201, 161, 59, .15); border-left: 3px solid var(--gold); font-size: 15px; }
.about { font-size: 14px; color: var(--ink2); margin-top: 10px; }

/* assistants */
.steps { display: flex; justify-content: center; gap: 6px; margin-bottom: 10px; }
.steps i { width: 9px; height: 9px; border-radius: 50%; background: rgba(90, 60, 25, .25); transform: rotate(45deg); border-radius: 2px; }
.steps i.past { background: var(--goldd); } .steps i.cur { background: var(--red); box-shadow: 0 0 0 2px var(--gold2); }
.step-title { text-align: center; font-family: var(--fd); font-size: 22px; color: var(--red); margin-bottom: 12px; }
.opt { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 9px; background: rgba(255, 250, 235, .55); border: 1px solid var(--line); box-shadow: var(--shadow); }
.opt b { font-family: var(--ft); font-size: 15px; }
.opt small { display: block; color: var(--ink2); margin-top: 2px; font-size: 13.5px; }
.opt.on { background: linear-gradient(135deg, rgba(248, 231, 166, .9), rgba(226, 192, 98, .7)); border-color: var(--goldd); box-shadow: 0 0 0 2px var(--gold) inset, var(--shadow); }
.opt.compact { align-items: center; padding: 8px 10px; margin: 0; font-size: 14.5px; }
.opt.big { flex-direction: column; align-items: center; text-align: center; padding: 14px 8px; }
.big-n { font-family: var(--ft); font-size: 34px; color: var(--red); }
.chk { flex: none; width: 20px; height: 20px; border-radius: 4px; border: 2px solid var(--goldd); display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--red); background: rgba(255, 252, 242, .8); }
.chk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin-bottom: 10px; }
.hp-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hp-opts .opt { margin: 0; }
.sub-opts { margin: -4px 0 10px 30px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sub-opts .chk-grid { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip { padding: 5px 11px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 250, 235, .55); font-family: var(--ft); font-size: 12.5px; }
.chip.on { background: var(--acc); color: var(--on-acc); border-color: var(--acc-dd); }
.chosen { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.spell-chip { display: inline-block; padding: 6px 10px; margin: 0 6px 6px 0; border-radius: 8px; background: rgba(255, 250, 235, .7); border: 1px solid var(--goldd); }
.chosen-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; margin-bottom: 10px; border-radius: 8px; background: var(--leather); color: var(--on-bar); font-family: var(--ft); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.facts div { padding: 6px 8px; border-radius: 7px; background: rgba(255, 250, 235, .5); border: 1px solid var(--line); }
.facts span { display: block; font-family: var(--ft); font-size: 10.5px; color: var(--ink2); } .facts b { font-size: 14px; }
.gain-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 4px; border-bottom: 1px dotted var(--line); }
.gain-rows span { font-family: var(--ft); font-size: 13px; color: var(--ink2); }
details.gain { padding: 8px 10px; margin-bottom: 6px; border-radius: 8px; background: rgba(255, 250, 235, .5); border: 1px solid var(--line); }
details.gain summary { cursor: pointer; } details.gain summary small { color: var(--muted); margin-left: 4px; }
details.gain p { margin: 6px 0 0; font-size: 15px; }
.featrow .opt { margin-bottom: 4px; }
.ident .big-portrait { display: flex; justify-content: center; margin: 6px 0 14px; }
.emblems { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; margin-bottom: 10px; }
.emb { display: flex; justify-content: center; padding: 4px; border-radius: 50%; }
.emb.on { box-shadow: 0 0 0 3px var(--red); }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 4px 0 14px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--goldd); }
.sw.on { box-shadow: 0 0 0 3px var(--red); }
.abtable { margin-top: 10px; }
.abhead, .abrow { display: grid; grid-template-columns: 1.3fr 1fr 48px 74px; gap: 8px; align-items: center; }
.abhead { font-family: var(--ft); font-size: 11px; color: var(--ink2); padding-bottom: 4px; text-align: center; }
.abrow { padding: 6px 0; border-bottom: 1px dotted var(--line); }
.abrow > b { font-family: var(--ft); font-size: 14px; }
.abrow .bon { text-align: center; color: var(--green); font-weight: bold; }
.abrow .tot { text-align: center; font-family: var(--ft); font-size: 18px; } .abrow .tot small { font-size: 12px; color: var(--ink2); }
.abrow .stepper button { width: 30px; }
.abgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 12px 0; }
.abgrid div { display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 8px; border: 1px solid var(--goldd); background: rgba(255, 250, 235, .6); }
.abgrid span { font-family: var(--ft); font-size: 10px; color: var(--red); } .abgrid b { font-family: var(--ft); font-size: 20px; } .abgrid small { color: var(--ink2); }
.egroup { margin-bottom: 12px; padding: 8px; border-radius: 9px; border: 1px dashed var(--line); }
.elabel { font-family: var(--ft); font-size: 11px; color: var(--ink2); text-transform: uppercase; margin-bottom: 6px; }
.big-xp { font-family: var(--ft); font-size: 18px; } .big-xp b { font-size: 30px; color: var(--red); }

/* sélecteur de sorts */
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.srow .smain { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.srow .stxt { min-width: 0; } .srow .stxt small { color: var(--muted); }
.srow.on .chk { background: var(--gold2); } .srow.lock { opacity: .6; }
.srow .info { width: 34px; height: 34px; font-size: 18px; color: var(--blue); }
.srow .sp-detail { width: 100%; }

/* toast */
#toast { position: fixed; left: 50%; bottom: calc(var(--tabh) + 22px + env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 100;
  max-width: 92vw; min-width: 200px; padding: 10px 16px; border-radius: 12px; text-align: center; color: var(--parch); background: linear-gradient(180deg, var(--bar), var(--bar-d)); border: 2px solid var(--gold); box-shadow: 0 6px 20px rgba(0, 0, 0, .6); transition: .25s; font-size: 15px; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast .roll-label { display: block; font-family: var(--ft); font-size: 12px; color: var(--on-bar-m); }
#toast .roll-total { display: block; font-family: var(--ft); font-size: 36px; color: var(--gold2); line-height: 1.1; }
#toast .roll-total.crit { color: #7dff8a; text-shadow: 0 0 10px #4f4; } #toast .roll-total.fumble { color: #ff7a6b; }
#toast .roll-detail { display: block; font-size: 13px; color: #cdb88a; }
#toast b { color: var(--gold2); }

@media (max-width: 380px) {
  .quickrow { grid-template-columns: repeat(2, 1fr); }
  .hp-ctl { grid-template-columns: 1fr 1fr; }
  .abm { font-size: 26px; }
}

/* ---------- réglages : thème ---------- */
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-bottom: 10px; }
.theme { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255, 250, 235, .5); font-family: var(--ft); font-size: 11.5px; }
.theme.on { box-shadow: 0 0 0 2px var(--acc) inset; background: rgba(255, 250, 235, .85); }
.theme i { display: block; width: 44px; height: 22px; border-radius: 11px; border: 1px solid rgba(0, 0, 0, .3); }
.colorrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 12px; }
.colorrow .sw { width: 30px; height: 30px; }
.colorrow input[type=color] { width: 44px; height: 32px; padding: 0 2px; border-radius: 7px; cursor: pointer; }
.colorlabel { font-family: var(--ft); font-size: 13px; color: var(--ink2); margin-top: 8px; }

/* ---------- dés animés ---------- */
.dice-layer { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: radial-gradient(ellipse at center, rgba(20, 10, 4, .55), rgba(10, 5, 2, .8)); animation: fade .15s; cursor: pointer; padding: 16px; }
.dice-label { font-family: var(--ft); color: var(--on-bar-m); font-size: 15px; text-align: center; text-shadow: 0 1px 2px #000; }
.dice-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 520px; padding: 8px; }
.die { position: relative; width: 84px; height: 84px; animation: tumble .95s cubic-bezier(.18, .9, .32, 1.05) both; }
.die.mid { width: 66px; height: 66px; }
.die.small { width: 52px; height: 52px; }
.die svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .55)); }
.die text { font-family: var(--ft); font-weight: 700; fill: var(--on-acc); paint-order: stroke; stroke: rgba(0, 0, 0, .35); stroke-width: 2px; }
.die.drop { opacity: .35; filter: grayscale(.8); transition: opacity .3s .1s, filter .3s .1s; }
.die.max svg { filter: drop-shadow(0 0 10px #7dff8a) drop-shadow(0 8px 6px rgba(0, 0, 0, .55)); }
.die.min svg { filter: drop-shadow(0 0 10px #ff6b5b) drop-shadow(0 8px 6px rgba(0, 0, 0, .55)); }
@keyframes tumble {
  0% { transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(.35); opacity: 0; }
  12% { opacity: 1; }
  55% { transform: translate(calc(var(--dx) * -0.12), 12px) rotate(calc(var(--r) * -0.15)) scale(1.06); }
  72% { transform: translate(0, -10px) rotate(8deg) scale(1.02); }
  86% { transform: translate(0, 0) rotate(-4deg) scale(.98); }
  100% { transform: none; opacity: 1; }
}
.roll-result { text-align: center; color: var(--parch); opacity: 0; transform: translateY(8px); transition: .25s; }
.roll-result.show { opacity: 1; transform: none; }
.roll-result .t { display: block; font-family: var(--ft); font-size: 56px; line-height: 1.05; color: var(--gold2); text-shadow: 0 2px 0 #000, 0 0 18px rgba(240, 210, 122, .45); }
.roll-result .t.crit { color: #8dff98; text-shadow: 0 2px 0 #000, 0 0 18px #4f4; } .roll-result .t.fumble { color: #ff8a7b; text-shadow: 0 2px 0 #000, 0 0 18px #f44; }
.roll-result .d { display: block; font-size: 15px; color: #e3d2a6; }
.roll-result .n { display: block; margin-top: 4px; font-family: var(--ft); font-size: 17px; color: var(--gold2); }
.roll-result .hint2 { display: block; margin-top: 10px; font-size: 12px; color: rgba(227, 210, 166, .6); }
.exh-list { list-style: none; margin: 6px 0 4px; padding: 0; }
.exh-list li { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.exh-list li span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--ft); font-size: 11px; background: var(--acc); color: var(--on-acc); }
.condinfo small { display: block; color: var(--muted); margin-top: 4px; }

/* bulles d'aide */
abbr.tip { text-decoration: none; border-bottom: 1px dotted currentColor; cursor: help; }
.tipbox { position: fixed; z-index: 300; max-width: 240px; padding: 6px 10px; border-radius: 8px; font-family: var(--fb); font-size: 14px; line-height: 1.3;
  color: var(--on-bar); background: var(--bar-d); border: 1px solid var(--gold); box-shadow: 0 4px 14px rgba(0, 0, 0, .5); pointer-events: none; animation: fade .12s; }

/* texte complet des sorts */
.sp-detail h5 { margin: 10px 0 4px; font-family: var(--ft); font-size: 13px; color: var(--red); }
.sp-table { overflow-x: auto; margin: 6px 0 8px; }
.sp-table table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sp-table th, .sp-table td { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sp-table th { font-family: var(--ft); font-size: 11.5px; color: var(--ink2); background: rgba(201, 161, 59, .15); }
.sp-src { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; padding-top: 6px; border-top: 1px dotted var(--line); }
.sp-src small { color: var(--muted); font-style: italic; }
#pr-in { min-height: 40vh; }

/* ---------- 1 naturel : dé rouge, secousse et éclair ---------- */
.die.nat1 stop:first-child { stop-color: #ff4433 !important; }
.die.nat1 stop:last-child { stop-color: #4a0000 !important; }
.die.nat1 svg { filter: drop-shadow(0 0 14px #ff2a1a) drop-shadow(0 8px 6px rgba(0, 0, 0, .6)); animation: quake .45s ease-in-out 2; }
.dice-layer.nat1 { animation: darken .3s forwards; }
.dice-layer.nat1::before { content: ''; position: fixed; inset: 0; pointer-events: none; background: #dfe8ff; opacity: 0; animation: lightning 1.1s ease-out; }
@keyframes quake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-7px, 3px) rotate(-4deg); } 40% { transform: translate(6px, -4px) rotate(3deg); } 60% { transform: translate(-5px, 2px); } 80% { transform: translate(4px, -2px) rotate(2deg); } }
@keyframes lightning { 0% { opacity: .9; } 8% { opacity: 0; } 14% { opacity: .7; } 22% { opacity: 0; } 30% { opacity: .35; } 100% { opacity: 0; } }
@keyframes darken { to { background: radial-gradient(ellipse at center, rgba(40, 0, 0, .7), rgba(5, 0, 0, .92)); } }

/* ---------- 20 naturel : dé brillant et confettis ---------- */
.die.nat20 stop:first-child { stop-color: #fff3b0 !important; }
.die.nat20 stop:last-child { stop-color: #b8860b !important; }
.die.nat20 text { fill: #3a2210; stroke: rgba(255, 255, 255, .5); }
.die.nat20 svg { animation: glow20 1.2s ease-in-out infinite; }
.die.nat20::after { content: ''; position: absolute; inset: -40%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: conic-gradient(from 0deg, transparent 0 10%, rgba(255, 230, 120, .55) 12%, transparent 16% 35%, rgba(255, 230, 120, .45) 38%, transparent 42% 60%, rgba(255, 230, 120, .55) 63%, transparent 67% 85%, rgba(255, 230, 120, .4) 88%, transparent 92%);
  animation: rays 6s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes glow20 { 0%, 100% { filter: drop-shadow(0 0 10px #ffd700) drop-shadow(0 0 24px rgba(255, 215, 0, .6)); transform: scale(1); } 50% { filter: drop-shadow(0 0 18px #fff6c0) drop-shadow(0 0 40px rgba(255, 215, 0, .9)); transform: scale(1.08); } }
@keyframes rays { to { transform: rotate(360deg); } }
.dice-layer.nat20 { background: radial-gradient(ellipse at center, rgba(70, 45, 0, .7), rgba(8, 4, 1, .9)); }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
input[type=range] { width: 100%; accent-color: var(--acc); margin-top: 6px; }

.item-desc { margin: 6px 0 10px; }
.item-desc h5 { margin-top: 8px; }
.srow .item-desc { width: 100%; }
a.levelup-banner { display: block; text-align: center; text-decoration: none; margin: 0 0 12px; border-radius: 10px; }
a.btn { text-decoration: none; }
