*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:#243b3d;color:#f5edda;font:16px system-ui}button,select,input{font:inherit}button{min-height:44px;padding:10px 16px;border:1px solid #ab9667;border-radius:9px;background:#f0ddb4;color:#243b3d;cursor:pointer}button:hover:not(:disabled){background:#fff1d3;box-shadow:0 3px 9px #0003}button:focus-visible{outline:3px solid #64bbca}button:disabled{cursor:default}main{max-width:1500px;margin:auto;padding:8px max(8px,env(safe-area-inset-right))}header{display:flex;align-items:center;justify-content:space-between;gap:12px}header h1{font:clamp(17px,3vw,28px) Georgia;margin:5px}nav{display:flex;gap:8px}.stage{position:relative;width:100%;max-height:calc(100dvh - 115px);aspect-ratio:16/9;margin:auto}canvas{width:100%;height:100%;object-fit:contain}.stage #hotspots{position:absolute;inset:0}.hotspot{position:absolute;opacity:0;padding:0;min-height:0;border:0}.hotspot:focus-visible,.hotspot:hover{opacity:.18;background:#fff}#message{min-height:1.5em;margin:8px;font-size:14px}#loading{position:fixed;inset:0;z-index:100;background:#f3e7ce;color:#243b3d;display:grid;place-content:center}#menu{position:fixed;inset:0;z-index:10;display:grid;place-content:center;background:#5c7764;background-size:cover;background-position:center}.menu-paper{width:min(600px,90vw);background:#f5e7cbeF;padding:28px;border:8px solid #9a7951;border-radius:20px;color:#243b3d;text-align:center}.menu-paper h1{font:clamp(25px,5vw,42px) Georgia}.menu-paper button{display:block;width:100%;margin:8px 0}dialog{width:min(650px,94vw);max-height:94dvh;padding:20px;border:3px solid #9a7951;border-radius:14px;background:#f5e7cb;color:#243b3d;overflow:auto}dialog::backdrop{background:#0a2628aa}dialog h2{font:25px Georgia;margin:0 0 10px}dialog p{line-height:1.4}.badge-locked{opacity:.45;filter:grayscale(1)}.badge-earned{color:#496522;font-weight:bold}.video-dialog{width:min(1000px,94vw)}.video-dialog iframe{border:0;width:100%;aspect-ratio:16/9;background:#152b30}.simple-task-body{display:grid;gap:10px}.simple-task button{width:100%;margin:0}.correct{background:#c9e7bf}.task-dialog{width:min(1400px,calc(100vw - 16px));height:calc(100dvh - 16px);max-height:none;overflow:hidden;padding:14px}.task-shell{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}.task-header{position:relative;display:block;padding-right:50px}.task-header h2{font-size:clamp(18px,2vw,25px)}.task-header p{font-size:14px;margin:5px 0}.task-touch-help{display:none}.task-x{position:absolute;top:0;right:0}.task-content{min-height:0;display:grid;grid-template-columns:minmax(0,1fr) 30%;gap:12px}.task-board,.task-viewport{min-width:0;min-height:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.task-graphic{position:relative;aspect-ratio:16/9;width:100%;height:100%;background-size:100% 100%;background-repeat:no-repeat}.drop-zone{position:absolute;border:2px dashed #b49b63;border-radius:8px;overflow:hidden;background:#fff1ccbb}.drop-target{width:100%;min-height:0;height:auto;font-size:clamp(10px,1.2vw,16px);padding:6px;background:transparent;border:0}.drop-zone img{max-width:100%;max-height:40%;object-fit:contain}.task-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:center;gap:8px;min-height:0}.term-card{position:relative;min-width:0;min-height:50px;padding:8px 26px 8px 5px;font-size:clamp(12px,1.2vw,16px);overflow-wrap:anywhere}.term-card img{height:44px;max-width:100%;object-fit:contain}.drag-handle{position:absolute;right:3px;top:50%;transform:translateY(-50%);touch-action:none;font-size:24px}.term-ghost{position:fixed;z-index:10000;pointer-events:none;background:#fff1cc;padding:8px;border-radius:8px;transform:translate(-50%,-50%)}.term-card.matched{display:block;width:100%;min-height:0;font-size:clamp(10px,1vw,15px);padding:3px;background:#d4e8bf}.matched .drag-handle{display:none}.task-footer{display:grid;grid-template-columns:1fr auto;gap:4px;align-items:center}.task-feedback,.task-selection{font-size:14px;margin:0;min-height:1.5em}.task-selection{grid-column:1}.task-actions{grid-column:2;grid-row:1/3;display:flex;gap:6px}.task-pages{grid-column:1/-1;display:flex;gap:5px}.simple-task{height:auto;max-height:calc(100dvh - 16px)}.simple-task-body button{min-height:56px}.dialogue{max-width:600px}.dialogue button{float:right}@media(max-width:700px){.task-content{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}.task-cards{grid-template-columns:repeat(3,minmax(0,1fr))}.term-card{min-height:44px}.task-header p,.task-feedback,.task-selection{font-size:12px}.task-actions button{padding:6px;font-size:12px}.task-header h2{font-size:18px}.task-selection{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.stage{max-height:none}.menu-paper{padding:16px}}@media(max-height:500px){.task-header p{display:none}.task-dialog{padding:8px}.term-card img{height:20px}.task-shell{gap:5px}.task-feedback{font-size:12px}.task-actions button{min-height:36px}.simple-task-body button{min-height:36px;padding:5px}}
.stage #hotspots{pointer-events:none}.stage #hotspots button{pointer-events:auto}.badge-earned.special{border:2px solid #ab9667;padding:10px;border-radius:12px} .term-card[aria-pressed="true"]{outline:3px solid #4d8992}

dialog.simple-task{height:fit-content;min-height:0} @media(max-width:480px){header{flex-wrap:wrap;gap:4px}header h1{font-size:18px}nav{gap:6px}nav button{padding:8px 12px}.task-dialog{padding:10px}.task-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}

.task-graphic[data-unique="true"] .drop-zone.filled .drop-target{display:none}@media(max-width:700px){.drop-zone{min-height:44px}.drop-target{font-size:12px;padding:3px}.term-card.matched{font-size:12px;min-height:30px}}

/* Opt-in anchored dialogue; tasks and other panels keep their existing layout. */
.dialogue-content{display:flow-root}
dialog.speech-bubble{position:fixed;margin:0;width:min(430px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:18px 20px;border:3px solid #795735;border-radius:22px;background:#fff3d8;overflow:visible;box-shadow:0 8px 24px #0004}
.speech-bubble .dialogue-content{position:relative;max-height:calc(100dvh - 70px);overflow:auto}
.speech-bubble h2{font: bold 21px Georgia;color:#6c4727;margin-bottom:8px}
.speech-bubble p{font-size:17px;margin:8px 0 14px;line-height:1.45}
.speech-bubble button{min-height:44px;float:right}
.speech-bubble::backdrop{background:#0a262826}
.speech-tail{position:fixed;left:0;top:0;width:100vw;height:100dvh;overflow:visible;pointer-events:none;z-index:-1}
.speech-tail polygon{fill:#fff3d8;stroke:#795735;stroke-width:3;stroke-linejoin:round}
@media(max-width:480px){dialog.speech-bubble{padding:12px 14px}.speech-bubble h2{font-size:18px}.speech-bubble p{font-size:16px}}
/* Panorama: Beschriftungen bleiben an ihren räumlichen Zielen, Bedienung an den Bildschirmrändern. */
.panorama-layer,.panorama-controls{position:absolute;inset:0;pointer-events:none}
.panorama-layer{touch-action:none}
.panorama-door{position:absolute;transform:translate(-50%,-50%);pointer-events:auto;max-width:30%;font-size:clamp(11px,1.3vw,18px);padding:7px 12px;background:#f3e4beed;border:2px solid #6e492c;box-shadow:0 2px 8px #0008;z-index:2}
.panorama-goal,.panorama-target{background:#eac56bf5;font-weight:bold}
.panorama-controls button{pointer-events:auto}
.panorama-left,.panorama-right{position:absolute;top:43%;font-size:48px;line-height:1;min-width:48px;padding:5px 12px;touch-action:none;user-select:none;z-index:4}
.panorama-left{left:8px}.panorama-right{right:8px}
.panorama-target{position:absolute;bottom:8%;left:50%;transform:translateX(-50%);max-width:78%;font-size:clamp(11px,1.3vw,17px);z-index:4}
.panorama-help{position:absolute;bottom:0;left:50%;transform:translateX(-50%);margin:0;background:#263837db;border-radius:8px;padding:4px 10px;font-size:clamp(10px,1.1vw,14px);white-space:nowrap}
.stage:has(.panorama-layer){touch-action:none}
/* Große Touchflächen für den iPad-Einsatz. */
@media(pointer:coarse){.panorama-left,.panorama-right{min-width:60px;min-height:60px}.panorama-door{min-height:48px}.panorama-target{min-height:48px}.panorama-controls{user-select:none;-webkit-user-select:none}}
.panorama-person{position:absolute;transform:translate(-50%,-100%);width:clamp(95px,14%,220px);padding:0;background:transparent;border:0;pointer-events:auto;z-index:1;touch-action:none;box-shadow:none!important}
.panorama-person:hover{background:transparent!important}
.panorama-person img{width:100%;display:block;pointer-events:none;user-select:none;-webkit-user-select:none}
.panorama-person span{display:block;background:#f3e4bee8;color:#37251a;border:1px solid #6e492c;border-radius:6px;font-size:clamp(11px,1.2vw,16px);padding:3px}

.panorama-routes{position:absolute;left:12px;top:12px;display:flex;gap:8px;flex-wrap:wrap;max-width:calc(100% - 24px);pointer-events:auto;z-index:5}
.panorama-routes button{min-height:48px;padding:10px 14px;background:#fff3d5;color:#342718;border:2px solid #765331;border-radius:10px;font-weight:700;cursor:pointer}

/* Marta im Innenpanorama: größere Figur, unveränderter Fußanker. */
.panorama-person[data-npc="marta"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="anna-vogel"],.panorama-person[data-npc="else"],.panorama-person[data-npc="david"],.panorama-person[data-npc="agnes"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="gerber"],.panorama-person[data-npc="zunftmeister"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="weberin"]{width:clamp(135px,20%,310px)}

.panorama-door.panorama-info{width:50px;height:50px;min-width:50px;min-height:50px;max-width:none;border-radius:50%;padding:0;font-size:32px;line-height:1;display:grid;place-items:center;background:#fff3d5f5;color:#382812;border:2px solid #765331;box-shadow:0 2px 7px #0005}
.panorama-door.panorama-info[hidden]{display:none}
.panorama-door.panorama-info.panorama-goal{background:#eac56b;border:3px solid #80570d;box-shadow:0 0 0 4px #f4da9270}
.panorama-door.panorama-info:focus-visible{outline:3px solid #fff;outline-offset:3px}

.hotspot.info-symbol{opacity:1;min-width:50px;min-height:50px;border-radius:50%;padding:0;font-size:32px;line-height:1;display:grid;place-items:center;background:#fff3d5f5;color:#382812;border:2px solid #765331;box-shadow:0 2px 7px #0005;z-index:2}
.hotspot.info-symbol.info-goal{background:#eac56b;border:3px solid #80570d;box-shadow:0 0 0 4px #f4da9270}
.hotspot.info-symbol:hover{opacity:1;background:#fff1d3}
.hotspot.info-symbol:focus-visible{opacity:1;outline:3px solid #fff;outline-offset:3px}

/* Wegmarker: Ziel oberhalb eines anwählbaren Doppelpfeils, getrennt von den Drehpfeilen. */
.panorama-door.panorama-arrow{width:min(160px,24vw);max-width:none;min-height:92px;padding:4px;display:flex;flex-direction:column;align-items:center;gap:4px;background:transparent;border:0;box-shadow:none;touch-action:manipulation}
.panorama-door.panorama-arrow:hover{background:transparent;box-shadow:none}
.route-label{display:block;width:100%;padding:5px 7px;border-radius:7px;background:#fff3d5ee;color:#342718;border:1px solid #765331;font-size:clamp(12px,1.3vw,17px);line-height:1.25;text-align:center;overflow-wrap:anywhere;pointer-events:none}
.route-arrow{display:flex;flex-direction:column;align-items:center;width:60px;height:56px;padding-top:0;filter:drop-shadow(0 0 2px #fff) drop-shadow(0 2px 2px #fff);pointer-events:none}
.route-arrow span{display:block;width:32px;height:32px;border-right:8px solid #17120c;border-bottom:8px solid #17120c;border-radius:3px;transform:rotate(45deg);flex-shrink:0;margin-top:-11px}
.panorama-arrow.panorama-goal .route-label{background:#eac56bf5;border:2px solid #80570d}
.panorama-arrow.panorama-goal .route-arrow span{border-color:#80570d}
.panorama-door.panorama-arrow:focus-visible{outline:3px solid #fff;outline-offset:3px}
.panorama-door.panorama-arrow[hidden]{display:none}

.loom-dialog{width:min(1000px,96vw);max-height:94dvh;padding:12px;overflow:auto}
.loom-dialog header{position:sticky;top:-12px;z-index:3;background:#f5e7cb;padding:8px 0;display:flex;gap:8px;align-items:center}
.loom-dialog header h2{font-size:clamp(18px,2vw,25px);margin:0;flex:1}
.loom-dialog header button{flex-shrink:0;min-height:48px;font-weight:700}
.loom-caption,.loom-progress{font-size:13px;margin:5px 0}
.loom-graphic{max-width:800px;margin:auto}.loom-graphic svg{display:block;width:100%;max-height:48dvh}
.loom-feedback{min-height:3em;line-height:1.35;margin:8px 0;color:#342718}
.loom-actions{display:flex;flex-wrap:wrap;gap:8px}.loom-actions button{min-height:48px;flex:1 1 150px}
.loom-actions button[aria-pressed="true"]{outline:3px solid #379fc0}
@media(max-width:480px){.loom-dialog header{align-items:start}.loom-dialog header button{max-width:48%;font-size:14px}.loom-actions button{flex-basis:120px;font-size:14px}}

.panorama-door.panorama-exercise{transform:translate(calc(-50% + 60px),-50%);background:#d7e9c6;color:#243b3d;font-size:28px}
.panorama-door.panorama-exercise:hover{background:#ecf7df}

.hotspot.exercise-symbol{transform:translate(calc(-50% + 60px),-50%)!important;background:#d7e9c6;font-size:28px}
.patch-graphic{position:relative;max-width:800px;margin:auto;aspect-ratio:800/450}
.patch-graphic svg{display:block;width:100%;height:100%}
.patch-stitch,.patch-place{position:absolute;transform:translate(-50%,-50%);min-width:48px;min-height:48px;border-radius:50%;padding:6px;background:#fff3d5}
.patch-next{background:#eac56b;border:3px solid #80570d}
.patch-place{border-radius:12px}.patch-sample{display:block;margin:8px auto;background:#a25f3b;border:2px dashed #efd6a6;max-width:100%}
.patch-dialog .loom-actions button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}
@media(max-height:600px){.patch-graphic{max-width:600px}}

/* Stadtplan: kleine Orientierung, große Karte mit lesbarer Legende. */
.city-map-mini{position:absolute;right:12px;bottom:12px;z-index:8;width:clamp(130px,16vw,190px);border:2px solid #805b38;border-radius:12px;background:#f6e8c9;box-shadow:0 3px 12px #0005;overflow:hidden}
.city-map-mini>button{width:100%;min-height:44px;margin:0;border-radius:0;font-size:15px;padding:6px}
.city-map-open{display:block;width:100%;padding:0!important;margin:0!important;border:0!important;border-radius:0!important;background:transparent!important}
.city-map-picture{position:relative;width:100%;line-height:0}.city-map-picture img{display:block;width:100%;height:auto}
.city-map-marker{position:absolute;transform:translate(-50%,-50%);width:20px;height:20px;border:3px solid white;border-radius:50%;background:#c51d27;box-shadow:0 0 0 3px #713529,0 2px 8px #0008;color:transparent;line-height:1;pointer-events:none}
.city-map-location{display:block;font-size:12px;line-height:1.3;padding:5px 8px;color:#553520}
.city-map-panel{width:min(920px,94vw)!important;max-width:94vw!important}.city-map-panel .city-map-picture{max-width:650px;margin:auto}.city-map-legend{display:grid;grid-template-columns:1fr 1fr;gap:5px 26px;padding-left:30px;font-size:16px}.city-map-current{font-weight:bold;color:#a01b25}
@media(max-width:650px){.city-map-mini{width:130px;right:7px;bottom:7px}.city-map-legend{grid-template-columns:1fr}.city-map-panel .city-map-marker{width:16px;height:16px}}

.panorama-person[data-npc="mueller"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="baeckerin"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="schmied"]{width:clamp(135px,20%,310px)}

.panorama-person[data-npc="lea"]{width:clamp(105px,15%,230px)}

.panorama-person[data-npc="kuester"]{width:clamp(105px,15%,230px)}

.panorama-person[data-npc="haendlerin"],.panorama-person[data-npc="marktaufseher"]{width:clamp(105px,15%,230px)}

.panorama-person[data-npc="flusstor-jakob"]{width:clamp(105px,15%,230px)}

.panorama-person[data-npc="baderin"]{width:clamp(152px,22%,334px)}

.panorama-person[data-npc="spitalhelferin"]{width:clamp(152px,22%,334px)}

.panorama-person[data-npc="stadtschreiber"]{width:clamp(152px,22%,334px)}
/* Optional progressive illustrated map; marker always above parchment. */
.city-map-fog{position:absolute;z-index:1;display:grid;place-items:center;line-height:1;color:#8a7459;font:clamp(12px,2vw,28px) Georgia;background:#ecdfbd;box-shadow:0 0 10px 6px #ecdfbd;border-radius:14px;pointer-events:none}
.city-map-paper{position:absolute;z-index:2;display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-line;line-height:1.6;padding:10px;color:#674c31;font:clamp(10px,1.4vw,20px) Georgia;background:#ead7ad;border:2px solid #9d7b4e;border-radius:8px;pointer-events:none}
.city-map-district{position:absolute;z-index:3;display:grid;place-items:center;line-height:1;background:#7d1618;color:white;border:1px solid #f5dfb7;border-radius:50%;font:clamp(9px,1.2vw,18px) Georgia;pointer-events:none}
.city-map-marker{z-index:5}
.city-map-panel{width:min(1250px,96vw)!important;max-width:96vw!important}.city-map-panel .city-map-picture{max-width:1150px}
.city-map-mini .city-map-paper{font-size:9px;padding:2px;line-height:1.1;overflow:hidden;color:transparent}.city-map-mini .city-map-fog{font-size:10px;box-shadow:0 0 2px 1px #ecdfbd;border-radius:3px}

.panorama-door.panorama-video{background:#dce9ed;font-size:27px;padding-left:4px}.video-dialog>button{display:block;margin-top:14px}.video-dialog>a{display:inline-block;min-height:44px;padding:12px 0;color:#23566a}

.video-dialog video{display:block;width:100%;max-height:60dvh;aspect-ratio:16/9;background:#152b30;object-fit:contain}

/* Heinrich: gleiche gut sichtbare Größe wie die größeren Bewohner. */
.panorama-person[data-npc="kaufmann"]{width:clamp(152px,22%,334px)}

/* Bildgestützte Handwerksübungen: echte Bedienelemente über Fotoassets. */
.realistic-experiment{background:#f3e5c7;color:#34291d}
.realistic-experiment header{background:#203d3e;color:#f8edcf;padding:10px;border-radius:9px;top:-12px}
.realistic-experiment header button{font-size:14px}
.realistic-experiment .loom-graphic,.realistic-experiment .patch-graphic{position:relative;width:min(800px,calc(48dvh * 1.7778));max-width:100%;aspect-ratio:16/9;margin:auto;overflow:hidden;border-radius:12px;box-shadow:0 2px 12px #38291540}
.realistic-experiment .loom-graphic svg{width:100%;height:100%;max-height:none;display:block}
.experiment-image-action{position:absolute;transform:translate(-50%,-50%);min-height:44px;max-width:44%;padding:8px 12px;border:2px solid #55c6c0;background:#183e3ee8;color:#fff4d7;border-radius:24px;font-size:clamp(12px,1.4vw,16px);box-shadow:0 0 0 4px #35bab633}
.realistic-experiment .patch-stitch{min-width:44px;min-height:44px;background:#f2e5c7;border:2px solid #715531}
.realistic-experiment .patch-next{background:#1e5253;color:#fff4d7;border-color:#49c9c0}
.realistic-experiment .loom-actions button{background:#ead9b4;border:1px solid #80643e;color:#342718}
.realistic-experiment .loom-actions .patch-next{background:#1e5253;color:#fff4d7}
@media(max-width:600px){.realistic-experiment header{flex-wrap:wrap}.realistic-experiment header h2{flex-basis:100%}.realistic-experiment header button{flex:1;max-width:none}.realistic-experiment .loom-caption{font-size:12px}.realistic-experiment .loom-actions button{flex-basis:125px}}

.picture-sequence{box-sizing:border-box;width:min(1100px,96vw);max-height:96dvh;background:#f5ecd9;color:#263b3b;padding:18px;border-radius:16px;overflow:auto}
.picture-sequence h2{margin:0;font-size:clamp(20px,3vw,30px)}
.picture-sequence>p{margin:8px 0;font-size:14px}
.picture-slots{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;min-height:100px}
.picture-slot{border:2px dashed #769394;border-radius:8px;min-width:0;padding:4px}
.picture-slot>button:first-child{width:100%;min-height:44px;font-size:14px}
.picture-tray{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.picture-card{display:flex;flex-direction:column;width:100%;padding:0;overflow:hidden;border:2px solid transparent;border-radius:8px;background:#fff8e8;color:#213c3c;font-size:14px;min-height:44px}
.picture-card[aria-pressed=true]{border-color:#007e86;box-shadow:0 0 0 2px #007e86}
.picture-card-image{display:block;width:100%;aspect-ratio:1.8;background-repeat:no-repeat}
.picture-card>span:last-child{padding:5px}
.picture-actions{display:flex;gap:12px;position:sticky;bottom:0;background:#f5ecd9;padding:8px 0}
.picture-actions button{min-height:48px;flex:1}.picture-actions button:last-child{background:#087c82;color:white}
@media(max-height:800px){.picture-card-image{max-height:110px}.picture-slot .picture-card-image{max-height:75px}}
@media(max-width:600px){.picture-slots{grid-template-columns:repeat(3,minmax(0,1fr))}.picture-tray{grid-template-columns:repeat(2,minmax(0,1fr))}.picture-actions{gap:4px}.picture-actions button{font-size:12px}}

.picture-slots.picture-three{grid-template-columns:repeat(3,minmax(0,1fr))}.picture-three .picture-slot>button:first-child{min-height:60px}

.picture-slots.picture-four{grid-template-columns:repeat(4,minmax(0,1fr))}.picture-tray.picture-four-tray{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:600px){.picture-slots.picture-four{grid-template-columns:repeat(2,minmax(0,1fr))}}

.city-map-legend button{min-height:44px;width:100%;text-align:left;cursor:pointer}.city-map-legend button:disabled{cursor:default;opacity:.55}

/* Optional picture support keeps original drag/tap matching and fitted layout. */
.photo-matching .task-photo{display:block;background-repeat:no-repeat;width:100%;aspect-ratio:1.3;border-radius:6px;flex:none}
.photo-matching .drop-zone{display:flex;flex-direction:column;align-items:stretch;background:#f8f0dc;gap:4px}
.photo-matching .drop-zone>.task-photo,.photo-matching .drop-zone>img{width:100%;height:48%;max-height:48%;object-fit:cover;flex:none}
.photo-matching .drop-target{min-height:44px;flex:none}
.photo-matching .term-card{font-size:clamp(12px,1.05vw,16px)}
.photo-matching .term-card>.task-photo{height:clamp(55px,12dvh,100px);aspect-ratio:auto}
.photo-matching .term-card.matched>.task-photo,.photo-matching .term-card.matched>img{display:none}
.photo-matching .term-card.matched{margin:2px;font-size:12px;min-height:36px}
@media(max-height:600px){.photo-matching .term-card>.task-photo{height:45px}.photo-matching .drop-zone>.task-photo,.photo-matching .drop-zone>img{height:34%;max-height:34%}}

/* Realistische Bildzustände des optionalen Gerber-Modells. */
.realistic-experiment .tanning-photo-graphic {aspect-ratio:1;width:min(560px,42dvh);}
.tanning-photo-steps {display:flex;gap:8px;justify-content:center;margin:12px auto;max-width:560px;}
.tanning-photo-step {flex:1;min-width:0;font-size:.8rem;text-align:center;border:2px solid transparent;border-radius:6px;padding:3px;}
.tanning-photo-step.active {border-color:#a47729;background:#fff0cc;}
.tanning-photo-thumb {display:block;width:100%;aspect-ratio:1;background-size:300% 200%;border-radius:4px;}

/* Deutlicher, barrierearm lesbarer Abschluss der Story. */
.story-celebration{box-sizing:border-box;width:min(900px,94vw);max-height:90dvh;overflow:auto;padding:clamp(20px,4vw,48px);text-align:center;color:#173e27;background:radial-gradient(ellipse at center,#fff7df,#eddbad);border:6px double #245137;border-radius:16px;box-shadow:0 16px 60px #0006}
.story-celebration::backdrop{background:#132c2380;backdrop-filter:blur(4px)}
.story-celebration .celebration-emblem{font-size:clamp(38px,6vw,70px);font-weight:bold;line-height:1.1}
.story-celebration h2{font-size:clamp(36px,6vw,76px);margin:12px 0 22px;color:#174a2b;line-height:1.1}
.story-celebration .celebration-message{font-size:clamp(21px,3vw,34px);font-weight:bold;line-height:1.3;margin:0 auto 20px;max-width:740px}
.story-celebration .celebration-detail{font-size:clamp(16px,2vw,23px);line-height:1.4;color:#493a25}
.celebration-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:16px;margin-top:28px}
.story-celebration button{font-size:clamp(17px,2vw,24px);padding:14px 24px;border:2px solid #285235;border-radius:10px;background:#245137;color:#fff7df;min-height:48px;cursor:pointer}
.story-celebration .celebration-home{background:#fff0cf;color:#173e27}
.story-celebration button:focus-visible{outline:3px solid #173e27;outline-offset:4px}
@media(max-width:500px){.celebration-actions{flex-direction:column}.story-celebration{padding:20px}}

.mode-card{display:block;margin:14px 0;padding:18px 20px;border:2px solid #80613a;border-radius:12px;background:#fff3d9;color:#332719;text-decoration:none;text-align:left}.mode-card strong{display:block;font-size:1.3rem;margin-bottom:7px}.mode-card span{display:block;line-height:1.4}.mode-card:hover,.mode-card:focus-visible{background:#eed9a6;outline:3px solid #285235;outline-offset:3px}
