@font-face{font-family:EndlessForge;src:url('/interface-semibold.ttf');font-weight:600;font-display:swap}
:root{--panel:#111421;--border:#51576f;--purple:#a95aee;--text:#f5f3ff;--muted:#b7bad0}
body{background:#0e1020;color:var(--text);font-family:EndlessForge,Segoe UI,sans-serif}
#welcome{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:24px 16px;overflow:auto}
.landscape{position:fixed;inset:0;background:linear-gradient(0deg,#080c1d88,#0d0d2222 55%,#13112c44),url('/scenery.webp') center/cover}
.landscape:after{background:radial-gradient(ellipse at center,#100b2022 10%,#05091d66 100%)}
.story{padding:0;align-items:center;justify-content:center;position:relative;margin:0;filter:drop-shadow(0 6px 9px #0a0417)}
.story:before{content:'';position:absolute;inset:10px -100px -20px;background:radial-gradient(ellipse,#351358a8,transparent 70%);z-index:-1}
.brand-crystal{width:76px;height:92px;object-fit:contain;filter:drop-shadow(0 0 17px #a43ffb80)}
.story h1{font:normal 64px/.94 Georgia,serif;letter-spacing:4px;margin:8px 0 0;text-align:center;color:#eeeaf4;text-shadow:0 2px 0 #fff,0 4px 0 #39304e,0 6px 3px #080510}
.story h1 span{display:flex;align-items:center;gap:13px;font:normal 24px/1.4 Georgia,serif;color:#f4edff;letter-spacing:6px;margin:6px 0 2px;text-align:center;justify-content:center}
.story h1 span:before,.story h1 span:after{content:'';display:block;width:64px;height:1px;background:linear-gradient(90deg,transparent,#cab1e7)}
.story h1 span:after{transform:rotate(180deg)}
.account{position:relative;width:520px;max-width:100%;padding:26px 34px 30px;margin:18px 0 0;align-self:center;justify-self:auto;background:linear-gradient(135deg,#24283b 0,#111421 27%,#111421 78%,#1b1b2b);border:2px solid #888a9d;clip-path:polygon(20px 0,calc(100% - 20px) 0,100% 20px,100% calc(100% - 20px),calc(100% - 20px) 100%,20px 100%,0 calc(100% - 20px),0 20px);box-shadow:inset 0 0 0 4px #11121b,inset 0 0 0 5px #3e4259,0 16px 40px #000b}
.account:before{content:'';pointer-events:none;position:absolute;inset:7px;border:1px solid #4b4b61;clip-path:polygon(13px 0,calc(100% - 13px) 0,100% 13px,100% calc(100% - 13px),calc(100% - 13px) 100%,13px 100%,0 calc(100% - 13px),0 13px)}
.account-head{margin-top:66px;text-align:center}.account-head h2{font:600 28px/1.2 EndlessForge,Segoe UI,sans-serif;letter-spacing:0;margin:0 0 18px;color:#fff}
.tabs{position:absolute;top:22px;left:28px;right:28px;gap:10px;border-bottom:1px solid #4d4b62;margin:0;padding-bottom:12px}.tabs button{background:transparent;color:#d6d4e4;font-size:21px;border:1px solid transparent;border-radius:7px;padding:8px 0;transition:background .12s,border-color .12s,box-shadow .12s}.tabs [aria-selected=true]{color:#fff;background:linear-gradient(#74439b,#442268);border:1px solid #bb76ff;box-shadow:inset 0 1px 0 #e5b7ff55,0 0 14px #9029f544}
label{font-size:17px;line-height:1.2;color:#d4d2e4;margin:13px 0 7px}input{font-family:EndlessForge,Segoe UI,sans-serif;border:1px solid #51576f;border-bottom-width:2px;background:linear-gradient(135deg,#232738,#191d2d);color:#f6f3ff;border-radius:8px;padding:11px 16px 11px 45px;font-size:19px;height:48px;box-shadow:inset 0 1px 1px #ffffff08,0 2px 4px #0004}input:focus{outline:0;border-color:#b57ce9;box-shadow:0 0 0 2px #9b4cdb22,inset 0 1px 1px #ffffff08}
.password button{height:44px;top:1px;right:4px;color:#d1c4e4;font-size:13px}.password input{padding-right:83px}
.primary{font-family:EndlessForge,Segoe UI,sans-serif;background:linear-gradient(#a64ddd,#7834ac 35%,#59227f);border:1px solid #c77aff;border-bottom:3px solid #35134e;border-radius:8px;box-shadow:inset 0 1px 0 #e6b8ff77,0 0 15px #982ae52a;color:white;text-align:center;font-size:24px;font-weight:600;min-height:54px;padding:9px 18px;transition:filter .12s,box-shadow .12s}.primary span{float:none;margin-left:12px}.primary:hover{filter:brightness(1.12);box-shadow:inset 0 1px 0 #f5d5ff88,0 0 20px #a743ff44}.primary:active{filter:brightness(.9)}button:focus-visible,a:focus-visible{outline:1px solid #dab8ff;outline-offset:3px}button{font-family:EndlessForge,Segoe UI,sans-serif}button:hover{filter:brightness(1.1)}
#error{color:#f5b3a1;font:600 16px/1.4 EndlessForge,Segoe UI,sans-serif;min-height:12px;margin:10px 0}#error:not(:empty){border:1px solid #8b4b61;border-left:3px solid #dc938a;background:#382438;border-radius:5px;padding:10px 12px}#sync-status:not(:empty){background:linear-gradient(135deg,#252a40,#141828);border:1px solid #73508c;border-left:3px solid #c693e9;color:#f0e9f8;font-family:EndlessForge,Segoe UI,sans-serif;font-size:18px;border-radius:6px}
@media(min-width:1700px){.account{width:560px;padding:30px 40px 34px}.story{padding:0}.story h1{font-size:76px}.brand-crystal{width:86px;height:102px}.account-head h2{font-size:32px}}
@media(max-height:760px) and (min-width:851px){#welcome{padding:18px}.brand-crystal{width:60px;height:68px}.story h1{font-size:50px}.story h1 span{font-size:20px;margin:2px 0}.account{margin-top:12px;padding:22px 30px 25px}.account-head{margin-top:61px}.account-head h2{font-size:27px;margin-bottom:12px}label{margin-top:10px}input{height:44px;padding-top:9px;padding-bottom:9px}.password button{height:40px}.tabs{top:19px}.tabs button{font-size:20px;padding:7px 0}.primary{min-height:49px;font-size:22px}}
@media(max-width:850px){#welcome{padding:22px 14px;justify-content:center}.story{padding:0}.brand-crystal{width:60px;height:70px}.story h1{font-size:48px;margin:4px 0}.story h1 span{display:flex;font-size:19px;margin:4px 0}.account{margin-top:14px;padding:25px}.account-head{margin-top:62px}.tabs{left:22px;right:22px}.account-head h2{font-size:27px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}
input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-text-fill-color:#f6f3ff;-webkit-box-shadow:0 0 0 1000px #1c2133 inset;caret-color:#f6f3ff}::selection{background:#70449c;color:#fff}

/* Feld-Icons als eigene Elemente: bleiben auch bei Browser-Autofill sichtbar. */
.field{position:relative}.field-icon{position:absolute;left:15px;top:50%;width:22px;height:22px;transform:translateY(-50%);pointer-events:none;z-index:2;filter:drop-shadow(0 1px 1px #0008)}.field input{padding-left:48px}
/* Projektlogo auf Login/Registrierung; die Größe steht auch im HTML, damit nichts aufspringt. */
.story h1 img.brand-logo{display:block;width:300px;height:300px;max-width:70vw;max-height:70vw;object-fit:contain;margin:0 auto -10px;filter:drop-shadow(0 10px 28px #7a2bd099)}
@media(max-height:900px) and (min-width:851px){.story h1 img.brand-logo{width:230px;height:230px}}
@media(max-height:760px) and (min-width:851px){.story h1 img.brand-logo{width:170px;height:170px}}
@media(max-width:850px){.story h1 img.brand-logo{width:200px;height:200px}}
/* Auswahl der Spielfigur bei der Registrierung */
.gender-title{margin:16px 0 8px;font-size:17px;color:#d4d2e4}.gender{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:6px}.gender-option{position:relative;display:flex;align-items:center;gap:12px;margin:0;padding:8px 12px;border:1px solid #51576f;border-radius:10px;background:linear-gradient(135deg,#232738,#191d2d);cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}.gender-option:hover{border-color:#8a6cc8;transform:translateY(-1px)}.gender-option input{position:absolute;opacity:0;pointer-events:none}.gender-option img{width:56px;height:56px;border-radius:8px;background:#2a2238;border:2px solid #c9973a}.gender-option span{font-size:19px;color:#f6f3ff}.gender-option:has(input:checked){border-color:#b57ce9;box-shadow:0 0 0 2px #9b4cdb55,0 0 18px #9b4cdb33;background:linear-gradient(135deg,#3a2466,#231a40)}.gender-option:has(input:focus-visible){outline:2px solid #d3b4fa;outline-offset:2px}
/* Handy und Tablet: Karte nie breiter als der Bildschirm. */
#welcome,.account{box-sizing:border-box}.account{width:min(520px,calc(100vw - 28px))!important;max-width:calc(100vw - 28px)}@media(max-width:480px){.account{padding:22px 18px 24px!important}.tabs{left:16px!important;right:16px!important}.tabs button{font-size:18px}.gender{grid-template-columns:1fr 1fr;gap:8px}.gender-option{padding:6px 8px;gap:8px}.gender-option img{width:44px;height:44px}.gender-option span{font-size:16px}.story h1 img.brand-logo{width:170px;height:170px}}
/* Spiel in beiden Ausrichtungen; auf dem iPhone (Vollbild vom Home-Bildschirm) Abstand zu Notch und Home-Balken. */
#game{box-sizing:border-box;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#0e1120}
#game{height:100dvh}iframe{touch-action:manipulation}
/* Registrierung auf niedrigen Bildschirmen (z. B. 1280 × 720): kleineres Logo und kompaktere Figurenwahl, damit der Knopf ohne Scrollen sichtbar bleibt. */
@media(max-height:760px){body.registering .story h1 img.brand-logo{width:78px;height:78px}body.registering .story h1 span{margin:0}body.registering .gender-title{margin:10px 0 6px}body.registering .gender-option{padding:5px 10px}body.registering .gender-option img{width:42px;height:42px}}
/* Während des Spiels: äußere Seite fest, kein Mitscrollen, kein Gummiband, kein Zoom per Doppeltipp. */
html.playing,html.playing body{overflow:hidden;overscroll-behavior:none;height:100%}html.playing body{position:fixed;inset:0;width:100%}#game iframe{touch-action:none}
/* Download der Android-App unter dem Formular */
.app-download{display:flex;align-items:center;gap:12px;margin-top:16px;padding:10px 14px;border:1px solid #3a3f5c;border-radius:10px;background:#151a2c;color:#f2f0fb;text-decoration:none;transition:border-color .15s,background .15s}.app-download:hover{border-color:#8a6cc8;background:#1b2036}.app-download img{width:34px;height:34px;border-radius:8px}.app-download span{display:flex;flex-direction:column;line-height:1.25}.app-download strong{font-size:16px;font-weight:600}.app-download small{font-size:13px;color:#a9adc6}
.app-downloads{display:flex;gap:10px;margin-top:16px}.app-downloads .app-download{flex:1 1 0;min-width:0;margin-top:0;padding:9px 12px;gap:10px}.app-downloads .app-download strong{font-size:15px}.app-downloads .app-download small{font-size:12px}
@media(max-height:760px){body.registering .app-downloads{display:none}}
/* Ankündigung aus dem Admin-Bereich: Banner oben mittig über dem Spiel (Vorschau im Admin-Bereich nutzt dieselbe Klasse). */
.ef-notice{position:absolute;top:calc(72px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:20;width:min(620px,calc(100% - 24px));display:flex;align-items:center;gap:12px;padding:12px 14px 12px 16px;border-radius:10px;background:linear-gradient(135deg,#2a2350f2,#151a2cf2);border:1px solid #6a4aa8;border-left:4px solid #a95aee;color:#f2f0fb;font:600 16px/1.4 EndlessForge,Segoe UI,sans-serif;box-shadow:0 10px 30px #000a;animation:ef-notice-in .35s ease-out}
.ef-notice.reload{top:calc(140px + env(safe-area-inset-top))}.ef-notice button.ef-reload{width:auto;padding:0 14px;background:#ffc94a;color:#2a1a05;font-weight:600}
.ef-notice.preview{position:static;transform:none;width:auto;animation:none}
.ef-notice p{margin:0;flex:1;white-space:pre-line}
.ef-notice-icon{flex:none;width:30px;height:30px;border-radius:50%;background:#a95aee url('/admin/icons/nav-bell.svg') center/18px no-repeat}
.ef-notice.event{border-color:#a0782c;border-left-color:#ffc94a;background:linear-gradient(135deg,#3a2c14f2,#151a2cf2)}.ef-notice.event .ef-notice-icon{background-color:#c9962c}
.ef-notice.warning{border-color:#8b4b61;border-left-color:#ff8a96;background:linear-gradient(135deg,#3d1f2cf2,#151a2cf2)}.ef-notice.warning .ef-notice-icon{background-color:#c4566a}
.ef-notice button{flex:none;width:36px;height:36px;padding:0;border-radius:8px;background:#ffffff14;color:#f2f0fb;font-size:15px}
@keyframes ef-notice-in{from{opacity:0;transform:translate(-50%,-10px)}}
@media(prefers-reduced-motion:reduce){.ef-notice{animation:none}}
.ef-notice.app{top:auto;bottom:calc(16px + env(safe-area-inset-bottom))}.ef-notice a.ef-reload{display:inline-flex;align-items:center;height:36px;padding:0 14px;border-radius:8px;background:#ffc94a;color:#2a1a05;font-weight:600;text-decoration:none}
/* Bis feststeht, ob jemand angemeldet ist: keine Anmeldeseite zeigen (und ihre Bilder nicht laden). */
html.booting,html.booting body{background:#111424}html.booting #welcome{display:none}
.ef-dialog{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:16px;background:#05070fcc}
.ef-dialog-box{box-sizing:border-box;width:min(480px,100%);max-height:calc(100dvh - 32px);overflow:auto;padding:24px;border:1px solid #4a3a8a;border-radius:14px;background:#161b2e;color:#f2f0fb;box-shadow:0 18px 50px #0009;font:16px/1.5 Rubik,system-ui,sans-serif}
.ef-dialog-box p{margin:0 0 18px;white-space:pre-line}
.ef-dialog-box input{box-sizing:border-box;width:100%;margin:0 0 18px;padding:11px 12px;border:1px solid #2e3556;border-radius:8px;background:#0c0f1c;color:#f2f0fb;font:inherit}
.ef-dialog-box input:focus{outline:2px solid #a95aee;outline-offset:1px}
.ef-dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.ef-dialog-actions button{min-height:44px;padding:9px 18px;border:1px solid #2e3556;border-radius:9px;background:#1d2238;color:#f2f0fb;font:inherit;cursor:pointer}
.ef-dialog-actions button:focus-visible{outline:2px solid #a95aee;outline-offset:2px}
.ef-dialog-actions .primary{border-color:#a070f0;background:#7a3fc0}.ef-dialog-actions .danger{border-color:#e0606e;background:#8a1f2f}
.wiki-link{margin:14px 0 0;text-align:center;font-size:15px}.wiki-link a{color:#c79bff}
