/* ==== Block 937 – warm-cozy Comic-UI ==================================== */

@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/patrick-hand/patrick-hand-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Patrick Hand'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/patrick-hand/patrick-hand-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1EFF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/nunito/nunito-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/nunito/nunito-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap;
  src: url('/fonts/nunito/nunito-latin-800-normal.woff2') format('woff2'); }

:root {
  --paper: #f4ead5;
  --paper-2: #eadbbd;
  --paper-3: #fbf5e8;
  --ink: #2a211a;
  --ink-soft: #5b4d3f;
  --moss: #5d8a3a;
  --moss-dark: #41662a;
  --moss-light: #a9cc7c;
  --rust: #b8603a;
  --rust-light: #f0c3a8;
  --wood: #8a5a36;
  --sky: #a9d8e3;
  --sun: #f1d27a;
  --energy: #e7a93b;
  --radius: 10px;
  --border: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 2px 2px 0 var(--ink);
  --font-hand: 'Patrick Hand', 'Comic Sans MS', cursive;
  --font-body: 'Nunito', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--paper-2);
  /* dezente Papierstruktur */
  background-image:
    radial-gradient(rgba(42, 33, 26, .05) 1px, transparent 1px),
    radial-gradient(rgba(42, 33, 26, .035) 1px, transparent 1px);
  background-size: 22px 22px, 13px 13px;
  background-position: 0 0, 7px 9px;
}

h1, h2, h3, .hand { font-family: var(--font-hand); font-weight: 400; line-height: 1.15; letter-spacing: .01em; }
h1 { font-size: 2.6rem; margin: 0 0 .4em; }
h2 { font-size: 1.9rem; margin: 0 0 .5em; }
h3 { font-size: 1.45rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
small, .muted { color: var(--ink-soft); }

/* Links: animierte Unterstreichung statt Hintergrundwechsel */
a { color: var(--moss-dark); text-decoration: none; font-weight: 700;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
  transition: background-size .25s ease; }
a:hover, a:focus-visible { background-size: 100% 2px; }

:focus-visible { outline: 3px dashed var(--rust); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 28px 0 48px; }

/* ---- Kopfzeile ------------------------------------------------------- */
.topbar { background: var(--paper); border-bottom: var(--border); box-shadow: 0 3px 0 rgba(42,33,26,.15); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); background: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font-family: var(--font-hand); font-size: 1.9rem; line-height: 1; }
.brand:hover { background: none; }

.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; align-items: center; margin-left: auto; }
.nav a, .nav .soon { font-family: var(--font-hand); font-size: 1.25rem; font-weight: 400; color: var(--ink); }
.nav a.active { color: var(--moss-dark); background-size: 100% 2px; }
.nav .soon { color: #9b8d7a; cursor: default; }
.nav .soon small { font-family: var(--font-body); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em;
  border: 1.5px solid currentColor; border-radius: 99px; padding: 0 5px; margin-left: 3px; vertical-align: 2px; }
.nav form { margin: 0; }

/* Statusleiste (Energie, Salz, Level) */
.statusbar { background: var(--ink); color: var(--paper); font-size: .92rem; }
.statusbar .wrap { display: flex; gap: 8px 22px; align-items: center; min-height: 38px; flex-wrap: wrap; }
.statusbar b { font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .ico { width: 18px; height: 18px; }

/* ---- Karten / Panels -------------------------------------------------- */
.card { background: var(--paper-3); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card + .card, .grid + .card, .card + .grid { margin-top: 22px; }
.grid > .card { margin-top: 0; }
.card.tape { position: relative; }
.card.tape::before { content: ''; position: absolute; top: -13px; left: 50%; width: 110px; height: 26px; transform: translateX(-50%) rotate(-2deg);
  background: rgba(241, 210, 122, .75); border: 1.5px solid rgba(42,33,26,.25); }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* ---- Formulare -------------------------------------------------------- */
.field { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 5px; }
input[type=text], input[type=password] {
  width: 100%; font: inherit; color: var(--ink); background: #fffdf7;
  border: var(--border); border-radius: 8px; padding: 10px 12px; box-shadow: inset 2px 2px 0 rgba(42,33,26,.08);
}
input:focus { outline: none; border-color: var(--moss-dark); box-shadow: 0 0 0 3px var(--moss-light); }
.hint { font-size: .85rem; color: var(--ink-soft); margin-top: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-hand); font-size: 1.35rem; line-height: 1; color: #fff;
  background: var(--moss); border: var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 11px 22px 10px; cursor: pointer; transition: transform .08s ease, box-shadow .08s ease; text-shadow: 1px 1px 0 var(--moss-dark); }
.btn:hover { background: var(--moss); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.block { width: 100%; }
.btn.rust { background: var(--rust); text-shadow: 1px 1px 0 #7d3d22; }
.btn.plain { background: var(--paper-3); color: var(--ink); text-shadow: none; }
.btn.small { font-size: 1.05rem; padding: 6px 12px 5px; box-shadow: var(--shadow-sm); }
.btn.small:hover { box-shadow: 3px 3px 0 var(--ink); }
.linkbtn { font: inherit; font-family: var(--font-hand); font-size: 1.25rem; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0 2px; transition: background-size .25s; }
.linkbtn:hover { background-size: 100% 2px; }

/* ---- Hinweise --------------------------------------------------------- */
.alert { border: var(--border); border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; box-shadow: var(--shadow-sm); font-weight: 700; }
.alert.err { background: var(--rust-light); }
.alert.ok { background: var(--moss-light); }
.alert.info { background: #d7ecf1; }

/* ---- Landing ---------------------------------------------------------- */
.hero { border: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--sky); }
.hero img { display: block; width: 100%; height: auto; }
.landing { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; margin-top: 28px; align-items: start; }
.landing .intro p { font-size: 1.08rem; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features li::before { content: ''; flex: 0 0 14px; height: 14px; margin-top: 6px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--moss-light); }
@media (max-width: 760px) { .landing { grid-template-columns: 1fr; } h1 { font-size: 2.1rem; } }

.narrow { max-width: 480px; margin: 0 auto; }

/* ---- Hub / Charakter -------------------------------------------------- */
.bar { display: block; width: 100%; height: 22px; appearance: none; -webkit-appearance: none;
  border: var(--border); border-radius: 99px; background: #fffdf7; overflow: hidden; color: var(--energy); }
.bar::-webkit-progress-bar { background: #fffdf7; }
.bar::-webkit-progress-value { background-color: var(--energy); border-right: 2.5px solid var(--ink);
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 8px, transparent 8px 16px); }
.bar::-moz-progress-bar { background-color: var(--energy);
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.28) 0 8px, transparent 8px 16px); }
.bar.xp { color: var(--moss-light); }
.bar.xp::-webkit-progress-value { background-color: var(--moss-light); }
.bar.xp::-moz-progress-bar { background-color: var(--moss-light); }
.bar-label { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; margin-bottom: 4px; }

.stats { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.stats li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px;
  background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 8px; padding: 8px 12px; }
.stats .val { font-family: var(--font-hand); font-size: 1.7rem; line-height: 1; grid-row: span 2; }
.stats .name { font-weight: 800; }
.stats .hint { margin: 0; }

.places { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.place { border: 2.5px dashed #9b8d7a; border-radius: var(--radius); padding: 14px 16px; color: var(--ink-soft); background: rgba(255,253,247,.5); }
.place h3 { color: var(--ink); margin-bottom: 4px; }
.place .phase { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--rust); }

/* ---- Tabellen (Admin) ------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 2px solid var(--paper-2); vertical-align: middle; }
th { font-family: var(--font-hand); font-size: 1.2rem; font-weight: 400; border-bottom: var(--border); }
td form { display: inline; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-block; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  border: 2px solid var(--ink); border-radius: 99px; padding: 1px 8px; background: #fffdf7; }
.badge.pending { background: var(--sun); }
.badge.active { background: var(--moss-light); }
.badge.banned, .badge.rejected { background: var(--rust-light); }
.badge.admin { background: var(--sky); }

/* ---- Fußzeile --------------------------------------------------------- */
footer { border-top: var(--border); background: var(--paper); padding: 14px 0; font-size: .88rem; color: var(--ink-soft); }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.error-page { text-align: center; }
.error-page .code { font-family: var(--font-hand); font-size: 5rem; line-height: 1; color: var(--rust); }
.form-foot { margin: 16px 0 0; }

/* Mobile: Navigation als wischbare Zeile */
@media (max-width: 640px) {
  .nav { width: 100%; margin-left: 0; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; white-space: nowrap; }
  .card { padding: 18px 16px; }
}

/* ======================================================================
   Hub-Ergänzungen
   ====================================================================== */
.stats .val .plus, .plus { font-family: var(--font-body); font-size: .8rem; font-weight: 800; color: var(--moss-dark); margin-left: 4px; vertical-align: super; }
a.place.open { border-style: solid; border-color: var(--ink); color: var(--ink); background: var(--paper-3); font-weight: 400; box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .1s ease; }
a.place.open .phase { color: var(--moss-dark); }
a.place.open:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: var(--paper-3); }
h2.with-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
h2.with-meta small { font-family: var(--font-body); font-size: .95rem; font-weight: 700; color: var(--ink-soft); }

/* ======================================================================
   Charaktermenü / Spind
   ====================================================================== */
.locker { --cell: clamp(62px, 19vw, 84px); --gap: 8px;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.locker-side { display: grid; gap: 22px; min-width: 0; }
.locker-side > .card + .card { margin-top: 0; }
@media (max-width: 860px) { .locker { grid-template-columns: minmax(0, 1fr); } .spind { justify-self: center; } }

/* Holz-Spind */
.card.spind { padding: 16px; background-color: #c69c6d;
  background-image: repeating-linear-gradient(90deg, rgba(42,33,26,.07) 0 2px, transparent 2px 46px),
                    linear-gradient(180deg, rgba(255,255,255,.12), rgba(0,0,0,.06)); }

.paperdoll { display: grid; gap: var(--gap);
  grid-template-columns: repeat(4, var(--cell));
  grid-template-rows: repeat(5, var(--cell));
  grid-template-areas:
    "kopf       doll    doll      weste"
    "gesicht    doll    doll      rucksack"
    "torso      doll    doll      hose"
    "handschuhe doll    doll      schuhe"
    "primaer    primaer sekundaer uhr"; }
.a-kopf { grid-area: kopf; } .a-gesicht { grid-area: gesicht; } .a-torso { grid-area: torso; }
.a-handschuhe { grid-area: handschuhe; } .a-weste { grid-area: weste; } .a-rucksack { grid-area: rucksack; }
.a-hose { grid-area: hose; } .a-schuhe { grid-area: schuhe; } .a-primaer { grid-area: primaer; }
.a-sekundaer { grid-area: sekundaer; } .a-uhr { grid-area: uhr; }

.doll { grid-area: doll; position: relative; border: var(--border); border-radius: 10px; overflow: hidden;
  background: radial-gradient(ellipse 38% 5% at 50% 94%, rgba(42,33,26,.22), transparent 100%),
              linear-gradient(180deg, #fbf5e8 0 78%, #eadbbd 78% 100%); box-shadow: inset 0 0 0 3px rgba(255,255,255,.5); }
.doll img { position: absolute; inset: 4% 0 6%; width: 100%; height: 90%; object-fit: contain; pointer-events: none; }
.doll .z1 { z-index: 1; } .doll .z2 { z-index: 2; } .doll .z3 { z-index: 3; } .doll .z4 { z-index: 4; }
.doll .z5 { z-index: 5; } .doll .z6 { z-index: 6; } .doll .z7 { z-index: 7; } .doll .z8 { z-index: 8; }
.doll .z9 { z-index: 9; } .doll .z10 { z-index: 10; } .doll .z11 { z-index: 11; }
.doll .z12 { z-index: 12; } .doll .z13 { z-index: 13; }
.doll-name { position: absolute; left: 0; right: 0; bottom: 2px; z-index: 14; text-align: center;
  font-family: var(--font-hand); font-size: 1.05rem; color: var(--ink-soft); }

/* Slots & Inventarfelder */
.slot, .cell { position: relative; border: 2.5px solid var(--ink); border-radius: 8px;
  background: #efe3c8; box-shadow: inset 2px 2px 0 rgba(42,33,26,.12); }
.slot { background: #f3e9d2; }
.slot-label { position: absolute; top: 3px; left: 5px; z-index: 2; pointer-events: none;
  font-size: .6rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: rgba(42,33,26,.55);
  max-width: calc(100% - 8px); overflow: hidden; white-space: nowrap; }
.slot .ph { position: absolute; inset: 18% 14% 10%; width: 72%; height: 72%; object-fit: contain;
  opacity: .18; filter: grayscale(1); pointer-events: none; }

.inv-group + .inv-group { margin-top: 14px; }
.inv-label { font-weight: 800; font-size: .9rem; margin-bottom: 6px; }
.inv-label small { color: var(--ink-soft); font-weight: 700; }
.cells { display: grid; grid-template-columns: repeat(auto-fill, var(--cell)); gap: var(--gap); }
.cell { width: var(--cell); height: var(--cell); }

/* Items (anklickbar + ziehbar) */
.item { position: absolute; inset: 0; }
.item > summary { list-style: none; position: absolute; inset: 0; display: grid; place-items: center;
  cursor: grab; border-radius: 6px; -webkit-user-select: none; user-select: none; }
.item > summary::-webkit-details-marker { display: none; }
.item > summary img { position: absolute; left: 12%; top: 12%; width: 76%; height: 76%; object-fit: contain;
  pointer-events: none; transition: transform .12s ease; }
.item > summary:hover img { transform: scale(1.07) rotate(-2deg); }
.slot .item > summary img { top: 20%; height: 70%; }
.a-primaer .item > summary img { left: 5%; width: 90%; top: 24%; height: 64%; }
.item[open] > summary { box-shadow: 0 0 0 3px var(--moss) inset; background: rgba(169,204,124,.35); }
.tag { position: absolute; bottom: 3px; font-size: .72rem; font-weight: 800; line-height: 1; padding: 2px 4px; border-radius: 4px;
  border: 1.5px solid var(--ink); pointer-events: none; }
.tag-bonus { right: 3px; background: var(--moss-light); }
.tag-cap { left: 3px; background: var(--sky); }

.menu { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 60;
  width: 250px; background: var(--paper-3); border: var(--border); border-radius: 10px; box-shadow: var(--shadow);
  padding: 12px 14px; cursor: auto; text-align: left; font-size: .92rem; line-height: 1.4; }
.menu.align-right { left: auto; right: -3px; transform: none; }
.menu.align-left { left: -3px; transform: none; }
.menu-title { display: block; font-family: var(--font-hand); font-size: 1.4rem; font-weight: 400; line-height: 1.1; margin-bottom: 4px; }
.menu-desc { margin: 0 0 8px; color: var(--ink-soft); }
.menu-bonus { list-style: none; margin: 0 0 6px; padding: 0; font-weight: 800; color: var(--moss-dark); }
.menu-fits { margin: 0 0 10px; font-size: .82rem; color: var(--ink-soft); }
.menu-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.menu-actions form { margin: 0; }
@media (max-width: 640px) {
  .menu, .menu.align-left, .menu.align-right { position: fixed; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; transform: none; }
}

/* Drag & Drop */
body.dragging .slot.can-drop, body.dragging .cell.can-drop { outline: 3px dashed var(--moss); outline-offset: 2px; }
body.dragging .slot.can-drop { background: #dbe9c7; }
.slot.drop-hover, .cell.drop-hover { background: var(--moss-light) !important; }
body.dragging .item[data-dragging] { opacity: .35; }
body.busy #locker { pointer-events: none; opacity: .75; transition: opacity .15s; }

/* Werte mit Plus-Knöpfen */
.stats li { position: relative; }
.stats li:has(.stat-plus) { grid-template-columns: 1fr auto auto; grid-template-areas: "name val plus" "hint val plus"; }
.stats li:has(.stat-plus) .name { grid-area: name; }
.stats li:has(.stat-plus) .val { grid-area: val; }
.stats li:has(.stat-plus) .hint { grid-area: hint; }
.stat-plus { grid-area: plus; margin: 0; }
.stat-plus .btn { width: 36px; height: 36px; padding: 0; font-size: 1.5rem; }
.points { margin: 0 0 12px; }

/* Hinweis-Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; max-width: min(520px, calc(100vw - 32px));
  background: var(--rust-light); border: var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 10px 16px; font-weight: 700;
  pointer-events: none; }

/* ======================================================================
   Zimmer
   ====================================================================== */
.room-page { --cell: clamp(58px, 17vw, 72px); --gap: 8px; }
.room-card { padding: 12px; }
.room-frame { border: var(--border); border-radius: 8px; overflow: hidden; background: #efe6d2; line-height: 0; }
.room-svg { display: block; width: 100%; height: auto; }
.room-svg .hot { cursor: pointer; }
.room-svg .hot:hover, .room-svg .hot:focus-visible { filter: brightness(1.06) drop-shadow(0 0 4px rgba(255, 246, 200, .9)); outline: none; }
.room-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 6px 2px; font-size: .92rem; }
.rstat small { color: var(--ink-soft); }
.heart { color: var(--rust); }

.room-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 22px; margin-top: 22px; align-items: start; }
.room-side { display: grid; gap: 22px; }
.room-side > .card + .card { margin-top: 0; }
@media (max-width: 900px) { .room-grid { grid-template-columns: minmax(0, 1fr); } }

.room-upgrades { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.room-upgrades > .card + .card { margin-top: 0; }
.place-card { padding: 16px 18px; scroll-margin-top: 20px; transition: box-shadow .2s, transform .2s; }
.place-card:target { box-shadow: 0 0 0 4px var(--sun), var(--shadow); transform: translateY(-2px); }
.place-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.place-head h3 { margin: 0; }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: #fffdf7; }
.pips i.on { background: var(--moss); }
.place-now { margin: 8px 0 4px; font-size: .93rem; }
.place-effect { margin: 0 0 10px; font-size: .88rem; color: var(--ink-soft); }
.place-done { margin: 0; font-weight: 800; color: var(--moss-dark); }
.place-next { border-top: 2px dashed #cdbfa3; padding-top: 10px; }
.next-title { font-size: .9rem; margin-bottom: 8px; }
.gem-plus { color: var(--rust); font-weight: 800; white-space: nowrap; }
.costs { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.costs li { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 8px; font-size: .88rem;
  padding: 2px 8px 2px 2px; border-radius: 6px; }
.costs li img { width: 26px; height: 26px; }
.costs .salt { display: inline-grid; place-items: center; width: 26px; color: #b8a98f; }
.costs li.ok { background: rgba(169,204,124,.3); }
.costs li.miss { background: rgba(240,195,168,.55); }
.costs li.miss b { color: #9e3f2b; }
.btn[disabled] { cursor: not-allowed; opacity: .65; transform: none; box-shadow: var(--shadow-sm); }

.cell-tisch { background: #e9d7b4; }
.tag-qty { top: 3px; right: 3px; bottom: auto; background: #fffdf7; }
.tag-gem { left: 3px; background: var(--rust-light); }
.menu-title small { font-family: var(--font-body); font-size: .8rem; color: var(--ink-soft); }
.hint.warn { color: #9e3f2b; font-weight: 700; }
.toast.ok { background: var(--moss-light); }

/* ======================================================================
   Markt / Robert
   ====================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.market-card { padding: 12px; }
.market-frame { border: var(--border); border-radius: 8px; overflow: hidden; line-height: 0; background: #a9d8e3; }
.market-svg { display: block; width: 100%; height: auto; }
.market-svg .hot { cursor: pointer; }
.market-svg .hot:hover, .market-svg .hot:focus-visible { filter: brightness(1.07) drop-shadow(0 0 5px rgba(255, 246, 200, .95)); outline: none; }

.dialog { scroll-margin-top: 12px; }
.dialog-head { display: flex; gap: 14px; align-items: flex-start; }
.portrait { flex: 0 0 84px; width: 84px; height: 90px; border: var(--border); border-radius: 50% 50% 12px 12px; overflow: hidden; box-shadow: var(--shadow-sm); background: #6b4428; }
.portrait-svg { width: 100%; height: 100%; display: block; }
.speech { position: relative; flex: 1; background: #fffdf7; border: var(--border); border-radius: 14px; padding: 10px 16px 12px; box-shadow: var(--shadow-sm); }
.speech::before { content: ''; position: absolute; left: -13px; top: 22px; border: 10px solid transparent; border-right: 12px solid var(--ink); border-left: 0; }
.speech::after { content: ''; position: absolute; left: -8px; top: 24px; border: 8px solid transparent; border-right: 9px solid #fffdf7; border-left: 0; }
.speech .speaker { font-family: var(--font-hand); font-size: 1.15rem; color: var(--rust); }
.speech p { margin: 2px 0 0; font-size: 1.05rem; }
.speech.ok { background: #eef6e3; } .speech.ok::after { border-right-color: #eef6e3; }
.speech.err { background: #fbe6db; } .speech.err::after { border-right-color: #fbe6db; }

.confirm { margin: 16px 0 4px; border: 3px dashed var(--rust); border-radius: 10px; padding: 12px 14px; background: #fff8ea; }
.confirm-item { display: flex; gap: 12px; align-items: center; }
.confirm-item img { width: 56px; height: 56px; flex: 0 0 56px; }
.confirm .warn { color: #9e3f2b; font-weight: 800; }
.confirm-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.confirm-actions form { margin: 0; }
a.btn { background-image: none; }
a.btn.plain { color: var(--ink); }

.dialog-options { display: grid; gap: 6px; margin: 16px 0 10px; }
.dialog-options .option { font-family: var(--font-hand); font-size: 1.2rem; font-weight: 400; color: var(--ink); justify-self: start; }
.dialog-options .option::before { content: '▸ '; color: var(--rust); }
.dialog-options .option.active { color: var(--moss-dark); background-size: 100% 2px; }
.purse { font-size: .9rem; color: var(--ink-soft); padding: 8px 0 4px; border-top: 2px dashed #cdbfa3; }

.list-title { margin: 16px 0 8px; font-size: 1.35rem; }
.list-title small { font-family: var(--font-body); font-size: .8rem; color: var(--ink-soft); }
.wares { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ware { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center;
  background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 10px; padding: 6px 10px; scroll-margin-top: 80px; }
.ware img { width: 48px; height: 48px; }
.ware-text { display: grid; min-width: 0; }
.ware-text small { color: var(--ink-soft); font-size: .8rem; line-height: 1.3; }
.ware-text .stock { color: var(--rust); font-weight: 800; }
.ware .price { font-family: var(--font-hand); font-size: 1.4rem; white-space: nowrap; }
.ware .salt { font-size: .8rem; color: #b8a98f; }
.ware.pointed { box-shadow: 0 0 0 4px var(--sun); }
.ware.sold-out { opacity: .6; }
.qty-form { display: flex; gap: 6px; align-items: center; margin: 0; }
.qty-form input[type=number] { width: 64px; font: inherit; border: 2.5px solid var(--ink); border-radius: 8px; padding: 5px 6px; background: #fff; }
@media (max-width: 640px) {
  .ware { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .ware img { width: 40px; height: 40px; }
  .qty-form { grid-column: 1 / -1; justify-content: flex-end; }
  .portrait { flex-basis: 64px; width: 64px; height: 70px; }
}

/* ======================================================================
   Missionen
   ====================================================================== */
.warn { color: #9e3f2b; font-weight: 800; }
.chip-mission, .chip-injured { color: var(--paper); font-weight: 700; background: none; }
.chip-mission { color: var(--moss-light); }
.chip-mission.done { color: var(--sun); }
.chip-mission:hover { background-size: 100% 2px; }
.chip-injured { color: var(--rust-light); }

.scene { border: var(--border); border-radius: 8px; overflow: hidden; line-height: 0; background: #f3d9b0; margin-bottom: 14px; }
.scene img { display: block; width: 100%; height: auto; }
.scene.small { margin: 0; }

.mission-card { display: flex; flex-direction: column; }
.mission-card .hint { margin-top: auto; padding-top: 8px; }
.durations { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.duration { display: grid; gap: 2px; text-align: center; color: var(--ink); font-weight: 400; background: #fffdf7;
  border: 2.5px solid var(--ink); border-radius: 10px; padding: 8px 6px; box-shadow: var(--shadow-sm); transition: transform .1s, box-shadow .1s; }
.duration b { font-family: var(--font-hand); font-size: 1.6rem; font-weight: 400; line-height: 1; }
.duration span { font-weight: 800; color: #9a6a1c; font-size: .9rem; }
.duration small { font-size: .74rem; line-height: 1.25; }
.duration:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); background: #eef6e3; }
.duration.disabled { opacity: .55; }
.confirm-card { border-color: var(--rust); scroll-margin-top: 12px; margin-bottom: 22px; }

.mission-away { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.mission-away .scene { margin: 0; }
@media (max-width: 760px) { .mission-away { grid-template-columns: minmax(0, 1fr); } }

.loot { scroll-margin-top: 12px; }
.loot-head { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 18px; align-items: center; margin-bottom: 14px; }
@media (max-width: 640px) { .loot-head { grid-template-columns: minmax(0, 1fr); } }
.events { margin: 0; padding-left: 20px; color: var(--ink-soft); font-style: italic; }
.events li + li { margin-top: 4px; }
.find { transition: background .15s, box-shadow .15s; }
.find.kept { background: #eef6e3; box-shadow: 0 0 0 3px var(--moss-light); }
.find.tier-rare { border-color: #b8860b; }
.find.tier-rare img { filter: drop-shadow(0 0 5px rgba(241, 210, 122, .95)); }
.keep { display: flex; align-items: center; gap: 6px; margin: 0; font-size: .9rem; white-space: nowrap; }
.keep input[type=number] { width: 60px; font: inherit; border: 2.5px solid var(--ink); border-radius: 8px; padding: 5px 6px; background: #fff; }
.keep.check { cursor: pointer; }
.keep input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--moss); }
.budget { margin: 16px 0 14px; }
.bar.over::-webkit-progress-value { background-color: var(--rust); }
.bar.over::-moz-progress-bar { background-color: var(--rust); }
@media (max-width: 640px) { .keep { grid-column: 1 / -1; justify-content: flex-end; } }

.report { border-color: var(--moss-dark); background: #f3f8ea; }
.report-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.report-items li { display: flex; align-items: center; gap: 6px; background: #fffdf7; border: 2px solid var(--ink); border-radius: 8px; padding: 4px 10px 4px 4px; font-weight: 700; font-size: .9rem; }
.report-items img { width: 32px; height: 32px; }
.report-facts { margin: 0; padding-left: 20px; }
.report-facts li + li { margin-top: 4px; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .92rem; }
.history li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 6px 0; border-bottom: 2px dashed #e0d3b8; }
.history li:last-child { border-bottom: 0; }

/* ======================================================================
   Minispiele / Harpyienhatz
   ====================================================================== */
.soon-card { border-style: dashed; color: var(--ink-soft); box-shadow: none; }
.hatz-card { padding: 10px; }
.hatz { position: relative; width: 100%; aspect-ratio: 16 / 9; border: var(--border); border-radius: 8px; overflow: hidden;
  background: #4f5d8c; user-select: none; -webkit-user-select: none; touch-action: none; }
.hatz canvas { display: block; width: 100%; height: 100%; }
.hatz.playing canvas { cursor: none; }
.hatz-screen { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; overflow: auto;
  background: rgba(42, 33, 26, .35); }
.hatz-screen[hidden] { display: none; }
.hatz-panel { width: min(560px, 100%); max-height: 100%; overflow: auto; background: var(--paper-3); border: var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 20px; }
.hatz-panel h2 { margin-bottom: 6px; }
.guns { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.guns legend { font-weight: 800; margin-bottom: 4px; }
.gun { display: grid; grid-template-columns: 22px 92px minmax(0, 1fr); align-items: center; gap: 10px; margin: 0; cursor: pointer;
  background: #fffdf7; border: 2.5px solid var(--ink); border-radius: 10px; padding: 4px 10px; font-weight: 400; }
.gun:has(input:checked) { background: #eef6e3; box-shadow: 0 0 0 3px var(--moss-light); }
.gun input { width: 18px; height: 18px; accent-color: var(--moss); }
.gun img { width: 92px; height: 40px; object-fit: contain; }
.gun span { display: grid; line-height: 1.25; }
.gun small { color: var(--ink-soft); font-size: .78rem; }
.hatz-help { margin-top: 10px; }
.hatz-result { margin: 0 0 10px; padding-left: 20px; }
.hatz-result .pts { font-weight: 800; }
.hatz-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; z-index: 3; }
.hatz-tools button, .hatz-touch button { font: inherit; font-family: var(--font-hand); font-size: 1rem; color: var(--ink); cursor: pointer;
  background: rgba(251, 245, 232, .85); border: 2.5px solid var(--ink); border-radius: 8px; padding: 2px 10px; }
.hatz:not(.playing) [data-action="quit"] { display: none; }
.hatz-touch { position: absolute; right: 10px; bottom: 76px; display: grid; gap: 8px; z-index: 3; justify-items: end; }
.hatz-touch[hidden] { display: none; }
.hatz-touch button { font-size: 1.1rem; padding: 6px 14px; }
.hatz-touch .fire { width: 92px; height: 92px; border-radius: 50%; font-size: 1.4rem; background: rgba(224, 87, 63, .85); color: #fff6ea; }
.hatz:fullscreen { border: 0; border-radius: 0; width: 100vw; height: 100vh; aspect-ratio: auto; display: grid; place-items: center; background: #15120f; }
.hatz:fullscreen canvas { width: min(100vw, 177.78vh); height: min(56.25vw, 100vh); }
.board { margin: 0 0 10px; padding-left: 24px; display: grid; gap: 4px; }
.board li { padding: 2px 0; }
.board li span { display: inline-block; min-width: 180px; }
@media (max-width: 640px) {
  .hatz-panel { padding: 10px 12px; }
  .gun { grid-template-columns: 20px 64px minmax(0, 1fr); }
  .gun img { width: 64px; }
}
.hatz.immersive { position: fixed; inset: 0; z-index: 60; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto;
  border: 0; border-radius: 0; background: #15120f; display: grid; place-items: center; }
.hatz.immersive canvas { width: min(100vw, 177.78vh); height: min(56.25vw, 100vh); }
@supports (height: 100dvh) { .hatz.immersive canvas { width: min(100vw, 177.78dvh); height: min(56.25vw, 100dvh); } }
/* Handy quer: Startfenster kompakt */
@media (max-height: 520px) {
  .hatz-panel { padding: 8px 12px; }
  .hatz-panel h2 { font-size: 1.4rem; margin-bottom: 2px; }
  .hatz-panel p { margin-bottom: 6px; font-size: .9rem; }
  .hatz-help { display: none; }
  .guns { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
  .guns legend { display: none; }
  .gun { grid-template-columns: 16px 54px minmax(0, 1fr); gap: 6px; padding: 2px 6px; }
  .gun img { width: 54px; height: 28px; }
  .gun small { display: none; }
}
/* Barrikadenschutz: Schütze sitzt rechts → Touch-Knöpfe links */
#barri .hatz-touch { left: 10px; right: auto; justify-items: start; }

/* ---- Markieren (Merkliste) ---------------------------------------------- */
.pin-ico { width: 14px; height: 18px; vertical-align: -3px; flex: none; }
.tag-pin { position: absolute; top: 1px; left: 3px; pointer-events: none; filter: drop-shadow(0 1px 0 rgba(255,253,247,.9)); }
.tag-pin .pin-ico { width: 15px; height: 19px; }
.item.marked > summary { box-shadow: 0 0 0 2px var(--rust-light) inset; }
.item.marked[open] > summary { box-shadow: 0 0 0 3px var(--moss) inset; }
.menu-mark { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 8px; padding: 6px 8px; font-size: .84rem;
  background: rgba(240,195,168,.4); border-radius: 6px; }
.pin-btn .pin-ico { margin-right: 2px; }
.pin-btn.on { background: rgba(240,195,168,.6); }
.pin-inline .pin-ico { width: 13px; height: 16px; }
.place-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.place-card.marked { box-shadow: 0 0 0 3px var(--rust-light), var(--shadow); }
.marklist .marks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 5px; }
.marklist .marks li { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: 8px; align-items: center;
  padding: 4px 6px; border-radius: 6px; background: rgba(255,253,247,.6); }
.marklist .marks li.miss { background: rgba(240,195,168,.45); }
.marklist .marks li.done { background: rgba(169,204,124,.3); }
.marklist .marks img { width: 32px; height: 32px; }
.mark-text { display: grid; min-width: 0; line-height: 1.25; }
.mark-text small { color: var(--ink-soft); font-size: .78rem; }
.mark-text .where { color: var(--moss); }
.marklist .count { font-family: var(--font-hand); font-size: 1.2rem; }
.marklist .marks li.miss .count { color: #9e3f2b; }
.marklist form { margin: 0; }
.marklist .btn.small { padding: 2px 8px; min-width: 0; }
.mark-places { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.mark-chip { font-size: .82rem; padding: 2px 8px; border: 1.5px solid var(--ink); border-radius: 999px; background: rgba(240,195,168,.55);
  text-decoration: none; color: var(--ink); }
.mark-chip.ok { background: rgba(169,204,124,.45); }
.mark-hint { display: flex; gap: 6px; align-items: flex-start; font-size: .9rem; margin: 6px 0; }
.mark-note { color: var(--rust) !important; font-weight: 700; }
.ware.marked { box-shadow: 0 0 0 2px var(--rust-light); }
.ware-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pin-form { display: inline; margin: 0; }
.pin-toggle { border: 1.5px solid var(--ink); background: var(--paper-3); border-radius: 999px; padding: 1px 6px; line-height: 1;
  cursor: pointer; opacity: .45; }
.pin-toggle:hover, .pin-toggle:focus-visible { opacity: 1; }
.pin-toggle.on { opacity: 1; background: rgba(240,195,168,.8); }
.slot .tag-pin { left: auto; right: 3px; }
.pin-toggle.via { opacity: .8; }

/* ---- Aussehen (Spiegel & Erstellung) -------------------------------------- */
.create-wrap { max-width: 900px; margin: 0 auto; }
.look-title { margin: 18px 0 2px; }
.look-editor { display: grid; grid-template-columns: minmax(170px, 240px) minmax(0, 1fr); gap: 18px; align-items: start; margin: 10px 0 16px; }
.look-preview { position: sticky; top: 12px; display: grid; gap: 8px; justify-items: center; background: #fffdf7; border: var(--border);
  border-radius: 12px; padding: 10px; box-shadow: inset 0 -30px 40px -30px rgba(42,33,26,.12); }
.look-preview img { width: 100%; max-width: 220px; aspect-ratio: 1 / 2; }
.look-hat { font-size: .88rem; display: flex; gap: 6px; align-items: center; }
.look-fields { display: grid; gap: 10px; }
.look-field { border: 0; padding: 0; margin: 0; }
.look-field legend { font-family: var(--font-hand); font-size: 1.25rem; padding: 0; margin-bottom: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-opt { position: relative; cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-opt > span:not(.sr-only) { display: inline-block; padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper-3);
  font-size: .9rem; line-height: 1.3; }
.chip-opt input:checked + span { background: var(--moss-light); box-shadow: 0 0 0 2px var(--moss); }
.chip-opt input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.chip-opt.swatch .sw { display: block; width: 34px; height: 34px; border-radius: 50%; }
.chip-opt.swatch input:checked + .sw { box-shadow: 0 0 0 3px var(--paper-3), 0 0 0 5px var(--moss); }
.chip-opt.swatch input:focus-visible + .sw { outline: 3px solid var(--sun); outline-offset: 3px; }
@media (max-width: 640px) {
  .look-editor { grid-template-columns: 1fr; }
  .look-preview { position: static; grid-template-columns: 110px 1fr; justify-items: start; align-items: center; }
  .look-preview img { max-width: 110px; grid-row: span 2; }
}
.mirror-card .confirm-actions { margin-top: 6px; }
.menu-color { margin: -2px 0 6px; font-size: .86rem; }

/* ---- Innenhof-Karte ------------------------------------------------------- */
.hof-card { padding: 0; overflow: hidden; }
.hof-frame { position: relative; background: #a7b877; }
.hof-svg { display: block; width: 100%; height: auto; }
.hof-svg .sky, .hof-svg .only-morgen, .hof-svg .only-tag, .hof-svg .only-abend, .hof-svg .only-nacht { display: none; }
.mood-morgen .sky-morgen, .mood-tag .sky-tag, .mood-abend .sky-abend, .mood-nacht .sky-nacht,
.mood-morgen .only-morgen, .mood-tag .only-tag, .mood-abend .only-abend, .mood-nacht .only-nacht { display: inline; }
.hof-svg .tint { pointer-events: none; mix-blend-mode: multiply; fill: transparent; }
.mood-morgen .tint { fill: #ffd9b8; opacity: .35; }
.mood-abend .tint { fill: #f0a070; opacity: .4; }
.mood-nacht .tint { fill: #27305a; opacity: .72; }
.hof-svg .lights { pointer-events: none; opacity: 0; transition: opacity .6s; }
.mood-abend .lights { opacity: .85; }
.mood-nacht .lights { opacity: 1; }
.hof-svg .sign-t { font-family: var(--font-hand); }
.hof-svg .hot { cursor: pointer; }
.hof-svg .hot:hover, .hof-svg .hot:focus-visible { filter: brightness(1.08) drop-shadow(0 0 6px rgba(255, 246, 200, .95)); outline: none; }
.hof-svg .hot.soon { cursor: help; }
.hof-svg .sign-link:hover rect, .hof-svg .sign-link:focus-visible rect { fill: #fff3c4; }
.hof-svg .birds g { animation: hof-fly 7s ease-in-out infinite alternate; }
.hof-svg .birds g:nth-child(2) { animation-duration: 9s; } .hof-svg .birds g:nth-child(3) { animation-duration: 6s; }
@keyframes hof-fly { from { translate: 0 0; } to { translate: 40px -12px; } }
@media (prefers-reduced-motion: reduce) { .hof-svg .birds g { animation: none; } }
.hof-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 18px; border-top: var(--border); background: var(--paper-3); }
.hstat { display: inline-flex; align-items: center; gap: 6px; font-size: .92rem; white-space: nowrap; }
.hstat-bar progress { width: 110px; height: 12px; }
.hstat small { color: var(--ink-soft); }
.hstat-alert { font-weight: 800; color: var(--rust); }
.hstat-warn { color: #9e3f2b; font-weight: 700; }
.places-compact { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.places-compact .place { padding: 10px 12px; font-size: .9rem; }
@media (max-width: 640px) {
  .hof-card { margin-left: -12px; margin-right: -12px; border-radius: 0; border-left: 0; border-right: 0; }
  .hstat-bar progress { width: 80px; }
}

/* ---- Café „Bei Mira“ ------------------------------------------------------- */
.cafe-layout { display: grid; gap: 20px; }
.cafe-card { padding: 0; overflow: hidden; position: relative; }
.cafe-scene { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #e9dcc0; }
.cafe-scene .layer { position: absolute; inset: 0; pointer-events: none; }
.cafe-scene .layer > svg { display: block; width: 100%; height: 100%; }
.cafe-scene .layer.back { z-index: 0; pointer-events: auto; }
.cafe-scene .sign-t { font-family: var(--font-hand); }
.cafe-scene .only-morgen, .cafe-scene .only-tag, .cafe-scene .only-abend, .cafe-scene .only-nacht { display: none; }
.cafe-scene.mood-morgen .only-morgen, .cafe-scene.mood-tag .only-tag, .cafe-scene.mood-abend .only-abend, .cafe-scene.mood-nacht .only-nacht { display: inline; }
.cafe-scene .tint { position: absolute; inset: 0; z-index: 1500; pointer-events: none; mix-blend-mode: multiply; opacity: 0; }
.cafe-scene.mood-morgen .tint { background: #ffe2c4; opacity: .3; }
.cafe-scene.mood-abend .tint { background: #f3b27a; opacity: .22; }
.cafe-scene.mood-nacht .tint { background: #3a3f6a; opacity: .34; }
.cafe-scene .layer.lights { z-index: 1600; opacity: 0; }
.cafe-scene.mood-abend .layer.lights { opacity: .7; }
.cafe-scene.mood-nacht .layer.lights { opacity: 1; }
.cafe-scene .hot { cursor: pointer; }
.cafe-scene .hot:hover, .cafe-scene .hot:focus-visible { filter: brightness(1.08) drop-shadow(0 0 6px rgba(255, 246, 200, .95)); outline: none; }
.avatar { position: absolute; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; overflow: visible; }
.avatar .clip { display: block; width: 100%; height: 100%; }
.avatar img { display: block; width: 100%; height: 100%; pointer-events: none; }
.avatar.sitting .clip { overflow: hidden; }
.avatar.sitting img { height: calc(100% / .6); }
.avatar .nametag { position: absolute; left: 50%; top: -4px; transform: translate(-50%, -100%); white-space: nowrap; font-size: .75rem; font-weight: 800;
  background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 6px; padding: 1px 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.avatar:hover .nametag, .avatar:focus-visible .nametag, .avatar.mine .nametag { opacity: 1; }
.avatar.mine .nametag { background: var(--moss-light); }
.avatar:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.avatar .cup { position: absolute; right: 2%; top: 46%; width: 22%; aspect-ratio: 1; border-radius: 0 0 40% 40%; background: #f4ead5; border: 2px solid var(--ink); }
.avatar.sitting .cup { top: 72%; }
.avatar .cup[hidden] { display: none; }
.seat-mark { position: absolute; z-index: 1700; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 2.5px dashed var(--ink);
  background: rgba(255, 253, 247, .85); cursor: pointer; font-weight: 800; }
.seat-mark::after { content: '+'; }
.seat-mark:hover, .seat-mark:focus-visible { background: var(--sun); }
.seat-mark.steh { border-style: dotted; }
.crowd { position: absolute; right: 12px; bottom: 12px; z-index: 1700; background: var(--paper-3); border: var(--border); border-radius: 999px; padding: 3px 12px; font-weight: 800; font-size: .88rem; }
.profile { position: absolute; z-index: 1800; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; grid-template-columns: 120px 1fr; gap: 12px;
  align-items: center; width: min(360px, 90%); background: var(--paper-3); border: var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px; }
.profile .big { width: 120px; aspect-ratio: 1 / 2; }
.profile .info { display: grid; gap: 4px; font-size: .92rem; }
.profile .name { font-family: var(--font-hand); font-size: 1.5rem; font-weight: 400; }
.profile .close { position: absolute; right: 8px; top: 4px; border: 0; background: none; font-size: 1.6rem; cursor: pointer; line-height: 1; }
.profile .admin-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cafe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; border-top: var(--border); font-size: .9rem; }
.cafe-bar .here { font-weight: 800; }
.cafe-bar .funk-list { color: var(--ink-soft); }
.cafe-bar .cafe-actions { margin-left: auto; display: flex; gap: 8px; }
.cafe-bar .live { font-size: .78rem; color: var(--ink-soft); }
.cafe-bar .live.on { color: var(--moss-dark, #3f6b2a); }
.cafe-bar .live.on::before { content: '● '; color: #4caf50; }
/* Miras Menü: Popover über der Szene (Handy: unter der Szene) */
.mira-menu { display: none; position: absolute; z-index: 2000; right: 3%; top: 4%; width: min(380px, 42%); background: var(--paper-3);
  border: var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 14px 16px 10px; }
.mira-menu.open, .mira-menu:target { display: block; }
.mira-menu .close { position: absolute; right: 10px; top: 4px; font-size: 1.6rem; line-height: 1; color: var(--ink); text-decoration: none; }
.mira-menu .speech { margin-right: 18px; }
.mira-menu .drinks { display: grid; gap: 8px; margin: 12px 0 6px; }
.mira-menu .drink-form { margin: 0; }
.mira-menu .btn.drink { width: 100%; }
.mira-hint { position: absolute; z-index: 1700; left: 65%; top: 31%; transform: translate(-50%, -100%); background: var(--paper-3); border: 2px solid var(--ink);
  border-radius: 999px; padding: 3px 12px; font-size: .85rem; font-weight: 800; color: var(--ink); text-decoration: none; white-space: nowrap;
  box-shadow: var(--shadow-sm); animation: mira-bob 2.4s ease-in-out infinite; }
.mira-hint::after { content: ''; position: absolute; left: 50%; bottom: -8px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0; }
.mira-hint:hover, .mira-hint:focus-visible { background: var(--sun); }
@keyframes mira-bob { 50% { transform: translate(-50%, calc(-100% - 4px)); } }
@media (prefers-reduced-motion: reduce) { .mira-hint { animation: none; } }
.btn.drink { display: inline-flex; align-items: center; gap: 10px; text-align: left; }
.btn.drink img { width: 36px; height: 36px; }
.btn.drink small { display: block; font-weight: 600; }
.chat { display: flex; flex-direction: column; }
.chat .messages { max-height: 460px; min-height: 220px; }
.chat .older { align-self: center; margin-bottom: 6px; }
.messages { list-style: none; margin: 0 0 10px; padding: 0 4px 0 0; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 8px; }
.msg { background: rgba(255, 253, 247, .7); border: 1.5px solid rgba(42, 33, 26, .15); border-radius: 10px; padding: 6px 10px; font-size: .94rem; }
.msg .head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.msg .who { font-weight: 800; }
.msg .when { margin-left: auto; font-size: .72rem; color: var(--ink-soft); }
.msg .text { margin: 2px 0 0; overflow-wrap: anywhere; }
.msg .me-text { font-style: italic; color: #5b4d40; }
.msg .at { color: var(--rust); }
.msg.mine { background: rgba(169, 204, 124, .22); }
.msg.mention { border-color: var(--sun); box-shadow: 0 0 0 2px var(--sun); }
.msg.funk { background: rgba(115, 145, 176, .14); border-style: dashed; }
.msg .radio svg { width: 18px; height: 14px; vertical-align: -2px; }
.msg .funk-tag { color: #57718e; font-weight: 700; }
.msg.system { background: none; border: 0; padding: 2px 4px; text-align: center; color: var(--ink-soft); font-size: .84rem; font-style: italic; display: flex; gap: 8px; justify-content: center; }
.msg.system .when { margin-left: 0; }
.msg .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; position: relative; }
.msg .reacts { display: flex; gap: 4px; flex-wrap: wrap; }
.msg .react, .msg .react-add, .msg .palette button { border: 1.5px solid rgba(42, 33, 26, .3); background: var(--paper-3); border-radius: 999px; padding: 0 7px;
  font-size: .8rem; line-height: 1.6; cursor: pointer; }
.msg .react.mine { border-color: var(--moss); background: rgba(169, 204, 124, .35); }
.msg .react-add { opacity: .55; }
.msg:hover .react-add, .msg .react-add:focus-visible { opacity: 1; }
.msg .palette { display: flex; gap: 4px; background: var(--paper-3); border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 4px; }
.link-btn { border: 0; background: none; padding: 0; font-size: .74rem; color: var(--ink-soft); cursor: pointer; text-decoration: underline; }
.link-btn.danger { color: #9e3f2b; }
form.say { display: flex; gap: 8px; }
form.say input { flex: 1; min-width: 0; }
.chat-hint { margin: 6px 0 0; }
@media (max-width: 700px) {
  .mira-menu { position: relative; right: auto; top: auto; width: auto; border-width: 0; border-top: var(--border); border-radius: 0; box-shadow: none; }
  .mira-hint { font-size: .7rem; padding: 2px 8px; }
  .avatar .nametag { font-size: .62rem; }
  .chat .messages { max-height: 60vh; }
}
.profile[hidden], .crowd[hidden] { display: none; }

/* ---- Tageszeit in Zimmer und Markt ------------------------------------------ */
.room-svg .tint, .market-svg .tint { pointer-events: none; mix-blend-mode: multiply; fill: transparent; opacity: 0; }
.room-svg .lights, .market-svg .lights { pointer-events: none; opacity: 0; transition: opacity .6s; }
.room-svg .only-morgen, .room-svg .only-abend, .room-svg .only-nacht { display: none; }
.room-svg.mood-morgen .only-morgen, .room-svg.mood-abend .only-abend, .room-svg.mood-nacht .only-nacht { display: inline; }
.room-svg.mood-morgen .tint { fill: #ffe0c0; opacity: .22; }
.room-svg.mood-abend .tint { fill: #e89a6a; opacity: .32; }
.room-svg.mood-nacht .tint { fill: #262c5a; opacity: .62; }
.room-svg.mood-abend .lights { opacity: .75; }
.room-svg.mood-nacht .lights { opacity: 1; }
.market-svg.mood-morgen .tint { fill: #ffd9b8; opacity: .28; }
.market-svg.mood-abend .tint { fill: #f0a070; opacity: .36; }
.market-svg.mood-nacht .tint { fill: #27305a; opacity: .6; }
.market-svg.mood-abend .lights { opacity: .8; }
.market-svg.mood-nacht .lights { opacity: 1; }

/* Café: Unterwegs-Tafel (Kreidetafel unter der Szene) */
.away-board { margin: 0 16px 14px; padding: 10px 16px 12px; background: #34463a; color: #f1ecdf; border: 5px solid var(--wood);
  border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.away-board h3 { margin: 0 0 4px; font-family: var(--font-hand, 'Patrick Hand', cursive); font-size: 1.15rem; letter-spacing: .03em; color: #f6e7b8; }
.away-board ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-family: var(--font-hand, 'Patrick Hand', cursive); font-size: 1.05rem; }
.away-board li.empty { opacity: .75; }
.away-board small { color: #cfc8b4; font-size: .9em; }

/* Minispiel Wasserleitung */
.pipe-game { position: relative; }
.pipe-screen[hidden] { display: none; }
.pipe-screen h2 { margin-bottom: 6px; }
.pipe-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.pipe-size { display: grid; gap: 2px; text-align: left; padding: 10px 14px; }
.pipe-size small { font-family: 'Nunito', sans-serif; font-size: .8rem; color: var(--ink-soft); }
.pipe-size:disabled { opacity: .55; }
.pipe-top { font-size: .9rem; margin-top: 8px; }
.pipe-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-bottom: 10px; font-size: .95rem; }
.pipe-bar [data-title] { font-weight: 800; }
.pipe-bar .btn { margin-left: auto; }
.pipe-board { max-width: 760px; margin: 0 auto; }
.pipe-svg { display: block; width: 100%; height: auto; border: var(--border); border-radius: 8px; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.pipe-svg .tile { cursor: pointer; transform-box: fill-box; transform-origin: center; transition: transform .16s ease-out; outline: none; }
.pipe-svg .tile:focus-visible > rect { stroke: var(--sun); stroke-width: 6; }
.pipe-svg .tile:hover .shine { stroke: #fff; }
.pipe-svg .water { transition: stroke .2s, fill .2s; }
.pipe-svg .wet line.water { stroke: #4fb0dc; stroke-dasharray: 10 7; animation: pipe-flow .7s linear infinite; }
.pipe-svg .wet circle.water { fill: #4fb0dc; }
.pipe-svg .needle-on { display: none; }
.pipe-svg .outlet.wet .needle { display: none; }
.pipe-svg .outlet.wet .needle-on { display: inline; }
.pipe-svg .outlet.wet .lamp { fill: #8ee06a; }
.pipe-board.solved .tile { cursor: default; }
@keyframes pipe-flow { to { stroke-dashoffset: -17; } }
@media (prefers-reduced-motion: reduce) { .pipe-svg .wet line.water { animation: none; } .pipe-svg .tile { transition: none; } }

/* Seltenheit je Exemplar: Gewöhnlich · Gut · Selten · Legendär */
.q-badge { display: inline-block; padding: 0 7px; border-radius: 999px; font: 700 .72rem/1.5 'Nunito', sans-serif; color: #fff;
  border: 2px solid var(--ink); vertical-align: middle; letter-spacing: .02em; }
.q-badge.q-gut { background: #5d8a3a; }
.q-badge.q-selten { background: #3f7fc0; }
.q-badge.q-legendaer { background: #d9a62e; color: var(--ink); }
.q-badge.q-std { background: #9a958a; }
.find.q-gut { border-color: #5d8a3a; }
.find.q-selten { border-color: #3f7fc0; }
.find.q-legendaer { border-color: #d9a62e; }
/* Rahmen am Icon (Inventar, Slots, Händler) */
.item.q-gut > summary { box-shadow: inset 0 0 0 3px #5d8a3a; }
.item.q-selten > summary { box-shadow: inset 0 0 0 3px #3f7fc0; }
.item.q-legendaer > summary { box-shadow: inset 0 0 0 3px #d9a62e, 0 0 8px rgba(217, 166, 46, .7); }
img.qframe.q-gut, img.qframe.q-selten, img.qframe.q-legendaer { outline: 3px solid; outline-offset: -2px; border-radius: 8px; }
img.qframe.q-gut { outline-color: #5d8a3a; background: rgba(93, 138, 58, .12); }
img.qframe.q-selten { outline-color: #3f7fc0; background: rgba(63, 127, 192, .12); }
img.qframe.q-legendaer { outline-color: #d9a62e; background: rgba(217, 166, 46, .16); }
.ware small.boni { color: var(--moss-dark); font-weight: 700; }
.item > summary .q-dot { position: absolute; left: 3px; top: 3px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--ink); }
.q-dot.q-gut { background: #5d8a3a; } .q-dot.q-selten { background: #3f7fc0; } .q-dot.q-legendaer { background: #d9a62e; }
.q-plus { color: var(--moss-dark); font-weight: 700; }

/* Turm (Bangs) */
.turm-frame { border: var(--border); border-radius: 8px; overflow: hidden; line-height: 0; background: #8fc6d9; }
.turm-svg { display: block; width: 100%; height: auto; }
.turm-svg .hot { cursor: pointer; }
.turm-svg .hot:hover, .turm-svg .hot:focus-visible { filter: brightness(1.06) drop-shadow(0 0 5px rgba(255, 246, 200, .95)); outline: none; }
.turm-svg .only-nacht { display: none; }
.turm-svg.mood-nacht .only-nacht { display: inline; }
.turm-svg.mood-nacht .only-tag { display: none; }
.turm-svg .tint, .turm-svg .tint-bg { pointer-events: none; mix-blend-mode: multiply; fill: transparent; opacity: 0; }
.turm-svg.mood-morgen .tint-bg { fill: #ffd9b8; opacity: .25; }
.turm-svg.mood-abend .tint-bg { fill: #f0a070; opacity: .45; }
.turm-svg.mood-nacht .tint-bg { fill: #1f2750; opacity: .7; }
.turm-svg .lights { pointer-events: none; opacity: 0; transition: opacity .6s; }
.turm-svg.mood-morgen .tint { fill: #ffd9b8; opacity: .2; }
.turm-svg.mood-abend .tint { fill: #f0a070; opacity: .3; }
.turm-svg.mood-nacht .tint { fill: #1f2750; opacity: .55; }
.turm-svg.mood-abend .lights { opacity: .75; }
.turm-svg.mood-nacht .lights { opacity: 1; }
.offer-weapon .ware-name::after { content: ''; }

/* Impressum, Datenschutz, Konto */
.legal h2 { font-size: 1.25rem; margin: 18px 0 6px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.foot-links a { color: inherit; }
.konto-daten { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 8px 0 12px; }
.konto-daten dt { font-weight: 700; }
.danger-zone { border-color: var(--rust); margin-top: 20px; }
.danger-zone .check { display: flex; gap: 8px; align-items: center; margin: 10px 0 14px; }
.narrow.legal { max-width: 760px; }
