/* ====== Crafting Buch — Southwest Frontier Style ====== */

:root {
  /* Earth & Leather */
  --paper: #efe2c2;
  --paper-light: #f7ecd1;
  --paper-dark: #ddc89a;
  --paper-stain: #c8a96a;
  --leather: #4a2818;
  --leather-deep: #2a1408;
  --leather-mid: #6a3a20;
  --leather-light: #8a5836;

  /* Ink */
  --ink: #2a1810;
  --ink-soft: #5a3a26;
  --ink-fade: #8a6a4e;

  /* Accents — Southwest palette */
  --terracotta: #b8542a;
  --terracotta-dim: #8e3e1c;
  --turquoise: #2d7a82;
  --turquoise-bright: #3e9aa4;
  --ochre: #c89234;
  --sage: #8a9870;
  --crimson: #8a2418;

  /* States */
  --ok: #4a7236;
  --ok-bg: #c8d4a2;
  --warn: #c8842a;
  --warn-bg: #ecd29a;
  --bad: #a83020;
  --bad-bg: #e8b8a4;

  --shadow-1: 0 1px 2px rgba(42, 20, 8, 0.18);
  --shadow-2: 0 4px 16px rgba(42, 20, 8, 0.22);
  --shadow-3: 0 12px 40px rgba(20, 8, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Crimson Pro", "Crimson Text", Georgia, serif;
  color: var(--ink);
  font-size: 16px;
  min-height: 100vh;
  background: #1a0d05;
  background-image:
    radial-gradient(ellipse at top, #2a160a 0%, #120804 70%),
    repeating-linear-gradient(45deg, rgba(60, 30, 12, 0.06) 0 2px, transparent 2px 6px);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(180, 100, 40, 0.04) 0 30%, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(60, 140, 150, 0.03) 0 30%, transparent 60%);
  z-index: 0;
}

/* ====== Layout — open book ====== */
.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: 0;
  z-index: 1;
}

.book {
  position: relative;
  min-height: 100vh;
  background: var(--leather);
  background-image:
    repeating-linear-gradient(35deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(-20deg, rgba(255,200,140,0.025) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 30% 20%, #6a3a20 0%, #3a1e10 60%, #2a1408 100%);
  border-radius: 0;
  padding: 28px 24px 60px;
  box-shadow:
    inset 0 0 0 2px #1a0a04,
    inset 0 0 0 4px #6a3a20,
    inset 0 0 0 5px #1a0a04;
}

/* book-band edges replace the older corner studs */

/* geometric southwest band on book edges */
.book-band {
  position: absolute;
  left: 28px; right: 28px;
  height: 14px;
  pointer-events: none;
  opacity: 0.55;
}
.book-band.top { top: 8px; }
.book-band.bot { bottom: 8px; transform: scaleY(-1); }

.book-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--paper);
  border-radius: 3px;
  min-height: 820px;
  overflow: hidden;
  box-shadow:
    inset 0 0 80px rgba(120, 80, 30, 0.25),
    inset 0 0 0 1px rgba(80, 50, 20, 0.4);
}

/* paper texture */
.book-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 25%, rgba(140, 90, 40, 0.10) 0%, transparent 12%),
    radial-gradient(circle at 80% 60%, rgba(140, 90, 40, 0.08) 0%, transparent 15%),
    radial-gradient(circle at 50% 90%, rgba(80, 50, 20, 0.06) 0%, transparent 20%),
    repeating-linear-gradient(0deg, rgba(180, 130, 70, 0.02) 0 1px, transparent 1px 3px);
  pointer-events: none;
  z-index: 1;
}

/* spine shadow */
.book-inner::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 60px;
  transform: translateX(-50%);
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(60, 30, 12, 0.0) 20%,
    rgba(60, 30, 12, 0.32) 50%,
    rgba(60, 30, 12, 0.0) 80%,
    transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.page {
  position: relative;
  padding: 32px 36px;
  z-index: 1;
  min-height: 820px;
}
.page.left {
  padding-right: 48px;
  border-right: 1px solid rgba(80, 50, 20, 0.2);
}
.page.right {
  padding-left: 48px;
}

/* ====== Header ====== */
.book-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 18px;
  margin-bottom: 6px;
  border-bottom: 1px dashed rgba(80, 50, 20, 0.35);
}
.book-title {
  display: flex;
  align-items: center;
  gap: 14px;
}
.book-title h1 {
  font-family: "IM Fell English SC", "Cormorant SC", serif;
  font-size: 26px;
  margin: 0;
  letter-spacing: 0.06em;
  color: var(--paper);
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.book-title .sub {
  font-family: "Special Elite", "Cutive Mono", monospace;
  color: rgba(232, 210, 170, 0.7);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.nav-tabs {
  display: flex;
  gap: 0;
  background: rgba(20, 8, 4, 0.5);
  border: 1px solid rgba(212, 160, 96, 0.3);
  border-radius: 3px;
  padding: 3px;
}
.nav-tab {
  font-family: "IM Fell English SC", serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: rgba(232, 210, 170, 0.6);
  background: transparent;
  border: 0;
  padding: 8px 18px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}
.nav-tab:hover { color: var(--paper); }
.nav-tab.active {
  color: var(--leather-deep);
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--ochre);
}

/* ====== Page headings ====== */
.page-eyebrow {
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 4px;
}
.page-heading {
  font-family: "IM Fell English SC", serif;
  font-size: 32px;
  margin: 0 0 4px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.page-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 22px;
  color: var(--ink-soft);
}
.page-rule .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-soft) 20%, var(--ink-soft) 80%, transparent);
  opacity: 0.45;
}
.page-rule .glyph {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* ====== Categories sidebar ====== */
.cat-search {
  position: relative;
  margin-bottom: 16px;
}
.cat-search input {
  width: 100%;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.3);
  border-bottom: 1px solid var(--ink-soft);
  padding: 10px 14px 10px 36px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  border-radius: 0;
  outline: none;
}
.cat-search input:focus {
  border-color: var(--terracotta);
  background: #fff5dc;
}
.cat-search .icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  opacity: 0.5;
}

.cat-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Special Elite", monospace;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 10px 0;
  border-bottom: 1px dashed rgba(80, 50, 20, 0.3);
  margin-bottom: 14px;
  cursor: pointer;
  user-select: none;
}
.cat-toggle .box {
  width: 16px; height: 16px;
  border: 1px solid var(--ink-soft);
  background: var(--paper-light);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.cat-toggle .box.on { background: var(--terracotta); border-color: var(--terracotta-dim); }
.cat-toggle .box.on::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid var(--paper);
  border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg) translate(1px, -1px);
}

.cat-list {
  list-style: none;
  padding: 0; margin: 0;
}
.cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  font-family: "IM Fell English SC", serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.cat-item:hover {
  background: rgba(184, 84, 42, 0.08);
}
.cat-item.active {
  background: linear-gradient(90deg, rgba(184, 84, 42, 0.18), rgba(184, 84, 42, 0.02));
  border-left-color: var(--terracotta);
  color: var(--terracotta-dim);
}
.cat-item .sym {
  width: 22px; height: 22px;
  flex-shrink: 0;
  opacity: 0.7;
}
.cat-item.active .sym { opacity: 1; color: var(--terracotta); }
.cat-item .count {
  margin-left: auto;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  color: var(--ink-fade);
  letter-spacing: 0.1em;
}

/* ====== Recipe cards ====== */
.recipe-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.recipe {
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.18);
  box-shadow:
    inset 0 0 0 1px rgba(255, 240, 200, 0.4),
    0 2px 0 rgba(80, 50, 20, 0.08);
  position: relative;
}

/* geometric zigzag accent strip */
.recipe::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-image:
    linear-gradient(135deg, var(--terracotta) 25%, transparent 25%) -2px 0,
    linear-gradient(225deg, var(--terracotta) 25%, transparent 25%) -2px 0,
    linear-gradient(315deg, var(--terracotta) 25%, transparent 25%),
    linear-gradient(45deg, var(--terracotta) 25%, transparent 25%);
  background-size: 8px 8px;
  background-color: var(--leather-deep);
  opacity: 0.85;
}

.recipe-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(90deg,
    rgba(184, 84, 42, 0.18) 0%,
    rgba(200, 146, 52, 0.14) 50%,
    rgba(184, 84, 42, 0.04) 100%);
  border-bottom: 1px solid rgba(80, 50, 20, 0.18);
}
.recipe-head .out-icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
}
.recipe-name {
  font-family: "IM Fell English SC", serif;
  font-size: 19px;
  letter-spacing: 0.06em;
  color: var(--ink);
  flex: 1;
}
.recipe-meta {
  display: flex;
  gap: 14px;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-soft);
}
.recipe-meta .yield {
  background: var(--leather-deep);
  color: var(--paper);
  padding: 4px 10px;
  letter-spacing: 0.18em;
}

.recipe-body {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ing {
  position: relative;
  width: 76px;
  flex-shrink: 0;
  text-align: center;
}
.ing-slot {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid rgba(80, 50, 20, 0.3);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ing-slot::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(80, 50, 20, 0.15);
  pointer-events: none;
}
.ing.have .ing-slot { box-shadow: inset 0 0 0 2px var(--ok); }
.ing.short .ing-slot { box-shadow: inset 0 0 0 2px var(--bad); }
.ing.partial .ing-slot { box-shadow: inset 0 0 0 2px var(--warn); }

.ing-glyph {
  font-family: "IM Fell English SC", serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 240, 200, 0.6);
}

.ing-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--ink-soft);
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  padding: 2px 9px;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,0.12);
  color: var(--ink);
}
.ing.have .ing-badge { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.ing.short .ing-badge { background: var(--bad-bg); border-color: var(--bad); color: var(--bad); }
.ing.partial .ing-badge { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }

.ing-name {
  font-family: "Crimson Pro", serif;
  font-size: 11px;
  margin-top: 4px;
  color: var(--ink-soft);
  line-height: 1.15;
}

.recipe-arrow {
  font-family: "Special Elite", monospace;
  color: var(--ink-fade);
  letter-spacing: 0.2em;
  padding: 0 4px;
  font-size: 14px;
}

/* Craftable badge */
.craftable-pill {
  position: absolute;
  top: -10px;
  right: 14px;
  background: var(--ok);
  color: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* ====== Inventory ====== */
.inv-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.inv-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.18);
  position: relative;
}
.inv-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--leather-light);
  opacity: 0.5;
}
.inv-row.low::before { background: var(--bad); opacity: 1; }
.inv-row.mid::before { background: var(--warn); opacity: 1; }
.inv-row.full::before { background: var(--ok); opacity: 1; }

.inv-icon {
  width: 40px; height: 40px;
  background: var(--paper);
  border: 1px solid rgba(80, 50, 20, 0.25);
  display: grid;
  place-items: center;
  font-family: "IM Fell English SC", serif;
  font-size: 14px;
}
.inv-name {
  font-family: "Crimson Pro", serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.1;
}
.inv-name .sub {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--ink-fade);
  text-transform: uppercase;
  display: block;
  margin-top: 2px;
}
.inv-qty {
  display: flex;
  align-items: center;
  gap: 0;
}
.qty-btn {
  width: 26px; height: 26px;
  background: var(--paper);
  border: 1px solid var(--ink-soft);
  color: var(--ink);
  font-family: "IM Fell English SC", serif;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}
.qty-btn:hover { background: var(--ochre); color: var(--paper); }
.qty-input {
  width: 52px;
  text-align: center;
  border: 1px solid var(--ink-soft);
  border-left: 0; border-right: 0;
  background: var(--paper);
  font-family: "Special Elite", monospace;
  font-size: 14px;
  height: 26px;
  color: var(--ink);
  font-weight: 700;
}

/* ====== Locations ====== */
.loc-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.loc-card {
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.25);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.loc-card::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 40px; height: 40px;
  background: linear-gradient(225deg, var(--leather-light) 50%, transparent 50%);
  opacity: 0.25;
}
.loc-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.loc-name {
  font-family: "IM Fell English SC", serif;
  font-size: 20px;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.loc-type {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--terracotta-dim);
  padding: 3px 8px;
  border: 1px solid var(--terracotta-dim);
}
.loc-coords {
  margin-left: auto;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  color: var(--ink-fade);
  letter-spacing: 0.1em;
}
.loc-desc {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 10px;
}
.loc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.loc-tag {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 3px 8px;
  background: rgba(45, 122, 130, 0.1);
  border: 1px solid rgba(45, 122, 130, 0.4);
}
.danger-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.danger-dot::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
}
.danger-dot.sicher { color: var(--ok); }
.danger-dot.sicher::before { background: var(--ok); }
.danger-dot.mittel { color: var(--warn); }
.danger-dot.mittel::before { background: var(--warn); }
.danger-dot.gefährlich { color: var(--bad); }
.danger-dot.gefährlich::before { background: var(--bad); }

/* ====== Map ====== */
.loc-map {
  position: relative;
  background: var(--paper-dark);
  border: 1px solid rgba(80, 50, 20, 0.4);
  height: 440px;
  background-image:
    radial-gradient(circle at 30% 35%, rgba(138, 152, 112, 0.5) 0 18%, transparent 22%),
    radial-gradient(circle at 70% 60%, rgba(184, 84, 42, 0.18) 0 22%, transparent 26%),
    radial-gradient(circle at 50% 80%, rgba(45, 122, 130, 0.3) 0 14%, transparent 18%),
    repeating-linear-gradient(90deg, rgba(80, 50, 20, 0.07) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(0deg, rgba(80, 50, 20, 0.07) 0 1px, transparent 1px 30px);
  overflow: hidden;
}
.loc-map .compass {
  position: absolute;
  top: 12px; right: 12px;
  width: 56px; height: 56px;
  color: var(--leather-deep);
  opacity: 0.7;
}
.loc-pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: pointer;
}
.loc-pin svg { display: block; }
.loc-pin .pin-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Special Elite", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leather-deep);
  white-space: nowrap;
  background: var(--paper);
  padding: 2px 6px;
  border: 1px solid rgba(80, 50, 20, 0.3);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.loc-pin:hover .pin-label { opacity: 1; }

/* ====== Buttons & misc ====== */
.btn {
  font-family: "IM Fell English SC", serif;
  font-size: 13px;
  letter-spacing: 0.12em;
  background: var(--leather-deep);
  color: var(--paper);
  border: 1px solid var(--leather-deep);
  padding: 8px 16px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s;
}
.btn:hover { background: var(--terracotta); border-color: var(--terracotta-dim); }
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-soft);
}
.btn.ghost:hover { background: var(--paper-light); color: var(--terracotta-dim); }

.section-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 12px;
}
.summary-bar {
  display: flex;
  gap: 18px;
  margin-bottom: 18px;
  padding: 10px 14px;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.2);
  align-items: center;
}
.summary-bar .stat {
  display: flex;
  flex-direction: column;
}
.summary-bar .stat .label {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.summary-bar .stat .val {
  font-family: "IM Fell English SC", serif;
  font-size: 20px;
  color: var(--ink);
}
.summary-bar .stat .val.accent { color: var(--terracotta-dim); }
.summary-bar .divider {
  width: 1px;
  height: 28px;
  background: rgba(80, 50, 20, 0.2);
}

/* ornamental divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-fade);
  margin: 20px 0;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.ornament .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ink-fade), transparent);
  opacity: 0.4;
}

/* Empty state */
.empty {
  padding: 40px;
  text-align: center;
  color: var(--ink-fade);
  font-family: "Special Elite", monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* responsive — keep book layout, allow scaling */
@media (max-width: 900px) {
  .book-inner { grid-template-columns: 1fr; min-height: auto; }
  .book-inner::after { display: none; }
  .page.left { border-right: 0; border-bottom: 1px dashed rgba(80, 50, 20, 0.3); }
  .inv-grid { grid-template-columns: 1fr; }
}

/* ================== MODALS ================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 4, 0.78);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
}
.modal {
  background: var(--paper);
  border: 1px solid var(--leather-deep);
  box-shadow:
    inset 0 0 0 1px var(--leather-light),
    inset 0 0 80px rgba(120, 80, 30, 0.18),
    0 30px 80px rgba(0,0,0,0.6);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  position: relative;
  font-family: "Crimson Pro", serif;
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 520px; }
.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-image:
    linear-gradient(135deg, var(--terracotta) 25%, transparent 25%) -2px 0,
    linear-gradient(225deg, var(--terracotta) 25%, transparent 25%) -2px 0,
    linear-gradient(315deg, var(--terracotta) 25%, transparent 25%),
    linear-gradient(45deg, var(--terracotta) 25%, transparent 25%);
  background-size: 8px 8px;
  background-color: var(--leather-deep);
}
.modal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 22px 26px 8px;
}
.modal-head h3 {
  font-family: "IM Fell English SC", serif;
  font-size: 24px;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--ink);
}
.modal-head .eyebrow {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 2px;
}
.modal-close {
  background: transparent;
  border: 1px solid var(--ink-soft);
  color: var(--ink);
  width: 28px; height: 28px;
  cursor: pointer;
  font-family: serif;
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta-dim); }
.modal-rule {
  border: 0;
  border-top: 1px dashed rgba(80, 50, 20, 0.35);
  margin: 0 26px;
}
.modal-body {
  padding: 18px 26px;
  overflow-y: auto;
  flex: 1;
}
.modal-foot {
  padding: 14px 26px 22px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px dashed rgba(80, 50, 20, 0.35);
  background: rgba(184, 84, 42, 0.04);
}
.modal-foot .spacer { flex: 1; }

/* ================== FORMS ================== */
.form-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}
.form-row.col {
  grid-template-columns: 1fr;
  align-items: stretch;
}
.form-row.col > label { margin-bottom: 4px; }
.form-row > label {
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.3);
  padding: 10px 12px;
  font-family: "Crimson Pro", serif;
  font-size: 15px;
  color: var(--ink);
  border-radius: 0;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--terracotta);
  background: #fff5dc;
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.form-input.mono { font-family: "Special Elite", monospace; font-size: 13px; }
.form-help {
  font-size: 12px;
  color: var(--ink-fade);
  font-style: italic;
  margin-top: 2px;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.form-color-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.form-color-row input[type="color"] {
  width: 44px;
  height: 38px;
  border: 1px solid rgba(80, 50, 20, 0.3);
  background: var(--paper-light);
  padding: 2px;
  cursor: pointer;
}
.form-color-swatches {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.swatch {
  width: 26px; height: 26px;
  border: 1px solid rgba(80, 50, 20, 0.3);
  cursor: pointer;
}
.swatch.on { outline: 2px solid var(--terracotta); outline-offset: 1px; }

/* ingredient row editor */
.ing-edit-row {
  display: grid;
  grid-template-columns: 1fr 80px 32px;
  gap: 8px;
  margin-bottom: 6px;
  align-items: center;
}
.btn-icon {
  width: 32px; height: 32px;
  background: var(--paper);
  border: 1px solid var(--ink-soft);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: serif;
  font-size: 14px;
}
.btn-icon:hover { background: var(--bad); color: var(--paper); border-color: var(--bad); }
.btn-icon.primary { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta-dim); }
.btn-icon.primary:hover { background: var(--terracotta-dim); }
.btn-add-row {
  background: transparent;
  border: 1px dashed var(--ink-soft);
  color: var(--ink-soft);
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 8px 14px;
  cursor: pointer;
  margin-top: 4px;
}
.btn-add-row:hover { color: var(--terracotta-dim); border-color: var(--terracotta); }

/* recipe/item action icons (hover over cards) */
.row-actions {
  display: flex;
  gap: 4px;
  margin-left: 8px;
}
.row-actions button {
  width: 26px; height: 26px;
  background: transparent;
  border: 1px solid rgba(80, 50, 20, 0.4);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.row-actions button:hover { background: var(--paper-light); color: var(--ink); }
.row-actions button.del:hover { background: var(--bad); color: var(--paper); border-color: var(--bad); }

/* segmented danger picker */
.seg {
  display: flex;
  border: 1px solid var(--ink-soft);
  background: var(--paper-light);
}
.seg button {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  border-right: 1px solid var(--ink-soft);
}
.seg button:last-child { border-right: 0; }
.seg button.on {
  background: var(--leather-deep);
  color: var(--paper);
}
.seg button.on.danger-mid { background: var(--warn); color: var(--leather-deep); }
.seg button.on.danger-bad { background: var(--bad); color: var(--paper); }
.seg button.on.danger-ok { background: var(--ok); color: var(--paper); }

/* picker grid for symbols */
.sym-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.sym-grid button {
  aspect-ratio: 1;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.3);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sym-grid button.on { background: var(--terracotta); color: var(--paper); border-color: var(--terracotta-dim); }

/* ================== BIG MAP VIEW ================== */
.map-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.2);
  flex-wrap: wrap;
}
.map-toolbar .hint {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-left: auto;
}

.big-map {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  border: 2px solid rgba(80, 50, 20, 0.6);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(200,150,80,0.15);
  background-color: #c8a96a;
  background-image: url('/map.webp');
  background-repeat: no-repeat;
  touch-action: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.big-map::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(42, 20, 8, 0.35);
  z-index: 3;
}
.map-zoom-btns {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.map-zoom-btns button {
  width: 30px;
  height: 30px;
  background: rgba(239, 226, 194, 0.92);
  border: 1px solid rgba(80, 50, 20, 0.5);
  color: var(--leather-deep);
  font-family: "Special Elite", monospace;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  line-height: 1;
}
.map-zoom-btns button:hover { background: var(--paper-light); }
.map-zoom-level {
  font-family: "Special Elite", monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(239, 226, 194, 0.85);
  text-align: center;
  background: rgba(42, 20, 8, 0.7);
  padding: 2px 4px;
  margin-top: 2px;
}
.big-map .pin {
  position: absolute;
  transform: translate(-50%, -100%);
  cursor: grab;
  user-select: none;
  z-index: 5;
}
.big-map .pin.dragging { cursor: grabbing; z-index: 20; }
.big-map .pin:hover { z-index: 10; }
.big-map .pin .pin-tip {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  color: var(--ink);
  padding: 4px 9px;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid rgba(80, 50, 20, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}
.big-map .pin:hover .pin-tip { opacity: 1; }

.big-map .pin-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid rgba(80, 50, 20, 0.5);
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  padding: 10px 12px 8px;
  min-width: 160px;
  max-width: 220px;
  z-index: 30;
  pointer-events: all;
}
.pin-popup-name {
  font-family: "IM Fell English SC", serif;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 2px;
}
.pin-popup-type {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 4px;
}
.pin-popup-desc {
  font-family: "Crimson Pro", serif;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
  line-height: 1.4;
}
.pin-popup-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pin-popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  border-top: 1px solid rgba(80,50,20,0.15);
  padding-top: 8px;
}

.big-map .placing-marker {
  position: absolute;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px dashed var(--terracotta);
  background: rgba(184, 84, 42, 0.2);
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: pulse 1.2s ease infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.3); opacity: 1; }
}

/* compass on big map */
.big-map .compass {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 64px; height: 64px;
  color: var(--leather-deep);
  opacity: 0.85;
  z-index: 10;
}

/* legend on big map */
.big-map .legend {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(239, 226, 194, 0.92);
  border: 1px solid rgba(80, 50, 20, 0.4);
  padding: 8px 12px;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.big-map .legend .lg-row { display: flex; gap: 8px; align-items: center; color: var(--leather-deep); }
.big-map .legend .lg-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid var(--ink);
}

/* ================== SYNC ================== */
.sync-code {
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.3);
  padding: 12px;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  line-height: 1.5;
  max-height: 180px;
  overflow: auto;
  word-break: break-all;
  color: var(--ink);
  user-select: all;
}
.sync-meta {
  display: flex;
  gap: 14px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: rgba(45, 122, 130, 0.08);
  border-left: 3px solid var(--turquoise);
  font-size: 13px;
  color: var(--ink-soft);
}
.sync-meta .label {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fade);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--leather-deep);
  color: var(--paper);
  padding: 12px 22px;
  border: 1px solid var(--terracotta);
  font-family: "Special Elite", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  z-index: 200;
  animation: toast-in 0.25s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 1200px) {
  .page { padding: 24px 24px; }
  .page.left { padding-right: 28px; }
  .page.right { padding-left: 28px; }
  .ing { width: 64px; }
  .ing-slot { width: 54px; height: 54px; }
}

/* ================== SYNC / AUTH / ACTIVITY (neue Komponenten) ================== */

/* ---- Login-Screen ---- */
.login-screen {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, #2a1408 0%, #0e0604 100%);
  display: grid;
  place-items: center;
  font-family: "Crimson Pro", serif;
  z-index: 100;
}
.login-card {
  background: rgba(20, 10, 4, 0.82);
  border: 1px solid rgba(180, 110, 40, 0.35);
  box-shadow: 0 0 80px rgba(180,100,30,0.18), 0 30px 80px rgba(0,0,0,0.8);
  padding: 40px 44px 48px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}
.login-logo {
  display: block;
  width: 220px;
  height: 220px;
  object-fit: contain;
  margin: 0 auto 12px;
  filter: drop-shadow(0 0 24px rgba(200,130,40,0.5));
}
.discord-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #5865F2;
  color: #fff !important;
  border: none;
  border-radius: 4px;
  padding: 13px 28px;
  font-family: "Crimson Pro", serif;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 3px 12px rgba(88,101,242,0.45);
}
.discord-btn:hover { background: #4752c4; transform: translateY(-1px); }
.discord-btn:active { transform: translateY(0); }

/* ---- Verbindungsstatus ---- */
.conn-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: rgba(239,226,194,0.7);
  white-space: nowrap;
}
.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.conn-label { text-transform: uppercase; }
.conn-queue { opacity: 0.6; }

/* ---- Online-Avatare ---- */
.online-avatars {
  display: flex;
  align-items: center;
  gap: -4px;
}
.avatar-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(42,20,8,0.8);
  overflow: hidden;
  margin-left: -4px;
  cursor: default;
  flex-shrink: 0;
  transition: transform 0.1s;
  position: relative;
}
.avatar-wrap:first-child { margin-left: 0; }
.avatar-wrap:hover { transform: translateY(-2px); z-index: 1; }
.avatar-wrap.idle { opacity: 0.5; }
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar-fallback {
  width: 100%;
  height: 100%;
  background: var(--leather-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Special Elite", monospace;
  font-size: 11px;
  color: var(--paper);
  font-weight: bold;
}

/* ---- User-Menü ---- */
.user-menu-wrap { position: relative; }
.user-menu-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(212,160,96,0.4);
  overflow: hidden;
  cursor: pointer;
  background: var(--leather-mid);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--leather-deep);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  padding: 14px;
  min-width: 180px;
  z-index: 200;
}
.user-menu-name {
  font-family: "Crimson Pro", serif;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid rgba(80,50,20,0.2);
  padding-bottom: 10px;
  margin-bottom: 2px;
}

/* ---- Aktivitäten-Sidebar ---- */
.activity-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  background: var(--paper);
  border-left: 1px solid var(--leather-deep);
  box-shadow: -8px 0 32px rgba(0,0,0,0.4);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 150;
  display: flex;
  flex-direction: column;
  font-family: "Crimson Pro", serif;
}
.activity-sidebar.open { transform: translateX(0); }
.activity-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,10,4,0.4);
  z-index: 140;
}
.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(80,50,20,0.25);
  font-family: "IM Fell English SC", serif;
  font-size: 16px;
  color: var(--ink);
  flex-shrink: 0;
}
.activity-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.activity-empty {
  padding: 24px 18px;
  color: var(--ink-fade);
  font-size: 14px;
  text-align: center;
  font-style: italic;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(80,50,20,0.1);
}
.activity-item:last-child { border-bottom: 0; }
.activity-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--leather-mid);
}
.activity-content {
  flex: 1;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
}
.activity-name { font-weight: 600; }
.activity-desc { color: var(--ink-soft); }
.activity-time {
  font-size: 11px;
  color: var(--ink-fade);
  font-family: "Special Elite", monospace;
  letter-spacing: 0.08em;
  margin-top: 3px;
}
.activity-undo {
  flex-shrink: 0;
  padding: 3px 8px !important;
  font-size: 14px !important;
  opacity: 0.7;
}
.activity-undo:hover { opacity: 1; }

/* ---- Konflikt-Warnung im Modal ---- */
.conflict-pill {
  background: rgba(200,132,42,0.15);
  border: 1px solid rgba(200,132,42,0.4);
  color: #7a5020;
  font-size: 13px;
  padding: 8px 20px;
  font-family: "Crimson Pro", serif;
}
.conflict-reload {
  background: none;
  border: none;
  color: var(--terracotta);
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  text-decoration: underline;
  padding: 0;
}

/* ---- last-edited-by Label ---- */
.last-edited-by {
  font-family: "Special Elite", monospace;
  font-size: 10px;
  color: var(--ink-fade);
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

/* ================== NOTIZEN ================== */
.note-card {
  background: var(--paper-light);
  border: 1px solid rgba(80, 50, 20, 0.2);
  padding: 14px 16px 10px;
  margin-bottom: 12px;
  position: relative;
}
.note-card.note-editing { border-color: var(--terracotta); }
.note-title {
  font-family: "IM Fell English SC", serif;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}
.note-title-input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(80,50,20,0.3);
  font-family: "IM Fell English SC", serif;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 8px;
  padding: 2px 0;
  outline: none;
}
.note-text {
  font-family: "Crimson Pro", serif;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 8px;
}
.note-textarea {
  width: 100%;
  background: var(--paper);
  border: 1px solid rgba(80,50,20,0.25);
  font-family: "Crimson Pro", serif;
  font-size: 15px;
  color: var(--ink);
  padding: 8px 10px;
  resize: vertical;
  outline: none;
  margin-bottom: 8px;
  line-height: 1.6;
}
.note-textarea:focus { border-color: var(--terracotta); }
.note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Special Elite", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-fade);
  border-top: 1px solid rgba(80,50,20,0.12);
  padding-top: 6px;
}
.note-author { color: var(--terracotta-dim); }
.note-time { margin-left: auto; }
.note-btns { display: flex; gap: 4px; }
.note-btns button { background: none; border: 0; cursor: pointer; color: var(--ink-fade); padding: 2px 4px; font-size: 12px; }
.note-btns button:hover { color: var(--ink); }
.note-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ================== MOBILE ================== */
@media (max-width: 768px) {
  .book { padding: 12px 8px 40px; }
  .book-inner { grid-template-columns: 1fr; min-height: unset; }
  .page { padding: 20px 16px; }
  .page.left { border-right: 0; border-bottom: 2px solid rgba(80,50,20,0.2); }
  .book-header { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }
  .nav-tabs { gap: 2px; }
  .nav-tab { padding: 4px 8px; font-size: 10px; letter-spacing: 0.08em; }
  .big-map { aspect-ratio: 4/3; }
  .recipe { padding: 10px; }
  .recipe-body { flex-wrap: wrap; gap: 6px; }
  .ing { min-width: 80px; }
  .inv-row { flex-wrap: wrap; gap: 6px; }
  .modal-box { width: 96vw; max-height: 92vh; margin: 4vh auto; }
  .conn-status { display: none; }
  .online-avatars { display: none; }
  .activity-sidebar { width: 100vw; }
  .login-card { padding: 28px 20px 36px; }
  .login-logo { width: 160px; height: 160px; }
  .map-zoom-btns button { width: 36px; height: 36px; font-size: 18px; }
}

/* ItemCombobox */
.combo-wrap { position: relative; width: 100%; }
.combo-wrap input {
  width: 100%; padding: 6px 10px;
  background: rgba(30,18,8,0.7); border: 1px solid rgba(180,130,60,0.4);
  color: #efe2c2; border-radius: 3px; font-family: inherit; font-size: 13px;
  box-sizing: border-box;
}
.combo-wrap input:focus { outline: none; border-color: rgba(200,150,60,0.8); }
.combo-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 200;
  background: #1e1206; border: 1px solid rgba(180,130,60,0.5);
  border-top: none; border-radius: 0 0 4px 4px;
  max-height: 220px; overflow-y: auto;
}
.combo-opt {
  padding: 7px 10px; cursor: pointer; color: #efe2c2; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.combo-opt:hover, .combo-opt.selected { background: rgba(200,150,60,0.18); }
.combo-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 4px; font-size: 10px;
  font-weight: bold; background: rgba(100,70,30,0.6); flex-shrink: 0;
}
.combo-group {
  padding: 3px 10px; font-size: 10px; color: #8a7050;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.combo-create {
  padding: 7px 10px; cursor: pointer; color: #c89640; font-size: 13px;
  font-style: italic; border-top: 1px solid rgba(180,130,60,0.2);
}
.combo-create:hover { background: rgba(200,150,60,0.15); }
