/* Layout and input refinements only: scene coordinates and quest rules are unchanged. */
:root{--screen-gap:12px}
html{scroll-padding-top:12px}
body{overflow-wrap:break-word}
body:has(dialog[open]){overflow:hidden}
main,body:not(.menu-open) main{padding-left:max(var(--screen-gap),env(safe-area-inset-left));padding-right:max(var(--screen-gap),env(safe-area-inset-right));padding-bottom:max(16px,env(safe-area-inset-bottom))}
button,select,input{min-height:44px;font-size:16px}
button{touch-action:manipulation}
button:disabled{cursor:default}
dialog{max-width:calc(100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;scroll-padding:16px;margin:auto}
dialog p{line-height:1.5}
dialog img{max-width:100%;object-fit:contain}
dialog>button:not(.term-card){min-height:48px;margin-top:10px}
dialog h2{overflow-wrap:anywhere;line-height:1.25}
.stage{aspect-ratio:auto;width:min(100%,calc(177.7778vh - 213.3334px));width:min(100%,calc(177.7778dvh - 213.3334px));margin-inline:auto}
.stage canvas{width:100%;height:auto;aspect-ratio:16/9;touch-action:manipulation}
.hotspot span{max-width:min(230px,80vw);white-space:normal;text-align:center;pointer-events:none}
body:not(.menu-open) header{top:env(safe-area-inset-top);flex-wrap:wrap}
.equipment-bar{flex-shrink:0}
.equipment-bar button{min-width:48px}
.equipment-bar span{overflow-wrap:normal}
.equipment-bar button{height:58px}.equipment-bar span{font-size:11px;white-space:nowrap}
#hud-item-slots>div:first-child{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}
#hud-item-slots>div:first-child>small,#inventory-empty{grid-column:1/-1}
#hud-item-slots .tool-item,#hud-item-slots #camera-item,#hud-item-slots #note-item,#hud-item-slots #final-note-item{width:100%;min-width:0;min-height:130px}
#photo-thumbnails{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr))}
#photo-thumbnails figure,#photo-thumbnails img{width:100%}
#book{overflow:auto}
#book-entries h3{color:#315d66}
.book-tabs button{min-height:48px;margin:0}
.journal-pages{grid-template-areas:'current bonus' 'route bonus' 'done bonus';row-gap:0;align-items:start}
.journal-current-section{grid-area:current;min-width:0}
.journal-route-section{grid-area:route;min-width:0}
.journal-done{grid-area:done;min-width:0}
.journal-bonus{grid-area:bonus;min-width:0}
.task-viewport{width:100%;min-width:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-x pan-y;scrollbar-gutter:stable;outline-offset:2px}
.task-graphic{flex-shrink:0}
.task-cards{flex-wrap:wrap;min-width:0}
.term-card{position:relative;white-space:normal;min-height:48px;touch-action:pan-y;max-width:100%;padding-right:36px}
.term-card img{pointer-events:none}
.drag-handle{position:absolute;right:0;top:0;bottom:0;width:34px;display:grid;place-items:center;font-size:25px;color:inherit;touch-action:none;cursor:grab;border-left:1px solid #a58b5c55}
.term-card.matched .drag-handle{display:none}
.term-card.matched{padding-right:8px}
.drop-target{min-height:44px;font-size:16px}
.animal-task .drop-target{min-height:48px;font-size:16px}
.term-card.matched{font-size:14px}
.task-selection{position:sticky;top:0;z-index:6;background:#fff4d4;color:#244b5b;padding:10px;border:2px solid #75949a;border-radius:8px;font-size:16px;box-shadow:0 2px 6px #0002}
.task-selection:empty{display:none}
.task-touch-help{display:none}
.mobile-situation{display:none}
.collection-task .task-graphic,.animal-task .task-graphic{min-width:0}
.collection-task .drop-target{font-size:16px}
.collection-task .term-card{padding-right:36px;font-size:16px}
.collection-task .matched{padding-right:8px}
.cafe-task .task-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.cafe-task .term-card{width:100%;max-width:none;padding:12px 36px 12px 8px}
.cafe-task .matched{padding:8px}
.hallig-everyday-task .drag-handle{color:#234d59;background:#fff7dfb8;z-index:1}
.learning-video{padding:20px}
.learning-video h2{padding-right:54px}
.learning-video .video-player:has(iframe){clear:both;position:relative;aspect-ratio:16/9}
.learning-video .video-player iframe{position:absolute;inset:0;width:100%;height:100%}
.video-x{margin:0!important;min-width:48px}
.video-back{width:100%}
.learning-video-offer button{width:100%;margin-top:12px}
.code-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.code-fields label{min-width:0;font-size:15px}
.code-fields input{width:100%;min-width:0;height:56px;border:2px solid #9dbcbc;border-radius:8px}
#chest-code>button{margin:12px 0 0;width:100%}
#game-ending{overflow:auto}
#bonus-toast{max-height:calc(100dvh - 24px);overflow:auto;bottom:max(12px,env(safe-area-inset-bottom));width:min(460px,calc(100vw - 24px));padding:18px}
@media(max-width:1024px){
 .equipment-bar{gap:7px;padding:5px}.equipment-bar button{width:56px}
 #badge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .book-badge{padding:14px}
 #tide-task .task-graphic{min-width:950px}#moon-task .task-graphic{min-width:850px}
 .island-map-task .task-graphic{min-width:1200px}.park-task .task-graphic,.navigation-task .task-graphic{min-width:980px}
 #tide-task .drop-target,#tide-task .matched,#moon-task .drop-target,#moon-task .matched,.island-map-task .matched,.park-task .matched,.park-area-label,.navigation-task .matched,.navigation-fixed{font-size:16px}
}
@media(max-width:700px){
 :root{--screen-gap:10px}
 body:not(.menu-open) header{gap:8px;min-height:52px;align-items:center;padding-top:max(4px,env(safe-area-inset-top))}
 header #title{font-size:20px;margin:0;max-width:100%}
 .equipment-bar{margin-left:auto;gap:6px;padding:4px}.equipment-bar button{width:48px;min-height:52px;height:52px}.equipment-bar svg{width:24px;height:24px}.equipment-bar span{display:block;font-size:10px}
 header>div small{display:none}
 #hud-quests{background:#f9edcf}
 .journal-pages{grid-template-columns:minmax(0,1fr);grid-template-areas:'current' 'bonus' 'route' 'done';gap:12px}
 #journal-current{font-size:18px;padding:12px}
 .journal-sidequest p,.book-badge p{font-size:16px}
 dialog,dialog.equipment-dialog,dialog.drag-task{padding:16px;max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:calc(100vw - 20px);max-width:calc(100vw - 20px - env(safe-area-inset-left) - env(safe-area-inset-right));border-width:2px;scrollbar-gutter:auto}
 dialog h2{font-size:23px}dialog p{font-size:16px}
 .book-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .book-tabs button{width:100%;font-size:16px}
 .book-badge h4{font-size:18px}
 #hud-item-slots>div:first-child{grid-template-columns:repeat(2,minmax(0,1fr))}
 .paper-dialog label{flex-direction:column;align-items:stretch;gap:8px}.paper-dialog select{width:100%}
 .small-pause button,.ending-actions button{width:100%}
 #main-menu{padding:0;min-height:calc(100svh - 20px)}
 .travel-cover{padding:24px 22px;border-width:5px;width:100%}
 .travel-cover h1{font-size:clamp(26px,7vw,38px)}
 .menu-compass{font-size:32px;right:18px;top:20px}
 .travel-stamp{font-size:9px;padding:10px 12px;max-width:75%}
 .menu-buttons button{width:100%;font-size:18px;min-height:52px}
 .task-touch-help{display:block;color:inherit;font-size:15px!important}
 .drag-task[open]{display:flex;flex-direction:column;gap:4px}
 .drag-task h2{order:0}.task-selection{order:1}.task-touch-help{order:2}
 .drag-task>p:not(.task-selection):not(.task-touch-help):not(.task-feedback){order:2}
 .task-cards{order:3;display:flex;gap:10px;margin:10px 0;justify-content:flex-start;flex-shrink:0}
 .drag-task[open]>h2,.drag-task[open]>p,.drag-task[open]>button{flex-shrink:0}
 .task-viewport{order:4;max-height:64dvh;flex-shrink:0;border-radius:8px;border:1px solid #b39262;padding-bottom:8px}
 .task-feedback{order:5}.drag-task>.task-done{order:6}.drag-task>button:not(.task-done){order:7}
 .term-card{font-size:16px;min-height:48px;padding:12px 38px 12px 10px}
 .task-graphic{min-width:800px}
 #tide-task .task-graphic{min-width:950px}#moon-task .task-graphic{min-width:850px}
 #tourist-task .task-graphic{min-width:680px}
 .island-map-task .task-graphic{min-width:1200px}
 .park-task .task-graphic{min-width:980px}
 .navigation-task .task-graphic{min-width:980px}
 #tide-task .drop-target,#tide-task .matched,#moon-task .drop-target,#moon-task .matched,#tourist-task .matched,.island-map-task .matched,.park-task .matched,.park-area-label,.navigation-task .matched,.navigation-fixed{font-size:16px;line-height:1.2}
 .navigation-task .drop-target,.park-task .drop-target,.island-map-task .drop-target{min-width:44px;min-height:44px}
 .collection-task .task-graphic,.animal-task .task-graphic{min-width:0;grid-template-columns:minmax(0,1fr)}
 .collection-task .drop-zone{min-height:130px}
 .collection-task .term-card{font-size:16px}.route-task .term-card{min-width:0;width:calc(50% - 5px)}.route-task .matched{width:100%}
 .cafe-task .task-graphic{min-width:0;grid-template-columns:minmax(0,1fr)}
 .cafe-task .task-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .cafe-task .term-card{font-size:16px;min-width:0}.cafe-task .term-card img{max-width:100%;height:90px}
 .cafe-task .drop-target{font-size:17px;line-height:1.4}
 #conversation{width:min(560px,calc(100vw - 24px));max-height:80dvh}
 #dialog-text{font-size:18px;line-height:1.5}
 #dialog-next{width:100%;min-height:48px}
 #final-letter-illustration{max-height:28dvh}
 #tide-hint img{max-height:64dvh;width:100%;object-fit:contain}
 .learning-video{padding:14px}.learning-video h2{font-size:22px}
 .ebb-quiz input{width:100%;min-width:0;flex-basis:100%}
 #game-ending{padding:18px}.journey-summary{display:grid;grid-template-columns:1fr}.expert-seal{flex-wrap:wrap}
}
@media(max-width:360px){
 #badge-grid{grid-template-columns:minmax(0,1fr)}
 .equipment-bar{width:100%;justify-content:space-between}.equipment-bar button{flex:1}
 .cafe-task .task-cards,.route-task .task-cards{grid-template-columns:1fr}
 .route-task .term-card{width:100%}
 .code-fields{gap:6px}.code-fields label{font-size:13px}
}
@media(max-height:500px) and (orientation:landscape){
 body:not(.menu-open) main{padding-top:4px}body:not(.menu-open) header{min-height:44px;margin-bottom:4px;padding:0}
 .equipment-bar{padding:2px}.equipment-bar button{min-height:44px;height:44px}.equipment-bar svg{width:23px;height:23px}.equipment-bar span{display:none}
 dialog{max-height:calc(100dvh - 12px);padding:12px}
 #conversation{max-height:calc(100dvh - 16px)}#final-letter-illustration{max-height:24dvh}
 .travel-cover{padding:18px 30px}.menu-buttons{margin:14px 0}.menu-kicker{margin-top:10px}
 .stage{width:min(100%,calc(177.7778vh - 152.8889px));width:min(100%,calc(177.7778dvh - 152.8889px))}
}
@media(pointer:coarse){
 .hotspot:focus-visible span{opacity:1}
 .equipment-bar button:hover,.menu-buttons button:hover{transform:none}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.term-ghost{transition:none}}

@media(max-width:1024px){
 .hallig-board{display:contents}
 .hallig-everyday-task .task-graphic{min-width:0;aspect-ratio:auto;background-image:none!important;display:grid;gap:14px;padding:8px}
 .hallig-everyday-task .drop-zone{position:relative!important;inset:auto!important;width:100%!important;height:auto!important;min-height:100px;border:2px dashed #b39568;background:#fff5d9;padding:10px;align-items:stretch}
 .hallig-everyday-task .drop-target{opacity:1;font-size:18px;min-height:48px;background:#eadab5;color:#244b5b;font-weight:700}
 .mobile-situation{display:block;font-size:16px;margin:8px 0;color:#244b5b}
 .hallig-everyday-task .task-cards{position:static;inset:auto;width:100%;height:auto;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:none;gap:12px;padding:0;background:none;order:3}
 .hallig-everyday-task .term-card{height:auto;min-height:96px;font-size:16px!important;padding:12px 40px 12px 12px;text-align:left;color:#244b5b;line-height:1.5;overflow:visible}
 .hallig-everyday-task .term-card img{width:120px;height:80px;object-fit:cover;object-position:left;margin:0 0 8px}
 .hallig-everyday-task .matched{position:static;font-size:16px;height:auto;width:100%}
 .hallig-everyday-task .matched img{display:none}
 .hallig-everyday-task[open]{display:flex;flex-direction:column}
 .hallig-everyday-task h2{order:0}.hallig-everyday-task>p{order:1;flex-shrink:0}
 .hallig-everyday-task .task-selection{order:1}.hallig-everyday-task .task-touch-help{display:block;order:2}
 .hallig-everyday-task .task-cards{order:3;flex-shrink:0}.hallig-everyday-task .task-viewport{order:4;max-height:64dvh;flex-shrink:0}
 .hallig-everyday-task .task-feedback{order:5}.hallig-everyday-task>.task-done{order:6}.hallig-everyday-task>.check-close,.hallig-everyday-task>#hallig-everyday-close{order:7}
}

/* Shared learning-task shell: reserve controls, fit the board into the remaining height. */
dialog.drag-task{width:min(1400px,calc(100vw - 24px))!important;height:calc(100vh - 24px);height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-height:calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:clamp(10px,1.3vw,18px);overflow:hidden;scrollbar-gutter:auto}
dialog.drag-task[open]{display:block}
.task-shell{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:10px}
body:not(.menu-open) .task-header,.task-header{position:relative;inset:auto;display:block;min-height:0;padding:0 52px 0 0;margin:0;background:none;border:0}
.task-header h2{font-size:clamp(19px,2vw,25px);line-height:1.2;margin:0 0 5px}
.task-header p{font-size:clamp(12px,1vw,15px);line-height:1.3;margin:0}
.task-header small{display:none}
.task-header .task-touch-help{display:none}
.task-header .task-x{position:absolute;right:0;top:0;margin:0;width:44px;height:44px;min-height:44px;padding:0;font-size:28px}
.task-content{min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) clamp(250px,24vw,340px);gap:14px}
.task-board{min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}
.task-shell .task-viewport{min-width:0;min-height:0;width:100%;height:100%;max-height:none;display:flex;align-items:center;justify-content:center;overflow:hidden;border:0;padding:0;scrollbar-gutter:auto}
.task-shell .task-graphic{min-width:0!important;max-width:100%;max-height:100%;flex-shrink:0}
.task-shell .task-cards{position:static;inset:auto;margin:0;padding:0;min-width:0;min-height:0;width:100%;height:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(44px,max-content);align-content:center;gap:8px;background:none}
.task-shell .task-cards .term-card{width:100%;min-width:0;max-width:none;margin:0;min-height:60px;height:100%;font-size:clamp(12px,1.05vw,15px);line-height:1.2;padding:8px 30px 8px 7px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;overflow-wrap:anywhere}
.task-shell .task-cards .term-card img{width:auto;max-width:100%;height:clamp(28px,6vh,65px);object-fit:contain;flex-shrink:1;min-height:0}
.task-shell .drag-handle{width:27px;font-size:22px}
.task-shell .task-footer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 16px;align-items:center;min-width:0}
.task-footer .task-feedback{grid-column:1;min-height:2.6em;max-height:2.6em;font-size:clamp(12px,1vw,15px);line-height:1.3;margin:0;overflow:hidden}
.task-footer .task-selection{position:static;grid-column:1;grid-row:2;z-index:auto;padding:0;border:0;background:none;box-shadow:none;font-size:12px;line-height:1.2;margin:0;min-height:1.2em;max-height:1.2em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.task-footer .task-selection[hidden],.task-footer .task-selection:empty{display:block!important;visibility:hidden}
.task-actions{grid-column:2;grid-row:1/3;display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;max-width:440px}
.task-actions button{min-height:44px;margin:0!important;padding:8px 12px;font-size:14px}
/* Normalized image targets stay relative to the fitted image, never to its viewport. */
.task-shell .drop-zone{min-height:0;min-width:0}
.task-shell .drop-target{min-width:0;min-height:0;font-size:clamp(11px,1.05vw,15px);line-height:1.2}
.task-shell .term-card.matched{min-height:0;margin:0;font-size:clamp(11px,1vw,14px);line-height:1.15;padding:3px 5px;overflow-wrap:anywhere}
.task-shell .term-card.matched img{width:clamp(24px,4vw,52px);height:clamp(20px,4vh,36px);object-fit:contain;flex-shrink:0}
.task-shell .park-area-label,.task-shell .navigation-fixed{font-size:clamp(11px,1.05vw,15px);line-height:1.15;min-height:0;padding:2px}
.task-shell .course-waypoint{width:24px;height:24px;font-size:12px}
/* Boards made from cards use the same available-height contract. */
.collection-task .task-shell .task-graphic,.animal-task .task-shell .task-graphic,.cafe-task .task-shell .task-graphic{width:100%;height:100%;aspect-ratio:auto;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px}
.collection-task .task-shell .drop-zone,.animal-task .task-shell .drop-zone,.cafe-task .task-shell .drop-zone{min-height:0;padding:7px;gap:5px;overflow:hidden;justify-content:flex-start}
.collection-task .task-shell .drop-target,.animal-task .task-shell .drop-target,.cafe-task .task-shell .drop-target{flex-shrink:0;padding:4px;min-height:28px;font-size:clamp(12px,1.1vw,16px)}
.animal-task .task-shell .drop-zone img{width:100%;height:calc(100% - 68px);min-height:0;object-fit:contain;flex:1}
.animal-task .task-shell .matched{flex-shrink:0;width:100%}
.collection-task .task-shell .matched,.cafe-task .task-shell .matched{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:5px;flex:0 1 auto}
.collection-task .task-shell .task-graphic{grid-template-columns:repeat(3,minmax(0,1fr))}
.exhibition-task .task-shell .task-graphic{grid-template-columns:repeat(2,minmax(0,1fr))}
.route-task .task-shell .task-graphic{grid-template-columns:repeat(3,minmax(0,1fr))}
.route-task .task-shell .matched{min-width:0;flex-direction:column}
.route-task .task-shell .matched img{width:100%;height:clamp(36px,9vh,85px);object-fit:cover}
.cafe-task .task-shell .drop-target{text-align:left;font-size:clamp(12px,1.1vw,15px)}
.cafe-task .task-shell .matched img{width:70px;height:65px}
/* Hallig has sources printed into the board: scale both halves as one unit. */
.hallig-everyday-task[data-integrated-mode=true] .task-content{grid-template-columns:minmax(0,1fr)}
.hallig-everyday-task[data-integrated-mode=true] .hallig-board{position:relative;display:block;max-width:100%;max-height:100%}
.hallig-everyday-task[data-integrated-mode=true] .task-shell .task-cards{position:absolute;left:56.7%;top:17.3%;width:41.5%;height:80.5%;grid-template-columns:1fr;grid-template-rows:repeat(6,minmax(0,1fr));gap:1%;background:#20504b}
.hallig-everyday-task[data-integrated-mode=true] .task-shell .term-card{font-size:0;padding:0;overflow:hidden}
.hallig-everyday-task[data-integrated-mode=true] .task-shell .term-card img{width:100%;height:100%;max-height:none;object-fit:contain}
.hallig-everyday-task[data-integrated-mode=true] .task-shell .mobile-situation{display:none}
.hallig-everyday-task[data-integrated-mode=false] .hallig-board{display:block}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .task-graphic{width:100%;height:100%;aspect-ratio:auto;background-image:none!important;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:8px;padding:0}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .drop-zone{position:relative!important;inset:auto!important;width:auto!important;height:auto!important;border:1px dashed #b39568;background:#fff5d9;padding:6px;align-items:stretch;justify-content:flex-start;overflow:hidden}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .drop-target{opacity:1;background:#eadab5;color:#244b5b;font-size:13px;font-weight:700;flex-shrink:0}
.hallig-everyday-task[data-integrated-mode=false] .mobile-situation{display:block;font-size:12px;line-height:1.2;margin:4px 0;color:#244b5b}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .term-card{font-size:12px!important;line-height:1.15;color:#244b5b}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .task-cards .term-card img{display:none}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .matched{position:static;font-size:11px!important;height:auto;width:100%;color:#244b5b}
.hallig-everyday-task[data-integrated-mode=false] .task-shell .matched img{display:none}
@media(max-width:700px){
 dialog.drag-task{width:calc(100vw - 12px)!important;height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:8px}
 .task-shell{gap:6px}.task-header h2{font-size:19px}.task-header p{font-size:12px}
 .task-content{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(120px,30%);gap:6px}
 .task-shell .task-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;grid-auto-rows:minmax(38px,1fr)}
 .task-shell .task-cards .term-card{padding:5px 24px 5px 4px;font-size:12px;min-height:38px;gap:3px}
 .task-shell .task-cards .term-card img{height:32px}
 .task-shell .drag-handle{width:22px;font-size:20px}
 .task-footer .task-feedback{font-size:12px}.task-actions{max-width:160px;gap:4px}.task-actions button{font-size:12px;padding:6px;min-height:44px}
 .collection-task .task-shell .task-graphic,.animal-task .task-shell .task-graphic{grid-template-columns:repeat(3,minmax(0,1fr))}
 .exhibition-task .task-shell .task-graphic,.cafe-task .task-shell .task-graphic{grid-template-columns:repeat(2,minmax(0,1fr))}
 .task-shell .term-card.matched{font-size:11px}.collection-task .task-shell .matched img{width:24px;height:24px}
 .cafe-task .task-shell .matched{flex-direction:column}.cafe-task .task-shell .matched img{width:40px;height:32px}
 .task-shell .drop-target,.collection-task .task-shell .drop-target,.cafe-task .task-shell .drop-target{font-size:12px;min-height:0}
 .task-shell .park-area-label,.task-shell .navigation-fixed{font-size:11px}
 .task-shell .park-task .matched{font-size:11px}
 .hallig-everyday-task[data-integrated-mode=false] .task-content{grid-template-rows:minmax(0,1fr) 42%}
 .hallig-everyday-task[data-integrated-mode=false] .task-shell .task-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-height:500px) and (orientation:landscape){
 .task-content{grid-template-columns:minmax(0,1fr) 32%;grid-template-rows:minmax(0,1fr)}
 .task-header p{font-size:11px}.task-header h2{font-size:18px}.task-shell{gap:5px}
 .task-shell .task-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .task-shell .task-cards .term-card{font-size:11px;min-height:32px;padding:4px 22px 4px 3px}
 .task-shell .task-cards .term-card img{height:24px}
}
/* Small answer tasks and clue cards use the same pinned header/footer. */
dialog.compact-task{max-height:calc(100dvh - 24px);overflow:hidden;scrollbar-gutter:auto;padding:16px}
.compact-task .task-shell{height:auto;max-height:calc(100dvh - 60px);grid-template-rows:auto minmax(0,1fr) auto}
.compact-task-content{min-height:0;display:flex;flex-direction:column;gap:8px}
.compact-task-content p{margin:0;font-size:clamp(13px,1.2vw,16px);line-height:1.4}
.compact-task-content>img{min-height:0;flex:1;max-height:calc(100dvh - 210px)!important;object-fit:contain;margin:0 auto!important}
.compact-task .task-actions{max-width:none;flex-wrap:wrap;grid-column:1/-1;grid-row:auto}
.compact-task .task-footer [role=status]{grid-column:1/-1;margin:0;min-height:2.6em;font-size:14px;line-height:1.3}
.compact-task #ebb-quiz-question{font-size:clamp(16px,2vw,21px)}
.compact-task .code-fields{margin:10px 0}
@media(max-height:500px){.compact-task-content p{font-size:12px}.compact-task .task-header h2{font-size:18px}.compact-task .task-actions button{min-height:36px;padding:5px;font-size:12px}.compact-task .code-fields input{height:44px}.compact-task .code-fields{margin:0}.compact-task #ebb-quiz-form{gap:5px}.compact-task #ebb-quiz-question{font-size:16px}}
/* An answered image field shows its answer rather than stacking a second label. */
.drag-task[data-image-board=true] .task-shell .filled>.drop-target{display:none}
/* Printed-image answers must follow the fitted board size, including old ID rules. */
.drag-task[data-image-board=true] .task-shell .term-card.matched{font-size:clamp(9px,1vw,14px)!important;line-height:1.05;padding:1px 2px;min-height:0}
.hallig-everyday-task[data-integrated-mode=true] .task-shell .term-card.matched{font-size:0!important;padding:0}
@media(max-width:700px){.hallig-everyday-task[data-integrated-mode=false] .task-shell .matched{font-size:10px!important;line-height:1.1;padding:1px}}
.drag-task[data-image-board=true] .task-shell .term-card.matched{min-height:min-content}
/* On exceptionally short/narrow screens, page sources rather than drag across scroll areas. */
.task-pages{grid-column:1/-1;display:flex;gap:6px;justify-content:center}
.task-pages button{margin:0;min-height:36px;font-size:12px;padding:4px 8px}
.task-pages button[aria-pressed=true]{outline:2px solid #ead695}
.hallig-everyday-task[data-paged=true] .task-shell .task-cards{grid-template-columns:1fr;grid-auto-rows:minmax(44px,1fr);align-content:stretch}
.hallig-everyday-task[data-integrated-mode=false] .filled .mobile-situation{display:none}
@media(max-width:399px) and (max-height:799px){
 .exhibition-task .task-shell .task-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
 .exhibition-task .task-shell .task-cards .term-card{font-size:11px;padding:4px 22px 4px 4px}
 .exhibition-task .task-shell .task-cards .term-card img{height:24px}
}
@media(max-height:500px) and (orientation:landscape){
 .hallig-everyday-task[data-integrated-mode=false] .task-shell .task-graphic{grid-template-columns:repeat(3,minmax(0,1fr))}
 .hallig-everyday-task[data-integrated-mode=false] .task-content{grid-template-rows:minmax(0,1fr)}
 .hallig-everyday-task[data-integrated-mode=false] .task-shell .term-card{font-size:11px!important}
}
.drag-task[data-image-board=true] .task-shell .drop-target{font-size:clamp(9px,1vw,14px)!important;line-height:1.05;min-height:0;padding:1px}
/* Once the tray is empty, give its reserved space back to the finished display. */
.drag-task[data-tray-empty=true]:not([data-integrated-mode=true]) .task-content{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
.drag-task[data-tray-empty=true]:not([data-integrated-mode=true]) .task-content>.task-cards{display:none}
@media(max-height:500px){.cafe-task .task-shell .matched img{width:44px;height:28px}.cafe-task .task-shell .matched{font-size:11px;gap:3px}}
.course-rack{position:absolute;left:44%;top:82.7%;width:50.6%;height:10.8%;background:#f3ddb0;border:2px solid #927343;border-radius:9px;pointer-events:none}.course-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.course-lines line{stroke:#fff7df;stroke-width:4;stroke-dasharray:9 7;filter:drop-shadow(0 1px 1px #17485a)}.course-lines line.reached{stroke:#88e6a0;stroke-dasharray:none}.task-graphic .course-field{background:#fff4da;border:1px solid #735d35;border-radius:5px;padding-left:12px}.course-field-number{position:absolute;left:2px;top:0;font-size:10px;color:#354b58;pointer-events:none}.course-waypoint{pointer-events:none}#island-atlas-tip{max-width:460px;padding:24px;background:#fff1d3;color:#243e4c;border:3px solid #a18452;border-radius:12px}#island-atlas-tip::backdrop{background:#132b3a99}.atlas-tip-open{white-space:nowrap}
@media(max-width:600px){.course-field .matched{font-size:0!important;padding:0!important}.course-field .matched::after{content:attr(data-short);font-size:10px}.course-field-number{font-size:8px}.task-graphic .course-field{padding-left:0}.course-rack{border-width:1px}}
body.booting #main-menu,body.booting main{visibility:hidden}#boot-loading{position:fixed;inset:0;z-index:10000;display:grid;place-content:center;text-align:center;background:#f4e6c8;color:#244251;font-size:22px}#boot-loading button{margin:16px auto;padding:12px}
