/* ═══════════════════════════════════════════════════════════════════
   THEME V6: SIENNA-ATELIER
   Heller, luftiger Look: Terrakotta-Wand als Hauptfläche, Backstein
   im Header. Schmale geometrische serifenlose Schrift, helle warme
   Sandtöne und Sienna/Tangerine-Akzente.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --sienna-deep:  #6e2f15;
  --sienna:       #a04820;
  --sienna-warm:  #c66a2c;
  --tangerine:    #e8893a;
  --tangerine-lt: #f5b075;
  --apricot:      #fbdab2;

  --sand-bg:      #f5e4c4;
  --sand-card:    #fdf3df;
  --sand-edge:    #e8d3a8;

  --olive:        #7c8a3a;
  --rust:         #b94a26;

  --ink:          #3a1a08;
  --ink-soft:     #6e3e1a;
  --ink-muted:    #9c7448;

  --c-bg:         #2e1408;
  --c-card:       var(--sand-card);
  --c-border:     rgba(58, 26, 8, .22);
  --c-text:       #fbe9c8;
  --c-text-dark:  var(--ink);
  --c-muted:      #e8c997;
  --c-primary:    var(--tangerine);
  --c-primary-dk: var(--sienna);
  --c-best:       var(--olive);
  --c-rating:     var(--tangerine-lt);
  --c-wishlist:   var(--rust);

  --r-sm: 4px;
  --r-md: 10px;
  --r-lg: 18px;
  --gap:  1rem;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: "Work Sans", "Nunito Sans", "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  letter-spacing: .005em;
}

/* ── Hintergrund: Terrakotta-Wand mit weicher Aufhellung ── */
body {
  background-color: var(--sienna-deep);
  background-image:
    /* Heller, warmer Lichtkegel oben */
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 230, 190, .35) 0%, transparent 60%),
    /* Sanfter Aufhellungs-Layer, damit die Wand cremiger wirkt */
    linear-gradient(180deg, rgba(255, 220, 180, .14) 0%, rgba(20, 8, 2, .35) 100%),
    url("/static/textures/texture1.jpg");
  background-size: auto, auto, 760px 760px;
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed;
}

a { color: var(--tangerine-lt); text-decoration: none; }
a:hover { color: #ffd9a6; }

/* ── Header: Backstein-Banner ── */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background-color: var(--sienna-deep);
  background-image:
    linear-gradient(180deg, rgba(50, 18, 8, .55), rgba(30, 10, 4, .82)),
    url("/static/textures/texture2.jpg");
  background-size: auto, 480px 480px;
  background-repeat: no-repeat, repeat;
  border-bottom: 3px solid rgba(255, 200, 130, .25);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .55);
  position: relative;
}
.site-header::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 200, 130, .35), transparent);
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff1d4;
  letter-spacing: -.005em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.brand:hover { color: var(--tangerine-lt); }

.site-header--admin {
  background-color: #1a3a1a;
  background-image:
    linear-gradient(180deg, rgba(8, 30, 8, .65), rgba(4, 18, 4, .88)),
    url("/static/textures/texture2.jpg");
  border-bottom: 3px solid rgba(100, 200, 100, .3);
}
.site-header--admin::after {
  background: linear-gradient(90deg, transparent, rgba(100, 200, 100, .3), transparent);
}
.site-header--admin .brand { color: #d4f0d4; }
.site-header--admin .brand:hover { color: #a8e6a8; }
.site-header--admin nav a,
.site-header--admin nav .link-button { color: #b8ddb8; }
.site-header--admin nav a:hover { color: #d4f0d4; }

.site-header nav { display: flex; gap: 1.1rem; align-items: center; }
.site-header nav a,
.site-header nav .link-button {
  color: #f0d2a0;
  font-size: .9rem;
  letter-spacing: .015em;
  font-weight: 500;
}
.site-header nav a:hover { color: #fff1d4; }

.inline-form { display: inline; }
.link-button {
  background: none; border: none;
  color: #f0d2a0; cursor: pointer;
  font: inherit; font-size: .9rem;
}
.link-button:hover { color: #fff1d4; }

main { max-width: 1280px; margin: 0 auto; padding: 2.5rem 1.5rem; }

.site-footer {
  border-top: 1px solid rgba(255, 200, 130, .2);
  padding: 1.2rem 2rem;
  margin-top: 4rem;
  color: var(--c-muted);
  text-align: center;
  font-size: .85rem;
  background: rgba(30, 12, 4, .55);
  backdrop-filter: blur(4px);
}
.site-footer a { color: var(--tangerine-lt); }

/* ── Hero ── */
.hero { margin-bottom: 2.25rem; }
.hero h1 {
  font-size: 2.4rem;
  color: #fff1d4;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.muted { color: var(--c-muted); }

/* ── Tabs: Pillen ── */
.tabs {
  display: flex; gap: .4rem;
  margin-bottom: 1.5rem;
  padding: .35rem;
  background: rgba(30, 12, 4, .55);
  border: 1px solid rgba(255, 200, 130, .18);
  border-radius: 999px;
  width: fit-content;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.tab-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: .55rem 1.15rem;
  font: inherit;
  font-size: .9rem;
  color: var(--c-muted);
  cursor: pointer;
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600;
  letter-spacing: .005em;
  transition: all .2s;
}
.tab-btn:hover { color: #fff1d4; background: rgba(255, 200, 130, .08); }
.tab-btn.active {
  background: linear-gradient(180deg, var(--tangerine-lt), var(--tangerine));
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(232, 137, 58, .35);
}
.tab-count {
  font-size: .72rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
  color: var(--c-muted);
  font-weight: 700;
}
.tab-btn.active .tab-count {
  background: rgba(58, 26, 8, .25);
  color: var(--ink);
}

/* ── Filter-Form: helle Karte mit Backsteinkante ── */
.filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .9rem;
  background: rgba(253, 243, 223, .94);
  border: 1px solid rgba(58, 26, 8, .18);
  border-radius: var(--r-md);
  padding: 1.15rem 1.25rem;
  margin-bottom: 2rem;
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .6) inset,
    0 14px 32px rgba(0, 0, 0, .35);
}
.filter-form label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .7rem; color: var(--ink-soft);
  letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700;
}
.filter-form input,
.filter-form select {
  font: inherit; font-size: .92rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(58, 26, 8, .25);
  border-radius: var(--r-sm);
  background: #fff8e6;
  color: var(--ink);
}
.filter-form input:focus,
.filter-form select:focus {
  outline: none;
  border-color: var(--tangerine);
  box-shadow: 0 0 0 3px rgba(232, 137, 58, .22);
}
.filter-form input[type="range"] { padding: 0; accent-color: var(--tangerine); background: transparent; }
.filter-form output { font-size: .85rem; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

.filter-checkbox {
  flex-direction: row !important;
  align-items: center !important;
  gap: .4rem !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  color: var(--ink) !important;
  font-size: .9rem !important;
  font-weight: 500 !important;
}
.filter-checkbox input[type="checkbox"] { accent-color: var(--tangerine); }

.reset-link {
  align-self: end;
  padding: .55rem .9rem;
  border: 1px solid rgba(58, 26, 8, .22);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-soft);
  text-align: center;
  font-size: .85rem;
  font-weight: 600;
}
.reset-link:hover { border-color: var(--tangerine); color: var(--sienna); }

/* ══════════════════════════════════════════════════════
   GRID — Karten als helle Atelier-Karten
   ══════════════════════════════════════════════════════ */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--sand-card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .5) inset,
    0 14px 28px rgba(0, 0, 0, .4),
    0 4px 10px rgba(0, 0, 0, .22);
  position: relative;
  transition: transform .22s ease, box-shadow .22s ease;
  color: var(--ink);
}
.game-card:hover {
  transform: translateY(-7px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .55) inset,
    0 22px 40px rgba(0, 0, 0, .5),
    0 6px 14px rgba(0, 0, 0, .28);
}
.game-card--wishlist {
  box-shadow:
    0 0 0 2px var(--rust),
    0 14px 28px rgba(0, 0, 0, .4),
    0 4px 10px rgba(0, 0, 0, .22);
}

.game-card .cover {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--sand-edge);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.game-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
  background: var(--sand-edge);
}
.wishlist-badge {
  position: absolute;
  top: .55rem; right: .55rem;
  background: var(--rust);
  color: #fff1d4;
  font-size: .65rem;
  font-weight: 800;
  padding: .22rem .6rem;
  border-radius: 999px;
  letter-spacing: .12em;
  text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
}
.wishlist-badge--exp {
  top: auto; bottom: .55rem;
  background: var(--tangerine);
  color: var(--ink);
}
.wishlist-badge--owned-exp {
  top: auto; bottom: .55rem;
  background: var(--olive);
  color: #fff;
}

/* Wished expansions section on wishlist page */
.wished-expansions-section {
  margin-top: 2.5rem;
}
.wished-expansions-heading {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--ink);
}
.wished-expansions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.wished-expansion-item {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .55rem .8rem;
  background: var(--sand-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.wished-expansion-name {
  font-weight: 600;
  color: var(--ink);
}
.wished-expansion-base {
  font-size: .85rem;
  color: var(--muted);
}

.card-body {
  padding: .85rem .9rem .95rem;
  display: flex; flex-direction: column;
  gap: .5rem; flex: 1;
  background: var(--sand-card);
  color: var(--ink);
}
.card-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.005em;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--sienna); }

.badges, .chips {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: .3rem;
}
.badges li {
  font-size: .7rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: rgba(110, 47, 21, .08);
  border: 1px solid rgba(110, 47, 21, .2);
  color: var(--ink-soft);
  font-weight: 600;
}
.badges li.badge-best {
  background: rgba(124, 138, 58, .15);
  color: #525c1c;
  border-color: rgba(124, 138, 58, .38);
  font-weight: 700;
}
.badges li.badge-rating {
  background: rgba(232, 137, 58, .18);
  color: #8a4818;
  border-color: rgba(232, 137, 58, .4);
  font-weight: 700;
}
.chips li {
  font-size: .65rem;
  padding: .14rem .5rem;
  border-radius: 999px;
  background: rgba(110, 47, 21, .06);
  color: var(--ink-soft);
  border: 1px solid rgba(110, 47, 21, .16);
  font-weight: 500;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  color: var(--c-muted);
  padding: 3rem 1rem;
  border: 1px dashed rgba(255, 200, 130, .28);
  border-radius: var(--r-md);
  font-style: italic;
  background: rgba(30, 12, 4, .55);
  backdrop-filter: blur(4px);
}

/* ── Buttons ── */
button.primary, button.secondary, button.danger {
  font: inherit;
  padding: .55rem 1.05rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 1px solid transparent;
  letter-spacing: .005em;
  transition: all .15s;
  font-weight: 700;
  font-size: .9rem;
}
button.primary {
  background: linear-gradient(180deg, var(--tangerine-lt), var(--tangerine));
  color: var(--ink);
  border-color: var(--sienna-warm);
  box-shadow: 0 6px 14px rgba(232, 137, 58, .35);
}
button.primary:hover {
  background: linear-gradient(180deg, #ffd9a6, var(--tangerine-lt));
  box-shadow: 0 8px 18px rgba(232, 137, 58, .45);
  transform: translateY(-1px);
}
button.secondary {
  background: #b87333;
  color: #fff8ee;
  border-color: #8a5520;
}
button.secondary:hover { background: #cc8844; border-color: #6b3f10; color: #fff; }
button.danger {
  background: #a03020;
  color: #fff0eb;
  border-color: #6e1e10;
}
button.danger:hover { background: #c03825; border-color: #4e1208; color: #fff; }
button.active-wishlist {
  background: rgba(185, 74, 38, .22);
  border-color: rgba(185, 74, 38, .55);
  color: #ff9876;
}

/* ── Wishlist Pill ── */
.wishlist-pill {
  display: inline-block;
  font-size: .72rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  background: rgba(185, 74, 38, .2);
  color: #ff9876;
  border: 1px solid rgba(185, 74, 38, .45);
  font-weight: 700;
  letter-spacing: .04em;
}
.row-wishlist > td { background: rgba(185, 74, 38, .06); }

/* ── Auth ── */
.auth-form {
  max-width: 380px;
  margin: 5rem auto;
  background: rgba(253, 243, 223, .96);
  border: 1px solid rgba(58, 26, 8, .2);
  border-radius: var(--r-md);
  padding: 2rem;
  display: flex; flex-direction: column; gap: .9rem;
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .6) inset,
    0 16px 48px rgba(0, 0, 0, .55);
}
.auth-form h1 { font-size: 1.55rem; color: var(--ink); font-weight: 800; letter-spacing: -.01em; }
.auth-form input[type="password"] {
  font: inherit;
  padding: .6rem .8rem;
  border: 1px solid rgba(58, 26, 8, .25);
  border-radius: var(--r-sm);
  background: #fff8e6;
  color: var(--ink);
}
.auth-form input[type="password"]:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 3px rgba(232, 137, 58, .22); }
.auth-error { color: var(--rust); font-size: .9rem; font-weight: 600; }

/* ── Admin ── */
.admin-section { margin-bottom: 2.5rem; }
.admin-section h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: #fff1d4;
  font-weight: 800;
  letter-spacing: -.005em;
  border-bottom: 1px solid rgba(255, 200, 130, .22);
  padding-bottom: .5rem;
}

.bgg-search input[type="search"] {
  width: 100%;
  padding: .7rem .95rem;
  border: 1px solid rgba(255, 200, 130, .25);
  border-radius: var(--r-sm);
  background: rgba(20, 8, 2, .55);
  color: #fff1d4;
  font: inherit;
}
.bgg-search input[type="search"]:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 3px rgba(232, 137, 58, .22); }
.bgg-results { margin-top: .6rem; }
.bgg-results ul { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.bgg-results li {
  display: flex; justify-content: space-between; align-items: center;
  padding: .6rem .9rem;
  background: rgba(253, 243, 223, .9);
  border: 1px solid rgba(58, 26, 8, .15);
  border-radius: var(--r-sm);
  color: var(--ink);
}
.bgg-results .meta { color: var(--ink-soft); font-size: .84rem; }

.games-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(253, 243, 223, .96);
  border: 1px solid rgba(58, 26, 8, .18);
  border-radius: var(--r-md);
  overflow: hidden;
  color: var(--ink);
}
.games-table a { color: var(--sienna); }
.games-table a:hover { color: var(--sienna-deep); }
.games-table .muted { color: var(--ink-soft); }
.games-table th, .games-table td {
  padding: .65rem .95rem;
  text-align: left;
  border-bottom: 1px solid rgba(58, 26, 8, .1);
  font-size: .9rem;
  vertical-align: middle;
}
.games-table th {
  color: var(--ink-soft); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .12em;
  background: rgba(58, 26, 8, .06);
  font-weight: 700;
}
.games-table tbody tr:last-child td { border-bottom: none; }
.games-table tbody tr:hover { background: rgba(232, 137, 58, .08); }
.games-table .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.games-table .actions { display: flex; gap: .4rem; justify-content: flex-end; }
.games-table img.row-thumb { width: 40px; height: 40px; border-radius: var(--r-sm); object-fit: cover; border: 1px solid rgba(58, 26, 8, .2); }

.toolbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem;
}

/* ── Manual Form ── */
.manual-form { display: flex; flex-direction: column; gap: .85rem; }
.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.manual-grid label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .72rem; color: var(--c-muted);
  text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700;
}
.manual-grid label.full-width { grid-column: 1 / -1; }
.manual-grid label.manual-wishlist-label {
  flex-direction: row; align-items: center;
  gap: .4rem; color: #fff1d4;
  cursor: pointer; text-transform: none; letter-spacing: 0;
  font-weight: 500;
}
.manual-grid input[type="text"],
.manual-grid input[type="number"],
.manual-grid input[type="url"] {
  font: inherit; font-size: .9rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(255, 200, 130, .22);
  border-radius: var(--r-sm);
  background: rgba(20, 8, 2, .55);
  color: #fff1d4;
}
.manual-grid input:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 3px rgba(232, 137, 58, .22); }
.required { color: #ff9876; }

/* ── Detail-Seite ── */
.game-detail {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 2.5rem;
}
@media (max-width: 700px) { .game-detail { grid-template-columns: 1fr; } }
.cover-column { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.game-detail .cover-large img {
  width: 100%;
  border-radius: var(--r-md);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55);
}
.game-detail h1 {
  margin-top: 0; margin-bottom: .85rem;
  font-size: 2.15rem;
  color: #fff1d4;
  font-weight: 800;
  letter-spacing: -.015em;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.game-detail .description {
  white-space: pre-line; color: var(--c-text);
  line-height: 1.75;
}
.facts {
  list-style: none; margin: 0 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.facts li {
  background: rgba(253, 243, 223, .94);
  border: 1px solid rgba(58, 26, 8, .15);
  padding: .75rem .95rem;
  border-radius: var(--r-md);
  border-left: 3px solid var(--tangerine);
  color: var(--ink);
}
.facts .label {
  display: block; font-size: .68rem;
  color: var(--ink-soft); text-transform: uppercase;
  letter-spacing: .12em; margin-bottom: .3rem;
  font-weight: 700;
}
.facts .value { font-size: 1.15rem; font-weight: 800; color: var(--ink); }

.gallery-thumbs {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .55rem;
}
.gallery-thumb {
  display: block; width: 100%;
  aspect-ratio: 1 / 1; padding: 0; margin: 0;
  border: 1px solid rgba(255, 200, 130, .3);
  border-radius: var(--r-sm);
  background: var(--sand-edge);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.gallery-thumb:hover { border-color: var(--tangerine); transform: scale(1.04); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 4, 1, .92);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; cursor: zoom-out; padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .8);
  cursor: default;
}
.lightbox-nav {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1;
  color: #fff1d4;
  background: rgba(30, 12, 4, .65);
  border: 1px solid var(--tangerine);
  border-radius: 50%;
  cursor: pointer; user-select: none;
  transition: background .15s;
}
.lightbox-nav:hover { background: rgba(30, 12, 4, .85); }
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

/* ── Admin Top Bar ── */
.admin-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Admin Card ── */
.game-card--admin { cursor: pointer; }
.game-card--admin:hover { transform: translateY(-7px); }
.game-card--admin .cover { position: relative; }

.admin-card-actions {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: flex-end;
  gap: .3rem;
  padding: .4rem .5rem;
  background: linear-gradient(to top, rgba(10,4,1,.75) 0%, transparent 100%);
  opacity: 0;
  transition: opacity .18s;
}
.game-card--admin:hover .admin-card-actions { opacity: 1; }

.admin-card-btn {
  background: rgba(253, 243, 223, .88);
  border: 1px solid rgba(58, 26, 8, .25);
  border-radius: var(--r-sm);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  font-weight: 700;
  padding: .22rem .55rem;
  line-height: 1;
  transition: background .12s;
}
.admin-card-btn:hover { background: #fff8e6; }
.admin-card-btn.active-wishlist { color: var(--rust); }
.admin-card-btn--danger { color: #a03020; }
.admin-card-btn--danger:hover { background: #ffeae6; }

/* ── Add-Modal Tabs ── */
.add-modal-tabs {
  display: flex; gap: .3rem;
  margin-bottom: .5rem;
  padding: .25rem;
  background: rgba(58, 26, 8, .08);
  border-radius: 999px;
  width: fit-content;
}
.add-modal-tabs .tab-btn {
  color: var(--ink-soft);
  font-size: .85rem;
}
.add-modal-tabs .tab-btn.active {
  background: linear-gradient(180deg, var(--tangerine-lt), var(--tangerine));
  color: var(--ink);
}

/* ── Modal Images Section ── */
.modal-images-section {
  display: flex; gap: 1rem; align-items: flex-start;
  margin-bottom: .5rem;
}
.modal-cover-preview {
  flex-shrink: 0; width: 90px;
}
.modal-cover-preview img {
  width: 90px; height: 120px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid rgba(58, 26, 8, .2);
}
.modal-image-fields {
  flex: 1;
  display: flex; flex-direction: column; gap: .6rem;
}
.modal-image-fields label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .72rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .1em; font-weight: 700;
}
.modal-image-fields input {
  font: inherit; font-size: .88rem;
  padding: .45rem .65rem;
  border: 1px solid rgba(58, 26, 8, .22);
  border-radius: var(--r-sm);
  background: #fff8e6; color: var(--ink);
}
.modal-image-fields input:focus { outline: none; border-color: var(--tangerine); }

/* ── Modal Description ── */
.modal-description {
  width: 100%;
  font: inherit; font-size: .9rem;
  padding: .55rem .75rem;
  border: 1px solid rgba(58, 26, 8, .22);
  border-radius: var(--r-sm);
  background: #fff8e6; color: var(--ink);
  resize: vertical;
  line-height: 1.6;
}
.modal-description:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 3px rgba(232, 137, 58, .2); }

/* ── Modal wide variant ── */
.modal-box--wide { max-width: 820px; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(10, 4, 1, .75);
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}
.modal-backdrop[hidden] { display: none; }
body.modal-open { overflow: hidden; }

.modal-box {
  position: relative;
  background: var(--sand-card);
  border: 1px solid rgba(58, 26, 8, .25);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .7);
  color: var(--ink);
  width: 100%; max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}
.modal-box h2 {
  margin: 0 0 1.25rem;
  font-size: 1.5rem; font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
  padding-right: 2rem;
}
.modal-box h2 small { font-size: .75em; font-weight: 500; }
.modal-box h3 {
  margin: 1.5rem 0 .75rem;
  font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(58, 26, 8, .12);
  padding-bottom: .4rem;
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  font-size: 1.5rem; line-height: 1;
  color: var(--ink-soft); cursor: pointer;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: rgba(58, 26, 8, .1); color: var(--ink); }

.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
  margin-bottom: .75rem;
}
.modal-form-grid label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .72rem; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .1em;
  font-weight: 700;
}
.modal-form-grid label.full-width { grid-column: 1 / -1; }
.modal-form-grid .modal-wishlist-label {
  flex-direction: row; align-items: center;
  gap: .4rem; color: var(--ink);
  cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 500;
}
.modal-form-grid input[type="text"],
.modal-form-grid input[type="number"],
.modal-form-grid input[type="url"],
.modal-form-grid select {
  font: inherit; font-size: .9rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(58, 26, 8, .22);
  border-radius: var(--r-sm);
  background: #fff8e6;
  color: var(--ink);
}
.modal-form-grid input:focus,
.modal-form-grid select:focus { outline: none; border-color: var(--tangerine); box-shadow: 0 0 0 3px rgba(232, 137, 58, .2); }

.modal-bgg-hint { font-size: .83rem; margin-bottom: .5rem; }
.modal-bgg-hint a { color: var(--sienna); }

/* ── Modal Expansions ── */
.modal-exp-list {
  list-style: none;
  display: flex; flex-direction: column; gap: .35rem;
  margin-bottom: .75rem;
}
.modal-exp-item {
  display: flex; align-items: center; gap: .6rem;
  padding: .45rem .65rem;
  background: rgba(253, 243, 223, .7);
  border: 1px solid rgba(58, 26, 8, .1);
  border-radius: var(--r-sm);
  font-size: .88rem;
}
.modal-exp-name { flex: 1; }
.modal-exp-wishlist {
  display: flex; align-items: center; gap: .25rem;
  cursor: pointer; color: var(--ink-soft);
  font-size: .9rem;
}
.modal-exp-wishlist input[type="checkbox"] { display: none; }
.modal-exp-wishlist span { font-size: 1.1rem; }
.modal-exp-wishlist:has(input:checked) span { color: var(--tangerine); }
.modal-exp-add {
  display: flex; flex-direction: column; gap: .4rem;
}
.modal-exp-add details summary {
  cursor: pointer; font-size: .85rem; font-weight: 700;
  color: var(--sienna); user-select: none; padding: .3rem 0;
}

/* ── Expansion Checklist ── */
.modal-exp-checklist {
  list-style: none;
  display: flex; flex-direction: column; gap: .25rem;
  max-height: 280px; overflow-y: auto;
  margin-bottom: .25rem;
  padding-right: .25rem;
}
.modal-exp-check-item {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .5rem;
  border-radius: var(--r-sm);
  transition: background .1s;
}
.modal-exp-check-item:hover { background: rgba(58, 26, 8, .05); }
.exp-check-owned,
.exp-check-wishlist {
  display: flex; align-items: center; cursor: pointer; flex-shrink: 0;
}
.exp-check-owned input,
.exp-check-wishlist input { display: none; }
.exp-check-box,
.exp-check-star {
  width: 1.6rem; height: 1.6rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  border: 1.5px solid rgba(58, 26, 8, .2);
  font-size: .9rem;
  color: transparent;
  background: #fff8e6;
  transition: all .12s;
  user-select: none;
}
.exp-check-owned:hover .exp-check-box { border-color: #3a7a3a; color: rgba(58, 122, 58, .3); }
.exp-check-owned input:checked + .exp-check-box { background: #3a7a3a; border-color: #2a5a2a; color: #fff; }
.exp-check-wishlist:hover .exp-check-star { border-color: var(--tangerine); color: rgba(232, 137, 58, .3); }
.exp-check-wishlist input:checked + .exp-check-star { background: var(--tangerine); border-color: var(--sienna-warm); color: #fff; }
.exp-check-name { font-size: .88rem; color: var(--ink); flex: 1; }
.exp-add-summary {
  cursor: pointer; font-size: .85rem; font-weight: 700;
  color: var(--sienna); user-select: none; padding: .3rem 0;
}

/* ── Modal Actions ── */
.modal-actions {
  display: flex; justify-content: flex-end; gap: .6rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(58, 26, 8, .12);
}

/* ── btn-sm ── */
.btn-sm { padding: .25rem .55rem !important; font-size: .8rem !important; }

/* ── HTMX ── */
.htmx-indicator { opacity: 0; transition: opacity .2s; }
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* ── Erweiterungen – Detail-Seite ── */
.expansions-list {
  list-style: none;
  display: flex; flex-direction: column; gap: .45rem;
  margin: 0 0 1.25rem;
}
.expansion-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .5rem .75rem;
  background: rgba(253, 243, 223, .88);
  border: 1px solid rgba(58, 26, 8, .12);
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: .93rem;
}
.expansion-item.expansion-wishlist {
  background: rgba(253, 243, 200, .6);
  border-color: rgba(232, 137, 58, .3);
  opacity: .8;
}
.expansion-thumb {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid rgba(58, 26, 8, .2);
  flex-shrink: 0;
}
.expansion-status {
  font-size: 1rem; flex-shrink: 0;
}
.expansion-status.owned { color: #3a7a3a; }
.expansion-status.wishlist { color: var(--tangerine); }
.expansion-name { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

/* ── Erweiterungen – Admin Panel ── */
.expansions-row td { padding: 0 !important; }
.expansions-panel { background: rgba(58, 26, 8, .06); }
.expansions-panel-inner {
  padding: 1rem 1.25rem;
  border-top: 2px solid rgba(232, 137, 58, .3);
}
.expansions-panel-inner h4 {
  margin: 0 0 .75rem;
  font-size: .9rem; font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: .1em;
}
.expansions-table {
  width: 100%; border-collapse: collapse;
  margin-bottom: .75rem;
}
.expansions-table td {
  padding: .4rem .6rem;
  border-bottom: 1px solid rgba(58, 26, 8, .08);
  vertical-align: middle;
  font-size: .88rem;
  color: var(--ink);
}
.expansions-table tr:last-child td { border-bottom: none; }
.expansions-table td:last-child { text-align: right; white-space: nowrap; }
.expansion-add-section {
  display: flex; flex-direction: column; gap: .5rem;
  margin-top: .75rem;
}
.expansion-add-section details summary {
  cursor: pointer;
  font-size: .85rem; font-weight: 700;
  color: var(--tangerine);
  user-select: none;
  padding: .3rem 0;
}
.expansion-bgg-search {
  margin-top: .5rem;
}
.expansion-bgg-search input[type="search"] {
  width: 100%; padding: .55rem .8rem;
  border: 1px solid rgba(58, 26, 8, .2);
  border-radius: var(--r-sm);
  background: rgba(253, 243, 223, .95);
  color: var(--ink); font: inherit; font-size: .88rem;
}
.expansion-bgg-search input[type="search"]:focus { outline: none; border-color: var(--tangerine); }
.expansion-manual-form {
  display: flex; align-items: center; gap: .5rem;
  margin-top: .5rem; flex-wrap: wrap;
}
.expansion-manual-form input[type="text"],
.expansion-manual-form input[type="number"] {
  font: inherit; font-size: .88rem;
  padding: .5rem .7rem;
  border: 1px solid rgba(58, 26, 8, .2);
  border-radius: var(--r-sm);
  background: rgba(253, 243, 223, .95);
  color: var(--ink);
}
.expansion-manual-form input[type="text"] { flex: 1 1 180px; }
.expansion-manual-form input[type="number"] { width: 90px; }
.active-wishlist { color: var(--tangerine) !important; }
