*{box-sizing:border-box}
:root{color-scheme:dark;--pine:#1b322f;--frame:#647460;--edge:#41574c;--cream:#f6edcf;--muted:#c0cbb9;--gold:#e8c383;--glass:#172c29e6;
 --sl:env(safe-area-inset-left,0px);--sr:env(safe-area-inset-right,0px);--st:env(safe-area-inset-top,0px);--sb:env(safe-area-inset-bottom,0px)}
html,body{height:100%;overflow:hidden}
body{margin:0;background:#182824;color:var(--cream);font:15px/1.45 "Trebuchet MS",system-ui,sans-serif;overscroll-behavior:none;-webkit-tap-highlight-color:transparent}
canvas{display:block;image-rendering:pixelated}
h1,h2,p{margin:0}button,input{font:inherit}button{cursor:pointer;border:1px solid #607060;background:#354c40;color:#f6edd5;border-radius:5px;padding:7px 13px}
button:hover{background:#455e4d;border-color:#9da986}button:focus-visible,input:focus-visible{outline:2px solid #ffd487;outline-offset:3px}
.brand,.tools,.wallet,.place,nav,.identity,.cap,nav button,.dialogue,.chat form{display:flex;align-items:center}

/* Die Welt fuellt den ganzen Bildschirm; alles andere liegt darueber. */
.game{position:fixed;inset:0;overflow:hidden;background:#273530;touch-action:none;user-select:none;-webkit-user-select:none}
#world{position:absolute;inset:0;width:100%;height:100%}
.hud-left,.hud-right,.chat,.bottom{position:absolute;z-index:2}
.hud-left{left:calc(10px + var(--sl));top:calc(10px + var(--st));display:flex;flex-direction:column;align-items:flex-start;gap:8px;max-width:260px}
.hud-right{right:calc(10px + var(--sr));top:calc(10px + var(--st));display:flex;flex-direction:column;align-items:flex-end;gap:8px;width:230px}
.brand,.place,.roster,.tools,.identity,.chart,.chat,.dialogue,nav{background:var(--glass);border:1px solid #6d7a5c;border-radius:8px;box-shadow:0 3px 12px #0a171340}
.brand{gap:7px;padding:5px 11px 5px 7px;font:bold 21px/1.2 Georgia,serif;letter-spacing:-.035em}.brand i{font:italic normal 16px Georgia,serif;color:#e2c38e}.brand-symbol{width:26px;height:26px}
.place{padding:5px 10px 6px 7px;gap:8px;pointer-events:none}.place canvas{width:24px;height:24px}.place h1{font:bold 18px/1 Georgia,serif}.place span{font-size:11px;color:#cfddbe}
.roster{padding:8px 10px;width:230px;max-height:calc(100dvh - 330px);overflow:auto}
.cap{justify-content:space-between;gap:5px;margin-bottom:4px}.cap h2{font:normal 16px/1.1 Georgia,serif}.cap span{color:#d0c299;font-size:11px}
.member{display:grid;align-items:center;grid-template-columns:36px minmax(0,1fr);gap:8px;padding:5px 0}.member+.member{border-top:1px solid var(--edge)}.member b{font:700 14px Georgia,serif}.member i{display:block;font:10px/1.5 system-ui;color:var(--muted)}
.member progress{appearance:none;width:100%;height:5px;display:block;border:0;background:#182621;border-radius:3px;overflow:hidden}.member progress::-webkit-progress-bar{background:#182621}.member progress::-webkit-progress-value{background:#9bc981}.member progress::-moz-progress-bar{background:#9bc981}
.sprite{width:36px;height:36px;border-radius:4px;object-fit:contain;background:#344d3e}
.tools{gap:10px;padding:5px 6px 5px 10px}.online{font-size:12px;color:#c3dfad}.tools button{font-size:12px;padding:5px 10px}
.identity{gap:10px;padding:5px 10px}.identity strong{font-size:13px}.wallet{gap:4px;color:#f3cd89;font-size:12px}.wallet canvas{width:15px;height:15px}
.chart{padding:4px;width:100%}#mapBtn{display:block;padding:0;width:100%;background:#122822;border-color:#617760}#mini{width:100%;height:auto;aspect-ratio:3/2}
.chat{left:calc(10px + var(--sl));bottom:calc(10px + var(--sb));width:min(340px,30vw);padding:8px}
#chatlog{height:84px;overflow:auto;overflow-wrap:anywhere;font-size:12px;color:var(--muted);padding:0 2px 5px}
.chat form{gap:6px}input{border:1px solid #576c5d;background:#152a24;color:#f8f2dd;border-radius:4px;padding:7px}.chat input{min-width:0;flex:1;font-size:13px}.chat form button{padding:6px 10px;font-size:13px}
.bottom{left:0;right:0;margin-inline:auto;bottom:calc(10px + var(--sb));width:min(660px,calc(100vw - 2*min(340px,30vw) - 60px));display:flex;flex-direction:column;gap:8px;pointer-events:none}
.bottom>*{pointer-events:auto}
.dialogue{padding:9px 12px;gap:12px;justify-content:space-between}.conversation strong{color:var(--gold);font-size:13px}.conversation p{font-size:14px}
#actBtn{background:#e7c991;border-color:#f4deab;color:#2d3d2f;font-weight:bold;white-space:nowrap}kbd{background:#fff4cb7a;border:1px solid #947f55;border-radius:3px;padding:0 4px;font:11px/1 monospace}
nav{justify-content:center;gap:6px;padding:6px}nav button{gap:6px;font-weight:600;font-size:13px;padding:6px 10px}nav canvas{width:18px;height:18px}
body.chat-toggled .chat{display:none}
.controls{display:none}
.bigmap{width:100%}dialog{border:1px solid var(--frame);background:var(--pine);box-shadow:inset 0 0 0 2px #263e35,0 6px 18px #0c1d183f;border-radius:7px;padding:20px;width:min(445px,94vw);max-height:92dvh;color:var(--cream)}dialog::backdrop{background:#0b1a16ad}dialog h2{font:normal 25px Georgia,serif}#close{float:right}#body{margin-top:16px}#body>*{margin:6px 5px 6px 0}#body label{display:block}#body input{display:block;width:100%}

/* Mittelgrosse Fenster: Chat ueber die Leiste, Dialog breiter */
@media(max-width:1100px) and (min-width:761px){
 .bottom{width:min(620px,calc(100vw - 280px));left:calc(10px + var(--sl));right:auto;margin:0}
 .chat{left:auto;right:calc(10px + var(--sr));width:250px}
}

/* Touch (Handy, Tablet): Steuerkreuz rechts und verschiebbar (Mitte festhalten
   und ziehen), runder Aktionsknopf links. --bar-h = Hoehe von Dialog und Menue. */
@media(pointer:coarse),(max-width:760px){
 .controls{position:fixed;z-index:3;right:calc(12px + var(--sr));bottom:calc(var(--bar-h,150px) + 10px);display:grid;grid-template-columns:repeat(3,var(--pad,44px));grid-template-rows:repeat(3,var(--pad,44px));gap:2px}
 .controls button{min-width:0;padding:0;font-size:calc(var(--pad,44px) * .36);touch-action:none;background:#172c29c4;border:1px solid #8a9a74;border-radius:10px;color:#f6edcf}
 .controls [data-dir=up]{grid-area:1/2}.controls [data-dir=left]{grid-area:2/1}.controls [data-dir=right]{grid-area:2/3}.controls [data-dir=down]{grid-area:3/2}
 .controls .pad-grip{grid-area:2/2;border-radius:50%;margin:calc(var(--pad,44px) * .16);font-size:calc(var(--pad,44px) * .32);background:#0f1f1b99;border-color:#6d7a5c;color:#cfd8bf;cursor:grab}
 .controls button:active{background:#455e4d}
 #actBtn{position:fixed;z-index:3;left:calc(14px + var(--sl));bottom:calc(var(--bar-h,150px) + 37px);width:58px;height:58px;border-radius:50%;font-size:12px;padding:0;touch-action:none;
  background:radial-gradient(circle at 50% 38%,#2f4f40 0,#1a302a 70%);border:2px solid #d9bd7a;color:#f6edcf;box-shadow:inset 0 0 0 2px #0f1f1b88,0 3px 0 #0f1f1b,0 5px 12px #0006}
 #actBtn:active{transform:translateY(2px);box-shadow:inset 0 0 0 2px #0f1f1b88,0 1px 0 #0f1f1b;background:#3a5a48}
 #actBtn.dragging{transform:scale(1.12);border-color:#f3d58c;box-shadow:0 0 0 4px #f3d58c55,0 8px 18px #0008;cursor:grabbing}
 .dialogue kbd{display:none}
}

/* Tablet: Steuerkreuz unten rechts, Aktion unten links, Chat darueber links */
@media(pointer:coarse) and (min-width:761px){
 .controls{bottom:calc(14px + var(--sb));right:calc(14px + var(--sr))}
 #actBtn{bottom:calc(37px + var(--sb))}
 .chat{left:calc(10px + var(--sl));bottom:calc(120px + var(--sb))}
 .bottom{width:min(560px,calc(100vw - 400px));left:0;right:0;margin-inline:auto}
}

/* Handy */
@media(max-width:760px){
 .brand{display:none}
 .hud-left{left:calc(6px + var(--sl));top:calc(6px + var(--st));gap:5px;max-width:52vw}
 .hud-right{right:calc(6px + var(--sr));top:calc(6px + var(--st));gap:5px;width:auto;max-width:46vw}
 .place{padding:3px 7px 4px 5px;gap:5px}.place canvas{width:18px;height:18px}.place h1{font-size:14px}.place span{font-size:9px}
 .roster{width:auto;min-width:118px;max-width:52vw;padding:4px 7px;max-height:28dvh}.cap h2{font-size:12px}.cap span{font-size:10px}
 .member{grid-template-columns:24px minmax(0,1fr);gap:5px;padding:3px 0}.sprite{width:24px;height:24px}.member b{font-size:12px}.member i{display:none}
 .tools{gap:5px;padding:3px 4px 3px 7px}.online{font-size:10px}.tools button{padding:4px 7px;font-size:11px}
 .identity{padding:3px 7px;gap:6px}.identity strong{font-size:11px}.wallet{font-size:11px}
 .chart{width:104px}
 .bottom{left:calc(6px + var(--sl));right:calc(6px + var(--sr));margin:0;width:auto;bottom:calc(6px + var(--sb));gap:6px}
 .dialogue{padding:7px 9px}.conversation p{font-size:12px;line-height:1.35}.conversation strong{font-size:11px}
 .dialogue{padding-right:9px}
 nav{gap:3px;padding:4px;justify-content:space-between}nav button{flex:1;flex-direction:column;gap:1px;padding:4px 2px;font-size:10px;font-weight:600}nav canvas{width:20px;height:20px}
 .chat{display:none;left:calc(6px + var(--sl));right:calc(6px + var(--sr));width:auto;top:calc(100px + var(--st));bottom:auto}
 body.chat-toggled .chat{display:block}
 .chat input,dialog input{font-size:16px}
}
@media(max-width:760px) and (orientation:landscape){
 .roster{display:none}
 .bottom{left:calc(100px + var(--sl));right:calc(162px + var(--sr));margin:0;width:auto;gap:4px}
 nav button{flex-direction:row;gap:4px;font-size:10px;padding:3px 4px}nav canvas{width:15px;height:15px}
 .dialogue{padding:5px 8px}.conversation p{font-size:11px}
 .controls{bottom:calc(8px + var(--sb))}
 #actBtn{bottom:calc(20px + var(--sb))}
 .chat{top:calc(60px + var(--st));left:calc(100px + var(--sl));right:calc(162px + var(--sr))}
}

button:disabled{opacity:.45;cursor:default}
.capsule-art{width:56px;height:56px;display:inline-block;vertical-align:middle;image-rendering:pixelated}
.battle-arena{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:12px;border:1px solid #6b8260;border-radius:8px;background:linear-gradient(#94b8a2 0 42%,#688e64 42% 60%,#55744e 60%);margin-bottom:12px}
.battle-arena .member{background:#19352de8;border:1px solid #688461;border-radius:8px;display:flex;flex-direction:column;align-items:stretch;padding:10px}
.battle-arena .sprite{width:72px;height:72px;margin:auto;background:transparent}
.battle-arena .member i{color:#e8e4c9}

.starter-selection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
.starter-selection .member{display:flex;flex-direction:column;align-items:stretch;border:1px solid #6c8468;border-radius:6px;padding:8px}
.starter-selection .sprite{margin:auto;width:64px;height:64px}
.starter-selection button{font-size:12px;padding:6px}
@media(max-width:420px){.starter-selection{grid-template-columns:1fr}.starter-selection .member{display:grid;grid-template-columns:50px 1fr}.starter-selection button{grid-column:1/-1}.starter-selection .sprite{width:48px;height:48px}}

.move-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin:12px 0}
.move-grid button{text-align:left;padding:9px}
.move-grid strong,.move-grid span,.move-grid small{display:block}
.move-grid span{font-size:10px;color:#c5d5ba;margin-top:3px}
.move-grid small{font-size:10px;color:#dfc795;margin-top:3px}
.battle-log{padding:9px;border-left:3px solid #d5bd85;background:#122d25;min-height:45px}
@media(min-width:700px){dialog:has(.move-grid){width:560px}}
@media(max-width:390px){.move-grid{grid-template-columns:1fr}}

dialog.battle-dialog{width:min(1100px,97vw);padding:14px 16px;max-height:98dvh}
dialog.battle-dialog #body{margin-top:5px}
.battle-stage{position:relative;overflow:hidden;border:2px solid #6f8e71;border-radius:8px;isolation:isolate;background:#88bda4;margin:0!important}
.battle-stage>canvas{display:block;width:100%;height:auto;aspect-ratio:2/1;image-rendering:pixelated}
.battle-health{position:absolute;width:37%;min-width:120px;padding:8px 11px;background:#f2ecd2ed;color:#2d443a;border:2px solid #59765c;border-radius:5px;box-shadow:3px 4px #264c3c4d}
.opponent-health{top:12px;left:12px}
.ally-health{bottom:12px;right:12px}
.health-title{display:flex;align-items:center;justify-content:space-between;gap:8px}
.health-title strong{font:700 18px Georgia,serif}
.health-title span,.health-type,.health-value{font-size:11px}
.health-type{display:block;color:#546a5b}
.battle-health progress{display:block;appearance:none;width:100%;height:7px;background:#bdbdaa;border:1px solid #8a9b79;border-radius:4px;overflow:hidden;margin-top:3px}
.battle-health progress::-webkit-progress-bar{background:#bdbdaa}
.battle-health progress::-webkit-progress-value{background:linear-gradient(90deg,#619853,#9abd6b)}
.battle-health progress::-moz-progress-bar{background:#83ab63}
.health-value{display:block;text-align:right;font-weight:700}
.battle-round,.battle-supplies{font-size:12px;color:#c9d4b8}
.battle-dialog .battle-log{min-height:0;font-size:13px;margin:6px 0!important;padding:7px 10px}
.battle-dialog .move-grid{margin:8px 0!important}
.battle-dialog .move-grid button{padding:7px 10px}
.battle-dialog .move-grid small{font-size:10px}
@media(max-width:600px){
 dialog.battle-dialog{padding:10px;width:98vw}
 .battle-health{padding:4px 6px;min-width:0;width:42%;border-width:1px}
 .health-title{gap:4px}.health-title strong{font-size:12px}.health-title span,.health-type,.health-value{font-size:9px}
 .battle-health progress{height:5px;margin-top:2px}
 .opponent-health{top:6px;left:6px}.ally-health{bottom:6px;right:6px}
 .battle-dialog .move-grid{grid-template-columns:1fr 1fr;gap:4px}.battle-dialog .move-grid button{padding:6px}
 .battle-dialog .move-grid strong{font-size:12px}
 .battle-dialog .move-grid span,.battle-dialog .move-grid small{font-size:9px}
 .battle-dialog .battle-log{font-size:12px}
}
@media(prefers-reduced-motion:reduce){.battle-stage{scroll-behavior:auto}}

/* Startbildschirm mit Anmeldung */
.start{position:fixed;inset:0;z-index:20;display:grid;place-items:center;padding:calc(16px + var(--st)) 16px calc(16px + var(--sb));background:radial-gradient(ellipse at 50% 30%,#1d3a33d9,#0c1916f2 75%);overflow:auto}
.start[hidden]{display:none}
.start-card{width:min(400px,100%);background:var(--pine);border:1px solid var(--frame);border-radius:12px;box-shadow:inset 0 0 0 2px #263e35,0 12px 40px #000a;padding:24px 22px 18px;text-align:center}
.start-logo{display:flex;align-items:center;justify-content:center;gap:10px;font:bold 34px/1.1 Georgia,serif;letter-spacing:-.035em}.start-logo i{font:italic normal 24px Georgia,serif;color:#e2c38e}.start-logo canvas{width:40px;height:40px}
.start-sub{margin:8px 0 12px;color:var(--muted);font-size:14px}
.start-pets{display:flex;justify-content:center;gap:10px;margin-bottom:14px}.start-pets canvas{width:58px;height:58px;border-radius:50%;background:#344d3e;border:2px solid #6d7a5c}
.start-tabs{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:12px}.start-tabs button{padding:9px;font-weight:600;background:#1f3530}.start-tabs button.on{background:#e7c991;border-color:#f4deab;color:#2d3d2f}
#startForm{display:grid;gap:9px;text-align:left}#startForm label{display:grid;gap:4px;font-size:13px;color:#d9dfc9}#startForm input{font-size:16px;padding:10px;width:100%}
.start-hint{font-size:12px;color:var(--muted);margin:0}.start-note{min-height:1.2em;color:#ffb38a;font-size:13px;margin:0}
.start-go{background:#e7c991;border-color:#f4deab;color:#2d3d2f;font-weight:bold;font-size:17px;padding:11px}
.start-go:hover{background:#f0d6a4}
.start-guest{margin-top:12px;background:none;border:0;color:#b9c8ae;font-size:13px;text-decoration:underline;padding:6px}
.start-guest:hover{background:none;color:var(--cream)}
#startForm [hidden]{display:none}
#startForm label small{font-size:11px;color:var(--muted)}

.admin-badge{font:bold 11px/1 system-ui;letter-spacing:.06em;text-transform:uppercase;color:#2a1608;background:linear-gradient(#ffe08a,#e0a83a);border:1px solid #fff0b8;border-radius:999px;padding:3px 8px;box-shadow:0 0 0 1px #7a4b12}
.admin-badge[hidden]{display:none}
.admin-box{border:1px solid #c99b3e;border-radius:8px;padding:10px 12px;background:#2a2311}.admin-box h3{margin:0 0 6px;font:bold 15px Georgia,serif;color:#ffd86b}.admin-box p{margin:4px 0;font-size:13px}
.wallet{white-space:nowrap}

/* Angeln: grosser Ziehen-Knopf, bei Biss golden und pulsierend */
.reel{position:fixed;z-index:4;left:50%;top:42%;transform:translate(-50%,-50%);font:bold 22px/1 Georgia,serif;padding:16px 34px;border-radius:999px;background:#1f3d4a;border:2px solid #8fc3d6;color:#e6f6fb;box-shadow:0 6px 20px #0008}
.reel[hidden]{display:none}
body.fish-bite .reel{background:linear-gradient(#ffe08a,#e0a83a);border-color:#fff0b8;color:#3a1a06;font-size:30px;animation:biss .35s ease-in-out infinite alternate}
@keyframes biss{from{transform:translate(-50%,-50%) scale(1)}to{transform:translate(-50%,-50%) scale(1.12)}}
@media(prefers-reduced-motion:reduce){body.fish-bite .reel{animation:none}}

#startForm .start-remember{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--cream)}
#startForm .start-remember input{width:20px;height:20px;padding:0;accent-color:#e7c991}


/* Einstellungen: sauber in Bereiche geordnet */
.settings-group{border:1px solid #4d6355;border-radius:10px;padding:10px 12px 6px;margin:10px 0!important;background:#16302a}
.settings-group h3{margin:0 0 6px;font:bold 15px Georgia,serif;color:var(--gold)}
.settings-group p{font-size:12px;color:var(--muted);margin:6px 0}
.settings-group button{margin:4px 0 8px}
#body .setting-row{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:10px;padding:8px 0;border-top:1px solid #2b463d;font-size:14px}
#body .setting-row:first-of-type{border-top:0}
#body .slider-row{grid-template-columns:minmax(90px,auto) 1fr 44px}
#body .setting-row input[type=range]{display:block;width:100%;accent-color:#e7c991;padding:0;margin:0}
#body .setting-row input[type=range]:disabled{opacity:.35}
#body .setting-row output{font-size:12px;color:var(--muted);text-align:right}
#body .switch{appearance:none;-webkit-appearance:none;display:block;width:44px!important;height:24px;border-radius:999px;background:#3a4d45;border:1px solid #6d7a5c;position:relative;cursor:pointer;padding:0;margin:0;transition:background .15s}
#body .switch::after{content:'';position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:#f6edcf;transition:transform .15s}
#body .switch:checked{background:#c99b3e;border-color:#ffd25e}
#body .switch:checked::after{transform:translateX(20px)}

/* KP-Balken wie bei Pokémon: gruen, gelb, rot, sinkt sanft */
.hp-bar{height:8px;margin-top:3px;background:#4a4a3e;border:1px solid #2f3a2f;border-radius:5px;overflow:hidden}
.hp-fill{height:100%;width:100%;background:linear-gradient(#8fe07a,#4fae4a);transition:background .3s}
.hp-fill.mid{background:linear-gradient(#ffe27a,#e0b02a)}
.hp-fill.low{background:linear-gradient(#ff8a7a,#d8443a)}
@media(max-width:600px){
 dialog.battle-dialog{width:100vw;max-width:100vw;margin:0;padding:8px;max-height:100dvh;height:100dvh;border-radius:0}
 .hp-bar{height:6px}
}

/* Spielfigur waehlen (Registrieren, Kleiderschrank) und Skins im Markt */
.look-row{display:grid;gap:6px;font-size:13px;color:#d9dfc9}
.look-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:6px 0}
.look-card{display:grid;justify-items:center;gap:4px;padding:6px 2px 7px;background:#1f3530;border:1px solid #4d6158;border-radius:8px;color:var(--cream);font-size:11px;line-height:1.15}
.look-card.on{background:#3b3420;border-color:#e7c991;box-shadow:0 0 0 2px #e7c99155,0 0 14px #e7c99144}
.look-card span{min-height:2.3em;display:flex;align-items:center;text-align:center;word-break:break-word;hyphens:auto}
.look-sprite{width:48px;height:63px;image-rendering:pixelated}
.modal .look-sprite,#modal .look-sprite{width:64px;height:84px}
.skin-offer{display:flex;align-items:center;gap:8px;margin:12px 0 4px;padding:8px;border:1px solid #6a5a8a;border-radius:8px;background:#26223a}
.skin-offer p{margin:0;font-size:14px}
@media(max-width:380px){.look-sprite{width:40px;height:52px}#modal .look-sprite{width:52px;height:68px}}

/* Entwicklung: Buehne mit Leuchten */
.evolve-stage{display:block;width:100%;max-width:480px;aspect-ratio:240/156;margin:6px auto 8px;image-rendering:pixelated;border-radius:10px;border:1px solid #6d7a5c;background:#14231d}
.evolve-text{text-align:center;font:bold 18px Georgia,serif;color:#f4deab;margin:4px 0 10px}

/* Profil oben rechts (Figur, Name, Spieler-Level, Muenzen) und Profil-Fenster */
button.identity{font:inherit;color:inherit;cursor:pointer;text-align:left}
button.identity:hover{border-color:#e7c991}
#profileFace{width:26px;height:24px;image-rendering:pixelated;background:#2b3f37;border:1px solid #8a9a74;border-radius:6px;flex:none}
.who{display:grid;gap:3px;min-width:0}.who-top{display:flex;align-items:center;gap:5px;min-width:0}
.who-top strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trainer-lv{font:700 10px/1 system-ui;color:#2a1f08;background:#e7c991;border-radius:999px;padding:2px 5px;white-space:nowrap}
.trainer-bar{display:block;height:3px;border-radius:2px;background:#ffffff22;overflow:hidden}.trainer-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#9fd37a,#e7c991)}
@media(max-width:700px){#profileFace{width:20px;height:18px}.trainer-lv{font-size:9px;padding:1px 4px}}
.profile-head{display:flex;align-items:center;gap:14px;margin:4px 0 10px}
.profile-head .look-sprite{width:72px;height:94px;background:#22362f;border:1px solid #6d7a5c;border-radius:10px;padding:4px}
.profile-name{display:grid;gap:2px}.profile-name strong{font:bold 24px Georgia,serif;color:#ffd86b}.profile-name span{color:var(--muted);font-size:14px}
.profile-level{border:1px solid #4d6158;border-radius:8px;padding:8px 10px;margin:8px 0;background:#1d302a}
.profile-level h3{margin:0 0 6px;font:bold 16px Georgia,serif;color:#f4deab}.profile-level small{color:var(--muted);font-size:12px}.profile-level p{margin:6px 0 0;font-size:12px;color:#b9c8ae}
.profile-track{height:9px;border-radius:5px;background:#0e1a16;border:1px solid #4d6158;overflow:hidden;margin-bottom:4px}.profile-track i{display:block;height:100%;background:linear-gradient(90deg,#6fb36a,#e7c991)}
.profile-stats{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:6px;margin-top:10px}
.profile-stats div{display:grid;justify-items:center;padding:7px 4px;border:1px solid #4d6158;border-radius:8px;background:#1f3530}
.profile-stats b{font-size:17px;color:#f4deab}.profile-stats span{font-size:11px;color:var(--muted)}

/* PvP */
.bet-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}
.pvp-wait{text-align:center;font:bold 17px Georgia,serif;color:#f4deab;padding:14px 0;animation:warten 1.2s ease-in-out infinite alternate}
@keyframes warten{from{opacity:.55}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.pvp-wait{animation:none}}

/* EP-Balken (Team-Liste, Kampf) und Ergebnis nach dem Sieg */
.xp-line{display:block;height:3px;margin-top:2px;border-radius:2px;background:#182621;overflow:hidden}.xp-line i{display:block;height:100%;background:#5fb4e8}
.xp-bar{display:flex;align-items:center;gap:5px;margin-top:3px}.xp-bar span{font:800 9px/1 system-ui;color:#2d6f99}
.xp-bar div{flex:1;height:5px;border-radius:3px;background:#3d4a44;overflow:hidden}.xp-bar i{display:block;height:100%;background:linear-gradient(90deg,#3b9be0,#7fd0ff)}
.gain-card{display:grid;grid-template-columns:44px 1fr;gap:10px;align-items:center;padding:8px 10px;margin:8px 0;border:1px solid #4d6158;border-radius:10px;background:#1d302a}
.gain-card .sprite{width:44px;height:44px}
.gain-head{display:flex;align-items:baseline;gap:8px}.gain-head strong{font:bold 16px Georgia,serif}.gain-level{font-size:12px;color:var(--muted)}
.gain-plus{margin-left:auto;font:800 14px system-ui;color:#7fd0ff}
.gain-track{height:8px;border-radius:4px;background:#0e1a16;border:1px solid #4d6158;overflow:hidden;margin:5px 0 2px}.gain-track i{display:block;height:100%;width:0;background:linear-gradient(90deg,#3b9be0,#7fd0ff)}
.gain-up b{display:block;color:#ffd86b;font:bold 15px Georgia,serif;margin-top:4px}.gain-up small{color:#d9dfc9;font-size:12px}
.gain-card.leveled{border-color:#e7c991;box-shadow:0 0 0 1px #e7c99155,0 0 16px #e7c99133}
.gain-card.leveled .gain-level{color:#ffd86b;font-weight:700}
.player-menu{display:grid;gap:8px;margin:8px 0}.player-menu button{text-align:left;padding:12px 14px;font-size:16px}
.profile-sub{font:bold 16px Georgia,serif;color:#f4deab;margin:12px 0 6px}
.profile-team{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:6px}
.profile-team div{display:flex;align-items:center;gap:8px;padding:5px 8px;border:1px solid #4d6158;border-radius:8px;background:#1f3530;font-size:13px}
.profile-team .sprite{width:32px;height:32px}
.trainer-team{color:#e7c991;letter-spacing:.1em}

/* Dunkle Bruderschaft */
.curse-badge{background:#1a0e22e8;border:1px solid #8a3fb8;color:#e2c8ff;border-radius:8px;padding:4px 9px;font:700 12px system-ui;box-shadow:0 0 12px #8a3fb855;animation:fluch 2s ease-in-out infinite alternate}
.curse-badge[hidden]{display:none}
@keyframes fluch{from{box-shadow:0 0 6px #8a3fb844}to{box-shadow:0 0 16px #b57bffaa}}
@media(prefers-reduced-motion:reduce){.curse-badge{animation:none}}
dialog.dark-dialog{background:#15101d;border-color:#6a3f8a;box-shadow:0 0 40px #8a3fb855,0 12px 40px #000c}
dialog.dark-dialog h2,dialog.dark-dialog .profile-name strong{color:#d9b8ff}
.dark-warn{color:#e2a8ff;border-left:3px solid #8a3fb8;padding-left:8px;font-size:14px}
.setting-hint{font-size:12px;color:var(--muted);margin:2px 0 8px}
/* Medaillen und Titel */
.member-pic{position:relative;display:block;line-height:0}
.medal-badge{position:absolute;right:-4px;bottom:-3px;width:15px;height:14px;image-rendering:pixelated;filter:drop-shadow(0 1px 1px #000a)}
.medal-icon{width:22px;height:20px;image-rendering:pixelated;flex:none}
.medal-big{width:56px;height:52px;image-rendering:pixelated;flex:none;filter:drop-shadow(0 0 8px var(--medal))}
.rank-line{display:flex;align-items:center;gap:10px;padding:8px 10px;margin:6px 0 8px;border:1px solid var(--medal,#4d6158);border-radius:10px;background:#1d302a}
.rank-line b{display:block;font:700 14px Georgia,serif}.rank-line small{display:block;font:11px/1.4 system-ui;color:var(--muted)}
.medal-card{display:flex;align-items:center;gap:12px;padding:10px 12px;margin:8px 0;border:1px solid var(--medal);border-radius:10px;background:#1d302a;box-shadow:0 0 18px color-mix(in srgb,var(--medal) 35%,transparent)}
.medal-card strong{display:block;font:700 15px Georgia,serif;color:#f3e2b3}.medal-card span{display:block;font:13px/1.4 system-ui}.medal-card small{display:block;font:11px/1.4 system-ui;color:var(--muted)}
.medal-picker{margin:4px 0 10px}.medal-picker small{display:block;font:11px/1.4 system-ui;color:var(--muted);margin-bottom:4px}
.medal-row{display:flex;flex-wrap:wrap;gap:6px}
.medal-pick{display:flex;align-items:center;gap:4px;padding:4px 8px;min-height:34px;font:600 12px system-ui}
.medal-pick.on{outline:2px solid #e3b54d;opacity:1}
.medal-pick.off{font-weight:500}
.medal-pick.taken{opacity:.7}
@media(max-width:760px){.medal-badge{right:-3px;bottom:-2px;width:11px;height:10px}}
.level-down{margin:8px 0;padding:8px 10px;border:1px solid #e8645c;border-radius:8px;background:#3a1a1a;color:#ffd0c8;font:600 13px/1.4 system-ui}
.careful{margin:8px 0;padding:8px 10px;border:1px solid #e0a030;border-radius:8px;background:#33280f;color:#ffe2a8;font:600 12.5px/1.45 system-ui}
/* Ranglisten-Tafel */
.rank-tabs{display:flex;gap:6px;margin:4px 0 8px}.rank-tabs button{flex:1;padding:7px 6px;font:600 13px system-ui}.rank-tabs button.on{outline:2px solid #e3b54d;background:#3c5243}
.rank-table{list-style:none;margin:6px 0 10px;padding:0;display:grid;gap:5px}
.rank-row{display:grid;grid-template-columns:30px 22px minmax(0,1fr) auto;align-items:center;gap:8px;padding:6px 10px;border:1px solid #3c5245;border-radius:9px;background:#1d302a}
.rank-row.top1{border-color:#e0ac22;background:#2c2a17}.rank-row.top2{border-color:#a9b4c0}.rank-row.top3{border-color:#b8703a}
.rank-row.me{outline:2px solid #7cc46e}
.rank-place{font:700 15px Georgia,serif;color:#f3e2b3;text-align:right}
.rank-row.top1 .rank-place{color:#ffd86b}.rank-row.top2 .rank-place{color:#dfe6ee}.rank-row.top3 .rank-place{color:#eaa86a}
.rank-who{min-width:0}.rank-name{display:flex;align-items:center;gap:6px;min-width:0}.rank-name strong{font:700 14px Georgia,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-who small{display:block;font:11px/1.4 system-ui;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rank-grade{flex:none;font:700 9.5px system-ui;color:#14100a;border-radius:4px;padding:1px 4px}
.rank-value{font:700 13px system-ui;color:#f3e2b3;white-space:nowrap}
.rank-gap{text-align:center;color:var(--muted);font:700 14px system-ui;line-height:1}
/* Uhr und Wetter oben */
#clock{display:block;font:600 11px/1.3 system-ui;color:#d9e6c9;opacity:.9;white-space:nowrap}
@media(max-width:760px){#clock{font-size:9.5px}}
/* Zustaende im Kampf */
.health-status{display:flex;flex-wrap:wrap;gap:3px;margin-top:3px}
.health-status span{font:700 10px/1.4 system-ui;padding:0 5px;border-radius:6px;background:#1b2a24;color:#f3eed8;white-space:nowrap}
.health-status .st-para{background:#6b5a12;color:#ffe97a}.health-status .st-burn{background:#6e2a12;color:#ffc08a}
.health-status .st-poison{background:#4e2366;color:#e2b6ff}.health-status .st-freeze{background:#1e4f73;color:#cdeeff}
.health-status .st-sleep{background:#2f3a5c;color:#d4defa}.health-status .st-confuse{background:#5c4a1e;color:#fff0b0}
.health-status .st-shield{background:#1d5a6e;color:#c8f4ff}.health-status .st-dive{background:#163f5c;color:#9fd8ff}
.health-status .st-down{background:#5a2424;color:#ffcaca}.health-status .st-up{background:#24502c;color:#c8f5cc}
.night-warn{max-width:260px;padding:6px 9px;border:1px solid #8a7ad8;border-radius:9px;background:#1c1838ee;color:#e4dcff;font:600 11.5px/1.35 system-ui;box-shadow:0 0 12px #5a48c055}
@media(max-width:760px){.night-warn{max-width:52vw;font-size:10px;padding:4px 7px}}
/* Wesenboerse */
.market-row{display:grid;grid-template-columns:40px minmax(0,1fr);gap:9px;align-items:center;padding:7px 9px;margin-top:8px;border:1px solid #3c5245;border-radius:9px;background:#1d302a}
.market-row .sprite{width:40px;height:40px}.market-text strong{display:block;font:700 14px Georgia,serif}.market-text small{display:block;font:11px/1.4 system-ui;color:var(--muted)}
.market-btn{margin-top:4px}.market-note{color:#ffe29a;font-weight:600}.market-head{font-weight:600}.market-why{color:#e9b0a0;font-size:12px}
.market-sell{display:flex;gap:6px;align-items:center;margin:5px 0 2px}.market-sell input{width:110px;padding:7px 8px;font:600 14px system-ui;border-radius:8px;border:1px solid #4d6158;background:#14211c;color:#f3e2b3}
.market-sell span{font:12px system-ui;color:var(--muted)}.market-sell button{padding:7px 12px}
/* Team (wie bei Pokemon) */
.type-chip{display:inline-block;font:700 10.5px/1.5 system-ui;padding:0 7px;border-radius:999px;background:var(--type);color:#16120c;text-shadow:0 1px 0 #ffffff55}
.lead-chip,.faint-chip,.legend-chip{display:inline-block;font:700 10.5px/1.5 system-ui;padding:0 7px;border-radius:999px;background:#e3b54d;color:#2a1e06}
.faint-chip{background:#7a3a34;color:#ffd9d2}.legend-chip{background:#4a2d78;color:#e9d8ff}
.big-sprite{image-rendering:pixelated;display:block;height:auto}
.team-list{display:grid;gap:8px;margin:6px 0}
.team-card{display:grid;grid-template-columns:70px minmax(0,1fr) 14px;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:14px;
  border:2px solid color-mix(in srgb,var(--type) 55%,#2b3d33);background:linear-gradient(100deg,color-mix(in srgb,var(--type) 22%,#1d302a),#1d302a 70%);color:inherit;cursor:pointer}
.team-card.lead{box-shadow:0 0 0 2px #e3b54d88,0 0 14px #e3b54d33}
.team-card.fainted{filter:grayscale(.75);opacity:.75}
.team-pic{position:relative;display:grid;place-items:center;width:70px;height:66px;border-radius:12px;background:radial-gradient(circle at 50% 60%,color-mix(in srgb,var(--type) 45%,#e9f0dc) 0,color-mix(in srgb,var(--type) 18%,#2b3d33) 70%)}
.team-pic .medal-badge{right:-4px;bottom:-4px;width:18px;height:17px}
.team-mid{display:grid;gap:3px;min-width:0}
.team-top{display:flex;align-items:baseline;justify-content:space-between;gap:8px;min-width:0}
.team-top strong{font:700 16px Georgia,serif;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-lv{font:700 13px system-ui;color:#f3e2b3;white-space:nowrap}
.team-tags{display:flex;flex-wrap:wrap;gap:4px}
.team-bar{height:7px;border-radius:4px;background:#14211c;overflow:hidden;border:1px solid #0d1612}
.team-bar i{display:block;height:100%;border-radius:3px;background:#7bd06a}
.team-bar.mid i{background:#e8c84a}.team-bar.low i{background:#e0604a}
.team-bar.xp{height:4px}.team-bar.xp i{background:#4aa8e8}
.team-bar.stat{height:8px}.team-bar.stat i{background:color-mix(in srgb,var(--type,#7bd06a) 70%,#9fd86a)}.team-bar.stat.best i{background:#f0c04a}
.team-hp{font:600 11px system-ui;color:#cfd8c4}
.team-arrow{font:700 24px system-ui;color:#c9d3bd;text-align:right}
.team-hint{font-size:12px;color:var(--muted)}
.team-nav{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.team-nav button{padding:6px 12px;font:700 14px system-ui}.team-nav span{flex:1;text-align:center;font:600 13px system-ui;color:var(--muted)}
.team-hero{display:grid;grid-template-columns:150px minmax(0,1fr);gap:12px;align-items:center;padding:10px;border-radius:16px;
  border:2px solid color-mix(in srgb,var(--type) 55%,#2b3d33);background:linear-gradient(110deg,color-mix(in srgb,var(--type) 26%,#1d302a),#1d302a 75%)}
.hero-stage{position:relative;display:grid;place-items:center;height:150px;border-radius:14px;background:radial-gradient(ellipse at 50% 70%,color-mix(in srgb,var(--type) 45%,#eef4e2) 0,color-mix(in srgb,var(--type) 15%,#24382f) 72%)}
.hero-stage .medal-badge.big{right:6px;bottom:6px;width:30px;height:28px}
.hero-facts{display:grid;gap:5px;min-width:0}.hero-facts .team-top strong{font-size:20px}
.team-evo{font:12px/1.35 system-ui;color:#bfe3a8}
.team-section{margin-top:12px;padding:10px 12px;border-radius:14px;border:1px solid #3c5245;background:#1a2b25}
.team-section h3{margin:0 0 8px;font:700 14px Georgia,serif;color:#f3e2b3}
.stat-row{display:grid;grid-template-columns:minmax(0,150px) 38px minmax(0,1fr);align-items:center;gap:8px;margin:5px 0;font:13px system-ui}
.stat-row b{text-align:right;font:700 13px system-ui;color:#f3e2b3}
.move-cards{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.move-card{display:grid;gap:3px;padding:8px 10px;border-radius:12px;border-left:5px solid var(--type);background:color-mix(in srgb,var(--type) 14%,#22342c)}
.move-head{display:flex;align-items:center;justify-content:space-between;gap:6px}.move-head strong{font:700 14px system-ui}
.move-card small{font:11.5px/1.35 system-ui;color:#cfd8c4}.move-card .move-what{color:#ffe4a0}
.team-lead-btn{width:100%;margin-top:12px}
@media(max-width:520px){
 .team-hero{grid-template-columns:1fr}.hero-stage{height:140px}
 .move-cards{grid-template-columns:1fr}
 .stat-row{grid-template-columns:minmax(0,130px) 34px minmax(0,1fr)}
}
/* Markt und Tasche (0.56) */
.item-icon{width:40px;height:40px;image-rendering:pixelated;flex:none;border-radius:9px;background:radial-gradient(circle at 50% 45%,#f4ecd2 0,#c9c1a3 60%,#8b8670 100%);padding:4px;box-shadow:inset 0 0 0 1px #00000040}
.item-icon.big{width:72px;height:72px;padding:8px;border-radius:14px}
.item-group{margin:12px 2px 4px;font:700 12px system-ui;letter-spacing:.08em;text-transform:uppercase;color:#d9c48f}
.item-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;margin:5px 0;padding:7px 10px;text-align:left;border-radius:12px;
  border:1px solid #5c6e5d;background:linear-gradient(100deg,#2b4237,#1f322b 75%);color:inherit}
.item-row:not(:disabled):hover{border-color:#e3b54d;background:linear-gradient(100deg,#35503f,#22382f 75%)}
.item-text{display:grid;gap:1px;min-width:0}.item-text strong{font:700 16px Georgia,serif}.item-text small{color:var(--muted);font-size:12.5px;line-height:1.3}
.item-side{font:700 14px system-ui;color:#f3d58c;white-space:nowrap;text-align:right}
.shop-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 8px;padding:8px 10px;border-radius:10px;background:#122420;border:1px solid #3a4d42}
.shop-top p{font-size:14px}
.shop-purse{flex:none;font:700 14px system-ui;color:#2a1e06;background:linear-gradient(#ffe39a,#e3b54d);padding:4px 10px;border-radius:999px;box-shadow:inset 0 -2px 0 #b5872a}
.shop-pick{display:grid;grid-template-columns:80px 1fr;align-items:center;gap:12px;margin:8px 0;padding:10px;border-radius:14px;background:#22382f;border:1px solid #5c6e5d}
.shop-pick strong{font:700 20px Georgia,serif}.shop-pick p{font-size:14px;margin:2px 0}.shop-pick small{color:var(--muted)}
.shop-amount{display:flex;align-items:center;justify-content:center;gap:6px;margin:10px 0 4px}
.shop-amount button{min-width:46px;padding:9px 8px;font:700 16px system-ui}
.shop-amount output{min-width:70px;text-align:center;font:700 22px Georgia,serif;color:#fff3c4}
.shop-total{text-align:center;font:700 16px system-ui;color:#f3d58c;margin:2px 0 8px}
button.shop-go{display:block;width:100%;padding:11px;font:700 17px system-ui;background:linear-gradient(#e9c66a,#c99a35);color:#2a1e06;border-color:#f6dc92}
button.shop-go:disabled{background:#4a5448;color:#c9cdbf}
button.battle-bag{font-weight:700;border-color:#c9a55a;background:linear-gradient(#4a5a3a,#36472f)}
.battle-actions .team-card{margin:5px 0}
.buff-line{margin:4px 0;padding:5px 10px;border-radius:8px;background:#2f2a14;border:1px solid #8a7432;color:#f6dc92;font-size:13.5px}
.snack-chip{display:inline-block;font:700 10.5px/1.5 system-ui;padding:0 7px;border-radius:999px;background:#c8904a;color:#2a1a08}
.armor-chip{display:inline-block;font:700 10.5px/1.5 system-ui;padding:0 7px;border-radius:999px;background:#86848f;color:#fff}
.medal-pick .armor-pick{width:22px;height:22px;padding:1px;border-radius:5px}
.item-row.ready{border-color:#c9a55a}.item-row.ready .item-side{color:#9fe07a}
.item-row.gift{border-color:#e3b54d;background:linear-gradient(100deg,#5a4a1e,#2a3a2a 75%)}
.store-team{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.store-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.store-cell{display:grid;justify-items:center;gap:1px;padding:5px 3px;border-radius:10px;border:1px solid color-mix(in srgb,var(--type,#5c6e5d) 60%,#2b3d33);
  background:linear-gradient(180deg,color-mix(in srgb,var(--type,#2b4237) 22%,#1f322b),#1f322b);color:inherit;min-height:74px}
.store-cell span{font:700 13px Georgia,serif}.store-cell small{font:12px system-ui;color:var(--muted)}
.store-cell .team-bar{width:90%}
.store-cell.on{outline:3px solid #e3b54d;outline-offset:-1px}.store-cell.fainted{filter:grayscale(.8);opacity:.7}
.store-cell.empty{border-style:dashed;background:none;border-color:#3a4d42}
/* Pruefhalle: Siegel-Leiste im Profil und Geschenk von Ylva */
.seal-row{display:flex;gap:6px;flex-wrap:wrap;margin:4px 0 10px}.seal-row canvas{width:30px;height:30px;image-rendering:pixelated}
.gift-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.gift-card{display:flex;flex-direction:column;align-items:center;gap:4px;padding:10px 8px;border:1px solid #6c8468;border-radius:10px;background:#1d342c;text-align:center}
.gift-card strong{font:700 17px Georgia,serif}.gift-card small{font-size:12px;color:var(--muted);line-height:1.35}
.gift-pic{width:84px;height:auto;image-rendering:pixelated;background:radial-gradient(circle at 50% 70%,#9fc48a 0,#3f6a4a 75%);border-radius:10px}
.cloak-badge{background:#0f2416e8;border-color:#c9a24c;color:#e8f4c8;box-shadow:0 0 12px #6fae5a55}
.dragon-badge{background:#1e0a10e8;border-color:#c04a3a;color:#ffd6c8;box-shadow:0 0 12px #c04a3a66}
.dragon-offer{border-color:#8e2a2a}

/* 0.61: Steuerkreuz groesser oder kleiner ziehen (Griff in der freien Ecke oben links) */
.controls .pad-size{display:none}
@media(pointer:coarse),(max-width:760px){
 .controls .pad-size{display:block;grid-area:1/1;border-radius:50%;margin:calc(var(--pad,44px) * .2);font-size:calc(var(--pad,44px) * .28);background:#0f1f1b99;border-color:#6d7a5c;color:#cfd8bf;cursor:nwse-resize}
 .controls.sizing button{outline:2px solid #f3d58c88}
}
/* 0.61: Anzeigen einklappen – kleine Pfeil-Knoepfe, eingeklappt bleibt nur das Noetigste */
.fold{flex:none;width:20px;height:20px;min-width:0;padding:0;border-radius:50%;font:700 11px/18px system-ui;text-align:center;background:#0f1f1bcc;border:1px solid #6d7a5c;color:#e7c991;pointer-events:auto;cursor:pointer}
.fold:hover{border-color:#e7c991}
.place .fold{margin-right:2px}
.place.folded > div{display:none}
.roster .cap .fold{margin-right:6px}
.roster.folded{width:auto;min-width:0}
.roster.folded .cap h2,.roster.folded .cap span{display:none}
.roster.folded .member{grid-template-columns:24px}
.roster.folded .member > div{display:none}
.roster.folded .sprite{width:24px;height:24px}
.hud-right.folded .online,.hud-right.folded #account,.hud-right.folded .who,.hud-right.folded .wallet{display:none}
.hud-right.folded .tools{padding:3px}
.hud-right.folded .identity{padding:3px}
.chart{position:relative}
.chart .fold{position:absolute;left:6px;top:6px;z-index:1}
.chart.folded{width:auto;padding:3px}
.chart.folded .fold{position:static;width:30px;height:30px;font-size:16px;line-height:28px}
.chart.folded #mapBtn{display:none}
.dialogue .fold{align-self:flex-start}
.dialogue.folded{padding:4px 6px}
.dialogue.folded .conversation{display:none}
.dialogue.folded{width:max-content;max-width:100%;align-self:flex-start}
.tools .fold{padding:0;font:700 11px/18px system-ui}
/* Opas Drachenei unter dem Team (0.63) */
.egg-row{display:flex;gap:8px;align-items:center;margin-top:6px;padding-top:6px;border-top:1px solid #6d7a5c66}
.egg-row[hidden]{display:none}
.egg-pic{width:26px;height:29px;image-rendering:pixelated;flex:none}
.egg-info{flex:1;display:grid;gap:3px;min-width:0}.egg-info strong{font-size:13px}.egg-info small{font-size:11px;opacity:.85}
.egg-bar{height:5px;background:#00000055;border-radius:3px;overflow:hidden}.egg-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,#c8463a,#ffd23e)}
.roster.folded .egg-info{display:none}
/* 0.65: Kampffenster neu – groesserer Platz, farbige Attacken, Leiste, Rucksack, Team, Countdown */
dialog.battle-dialog{width:min(980px,97vw)}
.battle-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 6px}
.battle-clock{font:700 13px/1 system-ui;padding:6px 11px;border-radius:999px;background:#1d3a30;border:1px solid #6f8e71;color:#f2e7c4;min-width:62px;text-align:center;white-space:nowrap}
.battle-clock.hurry{background:#7a2b22;border-color:#e0806a;color:#fff;animation:clockPulse .7s infinite alternate}
@keyframes clockPulse{to{transform:scale(1.08)}}
.battle-stage>canvas{aspect-ratio:8/5}
@media(min-width:700px){.battle-stage{max-width:calc((100dvh - 450px)*1.6);min-width:min(520px,100%);margin:0 auto!important}}
.turn-bar{position:absolute;left:0;right:0;bottom:0;height:5px;background:#0007;z-index:3}
.turn-bar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#7cc96a,#d8e27a);transition:width .2s linear}
.turn-bar.hurry i{background:linear-gradient(90deg,#e0603e,#f2b04a)}
.battle-dialog .battle-log{background:#f4efdc;color:#26352d;border:2px solid #5c7a5f;border-radius:8px;font:600 14px/1.45 system-ui;padding:9px 12px;margin:8px 0!important;box-shadow:inset 0 0 0 2px #fffaf0,0 2px 0 #0003}
.battle-note{font-size:12px;color:#cfe3ff;margin:4px 0}
.battle-dialog .move-grid{grid-template-columns:1fr 1fr;gap:8px;margin:6px 0!important}
.battle-dialog .move-grid .move-btn{position:relative;text-align:left;padding:9px 11px 9px 15px;border-radius:10px;border:1px solid color-mix(in srgb,var(--type) 65%,#000);
  background:linear-gradient(135deg,color-mix(in srgb,var(--type) 42%,#173129) 0%,#173129 88%);box-shadow:inset 5px 0 0 var(--type),0 2px 0 #0005;color:#f6f0dc;transition:transform .08s,filter .08s}
.battle-dialog .move-grid .move-btn:hover:not(:disabled){filter:brightness(1.15);transform:translateY(-1px)}
.battle-dialog .move-grid .move-btn:active:not(:disabled){transform:translateY(1px)}
.move-top{display:flex;justify-content:space-between;align-items:baseline;gap:6px}
.battle-dialog .move-grid .move-top strong{font:700 16px Georgia,serif;display:inline}
.move-ap{font:700 11px system-ui;padding:1px 7px;border-radius:999px;background:#0006;color:#e8efd8;white-space:nowrap}
.move-ap.low{background:#7a2b22;color:#fff}
.battle-dialog .move-grid .move-mid{display:flex;flex-wrap:wrap;align-items:center;gap:4px;font-size:11px;color:#d9e4cf;margin-top:5px}
.move-mid em{font:700 10px/1.5 system-ui;font-style:normal;padding:0 6px;border-radius:6px}
.eff-up{background:#2f6b2a;color:#d6ffc4}.eff-down{background:#5a4630;color:#f3dcb8}
.battle-dialog .move-grid .move-btn small{display:block;font-size:10.5px;color:#e8d39e;margin-top:4px}
.battle-bar{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:8px}
.battle-bar .bar-btn{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;text-align:left;padding:9px 11px;border-radius:10px;
  background:linear-gradient(#335646,#203a2f);border:1px solid #86a07a;box-shadow:0 2px 0 #0005;color:#f6f0dc}
.battle-bar .bar-btn:hover:not(:disabled){background:linear-gradient(#3d6653,#25443a)}
.bar-icon{grid-row:span 2;font-size:24px;line-height:1}
.bar-btn strong{font-size:14px}.bar-btn small{font-size:10.5px;color:#c9d4b8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle-bar .bar-btn.warn{border-color:#c0695a}
.sheet-head{display:flex;flex-direction:column;margin:8px 0 4px}.sheet-head strong{font:700 19px Georgia,serif}.sheet-head small{color:#c9d4b8;font-size:12px}
.bag-group{font:700 11px system-ui;text-transform:uppercase;letter-spacing:.08em;color:#d5bd85;margin:10px 0 5px}
.bag-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:8px}
.bag-grid .bag-tile{position:relative;display:grid;grid-template-columns:42px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;text-align:left;padding:9px;border-radius:10px;
  background:linear-gradient(#25463a,#1a3329);border:1px solid #6f8e71;color:#f6f0dc;box-shadow:0 2px 0 #0005}
.bag-tile .bag-pic{grid-row:span 2;width:42px;height:42px}
.bag-tile strong{font-size:13px;padding-right:30px}.bag-tile small{font-size:10.5px;color:#c9d4b8}
.bag-count{position:absolute;top:5px;right:7px;font:700 11px system-ui;color:#f2e7c4;background:#0006;padding:0 6px;border-radius:999px}
.switch-list{display:grid;gap:6px}.switch-list .team-card{margin:0}
.sheet-back{margin-top:10px}
@media(max-width:600px){
 .battle-dialog .move-grid{gap:6px}
 .battle-dialog .move-grid .move-btn{padding:7px 8px 7px 12px}
 .battle-dialog .move-grid .move-top strong{font-size:14px}
 .battle-dialog .move-grid .move-btn small{display:none}
 .battle-bar{gap:6px}.battle-bar .bar-btn{padding:7px 8px;column-gap:6px}.bar-icon{font-size:20px}.bar-btn strong{font-size:13px}.bar-btn small{font-size:9.5px}
 .battle-dialog .battle-log{font-size:13px;padding:7px 10px}
 .bag-grid{grid-template-columns:1fr 1fr}
}
.battle-dialog .move-grid .move-top{display:flex}
.battle-dialog .move-grid .move-ap{display:inline-block;font-size:11px;color:#e8efd8;margin:0}
.battle-dialog .move-grid .move-mid .type-chip{display:inline-block;margin:0;font-size:10px}
.type-chip.dark-text{color:#2a2410}
.battle-head .battle-round{font-size:12px;line-height:1.35}
.bag-tile small{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
