:root{--shelf-w:170px;--shelf-h:255px;--hand-card-w:104px;--hand-card-h:156px}body{overflow:hidden}#experience{height:100dvh}#scene-window:after{background:linear-gradient(0deg,#133c4144,transparent 44%)!important;pointer-events:none}header{padding:12px 24px!important;background:linear-gradient(#fff5db77,transparent)}header img{width:145px!important;height:52px!important}#table-status{top:24px!important;left:190px!important;max-width:none!important;gap:5px!important}#table-status button,#table-status span{font-size:12px;padding:7px 10px;background:#fff5e0df}#map-tools,#hotspots{display:none!important}#island-anchor{position:absolute;top:100px;left:4%;z-index:3}#island-anchor .card.cat-island{--island-w:255px;box-shadow:0 8px 30px #213f3b35}#island-anchor .card-heading strong{font-size:18px!important}#island-anchor .text{font-size:12px!important}.island-navigation{display:flex;align-items:center;gap:5px;padding:5px 3px;margin-top:7px;background:#fff5dfda;border:1px solid #e5d3a4;border-radius:6px;color:#284b3e}.island-navigation button{background:transparent;border:0;padding:5px 8px;min-width:29px;min-height:30px;font-size:13px}.island-navigation button:first-child,.island-navigation button:nth-child(3){font-size:23px;padding:0 8px}.island-navigation span{font:11px var(--sans);margin-right:6px}#shelf-market{position:absolute;right:30px;top:100px}#shelf-market button{padding:10px 14px;background:#fff3dfde;border:1px solid #cbb282;border-radius:6px;font-size:13px}#building-shelf{position:absolute;bottom:265px;left:50%;transform:translateX(-50%);max-width:calc(100% - 80px);display:flex;align-items:center;gap:16px;padding:15px 18px;background:#fbf3dfb8;backdrop-filter:blur(20px);border:1px solid #fff7e1b8;border-radius:13px;box-shadow:0 7px 28px #173c3d30}.shelf-buildings{display:flex;gap:14px;overflow-x:auto;overflow-y:hidden;padding:5px 4px 8px;max-width:calc(100vw - 200px);scrollbar-width:thin;align-items:center}.shelf-building{position:relative;flex:none}.shelf-building .card{--card-w:var(--shelf-w);--card-h:var(--shelf-h);box-shadow:0 5px 12px #123b342f}.shelf-building .card-heading strong{font-size:15px!important}.shelf-building .card .text{font-size:12px!important}.shelf-badge{position:absolute;right:6px;top:65px;background:#204e43;color:#fff3da;padding:4px 6px;font-size:10px;border-radius:4px;pointer-events:none}.shelf-build{background:#fff7e180;border:1px solid #c4ad7e;border-radius:5px;padding:11px 14px;white-space:nowrap;font-size:12px;flex:none}.empty-shelf{width:200px;min-height:95px;display:grid;align-content:center;gap:8px;text-align:center;color:#36564a}.empty-shelf>span{font:24px var(--serif)}.empty-shelf small{font:13px var(--sans)}
#turn-controls{bottom:176px!important;left:12px!important;right:12px!important;z-index:5;align-items:center;gap:8px!important}#turn-controls .phase-strip{flex-basis:auto;margin-right:12px}#turn-controls .main-action{display:flex;align-items:center;gap:6px}#turn-controls .order-icons button{width:auto;min-width:45px}footer#dock{bottom:0!important;left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:var(--hand-width)!important;max-width:calc(100% - 24px)!important;height:165px;border:0!important;border-radius:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;z-index:6;color:#fff1d5}#dock .whole-hand{position:relative;display:flex!important;justify-content:flex-start!important;align-items:flex-end!important;flex-wrap:nowrap!important;gap:0!important;overflow-x:auto!important;overflow-y:hidden!important;max-height:none!important;height:189px;padding:24px 4px 6px!important;margin-top:-24px;scrollbar-width:thin;scrollbar-color:#f2d39f55 transparent}#dock .mini-stack{position:relative;display:block;flex:0 0 var(--hand-card-w);width:var(--hand-card-w);margin-right:calc(var(--hand-step) - var(--hand-card-w));z-index:var(--hand-i);transition:transform .15s}#dock .mini-stack:last-child{margin-right:0}#dock .mini-stack:hover,#dock .mini-stack:focus-within,#dock .mini-stack:has(.peek-source){z-index:80;transform:translateY(-18px)}#dock .mini-resource,#dock .dock-mini .card{width:var(--hand-card-w)!important;min-width:var(--hand-card-w)!important;height:var(--hand-card-h)!important;border:2px solid #d4b67c!important;border-radius:7px!important;box-shadow:-3px 4px 10px #143c3966!important;cursor:pointer}#dock .dock-mini .card.painted-card{display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}#dock .dock-mini .card.painted-card .card-heading{height:auto!important;min-height:32px!important;padding:5px!important;border-bottom:1px solid #b9994d!important}#dock .dock-mini .card.painted-card .card-heading strong{display:block!important;font:12px/1.05 Georgia!important;margin:0!important;color:#fff2da!important;min-height:0!important}#dock .dock-mini .card.painted-card .card-heading .points,#dock .dock-mini .card.painted-card .card-heading .cost{display:none!important}#dock .dock-mini .card.painted-card .art{display:block!important;grid-row:2;height:100%!important;object-fit:cover!important}#dock .dock-mini .card.painted-card .text{display:none!important}#dock .dock-mini .card.cat-island{width:var(--hand-card-w)!important;height:calc(var(--hand-card-w)*2/3)!important;min-width:var(--hand-card-w)!important;align-self:flex-end}#dock .dock-mini .card.cat-island .card-heading{min-height:20px!important}#dock .stack-count{position:absolute;left:5px;bottom:6px;min-width:23px;height:23px;display:grid;place-items:center;border:1px solid #ba9958;border-radius:50%;background:#fff0ce;color:#244b3b;box-shadow:0 1px 4px #143c3955;font:bold 14px Georgia;pointer-events:none}#dock .card.buildable{outline:2px solid #e6d5a2!important;outline-offset:0!important}#card-focus{z-index:20;box-shadow:0 14px 45px #113d3977;max-height:80dvh}#card-focus .focus-moves .choice{min-height:40px}#card-focus .card{pointer-events:none}#drawer{z-index:30}#drawer::backdrop{background:#153d4255;backdrop-filter:blur(5px)}#experience.art-only #island-anchor,#experience.art-only #building-shelf,#experience.art-only #shelf-market{display:none}
@media(max-height:800px) and (min-width:701px){:root{--shelf-w:140px;--shelf-h:210px;--hand-card-w:90px;--hand-card-h:135px}#island-anchor{top:78px}#island-anchor .card.cat-island{--island-w:210px}#island-anchor .card-heading strong{font-size:15px!important}#island-anchor .text{font-size:10px!important}#building-shelf{bottom:205px}footer#dock{height:144px}#dock .whole-hand{height:168px}#turn-controls{bottom:148px!important}}
@media(max-width:700px){:root{--shelf-w:126px;--shelf-h:189px;--hand-card-w:78px;--hand-card-h:117px}header{padding:7px 12px!important}header img{width:105px!important;height:40px!important}header button{font-size:11px!important;padding:7px!important}#table-status{top:14px!important;left:125px!important;right:65px;flex-wrap:wrap;font-size:9px;gap:3px!important}#table-status span,#table-status button{font-size:10px;padding:4px 6px}#table-status button[data-ui=goals]{display:none}#island-anchor{top:72px;left:15px}#island-anchor .card.cat-island{--island-w:185px}#island-anchor .card-heading strong{font-size:14px!important}#island-anchor .text{font-size:10px!important}.island-navigation{gap:0;padding:0;margin-top:5px}.island-navigation span{font-size:9px}.island-navigation button{padding:3px 6px;min-width:25px;font-size:11px}#shelf-market{top:78px;right:14px}#shelf-market button{padding:7px 9px;font-size:11px}#building-shelf{bottom:230px;padding:8px;gap:8px;max-width:calc(100% - 24px);flex-direction:column}.shelf-buildings{gap:10px;max-width:calc(100vw - 44px);padding:3px 2px 6px}.shelf-building .card-heading strong{font-size:12px!important}.shelf-building .card .text{font-size:10px!important}.shelf-building .cost-picture{width:19px;height:18px}.shelf-build{padding:6px 12px;font-size:11px}.empty-shelf{min-height:70px;width:230px}.empty-shelf>span{font-size:21px}#turn-controls{bottom:130px!important;gap:5px!important;left:8px!important;right:8px!important}#turn-controls .phase-strip{flex-basis:100%;margin:0}#turn-controls .phase-strip span{font-size:10px;padding:4px 6px}footer#dock{height:124px}#dock .whole-hand{height:148px}#dock .dock-mini .card.painted-card .card-heading strong{font-size:10px!important}#dock .dock-mini .card.painted-card .card-heading{min-height:27px!important;padding:4px!important}#dock .stack-count{width:20px;height:20px;min-width:20px;font-size:12px}#card-focus{max-height:72dvh}#drawer.island-panel .island-table-card{display:none}}
@media(max-height:740px) and (max-width:700px){:root{--shelf-w:100px;--shelf-h:150px}#island-anchor .card.cat-island{--island-w:155px}#island-anchor .text{display:none!important}#building-shelf{bottom:212px;padding:6px}.shelf-building .card .text{font-size:9px!important}.shelf-build{padding:4px 9px}#turn-controls{bottom:126px!important}.shelf-building .card-heading strong{font-size:10px!important}}
@media(prefers-reduced-motion:reduce){#dock .mini-stack{transition:none}}
#experience #turn-controls{transform:none!important;width:auto!important;max-width:none!important;display:flex!important;justify-content:center!important}
#turn-controls .order-icons button{display:flex;align-items:center;gap:5px;padding:5px 10px!important}#turn-controls .order-icons button span{font-size:12px}#turn-controls .order-icons .symbol{width:20px;height:20px}@media(max-width:700px){#turn-controls .order-icons button{padding:4px 6px!important}#turn-controls .order-icons button span{font-size:10px}#turn-controls .order-icons .symbol{width:16px;height:16px}}
@media(min-height:741px) and (max-width:700px){#building-shelf{bottom:248px}}
#building-shelf{backdrop-filter:none;background:#f5efdfeb}
/* Keep navigation beside the island and reserve a quiet, full-width hand area. */
:root{--bottom-bar-height:230px}
#bottom-bar{position:absolute;left:0;right:0;bottom:0;height:var(--bottom-bar-height);background:#f3ecdd;border-top:1px solid #d0ba93;box-shadow:0 -6px 24px #173d3420;z-index:6;color:#284b3e}
#bottom-bar #turn-controls{bottom:176px!important}#bottom-bar .phase-strip{color:#284b3e;text-shadow:none}#bottom-bar .phase-strip span{background:none;border-color:transparent;color:#496052}#bottom-bar .phase-strip .current{background:#dfcfae;border-color:#bba070;color:#284b3e}#bottom-bar .captain-turn{background:#e0d7c4;color:#284b3e}#bottom-bar #dock{color:#284b3e}
#building-shelf{bottom:calc(var(--bottom-bar-height) + 18px)!important}
#island-anchor{display:grid;grid-template-columns:32px auto 32px;align-items:center;gap:7px;left:18px}
#island-anchor .island-arrow{width:32px;height:44px;padding:0;border:1px solid #c3ad83;border-radius:18px;background:#fcf4e3e8;color:#335548;font:28px Georgia;box-shadow:0 2px 8px #24483d22}
#island-anchor .island-position{position:absolute;right:0;top:calc(50% + 29px);width:32px;padding:4px 0;border:0;border-radius:10px;background:#fcf4e3d9;color:#335548;font:11px var(--sans)}
#experience.art-only #bottom-bar{display:none}
@media(max-height:800px) and (min-width:701px){:root{--bottom-bar-height:205px}#bottom-bar #turn-controls{bottom:148px!important}}
@media(min-width:701px) and (max-width:1050px){#island-anchor{top:80px}#island-anchor .card.cat-island{--island-w:210px}}
@media(max-width:700px){:root{--bottom-bar-height:235px}#island-anchor{left:8px;grid-template-columns:27px auto 27px;gap:4px}#island-anchor .island-arrow{width:27px;height:40px}#island-anchor .island-position{width:27px;font-size:10px}#bottom-bar #turn-controls{bottom:130px!important}#shelf-market{top:78px;right:9px}#shelf-market button{font-size:10px;padding:6px}#island-anchor .card.cat-island{--island-w:175px}}
@media(max-height:740px) and (max-width:700px){:root{--bottom-bar-height:225px}#island-anchor .card.cat-island{--island-w:145px}#bottom-bar #turn-controls{bottom:126px!important}}
/* Compact built cards and hand share the bottom bar. */
:root{--bottom-bar-height:225px;--hand-card-w:90px;--hand-card-h:135px}
#bottom-bar{display:flex;flex-direction:column;padding:12px 20px 0}
#bottom-bar #turn-controls{position:relative!important;inset:auto!important;bottom:auto!important;left:auto!important;right:auto!important;flex:none;min-height:40px;margin-bottom:9px}
#card-rows{display:grid;grid-template-columns:minmax(0,38fr) minmax(0,62fr);gap:24px;min-height:0;flex:1}
#bottom-bar #building-shelf{position:relative;inset:auto!important;bottom:auto!important;left:auto!important;transform:none;max-width:none;min-width:0;width:auto;background:none;border:0;border-right:1px solid #c2ae862f;border-radius:0;box-shadow:none;padding:20px 12px 0 0;gap:10px;align-items:flex-end;overflow:visible;flex-direction:row}
#building-shelf:before{content:'ON THIS ISLAND';position:absolute;top:0;left:0;font:10px var(--sans);letter-spacing:1.7px;color:#64715e}
#building-shelf .shelf-buildings{max-width:100%;min-width:0;padding:16px 5px 8px;margin-top:-16px;gap:0;align-items:flex-end;flex:1;overflow:auto}
#building-shelf .shelf-building{margin-right:-22px;position:relative;transition:transform .15s}
#building-shelf .shelf-building:last-child{margin-right:0}
#building-shelf .shelf-building:hover,#building-shelf .shelf-building:focus-within,#building-shelf .shelf-building:has(.peek-source){z-index:80;transform:translateY(-10px)}
#building-shelf .shelf-building .card{--card-w:86px;--card-h:129px}
#building-shelf .shelf-building .card .card-heading{padding:4px!important;min-height:30px!important}
#building-shelf .shelf-building .card .card-heading strong{font-size:10px!important;margin:0!important;min-height:0!important}
#building-shelf .shelf-building .card .text,#building-shelf .shelf-building .card .cost,#building-shelf .shelf-building .card .points{display:none!important}
#building-shelf .shelf-badge{top:auto;bottom:6px;right:4px;left:4px;font-size:8px;padding:3px;pointer-events:none}
#building-shelf .shelf-build{padding:7px 9px;font-size:10px;margin-bottom:12px}
#building-shelf .empty-shelf{width:auto;min-height:110px;flex:1;text-align:left;padding-left:10px}
#building-shelf .empty-shelf span{font:15px var(--serif);opacity:.65}
#bottom-bar footer#dock{position:relative;inset:auto!important;bottom:auto!important;left:auto!important;right:auto!important;transform:none!important;width:100%!important;max-width:100%!important;height:auto;padding:20px 0 0!important;min-width:0;align-self:stretch}
#dock:before{content:'YOUR HAND';position:absolute;top:0;left:0;font:10px var(--sans);letter-spacing:1.7px;color:#64715e}
#bottom-bar #dock .whole-hand{height:155px;margin-top:-16px;padding:16px 4px 6px!important;align-items:flex-end!important}
@media(max-width:700px){:root{--bottom-bar-height:320px;--hand-card-w:78px;--hand-card-h:117px}
#bottom-bar{padding:7px 12px 0}#bottom-bar #turn-controls{min-height:68px;margin-bottom:5px;gap:4px!important}
#card-rows{grid-template-columns:minmax(0,1fr);grid-template-rows:105px minmax(0,1fr);gap:5px}
#bottom-bar #building-shelf{padding:15px 0 0;border-right:0;border-bottom:1px solid #c2ae862f;gap:7px}
#building-shelf:before,#dock:before{font-size:8px;letter-spacing:1.3px}
#building-shelf .shelf-building .card{--card-w:57px;--card-h:85.5px}
#building-shelf .shelf-building{margin-right:-12px}
#building-shelf .shelf-building .card .card-heading strong{font-size:8px!important}
#building-shelf .shelf-building .card .card-heading{min-height:23px!important;padding:3px!important}
#building-shelf .empty-shelf{min-height:75px}
#building-shelf .shelf-badge{font-size:6px;padding:2px}
#building-shelf .shelf-build{font-size:10px;padding:6px 9px;margin-bottom:10px}
#bottom-bar footer#dock{padding:15px 0 0!important}
#bottom-bar #dock .whole-hand{height:137px;margin-top:-16px;padding-top:16px!important}
}
@media(max-height:740px) and (max-width:700px){:root{--bottom-bar-height:300px;--hand-card-h:100px}#card-rows{grid-template-rows:100px minmax(0,1fr)}#bottom-bar #dock .whole-hand{height:120px}}
@media(prefers-reduced-motion:reduce){#building-shelf .shelf-building{transition:none}}
#building-shelf .shelf-build{position:absolute;top:-3px;right:12px;margin:0;padding:3px 7px;background:#f8f1e3;font-size:9px;z-index:2}
#building-shelf .shelf-buildings{flex:1;width:100%}
@media(max-width:700px){#building-shelf .shelf-build{top:-3px;right:0;padding:2px 7px;font-size:9px}}
@media(max-width:700px){#bottom-bar #turn-controls .phase-strip{flex-basis:auto;gap:3px;margin-right:5px}#bottom-bar #turn-controls .prep-icons{gap:3px}#bottom-bar #turn-controls .prep-icons button{width:27px;height:28px;font-size:16px!important}#bottom-bar #turn-controls .order-icons{justify-content:center}#bottom-bar #turn-controls{align-content:center;min-height:68px}#bottom-bar .phase-strip span{font-size:9px!important;padding:3px 4px!important}}
@media(min-height:741px) and (max-width:700px){:root{--bottom-bar-height:334px}}
/* Keep treetops and summits: crop foreground water before the top of the island.
   Current and outgoing development/fort paintings must share identical framing. */
#scene-window{bottom:var(--bottom-bar-height)}
#scene-frame{inset:0!important;transform:none!important;width:100%!important;height:100%!important}
#painting,.scenery-previous{width:100%;height:100%;object-fit:cover;object-position:center top}
#experience.art-only #scene-window{bottom:0}
#scene-window:after{background:linear-gradient(#fff3d522,transparent 24%)!important}

/* The landscape is the island; navigation and rules sit directly over it. */
#island-anchor{display:block;top:100px;left:4%;right:150px;max-width:760px;color:#fff8e8;text-shadow:0 2px 9px #071e29;isolation:isolate}
#island-anchor:before{content:'';position:absolute;inset:-24px -35px -25px;z-index:-1;background:radial-gradient(ellipse at 30% 35%,#102e3bd9, #102e3b85 55%,transparent 75%);pointer-events:none}
.shore-tabs{display:flex;gap:24px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:thin;scrollbar-color:#fff7dc88 transparent}
#island-anchor .shore-tabs button{flex:none;background:none;border:0;border-bottom:2px solid transparent;border-radius:0;padding:7px 0;color:#fff5dc;font:22px var(--serif);text-shadow:inherit;opacity:.75;white-space:nowrap}
#island-anchor .shore-tabs button[aria-current]{opacity:1;border-bottom-color:#ecd49e}
#island-anchor .shore-tabs button:hover{opacity:1}
#island-anchor button:focus-visible{outline:2px solid #ffe2a2;outline-offset:4px}
.shore-details{max-width:470px}.shore-plots{font:12px var(--sans);letter-spacing:.6px;margin:6px 0 10px}.shore-description{font:18px/1.45 var(--serif);margin:0}
#island-anchor .shore-inspect{border:0;background:none;color:#fff0ca;padding:10px 0;font:11px var(--sans);text-shadow:inherit;text-decoration:underline;text-underline-offset:3px}
#island-anchor .shore-picker{display:none}
@media(max-width:700px){#island-anchor{top:80px;left:20px;right:90px;max-width:none}.shore-tabs{display:none}#island-anchor .shore-picker{display:block;text-align:left;border:0;background:none;color:#fff8e8;padding:4px 0 8px;font:30px/1.12 var(--serif);text-shadow:inherit}.shore-picker span{font-size:19px;margin-left:5px}.shore-plots{font-size:11px;line-height:1.5;margin:2px 0 7px}.shore-description{font-size:16px;line-height:1.35}#island-anchor:before{inset:-14px -26px -16px}}
@media(max-height:600px){#island-anchor{top:70px}.shore-description{font-size:13px}.shore-plots{margin:0 0 4px}#island-anchor .shore-inspect{padding:5px 0}.shore-tabs{padding-bottom:4px}#island-anchor .shore-tabs button{font-size:19px}}
#island-anchor:before{border-radius:50%;filter:blur(18px)}
/* A quiet, persistent public-action feed above the hand. */
#opponent-activity{position:absolute;bottom:calc(var(--bottom-bar-height) + 12px);left:24px;max-width:560px;right:24px;z-index:5;display:flex;align-items:stretch;border:1px solid #fff3d559;border-radius:9px;background:#173c45ed;box-shadow:0 3px 18px #102b3433;color:#fff5dd}
#opponent-activity button{border:0;background:none;color:inherit;text-align:left;border-radius:7px}
.activity-captain{font:12px var(--sans);border-right:1px solid #fff3d529!important;flex:none;padding:12px}
.activity-summary{padding:10px 13px;display:grid;gap:4px;flex:1;font:14px/1.35 var(--serif)}.activity-label{font:9px var(--sans);text-transform:uppercase;letter-spacing:1px;color:#e0c896}.activity-more{font:10px var(--sans);color:#e0c896}
#opponent-activity button:focus-visible{outline:2px solid #ffe0a1;outline-offset:2px}
.activity-history{padding:0;list-style:none}.activity-history li{padding:13px 0;border-bottom:1px solid #bda47d55}.activity-history small{display:block;font:10px var(--sans);color:#6a7568}.activity-history button{margin-top:5px;background:none;border:0;padding:0;color:#285446;text-decoration:underline;font:13px var(--sans)}.activity-history p{margin:6px 0 0;font:15px/1.5 var(--serif)}
#experience.art-only #opponent-activity{display:none}
@media(max-width:700px){#opponent-activity{left:10px;right:10px;bottom:calc(var(--bottom-bar-height) + 8px)}.activity-summary{font-size:12px;padding:8px 10px;gap:3px}.activity-captain{padding:8px;font-size:11px}.activity-label{font-size:8px}.activity-more{font-size:9px}}
/* Activity is fleeting; history and the way home stay in place. */
#opponent-activity{display:flex;flex-direction:column;align-items:flex-start;gap:6px;pointer-events:none;background:none;border:0;box-shadow:none}
#opponent-activity button{pointer-events:auto}
.activity-flash{display:flex;width:100%;border:1px solid #fff3d559;border-radius:9px;background:#173c45ed;box-shadow:0 3px 18px #102b3433;animation:activity-fade 5s both}
.activity-flash[hidden]{display:none}
.activity-controls{display:flex;align-items:stretch;gap:6px;max-width:100%}
#opponent-activity .activity-history-button,#opponent-activity .activity-visiting{background:#173c45ed;border:1px solid #fff3d559;border-radius:7px;padding:9px 12px;box-shadow:0 2px 10px #102b3422;font:11px var(--sans)}
#opponent-activity .activity-visiting{border-color:#e7ce93;display:grid;gap:4px}
.activity-visiting small{font-size:10px;color:#f4d89e}
@keyframes activity-fade{0%,90%{opacity:1}100%{opacity:0}}
@media(max-width:700px){#opponent-activity .activity-history-button,#opponent-activity .activity-visiting{padding:8px 10px;font-size:10px}.activity-visiting small{font-size:9px}}
@media(prefers-reduced-motion:reduce){.activity-flash{animation:none}}
/* One compact row: opponent activity left, History at the right edge. */
#opponent-activity{flex-direction:row;align-items:stretch;max-width:none}
.activity-controls{display:contents}
.activity-flash{width:auto;min-width:0;max-width:560px;flex:1}
#opponent-activity .activity-history-button{margin-left:auto;flex:none;align-self:stretch;display:flex;align-items:center}
#opponent-activity .activity-visiting{max-width:calc(100% - 76px)}
.activity-summary{min-width:0}
.secret-goal-choices .cat-goal{--card-w:210px;--card-h:315px}
@media(max-width:700px){.activity-flash .activity-label{display:none}.activity-summary{padding:8px;font-size:12px}.activity-captain{max-width:90px;overflow-wrap:anywhere}.secret-goal-choices .cat-goal{--card-w:210px;--card-h:315px}}
/* A compact visual exchange, composed before it is sent. */
.trade-partners{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}
.trade-partners button{flex:1;padding:10px 8px;background:#f4e8d0;border:1px solid #c7b18a;border-radius:7px;font:12px var(--sans)}
.trade-partners button[aria-pressed=true]{background:#254e50;color:#fff4dc;border-color:#254e50}
.trade-picker{border:0;padding:0;margin:0 0 14px;min-width:0}
.trade-picker legend{font:12px var(--sans);margin-bottom:7px;color:#596557}
.trade-picker>div{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.trade-picker button{position:relative;display:flex;align-items:center;justify-content:center;gap:5px;padding:8px 3px;border:1px solid #cbb995;border-radius:8px;background:#fffaed;min-height:54px}
.trade-picker button img{width:34px;height:34px;object-fit:contain}
.trade-picker button small{font:bold 15px var(--serif)}
.trade-picker button[aria-pressed=true]{outline:2px solid #326568;outline-offset:1px;background:#e2e9df}
.trade-picker button:disabled{opacity:.3;cursor:not-allowed}
.trade-exchange{display:flex;align-items:center;justify-content:center;gap:24px;padding:15px;border:1px solid #d1b98c;border-radius:12px;background:#efe1c5;margin-top:16px}
.trade-tile{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;gap:5px 10px}
.trade-tile>span{grid-column:1/-1;text-align:center;font:11px var(--sans);color:#576357}
.trade-tile img{width:56px;height:56px;object-fit:contain}
.trade-tile strong{font:32px var(--serif)}
.trade-arrow{font:28px var(--serif);color:#8b754d}
.trade-note{text-align:center;font:12px/1.45 var(--sans);margin:12px 0;color:#596557}
.trade-confirm{width:100%;min-height:46px}
.trade-response{display:flex;gap:10px;margin-top:18px}.trade-response button{flex:1;text-align:center}
.trade-response button:first-child:not(:only-child){background:#254e50;color:#fff4dc}
@media(max-width:420px){.trade-picker>div{gap:5px}.trade-picker button{flex-direction:column;gap:0;padding:5px 2px}.trade-picker button img{width:30px;height:30px}.trade-exchange{gap:18px;padding:12px}.trade-tile img{width:44px;height:44px}.trade-partners{margin-bottom:14px}}
/* Public scores are shown on demand; private cards belong to the current seat. */
.scoreboard{color:#25473c;padding:12px 10px 4px}.scoreboard .score-captains{flex-wrap:wrap;gap:14px}.scoreboard .score-captains button{min-width:110px;flex:1}.scoreboard .fortune-track{margin-top:18px}
.score-captains{display:flex;justify-content:space-between;gap:8px}.score-captains button{background:none;border:0;border-left:3px solid var(--flag);padding:0 6px;text-align:left;display:grid;gap:2px;color:#26473e;font:12px var(--sans)}.score-captains small{font-size:10px;white-space:nowrap}.fortune-track{position:relative;height:53px;margin:3px 9px 0;border-top:1px solid #b3a485}.track-start,.track-target{position:absolute;top:0;font:9px var(--sans);white-space:nowrap}.track-start{left:0}.track-target{transform:translateX(-100%)}.ship-position{position:absolute;left:0;right:0;height:12px;pointer-events:none}.score-ship{position:absolute;transform:translate(-50%,-50%);width:22px;height:19px}.score-ship svg{width:100%;height:100%;fill:var(--flag);stroke:#fff2d9;stroke-width:1}.stored-wake{position:absolute;top:0;border-top:2px dashed var(--flag);height:1px}.stored-wake i{position:absolute;right:0;top:-4px;width:6px;height:6px;border:1px solid var(--flag);border-radius:50%;background:#fff3dc}
#table-status{display:none!important}#island-anchor{top:100px;right:150px}.claims-heading{font:17px var(--serif);margin-bottom:8px}.claims-heading small{font:10px var(--sans);margin-left:6px;color:#667464}.claims-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.public-claim{min-width:0}.public-claim h3{font:16px var(--serif);display:flex;justify-content:space-between;gap:5px;margin:0 0 4px}.public-claim h3 b{white-space:nowrap;color:#87612f}.public-claim p{font:11px/1.3 var(--sans);margin:0 0 8px;min-height:28px}.claim-runner{display:grid;grid-template-columns:60px 1fr 24px;align-items:center;gap:5px;font:10px var(--sans);margin:5px 0}.claim-runner>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.claim-runner progress{appearance:none;width:100%;height:5px;border:0;border-radius:5px;overflow:hidden;background:#d8d0bb;accent-color:var(--flag)}.claim-runner progress::-webkit-progress-bar{background:#d8d0bb}.claim-runner progress::-webkit-progress-value{background:var(--flag)}.claim-runner progress::-moz-progress-bar{background:var(--flag)}.claim-runner small{text-align:right;font-size:9px}
.captain-portrait{width:54px;height:54px;border-radius:50%;object-fit:cover;object-position:50% 25%;border:2px solid #bc9b61}.pirate-targets{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}.pirate-rival{padding:12px;border:1px solid #cbb789;border-radius:9px;background:#f3e6cc}.pirate-rival-title{display:flex;align-items:center;gap:10px;margin-bottom:12px}.pirate-rival .choice{display:block;width:100%;margin-top:7px}.pirate-everyone{grid-column:1/-1}.pirate-everyone button{width:100%;text-align:center}.raid-choices p{font:12px var(--sans);text-align:center}.plan-lock{position:absolute;z-index:3;right:6px;bottom:48px;background:#f5ead2eF;border-radius:50%;padding:4px;font-size:16px}.lock-reason{font:12px/1.4 var(--sans);padding:8px 0;margin:0}.mini-stack .plan-lock{right:2px;bottom:3px;padding:2px;font-size:11px}.hidden-hand{font:13px var(--sans);padding:20px;color:#456052}
#handoff[hidden]{display:none}#handoff{position:fixed;inset:0;z-index:1000;background:#173e43;display:grid;place-items:center;color:#fff0d7;text-align:center;padding:24px}#handoff>div{max-width:400px}#handoff h1{font:36px var(--serif)}#handoff p{font:15px/1.5 var(--sans)}#handoff .captain-portrait{width:100px;height:100px}#handoff a{display:block;color:inherit;margin-top:22px;font:13px var(--sans)}#handoff .primary{background:#f2e2c0;color:#234c42}
.setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}#voyage-setup label{display:grid;gap:5px;font:13px var(--sans)}#voyage-setup input:not([type=checkbox]),#voyage-setup select{width:100%;min-width:0;border:1px solid #baa57e;border-radius:6px;background:#fff8e9;padding:10px;font:16px var(--sans);box-sizing:border-box}.setup-names{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:16px 0}.setup-target{max-width:160px;margin:12px 0}#voyage-setup .setup-climb{display:flex;align-items:center;gap:8px;margin-top:18px}.setup-climb input{width:20px;height:20px}#voyage-setup .primary{width:100%;margin-top:10px}#setup-error{color:#963f32}
@media(max-width:700px){.score-captains{overflow-x:auto;gap:10px}.score-captains button{font-size:10px;flex:none;padding:0 4px}.score-captains small{font-size:9px}.fortune-track{height:48px}#island-anchor{top:78px;left:16px;right:80px}.shore-description{font-size:13px;line-height:1.3}.shore-plots{font-size:10px}#island-anchor .shore-picker{font-size:25px;padding-bottom:4px}#island-anchor .shore-inspect{padding:5px 0;font-size:10px}#shelf-market{top:78px}.claims-row{gap:12px}.claims-heading{font-size:13px;margin-bottom:6px}.claims-heading small{font-size:9px}.public-claim h3{font-size:13px}.public-claim p{font-size:10px;min-height:26px;margin-bottom:5px}.claim-runner{grid-template-columns:45px 1fr 20px;font-size:9px;gap:3px;margin:4px 0}.claim-runner small{font-size:8px}.pirate-targets{grid-template-columns:1fr}.setup-names{grid-template-columns:1fr 1fr}}
@media(max-height:700px) and (min-width:701px){#island-anchor{top:78px}}

/* Claims live in the bottom bar, leaving the landscape clear. */
#table-tools{position:absolute;right:18px;top:12px;display:flex;gap:6px;z-index:8}
#table-tools button{border:1px solid #bcaa85;border-radius:6px;background:#f9f1df;color:#294e43;font:11px var(--sans);padding:7px 9px}
#drawer .claims-row{gap:20px}#drawer .public-claim h3{font-size:20px}#drawer .public-claim p{font-size:13px;min-height:38px}#drawer .claim-runner{grid-template-columns:80px 1fr 30px;font-size:12px;margin:12px 0}#drawer .claim-runner small{font-size:11px}
@media(max-width:700px){#table-tools{right:10px;top:78px;gap:5px}#table-tools button{font-size:10px;padding:5px 8px}#drawer .claims-row{grid-template-columns:1fr;gap:22px}#drawer .public-claim p{min-height:0}#drawer .claim-runner{grid-template-columns:95px 1fr 32px}}

.captain-name-field{display:flex;align-items:center;gap:7px}.captain-name-field>span{flex:none;color:#655238}
/* Keep primary actions readable when the choice-list surface overrides button backgrounds. */
#drawer .choice-list>button.primary{background:#254e50;color:#fff4dc;border-color:#254e50;text-shadow:none}
#drawer .choice-list>button.primary:hover{background:#193c3e;color:#fff4dc}
#drawer .choice-list>button:focus-visible{outline:3px solid #976323;outline-offset:3px}

.unavailable-order{display:inline-grid;justify-items:center;gap:4px;max-width:118px;vertical-align:top}.unavailable-order small{font:10px/1.3 var(--sans);color:#294e43;text-align:center}.unavailable-order button:disabled{opacity:1;filter:grayscale(1);color:#626b64!important;background:#e0e3db!important;box-shadow:none!important;cursor:not-allowed}.action-grid .unavailable-order{max-width:none}

#drawer .public-claim{display:flex;flex-direction:column;align-items:stretch;gap:4px}#drawer .public-claim .card{width:220px;height:330px;max-width:100%;align-self:center;margin:0 0 14px;box-sizing:border-box;text-align:left;cursor:default}#drawer .public-claim .claim-runner{grid-template-columns:75px 1fr 30px}#drawer .public-claim .card .text{font-size:14px}

.score-evidence{display:grid;gap:12px;margin:20px 0}.captain-score{border:1px solid #c7b68e;border-radius:10px;padding:12px;background:#fff9ec;color:#263e39}.captain-score>summary{cursor:pointer;display:flex;justify-content:space-between;gap:12px;font-size:16px}.captain-score>summary:before{content:'▸'}.captain-score[open]>summary:before{content:'▾'}.captain-score>summary>span{flex:1}.score-source{display:flex;gap:12px;justify-content:space-between;padding:8px 0;border-bottom:1px solid #ded1b6}.score-source>strong{white-space:nowrap}.score-source small{display:block;font-size:12px;line-height:1.4;color:#4a5b51;margin-top:3px}.scoring-cards{display:flex;gap:14px;overflow-x:auto;padding:7px 2px 12px}.scoring-cards .card{--card-w:180px;--card-h:270px;flex:none}.scoring-stack{display:grid;gap:8px;flex:none;width:180px}.scoring-stack>b{font-size:13px;text-align:center}.score-store{padding:8px 0;border-bottom:1px solid #ded1b6}.score-store>p{font-size:13px;line-height:1.4}.tucked-cards{display:flex;padding:6px 0 8px;overflow-x:auto}.tucked-cards .card.resource{width:65px!important;min-width:65px!important;height:98px!important;border:1px solid #af945c;border-radius:5px;position:relative;flex:none;margin-right:-20px}.tucked-cards .card.resource:last-child{margin-right:0}.tucked-cards .card.resource:hover{z-index:1;transform:translateY(-4px)}

/* Fortune earned: a transient top-layer card, landing in the existing Scores control. */
.fortune-reward{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;border:0;padding:0;background:radial-gradient(ellipse at center,#183c4933,transparent 65%);color:#fff1ce;overflow:visible;pointer-events:none;display:grid;align-content:center;justify-items:center;gap:18px;z-index:2000}.fortune-reward::backdrop{background:transparent;pointer-events:none}.fortune-reward:not(:popover-open):not(.fortune-reward-fallback){display:none}.fortune-reward-cards{display:flex;gap:14px;transform-origin:center;filter:drop-shadow(0 15px 28px #0b252c88)}.fortune-reward-stack{position:relative}.fortune-reward .card{--reward-card-width:min(230px,40vw,calc((100dvh - 110px)*2/3));width:var(--reward-card-width)!important;min-width:0!important;height:calc(var(--reward-card-width)*1.5)!important;--card-w:230px;--card-h:345px}.fortune-reward-caption{margin:0;padding:9px 16px;border:1px solid #ead28c;border-radius:20px;background:#173c47f5;font:600 17px/1.3 var(--sans);text-align:center;max-width:90vw;text-shadow:0 1px #000}.fortune-reward-count{position:absolute;right:-8px;bottom:-8px;background:#fff0c0;border:2px solid #a9782c;color:#4c3218;padding:4px 10px;border-radius:20px;font:bold 20px Georgia;box-shadow:0 2px 8px #0005}[data-score-target]{display:inline-block;border-radius:5px;transform-origin:center;padding:1px 3px}@media(max-width:500px){.fortune-reward-cards{gap:10px}.fortune-reward-caption{font-size:14px}.fortune-reward .card.painted-card.fortune-card .card-heading{padding:8px 39px 8px 7px;min-height:47px}.fortune-reward .card.painted-card.fortune-card .card-heading strong{font-size:18px!important}.fortune-reward .fortune-value{width:31px;height:31px;right:4px;font-size:24px}}

/* A quiet, fixed seating order; the gold ring follows the active turn. */
#turn-order{position:absolute;z-index:7;top:9px;left:50%;transform:translateX(-50%);max-width:calc(100% - 370px);padding:3px 10px 4px;border-radius:22px;background:#173c43c9;backdrop-filter:blur(8px);color:#fff2d9;font:11px var(--sans)}
#turn-order ol{display:flex;align-items:center;justify-content:center;list-style:none;padding:0;margin:0;gap:6px}#turn-order li{display:flex;align-items:center;min-width:0}#turn-order li+li:before{content:'›';color:#e0d4b69c;margin-right:6px}#turn-order button{display:flex;align-items:center;gap:5px;min-width:0;border:0;border-radius:18px;padding:3px;background:transparent;color:#d7ddd8;font:11px var(--sans);cursor:pointer}#turn-order img{width:27px;height:27px;flex:none;object-fit:cover;object-position:50% 25%;border:2px solid transparent;border-radius:50%;opacity:.65}#turn-order button span{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#turn-order button[aria-current] img{border-color:#f1c66f;box-shadow:0 0 0 2px #e8ba5433;opacity:1}#turn-order button[aria-current]{color:#fff0c5}#turn-order button:hover img,#turn-order button:focus-visible img{opacity:1}#turn-order button:focus-visible{outline:2px solid #fff0c5;outline-offset:1px}#turn-order p{margin:0;text-align:center;font-size:9px;line-height:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}#experience.art-only #turn-order{display:none}
@media(max-width:1050px){#turn-order button span{display:none}#turn-order{max-width:calc(100% - 260px)}}
@media(max-width:700px){#turn-order{top:5px;padding:2px 5px 3px;max-width:calc(100% - 128px);left:calc(50% + 12px)}#turn-order img{width:25px;height:25px}#turn-order ol{gap:0}#turn-order li+li:before{margin-right:0;font-size:10px}#turn-order button{padding:2px}header img{width:83px!important;object-fit:contain}header #menu span{display:none}}

.claim-reward{inset:0;margin:auto;transform:none;width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;padding:24px;text-align:center;border:2px solid #d8b365;border-radius:18px;background:#173e43;color:#fff0d3;box-shadow:0 20px 80px #071f2c80}.claim-reward::backdrop{background:#102c3980;backdrop-filter:blur(5px)}.claim-reward h2{font:25px/1.15 var(--serif);margin:0 0 18px}.claim-reward-card{display:flex;justify-content:center}.claim-reward-card .card{--card-w:min(210px,48vw,calc((100dvh - 250px)*2/3));--card-h:calc(var(--card-w)*1.5);text-align:left;pointer-events:none}.claim-reward-points{font:bold 25px var(--serif);color:#f4d184;margin:16px 0 6px}.claim-reward-detail{font:13px/1.4 var(--sans);margin:0 0 16px}.claim-reward .primary{background:#f0d69b;color:#183c40;border:1px solid #e8c779;min-height:44px;width:100%;font-weight:bold}.claim-reward .primary:focus-visible{outline:2px solid white;outline-offset:3px}

/* Swipe the landscape; card rows retain their own scrolling gestures. */
#scene-window,#island-anchor{touch-action:pan-y pinch-zoom}#painting{user-select:none;-webkit-user-drag:none}.island-carousel-heading{display:flex;align-items:center;gap:10px;max-width:100%}.island-carousel-heading h2{font:28px/1.15 var(--serif);margin:0;min-width:0}.island-carousel-heading button{flex:none;width:36px;height:40px;padding:0;border:1px solid #fff0c966;border-radius:20px;background:#173d4480;color:#fff3d7;font:29px/1 Georgia;cursor:pointer}.island-dots{display:flex;gap:2px;flex-wrap:wrap;margin:4px 0 2px}.island-dots button{width:26px;height:24px;display:grid;place-items:center;border:0;background:transparent;padding:0;cursor:pointer}.island-dots span{width:6px;height:6px;border:1px solid #fff1cd;border-radius:50%;background:#173d4480}.island-dots [aria-current] span{background:#f6d58f;border-color:#f6d58f;box-shadow:0 0 0 2px #f6d58f33}@media(max-width:700px){.island-carousel-heading{gap:7px}.island-carousel-heading h2{font-size:25px}.island-carousel-heading button{width:30px;height:36px}}

/* Transient feedback stays readable above a modal card drawer. */
#toast[popover]{inset:auto;left:50%;top:24px;margin:0;border:1px solid #d8b365;width:max-content;max-width:90vw;box-shadow:0 4px 24px #071f2c66}#toast::backdrop{background:transparent;pointer-events:none}
/* Bundle trades use the same painted resource cards as the hand. */
.trade-partners button{display:flex;align-items:center;gap:7px}.trade-partners button img{width:28px;height:28px;object-fit:cover;border-radius:50%}.trade-bundles{display:grid;grid-template-columns:1fr 1fr;gap:22px}.bundle-title{display:flex;align-items:baseline;justify-content:space-between;gap:8px}.bundle-title h3{font:22px var(--serif);margin:14px 0 4px}.bundle-title span{font-size:11px}.bundle-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.bundle-slot{min-width:0;text-align:center}.trade-resource-card{display:block;width:100%;aspect-ratio:2/3;object-fit:cover;border:1px solid #b98d40;border-radius:5px}.bundle-slot.chosen .trade-resource-card{outline:2px solid #c7983a;outline-offset:1px}.bundle-stepper{display:flex;align-items:center;justify-content:space-between;margin-top:6px;border:1px solid #bca674;border-radius:5px;background:#fff4de}.bundle-stepper button{border:0;background:transparent;min-width:0;padding:0;width:24px;height:36px;color:#204e43;font-size:19px}.bundle-stepper output{font-weight:bold;font-size:13px;color:#204e43}.bundle-slot small{font-size:10px}.bundle-resource{display:inline-flex;align-items:center;gap:4px;font-size:20px;margin:4px}.bundle-resource .cost-picture{width:30px;height:30px}.trade-exchange>div{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:5px}.trade-exchange>div>small{width:100%;font-size:12px}.bank-rule{padding:14px;border:1px solid #bca674;background:#f1e4c9;border-radius:8px;margin:16px 0}.bank-rule strong{font:24px var(--serif)}.bank-rule p,.bank-shortfall p{font-size:13px;margin:6px 0 0}.bank-shortfall{border-left:3px solid #b98d40;padding:12px;background:#e6dbc3;border-radius:4px;margin:12px 0}.bank-shortfall .cost-picture{vertical-align:middle}.trade-picker button small{white-space:nowrap;font-size:11px}@media(max-width:600px){.trade-bundles{grid-template-columns:1fr;gap:8px}.bundle-picker{gap:12px}.trade-resource-card{max-height:90px;object-fit:cover}.bundle-stepper button{width:30px;min-height:38px}.trade-partners{flex-wrap:wrap}}

.pirate-event{border-color:#d4a25e;background:radial-gradient(ellipse at top,#624039,#17343c 70%)}.pirate-event h2{font-size:26px;margin-bottom:8px}.pirate-event-target{font:20px var(--serif);color:#f2d49b;margin:0 0 18px}.pirate-event .claim-reward-card{margin-bottom:16px}.pirate-event[open]{animation:pirate-arrival .28s ease-out}@keyframes pirate-arrival{from{opacity:0;scale:.92;translate:0 15px}to{opacity:1;scale:1;translate:0 0}}@media(prefers-reduced-motion:reduce){.pirate-event[open]{animation:none}}
.pirate-event .card{--event-width:min(230px,52vw,calc((100dvh - 310px)*2/3));width:var(--event-width)!important;height:calc(var(--event-width)*1.5)!important;color:#204e43}.pirate-event .card .text{color:#204e43}
/* Stacked trade picker: full-width cards and a compact footer on every device. */
#drawer.compact-trade{max-height:calc(100dvh - 24px)}.compact-trade .drawer-head{padding:14px 18px 10px}.compact-trade #drawer-body{padding:12px 18px 16px}.compact-trade #drawer-kicker{display:none}.trade-instruction{font:11px/1.3 var(--sans);color:#637367;margin:0 0 10px}.trade-bundles{grid-template-columns:1fr;gap:12px}.trade-bundles section+section{padding-top:11px;border-top:1px solid #d7c8aa}.bundle-title{margin-bottom:8px}.bundle-title h3{margin:0}.bundle-picker{gap:8px}.bundle-slot{position:relative}.trade-resource-card{max-height:135px;object-fit:cover}.trade-held{position:absolute;top:4px;right:3px;background:#f8efdbf2;border:1px solid #c4a66b;border-radius:4px;padding:1px 3px;color:#315247;font:10px/1.3 var(--sans)}.bundle-stepper{margin-top:5px;height:42px}.bundle-stepper button{flex:1;width:auto;height:40px}.bundle-stepper output{min-width:14px}.trade-footer{margin-top:13px;padding-top:11px;border-top:1px solid #d7c8aa}.trade-submit-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.trade-summary{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}.trade-summary>div{display:flex;flex-wrap:wrap;gap:2px}.trade-summary .bundle-resource{font-size:15px;margin:0 2px}.trade-summary .cost-picture{width:24px;height:24px}.trade-submit-row>.primary{flex:none;width:auto!important;min-height:44px;margin:0;padding:9px 17px;white-space:nowrap}.trade-footer .trade-note{font-size:11px;text-align:left;margin:8px 0 0}@media(max-width:600px){.trade-resource-card{max-height:none;aspect-ratio:2/3}.bundle-picker{gap:7px}.trade-held{font-size:9px}.compact-trade .drawer-head h2{font-size:27px}}

.compact-trade .trade-partners{margin-bottom:10px;gap:6px}.compact-trade .trade-partners button{min-height:44px;padding:6px 8px;justify-content:center}
/* Positive events wait for acknowledgement before moving into the table. */
.fortune-reward.reward-interactive[open]{display:grid;pointer-events:auto;cursor:pointer}.reward-interactive::backdrop{background:#102c3940;pointer-events:auto}.reward-continue{background:#f0d69b;color:#183c40;border:1px solid #e8c779;border-radius:8px;min-height:44px;padding:10px 20px;font:600 15px var(--sans);cursor:pointer}.reward-continue:focus-visible{outline:2px solid white;outline-offset:3px}.reward-interactive .card .text{color:#204e43}

/* Real, selectable building plans in bank and captain exchanges. */
.trade-modes{display:flex;gap:8px;margin:12px 0}.trade-modes button{flex:1}
.plan-picker{display:flex;gap:10px;overflow-x:auto;padding:8px 4px 14px;align-items:start}
.plan-choice{flex:0 0 166px;padding:0;background:transparent;border:2px solid transparent;border-radius:10px}
.plan-choice[aria-pressed="true"]{border-color:#d6b66e;box-shadow:0 0 0 2px #365e59}
.plan-choice .painted-card,.bundle-plan .painted-card{width:160px;pointer-events:none;transform:none;margin:0}
.bundle-plan{display:inline-block;vertical-align:top}.bundle-plan .painted-card{width:120px}
.trade-listings,.trade-plans{margin-top:12px}.trade-listings summary,.trade-plans summary{padding:10px 0;cursor:pointer}
.trade-listings p{font-size:13px}.trade-exchange>div{min-width:0;flex-wrap:wrap}.trade-summary .bundle-plan .painted-card{width:80px}
/* Approved larger Card Spotlight; all events share these responsive sizes. */
.event-spotlight{box-sizing:border-box;position:fixed;inset:0;margin:0;transform:none;width:100vw;height:100dvh;max-width:none;max-height:none;border:0;border-radius:0;padding:18px;background:#0c202bd6;color:#f9efd7;text-align:center;overflow:auto;box-shadow:none}
.event-spotlight[open]{display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:8px}
.event-spotlight::backdrop{background:#102c3955;backdrop-filter:blur(3px)}
.spotlight-art{display:flex;justify-content:center;align-items:center;gap:14px;flex-shrink:0;margin-bottom:4px;max-width:100%}.spotlight-card{position:relative;min-width:0}
.event-spotlight .painted-card{--event-card-width:min(360px,82vw,calc((100dvh - 230px)*2/3));width:var(--event-card-width)!important;height:calc(var(--event-card-width)*1.5)!important;min-width:0!important;margin:0;pointer-events:none;transform:none!important;color:#204e43;box-shadow:0 14px 35px #0005}
/* Mixed Fortune denominations stay fully visible side by side. */
.event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .painted-card{--event-card-width:min(300px,calc((100vw - 60px)/2),calc((100dvh - 230px)*2/3))}
.event-spotlight .spotlight-art:has(.cat-island){width:100%}
.event-spotlight .card.painted-card.cat-island{--island-w:min(540px,88vw,calc((100dvh - 230px)*1.5));width:var(--island-w)!important;height:calc(var(--island-w)*63/88)!important}
.event-spotlight .painted-card .text{color:#204e43}.spotlight-kicker{font:11px var(--sans);letter-spacing:2px;text-transform:uppercase;color:#e6c987;margin:0;max-width:480px}
.event-spotlight h2{font:28px/1.15 var(--serif);font-weight:400;margin:0;max-width:500px}.spotlight-detail{font:14px/1.35 var(--sans);max-width:390px;margin:0 0 6px}.spotlight-detail:empty{display:none}.event-spotlight .reward-continue{background:#eedaaa;color:#1e383b;border:1px solid #d9bf85;border-radius:6px;padding:10px 24px;min-height:44px;min-width:180px;flex-shrink:0}.spotlight-hint{font:12px var(--sans);opacity:.75;margin:0}.spotlight-portrait{width:86px;height:86px;border-radius:50%;border:2px solid #baa57b;object-fit:cover}.order-back{margin:0 0 14px;padding:10px 14px;min-height:44px}
@media(max-height:500px){.event-spotlight[open]{display:grid;grid-template-columns:auto minmax(160px,300px);justify-content:center;align-content:safe center;column-gap:24px}.event-spotlight .spotlight-art{grid-column:1;grid-row:1/6;margin:0}.event-spotlight .painted-card{--event-card-width:min(220px,38vw,calc((100dvh - 40px)*2/3))}.event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .painted-card{--event-card-width:min(180px,19vw,calc((100dvh - 40px)*2/3))}.event-spotlight .card.painted-card.cat-island{--island-w:min(440px,45vw,calc((100dvh - 40px)*1.5))}.event-spotlight h2{font-size:23px}.spotlight-hint{display:none}}

/* Keep every panel close control square, centred and clear of its title. */
#drawer .drawer-head{gap:16px;align-items:center}
#drawer .drawer-head>div{min-width:0;flex:1}
#drawer #close{box-sizing:border-box;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;display:grid;place-items:center;padding:0;margin:0;align-self:center;border:1px solid #bba37e;border-radius:9px;background:#fff8e9;color:#244b43;box-shadow:none;line-height:1;touch-action:manipulation}
#drawer #close[hidden]{display:none}
#drawer #close svg{display:block;pointer-events:none}
#drawer #close:hover{background:#eadcc2}
#drawer.resource-picker #close{background:#163e37;color:#fff1d6;border-color:#c9ad77}
#drawer.resource-picker #close:hover{background:#28594c}
#drawer #close:focus-visible{outline:3px solid #d49b39;outline-offset:3px}
/* Public Fortune stays compact; the final podium is the only victory ranking. */
#turn-order .turn-fortune{font-size:12px;color:#f0d28a;font-variant-numeric:tabular-nums}
.fortune-caption{font-size:14px;color:#5c655c;margin:0 0 18px}
.fortune-columns{display:grid;grid-template-columns:1fr 54px 54px 54px;gap:8px;text-align:right;font-size:12px;color:#657064;padding-bottom:8px}
.fortune-columns span:first-child{text-align:left}
.fortune-entry{border-top:1px solid #b8a57a55}
.fortune-entry summary{display:grid;grid-template-columns:34px 1fr 54px 54px 54px;gap:8px;align-items:center;text-align:right;cursor:pointer;padding:16px 0;list-style:none}
.fortune-entry summary::-webkit-details-marker,.honours-captain .honours-summary::-webkit-details-marker{display:none}
.fortune-entry .captain-portrait{width:34px;height:34px;border-radius:50%;object-fit:cover}
.fortune-name{text-align:left;font-size:16px;min-width:0}
.fortune-entry strong{font-size:23px;color:#295044}
.fortune-tally{display:grid;grid-template-columns:1fr auto;gap:8px 20px;font:14px var(--sans);margin:0;padding:12px 0 20px;text-align:left}
.fortune-tally dt,.fortune-tally dd{margin:0}.fortune-tally dd{text-align:right;font-variant-numeric:tabular-nums}
.fortune-tally .sum{border-top:1px solid #bba16a66;padding-top:10px;font-weight:bold}
.fortune-secret{margin-top:20px}.fortune-secret>summary{cursor:pointer;padding:10px 0}
#drawer.victory-panel{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;background:linear-gradient(#0c283070 5%,#0a2636bb 45%,#0a2637f7 80%),url('assets/bay-hd.jpg') center/cover;color:#f8edcf;overflow:auto}
#drawer.victory-panel .drawer-head{display:none}
#drawer.victory-panel #drawer-body{padding:20px 26px 35px}
.harbour-honours{max-width:850px;margin:auto;text-align:center}
.honours-logo{width:140px;height:70px;object-fit:contain;background:#f5efdf;padding:8px 12px;border:1px solid #bca57a;border-radius:7px}
.honours-heading{padding:24px 0 32px}
.honours-heading h1{font:44px/1.1 var(--serif);margin:0 0 12px;font-weight:400}
.honours-heading .eyebrow{color:#e1c384;letter-spacing:2.4px}
.honours-heading>p:last-child{font-size:17px;margin:0;color:#e0e6d8}
.honours-podium{display:grid;grid-template-columns:1fr 1.15fr 1fr;align-items:start;gap:15px;max-width:670px;margin:auto}
.honours-podium[data-captains="2"]{grid-template-columns:1fr 1.15fr;max-width:480px}
.honours-captain{min-width:0;border-bottom:1px solid #cfb77d88;background:linear-gradient(transparent,#122f40d9);border-radius:100px 100px 0 0;margin-top:36px}
.honours-captain .honours-summary{cursor:pointer;display:flex;align-items:center;flex-direction:column;gap:10px;list-style:none;padding:20px 10px}
.honours-captain .captain-portrait{width:90px;height:90px;border-radius:50%;object-fit:cover;border:2px solid #b99e6a}
.honours-captain.champion{margin-top:0;background:linear-gradient(#e7bc5010,#123140ed);border-bottom:2px solid #e7c46c}
.honours-captain.champion .captain-portrait{width:120px;height:120px;border-color:#edcc83;box-shadow:0 0 45px #e7b86135}
.honours-place{font-size:12px;letter-spacing:1px;color:#dbc38d;text-transform:uppercase}
.honours-name{font-size:17px;overflow-wrap:anywhere}
.honours-captain strong{font:44px var(--serif);color:#f3d79c}
.honours-unit{font-size:12px;color:#c5d1ce}
.honours-captain .fortune-tally{padding:12px 14px 20px;font-size:13px;gap:8px}
.honours-rest{max-width:650px;margin:12px auto}
.honours-rest .honours-captain{margin:0;border-radius:0;background:transparent}
.honours-rest .honours-summary{display:grid;grid-template-columns:30px 40px 1fr auto auto;text-align:left;padding:12px}
.honours-rest .captain-portrait{width:38px;height:38px}
.honours-rest strong{font-size:30px}
.honours-note{font-size:13px;color:#c3d0cc;margin:20px auto;max-width:550px}
.honours-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.honours-actions button{padding:12px 20px;border-radius:6px;min-height:44px;background:#0b2839b0;color:#f2dfb7;border:1px solid #bba77a99;font:16px var(--sans)}
.honours-actions .primary{background:#eedaaa;color:#1e383b}
@media(prefers-reduced-motion:no-preference){.honours-podium{animation:honours-arrive 1.1s cubic-bezier(.2,.7,.2,1) both}.honours-captain.champion .captain-portrait{animation:winner-light 2.8s ease-in-out both}@keyframes honours-arrive{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}@keyframes winner-light{0%{box-shadow:0 0 12px #e7b86110}55%{box-shadow:0 0 65px #e7b86160}100%{box-shadow:0 0 45px #e7b86135}}}
@media(max-width:700px){#turn-order button{gap:2px}#turn-order img{width:21px;height:21px}#turn-order .turn-fortune{font-size:10px}#drawer.victory-panel #drawer-body{padding:12px 14px 28px}.honours-logo{width:110px;height:50px}.honours-heading{padding:18px 0 24px}.honours-heading h1{font-size:32px}.honours-heading>p:last-child{font-size:15px}.honours-podium{gap:6px}.honours-captain{margin-top:25px}.honours-captain .honours-summary{padding:14px 4px;gap:7px}.honours-captain .captain-portrait{width:58px;height:58px}.honours-captain.champion .captain-portrait{width:78px;height:78px}.honours-name{font-size:14px}.honours-captain strong{font-size:34px}.honours-place{font-size:10px}.honours-captain .fortune-tally{font-size:11px;padding:10px 6px;gap:7px 4px}.honours-rest .honours-summary{padding:12px 4px}.honours-rest .captain-portrait{width:34px;height:34px}.honours-rest strong{font-size:28px}.fortune-columns{grid-template-columns:1fr 40px 40px 44px;gap:5px}.fortune-entry summary{grid-template-columns:27px 1fr 40px 40px 44px;gap:5px}.fortune-name{font-size:14px}.fortune-entry .captain-portrait{width:27px;height:27px}.fortune-entry strong{font-size:20px}}
#drawer.fortune-panel{background:#0c2834f5;color:#f4e9d0;border:1px solid #cdb47b66;max-width:660px}
#drawer.fortune-panel .drawer-head{background:#0c2834;color:#f4e9d0;border-color:#cdb47b44}
#drawer.fortune-panel .eyebrow{color:#c5bc9d}
#drawer.fortune-panel #close{background:#163e47;color:#fff1d6;border-color:#c9ad77}
.fortune-panel .fortune-caption,.fortune-panel .fortune-columns{color:#bdcecb}
.fortune-panel .fortune-entry strong{color:#f0d28a}

.honours-captain{color:inherit;font:inherit;border:0;border-bottom:1px solid #cfb77d88;padding:0;width:100%;text-align:center;cursor:pointer}
.honours-captain[aria-expanded=true]{outline:1px solid #edcc83;outline-offset:2px}
.honours-detail{max-width:650px;margin:18px auto;padding:18px 22px;background:#0a2738ed;border-top:1px solid #d5b77566;text-align:left}
.honours-detail h2{font:22px var(--serif);margin:0 0 10px}.honours-detail .fortune-tally{padding-bottom:0}
.victory-panel:has(.honours-detail) .honours-podium,.victory-panel:has(.honours-detail) .champion .captain-portrait{animation:none}

/* Responsive play shelf: reviewed browser layout, original card sizes. */
#bottom-bar{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr);column-gap:12px;row-gap:6px;padding:8px 16px 0}
#bottom-bar #turn-controls{grid-column:1;min-width:0;min-height:36px;margin:0;justify-content:flex-start!important;gap:6px!important}
#bottom-bar #table-tools{position:static;grid-column:2;grid-row:1;align-self:center;flex-wrap:nowrap}
#bottom-bar #card-rows{grid-column:1/-1;min-height:0;align-items:start}
#bottom-bar #building-shelf{height:100%;align-items:flex-start;padding-top:17px}
#bottom-bar #building-shelf .shelf-buildings{align-items:flex-start}
#bottom-bar footer#dock{align-self:start}
@media(max-width:1050px) and (min-width:701px){
 #bottom-bar{column-gap:8px;padding-inline:12px}
 #bottom-bar #turn-controls{gap:4px!important}
 #bottom-bar #turn-controls .phase-strip{margin-right:2px}
 #bottom-bar #turn-controls button{padding:6px 8px;font-size:12px}
 #bottom-bar #table-tools button{padding:7px;font-size:11px}
}
@media(max-width:700px){
 :root{--island-row-height:102px;--shipping-note-height:0px;--bottom-bar-height:calc(248px + var(--island-row-height) + var(--shipping-note-height) + env(safe-area-inset-bottom,0px))}
 :root:has(#bottom-bar .empty-shelf){--island-row-height:40px}
 :root:has(#bottom-bar .unavailable-order){--shipping-note-height:17px}
 #bottom-bar{display:flex;flex-direction:column;padding:4px 12px env(safe-area-inset-bottom,0px);gap:2px}
 #bottom-bar #turn-controls{display:flex!important;flex-wrap:wrap;justify-content:center!important;min-height:0;gap:4px!important;margin:0}
 #bottom-bar #turn-controls .phase-strip{margin:0 5px 0 0}
 #bottom-bar #turn-controls .prep-icons button{height:32px;width:32px}
 #bottom-bar #turn-controls .order-icons{flex-basis:100%;display:flex;align-items:flex-start;justify-content:center;gap:5px}
 #bottom-bar #turn-controls .order-icons button{min-height:34px;padding:5px 8px!important}
 #bottom-bar #turn-controls .order-icons:has(.unavailable-order){display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px 5px}
 #bottom-bar #turn-controls .unavailable-order{display:contents}
 #bottom-bar #turn-controls .unavailable-order small{grid-column:1/-1;grid-row:2;line-height:13px;max-width:none}
 #bottom-bar #turn-controls>button{padding:6px 9px;font-size:12px}
 #bottom-bar #table-tools{position:static;align-self:stretch;justify-content:flex-end;flex:none;margin:0}
 #bottom-bar #table-tools button{min-height:30px;padding:4px 9px;font-size:11px}
 #bottom-bar #card-rows{flex:none;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:var(--island-row-height) 132px;gap:2px;align-items:start}
 #bottom-bar #building-shelf{height:var(--island-row-height);padding:12px 0 0;align-items:start}
 #bottom-bar #building-shelf .empty-shelf{min-height:0;padding:2px 5px}
 #bottom-bar #building-shelf .shelf-buildings{padding:0 5px 4px;margin:0;align-items:start}
 #bottom-bar footer#dock{padding:12px 0 0!important}
 #bottom-bar #dock .whole-hand{height:120px;margin:0;padding:0 4px 3px!important;align-items:flex-end!important}
}
@media(max-width:700px) and (max-height:740px){
 :root{--bottom-bar-height:calc(231px + var(--island-row-height) + var(--shipping-note-height) + env(safe-area-inset-bottom,0px))}
 #bottom-bar #card-rows{grid-template-rows:var(--island-row-height) 115px}
 #bottom-bar #dock .whole-hand{height:103px}
}

/* Both paintings share the same frame during settlement changes. */
.scenery-previous{position:absolute;inset:0;pointer-events:none;user-select:none}

/* Approved island summary: left-aligned symbols, compact fade, plots beside buildings. */
#island-anchor{right:auto!important;width:max-content;max-width:calc(100vw - 32px)}
#island-anchor:before{inset:-6px -12px -5px;filter:blur(7px);background:radial-gradient(ellipse at 38% 38%,#102e3bb8 0%,#102e3b70 48%,transparent 76%)}
.heading-fort{display:block;width:29px;height:33px;flex:none;filter:drop-shadow(0 1px 2px #102e2c)}
.heading-fort svg{width:100%;height:100%}
#island-anchor .heading-resources{display:flex;align-items:center;gap:5px;margin:5px 0 0;filter:drop-shadow(0 1px 2px #102e2c)}
#island-anchor .heading-resources img{width:26px;height:25px}
#island-anchor .shore-details{margin-left:0}
#island-anchor .shore-inspect{padding-top:6px}
#building-shelf .plot-count{position:absolute;top:-2px;right:2px;font:12px/1.3 var(--sans);color:#4b5a4c;letter-spacing:0}
@media(max-width:700px){.heading-fort{width:25px;height:29px}#island-anchor .heading-resources img{width:24px;height:23px}#building-shelf .plot-count{font-size:11px}}

/* Action controls use the same painted wheat, compass and galleon as cards. */
#turn-controls .order-icons .card-symbol,#drawer .action-choice .card-symbol,#drawer .unavailable-order .card-symbol{width:28px;height:28px;flex:none;vertical-align:middle;background:none;box-shadow:none;padding:0}
#drawer .action-choice{display:flex;align-items:center;gap:8px}
@media(max-width:700px){#turn-controls .order-icons .card-symbol{width:24px;height:24px}}

/* Keep the approved Fortune chest legible beside the numeric total. */
#table-tools [data-score-target]{display:inline-flex;align-items:center;gap:3px;vertical-align:middle;white-space:nowrap}
#table-tools .fortune-chest{width:24px;height:24px;vertical-align:middle}

/* Keep the page canvas edge-to-edge. Safe-area spacing belongs to controls,
   not to the root scene (the same layout model as Solar Ascendancy). */
:root{--status-bar-inset:env(safe-area-inset-top,0px)}
html,body{height:100vh;min-height:100vh;margin:0;overscroll-behavior:none}
#experience{position:relative;inset:auto;width:100%;height:100dvh;overflow:hidden}
#scene-window{top:0}
#experience>header,#turn-order,#island-anchor{translate:0 var(--status-bar-inset)}
#toast{top:calc(24px + var(--status-bar-inset))}
header{background:transparent}
/* Both formats carry their own continuous sky, terrain and sea. */
#scene-frame{overflow:visible}
.scenery-layer{position:absolute;inset:0;overflow:hidden}
.scenery-previous{width:auto;height:auto;pointer-events:none}
/* A tall painting and a short, wide window cannot share a bottom shelf without
   cropping the terrain. Reflow the same controls beside it, with scrolling. */
#experience.side-shelf #scene-window{right:var(--side-shelf-width);bottom:0}
#experience.side-shelf header{right:var(--side-shelf-width)}
#experience.side-shelf #turn-order{left:calc((100% - var(--side-shelf-width))/2);max-width:calc(100% - var(--side-shelf-width) - 200px)}
#experience.side-shelf #turn-order button span{display:none}
#experience.side-shelf #island-anchor{left:16px;top:78px;max-width:calc(100% - var(--side-shelf-width) - 32px)}
#experience.side-shelf #bottom-bar{left:auto;top:0;bottom:0;right:0;width:var(--side-shelf-width);height:auto;display:flex;flex-direction:column;gap:12px;padding:16px 16px max(12px,env(safe-area-inset-bottom));overflow-y:auto;border:0;box-shadow:none}
#experience.side-shelf #turn-controls{flex-wrap:wrap;gap:6px!important;min-height:100px}
#experience.side-shelf #turn-controls .phase-strip{flex-basis:100%}
#experience.side-shelf #table-tools{position:static;display:flex;flex-wrap:wrap;justify-content:flex-start}
#experience.side-shelf #card-rows{display:flex;flex-direction:column;flex:none;gap:20px}
#experience.side-shelf #bottom-bar #building-shelf{min-height:155px;border-right:0;border-bottom:1px solid #c2ae862f;padding:24px 0 8px}
#experience.side-shelf #bottom-bar #dock{min-height:180px}
#experience.side-shelf #opponent-activity{right:calc(var(--side-shelf-width) + 12px);bottom:12px;left:12px}
#experience.side-shelf .guidance-hint{position:relative;inset:auto;max-height:none;flex:none}
#experience.side-shelf header img{width:83px!important}
#experience.side-shelf header #menu span{display:none}
#experience.side-shelf #turn-order img{width:21px;height:21px}
#experience.side-shelf #turn-order{font-size:10px;padding:2px 5px}
#experience.side-shelf #card-rows{align-items:stretch}
#experience.side-shelf #bottom-bar #building-shelf{width:100%;flex:none;align-self:stretch}
#experience.side-shelf #bottom-bar #building-shelf:has(.empty-shelf){min-height:45px}
#experience.side-shelf #turn-controls .order-icons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%;gap:6px;align-items:stretch}
#experience.side-shelf #turn-controls .order-icons button{width:100%;min-width:0;min-height:40px;font-size:12px;padding:6px!important;justify-content:center}
#experience.side-shelf #turn-controls .unavailable-order{display:contents}
#experience.side-shelf #turn-controls .unavailable-order small{grid-column:1/-1;grid-row:3;text-align:center;max-width:none}
#experience.side-shelf #bottom-bar #table-tools{flex-wrap:wrap;align-self:stretch;justify-content:flex-start}
#experience.side-shelf #bottom-bar #building-shelf{height:auto}
#experience.side-shelf #building-shelf .empty-shelf{min-height:0;padding:0}

/* iOS can expose the document canvas behind system chrome. Paint that canvas,
   too: a fixed scene alone leaves the old green body background underneath. */
html{min-height:100vh;background:url('./assets/sky-extension.png') center top/cover no-repeat}
html body{min-height:100vh;background:transparent}
.display-details{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 12px;font:13px/1.4 var(--sans)}
.display-details dt{font-weight:600}.display-details dd{margin:0;overflow-wrap:anywhere;user-select:text}

#bottom-bar #shelf-market{position:static;grid-column:1/-1;width:100%;margin:0}
.colony-status{padding:10px 0;color:#23483f;border-top:1px solid #d7c8ab;--shelf-w:100px;--shelf-h:150px}
.colony-status>strong{font:14px Georgia}
.colony-status .shelf-buildings{justify-content:flex-start;max-width:100%}
#shelf-market .colony-status .card{padding:0;font-size:inherit}
.colony-status .card .text{display:none!important}
.colony-status .card .art{height:100%;min-height:0;object-fit:cover}
.colony-status .shelf-building .card{display:grid;grid-template-rows:auto minmax(0,1fr)}

/* Tablet review integration: keep the hand stationary and use the side column. */
html{--display-release:island-paintings-1}
body{margin:0}
.side-panel-head,.side-resources{display:none}
#experience.side-shelf header #menu{display:none}
#experience.side-shelf .side-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none}
.side-panel-head strong{font:23px Georgia,serif}
.side-panel-head button{min-height:44px;border:1px solid #bba37e;border-radius:7px;background:#fff8e9;padding:8px 12px}
#experience.side-shelf #bottom-bar{gap:14px;padding:calc(18px + var(--status-bar-inset)) 18px max(18px,env(safe-area-inset-bottom))}
#experience.side-shelf #bottom-bar #dock{height:auto!important;min-height:0;width:100%!important;max-width:none!important;padding:20px 0 0!important;flex:none}
#experience.side-shelf #dock .side-resources{display:flex;justify-content:space-between;gap:4px;margin:4px 0 18px}
.side-resources button{display:flex;align-items:center;gap:4px;min-height:44px;border:0;padding:2px;background:none;color:#23483f;font:14px var(--sans)}
.side-resources .cost-picture{width:27px;height:27px}
#experience.side-shelf #bottom-bar #dock .whole-hand{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));align-items:start!important;gap:10px!important;height:auto!important;max-height:none!important;margin:0!important;padding:0 0 10px!important;overflow:visible!important}
#experience.side-shelf #dock .mini-stack{width:auto;min-width:0;margin:0;transform:none!important}
#experience.side-shelf #dock .resource-stack{display:block}
#experience.side-shelf #dock .dock-mini .card{width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:2/3}
#experience.side-shelf #dock .dock-mini .card.cat-island{height:auto!important;aspect-ratio:3/2}
#experience.side-shelf #dock .dock-mini .card .text{display:block!important;font-size:12px!important}
#experience.side-shelf #dock .dock-mini .card .card-heading .cost{display:flex!important}
#experience.side-shelf #card-rows{gap:12px}
#experience.side-shelf #bottom-bar #building-shelf{padding-top:20px;min-height:0}
#dock .mini-stack:hover,#dock .mini-stack:focus-within,#dock .mini-stack:has(.peek-source){transform:none!important}
/* Tap previews use the browser's top layer, outside every shelf clipping context. */
dialog#card-focus{position:fixed;inset:0;transform:none;margin:auto;width:min(640px,calc(100vw - 32px))!important;max-width:calc(100vw - 32px);height:max-content;max-height:calc(100dvh - 32px);padding:54px 24px 24px!important;background:#f6f0e1;border:1px solid #c7b38a;border-radius:12px;color:#23483f;overflow:auto}
#card-focus::backdrop{background:#153d4277}
#card-focus .focus-layout{display:flex;gap:24px;align-items:center}
#card-focus .focus-card{position:relative;flex:none}
#card-focus .card{width:min(300px,calc((100dvh - 140px)*.6667))!important;height:auto!important;aspect-ratio:2/3;min-width:0;max-width:100%;pointer-events:none}
#card-focus.landscape-focus .card{width:min(500px,65vw)!important;aspect-ratio:3/2}
#card-focus .focus-resource{height:min(450px,calc(100dvh - 140px))!important}
#card-focus .focus-controls{width:240px;max-width:100%;display:flex;flex-direction:column;gap:14px}
#card-focus .focus-moves{display:flex;flex-direction:column;gap:10px}
#card-focus .focus-close{position:absolute;top:8px;right:8px;width:44px;height:44px;border:1px solid #bba37e;border-radius:7px;background:#fff8e9;font-size:26px}
#card-focus .focus-controls p{margin:0;font:14px/1.5 var(--sans)}
#card-focus .focus-controls button{min-height:44px}
@media(min-width:900px){body:has(#experience.side-shelf):not(:has(#drawer[open])) #card-focus{right:auto;left:20px;max-width:calc(100vw - var(--side-shelf-width,360px) - 40px)}}
@media(max-width:700px){#card-focus .focus-layout{flex-direction:column;gap:14px}dialog#card-focus{width:min(360px,calc(100vw - 24px))!important;padding:52px 18px 18px!important}#card-focus .card{width:min(260px,calc((100dvh - 260px)*.6667))!important}#card-focus.landscape-focus .card{width:min(330px,80vw)!important}#card-focus .focus-controls{width:100%}}
/* Large action canvases: cards remain whole; overflow belongs to the page. */
@media(min-width:701px){
 #drawer.action-panel{position:fixed;inset:0;transform:none;margin:0;width:100%;max-width:none;height:100dvh;max-height:100dvh;border:0;border-radius:0;background:#f6f0e1;overflow:auto;color:#204e43}
 #drawer.action-panel .drawer-head{padding:calc(20px + env(safe-area-inset-top,0px)) 30px 20px;background:#f6f0e1}
 #drawer.action-panel #drawer-body{padding:22px 30px 30px}
 #drawer.action-panel .cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;overflow:visible;max-height:none;align-items:start;justify-items:center}
 #drawer.action-panel .cards>div{width:100%;min-width:0;display:flex;flex-direction:column;align-items:center;gap:12px}
 #drawer.action-panel .cards .card{width:min(100%,280px)!important;height:auto!important;aspect-ratio:2/3;min-width:0;max-height:none;flex:none}
 #drawer.action-panel .cards .card.cat-island{aspect-ratio:3/2;align-self:center}
 #drawer.action-panel .cards .button-row{margin:0;justify-content:center}
 #drawer.action-panel .choice-list{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}
 #drawer.action-panel .choice-list>button{flex:1 1 220px;min-height:48px}
 #drawer.action-panel .guidance-hint{max-width:none;margin-bottom:18px}
 #drawer.action-panel .resource-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:20px;width:100%;max-width:none;overflow:visible}
 #drawer.action-panel .resource-grid .card{width:100%;height:auto;aspect-ratio:2/3;max-height:none;min-width:0}
 #drawer.action-panel .picker-hand{display:none}
 #drawer.action-panel .shipping-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:18px;margin:24px 0}
 #drawer.action-panel .shipping-row{display:flex;flex-direction:column;gap:14px;padding:20px 12px;border:1px solid #ccb991;border-radius:9px;background:#fff8e9;text-align:center}
 #drawer.action-panel .shipping-row>span{font:24px Georgia;display:flex;flex-direction:column;align-items:center;gap:12px}
 #drawer.action-panel .shipping-row .resource-inline{width:100px;height:100px;display:block;margin:0;object-fit:contain}
 #drawer.action-panel .shipping-row small{font:13px var(--sans)}
 #drawer.action-panel .shipping-row button{min-height:44px}
}

dialog#card-focus.landscape-focus{width:min(850px,calc(100vw - 32px))!important}
#card-focus .focus-moves{width:100%}
@media(min-width:701px){
 #drawer.action-panel .drawer-head{color:#204e43}
 #drawer.action-panel .pick-progress button{color:#204e43;border-color:#8f7951}
 #drawer.action-panel .pick-progress>span{background:#204e43;border-color:#204e43}
 #drawer.action-panel .resource-grid{margin:28px auto;align-items:start}
 #drawer.action-panel .resource-grid .card{width:min(100%,220px)!important;height:auto!important;min-width:0!important;aspect-ratio:2/3;justify-self:center}
 #drawer.action-panel .resource-grid .card:last-child{grid-column:auto}
}
.resource-choice-note{text-align:center;font:15px/1.5 var(--sans);margin:14px 0}
#card-focus{container-type:inline-size}
@container(max-width:520px){#card-focus .focus-layout{flex-direction:column}#card-focus .focus-controls{width:100%}#card-focus.landscape-focus .card{width:min(420px,75vw)!important}}
.cargo-name{font:inherit}
@media(min-width:701px){#drawer.action-panel .shipping-row .resource-inline{width:110px!important;height:110px!important;vertical-align:0!important}#drawer.action-panel .shipping-row{min-height:260px;justify-content:space-between}}

/* One complete card hand on every device; tablet wraps instead of substituting icons. */
#experience.side-shelf #dock .mini-stack{position:relative;display:block}
#experience.side-shelf #dock .mini-resource{width:100%;height:auto;aspect-ratio:2/3;min-width:0;border-radius:6px}
#experience.side-shelf #dock .stack-count{position:absolute;bottom:5px;left:5px;min-width:25px;height:25px;display:grid;place-items:center;padding:2px 5px;border-radius:50%;background:#fff3d8;color:#23483f;box-shadow:0 1px 5px #1238;font: bold 16px Georgia;pointer-events:none}
#experience.side-shelf #dock .dock-mini{width:100%}
#card-focus .focus-close{display:grid;place-items:center;padding:0;line-height:1;min-width:44px;min-height:44px}
#card-focus .focus-close svg{display:block;pointer-events:none}
#card-focus .focus-layout{justify-content:center}
#card-focus .focus-controls:empty,#card-focus .focus-controls:has(>.focus-moves:only-child:empty){display:none}
dialog#card-focus.resource-focus{width:max-content!important;container-type:normal}
/* Approved action colours identify both the heading and the full action surface. */
#drawer[data-action="harvest"]{--action-colour:#174e29;--action-paper:#e7eee2;--action-ink:#fff4dd}
#drawer[data-action="explore"]{--action-colour:#174f87;--action-paper:#e5edf5;--action-ink:#fff4dd}
#drawer[data-action="ship"]{--action-colour:#d2a029;--action-paper:#faf0cd;--action-ink:#302b16}
#drawer.action-panel[data-action="harvest"],#drawer.action-panel[data-action="explore"],#drawer.action-panel[data-action="ship"]{background:var(--action-paper);color:#23483f}
#drawer.action-panel[data-action="harvest"] .drawer-head,#drawer.action-panel[data-action="explore"] .drawer-head,#drawer.action-panel[data-action="ship"] .drawer-head{background:var(--action-colour);color:var(--action-ink)}
#drawer.action-panel .drawer-head .eyebrow{color:inherit}
#drawer.action-panel #drawer-body{background:transparent}
#drawer.action-panel #close{background:#fff8e9;color:#244b43;border-color:#bba37e}
#drawer.action-panel .pick-progress button{color:#23483f;border-color:#8f7951}
#drawer.action-panel .pick-progress>span{background:#174e29;border-color:#174e29}


/* One continuous painting, shared by incoming and outgoing stages. */
#painting,.scenery-previous>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center top}

/* Approved mobile hand: compact effects, shallow buildings, hand above safe area. */
#shelf-market .pirate-effect-button{display:flex;align-items:center;gap:8px;width:100%;min-height:40px;padding:6px 9px;background:#e7dfcc;border:1px solid #bca881;border-radius:6px;text-align:left;font:12px var(--sans)}
.pirate-effect-button .card-symbol{width:24px;height:24px;flex:none}
.pirate-effect-button>span:last-child{margin-left:auto}
#building-shelf button.plot-count{background:none;border:0;padding:0;color:inherit;cursor:pointer}
@media(max-width:700px) and (orientation:portrait){
 :root{--bottom-bar-height:calc(370px + env(safe-area-inset-bottom,0px));--hand-card-w:72px;--hand-card-h:108px;--island-row-height:78px}
 #experience:not(.side-shelf) #bottom-bar{gap:5px;padding-top:7px;overflow:hidden}
 #experience:not(.side-shelf) #card-rows{flex:1;min-height:0;grid-template-rows:78px 124px;align-content:end;gap:5px}
 #experience:not(.side-shelf) #building-shelf{height:78px;overflow:hidden;padding-top:18px}
 #experience:not(.side-shelf) #building-shelf .shelf-buildings{height:60px;overflow-x:auto;overflow-y:hidden}
 #experience:not(.side-shelf) #building-shelf .card{--card-w:58px;--card-h:87px}
 #experience:not(.side-shelf) footer#dock{height:124px;border-top:1px solid #cabc9c!important;padding-top:16px!important}
 #experience:not(.side-shelf) #dock:before{top:3px}
 #experience:not(.side-shelf) #dock .whole-hand{height:108px;margin:0;padding:0 3px!important;align-items:flex-end!important}
 #experience:not(.side-shelf) #shelf-market{flex:none}
 #experience:not(.side-shelf) #shelf-market:empty{display:none}
 #experience:not(.side-shelf) #building-shelf .shelf-building:hover{transform:none}
}
@media(max-width:700px) and (orientation:portrait) and (max-height:740px){
 :root{--bottom-bar-height:calc(315px + env(safe-area-inset-bottom,0px))}
 #experience:not(.side-shelf) #card-rows{grid-template-rows:24px 124px}
 #experience:not(.side-shelf) #building-shelf{height:24px;padding:0}
 #experience:not(.side-shelf) #building-shelf .shelf-buildings{display:none}
 #experience:not(.side-shelf) #building-shelf button.plot-count{min-height:24px}
}
@media(max-width:700px) and (orientation:portrait){
 #experience:not(.side-shelf) #bottom-bar{height:auto;max-height:calc(100dvh - 140px);overflow-y:auto}
 #experience:not(.side-shelf) #card-rows{flex:none;align-content:start}
}

/* Raid escape choices use the same painted category symbols as the cards. */
.raid-colour-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0 12px}
.raid-colour{display:flex;align-items:center;gap:10px;text-align:left;min-height:72px;padding:12px;border:1px solid #cbbb99;border-radius:8px;background:#fff9eb;color:#23483f}
.raid-colour .card-symbol{width:34px;height:34px;flex:none}.raid-colour strong{display:block;font-size:16px}.raid-colour small{display:block;font-size:11px;line-height:1.3;margin-top:3px}.raid-selected{margin-left:auto;font-weight:bold}.raid-colour[aria-pressed=true]{border:2px solid #235b48;background:#e5eddf;padding:11px}.raid-colour:focus-visible{outline:3px solid #a98741;outline-offset:2px}.raid-guess-note{font-size:12px;line-height:1.5;color:#586b60}
@media(max-width:450px){.raid-colour-grid{gap:8px}.raid-colour{padding:9px;gap:7px;min-height:76px}.raid-colour[aria-pressed=true]{padding:8px}.raid-colour .card-symbol{width:28px;height:28px}.raid-colour strong{font-size:15px}.raid-colour small{font-size:10px}}

/* Compact tap previews: dismiss by tapping away, without a close-button frame. */
dialog#card-focus,dialog#card-focus.landscape-focus,dialog#card-focus.resource-focus{width:max-content!important;max-width:calc(100vw - 32px);padding:12px!important;background:transparent;border:0;box-shadow:none;container-type:normal;left:0!important;right:0!important}
#card-focus .focus-layout{flex-direction:column;gap:10px}
#card-focus .card{width:min(240px,68vw,calc((100dvh - 210px)*.6667))!important}
#card-focus.landscape-focus .card{width:min(340px,78vw)!important}
#card-focus .focus-resource{height:auto!important;aspect-ratio:2/3}
#card-focus .focus-controls{width:min(300px,78vw);padding:10px;border:1px solid #c7b38a;border-radius:8px;background:#f6f0e1}
#card-focus .focus-controls:empty,#card-focus .focus-controls:has(>.focus-moves:only-child:empty){display:none}

/* The preview face is display-only; browser autofocus must not frame its artwork. */
dialog#card-focus,#card-focus .focus-card .card{outline:none!important;-webkit-tap-highlight-color:transparent}
#card-focus .focus-controls button:focus-visible{outline:2px solid #b18b45;outline-offset:3px}

/* Safari may focus the dialog itself for a resource face (which has no button). */
#card-focus .focus-card,#card-focus .focus-card:focus,#card-focus .focus-card:focus-visible,dialog#card-focus:focus,dialog#card-focus:focus-visible{outline:0!important;box-shadow:none!important;-webkit-tap-highlight-color:transparent}

/* Hand thumbnails retain the title banner; only the bottom rules plaque is hidden. */
#experience #bottom-bar #dock .dock-mini .card .text{display:none!important}
#drawer .picker-hand .card.painted-card .card-heading strong{display:block!important}
#dock .mini-resource,#dock .dock-mini .card{box-sizing:border-box!important;aspect-ratio:2/3}
#experience.side-shelf #dock .mini-resource,#experience.side-shelf #dock .dock-mini .card:not(.cat-island){width:100%!important;height:auto!important;aspect-ratio:2/3;border:2px solid #d4b67c!important}
#experience.side-shelf #dock .dock-mini .card.cat-island{width:100%!important;height:auto!important;aspect-ratio:3/2}
#experience.side-shelf #dock .mini-stack{align-self:end}
/* Keep a visible destination for every resource collection on every screen. */
#drawer.action-panel .picker-hand{display:block;position:sticky;bottom:0;z-index:2;background:var(--action-paper,#f6f0e1);padding:8px;margin:12px 0 0;max-width:none;border-top:1px solid #c7b38a;pointer-events:none}
#drawer .picker-hand:before{content:'YOUR HAND';display:block;font:10px var(--sans);letter-spacing:1px;margin-bottom:5px}
#drawer .picker-hand .whole-hand{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:flex-end;overflow:hidden;gap:4px}
#drawer .picker-hand .mini-stack{position:relative;flex:0 0 48px;width:48px;margin-right:-10px}
#drawer .picker-hand .mini-resource,#drawer .picker-hand .card{width:48px!important;min-width:48px!important;height:72px!important;padding:0;box-sizing:border-box;aspect-ratio:2/3}
#drawer .picker-hand .card .text{display:none!important}
#drawer .picker-hand .card.cat-island{height:32px!important;aspect-ratio:3/2}
.resource-flight[popover]{position:fixed;inset:auto;margin:0;padding:0;pointer-events:none;overflow:hidden}

/* Two-card raid checks can reveal islands beside portrait cards. */
.event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .card.painted-card.cat-island{--island-w:min(300px,calc((100vw - 60px)/2),calc((100dvh - 230px)*1.5))}
@media(max-height:500px){.event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .card.painted-card.cat-island{--island-w:min(180px,19vw,calc((100dvh - 40px)*1.5))}}

/* Keep the title painting steady until the selected island has decoded. */
html.voyage-loading{background:linear-gradient(#12313b22,#12313b88),url('assets/voyage-title.jpg') center top/cover fixed!important}
#voyage-loading{position:fixed;inset:0;z-index:90;display:grid;place-content:center;justify-items:center;gap:20px;background:linear-gradient(#12313b22,#12313b88),url('assets/voyage-title.jpg') center top/cover;color:#fff4dc;opacity:1;transition:opacity .65s ease;pointer-events:auto}
#voyage-loading p{font:18px Georgia,serif;margin:0;padding:12px 18px;background:#163e3bd9;border-radius:8px}
#voyage-loading a{color:#fff4dc;font:14px Georgia}
html.voyage-loading #experience{visibility:hidden}
html:not(.voyage-loading) #voyage-loading{opacity:0;pointer-events:none}
#voyage-loading[hidden]{display:none!important}
@media(prefers-reduced-motion:reduce){#voyage-loading{transition:none}}

/* Approved tap-through expansion: the hand stays interactive, with no backdrop. */
dialog#card-focus.anchored-focus{position:fixed;inset:auto!important;right:auto!important;bottom:auto!important;margin:0!important;padding:0!important;width:var(--peek-width,240px)!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px);height:auto;overflow:visible;z-index:500;transform-origin:top left;filter:drop-shadow(0 8px 16px #09272c88)}
#card-focus.anchored-focus .focus-layout{gap:8px;align-items:center}
#card-focus.anchored-focus .focus-card,#card-focus.anchored-focus .card{width:var(--peek-width,240px)!important;min-width:0!important;max-width:none!important}
#card-focus.anchored-focus .card{height:auto!important;aspect-ratio:2/3}
#card-focus.anchored-focus.landscape-focus .card{aspect-ratio:88/63!important;height:calc(var(--peek-width)*63/88)!important}
#card-focus.anchored-focus .focus-controls{width:100%;max-height:120px;overflow:auto;padding:8px;gap:5px}
#card-focus.anchored-focus .focus-controls p{font-size:12px}
#card-focus.anchored-focus .focus-moves{gap:5px}
#card-focus.anchored-focus .focus-moves button{min-height:38px;font-size:12px}

/* Approved iPhone overlay review: edge-to-edge backgrounds, safe controls. */
:root{
 --overlay-safe-top:env(safe-area-inset-top,0px);
 --overlay-safe-bottom:env(safe-area-inset-bottom,0px);
 --overlay-safe-left:env(safe-area-inset-left,0px);
 --overlay-safe-right:env(safe-area-inset-right,0px);
}
#drawer.resource-picker{padding:0!important;overflow:hidden;background:var(--action-paper,#e8f0e5);color:#23483f}
#drawer.resource-picker[open]{display:flex;flex-direction:column}
#drawer.resource-picker .drawer-head{flex:none;padding:calc(var(--overlay-safe-top) + 10px) max(16px,var(--overlay-safe-right)) 12px max(16px,var(--overlay-safe-left));background:var(--action-colour,#174e29);color:#fff1d6;position:relative}
#drawer.resource-picker .drawer-head h2{font-size:27px;margin:0;display:flex;align-items:center;justify-content:space-between;gap:10px}
#drawer.resource-picker .picker-help{position:relative;flex:none;width:28px;height:28px;font:16px var(--sans);padding:0;background:transparent;border:1px solid #eee8;border-radius:50%;color:inherit}
#drawer.resource-picker .picker-help:before{content:'';position:absolute;inset:-8px}
#drawer.resource-picker #close{flex:none;background:#fff8e9;color:#244b43}
#drawer.resource-picker #drawer-body{flex:1;min-height:0;padding:0 max(16px,var(--overlay-safe-right)) 0 max(16px,var(--overlay-safe-left));display:flex;flex-direction:column;overflow:hidden}
#drawer.resource-picker .resource-choice-note{font-size:14px;line-height:1.4;margin:14px 0 8px}
#drawer.resource-picker .pick-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;justify-content:safe center}
#drawer.resource-picker .pick-scroll>*{flex-shrink:0}
#drawer.resource-picker .resource-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;width:100%;max-width:420px;margin:12px auto 20px}
#drawer.resource-picker .resource-grid .card{grid-column:span 2;width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:2/3;max-width:125px;justify-self:center}
#drawer.resource-picker .resource-grid .card:nth-child(4){grid-column:2/span 2}
#drawer.resource-picker .resource-grid .card:last-child{grid-column:4/span 2}
#drawer.resource-picker .picker-hand{display:block;flex:none;position:relative;bottom:auto;max-width:none;margin:0;padding:10px 5px calc(10px + var(--overlay-safe-bottom));background:var(--action-paper,#e8f0e5);border-top:1px solid #c7b38a}
#drawer.resource-picker .picker-hand .card,#drawer.resource-picker .picker-hand .mini-resource{width:48px!important;min-width:48px!important;height:72px!important}
#drawer.resource-picker .picker-hand .card.cat-island{height:32px!important;aspect-ratio:3/2}
.event-spotlight{padding:calc(var(--overlay-safe-top) + 16px) max(18px,var(--overlay-safe-right)) calc(var(--overlay-safe-bottom) + 16px) max(18px,var(--overlay-safe-left))}
.event-spotlight .painted-card{--event-card-width:min(360px,82vw,calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 230px)*2/3))}
.event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .painted-card{--event-card-width:min(300px,calc((100vw - 60px)/2),calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 230px)*2/3))}
.event-spotlight .card.painted-card.cat-island{--island-w:min(540px,88vw,calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 230px)*1.5))}
#drawer.victory-panel{box-sizing:border-box;padding:var(--overlay-safe-top) var(--overlay-safe-right) var(--overlay-safe-bottom) var(--overlay-safe-left);overflow:hidden}
#drawer.victory-panel #drawer-body{height:100%;overflow:auto;overscroll-behavior:contain}
#handoff{box-sizing:border-box;padding:calc(var(--overlay-safe-top) + 20px) max(24px,var(--overlay-safe-right)) calc(var(--overlay-safe-bottom) + 20px) max(24px,var(--overlay-safe-left));overflow:auto;align-items:safe center}
#handoff>div{max-height:100%;overflow:auto}
@media(min-width:701px){
 #drawer.resource-picker .resource-grid{grid-template-columns:repeat(5,minmax(0,1fr));max-width:1200px;gap:20px}
 #drawer.resource-picker .resource-grid .card,#drawer.resource-picker .resource-grid .card:nth-child(4),#drawer.resource-picker .resource-grid .card:last-child{grid-column:auto;max-width:220px}
}
@media(max-height:500px) and (orientation:landscape){
 #drawer.resource-picker .resource-grid{grid-template-columns:repeat(5,minmax(0,1fr));max-width:650px;gap:12px;margin:8px auto}
 #drawer.resource-picker .resource-grid .card,#drawer.resource-picker .resource-grid .card:nth-child(4),#drawer.resource-picker .resource-grid .card:last-child{grid-column:auto;max-width:100px}
 #drawer.resource-picker .picker-hand .card,#drawer.resource-picker .picker-hand .mini-resource{height:48px!important;width:32px!important;min-width:32px!important}
 #drawer.resource-picker .picker-hand .mini-stack{flex-basis:32px;width:32px}
 #drawer.resource-picker .picker-hand .card.cat-island{height:22px!important}
 #drawer.resource-picker .picker-hand{padding:5px 5px calc(4px + var(--overlay-safe-bottom))}
 #drawer.resource-picker .resource-choice-note{margin:5px 0}
 .event-spotlight .painted-card{--event-card-width:min(220px,30vw,calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 40px)*2/3))}
 .event-spotlight .spotlight-art:has(.spotlight-card:nth-child(2)) .painted-card{--event-card-width:min(180px,19vw,calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 40px)*2/3))}
 .event-spotlight .card.painted-card.cat-island{--island-w:min(400px,42vw,calc((100dvh - var(--overlay-safe-top) - var(--overlay-safe-bottom) - 40px)*1.5))}
}

/* Automatic payouts: visible, dismissible, and never modal. */
.reward-toast{position:fixed;inset:auto;margin:0;width:min(350px,calc(100vw - 32px));max-height:40vh;overflow:auto;padding:13px 35px 13px 15px;border:1px solid #cbb078;border-radius:12px;background:#fff4e2f5;color:#20483c;box-shadow:0 7px 25px #102f4050;z-index:12000;font:15px/1.4 Georgia,serif}
.reward-toast>strong{font-size:20px;display:block}.reward-toast-amounts{display:flex;flex-wrap:wrap;gap:10px;font:18px/1.5 system-ui,sans-serif;margin-top:5px}.reward-toast p{font:13px/1.4 system-ui;margin:7px 0 0}.reward-toast summary{font:13px system-ui;cursor:pointer;text-decoration:underline;padding-top:8px}.reward-toast-close{position:absolute;right:7px;top:7px;border:0;background:none;color:#345647;padding:4px 7px;font-size:22px;line-height:1}.reward-toast.opponent-reward{font:14px system-ui;width:min(300px,calc(100vw - 32px));max-height:25vh}.opponent-reward>strong{font:15px system-ui}.opponent-reward .reward-toast-amounts{font-size:14px}.reward-resource-flight{position:fixed;inset:auto;margin:0;border:0;padding:0;background:transparent;color:#fbe8ad;text-shadow:0 1px 4px #173b3b;pointer-events:none;z-index:12001;font:bold 20px system-ui}.reward-resource-flight .resource-inline{width:35px!important;height:35px!important}.reward-highlight{outline:3px solid #e7bb58!important;outline-offset:3px;border-radius:5px}@media(prefers-reduced-motion:reduce){.reward-resource-flight{display:none}}

/* Placement choices show the destination and payment, without island descriptions. */
#card-focus .build-location{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px;text-align:left}
#card-focus .build-location>small{flex-shrink:0;margin:0}

/* Card choices keep inspection separate from committing a move. */
.card-choice-grid{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start}
.card-choice{display:flex;flex-direction:column;align-items:center;gap:7px;width:180px;max-width:100%;flex:0 0 180px;margin:6px 0 14px}
#drawer .card-choice>.painted-card{width:160px!important;min-width:160px!important;height:240px!important;max-width:100%;margin:0;cursor:zoom-in}
.card-choice-context{font:12px/1.4 var(--sans);text-align:center;margin:0;color:#36584d}
.card-choice-actions{width:100%;display:flex;flex-direction:column;gap:5px}
#drawer .card-choice-actions>button{width:100%;min-height:42px;margin:0;padding:8px 10px;font-size:13px;flex:auto;background:#fff5df;border:1px solid #bda574;border-radius:6px;color:#244b40}
#drawer .card-choice-actions>button[aria-pressed="true"]{background:#ead5a2;border-color:#35594a}
#drawer .choice-list:has(>.card-choice){display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start}
#drawer .island-choice{min-width:150px;max-width:100%}
.pirate-rival .card-choice-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.pirate-rival .card-choice{width:100%}
#drawer .pirate-rival .card-choice>.painted-card{width:100%!important;min-width:0!important;max-width:160px;height:auto!important;aspect-ratio:2/3}

/* Raid warning: approved preview, distinct from reward spotlights. */
.event-spotlight.raid-spotlight{background:radial-gradient(ellipse at 50% 38%,#76392e66,transparent 63%),linear-gradient(#180f13f5,#2b1015f5);box-shadow:inset 0 0 0 4px #983d32}
.raid-banner{display:flex;align-items:center;gap:14px;margin-bottom:8px;flex-shrink:0;text-align:left}.raid-banner>.card-symbol{width:56px;height:56px;background:#171916;border-radius:50%;padding:4px}.raid-banner strong{font:700 32px/1 Georgia,serif;letter-spacing:6px}.raid-banner small{display:block;margin-top:5px;font:11px/1.4 system-ui;letter-spacing:1.5px;text-transform:uppercase;color:#e3b49b}
.event-spotlight.raid-spotlight .painted-card{--event-card-width:min(360px,82vw,calc((100dvh - 330px)*2/3))}
.event-spotlight.raid-spotlight .reward-continue{background:#8e302b;color:#fff1d7;border:1px solid #ce8a66}

/* Hand limit counter (rules 0.24): resources held / limit, red when over. */
.hand-limit{align-self:center;flex:none;font:700 12px/1 system-ui,sans-serif;padding:5px 7px;border-radius:10px;background:rgba(32,78,67,.88);color:#f6eedb;letter-spacing:.02em;white-space:nowrap}
.hand-limit.over{background:#8e2f26;color:#fff;box-shadow:0 0 0 2px rgba(255,255,255,.7)}

/* Optional objectives belong to setup, with compact native checkbox controls. */
#voyage-setup .advanced-options label{display:flex;align-items:center;gap:10px;margin-top:14px}
.advanced-options input[type="checkbox"]{width:20px;height:20px;flex:0 0 20px;accent-color:#a57935}
.advanced-options p{margin:6px 0 12px}

#voyage-setup .expansion-choice{display:flex;align-items:center;gap:10px;margin:16px 0}
.expansion-choice input[type="checkbox"]{width:20px;height:20px;flex:0 0 20px;accent-color:#a57935}

/* Shipping pairs: separate, readable selectors and touch-sized quantity controls. */
.shipping-pair-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:560px;margin:16px 0}
.shipping-pair-picker label{display:grid;gap:7px;min-width:0;font-size:16px;font-weight:600}
.shipping-pair-picker select{box-sizing:border-box;min-width:0;width:100%;min-height:44px;padding:10px 8px;border:1px solid #b49c69;border-radius:7px;background:#fff9eb;color:#23483f;font-family:inherit;font-size:16px}
.action-panel [data-quantity]{min-width:44px;min-height:44px;font-size:20px}
