/* Arcane Reliquary – Grimoire-Atelier · mystisches Thema: Kerzenlicht, Pergament, Gold */
@font-face { font-family: "Cinzel"; src: url("../fonts/Cinzel-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --nacht: #0b0806; --tiefe: #140e0a; --tafel: rgba(22, 15, 10, .82); --tafel2: rgba(38, 26, 17, .78);
  --gold: #d9a54c; --gold-hell: #f3cf86; --gold-dunkel: #8a6326; --glut: #ff9a3c;
  --perg: #eadbbd; --text: #ead9b8; --leise: #a8916c; --rot: #e0705e; --gruen: #9bc27a;
  --linie: rgba(217, 165, 76, .28); --schatten: 0 18px 60px rgba(0, 0, 0, .6);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--nacht); color: var(--text); font-family: var(--serif);
  overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold-dunkel); color: #fff; }

#nebel { position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 70% 60% at 40% 45%, rgba(120, 70, 25, .22), transparent 70%),
              radial-gradient(ellipse 120% 90% at 50% 120%, rgba(60, 20, 70, .25), transparent 60%),
              radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .85) 100%); }
#szene { position: fixed; inset: 0; z-index: 1; }
#szene canvas { display: block; width: 100%; height: 100%; outline: none; }

/* ------------------------------------------------------------ Kopf */
.kopf { position: fixed; z-index: 5; top: calc(18px + var(--bh, 0px)); left: 26px; right: 26px; display: flex; justify-content: space-between;
  align-items: flex-start; pointer-events: none; }
.marke { display: flex; gap: 14px; align-items: center; pointer-events: auto; }
.siegel { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  color: var(--gold-hell); border: 1px solid var(--gold-dunkel);
  background: radial-gradient(circle, rgba(217, 165, 76, .25), rgba(0, 0, 0, .4) 70%);
  box-shadow: 0 0 24px rgba(255, 154, 60, .35), inset 0 0 12px rgba(255, 200, 120, .2); animation: puls 4s ease-in-out infinite; }
@keyframes puls { 50% { box-shadow: 0 0 38px rgba(255, 154, 60, .55), inset 0 0 18px rgba(255, 200, 120, .35); } }
h1 { font-family: "Cinzel", serif; font-size: 26px; letter-spacing: 3px; margin: 0; color: var(--gold-hell);
  text-shadow: 0 0 18px rgba(255, 170, 70, .45), 0 2px 0 #000; }
.runenzeile { margin: 2px 0 0; font-size: 12px; letter-spacing: 3px; color: var(--leise); }
.preis { pointer-events: auto; text-align: right; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--linie);
  background: var(--tafel); backdrop-filter: blur(8px); box-shadow: var(--schatten); margin-right: 440px; }
.preis .lbl { display: block; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--leise); }
.preis .val { font-family: "Cinzel", serif; font-size: 22px; color: var(--gold-hell); }

/* ------------------------------------------------------------ Schrittpfad (links) */
.pfad { position: fixed; z-index: 5; left: 26px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column;
  gap: 6px; }
.pfad::before { content: ""; position: absolute; left: 25px; top: 20px; bottom: 20px; width: 1px;
  background: linear-gradient(var(--gold-dunkel), transparent 50%, var(--gold-dunkel)); }
.pfad button { position: relative; display: flex; align-items: center; gap: 14px; background: none; border: 0; cursor: pointer;
  padding: 4px 0; text-align: left; color: var(--leise); }
.pfad .sig { width: 51px; height: 51px; border-radius: 50%; display: grid; place-items: center; font-family: "Cinzel", serif;
  font-size: 15px; border: 1px solid var(--linie); background: var(--tafel); transition: .35s; }
.pfad .nm { font-family: "Cinzel", serif; font-size: 13px; letter-spacing: 1.5px; opacity: 0; transform: translateX(-6px);
  transition: .3s; text-shadow: 0 1px 4px #000; }
.pfad button:hover .nm, .pfad button.aktiv .nm { opacity: 1; transform: none; }
.pfad button.aktiv { color: var(--gold-hell); }
.pfad button.aktiv .sig { border-color: var(--gold); color: var(--nacht); background: radial-gradient(circle, var(--gold-hell), var(--gold));
  box-shadow: 0 0 22px rgba(255, 170, 70, .6); }
.pfad button.fertig .sig { color: var(--gold); border-color: var(--gold-dunkel); }

/* ------------------------------------------------------------ Tafel (rechts) */
.tafel { position: fixed; z-index: 6; right: 22px; top: calc(18px + var(--bh, 0px)); bottom: 18px; width: 420px; display: flex; flex-direction: column;
  border-radius: 18px; border: 1px solid var(--linie); background: var(--tafel); backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: var(--schatten), inset 0 0 0 1px rgba(255, 220, 160, .05); overflow: hidden; }
.tafel::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: 18px;
  background: radial-gradient(ellipse at top, rgba(217, 165, 76, .12), transparent 55%); }
.tafel-griff { display: none; }
.tafel-inhalt { flex: 1; overflow-y: auto; padding: 26px 26px 12px; scrollbar-width: thin; scrollbar-color: var(--gold-dunkel) transparent; }
.tafel-fuss { display: flex; justify-content: space-between; gap: 10px; padding: 14px 22px 18px;
  border-top: 1px solid var(--linie); background: linear-gradient(transparent, rgba(0, 0, 0, .25)); }
.schritt-kopf { margin-bottom: 18px; }
.schritt-kopf .nr { font-family: "Cinzel", serif; color: var(--gold); letter-spacing: 3px; font-size: 12px; }
.schritt-kopf h2 { font-family: "Cinzel", serif; font-size: 24px; margin: 4px 0 6px; color: var(--perg); letter-spacing: 1px; }
.schritt-kopf p { margin: 0; color: var(--leise); line-height: 1.5; font-size: 15px; }
.zier { height: 14px; margin: 14px 0; background: center / contain no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 14'%3E%3Cpath d='M0 7h125M175 7h125' stroke='%238a6326'/%3E%3Cpath d='M150 1l6 6-6 6-6-6z' fill='%23d9a54c'/%3E%3Ccircle cx='132' cy='7' r='2' fill='%238a6326'/%3E%3Ccircle cx='168' cy='7' r='2' fill='%238a6326'/%3E%3C/svg%3E"); }
h3 { font-family: "Cinzel", serif; font-size: 14px; letter-spacing: 2px; color: var(--gold); margin: 22px 0 10px; font-weight: 700; }

.knopf { cursor: pointer; border-radius: 999px; padding: 11px 22px; border: 1px solid var(--linie); background: var(--tafel2);
  transition: .2s; font-family: "Cinzel", serif; letter-spacing: 1px; font-size: 14px; }
.knopf:hover { border-color: var(--gold); box-shadow: 0 0 16px rgba(255, 170, 70, .25); }
.knopf.gold { color: #1d1206; border-color: var(--gold-hell); background: linear-gradient(180deg, var(--gold-hell), var(--gold));
  box-shadow: 0 4px 18px rgba(217, 165, 76, .35); }
.knopf.gold:hover { filter: brightness(1.08); }
.knopf.leise { background: transparent; }
.knopf:disabled { opacity: .4; cursor: default; }
.knopf.klein { padding: 7px 14px; font-size: 12px; }

/* Karten (Auswahl) */
.karten { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.karte { position: relative; cursor: pointer; border-radius: 14px; overflow: hidden; border: 1px solid var(--linie);
  background: var(--tafel2); transition: .25s; text-align: left; padding: 0; }
.karte img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; filter: saturate(.9) brightness(.9); transition: .4s; }
.karte.hoch img { aspect-ratio: 9 / 16; object-fit: cover; }
.karte .t { padding: 10px 12px 12px; }
.karte .t b { display: block; font-family: "Cinzel", serif; color: var(--perg); font-size: 14px; letter-spacing: 1px; }
.karte .t span { font-size: 12.5px; color: var(--leise); line-height: 1.35; display: block; margin-top: 3px; }
.karte:hover { border-color: var(--gold-dunkel); transform: translateY(-2px); }
.karte:hover img { filter: none; transform: scale(1.03); }
.karte.an { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(255, 170, 70, .35); }
.karte.an::after { content: "✦"; position: absolute; top: 8px; right: 10px; color: var(--gold-hell); text-shadow: 0 0 10px var(--glut); font-size: 18px; }
/* Grimoire-Karten kompakt: zwei Zeilen Text, flacheres Bild – Schritt II passt ohne Scrollen */
.karte .t span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 900px) { .karte img { aspect-ratio: 16 / 10; } .karte .t { padding: 8px 11px 10px; } }
.karte.breit { grid-column: span 2; display: grid; grid-template-columns: 120px 1fr; }
.karte.breit img { aspect-ratio: auto; height: 100%; }

/* Farbsteine */
.steine { display: flex; flex-wrap: wrap; gap: 10px; }
.stein { width: 42px; height: 42px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255, 255, 255, .08); position: relative;
  transition: .2s; box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .45), inset 4px 5px 10px rgba(255, 255, 255, .18); }
.stein.silk { box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .35), inset 6px 6px 12px rgba(255, 255, 255, .55); }
.stein:hover { transform: scale(1.08); }
.stein.an { border-color: var(--gold-hell); box-shadow: 0 0 0 3px rgba(0, 0, 0, .5), 0 0 18px rgba(255, 170, 70, .55); }
.wahl-name { margin-top: 8px; font-size: 13px; color: var(--leise); min-height: 18px; }

/* Eingaben */
.feld { margin: 10px 0 14px; }
.feld label { display: block; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--leise); margin-bottom: 6px; }
.feld input[type=text], .feld input[type=email], .feld input[type=tel], .feld textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--linie); background: rgba(0, 0, 0, .35);
  outline: none; transition: .2s; font-size: 16px; }
.feld input:focus, .feld textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 165, 76, .15); }
.feld .hilfe { font-size: 12.5px; color: var(--leise); margin-top: 6px; line-height: 1.4; }
.runen-vorschau { font-size: 18px; letter-spacing: 3px; color: var(--gold); margin-top: 6px; min-height: 22px; text-shadow: 0 0 8px rgba(255, 160, 60, .4); }
.schalter { display: flex; gap: 0; border: 1px solid var(--linie); border-radius: 999px; overflow: hidden; }
.schalter button { flex: 1; padding: 10px 8px; background: transparent; border: 0; cursor: pointer; font-size: 13.5px; color: var(--leise); }
.schalter button.an { background: linear-gradient(180deg, rgba(243, 207, 134, .25), rgba(217, 165, 76, .15)); color: var(--gold-hell); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--leise); line-height: 1.45; cursor: pointer; margin: 10px 0; }
.check input { accent-color: var(--gold); width: 18px; height: 18px; margin-top: 1px; flex: none; }

/* Innenleben-Editor */
.palette { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip { cursor: pointer; border-radius: 12px; border: 1px solid var(--linie); background: var(--tafel2); padding: 8px 4px 7px;
  text-align: center; transition: .2s; }
.chip .s { display: block; font-size: 22px; line-height: 1.1; color: var(--c); filter: drop-shadow(0 0 6px var(--c)); }
.chip .n { display: block; font-size: 11.5px; color: var(--leise); margin-top: 2px; }
.chip .p { display: block; font-size: 10px; color: var(--leise); opacity: .7; margin-top: 1px; }
.chip:hover { border-color: var(--gold-dunkel); }
.chip.an { border-color: var(--gold); background: rgba(217, 165, 76, .16); box-shadow: 0 0 16px rgba(255, 170, 70, .3); }
.chip.an .n { color: var(--gold-hell); }
.editor-wrap { margin-top: 12px; border-radius: 14px; border: 1px solid var(--linie);
  background: radial-gradient(ellipse at center, rgba(70, 45, 20, .35), rgba(0, 0, 0, .45)); padding: 8px; position: relative; }
.editor-wrap .achse { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: 2px; color: var(--leise);
  text-transform: uppercase; padding: 0 6px; }
#editor { width: 100%; height: auto; display: block; touch-action: none; user-select: none; max-height: 52vh; }
#editor .wanne { fill: rgba(10, 6, 3, .75); stroke: var(--gold-dunkel); stroke-width: .8; }
#editor .gitter { stroke: rgba(255, 220, 160, .12); stroke-width: .4; stroke-dasharray: 2 2; }
#editor .noppe { fill: rgba(217, 165, 76, .12); stroke: rgba(217, 165, 76, .35); stroke-width: .4; }
#editor .noppe.fest { opacity: 0; }
#editor .zone { fill: url(#hatch); stroke: var(--gold-hell); stroke-width: 1; filter: url(#glow); animation: zone 3s ease-in-out infinite; }
@keyframes zone { 50% { stroke-opacity: .45; } }
#editor .zonetxt { font-size: 15px; text-anchor: middle; fill: var(--gold-hell); filter: url(#glow); pointer-events: none; }
#editor .zonesub, #editor .zonesub2 { font-family: "Cinzel", serif; font-size: 5px; text-anchor: middle; fill: var(--gold); letter-spacing: .6px; pointer-events: none; }
#editor .zonesub2 { font-size: 4px; fill: var(--leise); font-family: var(--serif); }
#editor .modul { cursor: grab; }
#editor .mrect { fill: color-mix(in srgb, var(--c) 55%, #1a120b); stroke: color-mix(in srgb, var(--c) 70%, #fff); stroke-width: .6; transition: fill .2s; }
#editor .modul:hover .mrect { fill: color-mix(in srgb, var(--c) 70%, #1a120b); }
#editor .modul.sel .mrect { stroke: var(--gold-hell); stroke-width: 1.4; filter: url(#glow); }
#editor .msym { font-size: 12px; text-anchor: middle; fill: #fff4dc; pointer-events: none; }
#editor .mtxt { font-family: "Cinzel", serif; font-size: 4.6px; text-anchor: middle; fill: #fff4dc; letter-spacing: .5px; pointer-events: none; }
#editor .mpreis { font-family: var(--serif, Georgia, serif); font-size: 3.9px; fill: #fff4dc; opacity: .55; text-anchor: end; pointer-events: none; }
#editor .handle { cursor: nesw-resize; opacity: .5; transition: opacity .2s; }
#editor .handle.an, #editor .handle:hover { opacity: 1; }
#editor .handle .hgrund { fill: rgba(26, 16, 6, .55); stroke: var(--gold-dunkel); stroke-width: .5; }
#editor .handle.an .hgrund { fill: rgba(26, 16, 6, .8); stroke: var(--gold-hell); filter: url(#glow); }
#editor .handle .hpfeil { fill: none; stroke: var(--gold-hell); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
#editor .ghost { stroke-width: 1; stroke-dasharray: 3 2; pointer-events: none; }
#editor .ghost.ok { fill: rgba(243, 207, 134, .25); stroke: var(--gold-hell); }
#editor .ghost.bad { fill: rgba(150, 150, 150, .28); stroke: rgba(200, 200, 200, .55); }
#editor .ghost-text { font-family: "Cinzel", serif; font-size: 9px; font-weight: 700; fill: #f2f2f2; paint-order: stroke; stroke: rgba(0, 0, 0, .7); stroke-width: 1.4px; text-anchor: middle; pointer-events: none; }
#ghost.shake { animation: wackel .35s; }
@keyframes wackel { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }
.werkzeug { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.status-zeile { font-size: 13px; margin-top: 10px; color: var(--leise); line-height: 1.45; }
.status-zeile b { color: var(--gold-hell); font-weight: normal; }
.legende { display: flex; gap: 14px; font-size: 12px; color: var(--leise); margin-top: 8px; flex-wrap: wrap; }
.legende i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* Plaketten-Vorschau */
.plakette-rahmen { border-radius: 14px; padding: 18px; background: radial-gradient(ellipse, rgba(90, 55, 25, .4), rgba(0, 0, 0, .5));
  border: 1px solid var(--linie); text-align: center; }
.plakette-rahmen canvas { width: 100%; height: auto; border-radius: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 30px rgba(255, 160, 60, .12); }
.plakette-info { font-size: 13px; color: var(--leise); margin-top: 10px; }

/* Zusammenfassung / Anfrage */
.zusammen { border: 1px solid var(--linie); border-radius: 14px; padding: 6px 14px; background: rgba(0, 0, 0, .25); }
.zusammen div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed rgba(217, 165, 76, .15); font-size: 14px; }
.zusammen div:last-child { border-bottom: 0; }
.zusammen span:first-child { color: var(--leise); }
.zusammen span:last-child { text-align: right; color: var(--perg); }
.preisbox { margin: 14px 0; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--gold-dunkel);
  background: linear-gradient(135deg, rgba(217, 165, 76, .14), rgba(0, 0, 0, .2)); }
.preisbox b { font-family: "Cinzel", serif; font-size: 22px; color: var(--gold-hell); }
.preisbox small { display: block; color: var(--leise); margin-top: 4px; line-height: 1.4; }
.versteckt { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.danke { text-align: center; padding: 30px 6px; }
.danke .gross { font-size: 54px; color: var(--gold-hell); text-shadow: 0 0 30px var(--glut); }

/* Bühnensteuerung */
.buehne-steuer { position: fixed; z-index: 5; left: 50%; bottom: 26px; transform: translateX(calc(-50% - 220px)); display: flex; gap: 14px; align-items: center; }
.rund { width: 74px; height: 74px; border-radius: 50%; cursor: pointer; border: 1px solid var(--gold-dunkel); color: var(--gold-hell);
  background: radial-gradient(circle at 35% 30%, rgba(243, 207, 134, .35), rgba(20, 12, 6, .9) 65%); display: grid; place-items: center;
  box-shadow: 0 0 28px rgba(255, 154, 60, .35), var(--schatten); transition: .3s; }
.rund span { font-size: 26px; line-height: 1; }
.rund small { font-family: "Cinzel", serif; font-size: 9.5px; letter-spacing: 1px; margin-top: -10px; }
.rund:hover { transform: rotate(-8deg) scale(1.05); box-shadow: 0 0 40px rgba(255, 154, 60, .55); }
.rund.klein { width: 56px; height: 56px; }
.rund.klein span { font-size: 20px; }
.rund.aus { opacity: .45; box-shadow: none; }
.masse { order: -1; flex-basis: 100%; text-align: center; font-size: 11px; color: var(--leise); letter-spacing: .2px; padding-bottom: 8px; margin-bottom: 2px; border-bottom: 1px solid var(--linie); }
.masse b { color: var(--perg); font-weight: 600; white-space: nowrap; }
.masse .lang { white-space: nowrap; opacity: .85; }
.tafel-fuss { flex-wrap: wrap; }
.ansichten { display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--tafel); border: 1px solid var(--linie); backdrop-filter: blur(8px); }
.ansichten button { border: 0; background: transparent; cursor: pointer; padding: 8px 13px; border-radius: 999px; font-size: 13px; color: var(--leise); }
.ansichten button:hover, .ansichten button.an { color: var(--gold-hell); background: rgba(217, 165, 76, .15); }

/* Laden / Hinweise */
.laden { position: fixed; inset: 0; z-index: 20; display: grid; place-content: center; text-align: center; background: var(--nacht); transition: opacity 1s; }
.laden .kreis { width: 90px; height: 90px; margin: 0 auto 18px; border-radius: 50%; border: 2px solid transparent;
  border-top-color: var(--gold); border-bottom-color: var(--gold-dunkel); animation: dreh 1.6s linear infinite; box-shadow: 0 0 30px rgba(255, 154, 60, .3); }
@keyframes dreh { to { transform: rotate(360deg); } }
.laden p { font-family: "Cinzel", serif; letter-spacing: 3px; color: var(--gold); }
.laden.weg { opacity: 0; pointer-events: none; }
.hinweis { position: fixed; z-index: 15; left: 50%; top: calc(22px + var(--bh, 0px)); transform: translate(-50%, -140%); padding: 12px 20px; border-radius: 12px;
  background: var(--tafel); border: 1px solid var(--gold-dunkel); box-shadow: var(--schatten); transition: .4s; max-width: 90vw; font-size: 14px; }
.hinweis.zeigen { transform: translate(-50%, 0); }
.fuss { position: fixed; z-index: 4; left: 26px; bottom: 14px; font-size: 12px; color: var(--leise); }
.fuss a { color: var(--leise); text-decoration: none; }
.fuss a:hover { color: var(--gold); }

/* ------------------------------------------------------------ Mobil */
.nur-mobil { display: none; }
/* Baustellen-Banner (data/status.json) */
body.mit-banner { --bh: 34px; }
.aufbau-banner { position: fixed; z-index: 30; top: 0; left: 0; right: 0; min-height: var(--bh); display: flex; align-items: center; justify-content: center;
  padding: 6px 16px; box-sizing: border-box; text-align: center; font-size: 13px; letter-spacing: .3px; color: #1a1006;
  background: linear-gradient(90deg, #b8862e, #f0c56a 50%, #b8862e); box-shadow: 0 2px 14px rgba(0, 0, 0, .5); }
.aufbau-box { margin-top: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--gold); background: rgba(217, 165, 76, .1);
  font-size: 14px; line-height: 1.5; color: var(--text); }
.aufbau-box b { display: block; font-family: "Cinzel", serif; color: var(--gold-hell); letter-spacing: 1px; margin-bottom: 4px; }
@media (max-width: 960px) {
  body.mit-banner { --bh: 46px; }
  .aufbau-banner { font-size: 11.5px; line-height: 1.3; padding: 5px 12px; padding-top: calc(5px + env(safe-area-inset-top)); }
  /* Handy: eine schmale Kopfzeile, große 3D-Bühne, Tafel als Bodenblatt */
  .preis { margin-right: 0; padding: 6px 11px; border-radius: 11px; }
  .preis .lbl { font-size: 9px; letter-spacing: 1.5px; }
  .preis .val { font-size: 15px; white-space: nowrap; }
  .kopf { top: calc(10px + env(safe-area-inset-top) + var(--bh, 0px)); left: 12px; right: 12px; }
  .marke { gap: 9px; }
  .siegel { width: 34px; height: 34px; font-size: 16px; }
  h1 { font-size: 13px; letter-spacing: 1.6px; white-space: nowrap; }
  @media (max-width: 520px) { .marke h1 { display: none; } }
  .runenzeile { display: none; }
  .pfad { top: calc(13px + env(safe-area-inset-top) + var(--bh, 0px)); left: auto; right: 10px; transform: none; flex-direction: row; gap: 4px; }
  .pfad::before { display: none; }
  .pfad button { gap: 0; }
  .pfad .sig { width: 27px; height: 27px; font-size: 9.5px; border-width: 1px; }
  .pfad .nm { display: none; }
  .tafel { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 50vh; height: 50dvh; border-radius: 22px 22px 0 0;
           border-left: 0; border-right: 0; border-bottom: 0; transition: height .35s; padding-bottom: env(safe-area-inset-bottom); }
  .tafel.klein { height: 120px; }
  .tafel-griff { display: block; height: 20px; cursor: grab; flex: none; position: relative; }
  .tafel-griff::after { content: ""; position: absolute; left: 50%; top: 8px; width: 42px; height: 4px; margin-left: -21px; border-radius: 2px; background: var(--gold-dunkel); }
  .tafel-inhalt { padding: 2px 18px 10px; font-size: 15px; }
  .tafel-fuss { padding: 10px 14px 12px; }
  .schritt-kopf .nr { font-size: 10px; }
  .schritt-kopf h2 { font-size: 19px; line-height: 1.2; margin: 2px 0 6px; }
  .schritt-kopf p { font-size: 14px; line-height: 1.45; }
  .buehne-steuer { left: 0; right: 0; width: auto; transform: none; bottom: calc(50dvh + 12px); gap: 10px; justify-content: center; }
  .tafel.klein ~ .buehne-steuer { bottom: 134px; }
  .rund, .rund.klein { width: 46px; height: 46px; flex: none; font-size: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
  .rund small { display: none; }
  .nur-mobil { display: grid; }
  .ansichten { display: none; position: absolute; bottom: 58px; left: 50%; transform: translateX(-50%); flex-direction: column;
               gap: 2px; padding: 6px; border-radius: 16px; min-width: 180px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); }
  .ansichten.offen { display: flex; }
  .ansichten button { padding: 11px 16px; font-size: 15px; text-align: left; border-radius: 10px; }
  .masse { font-size: 10.5px; }
  .masse .lang { display: none; }
  .hinweis:not(.zeigen) { opacity: 0; }
  .hinweis { top: calc(54px + env(safe-area-inset-top) + var(--bh, 0px)); width: calc(100vw - 32px); text-align: center; font-size: 13.5px; }
  .fuss { display: none; }
  #editor { max-height: none; }
  .karten { gap: 9px; }
  .karte .t b { font-size: 13px; }
  /* Schritt II am Handy: eine Karte pro Zeile – Cover links, voller Text rechts */
  .karten { grid-template-columns: 1fr; }
  .karte { display: grid; grid-template-columns: 96px 1fr; align-items: center; text-align: left; }
  .karte img, .karte.hoch img { width: 96px; height: 100%; min-height: 96px; aspect-ratio: auto; object-fit: cover; }
  .karte .t { padding: 10px 30px 10px 12px; }
  .karte .t span { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 12.5px; }
  .karte:hover { transform: none; }
  .karte.breit { grid-column: auto; grid-template-columns: 96px 1fr; }
}
.stein.metall { box-shadow: inset -4px -5px 10px rgba(0, 0, 0, .3), inset 4px 4px 8px rgba(255, 255, 255, .35); }

.feld label.mit-knopf { display: flex; justify-content: space-between; align-items: baseline; }
.link-knopf { background: none; border: 0; padding: 0; cursor: pointer; color: var(--gold); font-size: 12px; letter-spacing: .5px; text-transform: none; }
.link-knopf:hover { color: var(--gold-hell); text-decoration: underline; }
.feld input.zeile2 { margin-top: 6px; }

#editor .info-knopf { cursor: pointer; }
#editor .info-knopf .schwebe { animation: schweben 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#editor .info-knopf circle { fill: #3fc6ff; stroke: #e8f9ff; stroke-width: .8; }
#editor .info-knopf circle.aura { fill: rgba(63, 198, 255, .28); stroke: none; animation: aura 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#editor .info-knopf.an circle:not(.aura) { fill: #8fe2ff; }
#editor .info-knopf text { font-family: "Cinzel", serif; font-size: 6.6px; font-weight: 700; text-anchor: middle; fill: #04263a; pointer-events: none; }
@keyframes schweben { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.2px); } }
@keyframes aura { 0%, 100% { transform: scale(.85); opacity: .5; } 50% { transform: scale(1.25); opacity: 1; } }
.editor-wrap { position: relative; }
.fach-info { position: absolute; z-index: 4; width: 230px; max-width: calc(100% - 16px); box-sizing: border-box; padding: 14px 16px 12px; cursor: pointer;
  border-radius: 14px; background: rgba(12, 22, 32, .96); border: 1.5px solid #3fc6ff; color: #eef7fb;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6), 0 0 22px rgba(63, 198, 255, .3); animation: aufpoppen .18s ease-out; }
.fach-info .fk-kopf { font-family: "Cinzel", serif; font-size: 15px; letter-spacing: 1px; color: #8fe2ff; margin-bottom: 8px; }
.fach-info .fk-kopf .sym { margin-right: 8px; }
.fach-info .gross { font-size: 26px; font-weight: 700; line-height: 1.1; color: #fff; }
.fach-info .klein { font-size: 12px; color: #a9c6d3; margin: 2px 0 8px; }
.fach-info .zeile { display: flex; justify-content: space-between; font-size: 15px; padding: 5px 0; border-top: 1px solid rgba(63, 198, 255, .25); }
.fach-info .zeile span { color: #a9c6d3; }
.fach-info .zu { font-size: 11px; color: #7fa3b3; text-align: right; margin-top: 6px; }
@keyframes aufpoppen { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }

.unter-titel { font-size: 12px; color: var(--leise); margin: 10px 0 6px; }
.schalter.klein-schalter button { font-size: 12.5px; padding: 7px 10px; }

/* Materialtafel: welches Teil besteht woraus */
.stoffe { margin: 16px 0 4px; padding: 12px 14px 6px; border: 1px solid var(--linie); border-radius: 14px; background: rgba(0, 0, 0, .25); }
.stoffe-titel { font-family: "Cinzel", serif; font-size: 13px; letter-spacing: 1.5px; color: var(--gold-hell); }
.stoffe p { margin: 6px 0 8px; font-size: 13.5px; line-height: 1.45; color: var(--perg); }
.stoffe p b { color: var(--gold-hell); font-weight: normal; }
.stoff { display: flex; align-items: center; gap: 11px; padding: 7px 0; border-top: 1px dashed rgba(217, 165, 76, .15); font-size: 13px; line-height: 1.35; color: var(--leise); }
.stoff i { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); box-shadow: inset -3px -4px 7px rgba(0, 0, 0, .4), inset 2px 3px 5px rgba(255, 255, 255, .16); }
.stoff b { display: block; font-weight: normal; color: var(--perg); font-size: 13.5px; }
.stoff em { font-style: normal; color: var(--gold-hell); }
.zusammen + .stoffe { margin-top: 14px; }

/* Dreh-Hinweis an der 3D-Ansicht (Ziehen dreht, Mausrad zoomt) */
.dreh-hinweis { position: fixed; z-index: 4; left: 50%; bottom: 116px; transform: translateX(calc(-50% - 220px)) translateY(10px); display: flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px; border-radius: 999px; background: var(--tafel); border: 1px solid var(--linie); backdrop-filter: blur(8px);
  color: var(--gold-hell); font-size: 13px; letter-spacing: .3px; white-space: nowrap; pointer-events: none; opacity: 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 154, 60, .12); transition: opacity .8s, transform .8s, padding .6s, gap .6s; }
.dreh-hinweis.zeigen { opacity: 1; transform: translateX(calc(-50% - 220px)); }
.dreh-hinweis svg { flex: none; animation: dreh-wiegen 3.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255, 170, 70, .45)); }
.dreh-hinweis span { color: var(--perg); max-width: 340px; overflow: hidden; transition: max-width .6s, opacity .4s; }
.dreh-hinweis.klein { padding: 8px; gap: 0; }
.dreh-hinweis.klein span { max-width: 0; opacity: 0; }
@keyframes dreh-wiegen { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
@media (prefers-reduced-motion: reduce) { .dreh-hinweis svg { animation: none; } }
@media (max-width: 960px) {
  /* Handy: oben links unter der Marke, damit das Buch frei bleibt */
  .dreh-hinweis { left: 14px; bottom: auto; top: calc(64px + env(safe-area-inset-top) + var(--bh, 0px)); transform: translateY(-8px); font-size: 12.5px; padding: 6px 13px 6px 8px; gap: 8px; }
  .dreh-hinweis.zeigen { transform: none; }
  .dreh-hinweis svg { width: 22px; height: 22px; }
  .dreh-hinweis.klein { padding: 6px; }
}

/* Zählwerk: Auswahl je Zähler und Legende der Zustands-Symbole */
.zaehler-wahl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.zaehler { border-radius: 12px; border: 1px solid var(--linie); background: var(--tafel2); padding: 8px 5px 6px; text-align: center; transition: .2s; }
.zaehler .raeder { display: flex; gap: 4px; margin-top: 6px; }
.zaehler .rad { flex: 1; min-width: 0; cursor: pointer; padding: 7px 0 6px; border-radius: 8px; border: 1px solid var(--linie); background: rgba(0, 0, 0, .3);
  font-family: "Cinzel", serif; font-size: 11px; font-weight: 700; color: var(--perg); white-space: nowrap; transition: .2s; }
.zaehler .rad:hover { border-color: var(--gold-dunkel); }
.zaehler .rad.an { border-color: var(--gold); color: var(--gold-hell); background: rgba(217, 165, 76, .2); }
.zaehler small { display: block; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--leise); }
.zaehler.an { border-color: var(--gold); background: rgba(217, 165, 76, .16); box-shadow: 0 0 16px rgba(255, 170, 70, .3); }
.zustand-legende { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 10px; margin-top: 12px; padding: 12px 12px 10px; border: 1px solid var(--linie); border-radius: 14px; background: rgba(0, 0, 0, .25); }
.zustand-legende .rad-titel { grid-column: 1 / -1; font-family: "Cinzel", serif; font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; color: var(--gold-hell); }
.zustand-legende .rad-titel:not(:first-child) { margin-top: 6px; padding-top: 10px; border-top: 1px dashed rgba(217, 165, 76, .15); }
.zustand { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; line-height: 1.25; color: var(--perg); }
.zustand svg { flex: none; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .45); }
.zustand span { min-width: 0; }
.zustand small { display: block; font-size: 10.5px; color: var(--leise); }
