
:root{
  --bg:#1b1b1b;
  --panel:#2f2f2f;
  --panel2:#3d3d3d;
  --stone:#666;
  --grass:#5fae3a;
  --dirt:#7a4a25;
  --gold:#ffd64a;
  --diamond:#59d9ff;
  --red:#d84b3a;
  --white:#f5f0d8;
  --muted:#c9c2a3;
  --shadow:#0b0b0b;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  color:var(--white);
  background:
    linear-gradient(45deg, rgba(0,0,0,.16) 25%, transparent 25%) 0 0/32px 32px,
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.05) 75%) 0 0/32px 32px,
    linear-gradient(#23351f,#151515);
  min-height:100vh;
}

#app{max-width:1180px;margin:0 auto;padding:18px}

.banner-header{
  position:relative;
  margin-bottom:22px;
  border:4px solid #171717;
  box-shadow:0 8px 0 var(--shadow);
  background:#111;
  overflow:hidden;
}
.minemind-banner{
  display:block;
  width:100%;
  height:260px;
  object-fit:cover;
  object-position:center;
}
.banner-header.hidden{
  display:none;
}
.banner-actions{
  position:absolute;
  top:10px;
  right:10px;
  z-index:2;
}
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  background:linear-gradient(#4f8f32 0 44%, #6b421f 45% 100%);
  border:4px solid #171717;
  box-shadow:0 8px 0 var(--shadow);
  padding:18px;
  margin-bottom:22px;
}
h1{margin:0;font-size:34px;text-shadow:3px 3px 0 #111}
.subtitle{margin:6px 0 0;color:#fff6c9}
.top-actions{display:flex;gap:10px;flex-wrap:wrap}

.pixel-btn{
  border:3px solid #111;
  background:#6b6b6b;
  color:white;
  padding:12px 16px;
  font-weight:800;
  cursor:pointer;
  box-shadow:0 5px 0 #111;
  text-shadow:2px 2px 0 #111;
  border-radius:0;
  transition:transform .05s, box-shadow .05s, filter .12s;
}
.pixel-btn:hover{filter:brightness(1.12)}
.pixel-btn:active{transform:translateY(4px);box-shadow:0 1px 0 #111}
.pixel-btn.primary{background:#3c9b36}
.pixel-btn.gold{background:#c59a21}
.pixel-btn.diamond{background:#1699b7}
.pixel-btn.red{background:#a33}
.pixel-btn.danger{background:#863232}
.pixel-btn.small{padding:8px 11px;font-size:13px}
.pixel-btn.full{width:100%;margin-top:10px}

.panel{
  background:rgba(47,47,47,.96);
  border:4px solid #111;
  box-shadow:0 8px 0 #0a0a0a;
  padding:18px;
  margin-bottom:18px;
}
.panel h2{margin:0 0 14px;font-size:25px;text-shadow:2px 2px 0 #111}
.grid{display:grid;gap:16px}
.grid.two{grid-template-columns:1.1fr .9fr}
.grid.three{grid-template-columns:repeat(3,1fr)}
.grid.four{grid-template-columns:repeat(4,1fr)}
@media(max-width:850px){.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.topbar{align-items:flex-start;flex-direction:column}}

.card{
  background:linear-gradient(180deg,#474747,#303030);
  border:3px solid #111;
  padding:16px;
  box-shadow:0 5px 0 #111;
}
.card h3{margin:0 0 8px}
.card .big{font-size:30px}
.card p{color:var(--muted)}

.topic-card{
  min-height:145px;
  cursor:pointer;
  position:relative;
  overflow:hidden;
}
.topic-card:before{
  content:"";
  position:absolute; inset:0;
  background:linear-gradient(45deg, transparent 0 48%, rgba(255,255,255,.08) 49% 52%, transparent 53%);
  pointer-events:none;
}
.topic-card:hover{filter:brightness(1.15); transform:translateY(-1px)}
.topic-card .icon{font-size:36px}
.topic-card .count{font-weight:900;color:var(--gold)}

.stats-row{display:grid;grid-template-columns:145px 1fr 55px;align-items:center;gap:10px;margin:10px 0}
.bar-wrap{height:20px;border:3px solid #111;background:#202020;box-shadow:inset 0 2px 0 #000}
.bar{height:100%;background:linear-gradient(90deg,#4bb13f,#a6e25b);width:0%;transition:width .4s ease}
.badge{
  display:inline-block;
  border:3px solid #111;
  background:#262626;
  padding:6px 9px;
  margin:4px 4px 0 0;
  font-weight:900;
}
.badge.gold{background:#7c5b14;color:#fff4b6}
.badge.diamond{background:#0e6274;color:#d5fbff}

.task-layout{display:grid;grid-template-columns:1fr 320px;gap:18px}
@media(max-width:900px){.task-layout{grid-template-columns:1fr}}
.meta{color:#666;font-weight:900;margin-bottom:8px}
.task-box{
  background:#efe7c4;
  color:#151515;
  border:5px solid #111;
  box-shadow:0 8px 0 #090909;
  padding:22px;
  min-height:190px;
}
.task-question{
  font-size:28px;
  line-height:1.55;
  font-weight:800;
  overflow-x:auto;
}
.math-display{font-family:Georgia, "Times New Roman", serif}
.frac{display:inline-flex;flex-direction:column;vertical-align:middle;text-align:center;margin:0 .15em;line-height:1.05}
.frac .top{border-bottom:2px solid currentColor;padding:0 .18em}
.frac .bottom{padding:0 .18em}
.pow{font-size:.68em;vertical-align:super}
.sub{font-size:.68em;vertical-align:sub}
.sqrt{border-top:2px solid currentColor;padding-left:4px}
.choice{
  display:block;
  margin:11px 0;
  padding:10px;
  border:3px solid #111;
  background:#fff9da;
  cursor:pointer;
  font-size:22px;
}
.choice input{transform:scale(1.3);margin-right:10px}
.answer-area{margin-top:18px}
#answerInput{
  width:100%;
  min-height:62px;
  padding:12px;
  font-size:24px;
  border:4px solid #111;
  background:#f9f1d0;
  color:#111;
}
.keypad{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}
.keypad button{padding:8px 10px;border:3px solid #111;background:#444;color:white;font-weight:900;cursor:pointer}
.feedback{font-size:22px;font-weight:900;margin-top:14px;min-height:32px}
.feedback.good{color:#9eff78}
.feedback.bad{color:#ff8c7b}
.reward-pop{
  position:fixed;
  pointer-events:none;
  font-size:32px;
  font-weight:900;
  color:#ffe35b;
  text-shadow:3px 3px 0 #111;
  animation:popUp 1s ease-out forwards;
}
@keyframes popUp{
  from{opacity:1;transform:translateY(0) scale(.8)}
  to{opacity:0;transform:translateY(-75px) scale(1.25)}
}
.help-box{
  background:#263321;
  border:4px solid #111;
  box-shadow:0 7px 0 #070707;
  padding:15px;
}
.help-title{font-size:22px;font-weight:900;margin-bottom:10px}
.hint-line{
  background:#efe7c4;
  color:#111;
  border:3px solid #111;
  padding:10px;
  margin:8px 0;
  font-size:17px;
  font-family:"Trebuchet MS", Verdana, sans-serif;
}
.solution-line{background:#ffe27a}
.progress-blocks{display:flex;gap:8px;margin:12px 0}
.block{
  width:32px;height:32px;background:#1b1b1b;border:3px solid #111;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.1);
}
.block.filled{background:#3fae3a}
.notice{color:#ffe998;font-weight:800}
.inventory{display:flex;gap:10px;flex-wrap:wrap}
.item{
  border:3px solid #111;background:#252525;padding:10px 12px;min-width:120px;text-align:center;
  opacity:.5;
}
.item.unlocked{opacity:1;background:#3b3b3b}
.footer-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}

.card h3 + .inventory{margin-top:8px}


/* V6.3 Spielübersicht */
.hero-profile{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:16px;
  align-items:stretch;
}
@media(max-width:850px){.hero-profile{grid-template-columns:1fr}}

.rank-hero{
  background:linear-gradient(180deg,#384735,#2b2b2b);
  border:4px solid #111;
  box-shadow:0 7px 0 #070707;
  padding:18px;
}
.rank-title{
  font-size:34px;
  font-weight:900;
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:8px;
}
.rank-sub{
  color:#e7dfb8;
  font-weight:800;
  margin:8px 0 14px;
}
.next-goal{
  background:#efe7c4;
  color:#111;
  border:3px solid #111;
  padding:12px;
  font-weight:900;
  margin-top:12px;
}
.rank-progress-wrap{
  border:4px solid #111;
  background:#171717;
  height:30px;
  box-shadow:inset 0 3px 0 #000;
}
.rank-progress-fill{
  height:100%;
  background:linear-gradient(90deg,#55bb3f,#c9ef5a);
  transition:width .45s ease;
}
.rank-path{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:14px;
}
.rank-node{
  min-width:76px;
  text-align:center;
  border:3px solid #111;
  background:#252525;
  padding:8px 6px;
  opacity:.45;
  box-shadow:0 4px 0 #111;
}
.rank-node.done{opacity:1;background:#354b31}
.rank-node.current{opacity:1;background:#7a5d13;color:#fff4b6;transform:translateY(-2px)}
.rank-arrow{opacity:.55;font-weight:900}

.quest-card{
  background:#263321;
  border:4px solid #111;
  box-shadow:0 7px 0 #070707;
  padding:16px;
}
.quest-card h3{margin-top:0}
.inventory-compact{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
@media(max-width:600px){.inventory-compact{grid-template-columns:repeat(2,1fr)}}
.tool-slot{
  border:3px solid #111;
  background:#252525;
  padding:10px 8px;
  text-align:center;
  min-height:86px;
  opacity:.42;
}
.tool-slot.unlocked{opacity:1;background:#3b3b3b}
.tool-slot .tool-icon{font-size:24px}

.world-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:12px;
}
@media(max-width:850px){.world-grid{grid-template-columns:1fr}}
.world-card{
  border:3px solid #111;
  background:linear-gradient(180deg,#3b3b3b,#292929);
  box-shadow:0 5px 0 #111;
  padding:12px;
}
.world-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-weight:900;
  font-size:19px;
}
.stars{font-size:20px;letter-spacing:2px;color:#ffe06a;text-shadow:2px 2px 0 #111}
.next-mastery{color:#e7dfb8;margin-top:8px;font-weight:800}
.mastery-bar-wrap{
  margin-top:8px;
  height:18px;
  border:3px solid #111;
  background:#171717;
  box-shadow:inset 0 2px 0 #000;
}
.mastery-bar{
  height:100%;
  background:linear-gradient(90deg,#53bd3e,#b9ef52);
  transition:width .4s ease;
}

/* V6.3 echter Bruch-Editor */
.fraction-editor{
  display:none;
  margin-top:10px;
  border:4px solid #111;
  background:#f9f1d0;
  color:#111;
  padding:12px;
}
.fraction-editor.active{display:block}
.frac-input-box{
  display:inline-flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  margin-right:12px;
  vertical-align:middle;
}
.frac-input-box input{
  width:120px;
  text-align:center;
  font-size:22px;
  font-weight:900;
  border:3px solid #111;
  background:#fff9dc;
  padding:6px;
}
.frac-line{
  height:3px;
  background:#111;
  width:120px;
}
.frac-actions{
  display:inline-flex;
  gap:8px;
  flex-wrap:wrap;
  vertical-align:middle;
}
.frac-help{
  margin-top:8px;
  color:#333;
  font-weight:800;
}


/* V6.5: Random-Mine im V6.3-Stil, kein altes Dashboard */
.random-card-v63{
  background:linear-gradient(180deg,#514016,#2c2c2c);
  border:4px solid #111;
  box-shadow:0 7px 0 #070707;
  padding:18px;
  margin-bottom:18px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:16px;
  align-items:center;
}
@media(max-width:760px){.random-card-v63{grid-template-columns:1fr}}
.random-card-v63 h3{
  margin:0 0 6px;
  font-size:28px;
  text-shadow:2px 2px 0 #111;
}
.random-card-v63 p{
  margin:0;
  color:#f3e8bd;
  font-weight:800;
}
.resource-pill{
  display:inline-block;
  margin:8px 5px 0 0;
  padding:6px 9px;
  border:3px solid #111;
  background:#efe7c4;
  color:#111;
  font-weight:900;
  box-shadow:0 3px 0 #111;
}
.ultra-tag{
  display:inline-block;
  background:#2b143f;
  color:#ffd6ff;
  border:3px solid #111;
  padding:5px 8px;
  margin-left:6px;
  font-weight:900;
}


/* V6.6 World-only main page */
.main-worlds{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}
@media(max-width:850px){.main-worlds{grid-template-columns:1fr}}

.random-hero{
  background:
    radial-gradient(circle at 20% 20%, rgba(255,235,120,.20), transparent 28%),
    linear-gradient(180deg,#5d4615,#2c2c2c);
  border:5px solid #111;
  box-shadow:0 9px 0 #060606;
  padding:22px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
}
@media(max-width:760px){.random-hero{grid-template-columns:1fr}}
.random-hero h2{
  font-size:34px;
  margin:0 0 8px;
  text-shadow:3px 3px 0 #111;
}
.random-hero p{
  color:#f2e7bb;
  font-weight:900;
  margin:0 0 10px;
}
.reward-strip{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}
.reward-chip{
  border:3px solid #111;
  background:#efe7c4;
  color:#111;
  padding:6px 9px;
  font-weight:900;
  box-shadow:0 3px 0 #111;
}

.world-main-card{
  border:4px solid #111;
  background:linear-gradient(180deg,#414141,#292929);
  box-shadow:0 7px 0 #070707;
  padding:16px;
  cursor:pointer;
  transition:filter .12s, transform .08s;
  position:relative;
  overflow:hidden;
}
.world-main-card:hover{filter:brightness(1.12);transform:translateY(-2px)}
.world-main-card:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(135deg, transparent 0 55%, rgba(255,255,255,.07) 56% 58%, transparent 59%);
}
.world-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  font-size:23px;
  font-weight:900;
  margin-bottom:8px;
}
.material-level{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:3px solid #111;
  background:#efe7c4;
  color:#111;
  padding:5px 8px;
  box-shadow:0 3px 0 #111;
}
.world-desc{color:#e7dfb8;font-weight:800;margin-bottom:10px}
.material-bar-wrap{
  border:4px solid #111;
  background:#171717;
  height:26px;
  box-shadow:inset 0 3px 0 #000;
}
.material-bar-fill{
  height:100%;
  background:linear-gradient(90deg,#55bb3f,#c9ef5a);
}
.next-material{
  margin-top:9px;
  font-weight:900;
  color:#ffe99a;
}
.total-line{
  margin-top:10px;
  color:#e9e2bd;
  font-weight:900;
}

.recipe-book{
  background:linear-gradient(180deg,#5d4326,#2d2114);
  border:4px solid #111;
  box-shadow:0 7px 0 #070707;
  padding:15px;
}
.recipe-book .help-title{
  font-size:25px;
}
.recipe-page{
  background:#f0dfaa;
  color:#1b1308;
  border:3px solid #111;
  padding:10px;
  margin:8px 0;
  font-size:17px;
  font-family:"Trebuchet MS", Verdana, sans-serif;
}
.recipe-solution{background:#ffe27a}

.reward-toast{
  position:fixed;
  left:50%;
  top:120px;
  transform:translateX(-50%);
  z-index:9999;
  min-width:min(560px, 90vw);
  background:linear-gradient(180deg,#efe7c4,#d6bd74);
  color:#111;
  border:5px solid #111;
  box-shadow:0 10px 0 #050505;
  padding:20px;
  text-align:center;
  font-weight:900;
  animation:toastIn .25s ease-out;
}
.reward-toast h2{
  margin:0 0 10px;
  font-size:31px;
  color:#111;
  text-shadow:none;
}
.reward-toast .big-reward{
  font-size:27px;
  margin:8px 0;
}
.reward-toast .level-up{
  margin-top:10px;
  padding:10px;
  border:3px solid #111;
  background:#fff1a9;
}
@keyframes toastIn{
  from{opacity:0; transform:translateX(-50%) translateY(-20px) scale(.95)}
  to{opacity:1; transform:translateX(-50%) translateY(0) scale(1)}
}


/* V6.7 cleanup */
.random-hero .pixel-btn{
  font-size:20px;
  padding:18px 26px;
}
.material-big{
  font-size:20px;
  padding:8px 12px;
}
.material-holz .material-bar-fill{background:linear-gradient(90deg,#8a5429,#c38a4a)}
.material-stein .material-bar-fill{background:linear-gradient(90deg,#777,#c9c9c9)}
.material-eisen .material-bar-fill{background:linear-gradient(90deg,#9aa0a6,#eef3f7)}
.material-gold .material-bar-fill{background:linear-gradient(90deg,#c89418,#ffe06a)}
.material-diamant .material-bar-fill{background:linear-gradient(90deg,#16a7c4,#80f3ff)}
.material-netherite .material-bar-fill{background:linear-gradient(90deg,#2c1f2e,#77606f)}
.world-desc{display:none}


/* V6.11 Fortschrittspfad */
.progress-path-panel{
  background:linear-gradient(180deg,#30372e,#242424);
  border:5px solid #111;
  box-shadow:0 8px 0 #060606;
  padding:18px;
}
.progress-path-panel h2{
  margin:0 0 12px;
  font-size:27px;
  text-shadow:2px 2px 0 #111;
}
.progress-path{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:10px;
}
@media(max-width:900px){.progress-path{grid-template-columns:repeat(3,1fr)}}
@media(max-width:520px){.progress-path{grid-template-columns:repeat(2,1fr)}}
.path-step{
  position:relative;
  border:4px solid #111;
  background:#222;
  padding:12px 8px;
  min-height:116px;
  text-align:center;
  box-shadow:0 5px 0 #070707;
  opacity:.78;
}
.path-step.unlocked{
  opacity:1;
  background:linear-gradient(180deg,#3d4a35,#262626);
}
.path-step .path-icon{
  font-size:32px;
  display:block;
  margin-bottom:6px;
}
.path-step .path-name{
  font-weight:900;
  font-size:18px;
  color:#fff3c0;
}
.path-step .path-count{
  margin-top:6px;
  color:#ddd2a9;
  font-weight:800;
  font-size:13px;
}
.path-step .check{
  position:absolute;
  top:5px;
  right:7px;
  font-size:18px;
}
.path-step.holz{border-color:#7a4a25}
.path-step.stein{border-color:#777}
.path-step.eisen{border-color:#bfc7ce}
.path-step.gold{border-color:#d7a625}
.path-step.diamant{border-color:#38dff5}
.path-step.netherite{border-color:#5b4258}
.path-note{
  margin-top:12px;
  color:#f2e7bb;
  font-weight:900;
}

.recipe-book p{
  background:rgba(255,238,171,.12);
  border:2px solid rgba(255,238,171,.35);
  padding:8px;
}


/* V6.13 Rezeptbuch-Regeln */
.recipe-rules{
  background:rgba(255,238,171,.12);
  border:2px solid rgba(255,238,171,.35);
  padding:10px;
  margin:10px 0 14px;
  line-height:1.35;
  color:#fff4c9;
  font-weight:900;
}
.recipe-rules div{margin:3px 0}
.recipe-book p{display:none}

.task-instruction{
  font-family:"Trebuchet MS", Verdana, sans-serif;
  font-size:19px;
  color:#666;
  margin-bottom:8px;
}


/* V6.14 Hochzahl-Editor */
.power-editor{
  display:none;
  margin-top:10px;
  border:4px solid #111;
  background:#f9f1d0;
  color:#111;
  padding:12px;
}
.power-editor.active{display:block}
.power-input-box{
  display:inline-flex;
  gap:8px;
  vertical-align:middle;
  align-items:center;
}
.power-input-box input{
  width:105px;
  text-align:center;
  font-size:22px;
  font-weight:900;
  border:3px solid #111;
  background:#fff9dc;
  padding:6px;
}
.power-preview{
  display:inline-block;
  min-width:80px;
  margin:0 12px;
  font-size:30px;
  font-family:Georgia, "Times New Roman", serif;
  vertical-align:middle;
}

.level-up{line-height:1.35;}

.dragon-profile{
  background:linear-gradient(180deg,#341e3f,#1b1b1b);
}
.dragon-badge{
  display:flex;
  gap:18px;
  align-items:center;
  border:4px solid #111;
  background:linear-gradient(180deg,#4a235d,#27142f);
  box-shadow:0 7px 0 #050505;
  padding:18px;
}
.dragon-icon{
  font-size:58px;
  filter:drop-shadow(3px 3px 0 #000);
}
.dragon-badge h2{
  margin:0 0 6px;
  font-size:32px;
  color:#ffd6ff;
}
.dragon-badge p{
  margin:0;
  color:#f5e4ff;
  font-weight:900;
}
.level-up{line-height:1.35;}

/* V6.18 gezielte UI-Ergänzung: Level-Badge und eigene Mine-Dialoge */
.task-level-card{
  display:flex;
  align-items:center;
  gap:10px;
  width:max-content;
  max-width:100%;
  margin:10px 0 14px;
  padding:9px 12px;
  border:4px solid #111;
  background:linear-gradient(180deg,#efe7c4,#c9aa58);
  color:#111;
  box-shadow:0 5px 0 #070707;
  font-weight:900;
}
.recipe-book .task-level-card{
  width:auto;
  margin:8px 0 12px;
  background:linear-gradient(180deg,#f2df9b,#b98235);
}
.task-level-icon{font-size:30px;line-height:1}
.task-level-label{font-size:13px;text-transform:uppercase;letter-spacing:.8px;color:#3b2a12}
.task-level-name{font-size:24px}
.task-level-card.holz{background:linear-gradient(180deg,#c89652,#6f3f1c);color:#fff4cc}
.task-level-card.stein{background:linear-gradient(180deg,#b9b9b9,#5d5d5d);color:#fff}
.task-level-card.eisen{background:linear-gradient(180deg,#d8d8d8,#8a8a8a);color:#111}
.task-level-card.gold{background:linear-gradient(180deg,#ffe27a,#c68113);color:#111}
.task-level-card.diamant{background:linear-gradient(180deg,#8ff3ff,#1190a0);color:#06262b}
.task-level-card.netherite{background:linear-gradient(180deg,#5b4b5f,#1d1720);color:#ffe6ff}

.mine-dialog-overlay{
  position:fixed;
  inset:0;
  z-index:20000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.62);
}
.mine-dialog-box{
  width:min(620px,94vw);
  background:linear-gradient(180deg,#efe7c4,#d6bd74);
  color:#111;
  border:5px solid #111;
  box-shadow:0 12px 0 #050505;
  padding:22px;
  font-weight:900;
}
.mine-dialog-overlay.warning .mine-dialog-box{background:linear-gradient(180deg,#fff0a8,#d69b3b)}
.mine-dialog-overlay.danger .mine-dialog-box{background:linear-gradient(180deg,#ffd2bd,#d55a32)}
.mine-dialog-title{
  font-size:32px;
  margin-bottom:12px;
  text-shadow:1px 1px 0 #fff4cf;
}
.mine-dialog-body p{margin:10px 0;line-height:1.35}
.mine-dialog-body ul{margin:8px 0 12px 22px;padding:0}
.mine-dialog-body li{margin:5px 0}
.mine-dialog-level{
  display:inline-block;
  margin:6px 0 10px;
  padding:7px 10px;
  border:3px solid #111;
  background:#2d2114;
  color:#ffe99a;
  box-shadow:0 4px 0 #070707;
}
.creeper-line{
  background:rgba(255,255,255,.35);
  border:3px solid #111;
  padding:10px;
}
.mine-dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:12px;
  margin-top:18px;
}
.pixel-btn.light{background:#efe7c4;color:#111}
.pixel-btn.danger{background:#8b1f1f;color:#fff}

/* Schatztruhe */
.treasure-hero{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border:4px solid #111;
  background:linear-gradient(180deg,#5b371d,#2b1b0d);
  box-shadow:0 7px 0 #070707;
  padding:18px;
}
.treasure-hero h2{margin:0 0 8px;font-size:30px;text-shadow:3px 3px 0 #111}
.treasure-hero p{margin:0;color:#f2e7bb;font-weight:900}
.treasure-list{display:grid;gap:14px;margin-top:16px}
.treasure-entry{
  border:4px solid #111;
  background:linear-gradient(180deg,#efe7c4,#d8c58c);
  color:#111;
  box-shadow:0 6px 0 #070707;
  padding:14px;
}
.treasure-meta{
  font-weight:900;
  color:#5a4120;
  margin-bottom:8px;
  text-transform:uppercase;
  letter-spacing:.4px;
}
.treasure-question{
  white-space:pre-wrap;
  font-size:20px;
  font-weight:900;
  line-height:1.35;
  margin-bottom:10px;
}
.treasure-answer{
  display:inline-block;
  border:3px solid #111;
  background:#2f2f2f;
  color:#fff4bf;
  box-shadow:0 3px 0 #111;
  padding:8px 10px;
  font-size:18px;
  font-weight:900;
}
@media(max-width:760px){.treasure-hero{flex-direction:column;align-items:flex-start}.treasure-hero .pixel-btn{width:100%}}


.task-mob-card{
  margin-top:16px;
  border:3px solid #111;
  background:linear-gradient(180deg, rgba(45,45,45,.94), rgba(24,24,24,.96));
  box-shadow:0 5px 0 #0a0a0a;
  padding:12px;
  text-align:center;
  min-height:180px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.task-mob-label{
  font-weight:900;
  color:#ffe28a;
  text-shadow:2px 2px 0 #111;
  margin-bottom:8px;
  letter-spacing:.3px;
}
.task-mob-img{
  max-width:100%;
  max-height:190px;
  object-fit:contain;
  filter:drop-shadow(0 10px 8px rgba(0,0,0,.65));
}
@media(max-width:760px){
  .minemind-banner{height:170px}
  .task-mob-img{max-height:150px}
}

/* V6.19: Lösungsübersicht nach korrekt gelöster Aufgabe */
.mine-dialog-overlay.success .mine-dialog-box{
  background:linear-gradient(180deg,#d9ffd1,#75c95f);
}
.solved-review-question,
.solved-review-answer{
  background:rgba(255,255,255,.42);
  border:3px solid #111;
  padding:10px;
  margin:10px 0;
}
.solved-review-steps{
  margin:10px 0 12px 28px;
  padding:0;
}
.solved-review-steps li{
  margin:8px 0;
  line-height:1.35;
}

.solved-reward-box{
  margin:10px 0 14px;
  padding:10px 12px;
  border:2px solid rgba(255,255,255,.45);
  border-radius:10px;
  background:rgba(255,255,255,.12);
}
.dialog-level-note{
  margin-top:8px;
  font-weight:800;
}

/* V6.20: Pruefungsblock-Darstellung */
.exam-block{
  margin-top:14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.exam-part{
  display:flex;
  align-items:baseline;
  gap:12px;
  padding:4px 0;
}
.exam-label{
  min-width:34px;
  font-weight:900;
}
.task-instruction{
  display:block;
  margin-top:8px;
  line-height:1.35;
}

/* V6.23: Dialog bleibt gleich gross und Inhalt scrollt */
.mine-dialog-box{
  max-height:86vh;
  display:flex;
  flex-direction:column;
}
.mine-dialog-body{
  overflow-y:auto;
  max-height:calc(86vh - 150px);
  padding-right:10px;
}
.mine-dialog-actions{
  flex-shrink:0;
}

/* V6.23: Mehrteilige Prüfungsblöcke mit einzelnen Antwortfeldern */
.block-answer-area{
  margin-top:18px;
}
.block-answer-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:10px;
  margin-bottom:10px;
}
.block-answer-row{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:22px;
  font-weight:900;
}
.block-answer-row span{
  min-width:34px;
}
.block-answer-input{
  width:100%;
  padding:10px;
  font-size:22px;
  border:4px solid #111;
  background:#f9f1d0;
  color:#111;
  font-family:inherit;
}

/* Server-Version: Schülercode-Login */
.login-panel{max-width:760px;margin:40px auto;}
.login-box{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:18px;}
.student-code-input{font-size:20px;padding:14px 16px;border:3px solid #2b2b2b;border-radius:10px;min-width:260px;background:#fff;color:#111;}
.login-message{margin-top:14px;font-weight:700;color:#ffd34d;}
.student-bar{display:flex;justify-content:space-between;gap:12px;align-items:center;flex-wrap:wrap;}


/* V1.3: kompaktere Schatztruhe und klarere Lösungswege */
.treasure-list{gap:10px;margin-top:12px}
.treasure-entry{padding:10px 12px;border-width:3px;box-shadow:0 4px 0 #070707}
.treasure-entry-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:13px;font-weight:900;text-transform:uppercase;color:#5a4120;letter-spacing:.25px}
.treasure-pill{background:#3a3020;color:#fff4bf;border:2px solid #111;padding:3px 7px;box-shadow:0 2px 0 #111}
.treasure-topic{color:#4b381c}
.treasure-date{margin-left:auto;color:#6c6040;font-size:12px;text-transform:none}
.treasure-question{font-size:15px;line-height:1.22;margin:6px 0 8px;white-space:pre-line;font-weight:800;max-height:105px;overflow:auto;background:rgba(255,255,255,.22);border:2px solid rgba(0,0,0,.25);padding:7px}
.treasure-answer{font-size:14px;padding:5px 8px;border-width:2px;box-shadow:0 2px 0 #111}
.solved-review-steps{margin:10px 0 12px 0;padding:0;list-style:none}
.solved-task-group{border:2px solid rgba(0,0,0,.55);background:rgba(255,255,255,.22);padding:8px 10px;margin:8px 0}
.solved-task-title{font-weight:900;color:#183d10;margin-bottom:4px;text-transform:uppercase;letter-spacing:.25px}
.solved-task-expression{font-weight:900;margin-bottom:6px}
.solved-step-row{display:flex;gap:8px;align-items:flex-start;margin:5px 0;line-height:1.28}
.step-arrow{font-weight:900;color:#174a0d;min-width:18px}
.solved-step-row .math-display{display:inline}

/* V1.4: einheitlicheres, technisches Schriftbild und ruhigere Aufgabenansicht */
:root{
  --ui-font: "Inter", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
}
body,
button,
input,
textarea,
select,
.panel,
.task-box,
.task-question,
.task-instruction,
.choice,
.recipe-book,
.treasure-entry,
.student-code-input{
  font-family: var(--ui-font) !important;
}
.math-display,
.power-preview{
  font-family: var(--ui-font) !important;
  font-weight: 750;
  letter-spacing: .01em;
}
.task-question{
  font-size: 24px !important;
  line-height: 1.42 !important;
  font-weight: 750 !important;
}
.task-instruction{
  font-size: 18px !important;
  line-height: 1.35 !important;
  font-weight: 700 !important;
}
.task-box h2,
.panel h2{
  font-family: var(--ui-font) !important;
  letter-spacing: .01em;
}
.frac .top{border-bottom-width:2px;}
.pow{font-size:.64em;}

/* V1.5: MineMIND Champions auf der Startseite */
.leaderboard-panel{
  max-width:980px;
  margin:18px auto 40px;
}
.leaderboard-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:16px;
  margin-bottom:12px;
}
.leaderboard-head h2{
  margin:0;
  font-size:28px;
  text-shadow:3px 3px 0 #111;
}
.leaderboard-head p{
  margin:0;
  color:#f2e7bb;
  font-size:14px;
  font-weight:800;
  text-align:right;
}
.leaderboard-box{
  border:4px solid #111;
  background:linear-gradient(180deg,#efe4b6,#d9c783);
  box-shadow:0 5px 0 #070707;
  color:#171717;
}
.leaderboard-loading,
.leaderboard-empty{
  padding:16px;
  font-weight:900;
  color:#4e452b;
}
.leaderboard-scroll{
  overflow-x:auto;
}
.champions-table{
  width:100%;
  border-collapse:collapse;
  min-width:860px;
  font-size:13px;
}
.champions-table th,
.champions-table td{
  border-bottom:2px solid rgba(0,0,0,.28);
  padding:9px 10px;
  text-align:left;
  white-space:nowrap;
}
.champions-table th{
  background:#2f2f2f;
  color:#fff4bf;
  text-transform:uppercase;
  letter-spacing:.3px;
  font-size:12px;
  text-shadow:2px 2px 0 #111;
}
.champions-table tr:last-child td{
  border-bottom:0;
}
.champion-name{
  min-width:150px;
  font-weight:1000;
  color:#1e1e1e;
}
.champion-level{
  font-weight:900;
  color:#2c2517;
}
.champion-level span{
  margin-left:3px;
}
@media(max-width:760px){
  .leaderboard-head{display:block}
  .leaderboard-head p{text-align:left;margin-top:6px}
  .leaderboard-head h2{font-size:24px}
}

/* v1.6: sauberer Zwei-Schritt-Login mit geheimem Zugangscode und öffentlichem Abenteurernamen */
.vertical-login{
  flex-direction:column;
  align-items:stretch;
  gap:10px;
  max-width:360px;
  margin:0 auto;
}
.login-label{
  font-size:.82rem;
  opacity:.86;
  letter-spacing:.02em;
  text-align:left;
}
.vertical-login .pixel-btn{
  width:100%;
}


.mine-task-title{
  font-size: 1.35rem;
  font-weight: 900;
  color: #f7f0c8;
  text-shadow: 2px 2px 0 #000;
  margin-bottom: 14px;
  letter-spacing: .2px;
}


/* V2.9: Custom-Textaufgaben mit mehreren Antworten sauber untereinander */
.custom-text-answer-area .custom-text-answer-grid{
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.custom-text-answer-row{
  display: grid;
  grid-template-columns: 150px minmax(180px, 1fr);
  align-items: center;
  gap: 12px;
}

.custom-text-answer-row span{
  font-weight: 900;
  white-space: normal;
  line-height: 1.2;
}

.custom-text-answer-input{
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (max-width: 700px){
  .custom-text-answer-row{
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
