:root{color-scheme:dark;font-family:Inter,ui-sans-serif,system-ui,sans-serif;--gold:#f7c948;--ink:#07101e}*{box-sizing:border-box}html,body,#game{width:100%;height:100%;margin:0;overflow:hidden;background:#050912;color:#fff}button{font:inherit;color:inherit}button,a{-webkit-tap-highlight-color:transparent}#world{width:100%;height:100%;display:block;touch-action:none;user-select:none}#loading{position:fixed;inset:0;z-index:40;display:grid;place-content:center;text-align:center;gap:12px;background:radial-gradient(circle,#132e59,#040711);transition:.5s}#loading b{font-size:clamp(1.8rem,6vw,4.5rem);letter-spacing:.08em;color:var(--gold)}#loading span{color:#cbd5e1}.ready #loading{opacity:0;pointer-events:none}.hidden{display:none!important}
.hud{position:fixed;z-index:6;pointer-events:none}.hud.top{left:20px;top:18px;display:flex;gap:12px}.hud section{width:min(250px,30vw);padding:10px 13px;border:1px solid #ffffff25;border-radius:14px;background:#07101ed9;box-shadow:0 14px 30px #0007;backdrop-filter:blur(12px)}.hud small,.quest small{display:block;color:#a8b8d2;font-weight:800;letter-spacing:.1em;font-size:.68rem}.bar{height:9px;margin:5px 0;border-radius:9px;background:#ffffff18;overflow:hidden}.bar i{display:block;width:100%;height:100%;background:linear-gradient(90deg,#dc2626,#fb7185);transition:.2s}.bar.xp i{background:linear-gradient(90deg,#1d4ed8,#60a5fa)}.hud section>b{font-size:.75rem}.quest{position:fixed;z-index:6;top:18px;right:18px;width:min(340px,42vw);padding:14px 16px;border-radius:16px;border:1px solid #f7c94855;background:#07101ee8;box-shadow:0 14px 40px #0009}.quest>b{display:block;margin:5px 0;color:#ffe49b}.quest p{font-size:.8rem;line-height:1.4;margin:4px 0;color:#d6e0ed}.quest span{font-weight:900;color:var(--gold)}.target{position:fixed;z-index:6;left:50%;top:92px;transform:translateX(-50%);width:min(340px,55vw);text-align:center;text-shadow:0 2px 5px #000}.target .bar{height:12px;border:1px solid #fff3;background:#15070a}.target.hidden{display:none}.crosshair{position:fixed;z-index:5;left:50%;top:50%;transform:translate(-50%,-50%);font-size:2rem;text-shadow:0 0 5px #000}.message{position:fixed;z-index:8;left:50%;bottom:150px;transform:translateX(-50%);padding:10px 18px;border-radius:999px;background:#07101ee8;color:#ffe49b;font-weight:800;opacity:0;transition:.2s;white-space:nowrap}.message.show{opacity:1}
.actionbar{position:fixed;z-index:6;left:50%;bottom:18px;transform:translateX(-50%);display:flex;gap:8px}.actionbar button{min-width:100px;padding:9px 12px;border:1px solid #ffffff26;border-radius:13px;background:#07101ee8;box-shadow:0 8px 24px #0007}.actionbar kbd{display:block;color:var(--gold);font-weight:900;font-size:.65rem}.actionbar span{font-size:.72rem}.intro,.pause,.death,.victory{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 50% 20%,#173966dd,#030711f5);text-align:center}.intro>div,.pause>div,.death>div,.victory>div{max-width:650px;padding:34px;border-radius:26px;border:1px solid #f7c94866;background:#07101eee;box-shadow:0 30px 100px #000}.intro span,.victory span{color:var(--gold);font-weight:900;letter-spacing:.18em}.intro h1,.victory h2{font-size:clamp(2rem,7vw,4.7rem);line-height:.98;margin:14px 0;background:linear-gradient(#fff,#ffd76a);-webkit-background-clip:text;color:transparent}.intro p,.pause p,.death p,.victory p{color:#d3deed;line-height:1.65}.intro button,.pause button,.death button,.victory button{border:0;border-radius:999px;padding:13px 25px;background:linear-gradient(135deg,#f6cf5c,#bf7e16);color:#160e02;font-weight:950;cursor:pointer}.pause a{display:block;margin-top:18px;color:var(--gold)}.intro small{display:block;margin-top:18px;color:#90a3bc;line-height:1.6}.fullscreen-error{display:block;max-width:520px;margin:14px auto 0;padding:10px 14px;border:1px solid #f59e0b88;border-radius:12px;background:#78350f88;color:#ffe3a3;font-size:.82rem;line-height:1.45}.pause .secondary-button{display:block;margin:12px auto 0;border:1px solid #ffffff38;background:#101d31;color:#d9e6f5}.popup-notice{position:relative;display:block;min-height:1.2em;margin:4px auto 0;color:#b8c9dc;font-size:.72rem}
.touch{display:none}.stick{position:fixed;left:max(24px,env(safe-area-inset-left));bottom:max(24px,env(safe-area-inset-bottom));width:124px;height:124px;border:2px solid #fff4;border-radius:50%;background:#07101e99;touch-action:none}.stick i{position:absolute;left:40px;top:40px;width:40px;height:40px;border-radius:50%;background:#ffffffe6;box-shadow:0 0 20px #fff5}.touch-actions{position:fixed;right:max(22px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));display:grid;grid-template-columns:repeat(2,64px);gap:12px}.touch-actions button{width:64px;height:64px;border-radius:50%;border:1px solid #fff5;background:#0c1b31ee;font-size:1.65rem;touch-action:none}.touch-actions button:first-child{grid-row:span 2;width:76px;height:76px;background:#7f1d1dee}.touch-actions button:last-child{grid-column:2}.rotate-device{display:none;position:fixed;inset:0;z-index:60;place-items:center;padding:24px;background:#030711;text-align:center}.rotate-device div{display:grid;gap:10px}.rotate-device b{font-size:1.5rem;color:var(--gold)}.rotate-device span{color:#cbd5e1}
@media(max-width:800px),(pointer:coarse){.hud.top{left:max(9px,env(safe-area-inset-left));top:max(8px,env(safe-area-inset-top));gap:5px}.hud section{width:135px;padding:7px 8px}.quest{top:max(74px,env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:220px;padding:9px 11px}.quest p{font-size:.7rem}.target{top:42px}.actionbar{display:none}.touch{display:block}.message{bottom:160px;max-width:90vw;white-space:normal;text-align:center}.crosshair{display:none}.intro>div,.pause>div,.death>div,.victory>div{padding:24px 18px}.intro small{font-size:.7rem}}@media(pointer:coarse) and (orientation:portrait){.rotate-device{display:grid}}
body.landing{overflow:auto;background:#02060c}.landing-page{position:relative;isolation:isolate;min-height:100dvh;display:grid;place-items:center;overflow:hidden;padding:clamp(16px,3vw,38px);color:#fff;background-color:#02060c;background-image:var(--wodw-login-background,url('../images/world-of-dogiwood-login.jpg'));background-repeat:no-repeat;background-position:center;background-size:cover}.landing-page:before{content:"";position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#02060c22 0,#02060c00 24%,#02060c3d 50%,#02060c00 76%,#02060c22 100%)}.landing-vignette{position:absolute;z-index:-1;inset:0;pointer-events:none;background:radial-gradient(ellipse at center,transparent 12%,#01040a20 48%,#01040aa6 100%),linear-gradient(180deg,#01040a3b,transparent 18%,transparent 76%,#01040a8c)}.landing-card{position:relative;width:min(510px,100%);padding:clamp(18px,3.8vh,34px) clamp(20px,4vw,40px) clamp(22px,4vh,38px);border:1px solid #f4c95c80;border-radius:28px;background:linear-gradient(155deg,#071322ed,#020711e6);box-shadow:0 28px 90px #000d,0 0 45px #177bd129,inset 0 1px #ffffff1f;text-align:center;backdrop-filter:blur(13px);-webkit-backdrop-filter:blur(13px)}.landing-card:before{content:"";position:absolute;inset:8px;border:1px solid #2d75b53d;border-radius:21px;pointer-events:none}.landing-logo{position:relative;display:block;width:min(430px,100%);max-height:25vh;object-fit:contain;margin:-18px auto -2px;mix-blend-mode:screen;filter:drop-shadow(0 7px 18px #000) drop-shadow(0 0 18px #197bd855)}.eyebrow{position:relative;color:#f8cf64;font-weight:900;letter-spacing:.15em;font-size:.68rem;text-shadow:0 2px 8px #000}.landing-card h1{position:relative;margin:10px 0 8px;font-family:Georgia,'Times New Roman',serif;font-size:clamp(1.8rem,5vw,3.2rem);line-height:1;background:linear-gradient(#fff9d6,#e7b84d 62%,#fff0ad);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 2px 8px #000)}.landing-card>p{position:relative;max-width:430px;margin:0 auto 14px;color:#d5dfec;font-size:.92rem;line-height:1.55;text-shadow:0 2px 5px #000}.primary-link{position:relative;display:inline-block;margin:7px;padding:13px 26px;border:1px solid #fff0a780;border-radius:999px;background:linear-gradient(135deg,#ffe489,#c88b20 55%,#8f570c);box-shadow:0 8px 28px #0009,0 0 22px #218cf037;color:#160e02;text-decoration:none;font-weight:950;transition:transform .18s,filter .18s}.primary-link:hover,.primary-link:focus-visible{transform:translateY(-2px);filter:brightness(1.12)}.text-link{position:relative;display:block;margin-top:10px;color:#c6d7eb}.landing-card small{position:relative;display:block;max-width:420px;margin:10px auto 0;color:#93a8c1;font-size:.72rem;line-height:1.45}.account-line{position:relative;color:#d7e4f4}.access-notice{position:relative;margin:12px auto;padding:10px 14px;border:1px solid #f59e0b77;border-radius:12px;background:#78350f73;color:#ffdda0}
@media(max-height:700px) and (orientation:landscape){.landing-card{width:min(460px,48vw);padding:12px 28px 18px}.landing-logo{max-height:24vh;margin:-12px auto -6px}.landing-card h1{font-size:1.75rem}.landing-card>p{font-size:.78rem;line-height:1.4;margin-bottom:8px}.landing-card small{font-size:.62rem;margin-top:6px}.primary-link{padding:10px 22px}.eyebrow{font-size:.58rem}}
@media(max-width:620px){.landing-page{align-items:center;background-position:center;background-size:auto 100%;padding:14px}.landing-page:before{background:#02060c40}.landing-card{border-radius:22px;padding:15px 18px 22px}.landing-card:before{inset:6px;border-radius:17px}.landing-logo{margin:-10px auto -2px;max-height:23vh}.landing-card h1{font-size:clamp(1.7rem,9vw,2.5rem)}.landing-card>p{font-size:.82rem}.eyebrow{font-size:.57rem}.primary-link{padding:12px 20px}.landing-card small{font-size:.66rem}}
.awaiting-fullscreen>canvas,.awaiting-fullscreen>.hud,.awaiting-fullscreen>.quest,.awaiting-fullscreen>.target,.awaiting-fullscreen>.crosshair,.awaiting-fullscreen>.message,.awaiting-fullscreen>.actionbar,.awaiting-fullscreen>.touch,.awaiting-fullscreen>#loading{visibility:hidden!important}
.editor-toggle{position:fixed;z-index:12;right:max(16px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));border:1px solid #f7c94888;border-radius:999px;padding:11px 16px;background:#07101eee;color:#ffe28a;font-weight:900;box-shadow:0 10px 28px #0009;cursor:pointer}.level-editor{position:fixed;z-index:20;left:12px;right:12px;bottom:12px;max-height:min(62vh,520px);display:grid;grid-template-rows:auto auto auto minmax(92px,1fr) auto;gap:8px;padding:12px;border:1px solid #f7c94888;border-radius:18px;background:#06101bf2;box-shadow:0 22px 60px #000c;backdrop-filter:blur(14px)}.level-editor header,.level-editor footer,.editor-tools,.editor-selection{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.level-editor header strong{color:var(--gold);letter-spacing:.12em}.level-editor header span{margin-right:auto;color:#9fb1c8;font-size:.72rem}.level-editor header>button{border:0;background:transparent;font-size:1.8rem;line-height:1}.level-editor button{border:1px solid #ffffff2b;border-radius:10px;padding:8px 10px;background:#12223a;color:#eef6ff;font-weight:800;cursor:pointer}.level-editor button.active{border-color:#f7c948;background:#624514}.level-editor button.danger{background:#5e1d27}.editor-tools label{display:flex;align-items:center;gap:6px;font-size:.75rem;color:#cad7e7}.editor-tools input{width:105px}.editor-selection{padding:7px;border-radius:12px;background:#0d1b2d}.editor-selection b{margin-right:4px;color:#ffe38a}.editor-catalog{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:7px;overflow:auto;padding:2px}.editor-asset{min-height:64px!important;display:grid!important;grid-template-columns:34px 1fr;align-items:center;text-align:left!important}.editor-asset i{font-style:normal;font-size:1.6rem}.editor-asset small{display:block;color:#91a6bf;font-size:.62rem}.level-editor footer{justify-content:flex-end}.level-editor .editor-save{background:linear-gradient(135deg,#f6cf5c,#b77712);color:#160e02;border:0}.editor-point-marker{pointer-events:none}.editor-dirty #editor-status{color:#ffd36a}.editor-selected-outline{outline:2px solid #ffd34f}.editor-mode .hud,.editor-mode .quest,.editor-mode .actionbar,.editor-mode .touch{opacity:.22;pointer-events:none}.editor-mode .crosshair{display:none}
@media(max-width:800px),(pointer:coarse){.editor-toggle{right:max(12px,env(safe-area-inset-right));top:max(8px,env(safe-area-inset-top));bottom:auto;padding:8px 11px}.editor-toggle span{display:none}.level-editor{left:max(7px,env(safe-area-inset-left));right:max(7px,env(safe-area-inset-right));bottom:max(7px,env(safe-area-inset-bottom));max-height:72vh;padding:8px}.level-editor button{padding:7px 8px;font-size:.72rem}.editor-catalog{grid-template-columns:repeat(auto-fill,minmax(102px,1fr))}.editor-asset{min-height:55px!important}.editor-selection b{width:100%}}
.texture-open{background:#173c56!important;border-color:#55c8e5!important}.texture-editor{position:absolute;z-index:3;inset:50px 10px 10px;display:grid;grid-template-rows:auto minmax(100px,1fr) auto auto;gap:10px;padding:12px;border:1px solid #67d8ec88;border-radius:14px;background:#071421fa;box-shadow:0 18px 50px #000d}.texture-editor header{display:block}.texture-editor header b{display:block;color:#7ee6f3}.texture-editor header span{font-size:.72rem;color:#aebfd1}.texture-slots{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:8px;overflow:auto}.texture-slot{display:grid;grid-template-columns:58px 1fr;gap:8px;align-items:center;padding:8px;border:1px solid #ffffff24;border-radius:12px;background:#0d1d2f}.texture-slot-preview{width:58px;height:58px;border-radius:9px;border:1px solid #ffffff2b;background:linear-gradient(45deg,#172236 25%,#25344b 25% 50%,#172236 50% 75%,#25344b 75%);background-size:18px 18px;object-fit:cover}.texture-slot b{font-size:.75rem}.texture-slot small{display:block;margin:3px 0;color:#92a8bf;font-size:.62rem}.texture-slot label{display:inline-block;padding:6px 8px;border-radius:8px;background:#193752;color:#dff8ff;font-size:.68rem;font-weight:800;cursor:pointer}.texture-slot input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.texture-slot .texture-remove{padding:5px 7px;margin-left:4px;background:#592431;font-size:.65rem}.texture-settings{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:8px;border-radius:11px;background:#0d1b2d}.texture-settings label{display:flex;align-items:center;gap:7px;font-size:.72rem;color:#d1dfed}.texture-settings input[type=range]{width:110px}.texture-settings input[type=color]{width:40px;height:28px;padding:1px;border:0;border-radius:6px;background:transparent}.texture-all{margin-left:auto}.texture-editor footer{justify-content:flex-end}.texture-editor.busy{pointer-events:none;opacity:.72}
.editor-asset.category-plants{border-color:#5ebd6f66}.editor-asset.category-paths{border-color:#bc8a5966}.editor-asset.category-rocks{border-color:#aab2b566}.editor-asset.category-water{border-color:#55bfe088}
@media(max-width:800px),(pointer:coarse){.texture-editor{inset:42px 5px 5px;padding:8px}.texture-slots{grid-template-columns:repeat(2,minmax(120px,1fr))}.texture-slot{grid-template-columns:44px 1fr;padding:6px}.texture-slot-preview{width:44px;height:44px}.texture-settings{gap:7px}.texture-all{margin-left:0;width:100%}}

/* WoDW 1.0 – Charakterauswahl nach Dogiwood-Login */
.character-select-card{width:min(860px,100%);max-height:calc(100dvh - 28px);overflow:auto;scrollbar-width:thin}
.character-select{position:relative;display:grid;gap:14px;margin-top:8px}
.character-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;text-align:left}
.character-card{padding:15px;border:1px solid #f4c95c4a;border-radius:17px;background:linear-gradient(155deg,#0a1930e8,#030914e8);box-shadow:inset 0 1px #ffffff12,0 10px 28px #0006}
.character-card-head{display:grid;gap:3px}.character-card-head strong{font-size:1.15rem;color:#ffe38a}.character-card-head span{font-size:.75rem;color:#9fb2ca}
.character-meta{display:flex;gap:12px;flex-wrap:wrap;margin:11px 0 4px;color:#d9e5f3;font-size:.8rem}
.character-card>small{margin:4px 0 8px;text-align:left;color:#7f95af}
.primary-link.compact{display:block;margin:10px 0 0;padding:9px 15px;text-align:center;font-size:.82rem}
.primary-link.new-character{justify-self:center;margin-top:3px;background:linear-gradient(135deg,#dff3ff,#62aee9 55%,#215d9d);color:#06111d}
.empty-characters{padding:14px;border:1px dashed #ffffff35;border-radius:14px;background:#07101ea8}
@media(max-width:620px){.character-select-card{max-height:calc(100dvh - 18px)}.character-list{grid-template-columns:1fr}}


/* WoDW 1.0 alpha.2 – Vollbild-Launcher, Popup und Charakter löschen */
html,body.landing{width:100%;min-height:100%;margin:0}
body.landing{overflow:hidden}
body.landing .landing-page{width:100vw;height:100vh;height:100dvh;min-height:100vh;min-height:100dvh}
body.wodw-popup-window .landing-page{height:100vh;height:100dvh}
body.wodw-popup-window .landing-card{max-height:calc(100dvh - 20px)}
.character-actions{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:stretch;margin-top:10px}
.character-actions .primary-link.compact{margin:0}
.delete-character-form{margin:0}
.danger-link{display:inline-flex;align-items:center;justify-content:center;border:1px solid #ff7e7e66;border-radius:999px;background:linear-gradient(135deg,#581818,#25070a);color:#ffd0d0;cursor:pointer;font:inherit;font-weight:800;text-decoration:none;box-shadow:inset 0 1px #ffffff10}
.danger-link:hover{filter:brightness(1.14)}
.danger-link.compact{height:100%;min-height:38px;padding:8px 13px;font-size:.78rem}
@media(max-width:620px){
 .character-actions{grid-template-columns:1fr}
 .danger-link.compact{width:100%}
 body.landing{overflow:auto}
}

html,body.landing{width:100%;height:100%;margin:0;background:#020711}
body.landing{overflow:hidden}
body.landing .landing-page{width:100vw;height:100vh;height:100dvh;min-height:100dvh;background-image:var(--wodw-login-background,url('../images/world-of-dogiwood-login.webp'))!important;background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
body.landing .landing-logo{display:block!important;max-width:min(520px,78vw)!important;height:auto!important;margin-inline:auto!important}

/* 456 alpha.4 – echte WoDW Game Shell */
.wodw-launcher-hidden{display:none!important}
.wodw-game-shell-layer[hidden]{display:none!important}
.wodw-game-shell-layer{
 position:fixed;inset:0;z-index:50000;background:#020711;
 width:100vw;height:100vh;height:100dvh;overflow:hidden
}
.wodw-game-frame{
 display:block;width:100%;height:100%;border:0;background:#020711
}
body.wodw-playing{overflow:hidden!important}
body.wodw-playing .wodw-game-shell-layer{display:block!important}

/* 456 alpha.5 – absoluter WoDW Login/Launcher Hintergrund */
body.landing .landing-page{
 background-image:var(--wodw-login-background,url('https://worldofdogiwood.de/assets/images/world-of-dogiwood-login.webp'))!important;
}

/* 456 alpha.6 – gemeinsamer dezenter Licht-Look */
.landing-page{isolation:isolate}
.landing-page>*:not(.wodw-light-layer):not(.wodw-light-sweep){position:relative;z-index:2}
.wodw-light-layer,.wodw-light-sweep{pointer-events:none;position:absolute;inset:0;z-index:1;overflow:hidden}
.wodw-light-layer{
 background:
  radial-gradient(circle at 22% 18%,rgba(255,220,128,.15),transparent 26%),
  radial-gradient(circle at 78% 28%,rgba(89,154,255,.13),transparent 30%),
  linear-gradient(118deg,transparent 20%,rgba(255,235,175,.055) 42%,transparent 58%);
 mix-blend-mode:screen
}
.wodw-light-sweep::before{
 content:'';position:absolute;inset:-35% -55%;
 background:linear-gradient(110deg,transparent 42%,rgba(255,226,150,.10) 49%,rgba(132,184,255,.08) 52%,transparent 59%);
 transform:translateX(-42%);animation:wodwLightSweep 12s ease-in-out infinite;filter:blur(16px)
}
@keyframes wodwLightSweep{0%,18%{transform:translateX(-42%)}55%,100%{transform:translateX(42%)}}
@media(prefers-reduced-motion:reduce){.wodw-light-sweep::before{animation:none;transform:none}}

/* 456 alpha.8 – ein einziges WoDW-Fenster */
body.wodw-playing{overflow:hidden!important}
.wodw-game-shell-layer{
 position:fixed!important;
 inset:0!important;
 width:100vw!important;
 height:100vh!important;
 height:100dvh!important;
 z-index:50000!important;
 background:#020711!important;
}
.wodw-game-frame{
 width:100%!important;
 height:100%!important;
 border:0!important;
 display:block!important;
}

/* 456 alpha.9 – interner SAdmin-Spielzugang */
.wodw-sadmin-notice{
 margin:12px 0 16px;
 padding:12px 14px;
 border:1px solid rgba(214,184,90,.46);
 border-radius:14px;
 background:rgba(7,16,30,.84);
 color:#f5e7b5;
 text-align:center;
 backdrop-filter:blur(10px)
}
.wodw-sadmin-notice strong{display:block;color:#ffe598;margin-bottom:4px}
.wodw-sadmin-notice span{opacity:.9}
.wodw-locked-action{
 display:inline-flex;
 align-items:center;
 justify-content:center;
 min-height:38px;
 padding:8px 14px;
 border:1px solid rgba(214,184,90,.28);
 border-radius:999px;
 background:rgba(7,16,30,.62);
 color:#cbbf99;
 font-weight:800;
 opacity:.72;
 cursor:not-allowed;
 user-select:none
}
.wodw-locked-action.compact{min-height:34px;padding:6px 11px;font-size:.82rem}
