/* Zahlenzauber – Karte: Kopfzeile, Tagesauftrag, Gebiete */
/* Kopfzeile */
.kopf { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.95); border-radius: 22px; padding: 8px 16px 8px 8px; margin-bottom: 16px; box-shadow: var(--schatten); }
.kopf-avatar { background: radial-gradient(circle at 50% 30%, #fff, #e6dcff); border-radius: 50%; width: 60px; height: 60px; overflow: hidden; padding: 0; flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lila); }
.kopf-avatar .avatar.mini { width: 64px; height: 86px; margin: -4px 0 0 -2px; }
.kopf-info { flex: 1; min-width: 0; }
.kopf-name { font-family: var(--f-display); font-weight: 600; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stufe { font-size: .78rem; background: linear-gradient(180deg, var(--lila), #6a3fd0); color: #fff; border-radius: 999px; padding: 2px 9px; vertical-align: 2px; }
.xpbalken { height: 10px; background: var(--panel-2); border-radius: 999px; margin-top: 6px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(18,8,60,.12); }
.xpbalken span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7fe3ff, var(--blau)); box-shadow: inset 0 2px 0 rgba(255,255,255,.4); }
.muenzen { display: flex; align-items: center; gap: 6px; font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; font-variant-numeric: tabular-nums; background: #fff6d8; padding: 6px 12px 6px 8px; border-radius: 999px; }

/* Tagesauftrag */
.quest { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, #fff, #fff3cf); border-radius: 22px; padding: 14px 18px; margin-bottom: 18px; box-shadow: var(--schatten); position: relative; overflow: hidden; }
.quest::before { content: ""; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(255,201,60,.45), transparent 70%); }
.quest-text { display: flex; flex-direction: column; flex: 1 1 180px; position: relative; }
.quest-text b { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; }
.quest-text span { font-size: .92rem; font-weight: 700; color: #a37400; }
.quest-balken { flex: 1 1 160px; height: 24px; background: #f1ead2; border-radius: 999px; position: relative; overflow: hidden; box-shadow: inset 0 2px 3px rgba(120, 80, 0, .15); }
.quest-balken span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(180deg, #5fe39b, var(--gruen-d)); box-shadow: inset 0 2px 0 rgba(255,255,255,.4); }
.quest-balken em { position: absolute; inset: 0; display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: .85rem; font-variant-numeric: tabular-nums; color: var(--tinte); }

/* Gebiete als Szenen */
.gebiete { display: flex; flex-direction: column; gap: 16px; }
.gebiet { background-size: cover; background-position: center bottom; background-repeat: no-repeat; position: relative; isolation: isolate; display: grid; grid-template-columns: 150px 1fr auto; align-items: end; gap: 14px; border-radius: 26px; padding: 14px 16px 14px 10px; min-height: 150px; overflow: hidden; box-shadow: var(--schatten); }
/* Landschaft unten (Ebene 0), Inhalte darüber (Ebene 1). Kein negativer z-index:
   Safari 15 (z. B. iPad Air 2) hat die Landschaft sonst über Text, Monster und Knöpfe gelegt. */
.gebiet > .szene, .arena > .szene { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.gebiet > .gebiet-bild, .gebiet > .gebiet-text, .gebiet > .gebiet-knoepfe, .arena > .seite { position: relative; z-index: 1; }
/* Safari 15 malt die animierte Landschaft über Inhalte ohne eigene Ebene – trotz z-index.
   Eigene Ebene erzwingen (wie bei den gefilterten, gesperrten Gebieten, die dort sichtbar blieben). */
.gebiet > .gebiet-bild, .gebiet > .gebiet-text, .gebiet > .gebiet-knoepfe, .gebiet > .schloss, .arena > .seite, .arena > #effekte { -webkit-transform: translateZ(0); transform: translateZ(0); }
@media (max-width: 560px) { .gebiet { grid-template-columns: 110px 1fr; } .gebiet-knoepfe { grid-column: 1 / -1; } }
.gebiet-bild { position: relative; height: 104px; }
.gebiet-bild .monster.klein { position: absolute; bottom: 0; width: 72px; height: 72px; left: 0; filter: drop-shadow(0 6px 6px rgba(18,8,60,.2)); animation: atmen 2.6s ease-in-out infinite; }
.gebiet-bild .monster.klein.boss { width: 98px; height: 98px; left: 52px; animation-delay: -1.2s; }
.gebiet-bild .boss.besiegt { opacity: .5; filter: grayscale(.7); animation: none; }
@media (max-width: 560px) { .gebiet-bild .monster.klein { width: 56px; height: 56px; } .gebiet-bild .monster.klein.boss { width: 76px; height: 76px; left: 38px; } }
.gebiet-text { min-width: 0; align-self: center; background: rgba(255,255,255,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-radius: 18px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(18,8,60,.12); }
.gebiet-text h3 { font-size: 1.35rem; }
.gebiet-text p { margin: 2px 0 8px; font-weight: 700; font-size: .9rem; color: var(--tinte-weich); }
.fortschritt { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.fortschritt i { width: 20px; height: 20px; clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 60%, 80% 100%, 50% 76%, 20% 100%, 30% 60%, 0 38%, 38% 35%); background: rgba(43,35,80,.15); }
.fortschritt i.voll { background: linear-gradient(180deg, #ffe17a, var(--gold-d)); }
.krone { font-size: .72rem; font-weight: 800; background: linear-gradient(180deg, var(--lila), #6a3fd0); color: #fff; padding: 3px 9px; border-radius: 999px; margin-left: 4px; }
.gebiet-knoepfe { display: flex; flex-direction: column; gap: 10px; align-self: center; }
@media (max-width: 560px) { .gebiet-knoepfe { flex-direction: row; } .gebiet-knoepfe .knopf { flex: 1; } }
.gebiet.zu > *:not(.schloss) { filter: grayscale(.85) brightness(.75); }
.schloss { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 16px; background: linear-gradient(180deg, rgba(27,17,80,.35), rgba(27,17,80,.7)); color: #fff; font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; z-index: 2; }
.schloss::before { content: ""; display: block; width: 34px; height: 34px; margin: 0 auto 6px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='10' width='16' height='11' rx='3' fill='%23ffc93c'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3' fill='none' stroke='%23fff' stroke-width='2.4'/%3E%3C/svg%3E"); }
