/* A persistent header keeps the close button reachable in every scrollable sheet. */
#sheet:not(.combat-view){padding:0;overflow:hidden}
#sheet:not(.combat-view)[open]{display:flex;flex-direction:column}
#sheet:not(.combat-view)>.sheet-top{position:relative;inset:auto;z-index:20;flex:0 0 52px;margin:0;padding:8px 16px 8px 22px;background:#1c2d2c;border-bottom:1px solid #d3ba822b}
#sheet:not(.combat-view)>#sheetContent{min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 22px 24px;scroll-padding-top:12px}
#sheet #closeSheet{display:grid;place-items:center;flex:none;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #cbb57866;border-radius:50%;background:#142522;color:#f4dbab;font:27px/1 Georgia}
#sheet .sheet-top #sheetLabel{max-width:calc(100% - 48px);line-height:1.5}
#sheet.combat-view>.sheet-top{position:relative;z-index:20;height:36px;margin:0 0 8px}
#sheet.combat-view>#sheetContent{height:calc(100% - 44px)}
#sheet.onboarding>#sheetContent{padding:0}
#sheet .combat-sheet>header{position:sticky;top:0;z-index:2;background:#20342b;padding:3px 0 10px}
#sheet .combat-sheet>header button{width:36px;height:36px;min-height:36px;flex:none}
.poi-hero .art[src*="poi-"]{object-fit:contain;background:radial-gradient(ellipse,#c2ac5420,transparent 70%)}
.companions-heading{display:flex;align-items:center;gap:14px;margin-bottom:22px}.companions-heading h2{margin:3px 0;font-size:28px}.companions-sigil{display:grid;place-items:center;width:52px;height:60px;color:#dfc88c;border:1px solid #ad966048;border-radius:30px 30px 16px 16px;background:radial-gradient(#8ca68d2b,#21382d);font:36px Georgia}
.friend-code-card{position:relative;padding:16px 18px;margin-bottom:16px;background:linear-gradient(135deg,#46503969,#142a24);border:1px solid #cfb47569;border-radius:16px}
.friend-code-card .eyebrow{font-size:9px}.friend-code-card .friend-code{font-size:25px;letter-spacing:4px;line-height:1.7}.friend-code-card button{background:#172d24;border:1px solid #bda26866;border-radius:10px;min-height:40px}
#friendForm{gap:8px;margin:0 0 24px}#friendForm input{min-width:0;flex:1;text-transform:uppercase}#friendForm button{padding-inline:14px;white-space:nowrap}
.companion-section{margin-top:20px}.companion-section>h3{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px;font:17px Georgia}.friend-count{font:11px system-ui;color:#dec28b;border:1px solid #b5a16d66;border-radius:20px;min-width:25px;text-align:center;padding:3px 8px}
.companion-card{display:flex;align-items:center;gap:12px;min-height:88px;padding:12px;border:1px solid #b1b58e29;border-radius:16px;background:linear-gradient(110deg,#28403588,#11262088);box-shadow:0 5px 12px #04110d1a}
.companion-portrait{position:relative;flex:0 0 58px;width:58px;height:58px;overflow:visible;border:1px solid #d7ba7570;border-radius:50%;background:radial-gradient(#76897166,#172f25);box-shadow:inset 0 0 0 3px #172920}
.avatar-crop{display:block;width:100%;height:100%;border-radius:50%;overflow:hidden}.companion-portrait img{width:100%;height:100%;object-fit:cover;object-position:50% 10%;transform:scale(2.1);transform-origin:50% 12%}
.companion-status{position:absolute;right:0;bottom:2px;width:11px;height:11px;border:2px solid #172c24;border-radius:50%;background:#7b877c}.companion-status.online{background:#9fd2a4;box-shadow:0 0 8px #70c18166}
.companion-copy{flex:1;min-width:0}.companion-copy strong{display:block;overflow:hidden;text-overflow:ellipsis;font:17px/1.3 Georgia;color:#eee0bd}.companion-copy small{display:block;margin-top:5px;font:10px/1.5 system-ui;color:#aabda8}.companion-copy .online{color:#a7cdb0}
.companion-actions{display:flex;gap:5px;flex-wrap:wrap;justify-content:end;flex-shrink:0}.companion-actions button{min-height:36px;padding:6px 9px;font:11px system-ui;border-radius:9px}.companion-actions .remove-friend{width:34px;padding:0;background:transparent;border-color:#acaf8e22;color:#a9b9a6}.remove-friend svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
.dungeon-invite{padding:14px;border:1px solid #c4a16c55;border-radius:14px;background:#34423366}.dungeon-invite h3{margin-bottom:4px}.dungeon-invite small{color:#bec8ac}
.friends-empty{text-align:center;padding:28px 12px;border:1px dashed #b7a77440;border-radius:16px;color:#b1c1ae;font:13px/1.6 system-ui}.friends-empty span{display:block;color:#cbb67f;font:36px Georgia;margin-bottom:8px}
@media(max-width:400px){#sheet:not(.combat-view)>#sheetContent{padding:16px 14px 20px}#sheet:not(.combat-view)>.sheet-top{padding-inline:14px}.companion-card{gap:9px;padding:10px}.companion-copy strong{font-size:15px}.companion-portrait{flex-basis:48px;width:48px;height:48px}.companion-actions button{font-size:10px;padding:6px}.companions-heading h2{font-size:25px}.friend-code-card .friend-code{font-size:22px;letter-spacing:3px}}
