/* ==========================================================================
   Meine Schleich-Welt – Warm, joyful, mobile-first design system
   ========================================================================== */

:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-soft: #f3ede3;
  --border: #e7dfd3;
  --border-strong: #d5c9b8;

  --text: #1f2b24;
  --text-muted: #5d6a62;
  --text-light: #7c8981;

  --primary: #1f5b42;
  --primary-hover: #174733;
  --primary-soft: #e6f4ec;
  --primary-border: #8ec9a9;

  --owned: #1f7a4c;
  --owned-bg: #e7f7ee;
  --owned-border: #6ec495;

  --wish: #e24c6b;
  --wish-hover: #c93756;
  --wish-bg: #fdecf0;
  --wish-border: #f3a1b3;

  --accent: #f0a830;
  --accent-soft: #fef6e4;

  --danger: #c63636;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(31, 43, 36, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 43, 36, 0.1);
  --shadow-lg: 0 18px 48px rgba(20, 32, 26, 0.22);

  --font-display: "Fredoka", "Nunito", system-ui, -apple-system, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --header-bg: linear-gradient(135deg, #1f5b42 0%, #276e50 60%, #1c503a 100%);
  --header-shadow: rgba(24, 62, 45, 0.18);
  --header-h: 68px;
  --mobile-nav-h: 66px;
}

/* Harmonious theme accents per child + universe */
body[data-theme="ronja-schleich"] {
  --primary: #1f5b42;
  --primary-hover: #174733;
  --primary-soft: #e6f4ec;
  --header-bg: linear-gradient(135deg, #1f5b42 0%, #276e50 60%, #1c503a 100%);
}

body[data-theme="ronja-tonies"] {
  --primary: #b8374e;
  --primary-hover: #97283c;
  --primary-soft: #fcebef;
  --header-bg: linear-gradient(135deg, #a62c43 0%, #c9445b 60%, #922338 100%);
}

body[data-theme="ronja-wishes"] {
  --primary: #c05621;
  --primary-hover: #9c4221;
  --primary-soft: #fef0e6;
  --header-bg: linear-gradient(135deg, #b84b1a 0%, #d96b2b 60%, #9c3d15 100%);
}

body[data-theme="melina-wishes"] {
  --primary: #8e3b6b;
  --primary-hover: #702a53;
  --primary-soft: #faeef5;
  --header-bg: linear-gradient(135deg, #7e305d 0%, #a5487e 60%, #68254c 100%);
}

body[data-theme="melina-schleich"] {
  --primary: #1b6070;
  --primary-hover: #144b58;
  --primary-soft: #e4f3f6;
  --header-bg: linear-gradient(135deg, #185766 0%, #227285 60%, #144a57 100%);
}

body[data-theme="melina-tonies"] {
  --primary: #663c8f;
  --primary-hover: #502d73;
  --primary-soft: #f2ebfa;
  --header-bg: linear-gradient(135deg, #5a3480 0%, #7848a8 60%, #4d2a6e 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(240, 168, 48, 0.08), transparent 32%),
    radial-gradient(circle at 92% 6%, rgba(31, 91, 66, 0.07), transparent 36%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
  padding-bottom: 24px;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--header-bg);
  color: #fffdf8;
  box-shadow: 0 4px 16px var(--header-shadow);
  position: relative;
  z-index: 30;
  transition: background 0.25s ease;
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.header-switchers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.switcher-group {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.sw-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.sw-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sw-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  font-size: 23px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.brand-sub {
  font-size: 0.78rem;
  opacity: 0.86;
  font-weight: 600;
}

.header-progress {
  flex: 1;
  max-width: 300px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 7px 12px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
  margin-bottom: 5px;
}

.progress-label {
  opacity: 0.88;
  font-weight: 700;
}

.progress-count {
  font-family: var(--font-display);
  font-size: 0.86rem;
}

.progress-track {
  height: 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, #f8d26a, #7ce2a4);
  transition: width 0.35s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.15;
  text-decoration: none;
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-lg {
  padding: 12px 20px;
  font-size: 0.98rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.84rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(31, 91, 66, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-wish {
  background: var(--wish);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(226, 76, 107, 0.3);
}

.btn-wish:hover {
  background: var(--wish-hover);
}

.btn-soft {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-soft:hover {
  background: var(--surface-soft);
}

.site-header .btn-soft {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.site-header .btn-soft:hover {
  background: rgba(255, 255, 255, 0.26);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: #ebb6b6;
}

.btn-danger-outline:hover {
  background: #fdeeee;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: #ffffff;
  color: var(--wish);
  font-size: 0.78rem;
  font-weight: 800;
}

/* ==========================================================================
   Sticky Controls Bar
   ========================================================================== */

.controls-bar {
  position: sticky;
  top: 0;
  z-index: 25;
  background: rgba(250, 247, 242, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0 10px;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-box {
  position: relative;
  flex: 1 1 280px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  opacity: 0.75;
}

.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 42px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.96rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 91, 66, 0.14);
}

.search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-clear {
  position: absolute;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  display: grid;
  place-items: center;
}

.search-clear[hidden] {
  display: none;
}

.status-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.status-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 13px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.pill:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.pill.pill-owned.active {
  background: var(--owned);
  border-color: var(--owned);
}

.pill.pill-wish.active {
  background: var(--wish);
  border-color: var(--wish);
}

.pill-count {
  font-size: 0.76rem;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(31, 43, 36, 0.08);
  font-weight: 800;
}

.pill.active .pill-count {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

/* Category Strip */
.category-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0 4px;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  transition: all 0.15s ease;
}

.cat-pill:hover {
  transform: translateY(-1px);
  border-color: var(--cat-color, var(--primary));
}

.cat-pill.active {
  background: var(--cat-color, var(--primary));
  border-color: var(--cat-color, var(--primary));
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.cat-pill .cat-stat {
  font-size: 0.73rem;
  opacity: 0.82;
  font-weight: 800;
}

/* Subcontrols Row */
.subcontrols-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.kind-toggle {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.results-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-muted);
}

.reset-link {
  border: none;
  background: none;
  color: var(--primary);
  font-weight: 800;
  text-decoration: underline;
  padding: 0;
  font-size: 0.84rem;
}

.sort-wrap select {
  height: 34px;
  padding: 0 28px 0 11px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

/* ==========================================================================
   Catalog Grid & Cards
   ========================================================================== */

.main-content {
  padding-top: 18px;
  padding-bottom: 36px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px;
}

.fig-card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.fig-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.fig-card.is-owned {
  border-color: var(--owned-border);
  background: linear-gradient(180deg, #ffffff 72%, #f1fbf5 100%);
}

.fig-card.is-wish {
  border-color: var(--wish-border);
  background: linear-gradient(180deg, #ffffff 72%, #fff5f7 100%);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  display: grid;
  place-items: center;
  padding: 12px;
  cursor: pointer;
  overflow: hidden;
  border-bottom: 1px solid #f2ece2;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.fig-card:hover .card-media img {
  transform: scale(1.05);
}

.card-status-badge {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.card-status-badge.owned {
  background: var(--owned);
  color: #ffffff;
}

.card-status-badge.wish {
  background: var(--wish);
  color: #ffffff;
}

.card-art-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  max-width: calc(100% - 92px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(250, 247, 242, 0.92);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 7px;
}

.card-kind-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  background: var(--accent-soft);
  color: #9e650a;
  border: 1px solid #f5d89e;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 7px;
}

.card-body {
  padding: 11px 12px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}

.world-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--tag-bg, var(--surface-soft));
  color: var(--tag-fg, var(--text-muted));
  letter-spacing: 0.02em;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.24;
  color: var(--text);
  cursor: pointer;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45em;
}

.card-title:hover {
  color: var(--primary);
}

.card-actions {
  margin-top: auto;
  padding-top: 6px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.act-btn {
  height: 38px;
  padding: 0 8px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.14s ease;
}

.act-btn:active {
  transform: scale(0.94);
}

.act-own {
  color: var(--primary);
  border-color: #cbe2d5;
  background: #f6fbf8;
}

.act-own:hover {
  background: var(--owned-bg);
  border-color: var(--owned-border);
}

.act-own.active,
.act-own.active:hover {
  background: var(--owned);
  border-color: var(--owned);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(31, 122, 76, 0.25);
}

.act-own.active:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.act-wish {
  color: var(--wish);
  border-color: #f3ced6;
  background: #fff8fa;
}

.act-wish:hover:not(:disabled) {
  background: var(--wish-bg);
  border-color: var(--wish-border);
}

.act-wish.active,
.act-wish.active:hover:not(:disabled) {
  background: var(--wish);
  border-color: var(--wish);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(226, 76, 107, 0.28);
}

.act-wish.active:hover:not(:disabled) {
  background: var(--wish-hover);
  border-color: var(--wish-hover);
}

.act-wish:disabled {
  opacity: 0.55;
  cursor: default;
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text-light);
}

@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.pop-anim {
  animation: pop 0.28s ease;
}

/* Skeleton Loader */
.skeleton-card {
  height: 310px;
  border-radius: var(--radius-md);
  background: linear-gradient(110deg, #efe9df 25%, #f7f3ec 45%, #efe9df 65%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
  to { background-position-x: -200%; }
}

/* Empty & Load More */
.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  max-width: 520px;
  margin: 24px auto;
}

.empty-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.empty-state h2 {
  font-family: var(--font-display);
  margin: 0 0 8px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--border);
  padding: 22px 0 34px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.footer-inner p {
  margin: 0;
}

.footer-note {
  font-size: 0.76rem;
  color: var(--text-light);
}

/* ==========================================================================
   Modals
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(18, 30, 24, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalIn 0.2s ease-out;
}

.modal-wide {
  max-width: 820px;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.modal-header h2 {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.35rem;
}

.modal-subtitle {
  margin: 3px 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.modal-close:hover {
  background: var(--surface-soft);
}

.modal-detail .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 4;
}

.modal-scroll {
  padding: 18px 22px 24px;
  overflow-y: auto;
  flex: 1;
}

/* Detail Modal */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  overflow-y: auto;
}

.detail-media {
  position: relative;
  background: #ffffff;
  padding: 26px;
  display: grid;
  place-items: center;
  border-right: 1px solid var(--border);
}

.detail-media img {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.detail-badges {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
}

.detail-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-right: 36px;
}

.art-chip {
  border: 1px solid var(--border-strong);
  background: var(--surface-soft);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text-muted);
}

.art-chip:hover {
  background: var(--border);
}

.detail-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.48rem;
  line-height: 1.2;
}

.detail-sub {
  margin: -4px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-desc {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.55;
}

.detail-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.detail-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--primary);
}

.shop-link {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
}

.shop-link:hover {
  text-decoration: underline;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 4px;
}

.btn-own-toggle {
  background: var(--owned-bg);
  color: var(--owned);
  border-color: var(--owned-border);
}

.btn-own-toggle.active {
  background: var(--owned);
  color: #ffffff;
  border-color: var(--owned);
}

.btn-wish-toggle {
  background: var(--wish-bg);
  color: var(--wish);
  border-color: var(--wish-border);
}

.btn-wish-toggle.active {
  background: var(--wish);
  color: #ffffff;
  border-color: var(--wish);
}

.btn-wish-toggle:disabled {
  opacity: 0.55;
  cursor: default;
  background: var(--surface-soft);
  color: var(--text-light);
  border-color: var(--border);
}

.detail-note-wrap {
  margin-top: 6px;
}

/* ==========================================================================
   Forms, Wishlist & Email UI
   ========================================================================== */

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
}

.field-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 1px;
}

.text-input,
.text-area {
  width: 100%;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.94rem;
  font-weight: 600;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.text-input:focus,
.text-area:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 91, 66, 0.13);
}

.text-area {
  resize: vertical;
  min-height: 70px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.section-heading {
  font-family: var(--font-display);
  margin: 0 0 12px;
  font-size: 1.12rem;
}

.wishlist-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.text-danger-btn {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 800;
}

.wishlist-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 10px;
}

.wish-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1.5px solid var(--wish-border);
  background: #fffbfc;
}

.wish-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 9px;
  border: 1px solid var(--border);
  padding: 3px;
  flex-shrink: 0;
}

.wish-item-info {
  min-width: 0;
  flex: 1;
}

.wish-item-name {
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1.22;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wish-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.wish-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.icon-mini-btn {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 0.88rem;
}

.icon-mini-btn.own:hover {
  background: var(--owned-bg);
  border-color: var(--owned-border);
}

.icon-mini-btn.del:hover {
  background: #fdeeee;
  border-color: #ebb6b6;
  color: var(--danger);
}

.empty-mini {
  text-align: center;
  padding: 32px 16px;
}

.empty-mini h3 {
  font-family: var(--font-display);
  margin: 0 0 6px;
}

.empty-mini p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

/* Email preview & alternatives */
.preview-details,
.setup-details {
  border: 1.5px solid var(--border);
  border-radius: 13px;
  background: var(--bg);
  padding: 10px 14px;
  margin-bottom: 12px;
}

.preview-details summary,
.setup-details summary {
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  list-style: none;
}

.preview-details summary::-webkit-details-marker,
.setup-details summary::-webkit-details-marker {
  display: none;
}

.email-preview-frame-wrap {
  margin-top: 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

#emailPreviewFrame {
  width: 100%;
  height: 340px;
  border: none;
  display: block;
}

.email-primary-actions {
  display: flex;
  margin: 10px 0 12px;
}

.email-primary-actions .btn {
  width: 100%;
}

.email-alt-box {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.email-alt-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.email-alt-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.email-alt-buttons .btn {
  font-size: 0.83rem;
  padding: 8px 12px;
}

.setup-body {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.setup-body p {
  margin: 0 0 8px;
}

.setup-body code {
  background: var(--surface);
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  font-size: 0.82em;
  color: var(--text);
}

.setup-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.status-banner {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.status-banner.success {
  background: var(--owned-bg);
  color: #145333;
  border: 1px solid var(--owned-border);
}

.status-banner.error {
  background: #fdeeee;
  color: #8f1d1d;
  border: 1px solid #f0b5b5;
}

.status-banner.info {
  background: #edf5fc;
  color: #1b4b75;
  border: 1px solid #b8d6f0;
}

/* ==========================================================================
   Import & Tabs Modal
   ========================================================================== */

.modal-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 22px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.mtab {
  border: none;
  background: transparent;
  padding: 9px 14px 11px;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.mtab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.drop-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg);
  padding: 24px 16px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.drop-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.drop-ico {
  font-size: 2.2rem;
  margin-bottom: 4px;
}

.drop-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.drop-hint {
  margin: 0 0 14px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.drop-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.import-options-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.import-mode-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.radio-pill input {
  accent-color: var(--primary);
}

.import-preview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.preview-group {
  margin-bottom: 16px;
}

.preview-group h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1rem;
}

.small-hint {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.match-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

.match-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.82rem;
  cursor: pointer;
}

.match-row img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 6px;
  padding: 2px;
  flex-shrink: 0;
}

.match-row-text {
  min-width: 0;
  flex: 1;
}

.match-row-name {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-row-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ambiguous-block {
  border: 1.5px solid #f0d7a0;
  background: #fffcf3;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.ambiguous-query {
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.unmatched-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.unmatched-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.84rem;
  font-weight: 700;
}

.preview-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.panel-intro {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.export-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.export-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-card h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
}

.export-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(92vw, 420px);
}

.toast {
  background: #1d2b24;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: auto;
  animation: toastIn 0.2s ease-out;
}

.toast-undo {
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #f8d26a;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.8rem;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Mobile Bottom Navigation & Responsive Breakpoints
   ========================================================================== */

.mobile-nav {
  display: none;
}

@media (max-width: 900px) {
  .header-progress {
    display: none;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-media {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 18px;
  }

  .detail-media img {
    max-height: 240px;
  }

  .export-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
  }

  .header-actions {
    display: none;
  }

  .header-inner {
    justify-content: space-between;
    gap: 8px;
  }

  .header-switchers {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 6px;
  }

  .switcher-group {
    flex: 1;
    justify-content: center;
  }

  .sw-btn {
    flex: 1;
    justify-content: center;
    padding: 6px 8px;
    font-size: 0.8rem;
  }

  .header-progress {
    display: block;
    max-width: 140px;
    padding: 5px 9px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .brand-title {
    font-size: 1.06rem;
  }

  .brand-sub {
    display: none;
  }

  .controls-bar {
    padding: 9px 0 8px;
  }

  .search-box input {
    height: 42px;
    font-size: 0.92rem;
  }

  .status-pills {
    width: 100%;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card-media {
    padding: 8px;
  }

  .card-body {
    padding: 8px 9px 9px;
    gap: 5px;
  }

  .card-title {
    font-size: 0.86rem;
  }

  .card-actions {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .act-btn {
    height: 36px;
    font-size: 0.78rem;
  }

  .card-art-badge {
    font-size: 0.64rem;
    padding: 1px 5px;
    left: 6px;
    bottom: 6px;
    max-width: calc(100% - 76px);
  }

  .card-price-badge {
    font-size: 0.66rem;
    padding: 1px 6px;
    right: 6px;
    bottom: 6px;
  }

  .subcontrols-row {
    gap: 6px;
  }

  .results-meta {
    order: 3;
    width: 100%;
    font-size: 0.8rem;
  }

  .form-grid,
  .form-grid-3,
  .detail-actions {
    grid-template-columns: 1fr;
  }

  /* Bottom Sheet style modals on phones */
  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-card {
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .modal-header {
    padding: 14px 16px 12px;
  }

  .modal-scroll {
    padding: 14px 16px calc(22px + env(safe-area-inset-bottom, 0px));
  }

  .modal-tabs {
    padding: 8px 14px 0;
  }

  /* Sticky Mobile Bottom Bar */
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
  }

  .mnav-btn {
    position: relative;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 5px 4px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
  }

  .mnav-btn.active {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .mnav-ico {
    font-size: 1.25rem;
    line-height: 1;
  }

  .mnav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    font-size: 0.66rem;
    font-weight: 800;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mnav-badge.owned {
    background: var(--owned);
  }

  .mnav-badge.wish {
    background: var(--wish);
  }

  .mnav-badge.is-zero {
    display: none;
  }

  .toast-container {
    bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  }
}

/* ============================================================================
   Live Cloud Sync Status Pill
   ============================================================================ */

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}

.sync-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.sync-pill:active {
  transform: scale(0.97);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}

.sync-pill[data-sync-state="synced"] {
  background: #eaf7ef;
  border-color: #b7e4c7;
  color: #1f6b3d;
}

.sync-pill[data-sync-state="synced"] .sync-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.sync-pill[data-sync-state="syncing"] {
  background: #fef6e4;
  border-color: #f3d189;
  color: #9a5b08;
}

.sync-pill[data-sync-state="syncing"] .sync-dot {
  background: #f59e0b;
  animation: syncPulse 0.9s infinite ease-in-out;
}

.sync-pill[data-sync-state="offline"] {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.sync-pill[data-sync-state="offline"] .sync-dot {
  background: #ef4444;
}

@keyframes syncPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

/* ============================================================================
   Internet Wish Finder Panel ("🎁 Wünsche")
   ============================================================================ */

.wish-finder-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.wish-finder-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
}

.wish-finder-sub {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.wish-lookup-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wish-lookup-input {
  flex: 1 1 260px;
}

.wish-shop-links-wrap {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wish-shop-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-muted);
}

.wish-shop-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shop-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.shop-chip:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.wish-search-results-wrap {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.wish-results-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.88rem;
}

.wish-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.wsr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wsr-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary);
}

.wsr-price {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.wsr-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.wsr-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wsr-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}

.wish-create-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.wish-create-preview {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}

.wish-create-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.wish-create-fields {
  flex: 1 1 320px;
}

.wish-create-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ============================================================================
   Card Price Badge, Buy Row & Live Reservation Banner
   ============================================================================ */

.card-price-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(4px);
}

.card-price-badge.is-live {
  border-color: var(--primary-border);
  color: var(--primary);
}

.card-reserved-banner {
  background: linear-gradient(90deg, #fff3cd 0%, #fde6a4 100%);
  color: #7c4a03;
  border-bottom: 1px solid #f0c96d;
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-reserved-banner.is-bought {
  background: linear-gradient(90deg, #ece7fb 0%, #ddd2f8 100%);
  color: #4c2780;
  border-bottom-color: #c4b2ef;
}

.fig-card.is-reserved {
  border-color: #e6b655;
  box-shadow: 0 3px 14px rgba(217, 146, 22, 0.14);
}

.card-shop-row {
  display: flex;
  gap: 6px;
  padding: 0 10px 10px;
}

.card-shop-link,
.card-reserve-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.card-shop-link:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.card-shop-link.is-warn {
  opacity: 0.68;
}

.card-reserve-btn {
  background: #fff8e6;
  border-color: #f0cc78;
  color: #8a5309;
}

.card-reserve-btn:hover {
  background: #fdecc2;
  border-color: #d99b26;
}

.card-reserve-btn.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
}

.card-reserve-btn.active.is-bought {
  background: #6d41b3;
  border-color: #552e94;
  color: #ffffff;
}

/* ============================================================================
   Detail Modal: Live Price, Shop Links & Double-Buy Protection Box
   ============================================================================ */

.detail-price-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-mini-refresh {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.btn-mini-refresh:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.detail-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-reserve {
  background: linear-gradient(135deg, #e8961c 0%, #d47b0d 100%);
  color: #ffffff;
  border: none;
}

.btn-reserve:hover {
  filter: brightness(1.06);
}

.reservation-box {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid #cce6d5;
  background: #f2fbf5;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reservation-box.is-buying {
  border-color: #f0c96d;
  background: #fff8e6;
}

.reservation-box.is-bought {
  border-color: #c9b6f0;
  background: #f4effd;
}

.reservation-status {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text);
}

.reservation-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-delete-wrap {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* ============================================================================
   Wishlist Modal Enhancements (Live Total, Buy Box, Per-Item Buy/Reserve)
   ============================================================================ */

.wishlist-summary-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wishlist-summary-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wishlist-total-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 800;
}

.wish-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.wish-price-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
}

.wish-resv-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: #fff3cd;
  color: #8a5309;
  font-size: 0.74rem;
  font-weight: 800;
}

.wish-resv-tag.is-bought {
  background: #ece7fb;
  color: #4c2780;
}

.wishlist-buy-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.wishlist-buy-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.wishlist-buy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0 10px;
  cursor: pointer;
}

.checkbox-inline input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

/* ============================================================================
   Compact Reservation Modal
   ============================================================================ */

.modal-compact {
  max-width: 460px;
}

.reserve-modal-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reserve-item-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
}

.reserve-item-preview img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 4px;
  flex-shrink: 0;
}

.reserve-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 640px) {
  .wish-finder-panel {
    padding: 14px;
  }
  .card-shop-row {
    padding: 0 8px 8px;
  }
  .card-shop-link,
  .card-reserve-btn {
    font-size: 0.71rem;
    padding: 5px 6px;
  }
}

/* ============================================================================
   Popular ("🔥 Beliebt") & Live New Releases ("✨ NEU") Highlights
   ============================================================================ */

.pill-popular.active {
  background: linear-gradient(135deg, #e86a24 0%, #d44d1a 100%);
  border-color: #c84414;
  color: #ffffff;
}

.pill-new.active {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  border-color: #0e6962;
  color: #ffffff;
}

.live-catalog-pill {
  background: #effcf9;
  border-color: #99e2d8;
  color: #0f766e;
}

.live-catalog-pill:hover {
  background: #dbf7f1;
  border-color: #0d9488;
  color: #0b5c56;
}

.card-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.tag-popular {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fff1e0 0%, #ffe0bd 100%);
  border: 1px solid #f5b971;
  color: #a84300;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.tag-new {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #e6fbf7 0%, #ccf5ed 100%);
  border: 1px solid #5eead4;
  color: #0f766e;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.25;
}

.fig-card.is-popular:not(.is-owned):not(.is-wish):not(.is-reserved) {
  border-color: #f3c47a;
  box-shadow: 0 3px 12px rgba(232, 122, 36, 0.1);
}

.fig-card.is-new:not(.is-owned):not(.is-wish):not(.is-reserved):not(.is-popular) {
  border-color: #7ee2d3;
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.09);
}
