/* Shared movable workspaces; campaign state stays in the existing store. */
.floating-window{position:fixed;inset:auto;box-sizing:border-box;display:flex;flex-direction:column;min-width:0;min-height:0;max-width:none;max-height:none;resize:none;overflow:hidden;background:var(--panel);color:var(--text);border:1px solid #bda368aa;border-radius:11px;box-shadow:0 18px 70px #0009,0 0 0 1px #0004}
.floating-window[hidden],.window-dock[hidden]{display:none!important}
.floating-window.is-moving{user-select:none;box-shadow:0 18px 70px #000b,0 0 0 2px var(--gold)}
.floating-window.is-maximized{inset:auto;resize:none;border-radius:10px}
.floating-window-head{display:flex;align-items:center;gap:9px;flex-shrink:0;min-height:47px;padding:5px 9px 5px 12px;background:linear-gradient(110deg,var(--side),var(--panel2));border-bottom:1px solid var(--line);cursor:grab;touch-action:none;user-select:none}
.floating-window-head:active{cursor:grabbing}.floating-window-head:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
.window-grip{font-size:20px;color:var(--gold)}.floating-window-head>strong{flex:1;min-width:0;font:15px Georgia,serif;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.window-controls{display:flex;gap:3px;flex-shrink:0}.window-controls button{width:34px;height:34px;border:1px solid var(--line);background:transparent;color:var(--text);border-radius:5px;font:22px/1 system-ui;cursor:pointer;touch-action:manipulation}.window-controls button:hover{background:var(--panel2);color:var(--gold)}
.floating-window-content{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.window-edge{position:absolute;z-index:2;touch-action:none}.window-edge-e{right:0;top:48px;bottom:20px;width:7px;cursor:ew-resize}.window-edge-s{bottom:0;left:0;right:20px;height:7px;cursor:ns-resize}
.window-resize-corner{position:absolute;bottom:0;right:0;width:27px;height:27px;padding:0;border:0;border-radius:6px 0 0 0;background:var(--panel2);color:var(--gold);cursor:nwse-resize;touch-action:none;z-index:3;font-size:16px}.is-maximized [data-window-resize]{display:none}
.window-dock{position:fixed;z-index:68;bottom:14px;left:50%;transform:translateX(-50%);display:flex;gap:7px;max-width:calc(100vw - 24px);overflow-x:auto;padding:7px;background:var(--side);border:1px solid var(--gold);border-radius:10px;box-shadow:0 7px 30px #0007;overscroll-behavior:contain}
.window-dock-item{display:flex;flex-shrink:0;border:1px solid var(--line);border-radius:6px;overflow:hidden}.window-dock-item button{padding:8px 10px;background:var(--panel);border:0;color:var(--text);cursor:pointer;display:flex;align-items:center;gap:7px;font-size:12px}.window-dock-item button+button{border-left:1px solid var(--line);font-size:20px}.window-dock-item strong{font-weight:500;max-width:165px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.window-dock-item span{font-size:9px;color:var(--gold);text-transform:uppercase;letter-spacing:1px}
.floating-window.pdf-window .floating-window-content{display:flex;flex-direction:column;overflow:hidden;scrollbar-gutter:auto}.floating-window .pdf-page-scroll{flex:1;min-height:0}.floating-window .pdf-toolbar,.floating-window .pdf-window-foot{flex-shrink:0}.floating-window .pdf-window-foot{padding-right:31px}
.sheet-body{padding:18px;container-type:inline-size}.sheet-body .character-profile{grid-template-columns:80px minmax(0,1fr);gap:17px;padding:14px;margin-bottom:16px;min-height:0}.sheet-body .character-profile-portrait{height:112px;width:100%;min-width:0;max-width:100%;margin:0;inset:auto}.sheet-body .character-profile-portrait img{height:112px;width:100%;object-fit:cover}.sheet-body .character-profile-copy .page-header{margin:0;display:block}.sheet-body .character-profile-copy h1{font-size:25px}.sheet-body .character-profile-copy .eyebrow,.sheet-body .character-profile-copy .page-header p,.sheet-body .character-profile-tags{display:none}.sheet-body .page-header .button-row{margin-top:8px}.sheet-body .page-header .btn{padding:6px 8px;font-size:10px}.sheet-body .sheet-pin-action{display:none}
.sheet-vitals{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:12px;margin-bottom:16px}.sheet-vitals .stat-number{font-size:32px}.sheet-vitals .stat-card{padding:16px}.sheet-defense{padding:16px;border:1px solid var(--line);border-radius:8px;display:grid;gap:12px}.sheet-defense div{display:flex;justify-content:space-between;gap:8px;font-size:12px}.sheet-defense small{color:var(--muted)}.sheet-defense strong{color:var(--gold)}
.sheet-body .tabs{margin-bottom:16px;position:sticky;top:-18px;z-index:1;background:var(--panel);padding-top:8px}.sheet-body .tabs .tab{font-size:11px;white-space:nowrap}.sheet-body .split-grid{grid-template-columns:1fr}.sheet-body .ability-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.sheet-body .ability{padding:11px 5px}.sheet-body .ability b{font-size:25px}.sheet-body .card-pad{padding:18px}.sheet-body .section-heading h2{font-size:19px}.sheet-body .details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-body .section-heading{gap:8px;flex-wrap:wrap}.sheet-body .skill-row{grid-template-columns:minmax(0,1fr) 36px 32px 32px;gap:5px}.sheet-body .skill-name{min-width:0}.sheet-body .spell-grid{grid-template-columns:1fr}.sheet-body .inventory-summary{flex-wrap:wrap}.sheet-body .coins{flex-wrap:wrap}.sheet-body .inventory-item{padding:14px}.sheet-body .item-tools{flex-wrap:wrap}.sheet-body .resource-row{gap:8px;flex-wrap:wrap}.sheet-body .filter-row{flex-wrap:wrap}.sheet-body .filter-row .searchbar{min-width:0}.sheet-body .npc-sheet{font-size:12px;line-height:1.8}.sheet-body .npc-sheet h3{font:20px Georgia,serif;margin:22px 0 12px}.sheet-body .npc-sheet-stats{grid-template-columns:repeat(3,minmax(0,1fr))}.sheet-body .npc-attack{flex-wrap:wrap;gap:8px}.sheet-body .notice{margin-top:10px}.sheet-body .health-actions{flex-wrap:wrap}.sheet-body .health-top{gap:5px}
.sheet-actions{position:sticky;z-index:2;bottom:0;background:var(--panel);border-top:1px solid var(--line);padding:12px 20px 7px 0;margin-top:20px;display:flex;flex-wrap:wrap;gap:6px}.sheet-actions .btn{font-size:11px}.sheet-hint{font-size:10px;color:var(--dim);margin:0 0 14px;line-height:1.7}.sheet-picker-row{display:flex;gap:12px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 0}.sheet-picker-row strong{font-size:13px}.sheet-picker-row small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
@container(max-width:370px){.sheet-vitals{grid-template-columns:1fr}.sheet-defense{grid-template-columns:repeat(2,minmax(0,1fr))}.sheet-body .details-grid{grid-template-columns:1fr}.sheet-body .character-profile{grid-template-columns:65px minmax(0,1fr);padding:10px;gap:10px}.sheet-body .inventory-summary{padding:14px}.sheet-body .coins{gap:10px}.sheet-body .section-heading .button-row{flex-wrap:wrap}.sheet-body .item-row{flex-wrap:wrap}}
@media(max-width:900px){.window-dock{bottom:calc(82px + env(safe-area-inset-bottom,0px));padding:5px}.floating-window.pdf-window{min-width:0;min-height:0;bottom:auto;right:auto}.window-controls button{width:36px;height:36px}.floating-window-head{min-height:49px}.window-resize-corner{width:31px;height:31px}.sheet-body{padding:12px}.sheet-body .tabs{top:-12px}.sheet-actions{bottom:0}.floating-window .pdf-toolbar{gap:5px}.floating-window .pdf-window-foot small{display:none}}
@media print{.floating-window,.window-dock{display:none!important}}
