/* Auktionshaus (client/auction.js) – im Hafenmarkt und im Spiel */
.ah {
  --ah-ink: #ebe1cc;
  --ah-dim: rgba(235,225,204,0.66);
  --ah-gold: #f0b85a;
  --ah-line: rgba(240,184,90,0.28);
  --ah-panel: rgba(5,12,18,0.55);
  color: var(--ah-ink);
}
.ah .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ah .ah-intro { margin: 0 0 22px; max-width: 64ch; font-size: 14px; line-height: 1.5; color: var(--ah-dim); }
.ah-group { margin: 0 0 18px; }
.ah-group > header { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--ah-line); }
.ah-group h3 { margin: 0; font-family: 'Cinzel', Georgia, serif; font-size: 16px; letter-spacing: 0.4px; color: var(--ah-gold); }
.ah-group > header span { font-size: 12px; color: var(--ah-dim); }
.ah-list { display: grid; gap: 8px; }
.ah-lot {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 10px 12px; border-radius: 8px; background: var(--ah-panel); border: 1px solid rgba(147,179,182,0.18);
}
.ah-lot.is-mine { border-color: rgba(120,210,140,0.55); background: linear-gradient(90deg, rgba(60,140,80,0.16), var(--ah-panel)); }
.ah-week .ah-lot { grid-template-columns: 120px minmax(0, 1fr) auto; border-color: rgba(240,184,90,0.45); }
.ah-art { width: 64px; height: 64px; display: grid; place-items: center; }
.ah-art img { max-width: 100%; max-height: 100%; border-radius: 6px; }
.ah-art.is-design { width: 120px; height: 100px; }
.ah-art.is-design img { border-radius: 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5)); }
.ah-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ah-info h4 { margin: 0; font-size: 16px; font-weight: 600; color: #fff3dc; }
.ah-price { display: flex; align-items: baseline; gap: 6px; }
.ah-price b { font-size: 20px; color: var(--ah-gold); font-variant-numeric: tabular-nums; }
.ah-price span { font-size: 12px; color: var(--ah-dim); }
.ah-badge { align-self: flex-start; font-size: 12px; color: var(--ah-ink); }
.ah-badge.mine { color: #9fe2ad; font-weight: 600; }
.ah-badge.quiet { color: var(--ah-dim); font-style: italic; }
.ah-act { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ah-time { font-size: 13px; color: var(--ah-dim); white-space: nowrap; }
.ah-time b { color: var(--ah-ink); font-variant-numeric: tabular-nums; }
.ah-time.soon b { color: #ff9a86; }
.ah-form { display: flex; gap: 6px; }
.ah-form input {
  width: 128px; padding: 7px 9px; border-radius: 6px; font: inherit; font-size: 15px; font-variant-numeric: tabular-nums; text-align: right;
  background: rgba(3,10,16,0.7); color: #fff3dc; border: 1px solid rgba(147,179,182,0.35);
}
.ah-form input:focus { outline: none; border-color: var(--ah-gold); box-shadow: 0 0 0 3px rgba(240,184,90,0.18); }
.ah-form button {
  padding: 7px 14px; border-radius: 6px; cursor: pointer; font: 600 14px Georgia, serif; border: 0;
  background: linear-gradient(180deg, #f2c464, #d9a441); color: #1c1208;
}
.ah-form button:disabled, .ah-form input:disabled { opacity: 0.45; cursor: default; }
.ah-min { font-size: 11px; color: var(--ah-dim); }
.ah-empty { color: var(--ah-dim); font-style: italic; }
.ah .ah-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 9800; max-width: min(520px, calc(100vw - 32px)); margin: 0; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  background: rgba(60,20,14,0.95); border: 1px solid rgba(255,140,120,0.5); color: #ffd9cf; box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.ah .ah-toast.ok { background: rgba(16,44,24,0.97); border-color: rgba(120,210,140,0.55); color: #d6f5dc; }
.ah .ah-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .ah-lot, .ah-week .ah-lot { grid-template-columns: 56px minmax(0, 1fr); }
  .ah-art.is-design { width: 56px; height: 56px; }
  .ah-act { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .ah-form input { width: 110px; }
}
@media (prefers-reduced-motion: reduce) { .ah-toast { transition: none; } }

/* Spiel: eigenes Fenster */
#auction-panel .admin-card { width: 100%; max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
#auction-body { overflow-y: auto; padding: 4px 2px 6px; }

/* ---------- Handelsmarkt (client/trade.js) ---------- */
.tm { --ah-ink: #ebe1cc; --ah-dim: rgba(235,225,204,0.66); --ah-gold: #f0b85a; color: var(--ah-ink); }
.tm-tabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid rgba(240,184,90,0.28); }
.tm-tabs button { padding: 8px 14px; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--ah-dim); font: 600 15px Georgia, serif; cursor: pointer; margin-bottom: -1px; }
.tm-tabs button.active { color: var(--ah-gold); border-bottom-color: var(--ah-gold); }
.tm-tabs button:focus-visible, .tm-filters button:focus-visible { outline: 2px solid var(--ah-gold); outline-offset: 2px; }
.tm-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.tm-filters button { padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(147,179,182,0.3); background: rgba(5,12,18,0.5); color: var(--ah-dim); font: inherit; font-size: 13px; cursor: pointer; }
.tm-filters button.active { border-color: var(--ah-gold); color: #1c1208; background: var(--ah-gold); }
.tm-list { display: grid; gap: 6px; }
.tm-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 8px 12px; border-radius: 8px; background: rgba(5,12,18,0.55); border: 1px solid rgba(147,179,182,0.18); }
.tm-row > img { width: 44px; height: 44px; border-radius: 6px; }
.tm img.op-ic, .ah img.op-ic { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.tm-info { min-width: 0; }
.tm-info h4 { margin: 0; font-size: 15px; font-weight: 600; color: #fff3dc; }
.tm-info span { font-size: 12px; color: var(--ah-dim); }
.tm-price { display: flex; align-items: baseline; gap: 4px; }
.tm-price span { font-size: 12px; }
.tm-price b { font-size: 18px; color: var(--ah-gold); font-variant-numeric: tabular-nums; }
.tm-act { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; min-width: 104px; }
.tm-act small { font-size: 11px; color: var(--ah-dim); white-space: nowrap; }
.tm-act button, .tm-sell button {
  padding: 7px 14px; border-radius: 6px; cursor: pointer; font: 600 14px Georgia, serif; border: 0;
  background: linear-gradient(180deg, #f2c464, #d9a441); color: #1c1208;
}
.tm-act button.confirm { background: linear-gradient(180deg, #8fe3a0, #4fb96a); }
.tm-act button.tm-cancel { background: rgba(5,11,18,0.6); color: var(--ah-ink); border: 1px solid rgba(255,255,255,0.2); }
.tm-act button:disabled, .tm-sell button:disabled { opacity: 0.45; cursor: default; }
.tm-sell { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; align-items: end; max-width: 640px; }
.tm-sell label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ah-dim); }
.tm-sell select, .tm-sell input { padding: 8px 10px; border-radius: 6px; font: inherit; font-size: 15px; background: rgba(3,10,16,0.7); color: #fff3dc; border: 1px solid rgba(147,179,182,0.35); }
.tm-sell select:focus, .tm-sell input:focus { outline: none; border-color: var(--ah-gold); box-shadow: 0 0 0 3px rgba(240,184,90,0.18); }
.tm-calc { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--ah-dim); }
.tm-calc.bad { color: #ff9a86; }
.tm-sell button { grid-column: 1 / -1; justify-self: start; padding: 9px 18px; }
.tm-blocked { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: rgba(120,60,20,0.28); border: 1px solid rgba(240,184,90,0.45); color: #ffe3b0; font-size: 14px; }
.tm-empty { color: var(--ah-dim); font-style: italic; }
.tm-rules { margin: 16px 0 0; font-size: 13px; color: var(--ah-dim); }
.tm-rules summary { cursor: pointer; color: var(--ah-gold); }
.tm-rules ul { margin: 8px 0 0; padding-left: 18px; line-height: 1.55; max-width: 72ch; }
.tm .tm-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 9800; max-width: min(520px, calc(100vw - 32px)); margin: 0; padding: 10px 16px; border-radius: 8px; font-size: 14px;
  background: rgba(60,20,14,0.97); border: 1px solid rgba(255,140,120,0.5); color: #ffd9cf; box-shadow: 0 12px 30px rgba(0,0,0,0.5);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .2s, transform .2s; pointer-events: none;
}
.tm .tm-toast.ok { background: rgba(16,44,24,0.97); border-color: rgba(120,210,140,0.55); color: #d6f5dc; }
.tm .tm-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 640px) {
  .tm-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .tm-act { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .tm-sell { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .tm-toast { transition: none; } }
#trade-panel { position: absolute; left: 50%; top: 56px; transform: translateX(-50%); width: min(calc(100vw - 16px), 760px); z-index: 7; pointer-events: auto; }
#trade-panel.hidden { display: none; }
#trade-panel .admin-card { width: 100%; max-height: calc(100vh - 80px); display: flex; flex-direction: column; }
#trade-body { overflow-y: auto; padding: 4px 2px 6px; }
