@font-face { font-family: "Lexend"; font-weight: 100 500; font-display: swap; src: url(fonts/lexend-400.woff2) format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 600 700; font-display: swap; src: url(fonts/lexend-700.woff2) format("woff2"); }
@font-face { font-family: "Lexend"; font-weight: 800 900; font-display: swap; src: url(fonts/lexend-800.woff2) format("woff2"); }

/* Schmiede: Kohle, Eisen, Glut. Artikel: der blau, die rot, das grün, ohne Artikel Eisen. */
:root {
  --bg: #140c09;
  --bg2: #20140e;
  --ink: #f8eee2;
  --muted: #bca796;
  --dim: #7d6a5c;
  --ember: #ff7a1a;
  --ember-hi: #ffb347;
  --gold: #ffc861;
  --hot: #fff3d6;
  --iron: #2a201b;
  --line: rgba(255, 170, 90, 0.16);
  --card: rgba(255, 220, 190, 0.045);
  --der: #3d93ff;
  --die: #ff4a5c;
  --das: #22c97e;
  --stem: #9c8f86;
  --safe-t: max(env(safe-area-inset-top), var(--safe-top, 0px));
  --safe-b: max(env(safe-area-inset-bottom), var(--safe-bottom, 0px));
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); overflow: hidden; }
body {
  font: 16px/1.45 "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(130% 70% at 50% 108%, #4a1d08 0%, #21110a 45%, var(--bg) 75%) fixed, var(--bg);
  touch-action: manipulation; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
#bg, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#fx { z-index: 50; }
#app { position: relative; z-index: 1; height: 100%; max-width: 520px; margin: 0 auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 12px; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }

/* ---------- Bildschirme ---------- */
.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  padding: calc(var(--safe-t) + 12px) 16px calc(var(--safe-b) + 14px);
}
.screen.on { display: flex; animation: screenIn .36s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; padding-bottom: 12px; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.dock { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.center { text-align: center; }
.small { font-size: 13.5px; color: var(--muted); }
.note { margin-top: 12px; font-size: 13.5px; color: var(--muted); text-align: center; white-space: pre-line; }
.lead { color: var(--muted); text-align: center; font-size: 15px; }

/* ---------- Knöpfe ---------- */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 10px 16px; border-radius: 16px;
  background: rgba(255, 230, 210, 0.06); border: 1px solid rgba(255, 200, 160, 0.12);
  font-weight: 600; font-size: 15.5px; letter-spacing: .01em; text-decoration: none;
  transition: transform .12s, background .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary {
  color: #2a1103; border: 0;
  background: linear-gradient(180deg, #ffe2a8 0%, #ffab3d 42%, #e8640f 100%);
  box-shadow: 0 12px 34px -10px rgba(255, 122, 26, .7), inset 0 1px 0 rgba(255, 255, 255, .65), inset 0 -3px 0 rgba(120, 40, 0, .35);
}
.btn.primary::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%) -150% 0 / 250% 100% no-repeat;
  animation: sheen 4.5s ease-in-out infinite;
}
@keyframes sheen { 0%, 70% { background-position: -150% 0; } 100% { background-position: 150% 0; } }
.btn.big { min-height: 60px; font-size: 19px; font-weight: 800; letter-spacing: .04em; }
.btn.ghost { background: transparent; border-color: rgba(255, 200, 160, .16); color: var(--muted); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-only { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; color: var(--muted); }
.icon-only svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-only:active { background: rgba(255, 255, 255, .06); }
.bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.bar h2 { flex: 1; text-align: center; font-size: 19px; font-weight: 700; letter-spacing: .02em; }
.bar-gap { width: 44px; }

/* ---------- Wortblöcke ---------- */
.blk {
  --c1: #7d7068; --c2: #4a3f39; --c3: #2a221e; --glow: #c9b8ab;
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; padding: 4px 3px 5px; color: #fff; text-align: center; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 38%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, .025) 0 2px, rgba(0, 0, 0, .025) 2px 4px),
    linear-gradient(180deg, var(--c1), var(--c2) 60%, var(--c3));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -3px 0 rgba(0, 0, 0, .35), inset 0 0 0 1px rgba(255, 255, 255, .08),
    0 5px 12px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .55);
  transition: transform .15s cubic-bezier(.3, .9, .4, 1), width .15s, height .15s, filter .3s, opacity .2s;
  will-change: transform;
}
.blk.a0 { --c1: #6fb2ff; --c2: #2a6fd6; --c3: #173f86; --glow: #8cc4ff; }
.blk.a1 { --c1: #ff8a8f; --c2: #e0303f; --c3: #861523; --glow: #ff9aa2; }
.blk.a2 { --c1: #5fe3a8; --c2: #17a466; --c3: #0b5c3a; --glow: #7ff0bd; }
.blk .art { position: absolute; top: 3px; left: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; opacity: .78; text-transform: lowercase; }
.blk .ln { display: block; font-weight: 800; line-height: 1.06; letter-spacing: .005em; white-space: nowrap; text-shadow: 0 1px 0 rgba(0, 0, 0, .45), 0 0 10px rgba(0, 0, 0, .2); }
.blk .fg { font-style: normal; color: #ffe08a; text-shadow: 0 0 8px rgba(255, 190, 70, .9), 0 1px 0 rgba(0, 0, 0, .5); }
.blk.comp .ln + .ln { margin-top: 1px; }
.blk .rivet { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .35); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.blk .rivet.r1 { right: 5px; top: 5px; }
.blk .rivet.r2 { right: 5px; bottom: 6px; }
/* Heiß: gerade geschmiedet, kühlt in der Artikelfarbe aus */
.blk.hot { animation: cool 1.1s ease-out both; }
@keyframes cool {
  0% { filter: brightness(2.4) saturate(.25); box-shadow: 0 0 0 2px #fff3d6, 0 0 36px 8px rgba(255, 150, 50, .95); }
  35% { filter: brightness(1.5) saturate(.7); box-shadow: 0 0 0 1px #ffd59a, 0 0 24px 4px rgba(255, 120, 30, .6); }
  100% { filter: none; }
}
.blk.pop .ln { animation: lnPop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes lnPop { from { transform: scale(1.35); } to { transform: none; } }
/* Glühen: Dieser Block passt zum Teil auf dem Amboss */
.blk.glow::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 2px rgba(255, 200, 110, .9), inset 0 0 16px rgba(255, 140, 40, .65);
  animation: ember 1.3s ease-in-out infinite;
}
.blk.glow.reach::after { box-shadow: inset 0 0 0 3px #ffd27a, inset 0 0 22px rgba(255, 140, 40, .95); }
.blk.glow { filter: drop-shadow(0 0 10px rgba(255, 140, 40, .55)); }
@keyframes ember { 50% { opacity: .45; } }
.blk.target { filter: drop-shadow(0 0 16px rgba(255, 190, 90, .95)) brightness(1.15); }
.blk.forging { animation: forgeOut .42s cubic-bezier(.5, 0, .8, .5) both; }
@keyframes forgeOut {
  0% { filter: brightness(1); }
  40% { filter: brightness(2.6) saturate(.2); transform: var(--tf) scale(1.08); }
  100% { filter: brightness(3.2) saturate(0); transform: var(--tf) scale(.2); opacity: 0; }
}
.blk.smash { animation: smash .38s ease-in both; }
@keyframes smash {
  30% { transform: var(--tf) rotate(-6deg) scale(1.05); }
  100% { transform: var(--tf) rotate(14deg) scale(.6) translateY(30px); opacity: 0; filter: grayscale(1) brightness(.6); }
}
.blk.cold { filter: grayscale(.85) brightness(.55); transition: filter .5s; }
.hammer-mode .blk { animation: wobble .5s ease-in-out infinite; cursor: crosshair; }
@keyframes wobble { 25% { rotate: -1.5deg; } 75% { rotate: 1.5deg; } }

/* ---------- Start ---------- */
#s-start { align-items: center; justify-content: center; gap: 8px; text-align: center; overflow-y: auto; }
.hero { position: relative; width: 220px; height: 128px; flex: none; margin-bottom: 2px; }
.hero-glow { position: absolute; left: 50%; top: 52%; width: 260px; height: 160px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 120, 30, .45), transparent); filter: blur(4px); animation: glowPulse 3.2s ease-in-out infinite; }
@keyframes glowPulse { 50% { opacity: .65; } }
.hero-anvil { position: absolute; left: 10px; bottom: 0; width: 200px; height: 100px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .6)); }
.hero-ingot {
  position: absolute; left: 60px; top: 15px; width: 96px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: 19px; letter-spacing: .03em; color: #5a1d00;
  background: linear-gradient(180deg, #fff6d8, #ffc35c 45%, #ff7a1a 100%);
  box-shadow: 0 0 22px 6px rgba(255, 140, 40, .75), inset 0 1px 0 #fff;
  
}
@keyframes ingot { 0%, 100% { filter: brightness(1); } 46% { filter: brightness(1); } 50% { filter: brightness(1.5); transform: scaleY(.9) scaleX(1.04); } 60% { transform: none; } }
.hero-hammer { position: absolute; left: 118px; top: -30px; width: 74px; height: 74px; transform-origin: 82% 92%; }
.hero.run .hero-ingot { animation: ingot 3.2s ease-in-out infinite; }
.hero.run .hero-hammer { animation: strike 3.2s cubic-bezier(.6, 0, .4, 1) infinite; }
@keyframes strike { 0%, 100% { transform: rotate(10deg); } 38% { transform: rotate(-34deg); } 50% { transform: rotate(14deg); } 56% { transform: rotate(6deg); } 70% { transform: rotate(10deg); } }
.logo { display: flex; flex-direction: column; line-height: .9; font-weight: 800; font-size: clamp(40px, 13.5vw, 64px); letter-spacing: .06em; }
.logo span {
  background: linear-gradient(180deg, #fff6dc 0%, #ffcd6b 38%, #ff7a1a 70%, #a8340a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px rgba(255, 110, 20, .45)) drop-shadow(0 3px 0 rgba(60, 15, 0, .6));
}
.logo span:last-child { font-size: .62em; letter-spacing: .2em; margin-top: 4px; }
.tagline { color: var(--muted); font-size: 15px; margin: 4px 0 8px; max-width: 320px; }
.wod {
  width: 100%; max-width: 360px; display: grid; grid-template-columns: 1fr; gap: 1px; text-align: center; padding: 10px 14px;
  border-radius: 16px; background: linear-gradient(180deg, rgba(255, 170, 90, .1), rgba(255, 170, 90, .03)); border: 1px solid var(--line);
}
.wod-label { font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-hi); font-weight: 700; }
.wod-word { font-size: 21px; font-weight: 800; }
.wod-word .ar { font-weight: 600; margin-right: .3em; }
.wod-parts { font-size: 13px; color: var(--muted); }
.start-buttons { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.btn.daily { justify-content: flex-start; gap: 12px; text-align: left; padding-left: 14px; }
.btn.daily .col { display: flex; flex-direction: column; line-height: 1.2; flex: 1; }
.btn.daily small { color: var(--muted); font-weight: 400; font-size: 13px; }
.btn.daily .check { color: var(--das); font-weight: 800; font-size: 20px; }
.flame { width: 16px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3c4, #ffb347 35%, #ff5a0a 70%, transparent 72%);
  filter: drop-shadow(0 0 6px #ff7a1a); animation: flick 1.1s ease-in-out infinite alternate; }
@keyframes flick { to { transform: scaleY(1.12) rotate(-3deg); filter: drop-shadow(0 0 10px #ff9a3a); } }
.task { width: 100%; max-width: 360px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px;
  border: 1px dashed rgba(255, 200, 140, .22); text-align: left; margin-top: 4px; }
.task-ico { flex: none; width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.task.done .task-ico { background: var(--das); box-shadow: 0 0 8px var(--das); }
.task-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.task-txt small { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.task-txt b { font-size: 14px; font-weight: 600; }
.task-prog { font-weight: 800; color: var(--gold); font-size: 14px; }
.task.done .task-prog { color: var(--das); }
.start-nav { display: flex; gap: 4px; margin-top: 10px; }
.icon-btn { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 78px; padding: 8px 4px; border-radius: 14px; color: var(--muted); font-size: 12px; }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:active { background: rgba(255, 255, 255, .06); }
.icon-btn.owned svg { fill: var(--gold); stroke: var(--gold); }

/* ---------- Wortwelten ---------- */
.worlds { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.worlds li > button {
  width: 100%; display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; text-align: left;
  padding: 10px 14px 10px 10px; border-radius: 18px; background: var(--card); border: 1px solid rgba(255, 255, 255, .06);
  transition: border-color .2s, box-shadow .2s, transform .12s;
}
.worlds li > button:active { transform: scale(.985); }
.worlds li.sel > button { border-color: var(--ember-hi); box-shadow: 0 0 0 1px var(--ember-hi), 0 12px 30px -14px var(--ember); background: rgba(255, 170, 90, .08); }
.w-ico { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: radial-gradient(circle at 50% 35%, rgba(255, 180, 90, .25), rgba(255, 120, 30, .05) 70%); border: 1px solid var(--line); }
.w-ico svg { width: 32px; height: 32px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(255, 170, 60, .6)); }
.worlds .nm { font-weight: 700; font-size: 16.5px; }
.worlds .q { font-size: 12.5px; color: var(--muted); line-height: 1.3; margin-top: 1px; }
.worlds .meter { margin-top: 6px; }
.worlds .side { text-align: right; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.worlds .lock { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--dim); }
.worlds .lock svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.worlds li.locked > button { opacity: .6; }
.stars-s { display: flex; gap: 2px; }
.stars-s svg { width: 15px; height: 15px; fill: rgba(255, 255, 255, .12); }
.stars-s svg.on { fill: var(--gold); filter: drop-shadow(0 0 4px rgba(255, 200, 97, .7)); }
.meter { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #ff7a1a, #ffc861); transition: width .6s; }
.meister { width: 100%; margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .07); background: var(--card); }
.meister span:first-child { display: flex; flex-direction: column; }
.meister small { color: var(--muted); font-size: 12.5px; }
.meister.locked { opacity: .55; }

/* ---------- Runde ---------- */
#s-play { padding-left: 10px; padding-right: 10px; gap: 6px; }
.hud { display: flex; align-items: center; gap: 8px; }
.hud-mid { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.hud-world { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.heat { width: 120px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.heat i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffb347, #ff5a0a, #ff2a00); box-shadow: 0 0 8px #ff7a1a; transition: width .5s; }
.hud-score { min-width: 92px; text-align: right; display: flex; flex-direction: column; line-height: 1.05; padding-right: 4px; }
.hud-score b { font-size: 26px; font-weight: 800; background: linear-gradient(180deg, #fff3d6, #ffc861 60%, #ff9a3a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hud-score b.bump { animation: bump .3s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.hud-score small { font-size: 11.5px; color: var(--muted); }
.ribbon { height: 30px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.ribbon .rb { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; background: rgba(20, 10, 6, .75); border: 1px solid var(--line); animation: rbIn .5s cubic-bezier(.2, 1.4, .4, 1) both; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ribbon .rb.out { animation: rbOut .4s both; }
@keyframes rbIn { from { opacity: 0; transform: translateY(8px) scale(.9); } }
@keyframes rbOut { to { opacity: 0; transform: translateY(-8px); } }
.ribbon .ar { font-weight: 800; }
.ribbon .en { font-weight: 400; color: var(--muted); font-size: 13px; }
.ribbon .tag { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: #2a1103; background: var(--gold); border-radius: 6px; padding: 1px 6px; }
.ribbon .tag.done { background: var(--das); }
.ar0 { color: #7ab8ff; } .ar1 { color: #ff7d89; } .ar2 { color: #5fe3a8; }

.board-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; }
.board {
  position: relative; width: 100%; max-width: 440px; height: 100%; border-radius: 18px; overflow: hidden; touch-action: none;
  background:
    radial-gradient(120% 50% at 50% 0%, rgba(255, 120, 30, .16), transparent 60%),
    linear-gradient(180deg, #1d1410, #120b08);
  box-shadow: inset 0 0 0 1px rgba(255, 170, 90, .14), inset 0 18px 30px -18px rgba(255, 110, 20, .55), 0 18px 40px rgba(0, 0, 0, .55);
}
.board::before { /* Glut an der Decke: dort hängen die Teile */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, transparent, #ff7a1a, #ffc861, #ff7a1a, transparent);
  box-shadow: 0 0 16px 3px rgba(255, 120, 30, .7); opacity: .85; animation: glowPulse 2.6s ease-in-out infinite;
}
.lanes { position: absolute; inset: 0; display: flex; }
.lane { flex: 1; position: relative; border-right: 1px solid rgba(255, 190, 130, .05); transition: background .15s; }
.lane:last-child { border-right: 0; }
.lane.aim { background: linear-gradient(0deg, rgba(255, 140, 40, .22), rgba(255, 140, 40, .04) 70%, transparent); }
.lane.full { background: repeating-linear-gradient(135deg, rgba(255, 60, 60, .06) 0 8px, transparent 8px 16px); }
.aim-ghost { position: absolute; left: 0; top: 0; border-radius: 12px; border: 2px dashed rgba(255, 200, 120, .55); background: rgba(255, 160, 60, .08); pointer-events: none; transition: transform .1s; }
.blocks { position: absolute; inset: 0; }
.preview { min-height: 26px; text-align: center; font-size: 14.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview .res { color: var(--ink); font-weight: 800; }
.preview .arrow { color: var(--ember-hi); margin: 0 6px; }

.forge-bar { display: grid; grid-template-columns: 76px 1fr 76px; align-items: end; gap: 6px; height: 128px; flex: none; }
.tool { position: relative; height: 92px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: rgba(255, 220, 190, .05); border: 1px solid rgba(255, 200, 160, .12); transition: transform .12s, box-shadow .2s, opacity .2s; }
.tool:active { transform: scale(.95); }
.hammer-btn svg { width: 44px; height: 44px; transform: rotate(-20deg); }
.hammer-btn.on { box-shadow: 0 0 0 2px var(--ember-hi), 0 0 24px rgba(255, 140, 40, .7); background: rgba(255, 140, 40, .14); }
.hammer-btn.empty { opacity: .4; }
.pips { display: flex; gap: 4px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.pips i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.anvil-zone { position: relative; height: 128px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; cursor: pointer; }
.anvil { width: 176px; height: 88px; margin-bottom: -6px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .7)); }
.cur-slot { position: absolute; left: 50%; bottom: 66px; transform: translateX(-50%); width: 104px; height: 56px; }
.cur-slot .blk { position: relative; width: 100%; height: 100%; }
.cur-slot .blk.idle { animation: breathe 2.2s ease-in-out infinite; }
@keyframes breathe { 50% { filter: brightness(1.12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 18px rgba(255, 150, 60, .45), 0 0 0 1px rgba(0, 0, 0, .55); } }
.cur-trans { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.next-btn .next-slot { position: relative; width: 62px; height: 40px; }
.next-btn .next-slot .blk { position: relative; width: 100%; height: 100%; border-radius: 9px; }
.next-btn .swap-ico svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.next-btn.swapping .next-slot { animation: swapHop .3s; }
@keyframes swapHop { 50% { transform: translateY(-10px) scale(.9); } }
.msg { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none; text-align: center;
  font-size: 22px; font-weight: 800; white-space: nowrap; opacity: 0; }
.msg.on { animation: msgPop 1.2s ease-out both; }
.msg.warn { font-size: 16px; padding: 8px 14px; border-radius: 12px; background: rgba(30, 12, 8, .85); border: 1px solid rgba(255, 90, 60, .5); white-space: normal; width: 80%; }
.msg.chain { color: #ffd27a; text-shadow: 0 0 18px #ff7a1a, 0 2px 0 #6a2200; font-size: 30px; }
@keyframes msgPop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70%); } }
.float-pts { position: fixed; z-index: 40; pointer-events: none; font-weight: 800; font-size: 17px; color: #ffe2a8; text-shadow: 0 0 10px #ff7a1a, 0 1px 0 #5a1d00;
  transform: translate(-50%, -50%); animation: floatUp 1s ease-out both; }
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, -30%) scale(.7); } 20% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); } to { opacity: 0; transform: translate(-50%, -160%); } }
.shake { animation: shake .28s; }
@keyframes shake { 20% { transform: translate(-3px, 1px); } 40% { transform: translate(3px, -1px); } 60% { transform: translate(-2px, 0); } 80% { transform: translate(2px, 1px); } }

/* ---------- Ergebnis ---------- */
.res-head { text-align: center; padding: 18px 0 6px; }
.res-head h2 { font-size: 38px; font-weight: 800; background: linear-gradient(180deg, #fff6dc, #ffc861 45%, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 110, 20, .4)); }
.res-points { font-size: 22px; font-weight: 700; margin-top: 2px; }
.res-badge { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #2a1103; background: linear-gradient(180deg, #ffe2a8, #ffab3d); }
.res-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tile { padding: 12px 6px; border-radius: 16px; background: var(--card); border: 1px solid rgba(255, 255, 255, .06); text-align: center; }
.tile b { display: block; font-size: 22px; font-weight: 800; }
.tile span { font-size: 12px; color: var(--muted); }
.card { margin-top: 12px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.card h3 { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-hi); margin-bottom: 10px; }
.card > small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.res-long { font-size: 22px; font-weight: 800; margin-top: 4px; word-break: break-word; }
.res-long .en { display: block; font-size: 13px; font-weight: 400; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); }
.chip .ar { font-weight: 700; font-size: 12px; }
.chip.new { border-color: rgba(255, 200, 97, .5); }
.task-card { display: flex; align-items: center; gap: 10px; font-size: 14.5px; }
.task-card.ok { border-color: rgba(34, 201, 126, .45); }
.fg-t { color: var(--gold); }

/* ---------- Wortbuch ---------- */
.book-top { display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.book-count { display: flex; flex-direction: column; gap: 6px; }
.book-count b { font-size: 14px; font-weight: 600; color: var(--muted); }
.chips.filter { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.filter::-webkit-scrollbar { display: none; }
.chips.filter button { flex: none; padding: 7px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .07); }
.chips.filter button[aria-selected="true"] { color: #2a1103; background: linear-gradient(180deg, #ffe2a8, #ffab3d); border-color: transparent; }
#book-search { width: 100%; padding: 11px 14px; border-radius: 14px; border: 1px solid rgba(255, 200, 160, .14); background: rgba(0, 0, 0, .25); color: var(--ink); font: inherit; font-size: 15px; -webkit-user-select: text; user-select: text; }
.book-list-group { margin: 14px 2px 6px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.entry { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.entry .tag { height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12.5px; font-weight: 800; color: #fff; }
.tag.a0 { background: linear-gradient(180deg, #6fb2ff, #2a6fd6); } .tag.a1 { background: linear-gradient(180deg, #ff8a8f, #e0303f); } .tag.a2 { background: linear-gradient(180deg, #5fe3a8, #17a466); }
.entry .w { font-weight: 700; font-size: 16.5px; word-break: break-word; }
.entry .w .fg { font-style: normal; color: var(--gold); }
.entry .p { font-size: 12.5px; color: var(--muted); }
.entry .en { font-size: 13px; color: var(--ember-hi); }
.book-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.book-dock { gap: 8px; }
.vw-link { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13.5px; text-decoration: none; padding: 6px; }
.vw-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Artikelprobe ---------- */
.quiz-n { width: 44px; text-align: center; font-size: 14px; color: var(--muted); font-weight: 600; }
.quiz-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.quiz-card { position: relative; width: min(78vw, 320px); min-height: 150px; }
.quiz-card .blk { position: relative; width: 100%; min-height: 150px; border-radius: 22px; padding: 18px 10px; }
.quiz-card .blk .ln { font-size: 34px; }
.quiz-card .blk .art { font-size: 14px; top: 10px; left: 14px; }
.quiz-card .blk .head-hl { color: #ffe08a; text-shadow: 0 0 10px rgba(255, 170, 60, .9), 0 1px 0 rgba(0, 0, 0, .5); }
.quiz-trans { min-height: 20px; color: var(--muted); font-size: 14px; }
.quiz-rule { min-height: 44px; text-align: center; font-size: 15px; color: var(--ink); max-width: 320px; }
.quiz-rule.bad { color: #ff9aa2; }
.quiz-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 380px; }
.art-btn { height: 72px; border-radius: 18px; font-size: 24px; font-weight: 800; color: #fff; letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 10px 24px -10px rgba(0, 0, 0, .7); transition: transform .1s, filter .2s; }
.art-btn:active { transform: scale(.95); }
.art-btn.a0 { background: linear-gradient(180deg, #6fb2ff, #2a6fd6 60%, #173f86); }
.art-btn.a1 { background: linear-gradient(180deg, #ff8a8f, #e0303f 60%, #861523); }
.art-btn.a2 { background: linear-gradient(180deg, #5fe3a8, #17a466 60%, #0b5c3a); }
.art-btn.dim { filter: grayscale(.8) brightness(.5); }
.art-btn.ok { box-shadow: 0 0 0 3px #fff3d6, 0 0 26px rgba(255, 255, 255, .6); }
.quiz-track { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 320px; }
.quiz-track i { width: 14px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); }
.quiz-track i.ok { background: var(--das); } .quiz-track i.no { background: var(--die); }
.quiz-end { text-align: center; padding-top: 20px; }
.quiz-end h2 { font-size: 30px; font-weight: 800; margin-bottom: 14px; }
.quiz-end .row { margin-top: 16px; }
.miss { display: flex; justify-content: space-between; gap: 10px; padding: 8px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); text-align: left; }
.miss .p { color: var(--muted); font-size: 13px; }

/* ---------- Statistik ---------- */
.st-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-big { margin-top: 10px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.st-big small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.st-big .v { font-size: 22px; font-weight: 800; margin-top: 2px; word-break: break-word; }
.arts-bar { display: flex; height: 26px; border-radius: 9px; overflow: hidden; margin-top: 8px; }
.arts-bar i { display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; min-width: 0; }
.arts-bar .a0 { background: #2a6fd6; } .arts-bar .a1 { background: #e0303f; } .arts-bar .a2 { background: #17a466; }
.st-empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.st-h { margin: 20px 2px 8px; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--ember-hi); }
.st-list { list-style: none; margin: 0; padding: 0; }
.st-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 4px; border-bottom: 1px solid rgba(255, 255, 255, .05); font-size: 14.5px; }
.st-list li span:last-child { color: var(--muted); font-size: 13px; }

/* ---------- Einstellungen ---------- */
.set-row, .set-link { display: flex; align-items: center; justify-content: space-between; min-height: 58px; padding: 0 4px; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 16px; color: var(--ink); text-decoration: none; width: 100%; text-align: left; }
.set-link svg { width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.seg { display: flex; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.seg button { padding: 8px 12px; border-radius: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.seg button[aria-checked="true"] { background: linear-gradient(180deg, #ffe2a8, #ffab3d); color: #2a1103; }
.toggle { position: relative; flex: none; width: 52px; height: 30px; border-radius: 15px; background: rgba(255, 255, 255, .12); transition: background .2s; }
.toggle i { position: absolute; left: 3px; top: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle[aria-checked="true"] { background: linear-gradient(90deg, #ff7a1a, #ffb347); }
.toggle[aria-checked="true"] i { transform: translateX(22px); }
.version { margin-top: 24px; text-align: center; font-size: 12.5px; color: var(--dim); }

/* ---------- Blätter (Dialoge) ---------- */
.sheet { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; background: rgba(8, 4, 2, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .25s both; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-card {
  position: relative; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  padding: 26px 22px calc(var(--safe-b) + 22px); border-radius: 28px 28px 0 0; background: linear-gradient(180deg, #2c1a11, #160d09);
  border: 1px solid var(--line); border-bottom: 0; box-shadow: 0 -20px 60px rgba(0, 0, 0, .6); animation: sheetUp .38s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-card h2 { text-align: center; font-size: 24px; font-weight: 800; }
.sheet-card.small-card { padding-top: 30px; }
.sheet-x { position: absolute; right: 12px; top: 12px; }
.how { text-align: center; }
.how p { color: var(--muted); font-size: 16px; min-height: 70px; }
.how-art { position: relative; height: 150px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.how-art .blk { position: relative; width: 96px; height: 54px; }
.how-art .plus { font-size: 26px; font-weight: 800; color: var(--ember-hi); }
.how-dots { display: flex; justify-content: center; gap: 8px; margin: 4px 0 6px; }
.how-dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .15); transition: all .25s; }
.how-dots i.on { background: var(--gold); width: 22px; border-radius: 4px; }
.full-art { display: flex; justify-content: center; gap: 6px; margin-bottom: 2px; }
.full-art .w-ico { width: 50px; height: 50px; }
.full-list { list-style: none; margin: 4px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.full-list li { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.full-list li::before { content: ""; flex: none; width: 10px; height: 10px; transform: rotate(45deg); background: var(--gold); border-radius: 2px; box-shadow: 0 0 8px var(--gold); }

.toast { position: fixed; left: 50%; bottom: calc(var(--safe-b) + 28px); z-index: 60; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 999px; background: #3a2216; border: 1px solid var(--line); font-size: 14px; transition: all .25s; pointer-events: none; max-width: 90%; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 700px) {
  .hero { height: 104px; transform: scale(.85); }
  .forge-bar { height: 112px; }
  .anvil-zone { height: 112px; }
  .anvil { width: 150px; height: 75px; }
  .cur-slot { bottom: 56px; width: 96px; height: 50px; }
  .tool { height: 80px; }
}
@media (max-height: 620px) {
  .hero, .tagline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
