/* A game home, a quiet play surface, one shared earned progression. */
[hidden]{display:none!important}body[data-screen="home"]>.app-shell{display:none}body:not([data-screen="home"])>.home-screen{display:none}.shell-icon{width:44px;height:44px;min-width:44px;display:grid;place-items:center;border:1px solid #fff;border-radius:14px;background:#ffffffb0;box-shadow:0 3px 0 #c5d9ce;color:#19484b;font-size:25px;font-weight:600}.shell-icon:active{transform:translateY(2px);box-shadow:0 1px 0 #c5d9ce}
.home-screen{height:100dvh;max-width:540px;min-height:400px;margin:auto;padding:max(12px,env(safe-area-inset-top)) 20px max(12px,env(safe-area-inset-bottom));display:flex;flex-direction:column;background:radial-gradient(ellipse at 50% 45%,#f9fff8 0,#e9f4ec 50%,#d6e9df 100%);overflow:hidden;position:relative;box-shadow:0 0 90px #163e3d14}.home-header{height:44px;display:flex;justify-content:space-between;align-items:center;flex-shrink:0}.home-header img{display:block;width:118px;height:auto}.home-heading{margin:14px 0 12px}.home-heading .eyebrow{font-size:9px;letter-spacing:1.7px;color:#678879}.home-heading h1{font-size:32px;line-height:1.05;letter-spacing:-.9px;margin:5px 0 6px;color:#19484b}.home-heading p{font-size:13px;color:#688777;margin:0}.home-rank{display:flex;align-items:center;gap:12px;text-align:left;background:linear-gradient(125deg,#fffefa,#f0f7e9);border:1px solid #fff;border-radius:20px;padding:10px 14px;box-shadow:0 4px 0 #c5d9ca,0 10px 20px #19484b09;flex-shrink:0;z-index:2}.home-emblem{width:44px;height:51px;flex-shrink:0;filter:drop-shadow(0 3px 2px #19484b25)}.home-emblem svg{width:100%;height:100%}.home-rank>span:nth-child(2){display:flex;flex-direction:column;flex:1;gap:2px}.home-rank small{font-size:8px;letter-spacing:1.4px;color:#6d8c7a}.home-rank strong{font-size:18px;line-height:1}.home-rank #homeRankNext{font-size:11px;color:#718875}.home-rank>span:last-child{font-size:26px;color:#87a294}.home-rank-meter{display:block;height:4px;background:#dce9dc;max-width:230px;border-radius:5px;margin-top:4px;overflow:hidden}.home-rank-meter i{display:block;height:100%;background:linear-gradient(90deg,#327b69,#97bf78);border-radius:5px}
.home-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;margin:3px -20px 0;scrollbar-width:none;overscroll-behavior:contain;position:relative;mask-image:linear-gradient(transparent,black 22px,black calc(100% - 15px),transparent)}.home-scroll::-webkit-scrollbar{display:none}.case-road{position:relative;padding:28px 25px 46px;display:flex;flex-direction:column;align-items:center;isolation:isolate}.case-road::before{content:'';position:absolute;top:105px;bottom:65px;left:calc(50% - 4px);width:8px;background:repeating-linear-gradient(#91bbae 0 12px,#91bbae22 12px 22px);border-radius:8px;z-index:-1}.road-start{text-align:center;padding:5px 0 22px;display:flex;flex-direction:column;background:linear-gradient(#eaf5ed00,#eaf5ed 25%,#eaf5ed 75%,#eaf5ed00);width:100%}.road-start span{font-size:8px;letter-spacing:2px;color:#7d9a86}.road-start b{font-size:21px;letter-spacing:-.4px}.road-start small{font-size:10px;color:#829789}.road-chapter{align-self:stretch;text-align:center;padding:10px;margin:5px 0 15px;background:#e6f1e8;border:1px solid #ffffffaa;border-radius:14px;color:#537b66;font-size:12px;font-weight:600;box-shadow:0 3px 10px #d7e9df}.road-chapter small{display:block;font-size:9px;color:#839c89;font-weight:400}.road-stop{position:relative;margin:0 0 26px;transform:translateX(var(--shift));display:flex;align-items:center;flex-direction:column;width:120px;min-height:101px}.road-stop::before{content:'';position:absolute;top:38px;left:calc(50% - var(--shift));width:var(--reach);height:5px;background:#98bfad;z-index:-1;transform:translateX(-50%)}.road-node{width:82px;height:77px;position:relative;border:2px solid #ffffffc9;border-radius:25px;background:linear-gradient(145deg,#fcfff9,#c5dcca);box-shadow:inset 0 2px 0 #fff,inset 0 -3px 0 #0000000a,0 6px 0 #9cbfa9,0 12px 16px #356b5520;transition:transform .15s,box-shadow .15s;color:#6d9280}.road-number{font-size:31px;font-weight:700;line-height:1;text-shadow:0 2px 0 #ffffff85}.road-node.done{background:linear-gradient(145deg,#79bd9e,#3b8b71);color:#fffbea;box-shadow:inset 0 2px 0 #ffffff55,inset 0 -3px 0 #00000012,0 6px 0 #296b57,0 12px 16px #356b5520}.road-node.done .road-number{text-shadow:0 2px 0 #205e5144}.road-node.current{background:linear-gradient(145deg,#388373,#194e4a);color:#fff9dc;box-shadow:inset 0 2px 0 #ffffff55,0 6px 0 #123d39,0 0 0 6px #f1d58c,0 13px 22px #356b5530}.road-node.current .road-number{text-shadow:0 2px 0 #123f3e}.road-node.selected{outline:3px solid #d3ac54;outline-offset:8px;transform:translateY(-3px)}.road-node:active{transform:translateY(3px)}.road-node[data-grade="Schwer"]:not(.done):not(.current){background:linear-gradient(145deg,#f8dfb4,#eac081);color:#97692a;box-shadow:inset 0 2px 0 #fff8,0 6px 0 #c39a61,0 12px 16px #356b5518}.road-node[data-grade="Sehr schwer"]:not(.done):not(.current){background:linear-gradient(145deg,#efb6ab,#dc867e);color:#923d40;box-shadow:inset 0 2px 0 #fff8,0 6px 0 #b86565,0 12px 16px #356b5518}.road-check{position:absolute;right:-8px;top:-7px;border-radius:50%;background:#f8f8de;color:#357c65;font-size:14px;font-weight:700;width:23px;height:23px;border:2px solid #e3efdf}.road-check:empty{display:none}.road-stars{position:absolute;bottom:-21px;left:50%;transform:translateX(-50%);color:#bd8d30;letter-spacing:2px;font-size:17px;white-space:nowrap;text-shadow:0 1px 0 #fff}.road-tag{font-size:8px;letter-spacing:.65px;white-space:nowrap;margin-top:27px;font-weight:700;color:#6c927d;text-transform:uppercase;min-height:12px}.road-node.done+.road-tag{margin-top:27px}.road-award{display:flex;gap:13px;align-items:center;text-align:left;width:220px;margin:0 0 24px;background:#e7f0e3;border:1px solid #fff;border-radius:22px;padding:12px 18px;box-shadow:0 4px 0 #c5d8c5}.road-award>span{width:46px;height:53px;flex-shrink:0}.road-award svg{width:100%;height:100%}.road-award div{display:flex;flex-direction:column}.road-award small{font-size:8px;letter-spacing:1px}.road-award b{font-size:16px}.road-award em{font-size:10px;font-style:normal}.road-award.unearned{color:#81978a}.road-award.unearned>span{opacity:.3;filter:grayscale(.8)}.road-award.earned{background:linear-gradient(135deg,#f9f4d5,#edf3dc);color:#6c713b;border-color:#fff8d6}
.home-dock{flex-shrink:0;z-index:3;padding-top:5px}.selected-case{text-align:center;margin:1px 0 12px;display:flex;flex-direction:column;gap:2px;min-height:56px}.selected-case>span{color:#76917f;font-size:10px}.selected-case>span[data-grade="Schwer"]{color:#a37638}.selected-case>span[data-grade="Sehr schwer"]{color:#ba625e}.selected-case strong{font-size:20px;line-height:1.1;letter-spacing:-.3px}.selected-case small{font-size:11px;line-height:1.25;color:#6e8b79;max-width:330px;margin:auto}.play-case{width:100%;display:flex;align-items:center;justify-content:center;gap:16px;min-height:58px;font-size:19px;border-radius:19px;border-color:#287464;box-shadow:inset 0 2px 0 #ffffff44,0 5px 0 #174d43,0 9px 22px #19484b20;background:linear-gradient(145deg,#48967d,#216451)}.home-nav{display:flex;gap:6px;margin-top:18px}.home-nav>button,.home-nav>a{width:33.333%;border:0;background:none;display:flex;flex-direction:column;align-items:center;padding:5px 0;gap:2px;color:#5f8370;min-height:60px;font-size:11px}.home-nav>button>span,.home-nav>a>span{font-size:20px;line-height:1;color:#3d7764}.home-nav b{font-size:11px;font-weight:600}.home-nav small{font-size:9px;color:#7e9787}.home-nav>*:hover{background:#ffffff55;border-radius:12px}
body[data-screen="play"] .app-shell{padding-top:max(8px,env(safe-area-inset-top));padding-inline:12px}body[data-screen="play"] .hud{padding:8px 9px 8px;border-radius:20px;box-shadow:0 3px 0 #c5d9cc,0 8px 22px #19484b09}body[data-screen="play"] .hud-main{display:flex;gap:7px;justify-content:flex-start;position:relative}#gameHome{font-size:30px}body[data-screen="play"] #help{order:5;width:38px;height:42px;min-width:38px;margin:0;background:none;border:0;box-shadow:none}#help svg{width:21px;height:21px}body[data-screen="play"] .level-block{display:flex;flex:1;min-width:0;flex-direction:column;align-items:flex-start;gap:3px}body[data-screen="play"] .case-eyebrow,body[data-screen="play"] .counter-label{display:none}body[data-screen="play"] .hud .level-block #levelNo{font-size:19px;letter-spacing:-.5px;white-space:nowrap}body[data-screen="play"] .hud #difficulty{font-size:9px;padding:1px 5px;border-radius:5px}body[data-screen="play"] .life-row{display:flex;flex-direction:column;align-items:flex-end;gap:3px}body[data-screen="play"] .life-label{font-size:9px;white-space:nowrap}body[data-screen="play"] .life-label b{font-size:10px}body[data-screen="play"] .hearts{gap:1px}body[data-screen="play"] .hearts span{width:12px;height:12px}body[data-screen="play"] .progress-capsule{margin-top:4px;min-height:7px;padding:0 43px 0 47px;justify-content:flex-end}body[data-screen="play"] .progress{position:relative;width:100%;height:3px;bottom:auto;order:0;flex:1}body[data-screen="play"] .progress-capsule #count{order:1;font-size:9px;color:#6c8b78;white-space:nowrap;margin-left:8px;line-height:1}body[data-screen="play"] .rank-trail{display:block;position:static;inset:auto;width:29px;margin:0;min-height:0;flex-shrink:0}body[data-screen="play"] .rank-summary{min-height:40px;padding:0;width:29px}body[data-screen="play"] .rank-emblem{width:28px;height:33px}body[data-screen="play"] .rank-copy,body[data-screen="play"] .rank-next,body[data-screen="play"] .rank-chevron{display:none}body[data-screen="play"] .case-brief{position:absolute;top:91px;left:0;right:0;z-index:3;pointer-events:none;opacity:0;padding:8px;background:linear-gradient(90deg,transparent,#f5faf1ee,transparent)}body[data-screen="play"] .case-brief.brief-enter{animation:brief-arrival 3.7s both}body[data-screen="play"] .case-brief strong{font-size:14px}body[data-screen="play"] .case-brief span{font-size:11px}body[data-screen="play"] .stage{margin:5px -5px 0;min-height:100px}body[data-screen="play"] .controls{padding-top:8px;flex-shrink:0}body[data-screen="play"] .controls button{min-height:92px;font-size:11px}body[data-screen="play"] .controls .tool-icon{width:57px;height:52px;border-radius:17px}body[data-screen="play"] .controls .tool-next{font-size:8px}body[data-screen="play"] .stock{right:calc(50% - 36px)}body[data-screen="play"] .drag-note{font-size:9px;bottom:3px}
@keyframes brief-arrival{0%,75%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-5px)}}.brand-intro{position:fixed;inset:0;z-index:200;background:#e9f4ed;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:17px;pointer-events:none;animation:brand-out .85s both}.brand-intro>img{width:80px;height:75px;object-fit:contain;filter:drop-shadow(0 5px 0 #c5ddc9)}.brand-intro strong{font-size:29px;letter-spacing:-.7px;color:#19484b}.brand-intro>.intro-logo{width:112px;height:auto;filter:none;opacity:.7}@keyframes brand-out{0%,55%{opacity:1}100%{opacity:0;visibility:hidden}}body[data-preview="true"] .brand-intro{display:none}
@media(max-width:360px){.home-screen{padding-inline:15px}.home-scroll{margin-inline:-15px}.home-heading h1{font-size:29px}.home-heading{margin:10px 0}.home-rank{padding:8px 12px}.home-rank strong{font-size:17px}body[data-screen="play"] .hud-main{gap:4px}body[data-screen="play"] .hud .level-block #levelNo{font-size:17px}body[data-screen="play"] .rank-trail{width:25px}body[data-screen="play"] .rank-emblem{width:25px}body[data-screen="play"] .hud{padding-inline:6px}body[data-screen="play"] .hearts span{width:10px;height:10px}}
@media(max-height:740px){.home-heading{margin:8px 0}.home-heading h1{font-size:28px}.home-heading p{display:none}.home-rank{padding-block:7px}.home-emblem{width:36px;height:44px}.home-rank strong{font-size:16px}.home-dock{padding-top:2px}.selected-case{margin-bottom:8px;min-height:43px}.selected-case small{display:none}.selected-case strong{font-size:18px}.play-case{min-height:50px;font-size:17px}.home-nav{margin-top:12px}.home-nav>*{min-height:49px!important}.home-nav>button>span,.home-nav>a>span{font-size:17px}.home-heading .eyebrow{font-size:8px}body[data-screen="play"] .controls button{min-height:82px}body[data-screen="play"] .controls .tool-icon{height:46px;width:52px}}
@media(orientation:landscape) and (max-height:500px){.home-screen{max-width:900px;min-height:0;display:grid;grid-template-columns:210px 1fr 240px;grid-template-rows:44px 1fr;gap:8px 15px;padding:8px 15px}.home-header{grid-column:1;grid-row:1}.home-heading{grid-column:1;grid-row:2;align-self:start;margin-top:8px}.home-heading h1{font-size:25px}.home-heading .eyebrow{font-size:8px}.home-rank{grid-column:1;grid-row:2;align-self:end;margin-bottom:8px}.home-rank #homeRankNext{font-size:9px}.home-rank small{font-size:7px}.home-emblem{width:30px;height:37px}.home-rank strong{font-size:14px}.home-scroll{grid-column:2;grid-row:1/3;margin:0 -5px}.home-dock{grid-column:3;grid-row:1/3;align-self:center}.home-nav b{font-size:10px}.home-nav small{font-size:8px}.home-dock .play-case{font-size:15px;gap:8px}.selected-case strong{font-size:18px}body[data-screen="play"] .app-shell{max-width:950px}body[data-screen="play"] .stage{margin-right:92px}body[data-screen="play"] .controls{position:absolute;top:80px;bottom:0;right:0;width:88px;flex-direction:column;padding:0;justify-content:space-evenly}body[data-screen="play"] .controls button{min-height:58px;flex:0;font-size:9px;gap:3px}body[data-screen="play"] .controls .tool-icon{height:35px;width:43px;border-radius:12px}body[data-screen="play"] .controls .tool-icon svg{height:22px;width:22px}body[data-screen="play"] .tool-next{font-size:7px}body[data-screen="play"] .stock{top:-4px;right:calc(50% - 29px);min-width:19px;height:19px;font-size:9px}body[data-screen="play"] .case-brief{top:80px;right:92px}body[data-screen="play"] .level-block{flex-direction:row;align-items:center;gap:9px}body[data-screen="play"] .life-row{flex-direction:row;align-items:center;gap:8px}body[data-training="true"] .stage{margin-right:100px}body[data-training="true"] .training-dock{top:80px}}
@media(prefers-reduced-motion:reduce){.brand-intro{display:none}body[data-screen="play"] .case-brief.brief-enter{animation:none;opacity:0}.road-node{transition:none}}
/* Comfortable tap areas; the smallest phones keep the rank on the home screen. */
body[data-screen="play"] #help{width:44px;min-width:44px;height:44px}body[data-screen="play"] .rank-trail{width:44px}body[data-screen="play"] .rank-summary{width:44px;min-height:44px;justify-content:center}body[data-screen="play"] .hud .level-block #levelNo{font-size:18px}
@media(max-width:360px){body[data-screen="play"] .rank-trail{display:none}body[data-screen="play"] .hud .level-block #levelNo{font-size:16px}body[data-screen="play"] .hud-main{gap:5px}}
/* Hinweis „Zum Startbildschirm“ (install.js) */
.install-hint{position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom,0px) + 14px);transform:translateX(-50%);width:min(460px,calc(100% - 20px));display:flex;gap:12px;align-items:flex-start;padding:14px 40px 12px 14px;border:1px solid #d9dfd7;border-radius:18px;background:#fffdf7;box-shadow:0 14px 40px #19484b33;color:#19484b;z-index:60;box-sizing:border-box;animation:install-hint-in .35s ease-out}
.install-hint[hidden]{display:none}
.install-hint-icon{width:52px;height:52px;border-radius:14px;flex:none;box-shadow:0 4px 12px #19484b22}
.install-hint-copy{flex:1;min-width:0}
.install-hint h2{margin:0 0 4px;font-size:16px;line-height:1.25}
.install-hint p{margin:0 0 10px;font-size:13px;line-height:1.4;color:#4e5f6b}
.install-hint-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.install-hint .primary{width:auto;max-width:none;min-height:40px;margin:0;padding:8px 16px;font-size:14px;border-radius:12px}
.install-hint .text-btn{margin:0;font-size:13px;color:#4e5f6b}
.install-hint-never{display:block;margin:8px 0 0;padding:2px 0;border:0;background:none;font-size:11px;color:#839681;text-decoration:underline}
.install-hint-close{position:absolute;top:6px;right:6px;width:34px;height:34px;border:0;border-radius:50%;background:none;font-size:22px;line-height:1;color:#4e5f6b}
@keyframes install-hint-in{from{opacity:0;transform:translate(-50%,16px)}to{opacity:1;transform:translate(-50%,0)}}
@media(prefers-reduced-motion:reduce){.install-hint{animation:none}}
