/* MakerLand – nach der Leertaste: „Neues Spiel“ und „Laden“ (js/konto.js). Hintergrund wie der Titelbildschirm. */

.ico[data-ico="laden"] { background-image: url(menue/icons/diskette.png); }

#konto-wahl {
  z-index: 51; flex-direction: column; justify-content: flex-start; gap: 3vh; overflow-y: auto;
  padding: max(3vh, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(8, 20, 50, .15) 40%, rgba(8, 20, 50, .65)), url(menue/titelbild.jpg) center 70% / cover no-repeat, #2a5ab0;
}
.kw-logo img { width: min(520px, 76vw, 70vh); }
.kw-knoepfe { display: flex; flex-direction: column; gap: 14px; width: min(400px, 100%); margin-top: auto; margin-bottom: 8vh; }
.kw-knoepfe .schild { min-height: 76px; }
.kw-knoepfe .schild:hover, .kw-knoepfe .schild:focus-visible { transform: scale(1.04); outline: none; }
.kw-knoepfe .schild small { text-shadow: 1px 0 var(--ml-tief), -1px 0 var(--ml-tief), 0 1px var(--ml-tief), 0 -1px var(--ml-tief); }

.kw-fenster {
  position: fixed; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); margin-top: 24px;
  box-sizing: border-box; width: min(520px, calc(100% - 16px)); overflow: visible;
  animation: kw-auf .14s ease-out;
}
@keyframes kw-auf { from { opacity: 0; } }
#konto-wahl:has(.kw-fenster:not(.hidden))::before { content: ""; position: fixed; inset: 0; z-index: 2; background: rgba(7, 16, 31, .6); }
.kw-fenster form { display: flex; flex-direction: column; gap: 10px; max-height: calc(100dvh - 150px); overflow-y: auto; padding: 2px 4px; }
.kw-fenster .field { display: flex; flex-direction: column; margin: 0; }
.kw-fenster .ml-leiste { justify-content: center; }
.kw-fehler { margin: 0; min-height: 1.2em; color: #ff9b8a; font: 500 20px/1.2 var(--ml-pixel); }
.kw-oder { margin: 12px 0 4px; color: var(--ml-leise); font: 500 19px/1.2 var(--ml-pixel); }
#login-name[readonly] { opacity: .85; cursor: default; border-style: dashed; }

@media (max-width: 700px) {
  .kw-knoepfe .schild { min-height: 64px; }
  .kw-fenster { top: max(56px, calc(env(safe-area-inset-top) + 48px)); transform: translateX(-50%); margin-top: 0; }
}

/* ---------- Profil (js/profil.js) ---------- */
.ico[data-ico="werkzeug"]   { background-image: url(menue/icons/werkzeuge.png); }
.ico[data-ico="stern"]      { background-image: url(menue/icons/stern.png); }
.ico[data-ico="bild"]       { background-image: url(menue/icons/bild.png); }
.ico[data-ico="pokal"]      { background-image: url(menue/icons/pokal.png); }
.ico[data-ico="schluessel"] { background-image: url(menue/icons/schluessel.png); }
#profil { background: rgba(7, 16, 31, .55); z-index: 63; }
.pr-karte { width: min(860px, 100%); }
.pr-kopf { display: flex; align-items: center; gap: 14px; margin: 0 0 12px; }
.pr-kopf img, .pr-bild-gross, #hm-profil-bild, #dialog-bild { image-rendering: pixelated; border: 3px solid var(--ml-tief); box-shadow: 0 0 0 2px var(--ml-rand); background: var(--ml-tief); }
.pr-kopf img { width: 64px; height: 64px; }
.pr-kopf p { margin: 0; }
.pr-name { font: 700 34px/1.05 var(--ml-pixel); color: var(--ml-text); overflow-wrap: anywhere; }
.pr-kurz { font: 500 21px/1.2 var(--ml-pixel); color: var(--ml-leise); }
.pr-kurz b { color: var(--ml-gelb); }
.pr-hinweis { margin: 12px 0; padding: 8px 12px; border-left: 5px solid var(--ml-gelb); background: rgba(255, 201, 40, .12); font-size: 15px; }
#pr-felder .field { margin: 0 0 12px; }
#pr-felder textarea {
  width: 100%; box-sizing: border-box; resize: vertical; background: var(--ml-tief); color: var(--ml-text);
  border: 2px solid var(--ml-rand); border-radius: 4px; font: 500 21px/1.25 var(--ml-pixel); padding: 8px 12px;
}
#pr-felder input { width: 100%; box-sizing: border-box; }
#pr-felder textarea:focus { outline: none; border-color: var(--ml-gelb); box-shadow: 0 0 0 3px rgba(255, 201, 40, .3); }
.pr-status { min-height: 1.2em; margin: 4px 0 0; color: #8fe28f; font: 500 20px/1.2 var(--ml-pixel); }
#pr-pw-status { color: var(--ml-gelb); }
.pr-bild-zeile, .pr-figur-zeile { display: flex; align-items: center; gap: 18px; margin-top: 12px; }
.pr-bild-gross { width: 128px; height: 128px; flex: none; }
.pr-farben { display: flex; flex-wrap: wrap; gap: 8px; }
.pr-farben.pr-aus { opacity: .45; }
.pr-farbe { width: 44px; height: 44px; border: 3px solid var(--ml-tief); border-radius: 6px; cursor: pointer; box-shadow: 0 0 0 2px var(--ml-rand); }
.pr-farbe[aria-checked="true"] { box-shadow: 0 0 0 3px var(--ml-gelb); transform: scale(1.08); }
.pr-farbe:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.pr-datei { position: relative; }
.pr-datei input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pr-pw { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.pr-pw .field { margin: 0; }
.pr-figur-zeile .ch-figur { width: 170px; flex: none; }

/* Fortschritt */
.ch-figur {
  display: flex; align-items: flex-end; justify-content: center; height: 300px; border: 2px solid var(--ml-rand); border-radius: 4px;
  background: radial-gradient(ellipse 60% 8% at 50% 92%, rgba(0, 0, 0, .35), transparent), linear-gradient(180deg, #1d3a6b, #0c1a33);
}
#pr-figur-bild { width: 144px; height: 288px; image-rendering: pixelated; }
.ch-level { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px !important; font: 500 22px/1 var(--ml-pixel); color: var(--ml-leise); text-transform: uppercase; }
.ch-level-zahl { font: 700 54px/1 var(--ml-pixel); color: var(--ml-gelb); text-shadow: 2px 2px 0 var(--ml-tief); }
.ch-balken { height: 22px; border: 2px solid var(--ml-tief); border-radius: 3px; background: var(--ml-tief); box-shadow: 0 0 0 2px var(--ml-rand); overflow: hidden; }
#ch-balken-voll, #hm-profil-balken { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--ml-gelb) 0 10px, #ffb800 10px 12px); transition: width .4s ease-out; }
.ch-xp { margin: 6px 0 0 !important; font: 500 20px/1.2 var(--ml-pixel); color: var(--ml-text); }
.ch-liste { list-style: none; margin: 14px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; font: 500 21px/1.2 var(--ml-pixel); color: var(--ml-text); }
.ch-liste li { display: flex; align-items: center; gap: 10px; }
.ch-liste .ico { width: 26px; height: 26px; }

/* Spielstände (Profil und Abenteuer-Fenster) */
.ab-plaetze { display: flex; flex-direction: column; gap: 6px; }
.ab-platz { flex-direction: column; align-items: flex-start !important; gap: 2px; min-height: 64px; }
.ab-platz b { font-size: 25px; }
.ab-platz span, .ab-platz-info span { font-size: 19px; opacity: .9; }
.ab-platz.leer { opacity: .8; }
.ab-zwischen { margin: 14px 0 6px; font: 700 23px/1 var(--ml-pixel); color: var(--ml-gelb); }
.ab-platz-zeile { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 2px solid rgba(91, 143, 214, .45); border-radius: 6px; }
.ab-platz-info { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font: 500 21px/1.2 var(--ml-pixel); }
.ab-platz-info b { font-size: 24px; color: var(--ml-gelb); }
.ab-weg { width: auto !important; flex: none; justify-content: center; }
.ab-platz-reihe { display: flex; align-items: stretch; gap: 6px; }
.ab-platz-reihe .ab-platz { flex: 1; min-width: 0; }
.ab-ueberschreiben p { margin: 0 0 10px; font: 500 22px/1.25 var(--ml-pixel); }
.ab-ueberschreiben .ml-leiste { margin-top: 6px; }
#ab-wahl { display: flex; flex-direction: column; gap: 6px; }

/* Profil-Kachel im Hauptmenü */
.hm-profil {
  grid-area: fenster; align-self: center; justify-self: center; width: min(430px, 100%); box-sizing: border-box;
  display: flex; align-items: center; gap: 18px; padding: 16px 14px 14px; text-align: left; cursor: pointer;
  font: inherit; transition: transform .12s ease-out;
}
.hm-profil:hover, .hm-profil:focus-visible { transform: translateY(-3px); outline: none; filter: drop-shadow(0 0 8px rgba(255, 220, 90, .85)) drop-shadow(0 14px 24px rgba(0, 0, 0, .45)); }
#hm-profil-bild { width: 100px; height: 200px; display: block; }
.hmp-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.hmp-name { font: 700 38px/1 var(--ml-pixel); color: var(--ml-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmp-level { font: 500 26px/1 var(--ml-pixel); color: var(--ml-leise); text-transform: uppercase; }
.hmp-level b { color: var(--ml-gelb); font-size: 34px; }
.hmp-balken { display: block; height: 16px; border: 2px solid var(--ml-tief); background: var(--ml-tief); box-shadow: 0 0 0 1px var(--ml-rand); overflow: hidden; }
.hmp-mehr { align-self: flex-end; font: 700 24px/1 var(--ml-pixel); color: var(--ml-gelb); }
#login:has(.hm-fenster:not(.hidden)) .hm-profil { visibility: hidden; }
.link-knopf { padding: 0; border: 0; background: none; color: var(--ml-gelb); font: inherit; text-decoration: underline; cursor: pointer; }

@media (max-width: 720px), (max-height: 520px) {
  #login.startmenue { grid-template-areas: "logo" "profil" "schilder" "fuss" !important; grid-template-rows: auto auto auto 1fr !important; }
  .hm-profil { grid-area: profil; justify-self: center; margin-top: 18px; width: min(340px, 100%); padding: 8px 8px 6px; }
  #hm-profil-bild { width: 45px; height: 90px; }
  .hmp-name { font-size: 26px; }
  #profil { padding: 8px; align-items: stretch; }
  .pr-karte { width: 100%; max-height: none; height: calc(100% - 48px); margin-top: 48px; }
  .pr-kopf img { width: 48px; height: 48px; }
  .pr-name { font-size: 28px; }
  .pr-figur-zeile { flex-direction: column; align-items: stretch; }
  .pr-figur-zeile .ch-figur { width: auto; height: 220px; }
  #pr-figur-bild { width: 100px; height: 200px; }
}
@media (max-height: 520px) and (min-width: 600px) {
  #login.startmenue { grid-template-columns: minmax(0, 300px) minmax(0, 300px) !important; grid-template-areas: "logo schilder" "profil schilder" "fuss fuss" !important; grid-template-rows: auto auto auto !important; }
  .hm-profil { margin-top: 0; }
}

/* +XP-Meldung im Spiel */
.xp-meldung {
  position: fixed; left: 50%; top: 18%; z-index: 70; transform: translateX(-50%); pointer-events: none;
  padding: 8px 18px; border: 3px solid var(--ml-tief); border-radius: 6px; background: var(--ml-gelb); color: var(--ml-tief);
  font: 700 26px/1.1 var(--ml-pixel); text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  animation: xp-rein 2.6s ease-out forwards;
}
.xp-meldung small { display: block; font-size: 19px; font-weight: 500; }
.xp-meldung.aufstieg { background: #8fe28f; font-size: 32px; }
@keyframes xp-rein { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -14px); } }
@media (prefers-reduced-motion: reduce) { .xp-meldung { animation: none; } }
