/* Astéria art direction. Shared chrome and stable desktop/tablet scene geometry. */
:root { --gilt:#efcf83; --ink:#07172e; --edge-light:#fff2b5; --ornament:linear-gradient(115deg,#8c5b27,#fff0b0 22%,#b97e32 40%,#ffe8a1 62%,#9d6a28 85%,#fff2bd); }
html { scrollbar-gutter:stable; }
.button { transition:background .18s,box-shadow .18s,filter .18s; }
.button:hover:not(:disabled) { transform:none; }
.location-button,.location-button:hover:not(:disabled),.location-button:focus-visible { transform:translate(-50%,-50%); }
.location-button:hover .location-mark,.location-button:focus-visible .location-mark { box-shadow:0 0 0 5px #f8dd9366,0 0 28px #ffeaa9; }
.secondary,.icon-button,.hint-button,.filter,.header-actions .profile-button,.main-header nav button,.answer,.key {
  background:linear-gradient(165deg,#20496c 0%,#0a203d 45%,#07142b 100%); border:1px solid var(--gilt); color:#fff6dc;
  box-shadow:inset 0 1px 2px #fff5ce55,inset 0 -3px 5px #02081199,0 3px 5px #0005;
}
.primary { background:linear-gradient(145deg,#fff0bc,#f2c96d 55%,#d2963d); border:2px solid #fff0b1; box-shadow:inset 0 0 0 2px #b47735,0 0 0 1px #a77b39,0 5px 15px #0008; }
.icon-button { border-radius:50%; }
.glass,.training-form,#game-dialog,.victory-panel { border:1px solid var(--gilt); background:radial-gradient(ellipse at 15% 0,#27577788,transparent 60%),linear-gradient(135deg,#0d2544f5,#06162cf7); box-shadow:inset 0 0 0 3px #d3a85c22,inset 0 1px #fff0aa88,0 12px 32px #0008; }
.main-header { background:linear-gradient(#091831e8,#0b2543bf); border-bottom:1px solid #e4ba6f77; box-shadow:0 5px 20px #0005; }
.brand>span { color:#ffe4a3; letter-spacing:.015em; text-shadow:0 2px #915722,0 4px 9px #000c; }
.main-header nav { border:1px solid #b89450; border-radius:24px; padding:3px; background:#06152aa6; gap:5px; }
.main-header nav button { border-color:transparent; box-shadow:none; border-radius:20px; }
.main-header nav button.active,.filter.active { border-color:#ffe9ad; background:linear-gradient(#206490,#0a345b); box-shadow:inset 0 0 12px #60dfff88,0 0 13px #69d8ff99; }
.profile-button { border-radius:25px; }
.map-route { opacity:.9; }
.map-route path { stroke:#a6faff; stroke-width:2; stroke-dasharray:10 5; filter:drop-shadow(0 0 4px #38d9ff); }
.camp-progress,.next-mission { border:2px solid #e8c37a; border-radius:22px; }
.camp-progress .progress,.card-detail .progress { height:13px; border:1px solid #f4dca0; background:#04162c; }
.progress>span { background:linear-gradient(#75f4ff,#12aecb); box-shadow:0 0 10px #67e7ff; }
.location-mark { border-color:#ffeaa2; }
.location-label { border-radius:20px; border-color:#e7cc88; background:linear-gradient(#1d3555,#08162b); }
.location-button.current .location-mark { background:linear-gradient(#a27d34,#46371f); color:#fff3aa; }

/* One arena size for all armour states, hints and answer modes. */
.battle { display:grid; grid-template-rows:82px minmax(250px,1fr) 250px; height:100dvh; min-height:650px; padding:0 18px 12px; gap:0; overflow:visible; }
.battle .battle-header { position:relative; inset:auto; width:100%; height:82px; padding:12px 0 6px; display:grid; grid-template-columns:1fr minmax(240px,480px) 1fr; align-items:start; z-index:5; }
.battle-header>div:first-child { flex-wrap:wrap; gap:6px 14px; }
.battle-location { font-size:15px; color:#fff7df; text-shadow:0 2px 3px #000; }
.battle .enemy-heading { background:none; border:0; box-shadow:none; padding:0; text-shadow:0 2px 4px #000; }
.enemy-heading h1 { font-size:clamp(25px,2.7vw,38px); color:#fff0bf; line-height:1.1; }
.battle-actions { justify-content:flex-end; }
.battle-actions .icon-button { width:52px; height:52px; }
.battle .arena,.battle.battle-typed .arena,.battle.with-hint .arena { width:100%; max-width:1600px; height:100%; min-height:0; max-height:none; margin:0 auto; flex:none; position:relative; overflow:clip; }
.battle .arena-backdrop,.battle.with-hint .arena-backdrop { height:100%; min-height:0; position:absolute; inset:0; background-position:center; }
.battle .arena-backdrop:after { background:linear-gradient(0deg,#04142b 0%,transparent 34%,#05162a22 95%); }
.battle .nova-actor { width:38%; height:113%; left:3%; bottom:-5%; z-index:2; }
.battle .guardian-actor { width:53%; height:121%; right:1%; bottom:-11%; }
.battle .nova-shield { bottom:9%; left:20%; padding:8px 12px; border:2px solid #d6bd79; background:linear-gradient(#153b5b,#07182e); }
.nova-shield i { height:16px; width:23px; border:1px solid #72ccdf; }
.nova-shield i.filled,.armour i.filled { background:linear-gradient(#a4f2ff,#38b3d0); box-shadow:inset 0 1px #fff8,0 0 7px #4bdfff66; }
.battle .armour-line { gap:9px; padding:5px 0; }
.battle .armour { height:25px; padding:3px; border:1px solid #efce85; border-radius:9px; box-shadow:0 0 0 2px #16314c; background:#05142b; gap:3px; }
.battle .armour i { border:1px solid #4594bc66; border-radius:3px; }
.battle .command-panel { width:100%; max-width:1600px; min-height:0; height:100%; margin:0 auto; padding:12px 36px 8px; border:2px solid #f4d18b; border-radius:35px 35px 24px 24px; display:flex; flex-direction:column; align-items:stretch; justify-content:center; background:radial-gradient(ellipse at 50% -20%,#1f4f7580,transparent 65%),repeating-linear-gradient(135deg,transparent 0 80px,#7db4b408 81px 82px),linear-gradient(110deg,#0b2446f5,#06162cf8); box-shadow:inset 0 0 0 5px #0c1938,inset 0 0 0 6px #bca16e88,0 -4px 24px #0009; z-index:4; }
.command-panel:before,.command-panel:after { content:'◇'; position:absolute; top:34px; width:25%; height:1px; background:linear-gradient(90deg,transparent,#ebc980); color:#ffe6a3; font-size:24px; line-height:0; text-align:right; pointer-events:none; }
.command-panel:before { left:20px; }
.command-panel:after { right:20px; transform:scaleX(-1); }
.battle .command-panel h2 { font-size:clamp(38px,4.5vw,58px); line-height:1.05; margin:0; }
.battle .question-caption { margin:4px 0 12px; font-size:17px; color:#e1e7f3; }
.battle .answer-grid { width:min(1200px,100%); margin:0 auto; gap:18px; }
.battle .answer { min-height:64px; border:2px solid #edcb82; border-radius:20px; font-size:36px; }
.battle .command-footer { margin:8px 0 0; padding:0; justify-content:center; }
.battle .hint-button { min-height:44px; padding:7px 22px; border-radius:18px; }
.battle .combo { right:7%; bottom:5%; }
.battle.battle-typed:not(.with-hint) .command-panel { display:grid; grid-template-columns:1fr 1.15fr; grid-template-rows:auto auto 1fr; align-items:center; column-gap:30px; }
.battle.battle-typed:not(.with-hint) .command-panel h2 { grid-column:1; align-self:end; font-size:clamp(35px,4vw,54px); }
.battle.battle-typed:not(.with-hint) .question-caption { grid-column:1; }
.battle.battle-typed:not(.with-hint) .typed-answer { grid-column:2; grid-row:1/4; grid-template-columns:minmax(90px,1fr) minmax(170px,230px); width:100%; gap:15px; }
.battle.battle-typed:not(.with-hint) .command-footer { grid-column:1; grid-row:3; align-self:start; }
.battle.battle-typed .command-panel:before,.battle.battle-typed .command-panel:after { display:none; }
.battle .key { min-height:44px; }
.battle .answer-entry { border-color:#f1d292; background:linear-gradient(#06172c,#102e4b); box-shadow:inset 0 0 12px #0009; }
.battle .correct-feedback { font-size:24px; margin:12px 0; color:#b7fff0; }
.battle.is-correct .command-panel { display:flex!important; }
.battle.with-hint { height:auto; min-height:100dvh; grid-template-rows:82px max(250px,calc(100dvh - 344px)) auto; }
.battle.with-hint .command-panel { height:auto; min-height:250px; }
.encounter-hint { width:min(800px,100%); margin:0 auto 10px; }
body:has(dialog[open]) .battle *,body:has(dialog[open]) .battle *:before,body:has(dialog[open]) .battle *:after { animation-play-state:paused!important; }

/* Physical mission table, with real countable pieces. */
.battle.encounter-work { grid-template-rows:82px minmax(300px,1fr) 205px; }
.battle.encounter-work .nova-actor,.battle.encounter-secret .nova-actor,.battle.encounter-practice .nova-actor { left:-5%; width:25%; height:75%; bottom:0; }
.battle.encounter-work .bip-actor,.battle.encounter-secret .bip-actor,.battle.encounter-practice .bip-actor { right:0; width:17%; height:39%; bottom:17%; z-index:2; }
.battle.encounter-work .command-panel { display:flex!important; }
.battle.encounter-work .command-panel h2 { font-size:40px; }
.battle.encounter-work .question-caption { font-size:18px; margin-bottom:10px; }
.work-scene { position:relative; width:70%; margin:0 auto; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; z-index:3; --work-color:#eaca8a; }
.scene-milestones { display:flex; justify-content:center; gap:12px; margin:0 auto 12px; flex:none; }
.scene-milestones>span { width:30px; height:30px; border:1px solid #f3d191; border-radius:50%; display:grid; place-items:center; background:#081d37db; color:#7f9aab; box-shadow:0 3px 10px #0007; }
.scene-milestones .done { background:#37838a; color:#fff3a5; box-shadow:0 0 15px #7cfff6aa; }
.scene-milestones .icon { width:18px; }
.scene-counter { align-items:center; padding:6px 15px; border-radius:24px; background:#071b34db; color:#fff0bd; }
.work-platform { position:relative; width:100%; padding:16px 22px 18px; border-bottom:14px solid #5d4634; border-radius:30px 30px 22px 22px; background:linear-gradient(170deg,#c29d69,#725a45); box-shadow:inset 0 0 0 2px #ffe2a177,0 10px 0 #2f2a2b,0 15px 24px #0009; }
.work-platform:after { content:''; position:absolute; bottom:-7px; left:8%; right:8%; height:4px; background:#edc47a; opacity:.5; }
.physical-containers { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:start; gap:18px 16px; }
.physical-containers.many { grid-template-columns:repeat(5,minmax(0,1fr)); gap:13px; }
.physical-container { position:relative; padding:15px 9px 0; background:linear-gradient(#2f211f,#5b4430); border:3px solid #be8e4e; border-radius:9px 9px 14px 14px; box-shadow:inset 0 5px 6px #000a,0 6px 7px #0006; min-width:0; }
.physical-container.empty { background:#4b3d3290; border-style:dashed; border-color:#e9c89499; box-shadow:none; }
.container-lid { position:absolute; left:-3px; right:-3px; top:-7px; height:14px; border:2px solid #e0b773; border-radius:5px; background:linear-gradient(#dfbd82,#8f6035); transform:skewX(-5deg); }
.container-content { min-height:45px; display:grid; grid-template-columns:repeat(var(--unit-columns),minmax(0,1fr)); gap:4px; align-content:center; justify-items:center; padding-bottom:7px; }
.work-object { width:clamp(15px,2.3vw,29px); height:clamp(18px,2.5vw,32px); display:block; overflow:visible; filter:drop-shadow(0 2px 1px #0007); }
.container-front { height:16px; border-top:1px solid #f7d6a0; background:linear-gradient(#af824c,#7c532b); margin:0 -9px; display:flex; justify-content:space-around; }
.container-front i { height:100%; width:5px; background:#cfd5c2; border:1px solid #f8e0a1; }
.container-caption { display:block; text-align:center; color:#fff2cd; text-shadow:0 1px 2px #000; font-size:12px; line-height:19px; white-space:nowrap; background:#292325; margin:0 -9px; border-radius:0 0 8px 8px; }
.vessel-controls { display:flex; justify-content:center; gap:5px; padding:5px 0; margin:0 -6px; }
.vessel-controls .mini-button { min-height:44px; min-width:44px; padding:3px; border:1px solid #e9cc92; background:#112b47; }
.work-controls { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin:0; }
.work-controls .button { font-size:15px; padding:9px 15px; min-height:46px; }
.work-controls output { min-width:140px; color:#f8df9f; font-weight:700; }
.resource-reserve { display:flex; gap:8px; align-items:center; margin-right:8px; }
.resource-reserve .work-object { width:26px; height:29px; }
.work-scene-caption { color:#fff7df; font-weight:700; text-shadow:0 2px 4px #000; padding:9px 18px; border-radius:15px; margin:12px 0 8px; background:#071d31c9; font-size:14px; text-align:center; }
.work-scenery { width:70%; height:38px; display:flex; gap:10px; justify-content:center; align-items:flex-end; pointer-events:none; }
.work-scenery span { height:100%; width:20%; background:linear-gradient(#fff8be,#8ee8e6); clip-path:polygon(50% 0,100% 70%,85% 100%,15% 100%,0 70%); opacity:.35; }
.theme-jardins .physical-container { border-color:#9bba65; background:linear-gradient(#2b2924,#41462a); border-radius:5px 5px 25px 25px; }
.theme-jardins .container-front { background:linear-gradient(#a78759,#655c34); }
.theme-jardins .work-platform,.theme-foret .work-platform { background:repeating-linear-gradient(7deg,#765f43 0 23px,#463e32 24px 27px); border-color:#394b31; }
.theme-foret .physical-container { background:linear-gradient(#173a33,#305346); border-color:#9ec49b; }
.theme-foret .container-front { background:linear-gradient(#6e8964,#3b5948); }
.theme-cimes .physical-container { background:linear-gradient(#23395c,#527198); border-color:#bbe3ed; }
.theme-cimes .container-front,.theme-cimes .container-lid { background:linear-gradient(#d1eeff,#618cac); }
.theme-cimes .work-platform { background:linear-gradient(155deg,#c9e5ed,#607aaf); border-color:#384665; }
.theme-ruines .physical-container { border-color:#f2cd80; background:linear-gradient(#342d48,#6d5b50); }
.theme-coeur .physical-container { border-color:#badfe5; background:linear-gradient(#182d4c,#34506d); }
.theme-coeur .container-front,.theme-coeur .container-lid { background:linear-gradient(#e6e8d7,#7393a3); }
.theme-coeur .work-platform { background:linear-gradient(155deg,#dbe4dc,#617894); border-color:#374969; }
.work-success .physical-container.filled { animation:work-deliver .85s both; animation-delay:calc(var(--slot)*45ms); }
.work-success .container-content { filter:drop-shadow(0 0 8px var(--work-color)); }
.work-success .work-scenery span { opacity:1; filter:drop-shadow(0 0 8px var(--work-color)); }
@keyframes work-deliver { 0% { transform:translateY(0); } 45% { transform:translateY(-9px); box-shadow:0 0 18px var(--work-color); } 100% { transform:translateY(0); box-shadow:0 0 12px color-mix(in srgb,var(--work-color) 65%,transparent); } }
.theme-jardins.work-success .work-object { animation:sprout .8s both; transform-origin:bottom; }
@keyframes sprout { from{transform:scale(.7)} to{transform:scale(1)} }
.bip-cheers { animation:bip-cheer .7s ease-in-out!important; }
@keyframes bip-cheer { 50%{transform:translateY(-15px) rotate(6deg)} }
.device-scene { width:55%; height:100%; margin:auto; position:relative; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; z-index:2; }
.device-scene .story-object { height:65%; max-height:290px; width:70%; overflow:visible; filter:drop-shadow(0 0 14px #74cfff88); z-index:1; }
.device-orbit { position:absolute; border:2px solid #a4f9ef99; width:64%; height:30%; left:18%; bottom:17%; border-radius:50%; transform:rotate(-12deg); box-shadow:0 0 28px #42dcff44; }
.device-base { width:72%; height:33px; border:3px solid #d6bd81; border-radius:50%; background:radial-gradient(ellipse,#76e7df,#173350 60%,#04172e); box-shadow:0 9px 0 #21364c,0 14px 15px #0008; }
.device-scene>p { padding:13px 5px 8px; color:#f4f1d6; text-shadow:0 2px 4px #000; text-align:center; }
.device-scene.activated .story-object { filter:drop-shadow(0 0 25px #f6e599); animation:activate-object .9s both; }
@keyframes activate-object { 50%{transform:translateY(-12px) scale(1.04);filter:drop-shadow(0 0 35px #8ffffb)} }
.finished-work .work-scene { width:100%; min-height:350px; height:auto; }
.finished-work { width:min(760px,95vw)!important; }

/* The illustrated album is a real open book; card content remains accessible HTML. */
body[data-screen="album"] { background:#06182e url('../assets/images/album-sanctuary.webp') center/cover fixed; }
.album-page.page-width { width:min(1570px,100%); max-width:none; padding:14px 12px 24px; }
.album-title { width:63%; display:block; text-align:center; margin:0 0 7px; }
.album-title h1 { font-size:38px; color:#fff0b7; text-shadow:0 3px 3px #000; }
.album-title p { font-size:18px; }
.album-layout { position:relative; display:grid; grid-template-columns:64% 36%; gap:0; padding:32px 4.8% 50px; background:url('../assets/images/album-book.webp') center/100% 100% no-repeat; min-height:610px; }
.album-layout>section { padding-right:7%; }
.album-filters { gap:8px; margin:0 0 15px; display:grid; grid-template-columns:repeat(4,1fr); }
.album-filters .button { padding:7px 9px; border-radius:22px; min-height:44px; font-size:15px; }
.card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px 18px; max-width:none; }
.card-button { min-width:0; padding:0; background:transparent; border:0; border-radius:15px; }
.collectible { position:relative; aspect-ratio:2/3; border:4px solid #d7af60; border-radius:16px 16px 21px 21px; padding:5px; background:var(--ornament); box-shadow:inset 0 0 0 1px #fff2b6,0 0 0 2px #3b2f23,0 6px 8px #000a; overflow:visible; }
.collectible:before { content:''; position:absolute; inset:4px; border:1px solid #fff4b5; border-radius:9px; pointer-events:none; z-index:3; box-shadow:inset 0 0 0 2px #6c4e2f; }
.collectible:after { content:'◆'; position:absolute; left:calc(50% - 12px); top:-15px; width:24px; font-size:24px; color:#9dfaff; text-shadow:2px 0 #8e5e27,-2px 0 #ffe8a1,0 2px #ffd181,0 -2px #fff0b0,0 0 8px #38dfff; z-index:4; }
.collectible>img { width:100%; height:100%; object-fit:cover; border-radius:9px; }
.collectible strong { bottom:7px; left:7px; right:7px; min-height:34px; padding:7px 3px; font-size:16px; border:1px solid #f3cb78; border-radius:18px 18px 9px 9px; background:linear-gradient(#16395b,#061329); color:#fff0be; text-shadow:0 2px #000; }
.card-button.selected { outline:none; }
.card-button.selected .collectible { box-shadow:0 0 0 3px #9af6ff,0 0 20px #4cdfff,inset 0 0 0 1px #fff2b6; }
.tier-2 { border-color:#ffe0a0; }
.tier-3 { border-color:#ffe89a; box-shadow:0 0 16px #ffc860; }
.foil { inset:6px; border-radius:10px; }
.album-detail.glass { border:0; padding:0 0 0 10%; background:none; box-shadow:none; border-radius:0; }
.album-detail .card-detail { text-align:center; }
.album-detail .collectible { width:min(100%,240px); max-height:none; margin:0 auto 14px; }
.album-detail h2 { font-size:25px; margin:6px 0; color:#fff4d5; }
.album-detail .card-tier { border:1px solid #e2bb70; border-radius:20px; color:#ffe6a4; padding:3px 18px; display:inline-block; margin:0 0 7px; }
.album-detail p { line-height:1.5; margin:6px 0; font-size:15px; text-shadow:0 2px 3px #000; }
.album-detail small { font-size:11px; line-height:1.4; display:block; margin:6px 0; }
.album-detail .button { margin-top:8px; }
.album-pagination { margin:12px 0 0; gap:18px; }
.training-page { padding-top:20px; }
.training-form { border-radius:25px; }
.training-intro h1 { color:#ffe5a1; }
.victory-panel { border:2px solid #efc678; border-radius:30px; }

@media (min-width:1000px) and (max-height:800px) {
  .main-header { min-height:68px; padding-top:8px; padding-bottom:8px; }
  .album-page { padding-top:4px!important; }
  .album-title { margin-bottom:0; }
  .album-title h1 { font-size:29px; }
  .album-title p { font-size:15px; }
  .album-layout { min-height:0; padding-top:26px; padding-bottom:34px; }
  .card-grid { max-width:570px; margin:auto; gap:10px 17px; }
  .collectible { aspect-ratio:2/2.7; }
  .album-filters { margin-bottom:10px; }
  .album-detail .collectible { width:170px; aspect-ratio:2/3; margin-bottom:9px; }
  .album-detail h2 { font-size:23px; }
  .album-detail p { font-size:13px; }
  .album-detail small { font-size:10px; }
  .album-pagination { margin-top:8px; }
}
@media (min-width:601px) and (max-width:1000px) {
  .battle { grid-template-rows:78px minmax(260px,1fr) 260px; padding-left:10px; padding-right:10px; }
  .battle .battle-header { grid-template-columns:1fr 2fr 1fr; height:78px; }
  .battle-header .battle-location { display:none; }
  .battle .command-panel { padding:14px 20px; }
  .battle.encounter-work { grid-template-rows:78px minmax(370px,1fr) 245px; }
  .work-scene { width:80%; }
  .work-platform { padding-left:12px; padding-right:12px; }
  .physical-containers.many { gap:10px; }
  .battle.encounter-work .nova-actor { width:22%; left:-8%; height:60%; }
  .battle.encounter-work .bip-actor { width:15%; right:-4%; height:28%; bottom:35%; }
  .work-controls .button { font-size:14px; }
  .work-controls output { min-width:100px; }
  .album-layout { min-height:0; padding:30px 5% 40px; }
  .album-filters { grid-template-columns:repeat(2,1fr); }
  .album-detail { display:block!important; }
  .album-detail .collectible { width:min(100%,180px); }
  .album-detail p { font-size:13px; }
  .collectible strong { font-size:12px; }
}
@media (min-width:601px) and (orientation:portrait) {
  .battle { grid-template-rows:90px minmax(300px,1fr) 300px; }
  .battle .battle-header { height:90px; }
  .battle .nova-actor { width:43%; height:90%; left:0; bottom:0; }
  .battle .guardian-actor { width:65%; height:100%; right:-5%; bottom:-7%; }
  .battle.battle-typed:not(.with-hint) .command-panel { grid-template-columns:.8fr 1.2fr; column-gap:14px; }
  .battle.battle-typed:not(.with-hint) .typed-answer { grid-template-columns:1fr; gap:7px; width:min(300px,100%); }
  .battle .answer-entry { height:54px; }
  .battle.encounter-work .work-scene { width:83%; }
  .battle.encounter-work .nova-actor { width:24%; left:-9%; height:54%; }
}
@media (min-width:601px) and (max-height:800px) {
 .album-detail .collectible { width:150px; }
 .album-detail p { font-size:13px; }
 .card-grid .collectible strong { font-size:12px; padding:4px 2px; }
 .encounter-work .scene-milestones { margin-bottom:6px; gap:8px; }
 .encounter-work .scene-milestones>span { width:24px; height:24px; }
 .encounter-work .work-installation { height:28px; margin-bottom:4px; }
 .encounter-work .work-platform { padding:8px 14px; border-bottom-width:8px; }
 .encounter-work .container-art { height:90px; }
 .encounter-work .vessel-art { height:62px; }
 .encounter-work .physical-containers { gap:10px 12px; }
 .encounter-work .work-scene-caption { margin:9px 0 6px; padding:6px 12px; }
 .encounter-work [data-work-kind="share"] .container-content { top:10px; height:32px; left:34%; right:34%; }
}
@media (min-width:601px) and (max-height:800px) {
 .album-detail .collectible { width:150px; }
 .album-detail p { font-size:13px; }
 .card-grid .collectible strong { font-size:12px; padding:4px 2px; }
}
@media (max-width:600px) {
  .main-header nav { border:0; background:none; padding:0; }
  .location-button,.location-button:hover:not(:disabled) { transform:translate(-50%,-50%); }
  .battle,.battle.encounter-work { display:flex; flex-direction:column; height:auto; min-height:100dvh; padding:0 8px 10px; }
  .battle .battle-header { height:78px; min-height:78px; grid-template-columns:45px 1fr 45px; padding:9px 0; gap:5px; }
  .battle .enemy-heading h1 { font-size:23px; }
  .battle .battle-actions .icon-button { width:44px; height:44px; }
  .battle .arena,.battle.battle-typed .arena,.battle.with-hint .arena { height:280px; min-height:280px; }
  .battle .nova-actor { width:54%; height:105%; left:-9%; bottom:-4%; }
  .battle .guardian-actor { width:70%; height:113%; right:-8%; bottom:-10%; }
  .battle .command-panel,.battle.battle-typed:not(.with-hint) .command-panel { display:flex; padding:20px 14px 12px; border-radius:24px; height:auto; min-height:230px; gap:0; }
  .battle .command-panel:before,.battle .command-panel:after { width:16%; top:37px; }
  .battle .command-panel h2,.battle.battle-typed:not(.with-hint) .command-panel h2 { font-size:36px; }
  .battle .question-caption { font-size:14px; }
  .battle .answer-grid { grid-template-columns:repeat(2,1fr); gap:10px; }
  .battle .answer { min-height:58px; font-size:29px; }
  .battle.battle-typed:not(.with-hint) .typed-answer { display:grid; grid-template-columns:1fr; gap:10px; width:100%; }
  .battle .answer-entry { height:54px; }
  .battle .key { min-height:44px; }
  .battle .combo { font-size:12px; right:0; bottom:0; }
  .battle.encounter-work .arena { height:auto; min-height:330px; padding-top:35px; }
  .battle.encounter-work .nova-actor { display:none; }
  .battle.encounter-work .bip-actor { height:65px; width:65px; top:-10px; right:0; bottom:auto; }
  .battle.encounter-work .work-scene { width:100%; height:auto; }
  .physical-containers,.physical-containers.many { grid-template-columns:repeat(3,minmax(0,1fr)); gap:15px 10px; }
  .work-platform { padding:14px 10px; }
  .physical-container { padding:10px 5px 0; }
  .container-front,.container-caption { margin-left:-5px; margin-right:-5px; }
  .container-content { gap:2px; min-height:42px; }
  .work-object { width:16px; height:20px; }
  .vessel-controls { gap:3px; margin:0 -9px; }
  .vessel-controls .mini-button { min-width:44px; width:44px; }
  .physical-containers.many:has(.vessel-controls) { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .work-controls { display:grid; grid-template-columns:1fr; width:100%; }
  .work-controls output { text-align:center; }
  .resource-reserve { justify-content:center; font-size:14px; }
  .work-scene-caption { font-size:12px; margin:10px 0; }
  .device-scene { width:62%; }
  .battle.encounter-secret .nova-actor,.battle.encounter-practice .nova-actor { width:34%; left:-7%; height:65%; }
  .battle.encounter-secret .bip-actor,.battle.encounter-practice .bip-actor { width:24%; right:-3%; height:30%; }
  .device-scene>p { font-size:12px; }
  .album-page.page-width { padding:18px 12px; }
  .album-title { width:100%; margin:0 0 20px; }
  .album-title h1 { font-size:32px; }
  .album-layout { display:block; background:linear-gradient(#091e3ddd,#07162bea); border:1px solid #d8b775; border-radius:22px; padding:18px 10px; min-height:0; }
  .album-layout>section { padding:0; }
  .album-filters { grid-template-columns:repeat(2,1fr); gap:7px; }
  .card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:17px 12px; }
  .collectible strong { font-size:12px; }
  .album-detail.glass { display:none; }
  .finished-work .work-scene { min-height:0; }
  .victory-page .finished-work { margin-top:25px; }
}
@media (prefers-reduced-motion:reduce) { .work-success *, .activated *, .bip-cheers { animation:none!important; } }
.reduced-motion .work-success *,.reduced-motion .activated *,.reduced-motion .bip-cheers { animation:none!important; }
.theme-rivages.work-success[data-work-kind="groups"] .physical-container.filled { animation-name:load-cargo; }
.theme-jardins.work-success[data-work-kind="share"] .work-object { animation:water-flow .8s both; }
.theme-foret.work-success .container-content,.theme-coeur.work-success .container-content { animation:connection-light .9s both; }
.theme-cimes.work-success .physical-container.filled { animation-name:build-crystal; }
@keyframes load-cargo { 45%{transform:translate(8px,-6px)} 100%{transform:translate(0,0);filter:drop-shadow(0 0 7px #ffdb8c)} }
@keyframes water-flow { 45%{transform:translateY(7px);filter:drop-shadow(0 0 8px #79eeff)} 100%{transform:translateY(0)} }
@keyframes connection-light { 45%{filter:brightness(1.6) drop-shadow(0 0 12px #a0fff6)} }
@keyframes build-crystal { 0%{transform:translateY(5px)} 65%{transform:translateY(-5px)} 100%{transform:translateY(0);filter:drop-shadow(0 0 6px #abddff)} }

/* Illustrated empty props hold countable SVG pieces; their geometry never depends on an answer. */
.physical-containers { grid-template-columns:repeat(var(--container-columns),minmax(0,240px)); justify-content:center; }
.physical-containers.many { grid-template-columns:repeat(var(--container-columns),minmax(0,170px)); }
.work-scene .physical-container { background:none; border:0; box-shadow:none; padding:0; border-radius:0; }
.container-art,.vessel-art { display:block; width:100%; aspect-ratio:5/3; object-fit:contain; }
.container-content { position:absolute; left:16%; right:16%; top:17%; height:40%; min-height:0; padding:0; gap:2px; overflow:auto; }
.container-content .work-object { width:100%; max-width:29px; height:auto; max-height:30px; }
.physical-container.empty .container-art { opacity:.32; filter:saturate(.4); }
.container-caption { margin:0; border:1px solid #b8a06c88; border-radius:12px; background:#11253ed9; }
.work-platform { background:repeating-linear-gradient(2deg,#846a4a30 0 2px,transparent 3px 10px),linear-gradient(155deg,#6f6656,#323b40); border-color:#25313b; }
.vessel-controls { margin:0; }
[data-work-kind="share"] .container-content { left:29%; right:29%; top:21%; height:34%; }
[data-work-kind="share"] .physical-container:has(.vessel-controls) .container-content { height:25%; top:15%; }
.work-installation { width:min(360px,85%); height:68px; flex:none; color:var(--work-color); margin-bottom:8px; }
.work-installation g { opacity:.2; }
.work-installation g.built { opacity:1; filter:drop-shadow(0 0 3px var(--work-color)); }
.battle.encounter-work .nova-actor { left:-1%; width:21%; }
.battle.encounter-work.with-hint { grid-template-rows:82px max(300px,calc(100dvh - 299px)) auto; }
.battle.encounter-work.with-hint .command-panel { min-height:205px; }
@media (min-width:601px) and (max-width:1000px) {
 .battle.encounter-work .nova-actor { left:-3%; width:20%; }
 .work-installation { height:54px; }
}
@media (max-width:600px) {
 .physical-containers,.physical-containers.many { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .work-installation { height:48px; }
 .container-content .work-object { max-height:22px; }
}
.collectible:after { bottom:auto; right:auto; height:24px; border:0; background:none; box-shadow:none; transform:none; }
.album-detail.glass { backdrop-filter:none; }
@media (min-width:601px) {
 .album-title { margin:0; }
 .album-title h1 { font-size:30px; }
 .album-title p { font-size:16px; }
 .album-layout { min-height:0; padding-top:32px; padding-bottom:30px; background-size:100% 120%; }
 .card-grid { grid-template-columns:repeat(3,minmax(0,1fr)); width:min(100%,calc(100dvh - 360px)); margin:auto; gap:14px; }
 .card-grid .collectible { aspect-ratio:2/3; }
 .album-detail .collectible { width:min(100%,calc((100dvh - 350px)*.44)); }
 .album-detail p { font-size:14px; }
 .album-layout>section { padding-top:10px; }
}
@media (min-width:601px) {
 .battle { --scene-head:82px; --scene-size:max(250px,calc(100dvh - 344px)); }
 .battle.encounter-work { --scene-size:max(300px,calc(100dvh - 299px)); }
 .battle.with-hint,.battle.encounter-work.with-hint { grid-template-rows:var(--scene-head) var(--scene-size) auto; }
}
@media (min-width:601px) and (max-width:1000px) {
 .battle { --scene-head:78px; --scene-size:max(260px,calc(100dvh - 350px)); }
 .battle.encounter-work { --scene-size:max(370px,calc(100dvh - 335px)); }
}
@media (min-width:601px) and (orientation:portrait) {
 .battle { --scene-head:90px; --scene-size:max(300px,calc(100dvh - 402px)); }
 .battle.encounter-work { --scene-head:90px; --scene-size:max(370px,calc(100dvh - 347px)); grid-template-rows:90px var(--scene-size) 245px; }
 .battle.encounter-work.with-hint { grid-template-rows:90px var(--scene-size) auto; }
}
@media (min-width:601px) and (max-height:800px) {
 .album-detail .collectible { width:150px; }
 .album-detail p { font-size:13px; }
 .card-grid .collectible strong { font-size:12px; padding:4px 2px; }
}
