/* Generated metal/leather art stays separate from sharp native text. */
.character-sheet{position:relative}
[data-stat-help]{cursor:help;touch-action:manipulation}
[data-stat-help]:focus-visible{outline:1px solid #f7d38a;outline-offset:3px}
.stat-help{position:absolute;z-index:20;width:350px;padding:14px 16px;border:1px solid #99825a;background:#121612fa;box-shadow:0 6px 20px #000b;color:#e7e0d0;font-size:14px;line-height:1.6;overflow:auto;touch-action:pan-y;pointer-events:auto}
.stat-help>strong{display:block;color:#f1d49e;font-size:15px;margin-bottom:8px}
.stat-help>p{margin:6px 0}.stat-help>p:last-child{margin-bottom:0}
#modal[data-kind=stats]{width:min(1000px,96%);height:min(670px,94cqh);border:0;box-shadow:0 20px 80px #000c}
#modal[data-kind=stats]>header{margin:8px 10px 0;padding:10px 16px;height:60px;border-bottom:1px solid #9e855744;background:linear-gradient(90deg,#aa894715,transparent)}
.character-sheet{gap:18px;padding:16px;grid-template-columns:minmax(210px,.9fr) minmax(0,1.7fr)}
.sheet-portrait{background:none;border:0;padding:0;overflow:hidden}
.sheet-identity{padding:4px 0 10px}.sheet-identity h3{margin-top:3px}
.sheet-stage{background:transparent url('../public/assets/stats-portrait-v1.png') center/100% 100% no-repeat;min-height:150px}
.sheet-weapon{border:0;margin-top:10px;padding:12px 16px;background-color:transparent}
.sheet-combat article,.sheet-attribute{border:0;background-color:transparent}
.sheet-section-heading{padding:2px 0 8px;border-bottom:1px solid #a8915c33}
.sheet-attributes{margin-top:10px}
/* The custom rail occupies the last 12px inside this scroll viewport.
   Reserve it in layout, including a 6px gap, so it cannot cover values/art. */
.sheet-details{padding:0 18px 6px 4px}
@container game-viewport (max-height:520px) or (max-width:900px){
 #modal[data-kind=stats]{width:98%;height:100%;max-height:100%}#modal[data-kind=stats]>header{height:36px;margin:5px 7px 0;padding:4px 9px}
 .character-sheet{grid-template-columns:minmax(145px,.8fr) minmax(0,1.7fr);padding:9px;gap:12px}
 .sheet-identity{padding:0 0 4px}.sheet-stage{min-height:85px}.sheet-weapon{padding:8px 10px;margin-top:5px}
}
@container game-viewport (max-width:620px){.character-sheet{grid-template-columns:minmax(120px,.7fr) minmax(0,1.5fr);gap:8px}.sheet-weapon{padding:6px}.sheet-weapon img{width:24px;height:24px}}
#modal,#lobby-panel,.sheet-portrait,.sheet-combat article,.map-card,.item-card{background-color:#111110;background-repeat:no-repeat}
.sheet-attributes{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}
.sheet-attribute{display:flex;align-items:center;gap:8px;min-width:0;padding:7px;background:#151513;border:1px solid #8b754d66}
.attribute-icon{flex:none;width:36px;height:36px;background-image:url('../public/assets/progression-attributes-v1.png');background-size:200% 200%;background-repeat:no-repeat}
.attribute-dex{background-position:100% 0}.attribute-luk{background-position:0 100%}.attribute-int{background-position:100% 100%}
.sheet-attribute>span{font-size:12px;color:#f3e5c9;flex:1}.sheet-attribute small{display:block;font-size:12px;letter-spacing:1px;color:#c2b797}
.sheet-attribute>b{font-size:17px;min-width:24px;text-align:right;color:#f8da9f;font-weight:500}
#modal[data-kind=stats] button.attribute-add{flex:none;min-width:36px;width:36px;min-height:36px;height:36px;padding:0;display:grid;place-items:center;font:22px/1 sans-serif;color:#ffe0a3;border:0;background-color:transparent}
#modal .attribute-add:disabled{opacity:.38;cursor:default}.sheet-points b{color:#ffe1a4;font-size:16px;margin-left:7px}
.sheet-secondary{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;margin:10px 0}
.sheet-secondary>div{display:flex;justify-content:space-between;gap:8px;border-bottom:1px solid #a38b5a33;padding:7px 0;font-size:12px}
.sheet-secondary dt{color:#d1c9b6}.sheet-secondary dd{margin:0;color:#ffebc7}
.sheet-combat strong{font-size:26px}.sheet-combat strong small{font-size:18px;display:inline!important}
#modal[data-kind=stats]>header{background:linear-gradient(90deg,#363125dd,#171712aa)}
.sheet-details{scrollbar-color:#89744c #131310}.sheet-vitals{margin:12px 0 18px}
#modal-body button:focus-visible{outline:2px solid #f7d38a;outline-offset:2px}
@container game-viewport (max-height:520px) or (max-width:900px){.sheet-attributes{gap:6px;margin-bottom:10px}.sheet-attribute{padding:4px;gap:5px}.attribute-icon{width:30px;height:30px}.sheet-combat strong{font-size:22px}.sheet-secondary>div{padding:6px 0}}
@container game-viewport (max-width:620px){.sheet-attributes{grid-template-columns:1fr 1fr;gap:4px}.attribute-icon{width:24px;height:24px}.sheet-attribute{gap:3px}.sheet-attribute>b{font-size:14px;min-width:16px}#modal .attribute-add{width:30px;min-width:30px}.sheet-secondary{gap:0 10px}.sheet-combat strong{font-size:19px}}
