/* Hotfix 0.1.4: consistent controls and one scrollable reward screen. */
.constellation-viewport,.constellation-viewport *{-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.constellation-viewport{cursor:grab;overscroll-behavior:contain}
.constellation-viewport:active{cursor:grabbing}
.constellation-viewport button{cursor:pointer}
.constellation-invest{display:flex;flex-direction:column;gap:9px}
.constellation-invest button{width:100%;white-space:normal;min-height:42px}
.constellation-invest small{font-size:11px;line-height:1.5;color:#a9bec8}
#vital-bless{display:inline-flex;flex:none;align-items:center;width:21px;height:21px;margin-left:2px}
#vital-bless[hidden]{display:none}
#vital-bless img{width:21px;height:21px;object-fit:contain;image-rendering:pixelated}
.vital-name:has(#vital-bless:not([hidden])){gap:5px}
.vital-name>strong{min-width:0}
.store-consumable-status{color:#efcd87!important;font-size:11px!important;line-height:1.5}
.store-main .ship-shop-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.store-main .ship-shop-card{padding:0;border-radius:10px}
.ship-shop-preview canvas{height:150px}
.ship-shop-copy{padding:14px 16px;flex:1}
.ship-shop-copy h4{font-size:16px;margin:0 0 8px}
.ship-shop-copy p{font-size:12px;line-height:1.6}
.ship-shop-copy small{font-size:11px}
.ship-shop-card footer{margin-top:auto;flex-wrap:wrap;padding:12px 16px}
.ship-shop-preview>span{top:10px;right:10px}
#game-modal[open]:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]){display:flex;flex-direction:column;overflow:hidden;width:min(880px,calc(100vw - 24px));max-height:calc(100dvh - 24px)}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"])>header{flex:none;position:static}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]) #modal-body{flex:1;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]) :is(.weekly-victory,.raid-victory){padding:18px;border:1px solid #756447;border-radius:12px;background:linear-gradient(120deg,#303228,#102531);margin-bottom:18px}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]) h3{font-size:26px;line-height:1.2;margin:8px 0 12px}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]) :is(.weekly-result-footer,.raid-entry){position:static;display:flex;flex-direction:column;align-items:stretch;gap:12px;clear:both;margin:20px 0 0;padding:16px;border:1px solid #41555f;border-radius:10px;background:#10222d;text-align:left}
#game-modal:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]) :is(.weekly-result-footer,.raid-entry)>.menu-button{align-self:stretch;min-width:0;min-height:46px;white-space:normal}
.weekly-reward-grid article,.raid-result-items article{min-width:0;overflow-wrap:anywhere}
.raid-result-items article>img{flex-shrink:0}
.raid-result-items article>div{min-width:0}
body:has(#game-modal[open][data-menu-type$="-result"]) :is(#daily-hud,#weekly-hud,#raid-hud,#boss-team-hud,#boss-practice-banner){display:none!important}
@media(min-width:1100px) and (pointer:fine){
 body .hotbar,body .hunt-controls,body #chat-launcher{bottom:calc(28px + env(safe-area-inset-bottom))}
 body .world-context{bottom:calc(92px + env(safe-area-inset-bottom))}
 body .chat-dock-window{bottom:calc(108px + env(safe-area-inset-bottom))}
}
@media(max-width:700px){
 .store-main .ship-shop-grid{grid-template-columns:1fr}
 #game-modal[open]:is([data-menu-type="daily-result"],[data-menu-type="weekly-result"],[data-menu-type="raid-result"]){width:auto;max-height:calc(var(--visual-height,100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px)}
 .weekly-reward-grid{gap:8px}
 .weekly-reward-grid article{padding:10px}
}
@media(max-width:760px),(pointer:coarse){
 body .hunt-controls,body #chat-launcher{bottom:calc(142px + env(safe-area-inset-bottom))}
}
@media(max-height:540px) and (pointer:coarse){
 body .hunt-controls,body #chat-launcher{bottom:calc(74px + env(safe-area-inset-bottom))}
}


.constellation-viewport{scroll-behavior:auto!important;touch-action:none;overflow-anchor:none}
.chat-dock-window{resize:both;overflow:hidden;min-width:260px;min-height:220px}
.captain-set-bonuses{padding:10px;border:1px solid #34515c;border-radius:8px;margin:12px 0}.captain-set-bonuses p{color:#8e9fa7;margin:5px 0}.captain-set-bonuses p.active{color:#ead194}
.captain-dashboard [data-character-section="overview"]{display:grid;gap:20px;margin-top:22px}.captain-dashboard [data-character-section="overview"]>.captain-role-note,.captain-dashboard [data-character-section="overview"]>.captain-stat-grid,.captain-dashboard [data-character-section="overview"]>.character-mastery{margin:0}.captain-dashboard .captain-stat-grid{gap:12px}.captain-dashboard .captain-stat{padding:14px 10px}.captain-dashboard .captain-stat b{margin-top:9px}.captain-dashboard .captain-section-label{margin-top:24px}
/* Classic character panel: the equipped items frame the current outfit. */
.captain-classic-identity{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 10px;align-items:center;margin-bottom:12px}
.captain-classic-identity h3{font:700 25px/1.15 'Barlow Condensed',sans-serif;color:#f1dfb2;margin:0;overflow-wrap:anywhere}
.captain-classic-identity p{grid-column:1/-1;color:#a6bdc5;font-size:9px;line-height:1.5;margin:0}.captain-classic-identity p b{color:#e7cd91}
.captain-classic-identity .captain-level{display:flex;gap:5px;align-items:baseline;border:1px solid #425e67;border-radius:4px;background:#18323a;padding:4px 7px;font-size:10px;white-space:nowrap}
.captain-classic-identity .captain-level strong{display:inline;font-size:19px;line-height:1}
.captain-death-history{width:100%;margin-bottom:12px;border-color:#8e784b;background:#0b1c26;color:#e8cf94}
.captain-death-history .pirate-icon{width:21px;height:21px}
.captain-paperdoll{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;grid-template-rows:48px 50px 50px 25px;align-items:center;gap:7px 14px;padding:10px 16px 12px;border:1px solid #324b58;border-radius:7px;background:radial-gradient(ellipse at 50% 58%,#29444677,transparent 72%),#0b1b25;position:relative}
.captain-paperdoll-figure{grid-column:2;grid-row:2/4;display:grid;place-items:center;position:relative;isolation:isolate;align-self:stretch;min-width:0;min-height:0;padding:0;border:0;border-radius:7px;background:none;cursor:pointer}
.captain-paperdoll-figure::before{content:'';position:absolute;bottom:4px;width:60px;height:9px;background:#050e1788;border-radius:50%;z-index:-1}
.captain-paperdoll-figure img{width:128px;height:112px;max-width:100%;max-height:100%;object-fit:contain;image-rendering:pixelated;opacity:1;pointer-events:none}
.captain-paperdoll>.captain-form{grid-column:2;grid-row:4;justify-self:center;text-align:center;border-color:#ad874c;background:#2d2a20;color:#f4cd78;font-size:9px;padding:2px 8px;line-height:1.5}
.captain-gear-slot{display:grid;place-items:center;position:relative;width:48px;height:48px;min-width:0;padding:3px;border:1px solid #9a7b47;border-radius:5px;background:#0c202d;box-shadow:inset 0 0 0 2px #06131c88;cursor:pointer;justify-self:center}
.captain-gear-slot:hover{border-color:#edc575;background:#233d43}.captain-gear-slot:not(.filled){border-color:#52626a;border-style:dashed}
.captain-gear-slot:not(.filled) img{opacity:.4}
.captain-gear-slot b{position:absolute;bottom:1px;right:2px;font-size:8px;line-height:1.4;padding:0 2px;border-radius:2px;background:#091621db;color:#f4d492}
.captain-gear-slot span{display:grid;place-items:center;width:40px;height:40px}.captain-gear-slot img{width:38px;height:38px;object-fit:contain;image-rendering:pixelated}
.captain-gear-slot.slot-head{grid-column:2;grid-row:1}.captain-gear-slot.slot-chest{grid-column:1;grid-row:2}.captain-gear-slot.slot-feet{grid-column:1;grid-row:3}.captain-gear-slot.slot-weapon{grid-column:3;grid-row:2}.captain-gear-slot.slot-charm{grid-column:3;grid-row:3}
.captain-dashboard .captain-primary-stats{gap:0;margin:12px 0 0;padding:10px 0;border:1px solid #38505c;border-radius:7px;background:#122a35}
.captain-primary-stats .captain-stat{border:0;border-radius:0;background:none;padding:3px 8px;text-align:center}.captain-primary-stats .captain-stat+.captain-stat{border-left:1px solid #39515b}
.captain-primary-stats .captain-stat small{text-transform:uppercase;font-size:8px;letter-spacing:.4px}.captain-primary-stats .captain-stat b{margin-top:5px;font-size:24px;line-height:1.2}
.captain-set-bonuses summary{cursor:pointer;font-weight:700;color:#e9ce90;min-height:28px;align-content:center}.captain-set-bonuses section{margin-top:12px;padding-top:12px;border-top:1px solid #34515c}.captain-set-bonuses strong{color:#dce0cf}
@media(max-width:380px){.captain-paperdoll{padding-inline:10px;column-gap:8px}.captain-classic-identity h3{font-size:23px}.captain-primary-stats .captain-stat b{font-size:21px}.captain-primary-stats .captain-stat small{font-size:7px;letter-spacing:0}}
.bag-move-tools{display:flex;gap:8px;align-items:center;margin:8px 0}.bag-move-tools[hidden]{display:none}
.weekly-drop>.boss-item-chance{text-align:right;flex-shrink:0;line-height:1.5}
.boss-item-chance small{display:block;font-size:9px;font-weight:400;color:#a9bec9;white-space:normal;max-width:112px}
.weekly-rarity-group summary{display:flex;align-items:center;gap:8px;list-style:none;min-height:24px}
.weekly-rarity-group summary::before{content:'▸';flex-shrink:0}.weekly-rarity-group[open] summary::before{content:'▾'}
.weekly-rarity-group summary>span{min-width:0;flex:1;line-height:1.5}.weekly-rarity-group summary>strong{float:none;flex-shrink:0}
