/* Captain, inventory and preferences: original pirate artwork and nautical panels. */
.personal-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:39px;padding:9px 12px;border:1px solid #4f6b78;border-radius:7px;background:#142d38;color:#e9e2cd;font:600 11px/1.5 'DM Sans',sans-serif;text-decoration:none;cursor:pointer;white-space:normal;text-align:center}
.personal-button .pirate-icon{width:24px;height:24px;object-fit:contain;flex:none}
.personal-button:hover:not(:disabled){background:#264347;border-color:#c6a467}
.personal-button.primary{background:linear-gradient(120deg,#f6d185,#e4b35a);border-color:#e6bd70;color:#17242a}
.personal-button.danger{background:#572e30;border-color:#a96554;color:#f1d5ca}
.personal-button:disabled{opacity:.5;cursor:default}
.personal-button:focus-visible{outline:2px solid #f2d28c;outline-offset:3px}
.personal-banner{display:flex;align-items:center;gap:18px;padding:24px;border:1px solid #78805c;border-radius:11px;background:radial-gradient(ellipse at top right,#ab8c3e26,transparent 70%),linear-gradient(115deg,#264039,#142c38);margin:0 0 21px;color:#eadabb}
.personal-banner>.pirate-icon{width:62px;height:62px;flex:none;object-fit:contain}
.personal-banner>div{min-width:0}
.personal-banner small{color:#d7b36b;font:700 9px 'DM Sans',sans-serif;letter-spacing:1.5px}
.personal-banner h2{color:#f0e1bd;font:700 32px/1.1 'Barlow Condensed',sans-serif;margin:7px 0;overflow-wrap:anywhere}
.personal-banner p{color:#a9c3c7;font:12px/1.6 'DM Sans',sans-serif;margin:0}
.personal-section-heading{display:flex;gap:14px;align-items:center;margin-bottom:16px}
.personal-section-heading>.pirate-icon{width:45px;height:45px;flex:none;object-fit:contain}
.personal-section-heading>div{min-width:0}
.personal-section-heading small{color:#d7b16b;font-size:9px;letter-spacing:1px}
.personal-section-heading h3{font:700 25px/1.15 'Barlow Condensed',sans-serif;color:#efdbb2;margin:3px 0 6px;overflow-wrap:anywhere}
.personal-section-heading p{font-size:12px;line-height:1.6;color:#aac2c9;margin:0}
.personal-footer{display:flex;gap:9px;justify-content:flex-end;border-top:1px solid #35515d;margin-top:22px;padding-top:15px}
/* Floating panels keep the existing dragging, minimization and hotkeys. */
#panel-character.game-window{width:min(440px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px);border:1px solid #68765c;border-radius:12px;background:#0d202b;overflow:hidden}
#panel-backpack.game-window{width:min(570px,calc(100vw - 16px))!important;max-width:calc(100vw - 16px);border:1px solid #68765c;border-radius:12px;background:#0d202b;overflow:hidden}
:is(#panel-character,#panel-backpack)>.window-header{background:linear-gradient(110deg,#243e3f,#172d38);padding:11px 14px;border-bottom:1px solid #526857;min-height:50px}
:is(#panel-character,#panel-backpack)>.window-header>.pirate-icon{width:30px;height:30px;margin-right:4px;object-fit:contain}
:is(#panel-character,#panel-backpack)>.window-header h2{font:700 22px 'Barlow Condensed',sans-serif;color:#efdbac;letter-spacing:.5px}
#panel-character .window-body{padding:0!important}
.captain-dashboard{font:12px/1.5 'DM Sans',sans-serif;color:#dddccf;padding:15px}
.captain-dashboard *{box-sizing:border-box}
.captain-dashboard [hidden]{display:none!important}
.captain-dashboard .pirate-icon{object-fit:contain}
.captain-identity{display:grid;grid-template-columns:70px minmax(0,1fr) 42px;gap:12px;align-items:center;padding:14px 12px;border:1px solid #697751;border-radius:10px;background:linear-gradient(130deg,#31453b,#142b36)}
.captain-outfit{display:grid;place-items:center;height:89px;position:relative;border-radius:8px;background:radial-gradient(ellipse,#c9ad6955,transparent 72%)}
.captain-outfit::after{content:'';position:absolute;bottom:8px;left:15%;right:15%;height:5px;border-radius:50%;background:#06192544;filter:blur(3px)}
.captain-outfit img{width:88px;height:88px;object-fit:contain;image-rendering:pixelated;position:relative;z-index:1}
.captain-identity small{display:block;color:#d8b467;font-size:8px;letter-spacing:.8px}
.captain-identity h3{font:700 27px/1.08 'Barlow Condensed',sans-serif;color:#f1dfb2;margin:5px 0;overflow-wrap:anywhere}
.captain-identity p{font-size:10px;color:#a6c3cb;margin:0 0 7px;line-height:1.4}
.captain-form{display:inline-block;padding:3px 6px;border:1px solid #9b976a55;background:#122b3388;border-radius:4px;color:#e8d5ac;font-size:9px;max-width:100%;overflow-wrap:anywhere}
.captain-level{color:#b4bfa3;font-size:9px;text-align:center}
.captain-level strong{display:block;font:700 28px/1.2 'Barlow Condensed',sans-serif;color:#edc57c;overflow-wrap:anywhere}
.captain-tabs{display:flex;gap:5px;margin:14px 0}
.captain-tabs button{flex:1;border:1px solid #405d6d;border-radius:6px;background:#122c39;color:#a8c3cd;padding:9px 6px;font:600 11px 'DM Sans',sans-serif;cursor:pointer;min-width:0;min-height:37px}
.captain-tabs button.active{background:#364936;border-color:#c2a064;color:#f3d38c}
.captain-dashboard button:focus-visible{outline:2px solid #f1cf8b;outline-offset:2px}
.captain-role-note{display:flex;align-items:center;gap:8px;margin:0 0 12px;padding:7px 10px;background:#18313b;border-radius:7px;border:1px solid #365d68}
.captain-role-note .pirate-icon{width:30px;height:30px}
.captain-role-note span{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.captain-role-note b{color:#e3c498;font-size:11px}
.captain-role-note small{font-size:9px;color:#9ab8c6}
.captain-stat-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:13px}
.captain-stat{padding:11px 9px;border:1px solid #365564;border-radius:7px;background:#122a35;min-width:0}
.captain-stat small{display:block;font-size:8px;color:#a5bdc6;line-height:1.4}
.captain-stat b{display:block;font:700 23px/1.2 'Barlow Condensed',sans-serif;color:#edd395;margin-top:5px;overflow-wrap:anywhere}
.captain-dashboard .character-mastery{margin:12px 0 17px;border:1px solid #637356;border-radius:8px;padding:12px;background:#243c3455}
.captain-dashboard .character-mastery header{display:flex;justify-content:space-between;gap:9px;color:#d1b578;font-size:9px;line-height:1.5}
.captain-dashboard .character-mastery strong{font-size:13px;color:#e3d8b9;display:block;margin-top:7px}
.captain-dashboard .character-mastery p{font-size:10px;line-height:1.6;color:#b4cdc9;margin:5px 0}
.captain-dashboard .character-mastery small{font-size:9px;line-height:1.5;color:#96b3be}
.captain-section-label{color:#d2b578;font-size:8px;letter-spacing:1.3px;margin:17px 0 10px}
.captain-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:22px}
.captain-shortcut{display:flex;align-items:center;gap:8px;border:1px solid #3e5b67;border-radius:8px;background:#152e39;color:#d7dfce;padding:10px 8px;text-align:left;cursor:pointer;min-width:0}
.captain-shortcut:hover{border-color:#caa667;background:#234141}
.captain-shortcut .pirate-icon{width:31px;height:31px;flex:none}
.captain-shortcut>span{flex:1;min-width:0}
.captain-shortcut b{display:block;font:700 18px/1.2 'Barlow Condensed',sans-serif;overflow-wrap:anywhere;color:#e7d8b0}
.captain-shortcut small{display:block;color:#9ebcc6;font:9px/1.5 'DM Sans',sans-serif;margin-top:4px}
.captain-shortcut i{font-size:16px;font-style:normal;color:#d3bc7d}
.captain-section-intro h4,.captain-attribute-group h4{font:700 23px 'Barlow Condensed',sans-serif;color:#e6cba0;margin:4px 0 7px}
.captain-section-intro p,.captain-caption{color:#a3bdc8;font-size:10px;line-height:1.6;margin:7px 0 14px}
.captain-equipment{display:grid;gap:8px}
.captain-gear-row{display:flex;align-items:center;gap:12px;background:#132d38;border:1px dashed #4a6876;padding:10px;border-radius:8px;color:#b8c9ca;text-align:left;cursor:pointer;min-width:0}
.captain-gear-row.filled{border-style:solid}
.captain-gear-row:hover{border-color:#cfb272}
.captain-gear-art{width:52px;height:52px;display:grid;place-items:center;flex:none;background:#09202a;border:1px solid #5b726a;border-radius:8px}
.captain-gear-art img{width:42px;height:42px;object-fit:contain;image-rendering:pixelated}
.captain-gear-row>span:nth-child(2){flex:1;min-width:0}
.captain-gear-row small{display:block;color:#9fbcc5;font-size:9px;line-height:1.5}
.captain-gear-row b{display:block;font:700 19px/1.2 'Barlow Condensed',sans-serif;color:#e2d1ac;margin:3px 0;overflow-wrap:anywhere}
.captain-gear-row i{font-style:normal;color:#c7ae74;font-size:21px}
.captain-attribute-group{border:1px solid #3e5c68;background:#142b36;border-radius:8px;padding:12px;margin:10px 0}
.captain-attribute-group dl{margin:5px 0 0}
.captain-attribute-group dl>div{display:flex;gap:12px;justify-content:space-between;padding:9px 0;border-top:1px solid #35515e;font-size:11px;align-items:center}
.captain-attribute-group dt{color:#a4bec8;flex:1}
.captain-attribute-group dd{color:#e4ce96;font-weight:600;margin:0;text-align:right;max-width:48%;overflow-wrap:anywhere}
.captain-transform{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;padding-top:14px;border-top:1px solid #3a5664}
.captain-transform>span{min-width:0}
.captain-transform small{display:block;color:#93adb7;font-size:8px;letter-spacing:.8px}
.captain-transform b{display:block;font-size:11px;color:#c7d2c7;margin-top:5px;overflow-wrap:anywhere}
/* Bag filters and individual item cards. */
#panel-backpack .window-body{padding:14px!important}
.bag-dashboard{font:12px/1.5 'DM Sans',sans-serif;color:#e1dfcc}
.bag-dashboard *{box-sizing:border-box}
.bag-dashboard [hidden]{display:none!important}
.bag-banner{display:flex;align-items:center;gap:13px;padding:15px;border:1px solid #747b53;background:linear-gradient(130deg,#2c4236,#142d3b);border-radius:10px}
.bag-banner>.pirate-icon{width:55px;height:55px;flex:none;object-fit:contain}
.bag-banner>div{flex:1;min-width:0}
.bag-banner small{font-size:8px;color:#debd76;letter-spacing:1.2px;display:block}
.bag-banner h3{font:700 25px/1.15 'Barlow Condensed',sans-serif;color:#f1dfb3;margin:5px 0 9px}
.bag-banner strong{font-size:10px;color:#acc8c9;display:block;margin-bottom:7px}
.bag-banner progress{appearance:none;width:100%;height:5px;border:0;border-radius:3px;background:#0a1d25;display:block;overflow:hidden}
.bag-banner progress::-webkit-progress-bar{background:#0a1d25}
.bag-banner progress::-webkit-progress-value{background:linear-gradient(90deg,#7aa894,#dbb361)}
.bag-tools{display:flex;gap:8px;margin:10px 0 13px}
.bag-tools .personal-button{flex:1}
.bag-categories{display:flex;gap:5px;flex-wrap:wrap;margin:12px 0}
.bag-categories button{display:flex;align-items:center;gap:5px;flex:1;justify-content:center;padding:8px 7px;border:1px solid #405e6d;border-radius:6px;background:#16303b;color:#a7bfc9;font:10px 'DM Sans',sans-serif;cursor:pointer;min-height:36px}
.bag-categories button[aria-pressed=true]{background:#374b38;color:#f1d795;border-color:#b09a5b}
.bag-categories b{font-size:8px;min-width:18px;background:#0b1f2677;border-radius:4px;padding:3px}
.bag-search-sort{display:grid;grid-template-columns:minmax(0,1fr) 148px;gap:10px}
.bag-search-sort label,.bag-filters label{min-width:0}
.bag-search-sort label>span,.bag-filters label>span{display:block;font-size:9px;color:#adc6cc;margin-bottom:6px}
.bag-dashboard .menu-search{height:40px;min-height:40px;padding:9px 10px;margin:0;background:#081d27;border:1px solid #435f70;color:#e4e8d8;border-radius:6px;min-width:0;font:11px 'DM Sans',sans-serif}
.bag-search-field{position:relative}
.bag-search-field>.pirate-icon{position:absolute;left:9px;top:7px;width:26px;height:26px;pointer-events:none}
.bag-search-field input.menu-search{padding-left:40px;width:100%}
.bag-advanced{margin:12px 0;border:1px solid #405e69;border-radius:7px;background:#132b34;padding:10px}
.bag-advanced summary{display:flex;gap:10px;align-items:center;color:#d1c29c;font-size:10px;cursor:pointer;list-style:none;min-height:20px}
.bag-advanced summary::before{content:'›';font-size:17px;color:#d7b86c}
.bag-advanced[open] summary::before{transform:rotate(90deg)}
.bag-advanced summary>span{margin-left:auto;color:#f0c879}
.bag-dashboard .bag-filters{grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0 0;gap:9px}
.bag-view-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0}
.bag-view-row>span{font-size:9px;color:#abc2ca}
.bag-view-row>div{display:flex;gap:4px;flex:none}
.bag-view-row button{padding:6px 8px;background:#142d3a;border:1px solid #405c6b;border-radius:5px;color:#a9bfca;font:9px 'DM Sans',sans-serif;cursor:pointer;min-height:30px}
.bag-view-row button[aria-pressed=true]{border-color:#b49a5f;color:#eace91;background:#37463c}
.bag-dashboard .bag-move-help{font-size:9px;line-height:1.5;color:#96b0bd;margin:8px 0 12px}
.bag-dashboard #inventory-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;margin-top:12px}
.bag-dashboard .item-slot{width:100%;height:auto;aspect-ratio:auto;min-width:0;min-height:109px;position:relative;display:flex;align-items:center;flex-direction:column;justify-content:flex-start;padding:7px 4px 5px;border:1px solid color-mix(in srgb,var(--rarity,#3b5969) 48%,#223b48);border-radius:7px;background:linear-gradient(150deg,#213747,#0b202b);cursor:pointer;text-align:center;color:#e0d8b8}
.bag-dashboard .item-slot.has-item:hover{background:#294943;border-color:#d6b673;box-shadow:0 0 0 1px #d6b67344}
.bag-dashboard .item-slot.equipped{box-shadow:inset 0 0 0 1px #b7b766;border-color:#b7b766}
.bag-slot-art{width:100%;height:51px;display:grid;place-items:center}
.bag-slot-art>img{width:48px;height:48px;max-width:100%;max-height:48px;object-fit:contain;image-rendering:pixelated}
.bag-slot-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font:600 9px/1.35 'DM Sans',sans-serif;width:100%;min-height:25px;margin:3px 0;overflow-wrap:anywhere}
.bag-slot-rarity{font-size:7px;color:var(--rarity);line-height:1.4}
.bag-dashboard .item-slot>small{position:absolute;top:4px;right:4px;bottom:auto;font:700 8px 'DM Sans',sans-serif;background:#081c28cc;color:#e5d99d;border:1px solid #61777b55;border-radius:3px;padding:2px 3px}
.bag-dashboard .item-slot.empty-slot{border-style:dashed;background:#0d222b;opacity:.55;cursor:default;min-height:109px}
.bag-dashboard .equipped-mark{position:absolute;top:4px;left:4px;font:700 7px 'DM Sans',sans-serif;padding:2px 3px;background:#355d47;color:#e7e7aa;border-radius:3px}
.bag-dashboard .bag-lock{position:absolute;left:3px;bottom:3px}
.bag-dashboard .bag-lock>.pirate-icon{width:17px;height:17px;object-fit:contain}
.bag-dashboard #inventory-grid.bag-list-view{grid-template-columns:1fr}
.bag-dashboard .bag-list-view .item-slot{display:grid;grid-template-columns:52px minmax(0,1fr) 50px;grid-template-rows:auto auto;column-gap:10px;text-align:left;min-height:65px;padding:7px 11px}
.bag-list-view .bag-slot-art{width:52px;grid-column:1;grid-row:1/3;height:50px}
.bag-list-view .bag-slot-name{grid-column:2;grid-row:1;font-size:11px;min-height:0;margin:4px 0 2px}
.bag-list-view .bag-slot-rarity{grid-column:2;grid-row:2;font-size:9px}
.bag-dashboard .bag-list-view .item-slot>small{grid-column:3;grid-row:1/3;position:static;justify-self:end;font-size:10px;padding:4px 5px;align-self:center}
.bag-dashboard .bag-list-view .empty-slot{display:none}
.bag-dashboard .bag-empty{grid-column:1/-1;padding:23px 12px;border:1px dashed #4c6977;border-radius:8px;text-align:center;color:#a9c1c9;font-size:12px}
.bag-dashboard .inventory-footer{display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:15px;padding-top:12px;border-top:1px solid #3e5a66;background:none}
.bag-dashboard .inventory-footer>span{font-size:9px;color:#9ab5c3}
.bag-dashboard .inventory-footer button{font-size:10px;line-height:1.4;height:auto;color:#dfcc9e}
.bag-dashboard .bag-auto-sell{border-radius:8px;margin:12px 0;background:#1c343b;border-color:#60735e;padding:10px}
.bag-auto-sell-icon>.pirate-icon{width:35px;height:35px;object-fit:contain}
.auto-sell-emblem>.pirate-icon{width:65px;height:65px;object-fit:contain}
.auto-sell-rarities .pirate-icon,.auto-sell-protections>.pirate-icon{width:24px;height:24px;flex:none;object-fit:contain}
.bag-dashboard #bag-deliveries{border-color:#8a8656;border-radius:9px;background:#273b36;padding:12px}
.bag-dashboard #bag-deliveries>div{min-width:0}
.bag-dashboard #bag-deliveries span{overflow-wrap:anywhere;min-width:0}
/* Full item inspection and the two deliberate confirmation actions. */
#game-modal:is([data-menu-type="item-inspector"],[data-menu-type="preferences"],[data-menu-type="character-mastery"],[data-menu-type="character-training"],[data-menu-type="character-forms"],[data-menu-type="death-history"],[data-menu-type="vault"]){width:min(1050px,calc(100vw - 28px));max-width:1050px;border-color:#5a746e;background:#0c202b;border-radius:13px}
#game-modal[data-menu-type="item-review"]{width:min(600px,calc(100vw - 28px));border-color:#697158;background:#0c202b;border-radius:12px}
#game-modal:is([data-menu-type="item-inspector"],[data-menu-type="preferences"],[data-menu-type="character-mastery"],[data-menu-type="character-training"],[data-menu-type="character-forms"],[data-menu-type="death-history"],[data-menu-type="vault"],[data-menu-type="item-review"])>header{background:#19313b;border-bottom:1px solid #43616b;padding:16px 21px}
.item-inspector,.adventure-preferences,.mastery-dashboard,.personal-review{font-family:'DM Sans',sans-serif;color:#e3dfcc;min-width:0}
.item-inspector *,.adventure-preferences *,.mastery-dashboard *{box-sizing:border-box}
.item-inspector [hidden],.adventure-preferences [hidden]{display:none!important}
.inspector-layout{display:grid;grid-template-columns:185px minmax(0,1fr);gap:23px}
.inspector-art{display:flex;flex-direction:column;align-items:center;gap:13px;padding:22px 13px;border:1px solid color-mix(in srgb,var(--rarity) 60%,#234353);border-radius:11px;background:radial-gradient(ellipse at top,#46636a44,transparent 60%),#132a36;align-self:start;text-align:center}
.inspector-art>img{width:140px;height:140px;object-fit:contain;image-rendering:pixelated;filter:drop-shadow(0 4px 5px #0005)}
.inspector-art>span{font-size:12px}
.inspector-art>b{color:#eed294;font:700 24px 'Barlow Condensed',sans-serif}
.inspector-tags{display:flex;flex-wrap:wrap;justify-content:center;gap:6px}
.inspector-tags>span{display:flex;align-items:center;gap:3px;border:1px solid #70857366;background:#223b38;color:#b8d5c4;border-radius:5px;padding:4px 6px;font-size:9px}
.inspector-tags .pirate-icon{width:19px;height:19px}
.inspector-main{min-width:0}
.item-inspector h3{font:700 24px 'Barlow Condensed',sans-serif;color:#edd3a4;margin:0 0 9px}
.inspector-description{padding:16px;border:1px solid #3e5e6d;border-radius:9px;background:#142c38;margin-bottom:15px}
.inspector-description p{font-size:12px;line-height:1.7;color:#aac3cd;margin:0 0 10px;overflow-wrap:anywhere}
.inspector-description small{font-size:10px;color:#d1ba80}
.inspector-requirement{padding:12px;border:1px solid #9c8353;border-radius:7px;background:#59472933;font-size:11px;line-height:1.5;color:#eacb87}
.item-inspector .item-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 0 17px;gap:7px}
.item-inspector .item-stat-grid>div{background:#18323d;border:1px solid #3e5a64;border-radius:7px;padding:10px 12px;align-items:center;min-width:0;gap:8px}
.item-inspector .item-stat-grid small{font-size:10px;line-height:1.4;color:#abc2ca}
.item-inspector .item-stat-grid strong{font-size:12px;color:#b2dfba;overflow-wrap:anywhere}
.inspector-actions{border-top:1px solid #3c5966;padding-top:14px}
.inspector-actions .dialog-actions{gap:7px;display:flex;flex-wrap:wrap}
.inspector-actions .menu-button{display:flex;align-items:center;justify-content:center;gap:5px;border-radius:6px;font:600 11px 'DM Sans',sans-serif;min-height:40px;padding:9px 11px;background:#17303c;white-space:normal}
.inspector-actions .menu-button.primary{background:linear-gradient(115deg,#f2cf84,#e5b65f)}
.inspector-actions .pirate-icon{width:24px;height:24px;flex:none;object-fit:contain}
.inspector-actions .menu-button.danger{border-color:#a76659;color:#e8b4a3;background:#452c3033}
.inspector-note{font-size:10px;line-height:1.6;color:#a1bdc8;border-left:2px solid #ae9860;padding-left:12px;margin:20px 0 0}
.item-inspector .equipment-comparison{margin-top:22px;padding:18px;border:1px solid #536e62;border-radius:10px;background:#19383255}
.item-inspector .equipment-comparison h3{font-size:23px}
.item-inspector .equipment-comparison p{font-size:11px;line-height:1.6;color:#adc7ca}
.item-inspector .equipment-comparison dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.item-inspector .equipment-comparison dl>div{min-width:0;border:1px solid #3f5c63;border-radius:6px;padding:11px;background:#102934}
.personal-review p{font-size:13px;line-height:1.7;color:#b5cbd2}
.personal-review p strong{color:#efdaa7}
.personal-review .dialog-actions{margin-top:23px;padding-top:17px;border-top:1px solid #3a5868;justify-content:flex-end;gap:9px}
.personal-review .menu-button{min-height:42px;font-size:15px;border-radius:7px}
.personal-review.discard .menu-button.primary.danger{background:#803e39;border-color:#b27465;color:#f1d8bd}
/* Preferences separate display, sound, shortcuts and account. */
.preferences-layout{display:grid;grid-template-columns:210px minmax(0,1fr);gap:19px;align-items:start}
.preferences-nav{display:grid;gap:8px;position:sticky;top:0}
.preferences-nav>button{display:flex;align-items:center;gap:9px;background:#152e3a;border:1px solid #3e5b69;border-radius:8px;padding:12px;text-align:left;color:#c7d8d6;cursor:pointer;min-width:0}
.preferences-nav>button.active{border-color:#b99a5b;background:#344739;color:#f3d894}
.preferences-nav .pirate-icon{width:35px;height:35px;flex:none;object-fit:contain}
.preferences-nav span{min-width:0}
.preferences-nav b{font:700 20px 'Barlow Condensed',sans-serif;display:block;line-height:1.2;overflow-wrap:anywhere}
.preferences-nav small{display:block;font:9px/1.6 'DM Sans',sans-serif;color:#91b2be;margin-top:4px}
.preferences-nav .active small{color:#c2c7a8}
.preferences-content{min-width:0}
.adventure-preferences .settings-section{border:1px solid #3e5d69;border-radius:10px;padding:20px;background:#122b35;margin:0 0 16px}
.adventure-preferences .settings-section h3{color:#f0dcae;font:700 25px/1.15 'Barlow Condensed',sans-serif;margin:0 0 10px}
.adventure-preferences .settings-section p{color:#a7c1cc;font:12px/1.65 'DM Sans',sans-serif;margin:8px 0 15px}
.adventure-preferences .device-settings>label{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 0;border-top:1px solid #345563;min-width:0;color:#d9dcc7;font-size:13px}
.adventure-preferences .device-settings label>span{min-width:0;flex:1}
.adventure-preferences .device-settings label small{display:block;font-size:10px;line-height:1.6;color:#9ebbc8;margin-top:5px}
.adventure-preferences input[type=checkbox]{width:18px;height:18px;flex:none;accent-color:#e0b369}
.adventure-preferences input[type=range]{accent-color:#d6b475;max-width:100%;min-width:0}
.adventure-preferences .device-zoom{flex-wrap:wrap}
.adventure-preferences .device-zoom input{width:100%;flex:none}
.adventure-preferences .device-zoom output{float:right;color:#ebc67c;font-size:12px}
.preferences-panel-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.preferences-panel-shortcuts .personal-button{justify-content:flex-start}
.preferences-account-actions{display:flex;flex-wrap:wrap;gap:9px}
.preferences-account-actions .personal-button{max-width:100%;overflow-wrap:anywhere}
.adventure-preferences .preferences-note{font-size:10px;margin:15px 0 0}
.preferences-danger{border-color:#865549!important}
.preferences-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;padding-top:16px;border-top:1px solid #3b5966}
.preferences-footer>span{font-size:10px;color:#b1c7c5}
.preferences-nav button:focus-visible,.adventure-preferences input:focus-visible,.adventure-preferences button:focus-visible{outline:2px solid #e9c77d;outline-offset:3px}
.adventure-preferences .audio-heading{display:flex;align-items:center;gap:13px}
.adventure-preferences .audio-heading .pirate-icon{width:55px;height:55px;object-fit:contain}
.adventure-preferences .audio-emblem{width:60px;height:60px;background:#1c3c4355;border-color:#5d7b74}
.adventure-preferences .audio-heading small{font-size:8px;color:#ddbb70}
.adventure-preferences .audio-switch,.adventure-preferences .audio-slider{background:#112b35;border-color:#395966;border-radius:7px}
.adventure-preferences .audio-slider span{min-width:0}
.adventure-preferences .audio-presets{flex-wrap:wrap;gap:7px}
.adventure-preferences .audio-presets button{font-size:12px;min-height:37px;padding:8px 11px;border-radius:6px;background:#1a3540}
.adventure-preferences .audio-preview{border:1px solid #405d64;border-radius:8px;background:#19353b}
.adventure-preferences .audio-preview>div{flex-wrap:wrap}
.adventure-preferences .audio-preview .menu-button{border-radius:6px;font-size:12px;min-height:38px}
.adventure-preferences .hotkey-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.adventure-preferences .hotkey-grid>div{grid-template-columns:minmax(0,1fr) 44px 27px;gap:5px;min-width:0;padding:10px;background:#162f3a;border-color:#3d5d6b}
.adventure-preferences .hotkey-grid span{font-size:11px;line-height:1.5;overflow-wrap:anywhere}
.adventure-preferences .hotkey-grid .menu-button{padding:7px 3px;min-height:36px;font-size:12px;min-width:0;border-radius:6px}
.adventure-preferences #hotkey-feedback{font-size:10px;line-height:1.6;border-top:1px solid #3d5966;padding-top:13px;color:#bdc9b2}
/* Associated character and inventory pages. */
.mastery-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin:0 0 17px}
.mastery-toolbar nav{display:flex;gap:6px;flex-wrap:wrap}
.mastery-toolbar .menu-button{font-size:13px;min-height:38px;border-radius:6px;background:#152f3b}
.mastery-toolbar input{flex:1;min-width:170px;max-width:360px;height:40px;margin:0;background:#0a1e2b;border-color:#456978;border-radius:7px}
.mastery-guide{border:1px solid #3a5a69;border-radius:8px;padding:13px;background:#152d39;margin-bottom:15px}
.mastery-guide summary{color:#dec287;font-size:12px;cursor:pointer}
.mastery-guide .mastery-explanation{font-size:11px;line-height:1.7;color:#acc5ce}
.mastery-result-count{font-size:10px;color:#9fbbc6;margin:12px 0}
.mastery-dashboard .mastery-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.mastery-dashboard .mastery-card{border:1px solid #466575;border-radius:10px;background:linear-gradient(125deg,#1e3841,#102936);padding:15px;min-width:0}
.mastery-dashboard .mastery-card.current{border-color:#cbaa62;background:linear-gradient(125deg,#314637,#15313a)}
.mastery-dashboard .mastery-card header{display:flex;align-items:center;gap:9px;min-width:0;margin:0 0 15px}
.mastery-dashboard .mastery-portrait{width:52px;height:62px;object-fit:contain;image-rendering:pixelated;flex:none}
.mastery-dashboard .mastery-card header>div{flex:1;min-width:0}
.mastery-dashboard .mastery-card h3{color:#eed8aa;font:700 24px/1.1 'Barlow Condensed',sans-serif;margin:0 0 5px;overflow-wrap:anywhere}
.mastery-dashboard .mastery-card header small{font-size:7px;line-height:1.5;color:#b9cbaa}
.mastery-dashboard .mastery-card header>b{color:#edc37e;font:700 24px 'Barlow Condensed',sans-serif;flex:none}
.mastery-dashboard .mastery-card h4{font-size:13px;line-height:1.5;color:#e1d3a9;margin:8px 0}
.mastery-dashboard .mastery-card p{font-size:11px;line-height:1.7;color:#a7c2cd}
.mastery-dashboard .mastery-current{border:1px solid #4f6b60;border-radius:7px;padding:11px;background:#1c393588}
.mastery-dashboard .mastery-current small{font-size:8px;color:#d4ba7e}
.mastery-dashboard .mastery-current strong{font-size:11px;line-height:1.6;color:#b8d8bb;margin:6px 0}
.mastery-dashboard .mastery-current span{font-size:9px;line-height:1.6;color:#aac3ca}
.mastery-dashboard progress{width:100%;height:5px;accent-color:#c8ad65;margin:15px 0 9px}
.mastery-dashboard .mastery-card>small{font-size:9px;color:#a8c3ca}
#game-modal[data-menu-type="character-forms"] .saga-lead{padding:20px;border:1px solid #70815a;border-radius:11px;background:linear-gradient(130deg,#28443a,#152e3b)}
#game-modal[data-menu-type="character-forms"] .saga-lead h3{font:700 30px 'Barlow Condensed',sans-serif;color:#efd6a8}
#game-modal[data-menu-type="character-forms"] .form-character-picker{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:7px;padding:8px 0 14px;scrollbar-width:thin}
#game-modal[data-menu-type="character-forms"] .form-character-picker button{display:flex;align-items:center;gap:7px;flex:none;border-radius:7px;background:#17313c;font-size:14px;padding:7px 11px;min-height:46px}
#game-modal[data-menu-type="character-forms"] .form-character-picker button.primary{background:#354b38;border-color:#c7a467;color:#f2d89b}
#game-modal[data-menu-type="character-forms"] .form-character-picker img{width:32px;height:35px;object-fit:contain;image-rendering:pixelated}
#game-modal[data-menu-type="character-forms"] .saga-forms{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:12px 0 20px}
#game-modal[data-menu-type="character-forms"] .saga-forms>div{border:1px solid #5c7568;border-radius:10px;padding:15px;background:radial-gradient(ellipse,#98894f22,transparent 70%),#17323d;text-align:center;min-width:0}
#game-modal[data-menu-type="character-forms"] .saga-forms img{width:145px;height:145px;max-width:100%;object-fit:contain;image-rendering:pixelated}
#game-modal[data-menu-type="character-forms"] .saga-forms span{font-size:17px;color:#e6d09c;overflow-wrap:anywhere}
#game-modal[data-menu-type="character-forms"] .awakening-panel{padding:21px;border:1px solid #4d695d;border-radius:10px;background:#1b3536}
#game-modal[data-menu-type="character-forms"] .awakening-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;list-style:none;padding:0;margin:17px 0}
#game-modal[data-menu-type="character-forms"] .awakening-checklist li{padding:11px;border:1px solid #435b66;border-radius:7px;background:#122d38;font-size:11px;line-height:1.6;overflow-wrap:anywhere}
#game-modal[data-menu-type="character-forms"] .awakening-checklist li.done{border-color:#66876a;color:#aed9b5}
#game-modal[data-menu-type="character-training"] .training-hero{padding:24px;border:1px solid #71805b;border-radius:11px;background:linear-gradient(120deg,#2b4237,#142e3b);margin-bottom:19px}
#game-modal[data-menu-type="character-training"] .training-hero h3{font:700 32px/1.1 'Barlow Condensed',sans-serif;color:#f0d8a7}
#game-modal[data-menu-type="character-training"] :is(.bless-card,.offline-training-card,.discipline-card,.training-supplies,.training-legacy){border-radius:10px;background:#15303b;border-color:#496575}
#game-modal[data-menu-type="character-training"] :is(.bless-card,.offline-training-card) p{font-size:11px;line-height:1.7;color:#a9c1cd}
#game-modal[data-menu-type="character-training"] .offline-training-card{border-color:#758252;background:linear-gradient(115deg,#2b4136,#17323d)}
#game-modal[data-menu-type="character-training"] .discipline-card.selected{border-color:#c8a864;background:#314537}
#game-modal[data-menu-type="character-training"] .menu-button{border-radius:6px;min-height:40px}
#game-modal[data-menu-type="death-history"] .death-history-intro{display:flex;gap:18px;align-items:center;border:1px solid #73795d;border-radius:11px;background:linear-gradient(115deg,#2d423a,#15303d);padding:23px}
#game-modal[data-menu-type="death-history"] .death-history-intro>.pirate-icon{width:60px;height:60px;flex:none}
#game-modal[data-menu-type="death-history"] .death-history-intro>div{min-width:0}
#game-modal[data-menu-type="death-history"] .death-history-intro h3{font-size:31px;line-height:1.15;color:#efdab1}
#game-modal[data-menu-type="death-history"] .death-summary>div{border-color:#466372;background:#1b3540;border-radius:8px}
#game-modal[data-menu-type="death-history"] .death-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
#game-modal[data-menu-type="death-history"] .death-entry{background:#15313b;border:1px solid #486571;border-radius:10px;min-width:0;margin:0}
#game-modal[data-menu-type="death-history"] .death-empty{grid-column:1/-1;border:1px dashed #516f79;border-radius:10px;padding:25px;background:#122a36}
#game-modal[data-menu-type="vault"] .vault-intro{display:flex;align-items:center;gap:18px;padding:22px;border:1px solid #718058;border-radius:11px;background:linear-gradient(115deg,#2c4237,#15313e);margin-bottom:18px}
#game-modal[data-menu-type="vault"] .vault-intro>.pirate-icon{width:64px;height:64px;flex:none;object-fit:contain}
#game-modal[data-menu-type="vault"] .vault-intro>div{flex:1;min-width:0}
#game-modal[data-menu-type="vault"] .vault-intro h2{font:700 31px/1.1 'Barlow Condensed',sans-serif;color:#f0dcae}
#game-modal[data-menu-type="vault"] .vault-intro>strong{color:#e6c275;font-size:12px;flex:none}
#game-modal[data-menu-type="vault"] .vault-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#game-modal[data-menu-type="vault"] .vault-tabs button{border-radius:8px;min-width:0;background:#18333f;font-size:16px;padding:12px}
#game-modal[data-menu-type="vault"] .vault-tabs .selected{border-color:#c1a56a;background:#354b38}
#game-modal[data-menu-type="vault"] .vault-columns{gap:17px}
#game-modal[data-menu-type="vault"] .vault-columns>section{padding:15px;border:1px solid #4a6874;border-radius:10px;background:#132d39;min-width:0}
#game-modal[data-menu-type="vault"] .vault-item{border-color:#405c68;background:#19333e;border-radius:8px;padding:10px}
#game-modal[data-menu-type="vault"] .vault-item-title{min-width:0}
#game-modal[data-menu-type="vault"] .vault-item-title span{min-width:0;overflow-wrap:anywhere}
@media(max-width:760px){
 .preferences-layout{grid-template-columns:1fr;gap:15px}
 .preferences-nav{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}
 .preferences-nav>button{padding:10px;gap:7px}
 .preferences-nav b{font-size:20px}
 .preferences-nav small{font-size:8px}
 .mastery-dashboard .mastery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:600px){
 :is(#panel-character,#panel-backpack)>.window-header{padding:9px 11px;min-height:46px}
 #panel-character .captain-dashboard{padding:11px}
 #panel-backpack .window-body{padding:11px!important}
 .captain-identity{gap:9px;padding:11px 8px;grid-template-columns:60px minmax(0,1fr) 35px}
 .captain-identity h3{font-size:25px}
 .captain-identity small{font-size:7px}
 .captain-outfit{height:78px}
 .captain-outfit img{width:78px;height:78px}
 .captain-level strong{font-size:25px}
 .captain-stat b{font-size:21px}
 .captain-stat small{font-size:7px}
 .captain-shortcut{gap:6px;padding:10px 7px}
 .captain-shortcut .pirate-icon{width:25px;height:25px}
 .captain-shortcut b{font-size:17px}
 .captain-shortcut small{font-size:8px}
 .captain-shortcut i{display:none}
 .captain-attribute-group dl>div{font-size:10px}
 .bag-banner{padding:12px;gap:10px}
 .bag-banner>.pirate-icon{width:43px;height:43px}
 .bag-banner h3{font-size:23px}
 .bag-banner small{font-size:7px;letter-spacing:.7px}
 .bag-tools .personal-button{font-size:10px;padding:8px 5px}
 .bag-tools .pirate-icon{width:22px;height:22px}
 .bag-categories{gap:5px}
 .bag-categories button{font-size:9px;padding:7px 5px;min-height:36px}
 .bag-categories b{font-size:7px;min-width:15px}
 .bag-search-sort{grid-template-columns:minmax(0,1fr) 118px;gap:7px}
 .bag-dashboard .menu-search{font-size:10px;padding:8px 7px;height:40px}
 .bag-search-field input.menu-search{padding-left:33px}
 .bag-search-field>.pirate-icon{width:21px;height:21px;left:7px;top:9px}
 .bag-view-row>span{font-size:8px}
 .bag-view-row button{font-size:8px;padding:6px;min-height:33px}
 .bag-dashboard #inventory-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .bag-dashboard .item-slot{min-height:108px}
 .bag-slot-name{font-size:8px;min-height:25px}
 .bag-dashboard .item-slot.empty-slot{min-height:108px}
 .bag-dashboard .bag-list-view .item-slot{grid-template-columns:43px minmax(0,1fr) 36px;column-gap:8px;padding:8px}
 .bag-list-view .bag-slot-art{width:43px;height:46px}
 .bag-list-view .bag-slot-name{font-size:10px}
 .bag-list-view .bag-slot-rarity{font-size:8px}
 .bag-dashboard .inventory-footer>span{max-width:130px;font-size:8px}
 #game-modal:is([data-menu-type="item-inspector"],[data-menu-type="preferences"],[data-menu-type="character-mastery"],[data-menu-type="character-training"],[data-menu-type="character-forms"],[data-menu-type="death-history"],[data-menu-type="vault"],[data-menu-type="item-review"]){width:calc(100vw - 14px);max-width:none;border-radius:10px}
 #game-modal:is([data-menu-type="item-inspector"],[data-menu-type="preferences"],[data-menu-type="character-mastery"],[data-menu-type="character-training"],[data-menu-type="character-forms"],[data-menu-type="death-history"],[data-menu-type="vault"],[data-menu-type="item-review"])>header{padding:12px 13px}
 #game-modal:is([data-menu-type="item-inspector"],[data-menu-type="preferences"],[data-menu-type="character-mastery"],[data-menu-type="character-training"],[data-menu-type="character-forms"],[data-menu-type="death-history"],[data-menu-type="vault"],[data-menu-type="item-review"]) #modal-body{padding:12px}
 .personal-banner{gap:12px;padding:15px;margin-bottom:15px}
 .personal-banner>.pirate-icon{width:43px;height:43px}
 .personal-banner h2{font-size:26px}
 .personal-banner small{font-size:7px;letter-spacing:.8px;line-height:1.5}
 .personal-banner p{font-size:10px}
 .personal-button{font-size:10px;padding:8px 10px}
 .personal-section-heading{gap:10px}
 .personal-section-heading>.pirate-icon{width:35px;height:35px}
 .personal-section-heading h3{font-size:23px}
 .personal-section-heading p{font-size:10px}
 .inspector-layout{grid-template-columns:1fr;gap:15px}
 .inspector-art{display:grid;grid-template-columns:90px minmax(0,1fr);grid-template-rows:auto auto auto;gap:8px 12px;padding:13px;text-align:left}
 .inspector-art>img{width:90px;height:90px;grid-column:1;grid-row:1/4}
 .inspector-art>span,.inspector-art>b,.inspector-tags{grid-column:2}
 .inspector-art>span{font-size:11px}
 .inspector-art>b{font-size:23px}
 .inspector-tags{justify-content:flex-start;gap:5px}
 .inspector-tags>span{font-size:8px}
 .item-inspector h3{font-size:24px}
 .inspector-description{padding:13px}
 .inspector-description p{font-size:11px}
 .item-inspector .item-stat-grid>div{display:block;padding:10px;min-width:0}
 .item-inspector .item-stat-grid strong{display:block;margin-top:6px}
 .inspector-actions .dialog-actions .menu-button{flex:1 1 42%;font-size:10px;padding:9px 7px}
 .inspector-actions .pirate-icon{width:21px;height:21px}
 .item-inspector .equipment-comparison{padding:13px}
 .item-inspector .equipment-comparison dl{grid-template-columns:1fr}
 .preferences-nav b{font-size:18px}
 .preferences-nav small{display:none}
 .preferences-nav .pirate-icon{width:28px;height:28px}
 .adventure-preferences .settings-section{padding:14px}
 .adventure-preferences .settings-section h3{font-size:24px}
 .adventure-preferences .settings-section p{font-size:11px}
 .adventure-preferences .device-settings>label{font-size:12px;padding:14px 0;gap:10px}
 .adventure-preferences .device-settings label small{font-size:9px}
 .preferences-panel-shortcuts{gap:7px}
 .preferences-panel-shortcuts .personal-button{font-size:9px;padding:9px 6px}
 .preferences-panel-shortcuts .pirate-icon{width:22px;height:22px}
 .preferences-account-actions .personal-button{width:100%}
 .preferences-footer{flex-wrap:wrap;gap:11px}
 .preferences-footer .personal-button{margin-left:auto}
 .preferences-footer>span{font-size:9px}
 .adventure-preferences .audio-heading .pirate-icon{width:42px;height:42px}
 .adventure-preferences .audio-emblem{width:45px;height:45px;flex:none}
 .adventure-preferences .audio-heading{gap:10px}
 .adventure-preferences .audio-slider{grid-template-columns:minmax(0,1fr) 40px;gap:8px}
 .adventure-preferences .audio-slider input{grid-column:1/-1;width:100%}
 .adventure-preferences .hotkey-grid{grid-template-columns:1fr}
 .adventure-preferences .hotkey-grid span{font-size:12px}
 .mastery-toolbar{gap:9px}
 .mastery-toolbar input{min-width:0;max-width:none;width:100%;flex-basis:100%}
 .mastery-toolbar .menu-button{font-size:11px;padding:8px 10px}
 .mastery-dashboard .mastery-grid{grid-template-columns:1fr;gap:11px}
 #game-modal[data-menu-type="character-forms"] .saga-lead{padding:15px}
 #game-modal[data-menu-type="character-forms"] .saga-lead h3{font-size:26px}
 #game-modal[data-menu-type="character-forms"] .saga-forms{gap:7px}
 #game-modal[data-menu-type="character-forms"] .saga-forms>div{padding:10px 6px}
 #game-modal[data-menu-type="character-forms"] .saga-forms img{width:80px;height:85px}
 #game-modal[data-menu-type="character-forms"] .saga-forms small{font-size:8px}
 #game-modal[data-menu-type="character-forms"] .saga-forms span{font-size:12px;line-height:1.5}
 #game-modal[data-menu-type="character-forms"] .awakening-panel{padding:14px}
 #game-modal[data-menu-type="character-forms"] .awakening-checklist{gap:7px}
 #game-modal[data-menu-type="character-forms"] .awakening-checklist li{font-size:10px;padding:9px}
 #game-modal[data-menu-type="character-training"] .training-hero{padding:16px}
 #game-modal[data-menu-type="character-training"] .training-hero h3{font-size:28px}
 #game-modal[data-menu-type="death-history"] .death-history-intro{padding:16px;gap:11px}
 #game-modal[data-menu-type="death-history"] .death-history-intro>.pirate-icon{width:43px;height:43px}
 #game-modal[data-menu-type="death-history"] .death-history-intro h3{font-size:27px}
 #game-modal[data-menu-type="death-history"] .death-list{grid-template-columns:1fr}
 #game-modal[data-menu-type="vault"] .vault-intro{flex-wrap:wrap;padding:15px;gap:12px}
 #game-modal[data-menu-type="vault"] .vault-intro>.pirate-icon{width:42px;height:42px}
 #game-modal[data-menu-type="vault"] .vault-intro h2{font-size:27px}
 #game-modal[data-menu-type="vault"] .vault-intro>strong{width:100%;font-size:11px;padding-top:7px;border-top:1px solid #516b5a}
 #game-modal[data-menu-type="vault"] .vault-tabs{gap:6px}
 #game-modal[data-menu-type="vault"] .vault-tabs button{padding:8px 5px;font-size:14px}
 #game-modal[data-menu-type="vault"] .vault-tabs img{width:25px;height:25px}
 #game-modal[data-menu-type="vault"] .vault-tabs small{font-size:8px;line-height:1.5}
 #game-modal[data-menu-type="vault"] .vault-columns>section{padding:11px}
}
@media(max-width:350px){.bag-dashboard #inventory-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.captain-shortcuts{grid-template-columns:1fr}.captain-shortcut b{font-size:17px}.captain-identity h3{font-size:23px}.preferences-nav b{font-size:17px}}
@media(prefers-reduced-motion:reduce){.personal-button,.captain-shortcut,.bag-dashboard button{transition:none}}
#game-modal[data-menu-type="character-wardrobe"]{width:min(1050px,calc(100vw - 28px));max-width:1050px;border-color:#5a746e;background:#0c202b;border-radius:13px}
#game-modal[data-menu-type="character-wardrobe"]>header{background:#19313b;border-bottom:1px solid #43616b;padding:16px 21px}
#game-modal[data-menu-type="character-wardrobe"] .saga-lead{padding:21px;border:1px solid #697953;border-radius:11px;background:linear-gradient(120deg,#2b4236,#15313d)}
#game-modal[data-menu-type="character-wardrobe"] .saga-lead h3{font-size:31px;color:#efd9a9}
#game-modal[data-menu-type="character-wardrobe"] .saga-skin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
#game-modal[data-menu-type="character-wardrobe"] .saga-panel{background:linear-gradient(125deg,#233d43,#122b38);border:1px solid #4a6672;border-radius:10px;padding:15px;min-width:0}
#game-modal[data-menu-type="character-wardrobe"] .saga-skin-preview{display:flex;align-items:center;justify-content:center;gap:5px;border-bottom:1px solid #4a606b;padding:10px 0 15px;margin-bottom:13px;background:radial-gradient(ellipse,#ae985422,transparent 65%)}
#game-modal[data-menu-type="character-wardrobe"] .saga-skin-preview img{width:78px;height:93px;max-width:31%;object-fit:contain;image-rendering:pixelated}
#game-modal[data-menu-type="character-wardrobe"] .saga-panel h3{font-size:25px;color:#e9d6a5}
#game-modal[data-menu-type="character-wardrobe"] .saga-panel p{font-size:11px;line-height:1.6}
#game-modal[data-menu-type="character-wardrobe"] .menu-button{border-radius:7px;min-height:39px}
@media(max-width:760px){#game-modal[data-menu-type="character-wardrobe"] .saga-skin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#game-modal[data-menu-type="character-wardrobe"]{width:calc(100vw - 14px);max-width:none;border-radius:10px}#game-modal[data-menu-type="character-wardrobe"]>header{padding:12px 13px}#game-modal[data-menu-type="character-wardrobe"] #modal-body{padding:12px}#game-modal[data-menu-type="character-wardrobe"] .saga-lead{padding:15px}#game-modal[data-menu-type="character-wardrobe"] .saga-skin-grid{grid-template-columns:1fr}}

/* Session notices share the account palette and pirate icon catalog. */
.account-session-note{display:flex;align-items:flex-start;gap:18px;padding:18px;border:1px solid #49606c;border-radius:10px;background:#0d222c}.account-session-note p{margin:0 0 12px;line-height:1.65;overflow-wrap:anywhere}.account-session-note p:last-child{margin-bottom:0;color:#b6c9c9}.account-session-emblem{flex:0 0 52px;display:grid;place-items:center;padding:8px;background:#16323c;border:1px solid #9f8145;border-radius:9px}.account-session-emblem img{width:34px;height:34px;object-fit:contain}.account-session-actions{margin-top:20px;flex-wrap:wrap}.account-session-actions a{display:flex;align-items:center;justify-content:center;text-decoration:none}@media(max-width:500px){.account-session-note{padding:14px;gap:12px}.account-session-emblem{flex-basis:42px;padding:6px}.account-session-emblem img{width:28px;height:28px}.account-session-actions>*{min-height:44px;flex:1 1 100%;text-align:center}}

/* Wardrobe: the active appearance and a removal action stay with each skin. */
#game-modal[data-menu-type="character-wardrobe"] .saga-wardrobe-current{display:flex;align-items:center;gap:18px;margin:18px 0;padding:18px;background:#142f38;border:1px solid #637965;border-radius:11px;min-width:0}
.saga-wardrobe-avatar{display:grid;place-items:center;flex:0 0 78px;height:98px;background:radial-gradient(ellipse,#d6b87533,transparent 70%)}.saga-wardrobe-avatar img{width:78px;height:92px;object-fit:contain;image-rendering:pixelated}
.saga-wardrobe-current>div+div{flex:1;min-width:0}.saga-wardrobe-current small{color:#bcd3c1;font-size:9px;letter-spacing:1.4px}.saga-wardrobe-current h3{margin:5px 0;color:#f0dab0;font-size:24px}.saga-wardrobe-current p{margin:0 0 6px;font-size:12px;color:#d8e3dd}.saga-wardrobe-current span{font-size:10px;line-height:1.6;color:#a9bfc2}.saga-wardrobe-current .menu-button{flex:0 0 auto;border-color:#9c8060;color:#f4d1a1;white-space:normal}.saga-original-badge{flex:0 0 auto;max-width:140px;color:#bbd6c4;font-size:11px;line-height:1.5}
#game-modal[data-menu-type="character-wardrobe"] .saga-panel.is-equipped{position:relative;border-color:#c3aa6a;background:linear-gradient(125deg,#324a40,#122b38)}.saga-skin-equipped{position:absolute;top:12px;right:12px;padding:4px 8px;border:1px solid #ae985d;border-radius:5px;background:#213d34;color:#f5d895;font-size:10px}
@media(max-width:600px){#game-modal[data-menu-type="character-wardrobe"] .saga-wardrobe-current{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;padding:14px}.saga-wardrobe-avatar{width:64px;height:84px}.saga-wardrobe-avatar img{width:64px;height:84px}.saga-wardrobe-current h3{font-size:21px}.saga-wardrobe-current .menu-button,.saga-original-badge{grid-column:1/-1;max-width:none;justify-self:stretch}.saga-wardrobe-current .menu-button{min-height:44px}.saga-original-badge{text-align:center;padding:7px;border-top:1px solid #3d595f}}
.visual-preview-settings{margin-top:20px;padding:16px;background:#153a37;border:1px solid #87b29e66;border-radius:8px}
.visual-preview-settings header{display:flex;align-items:center;gap:12px}.visual-preview-settings header img{width:42px;height:42px}.visual-preview-settings header small{color:#e3bf71;font-size:9px;letter-spacing:1.2px}.visual-preview-settings h4{margin:3px 0 0;color:#f4e4b7;font-size:18px}
.visual-preview-settings label{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;font-size:12px}.visual-preview-settings input{width:20px;height:20px;flex:none;accent-color:#e4bd65}.visual-preview-settings .personal-button{margin-top:6px;min-height:44px}
.captain-combat-guide{margin:14px 0;padding:16px;border:1px solid #47626b;border-radius:12px;background:linear-gradient(135deg,#183d43,#142730);color:#d5e4e5}
.captain-combat-guide header{display:flex;align-items:center;gap:10px;color:#f1d18b}
.captain-combat-guide header img{width:36px;height:36px;object-fit:contain}
.captain-combat-guide dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.captain-combat-guide dl>div{min-width:0;padding:10px;border-radius:8px;background:#081b2566}
.captain-combat-guide dt{font-size:12px;color:#a9c5cb}.captain-combat-guide dd{margin:5px 0 0;font-weight:800;color:#fff0bd}
.captain-combat-guide p{font-size:12px;line-height:1.65;margin:10px 0 0}
@media(max-width:430px){.captain-combat-guide{padding:12px}.captain-combat-guide dl{grid-template-columns:1fr}}
.captain-level strong{white-space:nowrap;overflow-wrap:normal;font-variant-numeric:tabular-nums}
@media(max-width:700px){.captain-identity{grid-template-columns:60px minmax(0,1fr) 42px}}
