/* Screen composition matched to the approved board; all content remains live DOM. */
:root{--fidelity-rim:#c6a15b;--fidelity-black:#03080c}
#app{border-radius:14px 14px 0 0;box-shadow:inset 0 0 0 1px #e7c6763b,0 0 70px #000}#app>.header{min-height:calc(48px + env(safe-area-inset-top));padding-block:calc(5px + env(safe-area-inset-top)) 5px}#app>.header .logo{font-size:25px}
#app>.layout{gap:9px}#app .collection-heading h1{font-size:28px}#app .collection-heading .eyebrow{font-size:8px}#app>.nav button{min-height:52px;font-family:Carto Condensed,sans-serif;font-size:12px}.home-profile-emblem .icon{width:32px;height:38px;color:#f6d184}
#app>.home.layout{gap:7px}.home-air{min-height:400px;flex:1}.home-profile{padding:5px 7px;border-radius:6px;gap:5px;max-width:240px}.home-profile strong{font-size:13px}.home-profile small{font-size:10px}.home-air>.port-pirate{position:absolute;width:175px;height:235px;bottom:30px;left:calc(50% - 87.5px);pointer-events:none;background:none;border:0}.home-air>.port-pirate canvas{width:100%;height:100%}.port-caption{bottom:0;padding:7px;background:linear-gradient(90deg,transparent,#03101ad9,transparent)}.port-caption strong{font:600 22px Carto Condensed,sans-serif}.home-menu{grid-template-columns:1.15fr 1fr 1fr;padding:5px;gap:5px;border-radius:7px}.home-menu .home-cta.play{grid-column:auto;min-height:44px;font-size:15px}.home-menu .home-cta{font:600 13px Carto Condensed,sans-serif;min-height:44px;gap:4px}.home-menu .home-cta .icon{width:17px;height:17px}.shop-entry{min-height:26px}.home-caption{margin:0}
/* Adventure uses the same compact top bar and bottom navigation as the reference. */
dialog.voyage-dialog:not(.battle-dialog){overflow:hidden;display:flex;flex-direction:column}dialog.voyage-dialog:not([open]){display:none}dialog.voyage-dialog:not(.battle-dialog)>header{position:relative;flex-shrink:0;min-height:51px;padding:5px 10px}.voyage-dialog:not(.battle-dialog)>header h2{font-size:25px;margin:0}.voyage-dialog:not(.battle-dialog)>header small{font-size:8px}.voyage-dialog:not(.battle-dialog)>main{order:2;min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:9px}.voyage-dialog:not(.battle-dialog)>nav.voyage-actions{order:3;flex-shrink:0;display:flex;flex-wrap:nowrap;overflow-x:auto;padding:5px 5px max(5px,env(safe-area-inset-bottom));border-top:1px solid var(--fidelity-rim);scroll-snap-type:x proximity;scrollbar-width:thin}.voyage-dialog:not(.battle-dialog)>nav button{flex:0 0 67px;min-height:56px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font:600 12px Carto Condensed,sans-serif;scroll-snap-align:start}.voyage-actions .art-icon{width:25px;height:25px}.voyage-dialog>main:focus{outline:0}
.voyage-dialog[data-page=sea] main{padding:0}.voyage-dialog .sea-atlas{min-height:740px;height:900px;border:0;border-radius:0;background:url('/assets/fidelity-v2/world-voyage.png') center/100% 100% no-repeat}.sea-region{z-index:2;top:12px;left:13px}.sea-region h3{font-size:28px}.sea-atlas .sea-destinations{inset:0;display:block;max-height:none;overflow:visible;padding:0;pointer-events:none}.voyage-dialog .sea-destinations .world-stop{position:absolute;left:var(--stop-x);top:var(--stop-y);transform:translate(-50%,-50%);width:132px;max-width:43%;padding:5px 7px;min-height:44px;pointer-events:auto;background:linear-gradient(#ffefbe,#d5ae65);color:#2d230f;border:1px solid #ffe5a1;box-shadow:0 2px 0 #70502c,0 3px 8px #001b34a0;line-height:1.1}.world-stop strong{display:block;font:600 17px Carto Condensed,sans-serif}.world-stop small{font-size:9px}.voyage-dialog .sea-destinations .world-stop:disabled{opacity:.82;background:linear-gradient(#344a5a,#112b40);color:#d4dfe5;filter:none}.world-stop.current{outline:2px solid #70e6ff;outline-offset:3px}.voyage-dialog[data-page=sea] main>p{padding:10px}.voyage-dialog[data-page=sea] main>button{margin:0 10px 12px;width:calc(100% - 20px)}
/* Live meshes occupy the illustrated dressing alcove, not a pasted character. */
.voyage-dialog .wardrobe-stage .avatar-preview,.voyage-dialog[data-page=cosmetics] .avatar-preview,.voyage-dialog .crew-hero>.pirate-scene{background:url('/assets/fidelity-v2/wardrobe-cabin.png') center/100% 100% no-repeat;height:340px;min-height:260px;border-radius:7px}.voyage-dialog .wardrobe-stage{position:relative;top:auto;z-index:0}.crew-active-rail{left:6px;top:45px;bottom:30px}.crew-active-rail button{border-radius:6px}.voyage-dialog .cosmetics-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.voyage-dialog .cosmetic-token{padding:5px;background:linear-gradient(#102635,#030b12);border:1px solid #c8a258;border-radius:6px;min-width:0}.voyage-dialog .cosmetic-token .outfit-thumbnail{border:0;background:radial-gradient(ellipse at bottom,#76613e55,transparent 80%);width:100%;min-height:106px;padding:0;box-shadow:none}.cosmetic-token .outfit-thumbnail img{height:112px;width:100%;object-fit:contain;margin:0}.voyage-dialog .cosmetic-token h3{font:600 14px/1.1 Carto Condensed,sans-serif;min-height:31px;margin:3px 0}.cosmetic-token>small{font-size:8px;min-height:23px;display:block}.voyage-dialog .cosmetic-token>button:last-child{width:100%;min-height:44px;padding:5px;font-size:10px}.cosmetic-token.locked{border-color:#786342}.equipment-rail{top:46px;bottom:35px}.equipment-rail button{background:#071521e8;border-color:#e0bd75}.selected-equipment{margin-top:5px}.editor-tabs{margin:7px 0}.preview-commands{margin:5px 0}
/* Illustrated event; the real three-round cup and its actual reward stay unchanged. */
.voyage-dialog .event-banner{padding:0;overflow:hidden;background:#050b13;position:relative}.event-key-art{aspect-ratio:1.25;background:url('/assets/fidelity-v2/blackbeard-event.png') center/cover}.event-banner h3{position:relative;margin:-49px 8px 0;padding-top:8px;font-size:27px;color:#ffe275;text-shadow:0 2px #000,0 0 10px #000;background:linear-gradient(transparent,#020710)}.event-banner p{position:relative;margin:0;padding:6px 8px 12px;background:#020710;color:#d8cda9;font-size:10px}.voyage-dialog[data-page=events] main>h3{font-size:24px}.recruitment-reward{position:relative;isolation:isolate;background:radial-gradient(ellipse at 50% 22%,#9a671955,#050a0f 65%);overflow:hidden}.recruitment-reward::before{content:'';position:absolute;z-index:-1;inset:-100px;background:repeating-conic-gradient(from 10deg at 50% 25%,transparent 0deg 12deg,#ffc65818 13deg 17deg,transparent 18deg 28deg);animation:victory-rays 25s linear infinite;pointer-events:none}.recruitment-reward .pirate-scene{height:260px;background:none;border:0}.recruitment-reward>p{padding:12px;border:1px solid #8d713b;border-radius:7px;background:#07111ade;text-align:left}.recruitment-reward>button{display:block;width:100%;margin:8px 0}.conversation-scene{height:42dvh;min-height:290px}.voyage-conversation{border:0}.conversation-paper{margin:7px 0!important;border-radius:5px!important}.conversation-choices{padding:0;gap:6px}.conversation-choices button{padding:8px 12px;border-radius:5px;min-height:44px}.voyage-dialog[data-page=map] .stage-3d .voyage-map{height:57dvh;min-height:360px}.touch-helm{margin:7px 0;gap:35px}.voyage-thumbstick{width:76px;height:76px}.stick-knob{left:17px;top:17px}.map-toolbar{gap:5px}.map-toolbar h3{font-size:23px!important}.voyage-panel{border-radius:7px}.voyage-dialog .crew-heading h3{font-size:25px!important}
/* Actual cards remain the foreground assets throughout opening, results and TCG. */
#app .summary-highlights{grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:7px}.summary-highlights>.card-tile:first-child{grid-column:1/-1;width:65%;justify-self:center;position:relative;background:radial-gradient(ellipse,#27beff4d,transparent 70%);padding:7px}.summary-highlights>.card-tile:first-child .image-wrap{border:2px solid #edc36f;box-shadow:0 0 30px #18a7ff77,0 3px 15px #000b}.summary-highlights>.card-tile:first-child .card-label{font-size:15px!important}.summary-highlights>.card-tile:first-child .new-badge{font-size:15px;transform:rotate(-8deg)}.summary-highlights>.card-tile:first-child .card-meta{font-size:10px!important}.summary-highlights>.card-tile:first-child .card-price{font-size:14px!important}.open-stage{background:radial-gradient(ellipse at 50% 55%,#0c9dec88,transparent 68%)}.open-stage::before{content:'';position:absolute;inset:0;background:repeating-conic-gradient(from 18deg at 50% 55%,#78dcff00 0 14deg,#78dcff20 15deg 17deg,#78dcff00 18deg 35deg);pointer-events:none}.open-stage .pack{z-index:1}.layout.products .product-stage{background:radial-gradient(ellipse,#096ebc66,transparent 75%)}.layout.collection .catalog-grid{gap:6px}.layout.collection .card-label{line-height:1.05}.layout.boutique .shop-showcase{gap:6px}.layout.boutique .shop-product{border-radius:5px}.layout.boutique .shop-reference-links button{min-height:44px}.shop-cosmetics-link{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid #a98a4f;border-radius:8px;background:#0a1b29}.shop-cosmetics-link .art-icon{width:36px;height:36px}.shop-cosmetics-link span{flex:1;text-align:left}
.layout.quests .quest-card{position:relative;padding:11px 11px 11px 62px;border-radius:7px}.quest-card .quest-emblem{position:absolute;left:10px;top:17px}.quest-emblem .art-icon{width:39px;height:39px}.layout.quests .quest-card h2{font-size:18px}.layout.quests .quest-objective{padding:0;background:none;border:0;font-size:10px;margin:5px 0}.layout.quests .quest-card .row{gap:5px}.layout.quests .quest-card .btn{min-height:35px;font-size:10px}.layout.quests .quest-card .row>span{font-size:10px}.layout.quests .free-activity{padding:10px;border:1px solid #81693d;border-radius:7px}.layout.quests .free-activity h2{font-size:21px}.layout.quests .free-activity p{font-size:11px}.layout.settings .setting-row{border-radius:6px;padding:10px}.layout.settings button{min-height:44px}.portfolio-chart{border-radius:6px}.portfolio-total{padding:15px 10px;border-color:#8b703f}.portfolio-total strong{font-size:45px}
.layout.piano{background:linear-gradient(#031a35bb,#031a3544),url('/assets/fidelity-v2/piano-islands.png') center/cover}.piano-stage{background:transparent!important;border:1px solid #e6be68;box-shadow:0 0 18px #00c3ff55;min-height:380px}.piano-lane{background:#02102788!important;border-right:1px solid #6edaff55!important}.piano-tile{background:linear-gradient(#173553,#020815)!important;border:1px solid #53bbeb;box-shadow:0 0 12px #40beff99}.piano-tile.hit{background:#64d9ff!important}.piano-hud{background:#061e3de6;border:1px solid #d8b669;border-radius:8px;padding:10px;color:#ffe6a7}.piano-hud b{font-family:Carto Condensed,sans-serif;font-size:24px}.layout.piano .collection-heading{padding:5px;background:#041626b3;border-radius:7px}.piano-hint{background:#041626d9;border-radius:6px;padding:8px}.battle-dialog .battle-zone{border-radius:6px}.battle-dialog .battle-zone h3{padding:6px;background:#061523;border-bottom:1px solid #d2ad65;color:#ffe3a4}.battle-dialog .battle-field{min-height:132px}.battle-dialog .battle-hand{padding:8px 0;gap:4px}.battle-dialog .battle-card{border-radius:4px}.battle-dialog footer{border-top:1px solid #d1ad60}
@keyframes victory-rays{to{transform:rotate(360deg)}}
@media(max-height:740px){.home-air{min-height:310px}.home-air>.port-pirate{height:200px}.voyage-dialog .wardrobe-stage .avatar-preview,.voyage-dialog[data-page=cosmetics] .avatar-preview,.voyage-dialog .crew-hero>.pirate-scene{height:290px}.conversation-scene{min-height:245px}.voyage-dialog[data-page=map] .stage-3d .voyage-map{min-height:300px}}
@media(prefers-reduced-motion:reduce){.recruitment-reward::before{animation:none}}body.reduced .recruitment-reward::before{animation:none}
.battle-dialog .battle-leader-banner{position:relative;width:100%;height:170px;display:block;overflow:hidden;padding:0;border:1px solid #ddbb77;border-radius:7px;background:#083956;opacity:1}.battle-leader-banner>img{width:100%;height:100%;object-fit:cover;object-position:50% 29%;filter:saturate(1.12)}.battle-leader-banner>span{position:absolute;inset:0;padding:10px;background:linear-gradient(#00142620,transparent 30%,#001323f5);display:flex;flex-direction:column;justify-content:flex-end;text-align:left}.battle-leader-banner strong{font:600 25px Carto Condensed,sans-serif;color:#ffe7a5;text-shadow:0 2px #000}.battle-leader-banner b{position:absolute;right:10px;bottom:15px;color:#ffde84;font-size:14px}.battle-leader-banner small{color:#d4effa;font-size:11px}.battle-dialog .opponent-zone{padding-top:0}.battle-dialog .opponent-zone>h3{margin-top:6px}
.voyage-dialog:not(.battle-dialog)>header button{min-width:60px;width:auto;padding:5px 8px;white-space:nowrap}.voyage-dialog[data-page=cosmetics] .avatar-preview{position:relative;top:auto;margin:6px 0 0}.voyage-dialog[data-page=cosmetics] main>h3{margin-bottom:7px}.voyage-dialog[data-page=cosmetics] .cosmetics-grid{margin-top:7px}
.water7-map-layer{position:absolute;left:36%;top:14%;width:37%;height:11%;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 3px #003851aa)}

.crew-active-rail.crew-reserve-rail{left:auto;right:6px}.crew-reserve-rail img{height:45px}.crew-reserve-rail small{font-size:8px}
.cosmetic-categories{display:flex;gap:3px;padding:3px;margin-bottom:8px;border:1px solid #947444;border-radius:6px;background:#030a11}.cosmetic-categories button{flex:1;min-height:44px;font-size:12px}.cosmetic-categories [aria-current=page]{background:linear-gradient(#ffe7b0,#c99a4e);color:#291e0c}.voyage-dialog .event-prize{display:flex;align-items:center;gap:10px;text-align:left;width:100%;padding:6px;background:#07131f;border:1px solid #c29c55;margin:9px 0}.event-prize img{width:65px;height:82px;object-fit:contain}.event-prize strong{font:600 23px Carto Condensed,sans-serif;display:block;color:#ffe7a5}.event-prize small{display:block;font-size:10px;color:#cedce6}
/* Compact battle rows leave the real hand visible above persistent controls. */
dialog.voyage-dialog.battle-dialog[open]{display:flex;flex-direction:column;overflow:hidden}.battle-dialog>header{position:relative;flex-shrink:0}.battle-dialog>main{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.battle-dialog>footer{position:relative;flex-shrink:0;max-height:24dvh}.battle-dialog .battle-leader-banner{height:130px}.battle-dialog .battle-leader-banner:disabled{opacity:1;filter:none}.battle-dialog .battle-field{min-height:0;margin:0;padding:4px 0}.battle-dialog .battle-zone .battle-card img{height:76px}.battle-dialog .battle-zone .battle-card{min-width:63px;width:63px;max-width:63px}.battle-dialog .battle-zone h3{font-size:10px;padding:4px;margin-bottom:3px}.battle-dialog .battle-zone>p{font-size:9px;margin-bottom:1px}.battle-dialog .battle-hand .battle-card{min-width:68px;width:68px;max-width:68px}.battle-dialog .battle-hand .battle-card img{height:85px}.battle-dialog .battle-help{font-size:10px;line-height:1.4}.battle-dialog .battle-leader-banner>img{opacity:1}
.battle-dialog .battle-leader-banner{height:110px}.battle-dialog .battle-card{gap:1px;line-height:1.15}.battle-dialog .battle-zone .battle-card img{height:68px}.battle-dialog .battle-card b{font-size:7px;line-height:9px}.battle-dialog .battle-card span{font-size:6.8px;line-height:9px;white-space:nowrap}.battle-dialog .battle-card small{font-size:7px;line-height:9px}.battle-dialog .battle-hand .battle-card img{height:75px}.battle-dialog footer [data-battle=end]{background:linear-gradient(#258ed0,#064c8a);border-color:#b9e4ff;color:#fff3c9;box-shadow:0 0 9px #1fafff55}.battle-dialog footer [data-battle=concede]{background:#25171b;color:#dcbfc2;border-color:#795250;box-shadow:none}
dialog.voyage-dialog.battle-dialog .battle-zone{padding:5px}dialog.voyage-dialog.battle-dialog .battle-zone h3{padding:3px}.battle-dialog .battle-card span{max-width:100%;overflow:hidden;text-overflow:ellipsis}dialog.voyage-dialog.battle-dialog footer button[data-battle=concede]{background:#25171b;color:#dcbfc2;border-color:#795250;box-shadow:none}
/* Prevent Safari from zooming forms; preserve comfortable touch targets. */
dialog.voyage-dialog input,dialog.voyage-dialog select,#app input,#app select{font-size:16px}.voyage-dialog input[type=color]{min-height:44px}#app .tabs button{min-height:44px}#app>.header .icon-btn{min-width:44px;min-height:44px}.voyage-dialog:not(.battle-dialog)>nav.voyage-actions{touch-action:pan-x;-webkit-overflow-scrolling:touch}.layout.quests .quest-card .btn{min-height:44px}
.mission-mini-games{border:1px solid #967842;border-radius:7px;background:#07131d}.mission-mini-games summary{padding:13px;font-family:Carto Condensed,sans-serif;font-size:20px;color:#ffe3a5;cursor:pointer}.mission-mini-games>.free-activity{margin:6px}.layout.quests .quest-card h2{line-height:1.15}.layout.quests .quest-card>.row:first-of-type{align-items:center}.layout.quests .quest-card .row>strong{white-space:nowrap}
.layout.piano{background:linear-gradient(#031a3522,#031a3511),url('/assets/fidelity-v2/piano-islands.png') center/cover}.piano-lane{background:#02102755!important}
dialog.voyage-dialog select[data-avatar],dialog.voyage-dialog input,#app input,#app select{font-size:16px!important}
/* Illustrated location layers behind real animated figures. */
dialog.voyage-dialog .conversation-scene{background:#06131e;position:relative;isolation:isolate;height:46dvh;min-height:300px;border:1px solid #bca26a;border-radius:7px;overflow:hidden}dialog.voyage-dialog .conversation-scene::before{content:'';position:absolute;inset:0;z-index:0;background-image:var(--conversation-art);background-position:center;background-size:cover;pointer-events:none}.conversation-scene>.pirate-scene{position:relative;z-index:1}.conversation-scene>span{z-index:2}.voyage-dialog[data-island=thriller] .conversation-scene::before{filter:brightness(.4) saturate(.65) hue-rotate(30deg)}.voyage-dialog[data-island=sabaody] .conversation-scene::after,.voyage-dialog[data-island=fishman] .conversation-scene::after{content:'';position:absolute;inset:0;z-index:0;background:radial-gradient(circle at 14% 36%,transparent 0 18px,#d5fff277 19px,transparent 21px),radial-gradient(circle at 80% 65%,transparent 0 13px,#d5fff266 14px,transparent 16px);pointer-events:none}.voyage-dialog .conversation-paper{border:2px solid #b99859!important;box-shadow:inset 0 0 0 2px #fff5d055,0 2px 6px #0009}.conversation-choices button{box-shadow:inset 0 1px #ecd8aa13,0 2px 3px #0006}.conversation-choices button::before{content:'›';display:inline-block;margin-right:9px;color:#dfbe77;font-size:17px;line-height:1}.voyage-dialog [data-page=dialogue] .conversation-paper p{line-height:1.4}
.voyage-dialog .exploration-stage.stage-3d{background-image:var(--conversation-art);background-size:cover;background-position:center 35%}.voyage-dialog .stage-3d .exploration-actors{background:none}
.stage-3d .voyage-map .map-point.marker{width:44px;height:44px;min-height:44px;background:none;filter:drop-shadow(0 2px 3px #0009)}.map-point>.art-icon{width:30px;height:30px;margin:auto}.map-point>.marker-complete{position:absolute;width:15px;height:15px;right:0;bottom:0}.map-point:focus-visible{outline:2px solid #72e2ff!important;outline-offset:2px}
/* Corrections derived from the 19 captured screens, not a new theme. */
#app .port-destination{position:absolute;bottom:4px;left:4%;right:4%;width:92%;display:flex;align-items:center;gap:10px;text-align:left;border:1px solid #d9b873;border-radius:7px;padding:8px 12px;background:linear-gradient(#17282bea,#030b12f5);box-shadow:inset 0 0 0 2px #d7b16c18,0 3px 10px #0009;color:#ffe9ae;min-height:68px}.port-destination>.icon{width:36px;height:36px;flex-shrink:0}.port-destination small,.port-destination em{display:block;font-size:10px;font-style:normal}.port-destination strong{display:block;font:600 21px Carto Condensed,sans-serif;line-height:1.1}.home-air>.port-pirate{bottom:70px;height:250px;width:185px;left:calc(50% - 92.5px)}.home-tools>summary{padding:5px 8px;text-align:center;font-size:10px;color:#c6b68f;cursor:pointer}.home-tools{border:0;background:#03101a99;border-radius:6px}.home-tools[open]{border:1px solid #7b673d;padding:5px}.home-tools .shop-entry{margin:6px 0 0}.home-profile{max-width:225px}.home-caption{font-size:7px}#app>.nav .art-icon{width:23px;height:23px}
/* Two primary routes and the native expandable menu keep all eight destinations. */
dialog.voyage-dialog:not(.battle-dialog)>nav.voyage-actions{display:grid;grid-template-columns:1fr 1fr 1fr;overflow:visible;position:relative;touch-action:auto;gap:6px}.voyage-dialog:not(.battle-dialog)>nav.voyage-actions>button{min-height:58px;width:100%;font-size:13px}.voyage-more{position:static;min-width:0}.voyage-more>summary{min-height:58px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;cursor:pointer;list-style:none;border:1px solid #8b713f;border-radius:7px;background:linear-gradient(#203441,#06111c);font:600 13px Carto Condensed,sans-serif}.voyage-more>summary::-webkit-details-marker{display:none}.menu-lines{font-size:25px;color:#efd393;line-height:1}.voyage-more.current>summary,.voyage-more[open]>summary{border-color:#efd393;background:linear-gradient(#654e29,#1c231f)}.voyage-more-panel{position:absolute;bottom:calc(100% + 7px);left:7px;right:7px;display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:9px;background:#07131ff7;border:1px solid #d1ad67;border-radius:9px;box-shadow:0 -4px 25px #000b;max-height:60dvh;overflow:auto}.voyage-dialog .voyage-more-panel button{width:100%;min-height:60px;display:flex;align-items:center;justify-content:center;gap:8px}
/* World labels keep actual progression but use the parchment and proportions of the board. */
.voyage-dialog .sea-atlas{height:780px;min-height:700px}.voyage-dialog .sea-destinations .world-stop{width:120px;padding:4px 5px;min-height:40px;border-radius:5px}.world-stop strong{font-size:15px}.voyage-dialog .sea-destinations .world-stop:disabled{background:linear-gradient(#ecd9b6,#bba67c);color:#2d3028;border-color:#d9c089;opacity:.88}.world-stop.current{outline-color:#ffe49a}.world-stop small{font-size:8px}.voyage-dialog[data-page=sea] main>p{font-size:10px;padding:6px 10px;margin:0}.voyage-dialog[data-page=sea] main>button{min-height:44px}
/* Restore the feature card: inherited column flow previously created zero-width tracks. */
#app .layout.summary .summary-highlights{display:grid;grid-auto-flow:row;grid-auto-columns:auto;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:auto;overflow:visible;height:auto;max-height:none;flex-shrink:0;align-items:start;padding:4px 0 10px}#app .layout.summary .summary-highlights>.card-tile{width:100%;min-width:0;max-width:none;justify-self:stretch}#app .layout.summary .summary-highlights>.card-tile:first-child{grid-column:1/-1;width:58%;justify-self:center;padding:7px;background:radial-gradient(ellipse,#138edc55,transparent 72%)}#app .layout.summary .summary-highlights>.card-tile:first-child .image-wrap{width:100%;height:auto;aspect-ratio:2/2.8}.summary-highlights>.card-tile:first-child .image-wrap img{object-fit:contain}.layout.summary .collection-heading h1{font-size:30px}.layout.summary .summary-sort{flex-shrink:0}
/* Lists follow the compact progress cards in the reference. */
.layout.quests .quest-card{padding:10px 10px 9px 59px;min-height:99px}.layout.quests .quest-card .row:last-child{display:flex;align-items:center;justify-content:space-between;gap:7px;margin-top:5px}.layout.quests .quest-card .row>span{white-space:nowrap;min-width:55px}.layout.quests .quest-card .btn[disabled]:not(.secondary){display:none}.layout.quests .quest-card .progress{height:7px;margin:6px 0}.layout.quests .quest-card h2{font-size:19px}.layout.quests .quest-emblem{top:18px}.layout.quests .quest-card .btn{width:auto;padding:5px 12px}.layout.quests .quest-card .badge{font-size:9px;padding:2px 5px}.layout.quests>[data-action=quest-sync]{min-height:32px;font-size:10px;align-self:flex-end;padding:4px 9px}.layout.quests>.small{margin:0;font-size:10px}
/* Compact wallet leaves room for the real product and card shelves. */
#app .layout.boutique .money-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;flex-shrink:0}#app .layout.boutique .money-card{padding:8px 6px;border-radius:6px;min-height:83px}#app .layout.boutique .money-card strong{font-size:22px;white-space:nowrap;letter-spacing:-.03em}#app .layout.boutique .money-card span,#app .layout.boutique .money-card small{font-size:9px;line-height:1.2}.layout.boutique .game-heading{order:-3}.layout.boutique>.shop-reference-links{order:-2}.layout.boutique .shop-product .real-pack-art{height:135px}.shop-card-shelf{width:100%;background:#071521;border:1px solid #9e814c;border-radius:7px;padding:8px;text-align:left;color:#ffe8b4}.shop-card-shelf>span{font:600 23px Carto Condensed,sans-serif;display:flex;justify-content:space-between;align-items:center}.shop-card-shelf>span small{font:10px system-ui;color:#8bd6ef}.shop-card-shelf>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:7px}.shop-card-shelf .image-wrap{aspect-ratio:2/2.8;border-radius:5px;overflow:hidden}.shop-card-shelf img{width:100%;height:100%;object-fit:contain}
/* The original preference inputs remain native, presented as small iPhone switches. */
#app .layout.settings .settings-content{padding:0;background:none;border:0;display:grid;gap:7px}#app .layout.settings .setting-row{min-height:58px;padding:8px 12px;margin:0;border-radius:6px}#app .layout.settings .setting-row input[type=checkbox]{appearance:none;width:43px;height:25px;min-height:25px;border-radius:15px;background:#23323c;border:1px solid #6e7d87;position:relative;flex-shrink:0;cursor:pointer}#app .layout.settings .setting-row input[type=checkbox]::before{content:'';position:absolute;width:19px;height:19px;border-radius:50%;left:2px;top:2px;background:#d6e2e8;box-shadow:0 1px 3px #0006;transition:transform .15s}#app .layout.settings .setting-row input[type=checkbox]:checked{background:#0e88bd;border-color:#69ceee}#app .layout.settings .setting-row input[type=checkbox]:checked::before{transform:translateX(18px);background:#fff3ce}#app .layout.settings .setting-row span{font-size:12px}.portfolio-chart svg{max-height:200px}.portfolio-total{padding:12px 10px}.portfolio-total strong{font-size:40px}
.menu-lines{display:block;width:25px;height:22px;position:relative}.menu-lines::before{content:'';position:absolute;left:1px;right:1px;top:3px;height:2px;background:#efd393;box-shadow:0 7px #efd393,0 14px #efd393}
.voyage-dialog[data-page=map] .stage-3d .voyage-map{height:calc(100dvh - 235px);min-height:400px;max-height:none}.exploration-stage .touch-helm{position:absolute;z-index:4;left:12px;right:12px;bottom:12px;justify-content:space-between;margin:0;pointer-events:none}.exploration-stage .voyage-thumbstick,.exploration-stage .interact-command{pointer-events:auto}.exploration-stage .voyage-thumbstick{background:radial-gradient(circle,#294255c4,#07111de0 70%);box-shadow:0 2px 10px #0008}.exploration-stage .interact-command{min-width:110px;box-shadow:0 3px 10px #0009}.movement-options{border:1px solid #806a40;border-radius:6px;margin-top:8px;background:#081826}.movement-options>summary{padding:11px;font-size:11px;color:#d8c18c;cursor:pointer}.movement-options .voyage-panel{margin:7px}.sea-region-label{position:sticky;top:0;z-index:4;display:flex;align-items:center;gap:8px;padding:5px 9px;background:linear-gradient(#0a2435ee,#061826d9);border-bottom:1px solid #c19e54;min-height:40px}.sea-region-label .art-icon{width:30px;height:30px}.sea-region-label strong{font:600 21px Carto Condensed,sans-serif;flex:1;color:#ffe6a6}.sea-region-label small{font-size:10px;color:#c8dcdf}.sea-region{display:none}
@media(max-height:740px){.voyage-dialog[data-page=map] .stage-3d .voyage-map{min-height:340px;height:calc(100dvh - 225px)}}
dialog.voyage-dialog:not(.battle-dialog)>nav.voyage-actions{z-index:9}dialog.voyage-dialog:not(.battle-dialog)>main{position:relative;z-index:1}.voyage-more-panel{z-index:20}
#app .layout.boutique>.shop-card-shelf{display:block;height:auto;min-height:178px;flex:0 0 auto;overflow:hidden}#app .layout.boutique>.shop-card-shelf>div{height:120px}#app .layout.boutique>.shop-card-shelf .image-wrap{height:120px;width:100%;aspect-ratio:auto}#app .layout.boutique>.shop-showcase,#app .layout.boutique>.btn,#app .layout.boutique>.shop-cosmetics-link{flex-shrink:0}
.outfit-thumbnail .wardrobe-loading{display:flex;align-items:center;justify-content:center;min-height:112px;color:#b9cbd3;font-size:10px;padding:8px}.outfit-thumbnail img[hidden]{display:none!important}.outfit-thumbnail.ready .wardrobe-loading{display:none}
/* Tight reference panels; inputs keep an accessible 44px touch target. */
#app .layout.settings .settings-content{padding:0;gap:6px;align-content:start;flex:0 0 auto}
#app .layout.settings .setting-row{min-height:48px;padding:6px 10px;gap:12px;margin:0}
#app .layout.settings .setting-row select{min-height:36px;max-width:100px}
.voyage-dialog .event-prize{background:linear-gradient(135deg,#132a39,#07131f);color:#ffe1a0;border:1px solid #b89956;text-align:left}
.voyage-dialog .event-prize small{color:#c6d5dc}
dialog.voyage-dialog .voyage-panel .event-prize:hover,dialog.voyage-dialog .voyage-panel .event-prize:focus-visible{background:linear-gradient(135deg,#1d3d50,#0b2030);color:#ffe1a0;border-color:#ffe3a0}

/* Group one: complete compositions, isolated from the other fourteen screens. */
#app>.home.layout .home-air>.port-pirate{height:180px;width:135px;left:calc(50% - 67.5px);bottom:76px}
#app>.home.layout .home-profile{background:linear-gradient(135deg,#0b2e49ed,#05111ced);border-color:#c6a35f;box-shadow:inset 0 0 0 2px #08101c,0 3px 9px #0006}
#app>.home.layout .port-destination{min-height:63px;border-radius:8px;box-shadow:inset 0 0 0 2px #8b6a3029,0 4px 12px #0009}
.voyage-dialog[data-page=sea] .sea-atlas{height:1040px;min-height:1040px;isolation:isolate}
.world-route{position:absolute;inset:0;width:100%;height:100%;z-index:1;pointer-events:none;filter:drop-shadow(0 1px 2px #032d54)}
.world-route path{fill:none;stroke:#ffebad;stroke-width:1.6;stroke-dasharray:3 6;opacity:.7;stroke-linecap:round;stroke-linejoin:round}
.voyage-dialog[data-page=sea] .sea-destinations{z-index:2}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop{width:114px;min-height:40px;padding:4px 6px;background:linear-gradient(100deg,#d3af70,#ffecbd 32%,#dec189);box-shadow:inset 0 0 0 2px #7554251a,0 2px 0 #654826,0 3px 7px #002a46b0}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop strong{font-size:16px}
.voyage-dialog[data-page=map] .exploration-stage.stage-3d{background-image:var(--exploration-art);background-position:center 12%;border-radius:8px;overflow:hidden}
.voyage-dialog[data-page=map] .map-toolbar{position:relative;z-index:5;margin:0;padding:5px 2px 7px;gap:6px}
.voyage-dialog[data-page=map] .map-toolbar h3{font-size:20px}
.voyage-dialog[data-page=map] .map-toolbar button{font-size:10px;padding:5px 8px}
.voyage-dialog[data-page=map] .stage-3d .voyage-map{height:calc(100dvh - 213px);min-height:370px}
.voyage-dialog[data-page=map] .exploration-stage .interact-command{background:linear-gradient(#ffedb8,#d7ac5d);color:#2d210e;border-color:#ffe0a1;text-shadow:none;min-height:44px}
.voyage-dialog[data-page=dialogue]>main{padding:5px 8px}
.voyage-dialog[data-page=dialogue] .conversation-scene{height:34dvh;min-height:235px;max-height:300px;border-radius:7px;overflow:hidden}
.voyage-dialog[data-page=dialogue] .conversation-paper{padding:8px 10px!important;margin:5px 0!important;min-height:75px;border-radius:4px;position:relative}
.voyage-dialog[data-page=dialogue] .conversation-paper small{font-family:Carto Condensed,sans-serif;font-size:16px;font-weight:600;color:#392718}
.voyage-dialog[data-page=dialogue] .conversation-paper p{font-size:13px;line-height:1.35;margin-top:3px}
.voyage-dialog[data-page=dialogue] .conversation-choices{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.voyage-dialog[data-page=dialogue] .conversation-choices button{min-height:44px;text-align:left;padding:6px 9px;font-size:12px;grid-column:1/-1}
.voyage-dialog[data-page=dialogue] .conversation-choices button:nth-last-child(-n+2){grid-column:auto;font-size:11px}
@media(max-height:740px){.voyage-dialog[data-page=dialogue] .conversation-scene{height:29dvh;min-height:190px}.voyage-dialog[data-page=map] .stage-3d .voyage-map{min-height:310px;height:calc(100dvh - 213px)}}

.voyage-dialog[data-page=sea]>main>p,.voyage-dialog[data-page=sea]>main>button{display:none}
.voyage-dialog[data-page=dialogue] .conversation-paper small{display:inline-block;position:relative;margin-top:-18px;padding:3px 9px;background:#171815;border:1px solid #b89958;border-radius:4px;color:#ffe3a4;font-size:15px}
.voyage-dialog[data-page=dialogue] .conversation-paper{margin-top:10px!important}

.voyage-dialog:is([data-page=map],[data-page=sea],[data-page=dialogue])>header{min-height:45px}
.voyage-dialog:is([data-page=map],[data-page=sea],[data-page=dialogue])>header small{display:none}
.voyage-dialog:is([data-page=map],[data-page=sea],[data-page=dialogue])>header h2{font-size:22px}

.voyage-dialog[data-page=map] .map-toolbar{position:sticky;top:0;background:linear-gradient(#07121ff5,#07121fe8);border-bottom:1px solid #a88a4b70}
.voyage-dialog[data-page=map] .stage-3d .voyage-map .player-position:not(:focus-visible){box-shadow:none;background:none}

/* Second group-one finish: authored environments, curved paths and native relief controls. */
body[data-view=home] #app{background-image:linear-gradient(0deg,#020810 0%,transparent 35%,#0615250a 85%),url('/assets/group-one-finish/port-quay.png');background-position:center center;background-size:cover}
#app>.nav .port-icon{width:32px;height:32px;display:block;filter:drop-shadow(0 2px 1px #0009)}
body[data-view=home] #app>.nav button{gap:1px;font-size:13px;min-height:59px;padding:3px}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop,.voyage-dialog[data-page=sea] .sea-destinations .world-stop:disabled{width:130px;min-height:53px;padding:10px 11px 8px;background:transparent url('/assets/group-one-finish/parchment-label.svg') center/100% 100% no-repeat;border:0;border-radius:0;box-shadow:none;filter:drop-shadow(0 3px 3px #001a2b99);color:#342713}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop:disabled{opacity:.87;filter:saturate(.7) brightness(.94) drop-shadow(0 3px 3px #001a2b99)}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop strong{font-size:15px;line-height:1.05}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop small{position:absolute;top:5px;left:12px;font-size:8px}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop.current:not(:focus-visible){outline:none;filter:drop-shadow(0 0 5px #ffe08b)}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop.current::after{content:'';position:absolute;left:calc(50% - 6px);top:-5px;border-left:6px solid transparent;border-right:6px solid transparent;border-top:9px solid #ffe5a3;filter:drop-shadow(0 2px 1px #1e251b)}
.voyage-dialog[data-page=sea] .sea-atlas{background-image:url('/assets/group-one-finish/world-shores.png')}

.voyage-dialog[data-page=sea] .sea-destinations .world-stop,.voyage-dialog[data-page=sea] .sea-destinations .world-stop:disabled{background-color:#dfc38d;clip-path:polygon(6% 5%,16% 3%,85% 4%,95% 10%,94% 31%,97% 47%,94% 65%,95% 87%,86% 93%,17% 96%,6% 88%,8% 66%,4% 47%,8% 27%)}
.voyage-dialog[data-page=dialogue][data-island=fuschia] .conversation-scene::before{background-position:center 78%}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop:focus-visible{box-shadow:inset 0 0 0 3px #72dcff;outline:none}

/* Group 1 production pass: preserve live controls and original catalogue. */
body[data-view=home] #app>.top,body[data-view=home] #app>header.header{background:linear-gradient(180deg,#02080fee,#101f2ccc);border-bottom:1px solid #e5bf6c88;box-shadow:0 3px 14px #0008}
body[data-view=home] #app>.nav{background:linear-gradient(#1b2023,#050b11);border-top:1px solid #e5bf6c;padding-top:5px}
body[data-view=home] #app>.nav button{background:linear-gradient(125deg,#172331,#060e16 58%);border-color:#b7904d;border-radius:7px;box-shadow:inset 0 1px #fff2,0 2px 3px #0009;text-shadow:0 1px #000}
.voyage-dialog[data-page=dialogue] .conversation-scene{height:41dvh;min-height:290px;max-height:350px;border:1px solid #be9b56;box-shadow:inset 0 0 22px #030b1666}
.voyage-dialog[data-page=dialogue][data-island=fuschia] .conversation-scene::before{background-position:center 60%}
.voyage-dialog[data-page=dialogue] .conversation-paper{background:linear-gradient(120deg,#fff0c8,#e1c18b);border:1px solid #cfaa60;box-shadow:inset 0 0 0 2px #fff4,0 3px 8px #0007}
.voyage-dialog[data-page=dialogue] .conversation-choices button{background:linear-gradient(120deg,#172637,#07111a 65%);border:1px solid #ae8e4b;border-left:3px solid #dfbc72;border-radius:5px;font-size:13px;box-shadow:inset 0 1px #fff1}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop,.voyage-dialog[data-page=sea] .sea-destinations .world-stop:disabled{width:116px;min-height:48px;padding:10px 8px 6px;filter:drop-shadow(0 3px 2px #001a2bbb)}
.voyage-dialog[data-page=sea] .sea-destinations .world-stop strong{font-size:14px;text-shadow:0 1px #fff7}
.voyage-dialog[data-page=sea] .sea-region-label{background:linear-gradient(#0a2137f5,#071523e8);border-bottom:1px solid #d5b06c;box-shadow:0 2px 8px #0005}
.voyage-dialog[data-page=map] .exploration-stage{box-shadow:inset 0 0 28px #031b1688,0 0 0 1px #d2b06b55}
@media(max-height:760px){.voyage-dialog[data-page=dialogue] .conversation-scene{height:37dvh;min-height:245px;max-height:300px}}
@media(prefers-reduced-motion:reduce){.voyage-dialog .world-route path{animation:none}}
.voyage-dialog[data-page=sea] .sea-travel-panel>summary{min-height:44px;display:flex;align-items:center;color:#f4d48d;cursor:pointer;font-size:18px}
.voyage-dialog[data-page=sea] .sea-travel-panel[open]{margin-bottom:14px}
.voyage-dialog[data-page=sea] .sea-travel-panel details>summary{min-height:36px;padding:8px 0;color:#d2bd8d}

/* Groupe 2 : décors séparés des cartes officielles et des commandes du jeu. */
body[data-view="opening"] .open-layout{background:linear-gradient(#020a1722,#020a1744),url('/assets/group-two/reveal-storm-v1.jpg') center/cover;isolation:isolate;border:1px solid #d8b665;border-radius:18px;box-shadow:inset 0 0 28px #000a;min-height:100dvh}
body[data-view="opening"] .opening-top{background:linear-gradient(#031529ef,#03152966);border-bottom:1px solid #cba35a66;padding-bottom:12px}
body[data-view="opening"] .open-stage{background:radial-gradient(ellipse,#45c4ff42,transparent 65%);flex:1;min-height:0}
body[data-view="opening"] .pack{filter:drop-shadow(0 0 22px #42c6ff99) drop-shadow(0 10px 22px #000);width:min(65vw,275px,calc((100dvh - 260px)*.64))}
body[data-view="opening"] .opening-info{background:linear-gradient(transparent,#020914d9);padding:12px 20px 25px}
body[data-view="opening"] .skip-opening{display:block;width:min(100%,300px);margin:14px auto 0;min-height:50px;border:1px solid #ffd98b;border-radius:10px;background:linear-gradient(#ffe8a2,#efbf56 55%,#b87c25);box-shadow:inset 0 1px #fff5cd,0 0 20px #e8ae3838;color:#291a06;font:700 20px 'Carto Condensed',sans-serif;text-shadow:0 1px #ffebaf}
body[data-view="summary"]{background:#030c19 url('/assets/group-two/reveal-storm-v1.jpg') center top/cover fixed}
body[data-view="summary"] #app>.header{height:49px;background:#020b16c9}
body[data-view="summary"] #app .layout.summary{background:linear-gradient(#03152a22,#020b17b8);padding-top:12px}
body[data-view="summary"] .collection-heading{margin-bottom:3px}
body[data-view="summary"] .collection-heading h1{font-size:26px;letter-spacing:.01em}
body[data-view="summary"] .summary-count{font-size:11px;color:#e4d8bb;margin-bottom:8px}
body[data-view="summary"] .summary-sort{margin:0 0 4px}
body[data-view="summary"] .summary-sort button{min-height:44px}
#app .layout.summary .summary-highlights>.card-tile:first-child{width:64%;padding:8px 8px 2px;filter:drop-shadow(0 0 15px #52baff66)}
#app .layout.summary .summary-highlights>.card-tile:first-child .image-wrap{box-shadow:0 0 32px #54b5ff80,0 0 6px #ffda83;border:2px solid #ffe29c}
#app .layout.summary .summary-highlights>.card-tile:first-child .new-badge{font-size:18px;left:-9px;top:10px;padding:5px 13px;transform:rotate(-12deg);background:linear-gradient(#ff6655,#bc1e16);border:1px solid #ffdf9c;box-shadow:0 2px 8px #0009;color:#fff3ba}
#app .layout.summary .summary-highlights>.card-tile:not(:first-child){transform:rotate(-4deg);box-shadow:0 0 10px #2ccaff44}
#app .layout.summary .summary-highlights>.card-tile:nth-child(2n){transform:rotate(4deg)}
#app .layout.summary .summary-highlights{gap:9px;padding-bottom:18px}
body[data-view="summary"] .recap-sale{background:#03111de8;border:1px solid #c5a25a;border-radius:12px;padding:12px;margin-top:14px}
.battle-dialog:not([data-result="won"]):not([data-result="lost"])>main{background:radial-gradient(ellipse at 50% 18%,#12446b88,transparent 62%),linear-gradient(#020e1c,#071b2d)}
.battle-dialog .battle-zone{min-height:0;padding:6px;margin-bottom:7px;background:linear-gradient(#061c2adb,#020a13e8);border-color:#9b874f}
.battle-dialog .opponent-zone .battle-leader-banner{height:170px;box-shadow:0 0 16px #25bfff22}
.battle-dialog .battle-leader-banner>img{object-position:center 28%}
.battle-dialog .battle-leader-banner>span{background:linear-gradient(#03101e22,transparent 35%,#001323ed)}
.battle-dialog .battle-field{display:flex;align-items:flex-end;min-height:0;gap:5px;overflow-x:auto}
.battle-dialog .battle-zone .battle-card{margin:0;flex-shrink:0}
.battle-dialog .player-zone{position:relative;padding-top:4px}
.battle-resource-bar{display:flex;align-items:center;justify-content:space-between;min-height:46px;gap:8px}
.don-medallion{display:flex;align-items:baseline;gap:4px;border:2px solid #ead391;border-radius:50% 50% 40% 40%;background:radial-gradient(#2d6b9a,#001325);padding:3px 10px;box-shadow:0 0 12px #29b5e94d;color:#fff1ce;font:600 12px 'Carto Condensed',sans-serif}.don-medallion b{font-size:29px}
.life-gauge{display:flex;align-items:center;gap:3px;padding:5px 8px;border:1px solid #ae9159;background:#010b13;border-radius:7px}.life-gauge i{font-style:normal;font-size:18px;color:#f86c70;text-shadow:0 1px #6b1111}.life-gauge small{font-size:10px;color:#f5dfb1;margin-left:3px}
.battle-dialog .battle-hand{padding:5px 0 7px;background:linear-gradient(transparent,#07273f88);border-bottom:1px solid #b59a5a}
.battle-dialog .battle-help{font-size:11px;line-height:1.35}
.battle-dialog>footer{padding:6px;gap:5px;max-height:26dvh;background:linear-gradient(#09243b,#020a12);border-top:1px solid #cba96c}
.battle-dialog>footer button{min-height:44px;font-size:12px}
.battle-dialog>footer [data-battle="end"]{font-size:16px;font-family:'Carto Condensed',sans-serif;box-shadow:0 0 15px #22b9ff66}
.battle-dialog[data-result="won"]>main,.battle-dialog[data-result="lost"]>main{background:#030c16 url('/assets/group-two/victory-light-v1.jpg') center/cover}
.battle-dialog[data-result="lost"]>main{background-blend-mode:luminosity}
.battle-dialog .combat-result{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 10px;min-height:100%;background:transparent}
.battle-dialog .combat-result .victory-emblem{display:none}
.battle-dialog .combat-result .result-pirate{order:-1;width:100%;height:230px;min-height:230px;margin:-10px 0 -14px;background:transparent;border:0;box-shadow:none}
.battle-dialog .combat-result h3{font:700 48px/.98 'Carto Condensed',sans-serif;color:#ffdb70;text-shadow:0 2px 1px #513000,0 0 20px #f9b51b77;margin:5px 0}
.battle-dialog .result-opponent{color:#fff0c2;font-size:14px;margin:8px 0 15px}
.battle-dialog .result-detail{width:100%;text-align:left;padding:12px;border:1px solid #947e4e;border-radius:11px;background:linear-gradient(#0a1a25f2,#020a11f2);box-shadow:0 5px 20px #0007}
.result-detail h4{font:600 19px 'Carto Condensed',sans-serif;color:#f4d9a0;margin:0 0 10px}.result-stat-row{display:flex;justify-content:space-between;gap:8px;padding:10px 0;border-bottom:1px solid #88734366;font-size:13px}.battle-dialog .result-detail p{font-size:12px;line-height:1.5;margin-top:12px;color:#cbd4d8}
.battle-dialog[data-result="won"]>footer [data-battle="close"],.battle-dialog[data-result="lost"]>footer [data-battle="close"]{flex:2;background:linear-gradient(#ffe6a0,#e6ae48);color:#291a06;font-size:20px;font-family:'Carto Condensed',sans-serif}
@media(max-height:720px){.battle-dialog .opponent-zone .battle-leader-banner{height:125px}.battle-dialog .combat-result .result-pirate{height:170px;min-height:170px}.battle-dialog .combat-result h3{font-size:39px}}
@media(prefers-reduced-motion:reduce){body[data-view="opening"] .pack{animation:none}}
/* Deuxième passe : garder la main et les commandes visibles ensemble sur iPhone. */
.battle-dialog .opponent-zone .battle-leader-banner{height:140px}
.battle-dialog .battle-zone .battle-card img{height:56px}
.battle-dialog .battle-zone .battle-card b{display:none}
.battle-dialog .battle-resource-bar{min-height:38px}
.battle-dialog .don-medallion b{font-size:24px}
.battle-dialog .battle-zone h3{line-height:1.2}
.battle-dialog .battle-zone>p{line-height:1.2}
.battle-dialog .combat-result .result-detail{margin-top:5px}
/* Le panneau global masquait le décor de révélation : ne retirer son fond que sur le récapitulatif. */
body[data-view="summary"] #app{background:transparent}
body[data-view="summary"] #app .layout.summary{background:linear-gradient(#0210240d,#020a17b3)}
body[data-view="summary"] .summary-highlights{position:relative;isolation:isolate}
body[data-view="summary"] .summary-highlights::before{content:"";position:absolute;inset:0 -12px 22%;z-index:-1;pointer-events:none;background:repeating-conic-gradient(from 12deg at 50% 46%,transparent 0deg 13deg,#6fd8ff18 14deg 17deg),radial-gradient(ellipse,#83cfff44,transparent 68%);mask-image:radial-gradient(ellipse,#000,transparent 73%)}
.battle-dialog .opponent-zone .battle-leader-banner{height:130px}
@media(max-height:720px){.battle-dialog .opponent-zone .battle-leader-banner{height:110px}}
/* Troisième passe : action de tour en accès direct, autres commandes dans un volet natif. */
.battle-turn-actions{display:flex;align-items:flex-start;gap:8px;width:100%}
.battle-turn-actions>[data-battle="end"]{flex:1;min-width:140px;min-height:48px}
.battle-actions-menu{flex:1;min-width:0;border:1px solid #a38c55;border-radius:8px;background:#071827}
.battle-actions-menu>summary{display:flex;align-items:center;justify-content:center;min-height:46px;padding:5px 9px;color:#f4d99a;font-size:13px;cursor:pointer;list-style:none}
.battle-actions-menu>summary::after{content:'⌄';margin-left:8px}
.battle-actions-menu[open]>summary::after{content:'⌃'}
.battle-actions-menu>div{display:grid;gap:5px;padding:5px;max-height:160px;overflow-y:auto}
.battle-actions-menu>div button{width:100%;min-height:44px}
.battle-dialog .opponent-zone .battle-leader-banner{height:185px}
.battle-dialog .battle-zone .battle-card img{height:70px}
@media(max-height:720px){.battle-dialog .opponent-zone .battle-leader-banner{height:110px}.battle-dialog .battle-zone .battle-card img{height:56px}}

/* Groupe 3 : composants réels, cadrés pour la planche Collection / Boutique / Équipage / Cosmétiques. */
body[data-view="collection"] #app>.header,body[data-view="boutique"] #app>.header{height:49px;background:linear-gradient(#081725,#020a11);border-bottom:1px solid #9c814c}
#app .layout.collection{display:flex;flex-direction:column;gap:6px;padding-top:10px}
.layout.collection>.collection-heading{order:0;margin-bottom:0}
.layout.collection>.collection-heading .eyebrow{display:none}
.layout.collection>.collection-heading h1{font-size:27px;letter-spacing:0}
.layout.collection>.ownership-tabs{order:1;margin:0}
.layout.collection>.collection-search{order:2;margin:0}
.layout.collection>.collection-ref-options{order:3;margin:0;background:linear-gradient(#102537,#020b14);border-radius:7px}
.layout.collection>.collection-sort{order:4;margin:0;min-height:44px;gap:5px}
.layout.collection>.catalog-grid,.layout.collection>.rarity-section,.layout.collection>.empty{order:5}
.layout.collection>.btn{order:6}
.layout.collection .collection-search input{min-height:44px;font-size:13px;background:#07141f}
.layout.collection .collection-sort>span{font-size:10px}.layout.collection .collection-sort select{min-height:44px;max-width:95px;font-size:12px}.layout.collection .collection-sort>button{font-size:11px}
.layout.collection .catalog-grid.design-grid{gap:6px;margin-top:2px}
.layout.collection .card-tile{padding:3px;border-color:#967b46;background:linear-gradient(#15334a,#030b12);border-radius:7px;box-shadow:0 2px 6px #0008}
.layout.collection .card-tile .image-wrap{border-radius:4px;overflow:hidden}
.layout.collection .card-tile .card-label{font-size:9px!important;line-height:1.1}.layout.collection .card-tile .card-meta{font-size:8px!important;line-height:1.15}
.layout.collection .card-tile[data-card-hit="4"],.layout.collection .card-tile[data-card-hit="5"]{border-color:#f3cc75;box-shadow:0 0 8px #e5b34333}
.layout.collection .card-tile:not(.unowned) .image-wrap{filter:saturate(1.08)}
#app .layout.boutique{display:flex;flex-direction:column;gap:10px;padding-top:10px}
.shop-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;order:0}.shop-heading h1{font-size:29px;letter-spacing:0}.shop-wallet{display:grid;grid-template-columns:24px auto;align-items:center;gap:2px 5px;padding:6px 9px;border:1px solid #ae8d4f;border-radius:8px;background:#06131f;font-size:14px;color:#f9df9f}.shop-wallet svg{width:21px;height:21px;grid-row:span 2}.shop-wallet small{font-size:8px;color:#b4c5ce}
.layout.boutique>.shop-reference-links{order:1;display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px;border:1px solid #9a8049;border-radius:8px;background:#030b12;margin:0}
.layout.boutique .shop-reference-links button{min-height:44px;font-size:12px;border-radius:5px}.layout.boutique .shop-reference-links button:first-child{background:linear-gradient(#ffe2a0,#bb9349);color:#251b0d}
.layout.boutique>.shop-showcase{order:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding:8px;background:linear-gradient(#092338,#030b12);border:1px solid #9a8049;border-radius:9px}
.layout.boutique .shop-product{min-width:0;padding:5px;border:1px solid #6d7c80;border-radius:7px;background:linear-gradient(#102a40,#020b15)}
.layout.boutique .shop-product img{height:135px;max-width:100%;object-fit:contain;filter:drop-shadow(0 4px 5px #000b)}
.layout.boutique .shop-product strong{font:600 19px 'Carto Condensed',sans-serif}.layout.boutique .shop-product small{display:block;font-size:12px;color:#ffe0a2;margin-top:4px}
#app .layout.boutique>.shop-card-shelf{order:3;min-height:160px;margin:0;border:1px solid #9c824d;border-radius:9px;background:linear-gradient(#0b2336,#020b14);padding:9px}
#app .layout.boutique>.shop-card-shelf>span{font:600 21px 'Carto Condensed',sans-serif;color:#f7e2b7}#app .layout.boutique>.shop-card-shelf>span small{font:11px system-ui}
#app .layout.boutique>.shop-card-shelf>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;height:112px;margin-top:8px}
#app .layout.boutique>.shop-card-shelf .image-wrap{height:112px;border:1px solid #be9852;border-radius:5px;overflow:hidden}
.layout.boutique>.shop-cosmetics-link{order:4;min-height:65px;margin:0;border:1px solid #a68a4f;background:linear-gradient(#112e44,#030d17);border-radius:9px}.layout.boutique>.shop-cosmetics-link .art-icon{width:42px;height:42px}
.layout.boutique>.money-cards{order:5;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0}.layout.boutique .money-card{padding:8px;min-width:0}.layout.boutique .money-card span{font-size:9px}.layout.boutique .money-card strong{font-size:16px}.layout.boutique .money-card small{font-size:9px}
.layout.boutique>.btn,.layout.boutique>.text-btn,.layout.boutique>.micro-note{order:6}
.voyage-dialog[data-page="crew"] .crew-hero>.pirate-scene,.voyage-dialog[data-page="cosmetics"] .cosmetic-dressing>.avatar-preview,.voyage-dialog[data-page="captain"] .wardrobe-stage>.avatar-preview{background:url('/assets/group-three/captain-cabin-v1.jpg') center/cover;height:310px;min-height:250px;border:1px solid #b59351;box-shadow:inset 0 0 18px #000a,0 3px 12px #0008}
.cosmetic-dressing{position:relative}.cosmetic-dressing .equipment-rail{top:28px;bottom:28px}
.wardrobe-note{font-size:10px!important;text-align:center;color:#e8d19e!important;margin:7px 0!important}
.voyage-dialog[data-page="cosmetics"] .cosmetic-categories{margin-bottom:8px}
.voyage-dialog[data-page="cosmetics"] .cosmetics-grid{gap:6px}
.voyage-dialog[data-page="cosmetics"] .cosmetic-token{padding:4px;box-shadow:inset 0 1px #ffe9af2b,0 3px 7px #0008}
.voyage-dialog[data-page="cosmetics"] .outfit-thumbnail{height:96px;min-height:96px;padding:0;background:radial-gradient(#32557199,transparent 70%)}
.voyage-dialog[data-page="cosmetics"] .outfit-thumbnail img{height:96px;width:auto;max-width:100%;object-fit:contain}
.voyage-dialog[data-page="cosmetics"] .cosmetic-token h3{font-size:12px;line-height:1.1;min-height:26px;margin:3px 0}
.voyage-dialog[data-page="cosmetics"] .cosmetic-token>small{font-size:9px;min-height:20px;display:block}
.voyage-dialog[data-page="cosmetics"] .cosmetic-token>button[data-voyage="outfit"]{width:100%;min-height:44px;font-size:12px;padding:4px}
.voyage-dialog[data-page="crew"] .crew-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.voyage-dialog[data-page="crew"] .crew-heading h3{font-size:22px}.voyage-dialog[data-page="crew"] .crew-heading small{font-size:11px;color:#d8c08d}
.voyage-dialog[data-page="crew"] .crew-hero{margin-bottom:5px}
.voyage-dialog[data-page="crew"] .crew-active-rail{top:28px;bottom:28px;justify-content:center;gap:10px}.voyage-dialog[data-page="crew"] .crew-active-rail button{width:58px;min-height:65px;background:linear-gradient(#193a50,#020c15);border:1px solid #b79351;box-shadow:0 3px 8px #0009}.voyage-dialog[data-page="crew"] .crew-active-rail img{width:44px;height:44px;object-fit:cover;border-radius:50%}.voyage-dialog[data-page="crew"] .crew-active-rail small{font-size:9px}
.voyage-dialog[data-page="crew"] .preview-commands button{min-height:44px;font-size:11px;padding:5px}
.voyage-dialog[data-page="crew"] .voyage-panel{padding:10px;margin:7px 0;border-radius:9px;background:linear-gradient(#0b263b,#020b13)}.voyage-dialog[data-page="crew"] .voyage-panel h3{font-size:20px}.voyage-dialog[data-page="crew"] .voyage-panel p{font-size:12px;line-height:1.35;margin-top:6px}
.voyage-dialog[data-page="crew"] .character-roster{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.voyage-dialog[data-page="crew"] .crew-portrait-card{border-radius:7px;min-width:0}.voyage-dialog[data-page="crew"] .crew-portrait-card img{height:75px;object-fit:contain}
.avatar-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:7px 0 15px}.avatar-choice-grid button{display:flex;align-items:center;flex-direction:column;justify-content:center;gap:3px;min-height:65px;padding:6px;border:1px solid #8e7749;border-radius:7px;background:linear-gradient(#123249,#030d18);font-size:10px;color:#e9dcc1}.avatar-choice-grid .art-icon{width:25px;height:25px}.avatar-choice-grid button[aria-pressed="true"]{border-color:#ffe09a;background:linear-gradient(#66512a,#201b11);box-shadow:0 0 9px #ecc06a44}
@media(max-height:720px){.voyage-dialog[data-page="crew"] .crew-hero>.pirate-scene,.voyage-dialog[data-page="cosmetics"] .cosmetic-dressing>.avatar-preview,.voyage-dialog[data-page="captain"] .wardrobe-stage>.avatar-preview{height:250px;min-height:220px}.layout.boutique .shop-product img{height:110px}}
/* Passe 2 : respecter le recadrage officiel des emballages et placer les commandes devant le canvas. */
.layout.boutique .shop-product .real-pack-art{height:135px;width:100%;margin:0 auto 7px}
.layout.boutique .shop-product .real-pack-art.cropped img{width:var(--art-w)!important;height:var(--art-h)!important;max-width:none;object-fit:fill}
.cosmetic-dressing .equipment-rail{z-index:25;pointer-events:auto}
@media(max-height:720px){.layout.boutique .shop-product .real-pack-art{height:110px}}
/* Empêcher le catalogue de comprimer les filtres dans le conteneur défilant. */
#app .layout.collection>*{flex-shrink:0}
#app .layout.collection>.ownership-tabs{min-height:48px}

/* Groupe 4 : six écrans réels, composants navy/or et commandes principales à portée de main. */
body[data-view="quests"] #app>.header,body[data-view="piano"] #app>.header,body[data-view="portfolio"] #app>.header,body[data-view="settings"] #app>.header{height:49px;background:linear-gradient(#0b1b29,#020a12);border-bottom:1px solid #927744}
#app .layout.quests,#app .layout.settings,#app .layout.portfolio{padding-top:10px;gap:8px}
.layout.quests .collection-heading,.layout.portfolio .collection-heading{margin-bottom:5px}.layout.quests .collection-heading .eyebrow,.layout.portfolio .collection-heading .eyebrow,.layout.settings .game-heading .eyebrow{display:none}
.layout.quests .collection-heading h1,.layout.portfolio .collection-heading h1,.layout.settings .game-heading h1{font-size:28px;letter-spacing:0}
.layout.quests .collection-heading>strong{font-size:13px;color:#ffe0a0;border:1px solid #8d7446;padding:7px;border-radius:7px;background:#061521}
.layout.quests .quest-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0 0 7px;flex-shrink:0}.layout.quests .quest-tabs button{min-width:0;font-size:12px;min-height:44px}
.quest-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0 12px}.quest-shortcuts button{display:flex;align-items:center;justify-content:center;gap:4px;padding:5px;min-height:44px;background:linear-gradient(#16374d,#040e18);border:1px solid #9a7f48;border-radius:7px;font-size:10px;color:#e8d4a6}.quest-shortcuts .art-icon{width:24px;height:24px;flex-shrink:0}
.layout.quests .quest-card{padding:11px 10px 10px 62px;min-height:104px;background:linear-gradient(110deg,#132f43,#030d17);border:1px solid #7f754f;box-shadow:inset 0 1px #dfc27a22,0 3px 8px #0006;margin-bottom:8px}
.layout.quests .quest-card h2{font-size:19px;color:#f3deaf}.layout.quests .quest-card .row>strong{font:600 16px 'Carto Condensed',sans-serif;color:#f6cf78}
.layout.quests .quest-card .quest-objective{font-size:11px;line-height:1.35;color:#b8cbd5;margin:5px 0}.layout.quests .quest-card .progress{height:7px;background:#02111d;border:1px solid #56747c;border-radius:8px}.layout.quests .quest-card .progress>span{background:linear-gradient(#79e3ff,#168bbb);box-shadow:0 0 7px #19bfff88}
.layout.quests .quest-emblem{top:15px;width:41px;height:44px;padding:3px;border:1px solid #c99f50;border-radius:9px;background:radial-gradient(#5c4725,#06131e)}.layout.quests .quest-emblem .art-icon{width:33px;height:33px}
.layout.quests .quest-card[data-status="ready"]{border-color:#f3cc73;box-shadow:0 0 14px #dfa52e33}.layout.quests .quest-card[data-status="claimed"]{border-color:#457265}
body[data-quest-tab="achievements"] .quest-card{padding-top:12px;min-height:116px;background:linear-gradient(110deg,#1c3040,#040d17)}
body[data-quest-tab="achievements"] .quest-emblem{border-radius:50%;width:42px;height:42px;border:2px solid #d6b268;box-shadow:inset 0 0 0 2px #544023,0 0 10px #d7ac4f44;background:radial-gradient(#ad7a2a,#382819)}
body[data-quest-tab="achievements"] .quest-card .badge{font-size:9px;padding:2px 7px;margin-top:4px;background:#352c1b;border:1px solid #b39155;color:#f7d893}
.layout.piano{padding-top:8px;gap:7px}.layout.piano>.collection-heading{margin-bottom:0}.layout.piano .collection-heading h1{font-size:25px}.layout.piano .collection-heading .eyebrow{font-size:9px}
.layout.piano .piano-hud{display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:7px;border:1px solid #bb9956;border-radius:9px;background:linear-gradient(#143959ee,#021429dd);text-align:center}.layout.piano .piano-hud span{font-size:10px}.layout.piano .piano-hud b{display:block;font-size:24px;line-height:1.1;color:#f8e1aa;text-shadow:0 0 10px #60cfff55}
#app .layout.piano .piano-stage{min-height:270px;flex:1;border:1px solid #f4d48c;border-radius:12px;box-shadow:0 0 20px #25bfff55,inset 0 0 30px #01102a}
.layout.piano .piano-lane{border-right:1px solid #56caff88!important;background:linear-gradient(#02102422,#01203b55)!important;font-size:15px;color:#bde9ff;padding-bottom:8px}.layout.piano .piano-lane:active{background:#83dbff44!important}
.layout.piano .piano-tile{background:linear-gradient(135deg,#248ad1,#020f29 55%,#0a466b)!important;border:1px solid #a0e8ff;box-shadow:0 0 10px #4ecbffb3,inset 0 0 9px #197bdf99;border-radius:5px}.layout.piano .piano-tile.past{opacity:.25}
.layout.piano .piano-hitline{height:4px;background:#d1f9ff;box-shadow:0 0 18px 5px #3bc7ff99}
.piano-feedback{position:absolute;top:42%;left:0;right:0;pointer-events:none;text-align:center;color:#ffe3a2;font:600 31px 'Carto Condensed',sans-serif;text-shadow:0 2px #61401a,0 0 18px #f6c455;opacity:0}.piano-feedback.flash{animation:piano-feedback .65s ease-out forwards}@keyframes piano-feedback{0%{opacity:1;transform:scale(.85)}25%{opacity:1;transform:scale(1.08)}100%{opacity:0;transform:translateY(-20px)}}
.layout.piano .piano-hint{font-size:10px;line-height:1.3}.layout.piano .piano-music{min-height:44px;gap:8px}.layout.piano>.btn{min-height:44px;margin:0}
.voyage-dialog[data-page="events"]>main>h3{display:none}.voyage-dialog[data-page="events"] .event-banner{padding:0 0 10px;border:1px solid #c3a45c;border-radius:11px;background:#040d18;overflow:hidden;margin:0 0 10px}.voyage-dialog[data-page="events"] .event-key-art{height:220px;min-height:180px;background:url('/assets/group-four/port-cup-v1.jpg') center 55%/cover;box-shadow:inset 0 -30px 28px #030c17}
.voyage-dialog[data-page="events"] .event-banner>h3{font:600 25px 'Carto Condensed',sans-serif;color:#ffdf8c;text-align:center;margin:-15px 5px 3px;position:relative;text-shadow:0 2px #000}.voyage-dialog[data-page="events"] .event-banner>p{font-size:10px;text-align:center;color:#c8d8df}
.voyage-dialog[data-page="events"] .voyage-panel{padding:10px;border-radius:9px;margin:0}.voyage-dialog[data-page="events"] .voyage-panel h3{font-size:23px;color:#f8df9f}.voyage-dialog[data-page="events"] .voyage-panel>p{font-size:12px;line-height:1.35;margin:8px 0}.event-rounds{display:flex;gap:8px;margin:8px 0}.event-rounds span{display:grid;place-items:center;width:34px;height:34px;border:1px solid #b99953;border-radius:50%;background:#031625;color:#ddceaa;font-weight:bold}.event-rounds span.complete{background:linear-gradient(#e4b45b,#885723);color:#fff1be;box-shadow:0 0 10px #d7a43a66}
.voyage-dialog[data-page="events"] .event-prize{min-height:65px;padding:5px 10px;background:linear-gradient(#122d41,#020c15);border:1px solid #ad9051;border-radius:8px;margin:6px 0}.voyage-dialog[data-page="events"] .event-prize img{height:55px;width:45px;object-fit:contain}.voyage-dialog[data-page="events"] .event-prize small{font-size:10px}.voyage-dialog[data-page="events"] [data-voyage="event-start"]{width:100%;min-height:48px;margin:4px 0;background:linear-gradient(#ffe6a0,#c89840);color:#281b08;font:600 20px 'Carto Condensed',sans-serif}
.layout.portfolio .portfolio-total{text-align:center;padding:12px 8px;margin:7px 0 10px;background:radial-gradient(ellipse at top,#12364b,#030c16 80%);border:1px solid #8f7847;border-radius:10px}.layout.portfolio .portfolio-total>span{font-size:11px}.layout.portfolio .portfolio-total strong{font-size:43px;line-height:1.15;color:#fff0c9}.layout.portfolio .portfolio-total small,.layout.portfolio .portfolio-total em{font-size:11px}
.layout.portfolio .portfolio-tabs{margin:0 0 10px}.layout.portfolio .portfolio-tabs button{min-height:44px;font-size:12px}
.layout.portfolio .portfolio-chart{position:relative;padding:9px 10px;border:1px solid #577584;border-radius:8px;background:linear-gradient(#082135,#020b16);margin:0 0 9px}.layout.portfolio .portfolio-chart svg{width:100%;max-height:190px;filter:drop-shadow(0 0 4px #14bfff33)}.portfolio-axis{display:flex;justify-content:space-between;font-size:9px;color:#a5c2d2;margin-top:5px}.layout.portfolio .portfolio-chart>p{font-size:11px;color:#abc1cf;line-height:1.4}.layout.portfolio .chart-caption strong{font-size:12px}.layout.portfolio .chart-caption small{font-size:9px}
.layout.portfolio .portfolio-breakdown section{padding:10px 8px;border-bottom:1px solid #55708066;background:#061522}.layout.portfolio .portfolio-breakdown strong{font-size:13px}.layout.portfolio .portfolio-breakdown small{font-size:10px}.layout.portfolio .portfolio-breakdown b{font-size:15px;color:#f8dfa2}.layout.portfolio .portfolio-commands{display:grid;grid-template-columns:1fr 1fr;gap:7px}.layout.portfolio .portfolio-commands button{min-height:44px;font-size:11px;padding:7px}.layout.portfolio .micro-note{font-size:10px;line-height:1.35}
.settings-backup-actions{display:grid;grid-template-columns:1.5fr 1fr;gap:7px;margin:9px 0}.settings-backup-actions button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:57px;padding:7px;border:1px solid #8d9a81;border-radius:8px;background:linear-gradient(#153d4b,#051521);font-size:12px;color:#e9e2c6}.settings-backup-actions .art-icon{width:27px;height:27px;flex-shrink:0}
.layout.settings .chapter-tabs{margin:0 0 9px}.layout.settings .chapter-tabs button{min-height:44px}.layout.settings .setting-row{border:1px solid #58707b;background:linear-gradient(#10293c,#040e18);border-radius:7px!important}.layout.settings .setting-row span{font-size:13px!important}.layout.settings .settings-content>.btn{min-height:44px;font-size:13px;margin:0}.layout.settings .info-card{padding:12px;margin:0;border:1px solid #726b47;background:#071726;border-radius:8px}.layout.settings .info-card p{font-size:12px;line-height:1.45;margin-top:6px}.settings-danger{border:1px solid #83514d;padding:8px;border-radius:7px;color:#e1b6a8}.settings-danger summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.settings-danger [data-action="reset"]{width:100%;min-height:44px;background:#33151c;border:1px solid #9c504c;border-radius:7px}
@media(max-height:720px){#app .layout.piano .piano-stage{min-height:210px}.voyage-dialog[data-page="events"] .event-key-art{height:160px;min-height:160px}.layout.portfolio .portfolio-chart svg{max-height:145px}.layout.portfolio .portfolio-total strong{font-size:35px}}
@media(prefers-reduced-motion:reduce){.piano-feedback.flash{animation:none;opacity:1}}
/* Passe 2 : le décor doit occuper toute la largeur du véritable panneau événement. */
.voyage-dialog[data-page="events"] .event-key-art{width:100%;max-width:none;border-radius:0;background-repeat:no-repeat}
.layout.quests>.small{font-size:10px;margin:5px 0}
.layout.quests .quest-shortcuts{margin-top:5px}
/* Dernière passe de densité : quatre catégories lisibles sur une seule rangée. */
.layout.quests .quest-tabs{grid-template-columns:repeat(4,minmax(0,1fr))}
.layout.quests .quest-tabs button{font:600 14px 'Carto Condensed',sans-serif;padding:4px 2px;white-space:normal}
.layout.portfolio .portfolio-chart svg{max-height:150px}
/* Corrections ciblées — passe 1, caméra maritime indépendante de la progression. */
.voyage-dialog[data-page="sea"] .world-map-toolbar{display:flex;align-items:center;gap:6px;padding:5px 8px;background:#081b2b;border:1px solid #b29963;border-radius:7px;margin:6px 0}
.world-map-toolbar button{min-height:44px;min-width:44px;padding:5px 9px}.world-map-toolbar output{font-size:12px;color:#f7dfa8;min-width:50px;text-align:center}.world-map-toolbar [data-world-camera="center"]{margin-left:auto}
.voyage-dialog[data-page="sea"] .world-map-viewport{height:calc(100dvh - 260px);min-height:330px;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y pinch-zoom;position:relative;border:1px solid #b69a60;border-radius:10px;scrollbar-width:thin;background:#073550}
.voyage-dialog[data-page="sea"] .world-map-viewport>.sea-atlas{width:100%;height:1040px;min-height:1040px;max-width:none;margin:0;flex-shrink:0}
/* Passe 1 — véritable plateau : les cartes et ressources du moteur restent des boutons. */
.battle-dialog:has(.battle-tabletop)>main{background:#031522 url('/assets/targeted-fixes/battle-deck-v1.jpg') center/cover;padding:5px 7px}
.battle-tabletop{position:relative;isolation:isolate;min-height:0}
.battle-dialog .battle-tabletop .battle-zone{border:0;background:transparent;box-shadow:none;border-radius:0;margin:0;padding:3px 0}
.battle-tabletop .battle-zone h3{background:#041321b8!important;border:0!important;color:#ffedb9!important;padding:3px 7px!important;border-radius:4px;font-size:10px!important}
.battle-tabletop .battle-zone>p{padding:2px 7px;background:#02111cc9;border-radius:4px;color:#c8dce8;font-size:9px!important}
.battle-dialog .battle-tabletop .battle-leader-banner{height:145px;border:1px solid #e5c47e;border-radius:10px;box-shadow:0 5px 14px #00101bb3;opacity:1}
.battle-tabletop .battle-leader-banner>span{background:linear-gradient(#00203b11,transparent 45%,#001323f5)}
.battle-dialog .battle-tabletop .battle-field{gap:5px;padding:7px 4px 10px;min-height:107px;align-items:flex-end}
.battle-dialog .battle-tabletop .battle-zone .battle-card{width:54px;min-width:54px;max-width:54px;padding:2px;border:1px solid #e0bd71;background:#04101e;box-shadow:0 3px 7px #0009;transition:transform .15s}
.battle-dialog .battle-tabletop .battle-zone .battle-card img{height:72px;width:100%;object-fit:contain}
.battle-dialog .battle-tabletop .battle-zone .leader-card{width:66px;min-width:66px;max-width:66px;border-color:#a7e4ff;box-shadow:0 0 10px #45c3ff77}
.battle-dialog .battle-tabletop .battle-zone .leader-card img{height:86px}
.battle-tabletop .player-zone .battle-card:nth-child(even){transform:rotate(3deg)}.battle-tabletop .player-zone .battle-card:nth-child(odd){transform:rotate(-3deg)}
.battle-tabletop .battle-card.selected{transform:translateY(-5px)!important;outline:2px solid #ffe5a4;outline-offset:2px}
.battle-tabletop .battle-zone .battle-card.rested{transform:rotate(15deg);opacity:.8}
.battle-tabletop .battle-resource-bar{padding:5px 8px;background:linear-gradient(90deg,#021728de,#063047bb,#021728de);border-top:1px solid #d6b56b;border-bottom:1px solid #a58b52;margin:0 -3px;min-height:52px}
.battle-tabletop .don-medallion{border-radius:50%;padding:4px 10px;box-shadow:0 0 12px #5acbff44}.battle-tabletop .don-medallion b{font-size:32px}
.battle-dialog .battle-tabletop .battle-hand{gap:5px;padding:9px 3px 12px;background:linear-gradient(transparent,#021326e8);border-top:1px solid #d3af6e;border-bottom:0}
.battle-dialog .battle-tabletop .battle-hand .battle-card{border:1px solid #cfb071;background:#041523;box-shadow:0 3px 8px #000a}
.battle-dialog .battle-tabletop .battle-hand .battle-card img{height:85px}
/* Passe 2 — priorité supérieure à l’ancien fond de duel. */
dialog.voyage-dialog.battle-dialog[data-result=""]>main:has(.battle-tabletop){background:linear-gradient(#01213b14,#00101e26),url('/assets/targeted-fixes/battle-deck-v1.jpg') center/cover}
.battle-dialog .battle-tabletop .battle-zone{background:transparent!important}
.battle-tabletop .battle-zone h3{background:linear-gradient(90deg,#00172ae6,#00172a44)!important}
.battle-tabletop .battle-zone>p{background:#00172a99}
.battle-dialog .battle-tabletop .battle-field{background:radial-gradient(ellipse at 50% 95%,#08213b55,transparent 70%);border-radius:50% 50% 10% 10%}
.battle-dialog .battle-tabletop .battle-hand .battle-card:nth-child(1){transform:rotate(-5deg)}
.battle-dialog .battle-tabletop .battle-hand .battle-card:nth-child(2){transform:rotate(-2deg)}
.battle-dialog .battle-tabletop .battle-hand .battle-card:nth-child(4){transform:rotate(2deg)}
.battle-dialog .battle-tabletop .battle-hand .battle-card:nth-child(5){transform:rotate(5deg)}
.battle-tabletop .battle-card:focus-visible{outline:3px solid #95e8ff;outline-offset:2px;transform:translateY(-4px)!important}
/* Passe 3 — cartes intégrées au portrait adverse, perspective sans perte de commandes. */
.battle-dialog .battle-tabletop .opponent-zone{display:flex;flex-direction:column}
.battle-dialog .battle-tabletop .opponent-zone .battle-leader-banner{order:0;height:165px}
.battle-dialog .battle-tabletop .opponent-zone .battle-field{order:1;margin-top:-24px;position:relative;z-index:1;justify-content:center;padding-bottom:5px}
.battle-tabletop .opponent-zone>h3{order:2;margin-top:0!important}.battle-tabletop .opponent-zone>p{order:3}
.battle-tabletop .battle-leader-banner>span{justify-content:flex-start;padding:8px;background:linear-gradient(#00182dde,transparent 65%,#00182d33)}
.battle-tabletop .battle-leader-banner strong{font-size:23px;max-width:72%;line-height:1.05}.battle-tabletop .battle-leader-banner b{top:10px;bottom:auto;font-size:13px}.battle-tabletop .battle-leader-banner small{font-size:10px;margin-top:5px}
.battle-dialog .battle-tabletop .player-zone .battle-field{justify-content:center;min-height:122px}
.battle-dialog .battle-tabletop .player-zone .leader-card{width:72px;min-width:72px;max-width:72px}.battle-dialog .battle-tabletop .player-zone .leader-card img{height:96px}
.battle-dialog .battle-tabletop .battle-card span{font-size:8px;line-height:10px}
.battle-dialog .battle-tabletop .battle-hand .battle-card b{font-size:8px;line-height:10px}.battle-dialog .battle-tabletop .battle-hand .battle-card span{font-size:7.5px}
@media(max-height:720px){.battle-dialog .battle-tabletop .opponent-zone .battle-leader-banner{height:115px}.battle-dialog .battle-tabletop .battle-zone .battle-card img{height:60px}.battle-dialog .battle-tabletop .player-zone .leader-card img{height:76px}.battle-dialog .battle-tabletop .player-zone .battle-field{min-height:100px}.battle-dialog .battle-tabletop .battle-hand .battle-card img{height:70px}}

/* The chapter objective must not push touch controls under the fixed navigation. */
.voyage-dialog[data-page=map][data-story-chapter=true] .stage-3d .voyage-map{height:calc(100dvh - 360px);min-height:240px}
