/* Carthage: questions and choices live in the environment. */
.playing main{position:relative;max-width:460px;padding:0;margin:auto}
.playing .topbar{z-index:12;max-width:460px;color:#fff1d2}
.playing .brand{color:#fff0d0;text-shadow:0 1px 8px #000}
.playing .brand svg{color:#f2d18b}
.playing .icon-button{border-color:#d6b77b70;color:#ffe5af;background:#1b2a2290;min-height:38px;min-width:38px}
.chapter-root{position:relative;min-height:700px;height:100svh;width:100%;overflow:hidden;background:#675735}
.chapter-world{position:absolute;inset:0;background-size:cover;background-position:center center}
.chapter-world.world-harbor{background-image:url('assets/punic-harbor.webp');background-position:51% center}
.chapter-world.world-temple{background-image:url('assets/punic-temple-mobile.webp')}
.chapter-world.world-courtyard{background-image:url('assets/punic-courtyard-mobile.webp')}
.chapter-world.world-sanctuary{background-image:url('assets/punic-sanctuary.webp');background-position:50% center}
.chapter-shade{position:absolute;inset:0;pointer-events:none;background:linear-gradient(180deg,#0e252bc7 0%,#11292a38 24%,transparent 38%,transparent 65%,#14252060)}
.chapter-heading{position:absolute;top:78px;left:20px;right:20px;z-index:5;display:flex;justify-content:space-between;align-items:center;gap:12px;color:#fff0d1;text-shadow:0 2px 9px #00171d}
.chapter-heading span{display:block;font-size:8px;letter-spacing:1.6px;color:#ebd2a0;margin-bottom:7px}
.chapter-heading h1{font:500 29px/1.03 var(--serif);margin:0}
.journal-button{flex-shrink:0;width:43px;height:43px;background:#173028b0;color:#eed3a0;border:1px solid #ddc28b80;border-radius:50%}
.journal-button svg{width:21px;height:21px}
.chapter-stats{position:absolute;top:144px;left:20px;right:20px;z-index:5;display:flex;gap:14px;align-items:center;font-size:11px;color:#f9e3b2;text-shadow:0 1px 6px #000}
.chapter-stats>span{display:flex;align-items:center;gap:4px;white-space:nowrap;background:#12302aac;border:1px solid #ddc18a40;padding:6px 8px;border-radius:7px}
.chapter-stats svg{height:16px;width:16px}
.chapter-stats>button{border:0;background:transparent;color:#f5dfb3;font-size:10px;display:flex;gap:5px;align-items:center;min-height:38px;padding:3px 0;text-shadow:0 1px 8px #000;margin-left:auto}
.chapter-task{position:absolute;bottom:max(14px,env(safe-area-inset-bottom));left:14px;right:14px;z-index:9;background:linear-gradient(135deg,#263024ef,#172f2de8);border:1px solid #d1b06b90;border-radius:12px;padding:16px 17px 9px;color:#fff1d2;backdrop-filter:blur(13px);box-shadow:0 10px 28px #0004}
.chapter-steps{display:flex;position:absolute;left:15px;right:15px;top:0;gap:5px}
.chapter-steps span{height:2px;flex:1;border-radius:2px;background:#b5a87a38}
.chapter-steps .done{background:#a6c18c}
.chapter-steps .current{background:#f2c874}
.task-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}
.task-heading>span{font-size:8px;letter-spacing:1.5px;color:#e8c98b}
.listen-instruction{background:transparent;border:0;color:#ebd7a7;font-size:10px;min-height:28px;padding:0 4px}
.chapter-task h2{font:500 17px/1.45 var(--sans);margin:0 0 7px;color:#fff3d8}
.chapter-task h2:focus{outline:none}
.gesture-instruction{font-size:11px;line-height:1.6;margin:0 0 9px;color:#d5d9c3}
.chapter-tools{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#aebbab;font-size:8px;padding-top:3px}
.chapter-tools button{font-size:10px;background:none;border:0;color:#e7c782;min-height:35px;padding:0;display:flex;gap:4px;align-items:center}
.chapter-tools button:disabled{opacity:.5}
.chapter-tools svg{height:15px;width:15px}
.enter-temple{width:100%;min-height:44px;padding:11px 13px;font-size:12px;gap:8px;margin:4px 0}
.enter-temple:disabled{background:#a0a08035;color:#d5d9b9;box-shadow:none;border:1px solid #b9b38944;font-size:11px}
.quay-object{position:absolute;z-index:3;display:flex;align-items:center;flex-direction:column;gap:7px;background:none;border:0;color:#ffe4a5;padding:12px;min-height:88px;min-width:74px;filter:drop-shadow(0 0 12px #bc914b80);transform:translate(-50%,-50%)}
.quay-object>span:last-child{font-size:10px;background:#1a3127da;border:1px solid #d9c08b66;border-radius:12px;padding:6px 8px;color:#ffe4b0;white-space:nowrap;box-shadow:0 2px 7px #0006}
.quay-object.discovered>span:last-child:after{content:' ✓';color:#b5d8a0}
.old-map{left:46%;top:55%;animation:object-glow 3s infinite}
.old-map svg{height:61px;width:61px;padding:9px;background:linear-gradient(140deg,#d0b47e,#8f7341);border:1px solid #f3dbaa;border-radius:4px;transform:rotate(-12deg);color:#593e20;box-shadow:0 3px 12px #0007}
.coin-pouch{left:79%;top:45%}
.pouch-shape{display:grid;place-items:center;height:51px;width:48px;background:linear-gradient(140deg,#a47d43,#573f21);border:1px solid #e8c581;border-radius:16px 16px 24px 24px;font-size:31px;color:#f1c469;box-shadow:0 5px 9px #0005}
.pouch-shape:before{content:'';position:absolute;top:7px;width:30px;height:9px;background:#b59d5d;border:1px solid #f3d8a0;border-radius:3px}
.amphora{left:19%;top:46%}
.amphora-shape{position:relative;height:66px;width:36px;background:linear-gradient(90deg,#744720,#bb8243 45%,#855322);border-radius:7px 7px 19px 19px;border:1px solid #ddad66;clip-path:polygon(30% 0,70% 0,66% 21%,89% 36%,100% 52%,91% 80%,65% 100%,35% 100%,9% 80%,0 52%,11% 36%,34% 21%)}
.world-answers{position:absolute;z-index:4;left:20px;right:20px;top:43%;display:flex;gap:9px;justify-content:center;align-items:flex-end}
.world-answer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;flex:1;min-width:0;color:#3b301e;background:linear-gradient(140deg,#e2c798,#b08b53);border:2px solid #e5c591;border-radius:37px 37px 8px 8px;min-height:144px;padding:16px 7px;box-shadow:inset 0 0 16px #6f4a1940,0 8px 14px #07141780;transition:transform .3s,background .3s,box-shadow .3s;text-shadow:0 1px 1px #ffedc4;font-weight:700;font-size:12px;line-height:1.35}
.world-answer svg{height:31px;width:31px;flex-shrink:0;color:#705226}
.world-answer:hover:not(:disabled){transform:translateY(-5px);border-color:#ffde91;box-shadow:0 0 25px #ffe3a26b}
.world-answer.activated{background:linear-gradient(150deg,#f5df9e,#cfaa59);border-color:#ffeab4;box-shadow:0 0 35px #ffe5a999;transform:translateY(-8px)}
.world-answer.activated svg{color:#3f6738}
.world-answer.eliminated{opacity:.32;filter:grayscale(1);box-shadow:none}
.world-answer small{font-size:8px}
.paths{top:43%;gap:10px}
.paths .world-answer{min-height:147px;border-radius:9px 9px 50px 50px;background:linear-gradient(160deg,#173d47cc,#7c785794);border-color:#d6cc9c;color:#fff1cc;text-shadow:0 2px 4px #0e242a;padding-bottom:26px;position:relative;box-shadow:0 10px 0 #b79e6860,0 20px 0 #d4b78025}
.paths .world-answer:after{content:'↑';font-size:23px;color:#e7d5a2;line-height:18px}
.paths .world-answer svg{color:#e5d4a3}
.paths .world-answer.activated{background:#647d5bdc;box-shadow:0 0 24px #eee1a680,0 35px 20px #ffe5ab38}
.door-light,.route-light,.secret-passage{position:absolute;pointer-events:none;opacity:0;transition:opacity 1.1s}
.door-light{top:24%;left:44%;width:15%;height:43%;background:linear-gradient(#ffeaaa40,#fff0bde0);filter:blur(12px)}
.route-light{top:27%;left:46%;width:9%;height:47%;background:#fcf3bb88;filter:blur(20px);transform:perspective(400px) rotateX(-15deg)}
.secret-passage{top:23%;left:34%;width:27%;height:44%;border:2px solid #ebd8a07a;background:radial-gradient(#faf2c4bb,#17352b10);box-shadow:0 0 34px #eddaa66a;filter:blur(5px)}
.world-unlocked .door-light,.world-unlocked .route-light,.world-unlocked .secret-passage{opacity:1}
.engraving{position:absolute;z-index:4;transform:translate(-50%,-50%);width:52px;height:52px;border:1px solid #caaa6a90;border-radius:9px;background:linear-gradient(135deg,#caad79b3,#78674acc);color:#3f3527;box-shadow:inset 0 0 9px #37241744,0 3px 9px #0003;padding:10px;opacity:.91}
.engraving svg{width:100%;height:100%}
.engraving.found,.engraving.hinted{background:#eed28eba;color:#4c6539;box-shadow:0 0 24px #ffe4a6;border-color:#fff0c1}
.engraving.hinted{animation:object-glow 1.8s infinite}
.sanctuary-engine{position:absolute;z-index:3;left:50%;top:27%;transform:translateX(-50%);width:150px;height:150px;border:2px solid #d7b573b0;border-radius:50%;background:radial-gradient(#d6bb7940,#2b3526cc);box-shadow:0 0 24px #c6a35c50,inset 0 0 30px #bd9d5650}
.engine-core{position:absolute;inset:30px;display:grid;place-items:center;color:#d3b26b;opacity:.7}
.engine-core svg{width:59px;height:59px}
.engine-seal{position:absolute;display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#384338;border:1px solid #e2c58a90;color:#9a926d;transition:.4s}
.engine-seal svg{height:22px;width:22px}
.seal-0{top:-18px;left:55px}.seal-1{bottom:4px;left:-9px}.seal-2{bottom:4px;right:-9px}
.engine-seal.active{background:#e9c678;color:#385f3d;box-shadow:0 0 19px #ffe6a3}
.world-unlocked .engine-core{color:#fff0b6;opacity:1}
.final-tablets{top:53%;gap:8px}
.final-tablets .world-answer{min-height:106px;border-radius:8px;padding:11px 6px;font-size:11px;gap:7px}
.final-tablets svg{height:23px;width:23px}
.take-relic{position:absolute;z-index:4;top:44%;left:50%;transform:translate(-50%,-50%);height:170px;width:190px;border:1px solid #ffe6a280;border-radius:50%;background:radial-gradient(#f5de9945,#ecc98708);color:#fff0bb;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:23px;box-shadow:0 0 60px #f7d08766;animation:relic-glow 3s infinite}
.take-relic svg{height:82px;width:115px;filter:drop-shadow(0 3px 4px #50461c)}
.take-relic span{font-size:12px;font-weight:600;text-shadow:0 2px 7px #271d11;background:#17352ccd;padding:8px 13px;border-radius:20px}
.relic-light{position:absolute;top:23%;bottom:25%;left:35%;right:35%;background:linear-gradient(#ffe6a855,#ffefd680);filter:blur(35px);pointer-events:none}
.chapter-feedback{padding:10px 12px;margin:8px 0 3px;border:1px solid #a88e5750;border-radius:8px;background:#584b2bbd;font-size:11px;line-height:1.6;color:#f3e5ba}
.chapter-feedback strong,.chapter-feedback span,.chapter-feedback small{display:block}
.chapter-feedback strong{font-size:11px;margin-bottom:3px}
.chapter-feedback.success{background:#2c503de6;color:#f0f5da;border-color:#9eab7580}
.chapter-feedback.error{background:#623c2dcc;color:#ffe0c0;border-color:#bc8b7050}
.chapter-feedback small{font-size:9px;opacity:.7;margin-top:4px}
.inline-hint{font-size:11px;line-height:1.6;border-left:2px solid #d1b06b;padding-left:10px;color:#f4db9b;margin:7px 0}
.chapter-motes{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.chapter-motes i{position:absolute;left:20%;top:54%;height:3px;width:3px;border-radius:50%;background:#ffe3a0;animation:motes 7s infinite}.chapter-motes i:nth-child(2){left:74%;animation-delay:2s}.chapter-motes i:nth-child(3){left:47%;animation-delay:4s}
.guiding .chapter-task,.guiding .chapter-stats,.guiding .journal-button{visibility:hidden;pointer-events:none}
.hint-choices{display:grid;gap:10px;margin:20px 0}
.hint-choices button{display:flex;justify-content:space-between;align-items:center;gap:10px;text-align:left}
.hint-choices button:disabled{opacity:.5}
.hint-choices span{font-size:11px;color:#887444;white-space:nowrap}
.journal-balances{display:flex;gap:20px;padding:13px 16px;border:1px solid var(--line);border-radius:9px;font-size:14px;margin-bottom:20px}
.journal-balances span{display:flex;gap:8px;align-items:center}
.journal-balances svg{color:#b68c3b}
.inventory-list{list-style:none;padding:0;margin:0 0 20px}
.inventory-list li{border-bottom:1px solid var(--line);padding:13px 0}
.inventory-list p{margin:5px 0 0;font-size:12px}
.discovery-reward{padding:12px 16px;background:#e4efd9;color:#3f6a43;border-radius:8px;margin:20px 0;font-size:14px;font-weight:600}
#dialog{max-height:calc(100svh - 40px);overflow:auto}
.chapter-complete{min-height:100svh;background:linear-gradient(#102829bb,#0d2329f5),url('assets/punic-sanctuary.webp') center/cover;color:#fff0d2;padding:30px 23px;text-align:center;margin-top:0}
.chapter-complete>.eyebrow{justify-content:center;font-size:8px;letter-spacing:1.5px;color:#eed395;margin:10px 0 25px}
.completion-eye{width:108px;height:108px;margin:0 auto 23px;border:1px solid #d9ba78;border-radius:50%;display:grid;place-items:center;background:#e8c37c15;box-shadow:0 0 50px #eac47733;color:#f1d18c}
.completion-eye svg{width:70px;height:70px}
.completion-eye .completion-eye-img{width:86px;height:86px;object-fit:contain;filter:drop-shadow(0 0 22px #eac4774d)}
body:has(.chapter-complete) .topbar .brand .brand-logo{height:92px}
body:has(.chapter-complete) .topbar .brand{position:absolute;left:16px;top:16px;transform:none;z-index:30}
.carthage-complete{background-size:100% 100%,100% 100%;background-attachment:scroll;min-height:100svh;padding-top:120px}
.carthage-complete .completion-eye{border:0;border-radius:0;background:none;box-shadow:none}
.carthage-complete .completion-eye .completion-eye-img{width:104px;height:104px}
.carthage-complete>.eyebrow{font-size:13px;letter-spacing:2px}
.carthage-complete>p{font-size:16px}
.chapter-complete h1{font:500 39px/1.06 var(--serif);margin:0 0 18px;color:#ffe1a3}
.chapter-complete>p{font-size:12px;line-height:1.8;color:#d7ddcc;margin-bottom:22px}
.map-fragments{display:flex;flex-direction:column;align-items:center;gap:3px;margin-bottom:25px;color:#758d81}
.map-fragments span{display:block;line-height:0}
.map-fragments img{height:34px;width:auto;display:block;filter:grayscale(1) brightness(.38) sepia(.35);opacity:.55;transition:filter .3s,opacity .3s}
.map-fragments .collected img{filter:drop-shadow(0 2px 6px #0008);opacity:1}
.map-fragments .map-fragment-single img{height:96px;filter:drop-shadow(0 4px 14px #000a)}
.completion-rewards{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:24px 0}
.completion-rewards strong{display:block;font:600 30px var(--serif);color:#ffe0a4;margin-bottom:3px}
.chapter-complete .completion-rewards small{display:block;font-size:16px;line-height:1.4;color:#d3d9be;overflow-wrap:break-word}
.chapter-complete .completion-rewards+p{font-size:18px;line-height:1.6}
.chapter-complete>.primary,.chapter-complete>.secondary{width:100%;margin:8px 0;font-size:13px}
.chapter-complete>.secondary{color:#ffe3b0;border-color:#d4b88370;background:#d6c17e0a}
.perfect-badge{font-size:11px;border:1px solid #c4b77a55;background:#c0c47817;border-radius:20px;padding:9px 12px;color:#e8e9b2;margin:0 0 20px}
.expedition-details{border-top:1px solid #b6aa7955;border-bottom:1px solid #b6aa7955;margin:22px 0;text-align:left}
.expedition-details summary{padding:15px 4px;cursor:pointer;font-size:12px;color:#eed299}
.expedition-details dl{margin:0 0 15px;padding:0 4px}
.expedition-details dl>div{display:flex;justify-content:space-between;gap:10px;padding:6px 0;font-size:11px;color:#d3ddc9}
.expedition-details dd{color:#ffe0a3;margin:0}
.next-expedition{display:flex;align-items:center;gap:13px;text-align:left;padding:14px 17px;border:1px solid #b3a37255;border-radius:10px;margin:20px 0}
.next-expedition svg{height:27px;width:27px;color:#d1b777;flex-shrink:0}
.next-expedition strong{display:block;font-size:12px;margin-bottom:5px;color:#f1d799}
.next-expedition span{font-size:11px;color:#b9c6b5}
.chapter-complete>.completion-footnote{font-size:16px;line-height:1.6;color:#acbdae}
.wrong{animation:wrong-shake .35s}
@keyframes wrong-shake{20%,60%{margin-left:-5px}40%,80%{margin-left:5px}}
@keyframes object-glow{50%{filter:drop-shadow(0 0 20px #ffe2a499)}}
@keyframes relic-glow{50%{box-shadow:0 0 75px #ffe4a58c}}
@media(min-width:721px){.chapter-root{height:min(100svh,850px);min-height:700px}.chapter-complete{min-height:min(100svh,850px)}}
@media(max-width:350px){.chapter-heading{left:16px;right:16px}.chapter-heading h1{font-size:25px}.chapter-stats{left:16px;right:16px;gap:7px;font-size:10px}.chapter-stats>button{font-size:9px}.chapter-stats svg{width:14px;height:14px}.world-answers{left:12px;right:12px;gap:6px}.world-answer{font-size:10px;padding:13px 6px;min-height:124px}.paths .world-answer{min-height:130px}.chapter-task{left:10px;right:10px;padding-inline:13px}.chapter-task h2{font-size:15px}.final-tablets .world-answer{font-size:10px}.chapter-complete h1{font-size:35px}}
@media(max-height:700px){.chapter-root{min-height:640px}.chapter-heading{top:71px}.chapter-heading h1{font-size:25px}.chapter-stats{top:130px}.chapter-task{padding-top:11px;padding-bottom:6px;bottom:max(10px,env(safe-area-inset-bottom))}.task-heading{margin-bottom:5px}.chapter-task h2{font-size:15px}.gesture-instruction{font-size:10px;margin-bottom:5px}.world-answer{min-height:123px}.paths .world-answer{min-height:129px}.sanctuary-engine{height:120px;width:120px;top:29%}.seal-0{left:40px}.engine-core{inset:20px}.final-tablets{top:50%}.final-tablets .world-answer{min-height:98px;font-size:10px}.chapter-feedback{font-size:10px;padding:7px 10px}}
@media(prefers-reduced-motion:reduce){.chapter-root *{animation:none!important;transition:none!important}.world-answer.activated{transform:none}}
/* Dougga — the four challenges from the design presentation. */
.world-roman-forum{background-image:url('assets/dougga-forum.webp')}
.world-roman-court{background-image:url('assets/dougga-court.webp')}
.world-roman-road{background-image:url('assets/dougga-road.webp')}
.city-dougga .chapter-shade{background:linear-gradient(180deg,#24322bd9 0%,#1b302c55 24%,transparent 38%,transparent 65%,#26322570)}
/* Dougga relic stage: raise the task panel by 10% of the viewport height. */
.city-dougga .task-raised{bottom:calc(10% + max(14px,env(safe-area-inset-bottom)))}
.forum-objects .old-map{left:48%;top:54%}
.forum-objects .old-map svg{transform:rotate(-3deg);background:linear-gradient(135deg,#d0c3a2,#8e8164);border-radius:5px 10px 4px 3px;box-shadow:inset 0 0 7px #594c37,0 4px 10px #0005}
.forum-objects .coin-pouch{left:80%;top:44%}
.theatre-object{left:20%;top:43%}
.theatre-object svg{height:65px;width:65px;color:#f0d5a3;filter:drop-shadow(0 3px 4px #40301d)}
.roman-doors{top:39%;gap:11px}
.roman-doors .world-answer{min-height:183px;border-radius:45px 45px 3px 3px;border:7px solid #d6be92;background:linear-gradient(90deg,#493727,#2b281f 45%,#54402b);color:#ffe7b2;text-shadow:0 1px 5px #000;box-shadow:inset 0 0 0 2px #b69759,0 7px 15px #001a1c80;position:relative}
.roman-doors .world-answer:after{content:'';position:absolute;inset:10px 48% 10px auto;border-left:1px solid #bd9a6050;pointer-events:none}
.roman-doors .world-answer svg{color:#d9b973}
.roman-doors .world-answer.activated{background:linear-gradient(90deg,#74673f,#f4dd99,#74673f);color:#243d2d;border-color:#f3d99f;box-shadow:0 0 32px #ffe6a780}
.roman-doors .world-answer:before{content:'';position:absolute;inset:0;background:repeating-linear-gradient(90deg,#71523588 0 2px,transparent 2px 17px);border:1px solid #b69a60;transform-origin:left;transition:transform 1.1s,opacity 1.1s;pointer-events:none}
.roman-doors .world-answer.activated:before{transform:perspective(250px) rotateY(-73deg);opacity:.45}
.roman-doors .world-answer.activated:after{opacity:0}
.roman-doors .world-answer svg,.roman-doors .world-answer span,.roman-doors .world-answer small{position:relative;z-index:1}
.roman-observation{position:absolute;top:35%;left:18px;right:18px;z-index:4;display:flex;gap:8px;align-items:flex-end}
.observation-object{width:33.33%;min-height:192px;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:12px;padding:12px 3px;background:linear-gradient(transparent 20%,#d4bc8530 70%,#81705060);border:1px solid #e1cda94d;border-radius:6px;color:#fff0cc;box-shadow:0 8px 12px #162b2433}
.observation-object svg{width:73px;height:140px;filter:drop-shadow(2px 4px 4px #221e1b80)}
.observation-object img{width:min(100%,112px);height:126px;object-fit:contain;border:2px solid #c7af7e;border-radius:7px;background:#e7e2d9;box-shadow:0 4px 12px #1a282466}
.cultural-feedback .culture-label{margin:9px 0 5px;font-size:9px;letter-spacing:1.2px;color:#ead3a0;opacity:1}
.cultural-feedback>span{font-size:12px;line-height:1.7}
.continue-passage{width:100%;margin:13px 0 0;padding:10px 12px;min-height:44px;font-size:11px}
.knowledge-list details{border:1px solid var(--line);border-radius:7px;padding:12px 14px;margin:10px 0}
.knowledge-list summary{font-size:12px;line-height:1.6;cursor:pointer}
.knowledge-list p{font-size:12px;line-height:1.8;margin:12px 0 6px}
.knowledge-list a{font-size:10px;color:#537455}
.observation-object span{max-width:100%;min-height:38px;display:grid;place-items:center;text-align:center;font-size:10px;line-height:1.35;background:#1e362ae6;padding:6px 7px;border:1px solid #cdb38166;border-radius:15px}
.observation-object:hover:not(:disabled),.observation-object.found,.observation-object.hinted{border-color:#ffe7a4;background:#e0d19b30;box-shadow:0 0 20px #ffe0a866}
.roman-inscriptions{position:absolute;top:35%;left:23px;right:23px;z-index:4;display:flex;justify-content:center;flex-wrap:wrap;gap:15px;padding:20px 14px;background:linear-gradient(140deg,#99896b,#6e6553);border:2px solid #cfba91;border-radius:5px;box-shadow:inset 0 0 22px #504936,0 6px 17px #09282670}
.inscription-stone{display:grid;place-items:center;width:calc(33.33% - 12px);height:66px;background:linear-gradient(125deg,#cbb996,#9e8e70);border:1px solid #e0cdac;border-radius:2px 6px 3px 2px;font:600 29px var(--serif);letter-spacing:2px;color:#514532;text-shadow:0 1px 1px #eddcba;box-shadow:inset 2px 3px 6px #6b5c3d55,0 3px 6px #3a342b60}
.inscription-stone.found,.inscription-stone.hinted{background:#ead59f;border-color:#fff1bf;box-shadow:0 0 25px #ffe8a8;color:#355441}
.roman-engine{width:105px;height:105px;top:28%}
.roman-engine .engine-core{inset:20px}
.roman-engine .engine-core svg{width:52px;height:52px}
.roman-engine .seal-0{left:33px}
.roman-engine .engine-seal{height:31px;width:31px}
.roman-paths{top:47%}
.roman-paths .world-answer{min-height:120px;font-size:11px;gap:7px;padding:10px 6px 19px}
.roman-relic svg{height:105px;width:105px;filter:drop-shadow(0 0 17px #eec465)}
.roman-complete{background-image:linear-gradient(#19322abb,#162c2af5),url('assets/dougga-road.webp')}
.route-travel{font-size:11px;margin-top:13px;min-height:40px;padding:9px 13px}
@media(max-width:350px){.roman-doors{gap:6px}.roman-doors .world-answer{border-width:5px;min-height:162px;font-size:10px}.roman-observation{left:12px;right:12px;gap:6px}.observation-object svg{width:64px}.roman-inscriptions{left:15px;right:15px;gap:10px;padding:15px 10px}.inscription-stone{font-size:26px}.roman-paths .world-answer{font-size:10px}}
@media(max-height:700px){.roman-doors{top:36%}.roman-doors .world-answer{min-height:157px}.roman-observation{top:33%}.observation-object{min-height:174px}.observation-object svg{height:119px}.roman-inscriptions{top:33%;padding-block:13px}.inscription-stone{height:58px}.roman-engine{top:28%;height:95px;width:95px}.roman-engine .seal-0{left:28px}.roman-paths{top:47%}.roman-paths .world-answer{min-height:100px;font-size:10px}}
/* Carthage — Défi 1 : nouveau décor (porte + trois pierres) */
.city-carthage .chapter-world.world-temple{background:#d9a77c}
.carthage-gate{position:absolute;top:0;left:50%;height:100%;aspect-ratio:1072/1920;min-width:100%;transform:translateX(-50%);background:url('assets/carthage/carthage-temple-bg.webp') center/100% 100% no-repeat;pointer-events:none;z-index:0}
.gate-door{position:absolute;left:36.2%;width:22.8%;top:22.1%;height:23.2%;background:center/100% 100% no-repeat;transition:opacity 1.2s,transform 1.2s}
.gate-closed{background-image:url('assets/carthage/carthage-door-closed.webp')}
.gate-open{background-image:url('assets/carthage/carthage-door-opened.webp');opacity:0;transform:scale(.96)}
.carthage-gate.gate-is-open .gate-closed{opacity:0;transform:scale(1.03)}
.carthage-gate.gate-is-open .gate-open{opacity:1;transform:none}
.city-carthage .door-light{top:22%;left:36%;width:23%;height:23%}
.city-carthage .tablets{top:41%;gap:4px;left:6px;right:6px}
.city-carthage .tablets .world-answer{position:relative;aspect-ratio:768/1377;min-height:0;max-height:210px;padding:0;justify-content:center;gap:0;background:url('assets/carthage/carthage-stone-1.webp') center/contain no-repeat;border:0;border-radius:0;box-shadow:none;color:#3a2412;font-weight:800;font-size:12px;line-height:1.15;text-align:center;text-shadow:0 1px 0 #f6d7aa;filter:drop-shadow(0 8px 8px #3b1f0c66)}
.city-carthage .tablets .world-answer:nth-child(2){background-image:url('assets/carthage/carthage-stone-2.webp')}
.city-carthage .tablets .world-answer:nth-child(3){background-image:url('assets/carthage/carthage-stone-3.webp')}
.city-carthage .tablets .world-answer svg{display:none}
.city-carthage .tablets .world-answer span{display:block;width:64%;margin:-6% 0 0 9%;overflow-wrap:break-word;hyphens:auto}
.city-carthage .tablets .world-answer:hover:not(:disabled){box-shadow:none;filter:drop-shadow(0 0 14px #ffe3a2)}
.city-carthage .tablets .world-answer.activated{background-color:transparent;box-shadow:none;filter:drop-shadow(0 0 22px #ffe5a9) brightness(1.08)}
.city-carthage .tablets .world-answer.eliminated{filter:grayscale(1);opacity:.4}
@media(max-width:350px){.city-carthage .tablets .world-answer{font-size:10px}}
.playing .city-carthage .chapter-world.world-temple.world-unlocked{inset:0;top:0;left:0;transform:none;background:#d9a77c;border:0;border-radius:0;padding:0;backdrop-filter:none;white-space:normal;font-size:inherit;color:inherit;z-index:auto}
.forum-objects{--dg-contact-shadow:rgba(0,0,0,.55);--dg-object-shadow:0 2px 2px rgba(0,0,0,.5)}
.forum-objects .quay-object:has(.dg-prop){top:auto;bottom:34%;min-height:0;min-width:0;background:none;border:0;box-shadow:none;padding:0;gap:0;filter:none;transform:translateX(-50%)}
.forum-objects .quay-object:has(.dg-prop)::before{content:'';position:absolute;left:15%;right:15%;bottom:4px;height:8px;background:var(--dg-contact-shadow);border-radius:50%;filter:blur(3px);z-index:-1;pointer-events:none}
.forum-objects .quay-object:has(.dg-prop)>svg{display:none}
.forum-objects .dg-prop{display:block;width:84px;height:auto;margin:0;filter:drop-shadow(var(--dg-object-shadow));transform-origin:50% 94%;transition:filter .3s}
.forum-objects .theatre-object .dg-prop{transform:translateY(7px)}
.forum-objects .quay-object:hover .dg-prop,.forum-objects .quay-object:focus-visible .dg-prop{filter:drop-shadow(var(--dg-object-shadow)) brightness(1.12)}
.chapter-root{position:relative}
.temple-tag{position:absolute;top:122px;right:16px;z-index:13;padding:5px 10px;border-radius:999px;background:#10272dcc;border:1px solid #d9b56f80;color:#f0d4a0;font:700 10px var(--sans);letter-spacing:1.6px;text-transform:uppercase;pointer-events:none;text-shadow:0 1px 4px #000}
/* Result screens: logo and top buttons sit on the background; nothing leaves the frame. */
body:has(.chapter-complete){overflow-x:hidden}
body:has(.chapter-complete) main{position:relative;max-width:var(--portrait-width,460px);width:100%;margin:0 auto;padding:0}
body:has(.chapter-complete) .topbar{position:absolute;top:0;left:50%;right:auto;transform:translateX(-50%);width:100%;max-width:var(--portrait-width,460px);height:auto;margin:0;padding:12px 14px 0;z-index:30;display:flex;align-items:flex-start;justify-content:space-between}
body:has(.chapter-complete) .topbar .brand{position:static;transform:none}
body:has(.chapter-complete) .topbar .brand .brand-logo{height:84px}
body:has(.chapter-complete) .topbar .top-actions{margin-left:auto;gap:8px}
body:has(.chapter-complete) .topbar .prototype{display:none}
body:has(.chapter-complete) .topbar .icon-button{background:#152e2f90;border-color:#cfb78160;color:#f3dfb9;backdrop-filter:blur(8px)}
.chapter-complete{position:relative;width:100%;max-width:100%;min-height:100svh;overflow:hidden;padding:108px 20px max(24px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:stretch;background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important;background-attachment:scroll}
.chapter-complete>.eyebrow{margin:4px 0 16px}
.chapter-complete .completion-eye{width:150px;height:150px;margin:0 auto 16px;border:0;border-radius:0;background:none;box-shadow:none}
.chapter-complete .completion-eye .completion-eye-img{width:150px;height:150px;object-fit:contain;filter:drop-shadow(0 10px 18px #00000080) drop-shadow(0 0 26px #eac47755)}
.chapter-complete h1{font-size:34px;margin-bottom:12px}
.chapter-complete .map-fragments{max-width:100%;overflow:hidden}
.chapter-complete .map-fragments img{max-width:100%;height:auto}
.chapter-complete .map-assembled{gap:0}
.chapter-complete .map-assembled>img{width:100%;max-height:440px;object-fit:contain;filter:none;opacity:1}
.chapter-complete .completion-rewards{max-width:100%}
.chapter-complete>*{max-width:100%;min-width:0}
/* Completion: keep the map fragment inside the screen; uniform title size. */
.chapter-complete .map-fragments .map-fragment-single img{height:auto;width:auto;max-width:min(78vw,320px);max-height:150px;object-fit:contain;margin:auto}
.chapter-complete>.eyebrow{font-size:13px;letter-spacing:2px}
/* Temple number/name tag uses the same green material as the left frames. */
.chapter-root .temple-tag{background:var(--toolbar-background,#12302aac);border-color:var(--toolbar-border,#ddc18a40);color:var(--toolbar-text,#f9e3b2);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
