/* Tempel – Bergsee im Morgengrauen */
:root {
  --bg: #17252B;        /* tiefer See */
  --surface: #203239;   /* Stein */
  --surface-2: #2A4048;
  --line: rgba(233, 238, 234, .11);
  --text: #E9EEEA;      /* Nebel */
  --muted: #9DB0AF;
  --moss: #8DB89A;
  --moss-ink: #12241B;
  --sun: #E8C07A;       /* Morgenlicht: Punkte, Level */
  --glut: #DB8F82;      /* Rückfall, Löschen */
  --s1: #199e70; --s2: #d95926; --s3: #3987e5; --s4: #c98500; --s5: #a06cd5; --prev: #6F8389;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabs: calc(62px + env(safe-area-inset-bottom));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--sans); overscroll-behavior: none; }
body { min-height: 100vh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: .005em; }
h1 { font-size: 1.75rem; line-height: 1.15; }
h2 { font-size: 1.25rem; line-height: 1.25; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--sun); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; }

#view { padding: 0 0 calc(var(--tabs) + 20px); max-width: 560px; margin: 0 auto; }
#view.sub { padding-bottom: 28px; }
.pad { padding: 0 18px; }
section { margin-top: 26px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.head .link { color: var(--moss); font-size: .9rem; }

/* ---------- Landschaft */
.hero { position: relative; height: 236px; overflow: hidden; }
.hero.low { height: 150px; }
.hero svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .over { position: absolute; left: 18px; right: 18px; bottom: 14px; text-shadow: 0 1px 12px rgba(10, 20, 24, .55); }
.hero .over p { color: rgba(233, 238, 234, .86); font-size: .92rem; }
.hero .back { position: absolute; top: 12px; left: 12px; }
.mist { animation: drift 48s ease-in-out infinite alternate; }
.mist.b { animation-duration: 70s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-26px); } to { transform: translateX(26px); } }
.star { animation: twinkle 5s ease-in-out infinite alternate; }
@keyframes twinkle { from { opacity: .35; } to { opacity: 1; } }
.back, .ghost { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px;
  background: rgba(23, 37, 43, .55); backdrop-filter: blur(6px); font-size: .9rem; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.topbar .back { background: var(--surface); }

/* ---------- Level-Leiste */
.levelbar { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.avatar { width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem;
  background: var(--surface-2); box-shadow: 0 0 0 2px var(--sun); }
.avatar.big { width: 76px; height: 76px; font-size: 2.5rem; }
.avatar.plain { box-shadow: none; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--sun); transition: width .6s ease; }
.bar.moss i { background: var(--moss); }

/* ---------- Zeilen & Flächen */
.rows { border-radius: 16px; background: var(--surface); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left; min-height: 52px; }
.row + .row { border-top: 1px solid var(--line); }
.row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.row .em { font-size: 1.25rem; width: 28px; text-align: center; flex: none; }
.row .right { color: var(--muted); font-size: .9rem; flex: none; }
.check { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--muted); flex: none; display: grid; place-items: center; transition: all .2s; }
.done .check { background: var(--moss); border-color: var(--moss); }
.done .check::after { content: ""; width: 10px; height: 5px; border: solid var(--moss-ink); border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-1px); }
.done .label { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(157, 176, 175, .5); }
.x { color: var(--muted); padding: 6px 8px; font-size: 1.1rem; }
.card { border-radius: 16px; background: var(--surface); padding: 16px; }
.card + .card { margin-top: 12px; }
.empty { color: var(--muted); padding: 16px; border: 1px dashed var(--line); border-radius: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 14px; background: var(--surface-2); font-weight: 500; }
.btn.primary { background: var(--moss); color: var(--moss-ink); }
.btn.wide { width: 100%; }
.btn.quiet { background: none; color: var(--muted); }
.btn.warn { color: var(--glut); }
.btn:disabled { opacity: .5; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btns > * { flex: 1; padding: 0 10px; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 14px; border-radius: 999px; background: var(--surface-2); font-size: .95rem; }
.chip.on { background: var(--moss); color: var(--moss-ink); }
.chip.sun.on { background: var(--sun); }
.seg { display: flex; background: var(--surface); border-radius: 12px; padding: 4px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 9px; font-size: .92rem; color: var(--muted); }
.seg button.on { background: var(--surface-2); color: var(--text); }
input[type=text], input[type=number], input[type=time], textarea {
  width: 100%; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 11px 13px; }
input[type=time] { width: auto; padding: 6px 8px; flex: none; }
textarea { resize: none; min-height: 110px; }
.field { display: flex; gap: 10px; align-items: center; }
.switch { width: 46px; height: 28px; border-radius: 14px; background: var(--surface-2); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: all .2s; }
.switch.on { background: var(--moss); }
.switch.on::after { left: 21px; background: var(--moss-ink); }

/* ---------- Werkzeuge */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tool { background: var(--surface); border-radius: 16px; padding: 14px 8px 12px; text-align: center; }
.tool b { display: block; font-size: 1.5rem; font-weight: 400; margin-bottom: 4px; }
.tool span { font-size: .85rem; color: var(--muted); }
blockquote { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.5; }
blockquote + p { margin-top: 10px; }

/* ---------- Fasten */
.fast { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fastcell { background: var(--surface); border-radius: 16px; padding: 12px 14px; text-align: left; position: relative; }
.fastcell .n { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.fastcell.clean { box-shadow: inset 0 0 0 1.5px var(--moss); }
.fastcell.relapse { box-shadow: inset 0 0 0 1.5px var(--glut); }
.fastcell .state { position: absolute; top: 12px; right: 12px; font-size: .8rem; color: var(--muted); }
.fastcell.clean .state { color: var(--moss); }
.bigstreak { font-family: var(--serif); font-size: 3rem; line-height: 1; }
.heat { display: block; width: 100%; margin-top: 12px; }

/* ---------- Rangliste */
.rank .pos { width: 22px; text-align: center; font-family: var(--serif); font-size: 1.1rem; color: var(--muted); flex: none; }
.rank.me { background: var(--surface-2); }
.rank .score { font-family: var(--serif); font-size: 1.15rem; color: var(--sun); }
svg.berg { display: block; width: 100%; height: auto; }

/* ---------- Tabs */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabs); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(23, 37, 43, .92); backdrop-filter: blur(12px); border-top: 1px solid var(--line); z-index: 5; }
#tabs[hidden] { display: none; }
#tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .7rem; }
#tabs button.on { color: var(--sun); }
#tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Bogen von unten */
#sheet { position: fixed; inset: 0; z-index: 20; background: rgba(8, 14, 17, .6); display: flex; align-items: flex-end; }
#sheet[hidden] { display: none; }
#sheet .body { width: 100%; max-width: 560px; margin: 0 auto; background: var(--surface); border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); max-height: 88vh; overflow: auto; animation: up .25s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
#sheet .body > * + * { margin-top: 14px; }
.slider { display: grid; grid-template-columns: 1fr 34px; gap: 4px 12px; align-items: center; }
.slider label { grid-column: 1 / -1; }
.slider output { font-family: var(--serif); font-size: 1.4rem; text-align: right; color: var(--sun); }
input[type=range] { width: 100%; accent-color: var(--moss); height: 28px; }

/* ---------- Atem-Bühne */
#stage { position: fixed; inset: 0; z-index: 30; background: #0C1722; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
#stage[hidden] { display: none; }
#stage svg.scene { position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: 100%; height: 44%; opacity: .8; }
#stage .orbwrap { position: relative; width: min(74vw, 320px); aspect-ratio: 1; display: grid; place-items: center; }
#stage .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(233, 238, 234, .22); }
#stage .orb { width: 100%; height: 100%; border-radius: 50%; transform: scale(.5);
  background: radial-gradient(circle at 50% 42%, rgba(243, 235, 211, .95), rgba(232, 192, 122, .55) 45%, rgba(141, 184, 154, .25) 72%, rgba(141, 184, 154, 0) 100%);
  transition: transform 4s cubic-bezier(.45, .05, .35, 1); }
#stage .word { position: absolute; text-align: center; color: #12241B; }
#stage .word b { display: block; font: 500 1.7rem var(--serif); }
#stage .word span { font-size: 1.05rem; opacity: .75; }
#stage .foot { position: absolute; bottom: calc(26px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; }
#stage .foot p { margin-bottom: 14px; color: rgba(233, 238, 234, .8); }
#stage .titel { position: absolute; top: 28px; left: 0; right: 0; text-align: center; color: rgba(233, 238, 234, .85); }
#stage .dots { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; max-width: 280px; margin: 0 auto 14px; }
#stage .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(233, 238, 234, .25); }
#stage .dots i.on { background: var(--sun); }

/* ---------- Fokus-Ring */
.ringbox { position: relative; width: 230px; margin: 8px auto; }
.ringbox svg { display: block; width: 100%; transform: rotate(-90deg); }
.ringbox .mid { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ringbox .mid b { font: 500 2.6rem var(--serif); display: block; line-height: 1; }

/* ---------- Chat */
.chat { display: flex; flex-direction: column; gap: 10px; padding: 8px 18px 96px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--moss); color: var(--moss-ink); border-bottom-right-radius: 5px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 5px; }
.composer { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: var(--bg);
  border-top: 1px solid var(--line); display: flex; gap: 8px; max-width: 560px; margin: 0 auto; }
.composer textarea { min-height: 46px; height: 46px; max-height: 120px; }

/* ---------- Diagramme */
.viz { background: var(--surface); border-radius: 16px; padding: 14px 12px 10px; }
.viz + .viz { margin-top: 12px; }
.viz h3 { margin: 0 4px 2px; }
.viz svg { display: block; width: 100%; height: auto; margin-top: 8px; }
.viz text { fill: var(--muted); font: 10px var(--sans); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 4px 0; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: .85rem; margin-top: 8px; table-layout: fixed; }
table.cmp th:first-child { width: 31%; }
.tiny { font-size: .72rem; }
table.cmp th { font-weight: 400; color: var(--muted); text-align: right; padding: 4px 6px; }
table.cmp td { padding: 7px 2px; text-align: right; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
table.cmp td:first-child, table.cmp th:first-child { text-align: left; }
.up { color: var(--moss); } .down { color: var(--glut); }
#tip { position: fixed; z-index: 40; pointer-events: none; background: #0E1A1F; border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 10px; font-size: .8rem; max-width: 220px; white-space: pre-line; }
#tip[hidden] { display: none; }

#toast { position: fixed; left: 50%; top: 16px; transform: translate(-50%, -300%); z-index: 50; background: var(--sun); color: #2B2110;
  padding: 9px 16px; border-radius: 999px; font-weight: 500; transition: transform .35s ease; max-width: 90vw; text-align: center; }
#toast.show { transform: translate(-50%, 0); }
#toast.err { background: var(--glut); color: #2A100C; }

.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.gate { min-height: 100vh; display: flex; flex-direction: column; }
.gate .hero { height: 46vh; }

@media (prefers-reduced-motion: reduce) {
  .mist, .star { animation: none; }
  #sheet .body { animation: none; }
}

/* ---------- Chat unter Freunden */
#tabs button { position: relative; }
#tabs .badge { position: absolute; top: 5px; left: 50%; margin-left: 5px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--sun); color: #2B2110; font-size: .66rem; font-weight: 600; line-height: 17px; text-align: center; }
#tabs .badge[hidden] { display: none; }
.count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--sun); color: #2B2110;
  font-size: .78rem; font-weight: 600; line-height: 22px; text-align: center; flex: none; }
.preview { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg .who { display: block; font-size: .78rem; color: var(--sun); margin-bottom: 2px; }
.msg .tm { display: block; text-align: right; font-size: .68rem; opacity: .6; margin-top: 2px; }
.msg.gone { font-style: italic; opacity: .6; }
.chat .day { align-self: center; font-size: .75rem; color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: 999px; margin-top: 6px; }
.chat .sys { align-self: center; text-align: center; font-size: .82rem; color: var(--muted); max-width: 90%; }

/* ---------- Erweiterungen */
.tag { font-size: .68rem; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--sun); vertical-align: 1px; }
.hub { margin-bottom: 2px; }
.goal { display: block; width: 100%; text-align: left; margin-top: 10px; }
.goal .bar { margin-top: 4px; }
.why { display: block; width: 100%; text-align: left; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2);
  font-family: var(--serif); font-size: 1rem; line-height: 1.4; }
.why .muted { font-family: var(--sans); font-size: .85rem; }
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bdg { background: var(--surface); border-radius: 14px; padding: 10px 4px 8px; text-align: center; opacity: .32; }
.bdg.on { opacity: 1; box-shadow: inset 0 0 0 1px rgba(232, 192, 122, .45); }
.bdg b { display: block; font-size: 1.5rem; font-weight: 400; }
.bdg span { display: block; font-size: .66rem; line-height: 1.2; color: var(--muted); margin-top: 3px; }
.chm { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; margin-top: 8px; }
.chm .bar { grid-column: 1 / -1; margin-top: 2px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal.head7 { margin: 12px 0 6px; text-align: center; font-size: .75rem; color: var(--muted); }
.cal button { position: relative; aspect-ratio: 1 / 1.08; border-radius: 10px; background: var(--surface); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; }
.cal button b { font-weight: 400; font-size: .9rem; }
.cal button span { display: flex; gap: 2px; height: 6px; font-size: .55rem; line-height: 6px; }
.cal button u { width: 5px; height: 5px; border-radius: 50%; }
.cal button em { position: absolute; top: 2px; right: 4px; font-style: normal; font-size: .6rem; color: var(--moss); }
.cal button.good { box-shadow: inset 0 0 0 1.5px var(--moss); }
.cal button.bad { box-shadow: inset 0 0 0 1.5px var(--glut); }
.cal button.now b { color: var(--sun); font-weight: 600; }
.cal button.later { opacity: .4; }
.verses { font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; }
.verses sup { font-family: var(--sans); font-size: .62rem; color: var(--sun); margin-right: 2px; }
.know section { margin-top: 22px; }
.know h2 { margin-bottom: 8px; }
ul.plain { margin: 8px 0; padding-left: 20px; }
ul.plain li { margin: 5px 0; }
#stage .bhint { position: relative; margin-top: 18px; min-height: 1.5em; text-align: center; color: rgba(233, 238, 234, .85); padding: 0 24px; }
#stage .mtext { position: relative; max-width: 330px; padding: 0 22px; text-align: center; font: 500 1.35rem/1.5 var(--serif); color: #E9EEEA;
  transition: opacity .6s ease; }
#stage .foot .btn { min-height: 40px; }
input.dk { margin-top: 0; }
.field input { min-width: 0; }
[hidden] { display: none !important; }
.hub { flex-wrap: nowrap; gap: 6px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
.hub::-webkit-scrollbar { display: none; }
.hub .chip { padding: 8px 11px; font-size: .86rem; white-space: nowrap; }

/* ---------- Vereinfachte Bedienung */
.tools.four { grid-template-columns: repeat(4, 1fr); }
.tools.four .tool { padding: 12px 4px 10px; }
.tools.four .tool b { font-size: 1.35rem; }
.levelcard { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.levelcard .right { color: var(--muted); }
.check.bad { border-color: var(--glut); }
.wordline { margin-top: 12px; font-size: .95rem; }
.word { color: var(--sun); }
.stake { margin-top: 6px; font-size: .9rem; color: var(--sun); }
.card.champ { box-shadow: inset 0 0 0 1.5px rgba(232, 192, 122, .5); }
.msg .rx { display: block; margin-top: 4px; }
.msg .rx:empty { display: none; }
.msg .rx b { display: inline-block; font-weight: 500; font-size: .75rem; padding: 2px 7px; border-radius: 999px; background: rgba(23, 37, 43, .35); margin: 2px 4px 0 0; }
.msg.user .rx b { background: rgba(18, 36, 27, .18); }
.msg .rx b.me { box-shadow: inset 0 0 0 1px var(--sun); }
.rxpick { justify-content: space-between; }
.rxpick .chip { font-size: 1.4rem; padding: 8px 12px; }

/* ---------- Wochenplan */
.daychips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.daychip { background: var(--surface); border-radius: 12px; padding: 8px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.daychip b { font-weight: 500; font-size: .8rem; }
.daychip span { font-size: .72rem; color: var(--muted); }
.daychip i { font-style: normal; font-size: .66rem; color: var(--sun); min-height: 1em; }
.daychip.on { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--sun); }
.daychip.today b { color: var(--sun); }
.pbars { display: flex; gap: 6px; align-items: flex-end; height: 92px; padding: 0 4px; }
.pbar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.pbar i { display: block; width: 100%; max-width: 28px; border-radius: 4px 4px 2px 2px; background: var(--moss); min-height: 2px; }
.pbar i.full { background: var(--sun); }
.pbar span { font-size: .66rem; color: var(--muted); margin-top: 4px; }

/* ---------- Tarot-Spiel */
svg.tarot { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .45)); }
svg.tarot.mid { width: 190px; margin: 0 auto; }
.cardhero { display: flex; gap: 16px; align-items: center; padding: 18px 18px 6px; max-width: 560px; margin: 0 auto; }
.cardbtn { width: 46%; max-width: 210px; flex: none; }
.cardside h1 { font-size: 1.5rem; }
.cardside .power { font: 500 2.4rem/1 var(--serif); color: var(--sun); margin: 12px 0 14px; }
.cardside .power span { display: block; font: .75rem var(--sans); color: var(--muted); margin-top: 3px; }
.stats { background: var(--surface); border-radius: 16px; padding: 12px 14px; }
.st { display: grid; grid-template-columns: 76px 1fr 62px; gap: 10px; align-items: center; padding: 4px 0; font-size: .9rem; }
.st b { text-align: right; font-weight: 500; }
.st small { color: var(--sun); font-size: .72rem; }
.stbar { display: flex; height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.stbar i { background: var(--moss); } .stbar u { background: var(--sun); }
.tool { position: relative; }
.tbadge { position: absolute; top: 6px; right: 6px; font-style: normal; font-size: .68rem; background: var(--sun); color: #2B2110; border-radius: 999px; padding: 1px 6px; }
.itemgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.itemc { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; background: #EFE3C6; color: #1F1A14; border-radius: 10px;
  padding: 10px 10px 9px; border: 2px solid #1F1A14; box-shadow: inset 0 0 0 3px #EFE3C6, inset 0 0 0 5px var(--rc, #8C8577); min-height: 118px; }
.itemc b { font: 700 .92rem/1.2 var(--serif); margin-top: 2px; }
.itemc .ie { font-size: 1.4rem; }
.itemc .ir { font-size: .68rem; color: var(--rc, #8C8577); font-weight: 600; }
.itemc .is { font-size: .72rem; }
.itemc .id { font-size: .68rem; color: #5a4a2c; }
.itemc em { position: absolute; top: 8px; right: 9px; font-style: normal; font-size: .62rem; background: #1F1A14; color: #EFE3C6; border-radius: 999px; padding: 1px 6px; }
.itemc.sel { outline: 3px solid var(--sun); outline-offset: 2px; }
.itemc:disabled { opacity: 1; width: 200px; }
.r0 { --rc: #8C8577; } .r1 { --rc: #2F5FA8; } .r2 { --rc: #7A4AA0; } .r3 { --rc: #C99A2E; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot { background: var(--surface); border-radius: 12px; padding: 8px 3px; text-align: center; box-shadow: inset 0 0 0 1.5px var(--rc, transparent); }
.slot b { display: block; font-size: 1.2rem; font-weight: 400; }
.slot span { display: block; font-size: .6rem; line-height: 1.2; color: var(--muted); margin-top: 3px; }
.slot:disabled { opacity: .55; }
.chestrow { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.chestb { flex: none; width: 104px; background: var(--surface); border-radius: 14px; padding: 12px 6px 10px; text-align: center; box-shadow: inset 0 0 0 2px var(--rc); }
.chestb b { display: block; font-size: 1.9rem; font-weight: 400; }
.chestb span { display: block; font-size: .8rem; color: var(--rc); filter: brightness(1.5); }
.chestb small { display: block; font-size: .62rem; color: var(--muted); }
.shopc { box-shadow: inset 0 0 0 1.5px var(--rc); }
.chesti { font-size: 2rem; font-weight: 400; }
#stage .chestbox { position: relative; width: 170px; height: 170px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, var(--rc) 0%, transparent 70%); }
#stage .chest { font-size: 5rem; }
.shake { animation: shake .26s ease-in-out infinite; }
@keyframes shake { 0%, 100% { transform: rotate(-7deg) scale(1); } 50% { transform: rotate(7deg) scale(1.08); } }
#stage .reveal { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: pop .45s ease; color: var(--text); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
#stage .clash { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 0 12px; }
#stage .clash i { font-style: normal; font: 500 .9rem var(--serif); color: rgba(233, 238, 234, .8); }
#stage .cl { width: 41%; max-width: 170px; text-align: center; transition: transform .5s ease, opacity .5s ease, filter .5s; color: var(--text); }
#stage .cla { transform: translateX(-60px) rotate(-6deg); opacity: 0; } #stage .clb { transform: translateX(60px) rotate(6deg); opacity: 0; }
#stage .clash.go .cl { transform: none; opacity: 1; }
#stage .cl b { display: block; margin-top: 8px; font-weight: 500; }
#stage .cl .score { display: block; font: 500 1.8rem var(--serif); color: var(--sun); }
#stage .clash.go .cl.win { transform: scale(1.08); }
#stage .clash.go .cl.lose { opacity: .45; filter: grayscale(.6); transform: scale(.94); }
/* ---------- Bereiche anordnen */
.arr { margin-top: 12px; border-radius: 16px; background: var(--surface); overflow: hidden; }
.arr.off { opacity: .5; }
.arrbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; }
.arrbar b { font-weight: 500; }
.arrbar button { min-width: 40px; min-height: 38px; padding: 0 10px; border-radius: 10px; background: var(--surface-2); margin-left: 5px; font-size: .85rem; }
.arrbar button:disabled { opacity: .3; }
.arrbody { display: none; }
input[type=file] { width: 100%; background: var(--surface-2); border-radius: 12px; padding: 10px; font-size: .85rem; }
