/* ============================================================
   Lorcana Diary — Design Tokens
   Bootstrap 5.3 overrides + utilities
   ============================================================ */

:root {
  /* Surfaces — stärker abgestuft, deutliches Tonwert-Delta für lesbare Hierarchie */
  --ld-bg:        #0a0a0c;   /* page */
  --ld-surface-1: #16161c;   /* card */
  --ld-surface-2: #1f1f27;   /* hover / table-row-hover / subhead */
  --ld-surface-3: #292932;   /* input bg, raised inner */
  --ld-surface-4: #34343f;   /* raised chip / avatar */

  /* Borders — sichtbar, nicht aufdringlich */
  --ld-border:        #2c2c36;
  --ld-border-strong: #3c3c48;

  /* Text */
  --ld-text:      #ededef;
  --ld-text-dim:  #a1a1aa;
  --ld-text-mute: #71717a;
  --ld-text-faint:#52525b;

  /* Brand — Team Gold */
  --ld-accent:        #e6c98a;
  --ld-accent-hover:  #f1d99c;
  --ld-accent-soft:   rgba(230, 201, 138, 0.12);
  --ld-accent-ring:   rgba(230, 201, 138, 0.30);

  /* Data semantics */
  --ld-pos:       #3ecf8e;   /* win / good (>=55%) */
  --ld-neg:       #f06870;   /* loss / bad (<45%) */
  --ld-mid:       #e8b339;   /* neutral 45-55% */
  --ld-info:      #6e8cff;   /* informational only */

  /* Inks (only when actual ink is in context) */
  --ink-amber:    #f4a85c;
  --ink-amethyst: #b388ff;
  --ink-emerald:  #4ade80;
  --ink-ruby:     #ff5252;
  --ink-sapphire: #4dabf7;
  --ink-steel:    #adb5bd;

  /* Spacing scale (4/8/12/16/24/32/48) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Type — Geist for UI, JetBrains Mono for numerics */
  --font-ui:  'Geist', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono:'Geist Mono', 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(255,255,255,0.02) inset, 0 1px 2px rgba(0,0,0,0.2);
  --shadow-2: 0 4px 16px rgba(0,0,0,0.5), 0 0 0 1px var(--ld-border);

  /* Density */
  --row-h: 44px;
}

/* Density modes */
[data-density="comfortable"] { --row-h: 52px; }
[data-density="medium"]      { --row-h: 44px; }
[data-density="compact"]     { --row-h: 36px; }

/* ============================================================
   Base
   ============================================================ */
html, body {
  background: var(--ld-bg);
  color: var(--ld-text);
  font-family: var(--font-ui);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
body { font-size: 14px; line-height: 1.5; }

/* Subtle vignette */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(230,201,138,0.04), transparent 60%),
    radial-gradient(900px 500px at -5% 110%, rgba(110,140,255,0.03), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Layout container */
.ld-shell { position: relative; z-index: 1; }

/* ============================================================
   Typography
   ============================================================ */
.t-display { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--ld-accent); }
.t-h2     { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; color: var(--ld-accent); }
.t-h3     { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; color: var(--ld-accent); }

/* Generische Headlines im Brand-Gold (überschreibt Bootstrap-Defaults). */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: var(--ld-accent);
}

/* Hyperlinks im Brand-Gold (gedeckt, nicht grell). Buttons (.ld-btn,
   .qa-item, .diary-item, Bootstrap .btn) setzen ihre eigene Farbe und
   sind durch Spezifität nicht betroffen. */
a {
  color: var(--ld-accent);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--ld-accent-hover);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.t-body   { font-size: 14px; }
.t-small  { font-size: 13px; color: var(--ld-text-dim); }
.t-caps   {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ld-text-mute);
  white-space: nowrap;
}
.t-mono   { font-family: var(--font-mono); font-feature-settings: "tnum","zero"; }
.t-mute   { color: var(--ld-text-mute); }
.t-dim    { color: var(--ld-text-dim); }
.t-faint  { color: var(--ld-text-faint); }
.t-pos    { color: var(--ld-pos); }
.t-neg    { color: var(--ld-neg); }
.t-mid    { color: var(--ld-mid); }
.t-accent { color: var(--ld-accent); }

/* ============================================================
   Top bar / nav
   ============================================================ */
.ld-topbar {
  background: rgba(10,10,12,0.85);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--ld-border);
  position: sticky; top: 0; z-index: 100;
}
.ld-topbar .navbar-brand { color: var(--ld-text) !important; font-weight: 600; font-size: 14px; }
.ld-topbar .nav-link {
  color: var(--ld-text-mute) !important;
  font-size: 13px; font-weight: 500;
  padding: 6px 12px !important;
  border-radius: var(--r-sm);
  transition: color .15s, background .15s;
}
.ld-topbar .nav-link:hover { color: var(--ld-text) !important; background: var(--ld-surface-2); }
.ld-topbar .nav-link.active { color: var(--ld-text) !important; background: var(--ld-surface-2); }

.ld-brand-logo {
  width: 22px; height: 22px;
  border-radius: 4px;
  display: inline-block;
  background-image: var(--brand-logo-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.ld-divider {
  width: 1px; height: 18px;
  background: var(--ld-border-strong);
  margin: 0 4px;
}

.ld-breadcrumb {
  font-size: 13px;
  color: var(--ld-text-mute);
  display: inline-flex; align-items: center; gap: 8px;
  white-space: nowrap;
}
.ld-breadcrumb a { color: var(--ld-text-mute); text-decoration: none; }
.ld-breadcrumb a:hover { color: var(--ld-text); }
.ld-breadcrumb .sep { color: var(--ld-text-faint); }
.ld-breadcrumb .crumb-current { color: var(--ld-text); }

/* ============================================================
   Cards
   ============================================================ */
.ld-card {
  background: var(--ld-surface-1);
  border: 1px solid var(--ld-border);
  border-radius: var(--r-lg);
  color: var(--ld-text);
  position: relative;
  overflow: hidden;
}
.ld-card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ld-border);
  background: transparent;
}
.ld-card-header h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: -0.005em; white-space: nowrap; color: var(--ld-accent); }
.ld-card-header .ld-card-meta { font-size: 12px; color: var(--ld-text-mute); }
.ld-card-body { padding: 16px; }
.ld-card-body--flush { padding: 0; }

/* KPI tile */
.ld-kpi {
  background: var(--ld-surface-1);
  border: 1px solid var(--ld-border);
  border-radius: var(--r-lg);
  padding: 16px;
  padding-right: 104px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color .15s, background .15s;
  min-width: 0;
}
.ld-kpi:hover { border-color: var(--ld-border-strong); }
.ld-kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ld-text-mute);
  display: flex; align-items: center; gap: 6px;
}
.ld-kpi-value {
  font-family: var(--font-mono);
  font-feature-settings: "tnum","zero";
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ld-text);
  line-height: 1.1;
  margin-top: 2px;
  white-space: nowrap;
}
.ld-kpi-sub {
  font-size: 12px;
  display: flex; align-items: center; gap: 6px;
  color: var(--ld-text-mute);
  margin-top: 4px;
  white-space: nowrap;
}
.ld-kpi-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 2px;
}
.ld-kpi-delta.up   { color: var(--ld-pos); }
.ld-kpi-delta.down { color: var(--ld-neg); }
.ld-kpi-delta.flat { color: var(--ld-text-mute); }

.ld-kpi-spark {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 88px; height: 28px;
  opacity: 0.95;
  pointer-events: none;
}

/* ============================================================
   Tables
   ============================================================ */
.ld-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--ld-text);
}
.ld-table thead th {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ld-text-mute);
  padding: 10px 16px;
  border-bottom: 1px solid var(--ld-border);
  background: transparent;
  text-align: left;
  white-space: nowrap;
}
.ld-table tbody td {
  padding: 0 16px;
  height: var(--row-h);
  vertical-align: middle;
  border-bottom: 1px solid var(--ld-border);
  color: var(--ld-text);
}
.ld-table tbody tr:last-child td { border-bottom: 0; }
.ld-table tbody tr { transition: background .12s; }
.ld-table tbody tr:hover { background: var(--ld-surface-2); }
.ld-table .num {
  font-family: var(--font-mono);
  font-feature-settings: "tnum","zero";
  text-align: right;
}
.ld-table .ta-r { text-align: right; }
.ld-table a { color: var(--ld-text); text-decoration: none; }
.ld-table a:hover { color: var(--ld-accent); }

/* ============================================================
   Buttons
   ============================================================ */
.ld-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui);
  font-size: 13px; font-weight: 500;
  height: 32px; padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--ld-border-strong);
  background: var(--ld-surface-2);
  color: var(--ld-text);
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
  text-decoration: none;
  white-space: nowrap;
}
.ld-btn:hover { background: var(--ld-surface-3); border-color: #34343c; color: var(--ld-text); }
.ld-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ld-accent-ring); }

.ld-btn--primary {
  background: var(--ld-accent);
  color: #1a1410;
  border-color: var(--ld-accent);
  font-weight: 600;
}
.ld-btn--primary:hover { background: var(--ld-accent-hover); border-color: var(--ld-accent-hover); color: #1a1410; }

.ld-btn--ghost {
  background: transparent; border-color: transparent;
  color: var(--ld-text-dim);
}
.ld-btn--ghost:hover { background: var(--ld-surface-2); color: var(--ld-text); }

.ld-btn--sm { height: 28px; padding: 0 10px; font-size: 12px; }
.ld-btn--icon { width: 32px; padding: 0; justify-content: center; }

/* ============================================================
   Badges & chips
   ============================================================ */
.ld-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  height: 22px;
  font-size: 11px; font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--ld-border-strong);
  background: var(--ld-surface-2);
  color: var(--ld-text-dim);
  white-space: nowrap;
}
.ld-chip .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ld-text-mute);
  flex: 0 0 6px;
}
.ld-chip--pos { color: var(--ld-pos); border-color: rgba(62,207,142,0.25); background: rgba(62,207,142,0.08); }
.ld-chip--pos .dot { background: var(--ld-pos); }
.ld-chip--neg { color: var(--ld-neg); border-color: rgba(240,104,112,0.25); background: rgba(240,104,112,0.08); }
.ld-chip--neg .dot { background: var(--ld-neg); }
.ld-chip--mid { color: var(--ld-mid); border-color: rgba(232,179,57,0.25); background: rgba(232,179,57,0.08); }
.ld-chip--mid .dot { background: var(--ld-mid); }
.ld-chip--accent { color: var(--ld-accent); border-color: rgba(230,201,138,0.25); background: var(--ld-accent-soft); }
.ld-chip--accent .dot { background: var(--ld-accent); }

/* Ink chips — ONLY for archetype context */
.ink-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px 2px 4px;
  height: 22px;
  font-size: 11px; font-weight: 500;
  border-radius: 999px;
  background: var(--ld-surface-3);
  border: 1px solid var(--ld-border-strong);
  color: var(--ld-text);
}
.ink-chip .ink-pair {
  display: inline-flex; gap: 0; border-radius: 999px; overflow: hidden;
  width: 22px; height: 14px;
  border: 1px solid rgba(0,0,0,0.4);
}
.ink-chip .ink-pair span { flex: 1; }

/* ============================================================
   Forms
   ============================================================ */
.ld-input, .ld-select {
  background: var(--ld-surface-3);
  border: 1px solid var(--ld-border-strong);
  color: var(--ld-text);
  border-radius: var(--r-md);
  font-size: 13px;
  height: 32px;
  padding: 0 12px;
  transition: border-color .12s, box-shadow .12s;
}
.ld-input:focus, .ld-select:focus {
  outline: none;
  border-color: var(--ld-accent);
  box-shadow: 0 0 0 3px var(--ld-accent-ring);
}
.ld-input::placeholder { color: var(--ld-text-faint); }

/* ============================================================
   Misc helpers
   ============================================================ */
.hr-soft { height: 1px; background: var(--ld-border); border: 0; margin: 0; }

.dot-i {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ld-text-mute);
  margin-right: 6px;
  vertical-align: middle;
}
.dot-i--pos { background: var(--ld-pos); }
.dot-i--neg { background: var(--ld-neg); }
.dot-i--mid { background: var(--ld-mid); }

.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--ld-border-strong);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--ld-surface-2);
  color: var(--ld-text-dim);
}

/* Win-rate bar */
.wr-bar {
  position: relative;
  height: 4px;
  width: 100%;
  background: var(--ld-surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.wr-bar > span {
  position: absolute; top: 0; left: 0; bottom: 0;
  border-radius: 999px;
  background: var(--ld-text-mute);
}
.wr-bar > span.pos { background: var(--ld-pos); }
.wr-bar > span.neg { background: var(--ld-neg); }
.wr-bar > span.mid { background: var(--ld-mid); }

/* Activity / diary item */
.diary-item {
  display: flex; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--ld-border);
  cursor: pointer;
}
.diary-item:last-child { border-bottom: 0; }
.diary-item:hover { background: var(--ld-surface-2); }
.diary-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--ld-surface-4);
  color: var(--ld-text);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex: 0 0 28px;
}
.diary-meta { font-size: 12px; color: var(--ld-text-mute); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; row-gap: 4px; margin-top: 4px; }
.diary-title { font-size: 13px; font-weight: 500; color: var(--ld-text); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; min-width: 0; }
.diary-time { font-family: var(--font-mono); font-size: 11px; color: var(--ld-text-faint); white-space: nowrap; flex: 0 0 auto; }
.diary-snippet { font-size: 12px; color: var(--ld-text-dim); margin-top: 4px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Quick actions */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--ld-border); }
.qa-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .qa-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
.qa-item {
  background: var(--ld-surface-1);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
  transition: background .12s;
  text-decoration: none;
  color: var(--ld-text);
  min-width: 0;
}
.qa-item:hover { background: var(--ld-surface-2); color: var(--ld-text); }
.qa-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ld-surface-3);
  color: var(--ld-text-dim);
  flex: 0 0 28px;
}
.qa-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.qa-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-sub   { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-sub { font-size: 11px; color: var(--ld-text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-kbd { margin-left: auto; }

/* Section title */
.sec-title {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.sec-title h2 { font-size: 13px; font-weight: 600; letter-spacing: -0.005em; margin: 0; color: var(--ld-accent); }
.sec-title .sec-meta { font-size: 12px; color: var(--ld-text-mute); }

/* Status filter pills */
.pill-group { display: inline-flex; gap: 0; padding: 2px; background: var(--ld-surface-2); border: 1px solid var(--ld-border); border-radius: var(--r-md); }
.pill-group button {
  background: transparent; border: 0; color: var(--ld-text-mute);
  font-size: 12px; font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.pill-group button.active { background: var(--ld-surface-1); color: var(--ld-text); box-shadow: 0 0 0 1px var(--ld-border-strong); }

/* Empty avatar stack */
.team-stack { display: inline-flex; }
.team-stack > * {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--ld-surface-1);
  margin-left: -6px;
  background: var(--ld-surface-4);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  color: var(--ld-text);
}
.team-stack > *:first-child { margin-left: 0; }

/* Bootstrap reset bits we still rely on */
.dropdown-menu { background: var(--ld-surface-1); border: 1px solid var(--ld-border-strong); border-radius: var(--r-md); padding: 4px; box-shadow: var(--shadow-2); }
.dropdown-item { color: var(--ld-text-dim); font-size: 13px; border-radius: var(--r-sm); padding: 6px 10px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--ld-surface-3); color: var(--ld-text); }
.dropdown-divider { border-color: var(--ld-border); margin: 4px 0; }

/* Hide BS focus rings we don't want */
.btn:focus, .btn-check:focus + .btn { box-shadow: none; }

/* ============================================================
   Ink logos / chips (project-specific extensions)
   ============================================================ */
.ink-logo {
  display: inline-block;
  vertical-align: middle;
  border-radius: 50%;
  object-fit: contain;
}
.ink-fallback {
  display: inline-block;
  vertical-align: middle;
}
.ink-fallback--amber    { background: var(--ink-amber); }
.ink-fallback--amethyst { background: var(--ink-amethyst); }
.ink-fallback--emerald  { background: var(--ink-emerald); }
.ink-fallback--ruby     { background: var(--ink-ruby); }
.ink-fallback--sapphire { background: var(--ink-sapphire); }
.ink-fallback--steel    { background: var(--ink-steel); }

.ink-chip { gap: 6px; }
.ink-chip .ink-pair {
  width: auto; height: auto;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.ink-chip-label { font-size: 12px; color: var(--ld-text); }
.ink-chip--sm { height: 18px; padding: 0 6px 0 4px; font-size: 10px; }
.ink-chip--sm .ink-chip-label { font-size: 10px; }

/* App-specific: card-hover tooltip (legacy behavior preserved) */
#card-hover-tip {
  position: fixed; z-index: 1080; pointer-events: none; padding: 4px;
  background: var(--ld-surface-1); border: 1px solid var(--ld-border-strong);
  border-radius: var(--r-md); box-shadow: var(--shadow-2);
}
#card-hover-tip img { display: block; max-width: 240px; max-height: 340px; border-radius: 6px; }
.card-hover { color: var(--ld-accent); text-decoration: underline dotted; cursor: help; }
.card-hover:hover { color: var(--ld-accent-hover); }

/* App-specific: card-rating badges */
.badge-S { background: #ffd700; color: #000; }
.badge-A { background: var(--ld-pos); color: #000; }
.badge-B { background: var(--ld-info); color: #000; }
.badge-C { background: var(--ld-text-mute); color: #000; }
.star-rating { color: #ffd700; }
.illegal-card { color: var(--ld-neg); }
.needs-review-banner { background: rgba(232,179,57,0.10); border: 1px solid rgba(232,179,57,0.40); color: var(--ld-mid); padding: 12px 16px; border-radius: var(--r-md); }

/* Markdown content rendering inside diary/notes */
.markdown-content { line-height: 1.6; color: var(--ld-text); }
.markdown-content h1, .markdown-content h2, .markdown-content h3 { color: var(--ld-accent); margin-top: 1.2em; }
.markdown-content code { background: var(--ld-surface-3); padding: 1px 6px; border-radius: 4px; color: var(--ld-accent); font-size: 12px; }
.markdown-content pre { background: var(--ld-surface-3); padding: 12px; border-radius: var(--r-md); overflow-x: auto; }
.markdown-content blockquote { border-left: 3px solid var(--ld-accent); padding-left: 12px; color: var(--ld-text-dim); margin-left: 0; }
.markdown-content a { color: var(--ld-accent); }
.markdown-content table { border-collapse: collapse; }
.markdown-content table th, .markdown-content table td { border: 1px solid var(--ld-border); padding: 6px 10px; }

/* Bootstrap form override to match new tokens */
.form-control, .form-select {
  background: var(--ld-surface-3);
  border: 1px solid var(--ld-border-strong);
  color: var(--ld-text);
  border-radius: var(--r-md);
}
.form-control:focus, .form-select:focus {
  background: var(--ld-surface-3);
  border-color: var(--ld-accent);
  color: var(--ld-text);
  box-shadow: 0 0 0 3px var(--ld-accent-ring);
}
.form-control::placeholder { color: var(--ld-text-faint); }
.form-label { color: var(--ld-text-dim); font-size: 13px; font-weight: 500; }

/* Bootstrap card fallback for pages we don't fully port — make Bootstrap cards look like ld-cards */
.card {
  background: var(--ld-surface-1);
  border: 1px solid var(--ld-border);
  border-radius: var(--r-lg);
  color: var(--ld-text);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--ld-border);
  color: var(--ld-text);
  padding: 14px 16px;
}

/* Bootstrap table fallback */
.table { color: var(--ld-text); }
.table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-color: var(--ld-border);
  color: var(--ld-text);
}
.table-hover > tbody > tr:hover > * { background-color: var(--ld-surface-2); }

/* Bootstrap nav-tabs in our look */
.nav-tabs {
  border-bottom: 1px solid var(--ld-border);
  gap: 2px;
}
.nav-tabs .nav-link {
  color: var(--ld-text-mute);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color .15s, background .15s, border-color .15s;
}
.nav-tabs .nav-link:hover {
  color: var(--ld-text);
  background: var(--ld-surface-2);
  border-color: transparent;
}
.nav-tabs .nav-link.active {
  color: var(--ld-text);
  background: transparent;
  border-bottom-color: var(--ld-accent);
}

/* Bootstrap btn-primary → uses our accent */
.btn-primary {
  background: var(--ld-accent);
  border-color: var(--ld-accent);
  color: #1a1410;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--ld-accent-hover);
  border-color: var(--ld-accent-hover);
  color: #1a1410;
}

/* Bootstrap alert in our tokens */
.alert { border-radius: var(--r-md); border: 1px solid var(--ld-border-strong); }
.alert-success { background: rgba(62,207,142,0.08); color: var(--ld-pos); border-color: rgba(62,207,142,0.25); }
.alert-danger  { background: rgba(240,104,112,0.08); color: var(--ld-neg); border-color: rgba(240,104,112,0.25); }
.alert-warning { background: rgba(232,179,57,0.08); color: var(--ld-mid); border-color: rgba(232,179,57,0.25); }
.alert-info    { background: rgba(110,140,255,0.08); color: var(--ld-info); border-color: rgba(110,140,255,0.25); }

/* Info-tip helper used in /statistik/prep */
.info-tip {
  display: inline-block; cursor: help;
  width: 16px; height: 16px; line-height: 16px; text-align: center;
  border-radius: 50%; background: var(--ld-surface-3); color: var(--ld-text-mute);
  font-size: 11px; font-weight: 600; margin-left: 4px;
}
.info-tip:hover { background: var(--ld-surface-4); color: var(--ld-text); }
.tooltip-inner { max-width: 360px; text-align: left; background: var(--ld-surface-1); border: 1px solid var(--ld-border-strong); }

/* Round ink-logo buttons used in /games/ filter */
.ink-filter-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--ld-surface-2);
  opacity: 0.45;
  transition: opacity .12s, transform .12s, border-color .12s;
}
.ink-filter-btn:hover { opacity: 0.85; transform: scale(1.04); }
.ink-filter-btn .ink-logo { border-radius: 50%; }
.btn-check:checked + .ink-filter-btn {
  opacity: 1;
  border-color: var(--ld-accent);
  background: var(--ld-accent-soft);
}
.ink-filter-group { gap: 6px; }

/* Legacy ink-button styles for sessions/games picker — overlays a logo */
.ink-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px;
  background: var(--ld-surface-3);
  border: 1px solid var(--ld-border-strong);
  color: var(--ld-text);
  border-radius: var(--r-md);
  font-size: 12px;
  cursor: pointer;
}
.btn-check:checked + .ink-btn { background: var(--ld-accent-soft); border-color: var(--ld-accent); color: var(--ld-text); }
