/* Affinage de l'interface (chargé en dernier) : un seul filet par cadre, pas de traits qui se chevauchent, zones qui défilent à l'intérieur plutôt que la fenêtre entière.
   Les feuilles précédentes empilent leurs corrections ; ce fichier fixe l'aspect final du HUD (stats du héros, quêtes suivies), du carnet, des talents et de la sacoche. */

/* ───────── HUD : stats du héros ───────── */
.hud-left{gap:10px;max-height:calc(100dvh - 215px);width:244px}
.playing-ui .hud-left .vitals{width:244px;padding:12px 14px 12px;border:1px solid #b08d58;border-radius:3px;background-image:url('./assets/ui/leather-grain.svg'),linear-gradient(155deg,#33452f,#17251d);background-size:144px 144px,auto;box-shadow:inset 0 0 0 1px #0f1b14,inset 0 0 0 3px #b08d5838,0 8px 22px #07140b99;animation:none}
.playing-ui .hud-left .vitals::after{display:none}
.vitals .vital-instrument{gap:11px;align-items:center}
.vitals .vital-dial{width:60px;height:55px}
.vitals .vital-values{min-width:0}
.vitals .hero-name{display:block;font:700 12px var(--material-sans,system-ui);letter-spacing:.04em;color:#f3dfb4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vitals .instrument-label{display:inline-flex;align-items:center;gap:4px;margin-top:2px;font-size:8px;letter-spacing:.16em;color:#c9b98e}
.vitals .vital-values strong{margin-top:1px;font-size:22px;line-height:1.05;letter-spacing:-.02em;color:#fbe9c3}
.vitals .vital-values strong small{font-size:12px;font-weight:500;color:#cdbb92}
.vitals .hearts{gap:3px;margin-top:5px}
.vitals .hearts .heart{width:5px;height:5px;border-radius:1px}
.vitals .pressure-label{display:flex;align-items:center;justify-content:space-between;margin:10px 0 4px;font-size:8px;letter-spacing:.14em;color:#d8c69b}
.vitals .pressure-label>span{display:inline-flex;align-items:center;gap:5px}
.vitals .pressure-label>span:last-child{font-variant-numeric:tabular-nums;letter-spacing:.04em;color:#f1deb4}
.vitals .label-icon{width:13px;height:13px;object-fit:contain}
.vitals .stamina-track{height:6px;border:0;border-radius:3px;background:#0f1d15;box-shadow:inset 0 1px 2px #000a,0 0 0 1px #8f754a66;overflow:hidden}
.vitals .stamina-track>div{border-radius:3px;background:linear-gradient(180deg,#e9d890,#8fb083 60%,#4f7a56);box-shadow:none}
.vitals .mana-track>div{background:linear-gradient(180deg,#a9e2f2,#5fa6c7 60%,#3a78a3)}
.vitals .xp-row{display:flex;align-items:center;gap:8px;margin-top:11px;padding-top:9px;border-top:1px solid #b08d5833;font-size:10px;color:#ecd9ae}
.vitals .level-chip,.vitals .shard-chip{display:inline-flex;align-items:center;gap:4px;font-weight:700;letter-spacing:.05em;white-space:nowrap}
.vitals .xp-track{flex:1;height:4px;border-radius:2px;background:#0f1d15;box-shadow:0 0 0 1px #8f754a55;overflow:hidden}
.vitals .xp-track i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#b8cba8,#e9d890)}

/* ───────── HUD : quêtes suivies ───────── */
.playing-ui .hud-left .quest{width:244px;min-height:0;padding:11px 14px 9px;transform:none;border:1px solid #8c653a;border-radius:3px;background-image:url('./assets/ui/paper-fibres.svg'),linear-gradient(150deg,#efdfba,#cfb685);background-size:180px 180px,auto;box-shadow:inset 0 0 0 1px #f6e7c4,inset 0 0 0 3px #8c653a22,0 8px 20px #07140b88;overflow:hidden;animation:none}
.playing-ui .hud-left .quest::before,.playing-ui .hud-left .quest::after{display:none}
.quest .quest-heading{display:flex;align-items:center;gap:6px;margin:0 0 4px}
.quest .quest-icon{width:15px;height:15px;object-fit:contain}
.hud-left .quest .eyebrow{font-size:8.5px;letter-spacing:.14em;color:#7a5733}
.hud-left .quest h2{margin:0 0 4px;font-size:18px;line-height:1.12;font-weight:600;color:#33241a}
.hud-left .quest p{min-height:0;font-size:11.5px;line-height:1.4;color:#4c3b29;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.quest .quest-progress{display:flex;align-items:center;gap:8px;margin:8px 0 0;font:600 10px var(--material-sans,system-ui);color:#6a4f30}
.quest .quest-progress-track{flex:1;height:4px;border-radius:2px;background:#7a58352e;box-shadow:none;overflow:hidden}
.quest .quest-progress-track i{display:block;height:100%;border-radius:2px;background:linear-gradient(90deg,#c1893f,#e2b564)}
.quest .quest-more{display:grid;gap:0;margin-top:9px;border-top:1px solid #8c653a40}
.quest .quest-more:empty{display:none}
.quest .quest-mini{display:grid;gap:1px;padding:7px 0 7px 9px;border:0;border-bottom:1px solid #8c653a26;border-left:2px solid #b9873f;border-radius:0;background:none;text-align:left;cursor:pointer;color:inherit}
.quest .quest-mini:last-child{border-bottom:0}
.quest .quest-mini:hover{background:#7a58351c}
.quest .quest-mini.ready{border-left-color:#4f8a4a}
.quest .quest-mini small{font-size:7.5px;letter-spacing:.14em;color:#7a5a33}
.quest .quest-mini strong{font-size:13px;line-height:1.15;color:#33241a}
.quest .quest-mini span{font-size:10.5px;line-height:1.3;color:#5a4630;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.quest .quest-mini-rail{height:2px;margin-top:3px;background:#7a583530}
.quest .quest-open{margin-top:7px;padding:6px 0 0;border-top:1px solid #8c653a40;font-size:10px}
.quest .quest-open img{width:15px;height:15px}

/* ───────── Carnet ───────── */
/* Des cadres décoratifs en position absolue défilaient avec le contenu : traits qui se baladent. Supprimés. */
#notebook .journal-detail::before,.journal-current::before,.journal-heading::after{display:none}
#notebook .notebook-panel{border:1px solid #a98753;box-shadow:inset 0 0 0 1px #0f1b14,0 22px 60px #07120ccc}
#notebook .notebook-panel::before{display:none}
.journal-heading{min-height:104px;padding:18px 40px 16px;border-bottom:1px solid #a98753;box-shadow:none}
.journal-heading>img{width:54px;height:54px}
#notebook .journal-heading h2{font-size:28px}
#notebook .journal-tabs{padding:0 26px;border-bottom:1px solid #a9875399}
#notebook .journal-tabs button{min-height:44px;border-right:0;border-bottom:2px solid transparent}
#notebook .journal-tabs button[aria-selected=true]{background:linear-gradient(#33503b,#25402f);box-shadow:none;border-bottom-color:#e0bd75}
#notebook .journal-quest-list{border-right:1px solid #9c7b4c88;padding:14px 12px 18px}
#notebook .journal-quest-item{margin-bottom:7px;min-height:0;padding:11px 12px 12px 54px;border-radius:2px;border-color:#6e805d99;box-shadow:none}
#notebook .journal-quest-item:hover,#notebook .journal-quest-item.selected{box-shadow:none;border-color:#d1ae72}
#notebook .journal-quest-item.selected{transform:none;background-color:#3b563e}
#notebook .journal-quest-item.tracked::before{width:7px;height:7px;top:11px;right:11px;border:0;background:#e0bd75}
.journal-list-rail,.journal-detail-rail,.quest-progress-track{border:0;box-shadow:none}
.journal-list-rail{height:3px;margin-top:8px}
.journal-detail-rail{height:5px;border-radius:3px}
#notebook .journal-detail{padding:24px 34px 30px}
.journal-status{right:34px;top:28px}
.journal-current{border-width:1px;box-shadow:none;border-radius:2px}
.journal-route{border-color:#9a7b4b88;box-shadow:none;border-radius:2px}
.journal-step-mark{border-width:2px;box-shadow:0 0 0 3px #172d24;width:40px;height:40px}
.journal-step:not(:last-child)::after{border-top-width:2px;top:22px}
.journal-step-preview{border-color:#9f855680}
#notebook .journal-rewards{border-top-color:#b99a6444}
.journal-track{border-width:1px;box-shadow:none;border-radius:2px;background-image:none;background:#2c4433}
.journal-footer{min-height:36px;border-top:1px solid #a9875388}
#notebook .journal-trace-page .notebook-entry{border-width:1px;box-shadow:none;border-radius:2px}
/* Barres de défilement discrètes, de la couleur du cadre (pas de rail clair). */
.journal-quest-list,#notebook .journal-detail,.journal-trace-page,.satchel-grid,.satchel-panel,.skills-panel,.st-detail,.st-map,.item-detail,.stats-view,.doll{scrollbar-width:thin;scrollbar-color:#8b7048 #162a21}
.journal-quest-list::-webkit-scrollbar,#notebook .journal-detail::-webkit-scrollbar,.journal-trace-page::-webkit-scrollbar,.satchel-grid::-webkit-scrollbar,.satchel-panel::-webkit-scrollbar,.skills-panel::-webkit-scrollbar,.stats-view::-webkit-scrollbar,.item-detail::-webkit-scrollbar{width:8px;height:8px}
.journal-quest-list::-webkit-scrollbar-track,#notebook .journal-detail::-webkit-scrollbar-track,.journal-trace-page::-webkit-scrollbar-track,.satchel-grid::-webkit-scrollbar-track,.satchel-panel::-webkit-scrollbar-track,.skills-panel::-webkit-scrollbar-track,.stats-view::-webkit-scrollbar-track,.item-detail::-webkit-scrollbar-track{background:#162a21}
.journal-quest-list::-webkit-scrollbar-thumb,#notebook .journal-detail::-webkit-scrollbar-thumb,.journal-trace-page::-webkit-scrollbar-thumb,.satchel-grid::-webkit-scrollbar-thumb,.satchel-panel::-webkit-scrollbar-thumb,.skills-panel::-webkit-scrollbar-thumb,.stats-view::-webkit-scrollbar-thumb,.item-detail::-webkit-scrollbar-thumb{background:#8b7048;border-radius:4px;border:2px solid #162a21}

/* ───────── Sacoche et talents : coque commune ─────────
   Le cadre intérieur en position absolue (::before) et le défilement de tout le panneau faisaient bouger des traits : la coque ne défile plus,
   chaque zone de contenu défile dans sa propre région. */
.panel.satchel-panel,.panel.skills-panel{display:flex;flex-direction:column;overflow:hidden;border:1px solid #b18e58;border-radius:4px;box-shadow:inset 0 0 0 1px #0e1914,0 0 0 1px #0b1510,0 24px 80px #000b}
.panel.satchel-panel::before,.panel.skills-panel::before{display:none}
.panel.satchel-panel{max-height:min(94dvh,980px)}
.panel.skills-panel{max-height:min(94dvh,880px)}
.satchel-heading,.skills-heading{flex:none;border-bottom:1px solid #b18e5855}
.satchel-heading{padding:14px 26px}
.satchel-tabs{flex:none;border-bottom:1px solid #8b724966}
.satchel-footer,.skills-footer{flex:none;border-top:1px solid #8b724955}

/* Sacoche : seule la liste d'objets défile (et la colonne de détail ou de poupée si elle déborde). */
.panel.satchel-panel .satchel-body{flex:1 1 auto;min-height:0;overflow:hidden;grid-template-rows:minmax(0,1fr)}
.panel.satchel-panel .satchel-body>*{min-height:0}
.panel.satchel-panel .doll{overflow-y:auto}
.panel.satchel-panel .satchel-storage{display:flex;flex-direction:column;overflow:hidden}
.panel.satchel-panel .satchel-storage>*{flex:none}
.panel.satchel-panel .satchel-grid{flex:1 1 auto;min-height:0;overflow-y:auto;align-content:start;padding:2px 4px 2px 0}
.panel.satchel-panel .satchel-storage .drag-hint{margin-top:10px}
.panel.satchel-panel .item-detail,.panel.satchel-panel .stats-view{overflow-y:auto}

/* Talents : l'arbre défile entre les emplacements (en haut) et la fiche du talent (en bas), qui restent en place. */
.panel.skills-panel .st-slots-bar{flex:none}
.panel.skills-panel .st-zones{flex:1 1 auto;min-height:0;overflow-y:auto}
.panel.skills-panel .st-detail{position:static;flex:none;border-top:1px solid #b18e58;box-shadow:none;min-height:0}
.panel.skills-panel .st-slot{border-width:1px;box-shadow:none}
.st-zone[data-zone=base]{border-right:1px solid #8b724933}
.st-zone{border-bottom:1px solid #8b724933}
.satchel-heading,.skills-heading{gap:14px;padding:14px 24px}
.satchel-heading h2,.skills-heading h2{margin:1px 0 2px;font-size:24px;line-height:1.1}
.satchel-heading p,.skills-heading p{font-size:11.5px}
.satchel-heading .eyebrow,.skills-heading .eyebrow{font-size:9px;letter-spacing:.16em}
.skills-heading .skills-reset{margin-right:50px;border-radius:2px;font:600 10px var(--material-sans,system-ui);letter-spacing:.08em}
.satchel-emblem{width:42px;height:42px}.satchel-emblem img{width:34px;height:34px}
.satchel-heading .close-panel,.skills-heading .close-panel{width:32px;height:32px;top:50%;right:18px;transform:translateY(-50%);border-width:1px;box-shadow:none;font-size:22px}
.panel.skills-panel .st-detail{grid-template-columns:56px minmax(0,1fr) 210px;gap:14px;padding:10px 22px}
.panel.skills-panel .st-detail-orb{width:56px;height:56px}
.panel.skills-panel .skills-footer{padding:7px 24px;font-size:10px;line-height:1.4}
@media(max-height:820px){.panel.skills-panel .skills-footer{display:none}}
.panel.satchel-panel .satchel-grid{grid-auto-rows:minmax(104px,max-content)}
.panel.satchel-panel .item-detail{overflow-x:hidden}
.panel.satchel-panel .satchel-storage .drag-hint{margin:8px 0 0;font-size:11px;line-height:1.35}
.panel.satchel-panel .item-detail .primary-button::before,.panel.satchel-panel .item-detail .primary-button::after,.panel.satchel-panel .item-detail .upgrade-button::before,.panel.satchel-panel .item-detail .upgrade-button::after{display:none}
/* La toile du personnage suit la hauteur des emplacements (6 × 78 px), elle ne l'impose pas : sinon la colonne grandit avec le panneau. */
.panel.satchel-panel .doll-stage{position:relative;min-height:0;overflow:hidden}
.panel.satchel-panel .doll-stage>canvas{position:absolute;inset:0;width:100%!important;height:100%!important}
/* Écrans étroits : les colonnes s'empilent et c'est le corps de la sacoche qui défile. */
@media(max-width:900px){
 .panel.satchel-panel .satchel-body,.panel.satchel-panel .satchel-body[data-tab=stats],.panel.satchel-panel .satchel-body[data-tab=look]{display:block;overflow-y:auto}
 .panel.satchel-panel .doll,.panel.satchel-panel .item-detail,.panel.satchel-panel .stats-view{overflow:visible}
 .panel.satchel-panel .satchel-storage{display:block}
 .panel.satchel-panel .satchel-grid{overflow:visible;grid-auto-rows:auto}
 .panel.satchel-panel .doll-stage{min-height:340px}
}

/* Le numéro « TRACE 0n » (polish.css) se superposait à l'étiquette de la fiche : on ne garde que l'étiquette. */
.journal-trace-page .notebook-entry::before{display:none}
