/* Offline, keine Webfonts */
:root{--ink:#233b42;--ink2:#527178;--green:#237b54;--mint:#d9f2d9;--cream:#fff5de;--pale:#edf8ec;--sky:#cee9f8;--orange:#ffbd53;--shadow:0 14px 36px rgba(42,66,64,.16)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:ui-rounded,'Trebuchet MS',system-ui,Arial,sans-serif;color:var(--ink)}button{font:inherit;cursor:pointer}body{background:linear-gradient(135deg,#deedce 0%,#fff4db 56%,#c9e8f7 100%);-webkit-user-select:none;user-select:none;overscroll-behavior:none}button:focus-visible,.age:focus-visible{outline:4px solid #ffad26;outline-offset:3px}
header{background:linear-gradient(115deg,#286f55,#3b9675);display:flex;gap:12px;align-items:center;padding:11px clamp(12px,2.5vw,34px);box-shadow:0 4px 20px #1f42352a;color:white;justify-content:space-between;position:relative;z-index:3;min-height:78px}
.brand{display:flex;align-items:center;gap:10px;white-space:nowrap;cursor:pointer;min-width:0}.brand-icon{width:53px;height:53px;border:4px solid #f0d587;background:#f5b64a;color:#204c48;box-shadow:inset 0 1px 5px #fff5,0 2px 5px #0004;border-radius:16px;display:grid;place-items:center;font-size:31px;transform:rotate(-6deg)}.brand-text{display:flex;flex-direction:column;line-height:1}.brand strong{font-size:clamp(18px,2.45vw,31px);letter-spacing:.1px;text-shadow:1px 2px #1e523f}.brand small{font-size:12px;color:#e8f9e7;letter-spacing:.08em;text-transform:uppercase;margin-top:6px;font-weight:800}
.header-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.header-btn,.plain-btn{background:#ffffffeb;color:#255b53;border:none;border-radius:16px;padding:11px 15px;font-weight:900;box-shadow:0 3px 0 #0002;min-height:44px}.header-btn:hover,.plain-btn:hover{background:#fff8d7}.header-btn.active{background:#ffdd75;color:#65400e}.header-btn:disabled{opacity:.5;cursor:not-allowed}
main{width:min(1480px,100%);margin:0 auto;padding:clamp(12px,2vw,25px)}.hidden{display:none!important}.eyebrow{font-weight:900;letter-spacing:.14em;color:#4c8761;text-transform:uppercase;font-size:13px}.hero{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(300px,1.1fr);gap:22px;align-items:stretch;margin-top:3px}.hero-copy{background:#fffdf0e8;border:2px solid #fff;box-shadow:var(--shadow);border-radius:28px;padding:clamp(24px,3vw,48px)}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(29px,4.1vw,56px);line-height:1.05;margin-bottom:14px;color:#285446}h2{font-size:clamp(21px,2.4vw,29px);margin-bottom:8px}h3{font-size:19px;margin:0 0 4px}p{line-height:1.48}.hero-copy p{font-size:clamp(16px,1.45vw,19px);color:#56716e}.hero-art{position:relative;overflow:hidden;aspect-ratio:5/3;align-self:center;min-height:260px;border:5px solid #fff;border-radius:28px;box-shadow:var(--shadow);background:#7cc4e8}.hero-art img{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.hero-art .bubble{position:absolute;top:16px;right:16px;background:#fff9;border-radius:15px;padding:8px 12px;font-size:14px;font-weight:900;color:#2e6450;backdrop-filter:blur(5px)}.start-btn,.success-btn{border:0;border-radius:17px;background:linear-gradient(180deg,#ffcf68,#ff9d2f);padding:15px 23px;font-size:19px;box-shadow:0 5px 0 #b76b22,0 10px 18px #9c712a39;font-weight:1000;color:#4c3715;min-height:54px}.start-btn:active,.success-btn:active{transform:translateY(4px);box-shadow:0 1px 0 #a96a22}.small-note{font-size:13px;color:#71817b!important;margin:17px 0 0!important}
.age-switch{display:flex;gap:10px;margin:19px 0;flex-wrap:wrap}.age{display:flex;align-items:center;justify-content:center;gap:8px;padding:11px 18px;border-radius:15px;border:3px solid #d1e6d4;background:white;min-height:55px;color:#44685b;font-weight:1000}.age.active{border-color:#ffb737;background:#fff0c9;color:#87591c;box-shadow:0 3px 0 #d29d4e}.age span{font-size:23px}
.gallery-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:17px 0}.gallery-title{font-size:clamp(24px,3vw,39px);margin:0}.subheading{color:#58756d;font-size:15px;margin:5px 0}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{border:none;border-radius:999px;padding:12px 17px;font-weight:900;background:white;color:#476e65;min-height:46px}.chip.active{background:#2f8865;color:white;box-shadow:0 4px 0 #226348}.vehicle-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(10px,1.5vw,20px)}.vehicle-card{border:4px solid white;background:#fffef9;border-radius:23px;padding:7px;text-align:left;box-shadow:0 5px 0 #d6e2d2,0 9px 21px #568b722c;overflow:hidden;transition:transform .15s,box-shadow .15s;min-width:0}.vehicle-card:hover{transform:translateY(-4px);box-shadow:0 8px 0 #d6e2d2,0 13px 25px #568b723a}.vehicle-card:active{transform:translateY(3px)}.vehicle-card img{aspect-ratio:5/3;width:100%;object-fit:cover;border-radius:13px;background:#c3deca;display:block}.vehicle-card .card-name{padding:9px 4px 0;display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:clamp(14px,1.45vw,19px);font-weight:1000}.vehicle-card .card-tag{font-size:12px;font-weight:800;color:#588071;padding:1px 4px 6px}.card-done{background:#d9f1c8;color:#38734f;border-radius:16px;padding:3px 8px;font-size:11px}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,310px);gap:15px;align-items:stretch}.game-card,.tray-card{border:3px solid #fff;border-radius:24px;background:#fffcf2;box-shadow:var(--shadow);overflow:hidden;min-width:0}.game-top{padding:13px 15px;display:flex;align-items:center;justify-content:space-between;gap:10px}.game-top h2{font-size:clamp(19px,2vw,25px);margin:0}.progress-pill{padding:8px 13px;border-radius:999px;background:#d9efcf;color:#317b51;font-weight:1000;white-space:nowrap}.stage-shell{margin:0 12px;border:5px solid #fff;border-radius:18px;overflow:hidden;position:relative;box-shadow:inset 0 0 0 4px #98c6ba; background:#a9d6ce}.stage{display:block;width:100%;height:auto;aspect-ratio:5/3;touch-action:none;cursor:crosshair}.stage .slot{fill:#f4fcf6;fill-opacity:0;stroke:#277d61;stroke-width:4;stroke-dasharray:15 12;stroke-opacity:0;rx:12}.stage .slot.highlight{fill-opacity:.14;stroke-opacity:.96;animation:dash 16s linear infinite}.stage .assembled-piece{filter:drop-shadow(0px 2px 2px #112b3355)}.scene-dim{fill:#fff;fill-opacity:.13;pointer-events:none}.board-caption{min-height:53px;padding:12px 17px;display:flex;justify-content:space-between;gap:8px;align-items:center;font-weight:800;color:#54756a;font-size:14px}.board-caption strong{color:#2e7655}.game-btns{display:flex;gap:7px;flex-wrap:wrap;padding:0 14px 13px}.game-btn{border:2px solid #d3ead5;border-radius:14px;background:#f1faf0;padding:9px 12px;min-height:45px;font-weight:900;color:#2e6652;font-size:14px}.game-btn.active{border-color:#e7b65d;background:#fff0c3}.game-btn:hover{background:#fff7d9}.tray-card{padding:14px;display:flex;flex-direction:column;min-height:0}.tray-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.tray-head h2{margin:0;font-size:23px}.tray-instructions{font-size:14px;color:#5f7c74;margin:0 0 12px}.tray-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;overflow-y:auto;align-content:start;flex:1;max-height:600px;padding:4px 4px 8px}.part-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:0;border:3px solid #d7e9df;border-radius:14px;background:linear-gradient(#fff,#f1f8ec);padding:7px 4px 8px;min-height:114px;color:#4c685c;touch-action:none;cursor:grab}.part-card img{width:100%;height:72px;object-fit:contain;pointer-events:none;filter:drop-shadow(1px 3px 2px #14333366)}.part-card .part-name{font-weight:900;font-size:11px;line-height:1.18;max-width:100%;overflow-wrap:anywhere}.part-card.selected{background:#fff0c7;border-color:#ffad39;box-shadow:0 0 0 2px #ffe39b}.part-card.placed{opacity:.36;pointer-events:none;background:#e1f2df;border-color:#cde2d2}.part-card.placed img{filter:grayscale(.5)}.part-card.placed:after{content:'✓';position:absolute;background:#40956a;color:white;border-radius:50%;padding:2px 8px;font-size:19px}.tray-bottom{padding:9px 0 0;display:flex;gap:8px;justify-content:space-between;align-items:center;font-size:13px;color:#5f7972}.tray-bottom button{padding:10px 12px}.drag-ghost{position:fixed;z-index:999;pointer-events:none;width:145px;height:120px;display:none;object-fit:contain;filter:drop-shadow(0px 7px 7px #102c3680)}
.modal-scrim{position:fixed;z-index:99;inset:0;background:#183a3dbb;display:flex;align-items:center;justify-content:center;padding:16px;backdrop-filter:blur(5px)}.modal{max-width:min(570px,100%);width:100%;background:#fffdf2;border:4px solid white;border-radius:28px;box-shadow:0 25px 70px #081f2c70;overflow:hidden;text-align:center}.modal h2{font-size:clamp(24px,3.6vw,39px);color:#267a5a;margin:15px 0 8px}.modal p{color:#547369;padding:0 18px;margin:0 0 18px}.modal img{display:block;width:100%;max-height:275px;object-fit:cover}.modal-foot{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin:18px}.modal-foot button{font-size:16px}.modal .checkmark{font-size:45px;margin-top:6px}.modal.hide-art img{display:none}.tiny{color:#668076;font-size:12px}.footnote{text-align:center;color:#5f7c74;font-size:12px;margin:20px 0 3px}.progress-track{height:11px;border-radius:12px;background:#d6ead5;overflow:hidden;flex:1;min-width:50px}.progress-bar{height:100%;background:linear-gradient(90deg,#8bcf67,#2eaa79);border-radius:12px;transition:width .25s}
.stage.is-complete .animated-vehicle{animation:arrival 1.4s ease-in-out 1}.stage.is-complete[data-vehicle="traktor"] [data-part-id="vorderrad"],.stage.is-complete[data-vehicle="traktor"] [data-part-id="hinterrad"],.stage.is-complete[data-vehicle="radlader"] [data-part-id="vorderrad"],.stage.is-complete[data-vehicle="radlader"] [data-part-id="hinterrad"]{transform-box:fill-box;transform-origin:center;animation:wheelspin 1.4s linear 1}.stage.is-complete[data-vehicle="maehdrescher"] [data-part-id="haspel"]{transform-origin:258px 444px;animation:wheelspin 1.6s linear 1}.stage.is-complete[data-vehicle="bagger"] [data-part-id="schaufel"]{animation:bucketbob 1.3s ease-in-out 1}.stage.is-complete[data-vehicle="kipper"] [data-part-id="kippmulde"],.stage.is-complete[data-vehicle="kipper"] [data-part-id="heckklappe"]{transform-origin:865px 420px;animation:tipper .8s ease-in-out 1}
@keyframes arrival{0%,100%{transform:translateX(0)}55%{transform:translateX(13px)}}@keyframes wheelspin{to{transform:rotate(360deg)}}@keyframes bucketbob{50%{transform:translateY(-19px)}}@keyframes tipper{50%{transform:rotate(-11deg)}}@keyframes dash{to{stroke-dashoffset:290}}
@media(max-width:950px){.vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hero{gap:12px}.game-layout{grid-template-columns:minmax(0,1fr) minmax(225px,260px)}.part-card{min-height:100px}.part-card img{height:60px}.tray-grid{gap:6px}.header-btn{padding:9px 11px}}
@media(max-width:700px){header{align-items:flex-start;flex-wrap:wrap}.header-actions{flex:1}.hero{grid-template-columns:1fr}.hero-art{min-height:220px}.vehicle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.game-layout{grid-template-columns:1fr}.tray-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-height:320px}.tray-card{min-height:auto}.game-card{min-height:auto}}
@media(max-height:730px) and (min-width:750px){main{padding:10px}.game-top{padding:7px 12px}.game-btns{padding-bottom:8px}.board-caption{min-height:32px;padding:5px 12px}.part-card{min-height:91px}.part-card img{height:59px}.tray-grid{max-height:480px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
.world-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.world-card{text-align:left;overflow:hidden;min-width:0;background:#fffef7;border:4px solid #fff;border-radius:23px;box-shadow:0 6px 0 #d8e5d9,0 12px 22px #4269562c;padding:7px;color:#245a48}.world-card:active{transform:translateY(3px)}.world-visual{width:100%;aspect-ratio:16/9;overflow:hidden;border-radius:16px;background:#b6dee0}.world-visual img{width:100%;height:100%;object-fit:cover;display:block}.world-card-text{display:grid;grid-template-columns:39px 1fr;align-items:center;padding:12px 8px 13px;gap:2px 8px}.world-emoji{font-size:30px;grid-row:span 2}.world-card-text strong{font-size:clamp(17px,2vw,26px)}.world-card-text span:last-child{font-size:13px;color:#668578;font-weight:800}.v4vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr));max-width:1160px;margin:0 auto}.tile-image{display:block;position:relative}.tile-image img{display:block;width:100%;aspect-ratio:5/3;object-fit:cover;border-radius:13px}.lock-cover{display:none;position:absolute;inset:0;align-items:center;justify-content:center;font-size:53px;color:white;text-shadow:0 2px 10px #172a26;border-radius:13px;background:#253e4366}.vehicle-card.is-locked .tile-image img{filter:grayscale(1) brightness(.70)}.vehicle-card.is-locked .lock-cover{display:flex}.vehicle-card.is-locked{opacity:.8}.vehicle-card.is-locked:hover{transform:none}.unlock-note{background:#fffef3;border:2px solid #e0e9cf;padding:14px 17px;margin:18px 0;border-radius:16px;color:#446c59}.part-card.future{opacity:.3;filter:grayscale(.7)}.stage .target-highlight{fill:#ffeb8b;fill-opacity:.10;stroke:#f6bc44;stroke-width:3.5;stroke-dasharray:9 12;animation:dash 9s linear infinite;pointer-events:none}#machine{transform-origin:center;transition:transform .35s ease}.celebrating #machine{animation:vehicleCelebration 10s ease-in-out 1}.celebrating [data-part-id="schaufel"],.celebrating [data-part-id="haspel"],.celebrating [data-part-id="kippmulde"],.celebrating [data-part-id="hubarme"]{animation:mechanismCelebration 3s ease-in-out 3;transform-box:fill-box;transform-origin:55% 65%}.celebrate-label{position:absolute;top:10px;left:50%;transform:translateX(-50%);border:3px solid #fff;background:#fff4c6ee;border-radius:25px;padding:10px 16px;font-size:24px;font-weight:1000;color:#b27015;box-shadow:0 5px 18px #0002;pointer-events:none}.celebration-text{padding:40px 10px;text-align:center;font-size:23px;font-weight:800;color:#3c735d}.celebration-text p{font-size:15px;margin:20px 0}.controls{display:grid;gap:13px;margin:20px 0}.control-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.control-btn{border:2px solid #bfd9cb;background:#edf8ef;min-height:82px;border-radius:15px;padding:12px 8px;font-size:16px;color:#275e4e;font-weight:900;box-shadow:0 4px 0 #c3d8c7;touch-action:manipulation}.control-btn:active{background:#ffedb6;transform:translateY(3px);box-shadow:0 1px 0 #d0b36f}.full{width:100%}@keyframes vehicleCelebration{0%,100%{transform:translateX(0px)}15%{transform:translateX(-24px)}42%{transform:translateX(45px)}60%{transform:translateX(45px)}83%{transform:translateX(-15px)}}@keyframes mechanismCelebration{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg)}}@media(max-width:850px){.world-grid{gap:9px}.world-card-text{grid-template-columns:1fr}.world-emoji{display:none}.v4vehicle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.control-btn{min-height:65px;font-size:13px}}@media(max-width:620px){.world-grid{grid-template-columns:1fr}.v4vehicle-grid{grid-template-columns:1fr 1fr}.world-visual{aspect-ratio:17/6}}


/* Version 5 – feste Puzzlefläche auf dem iPad */
body.game-page{overflow:hidden}
body.game-page main{height:calc(100svh - 78px);padding-top:12px;padding-bottom:12px}
body.game-page #app{height:100%}
.game-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:15px;align-items:stretch;height:100%}
.game-card{display:flex;flex-direction:column;min-height:0;height:100%}
.stage-shell{flex:1;display:flex;align-items:center;justify-content:center;min-height:0;position:relative}
.stage{width:100%;height:auto;max-height:100%}
.tray-card{padding:14px;display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden}
.tray-card.build-mode .tray-grid{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding-right:4px}
.tray-card.build-mode .tray-bottom{padding-top:10px;border-top:1px solid #deeadf;margin-top:8px}
.info-mode .celebration-text{display:flex;flex-direction:column;gap:14px;justify-content:center;align-items:stretch;flex:1}
.finish-badge{display:inline-flex;align-self:flex-start;background:#daf1d7;color:#286d4d;padding:8px 12px;border-radius:999px;font-weight:1000}
.done-actions{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.done-actions .full{width:100%}
.celebration-text p{margin:0;color:#4d6e63;line-height:1.45}
#machine{transform-origin:center center}
.stage.celebrating #machine{animation:driveCelebrate 6s ease-in-out infinite}
@keyframes driveCelebrate{0%{transform:translateX(-26px) translateY(0)}25%{transform:translateX(18px) translateY(-2px)}50%{transform:translateX(32px) translateY(0)}75%{transform:translateX(-10px) translateY(-1px)}100%{transform:translateX(-26px) translateY(0)}}
@media (max-width: 980px){
  body.game-page{overflow:auto}
  body.game-page main{height:auto}
  .game-layout{grid-template-columns:1fr;height:auto}
  .game-card,.tray-card{height:auto}
  .tray-card.build-mode .tray-grid{max-height:45svh}
}


/* V7 – vollständig neu kolorierte, hochauflösende 2D-Grafikfamilie */
:root { --ink:#203d51;--ink2:#597580;--green:#267b64;--pale:#edf6f5;--sky:#d6edf7;--orange:#f1b547;--shadow:0 7px 0 #24435615,0 12px 25px #223e4e18 }
body{background:#eef5f3;color:#233b4d}
header{background:#1f4d67;box-shadow:none;border-bottom:5px solid #efb548}
.brand-icon{border-color:#ffffff;background:#f3bd4e;color:#213e53;transform:none;box-shadow:none}
.brand strong{color:#ffffff;text-shadow:none}
.hero-copy,.world-card,.vehicle-card,.game-card,.tray-card{background:#ffffff;box-shadow:0 7px 18px #233e501b}
.hero-copy{border:3px solid #d4e4e5;border-radius:22px}
.hero-art{background:#daeaf0;border:4px solid white;border-radius:20px}
.world-card,.vehicle-card{border:3px solid #d7e7e9;box-shadow:0 6px 0 #c9dddf;border-radius:19px}
.world-card:hover,.vehicle-card:hover{box-shadow:0 6px 0 #c2d9df}
.world-visual{background:#d8edf4}
.vehicle-card .card-name{color:#254a5a}
.stage-shell{background:#d9ecf2;border:3px solid #d7e3e4;box-shadow:none;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.stage{display:block;width:100%;height:100%;max-height:100%;object-fit:contain}
.game-top{flex-shrink:0}
.game-btns,.board-caption{flex-shrink:0}
.tray-card.build-mode .tray-grid{overscroll-behavior:contain;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;min-height:0;max-height:none;scrollbar-width:thin}
.part-card{touch-action:pan-y;border:2px solid #bfd7dd;border-radius:13px;background:#f3f9fa;min-height:108px}
.part-card.selected{background:#f9e8bd;border-color:#e8a32e}
.part-card img{filter:none;height:73px}
.part-card.placed{background:#d5e9de}
.game-page{height:100svh;overflow:hidden}
.game-page header{flex:0 0 auto}
body.game-page main{height:calc(100svh - 78px);min-height:0;overflow:hidden;padding:10px 14px}
.game-page #app,.game-page .game-layout{height:100%;min-height:0}
.game-page .game-card,.game-page .tray-card{height:100%;min-height:0;overflow:hidden}
.game-layout{grid-template-columns:minmax(0,1fr) clamp(290px,29vw,370px)}
.tray-instructions{flex-shrink:0}
@media (max-width:980px) and (orientation:landscape) and (min-width:700px){
  body.game-page{overflow:hidden}
  body.game-page main{height:calc(100svh - 78px);overflow:hidden}
  .game-page .game-layout{grid-template-columns:minmax(0,1fr) minmax(255px,34vw);height:100%}
  .game-page .game-card,.game-page .tray-card{height:100%}
  .tray-card.build-mode .tray-grid{max-height:none}
  .tray-card{padding:10px}
  .game-btn{padding:7px 9px;min-height:40px}
  .stage-shell{margin:0 8px}
}
@media(max-width:690px), (orientation:portrait) and (max-width:980px){
  body.game-page{overflow:auto;height:auto}
  body.game-page main{height:auto;overflow:visible}
  .game-page .game-layout{grid-template-columns:1fr;height:auto}
  .game-page .game-card,.game-page .tray-card{height:auto}
  .game-page .tray-grid{max-height:40vh!important}
}
