:root {
  --bg: #F5EFE6;
  --surface: #FFFDF9;
  --surface-soft: #EDE4D6;
  --border: #DDD0BE;
  --text: #2A211C;
  --text-muted: #706257;
  --green: #AD4B4B;
  --green-hover: #943B3B;
  --green-soft: #F9EDED;
  --moss: #2C4A34;
  --moss-soft: #E6EFE8;
  --red: #AD4B4B;
  --red-soft: #F9EDED;
  --gold: #B68934;
  --gold-soft: #FBF3E0;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(42, 33, 28, 0.05);
}

html[data-theme="dark"] {
  --bg: #11131B;
  --surface: #181B26;
  --surface-soft: #202433;
  --border: #2C3146;
  --text: #ECEEF6;
  --text-muted: #9BA2B8;
  --green: #5E54A8;
  --green-hover: #4D4491;
  --green-soft: #23223D;
  --moss: #7FD19C;
  --moss-soft: #182924;
  --red: #5E54A8;
  --red-soft: #23223D;
  --gold: #A79DF8;
  --gold-soft: #23223D;
  --shadow: 0 4px 20px rgba(7, 8, 14, 0.45);
}

html[data-theme="dark"] .topbar,
html[data-theme="dark"] .person-nav {
  background: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .decor-shell {
  background: linear-gradient(180deg, #161924 0%, #141722 100%);
  border-color: #2E344A;
  box-shadow: inset 0 0 0 6px rgba(35, 34, 61, 0.35), 0 8px 28px rgba(0, 0, 0, 0.45);
}

html[data-theme="dark"] .decor-shell::before,
html[data-theme="dark"] .decor-shell::after {
  border-color: rgba(167, 157, 248, 0.35);
}

html[data-theme="dark"] .landing-card {
  background: linear-gradient(155deg, #1D2130 0%, #181B26 100%);
  border-color: #2E344B;
  box-shadow: inset 0 0 0 3px #161925, inset 0 0 0 4px rgba(167, 157, 248, 0.14), var(--shadow);
}

html[data-theme="dark"] .landing-card:hover {
  background: linear-gradient(155deg, #24283B 0%, #1D2030 100%);
  border-color: #4A4685;
}

html[data-theme="dark"] .landing-card.is-complete {
  background: linear-gradient(155deg, #1A2D26 0%, #15241F 100%);
  border-color: #2E5245;
  box-shadow: inset 0 0 0 3px #14221D, inset 0 0 0 4px rgba(127, 209, 156, 0.2), var(--shadow);
}

html[data-theme="dark"] .lock-tile,
html[data-theme="dark"] .occ-switch,
html[data-theme="dark"] .user-pill {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .herzenswunsch-badge {
  background: #22253A;
  border-color: #434975;
  color: #C4CBF8;
}

html[data-theme="dark"] .person-tab.active,
html[data-theme="dark"] .view-switch-group .btn.active {
  background: #23223D;
  border-color: #4A4685;
  color: #D2CEFF;
}

html[data-theme="dark"] .person-tab.is-complete,
html[data-theme="dark"] .person-tab.is-complete.active,
html[data-theme="dark"] .landing-card.is-complete,
html[data-theme="dark"] .status-reserved {
  background: #182924;
  border-color: #2E5245;
  color: #7FD19C;
}

html[data-theme="dark"] .wish-card.is-reserved {
  background: #1A2029;
  border-color: #2E5245;
}

html[data-theme="dark"] .status-open {
  background: var(--surface-soft);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .status-group,
html[data-theme="dark"] .wish-format-badge,
html[data-theme="dark"] .occ-btn.active {
  background: #23223D;
  border-color: #4A4685;
  color: #D2CEFF;
}

html[data-theme="dark"] .ticker-bar {
  background: linear-gradient(90deg, #151823, var(--surface), #151823);
}

html[data-theme="dark"] .ticker-item {
  color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background: var(--surface-soft);
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .bg-tree {
  opacity: 0.28;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 18px;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.875rem;
}

/* Login Page */
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 32px;
  max-width: 440px;
  text-align: center;
  box-shadow: var(--shadow);
}

.brand-mark {
  font-size: 1.75rem;
  color: var(--gold);
  margin-bottom: 10px;
}

/* Topbar */
.topbar {
  background: linear-gradient(180deg, #FCF7EE 0%, #F7EFE2 100%);
  border-bottom: 1px solid #D4C0A3;
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 10px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-tree {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
}

.brand-row h1 {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--green);
  white-space: nowrap;
}

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

.lock-tiles-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.lock-tile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.78rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  border: 1px solid #E5F1E6;
  background: #F9FCFA;
  color: #54845F;
  white-space: nowrap;
}

.lock-tile-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #92BA9D;
  flex-shrink: 0;
}

.lock-tile.locked {
  background: var(--red-soft);
  border-color: #E2C6C6;
  color: var(--red);
}

.lock-tile.locked .lock-tile-dot {
  background: var(--red);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 100%;
}

.topbar-actions .btn,
.topbar-actions .icon-btn,
.topbar-actions .user-pill {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.topbar-actions .icon-btn {
  width: 34px;
  padding: 0;
  font-size: 0.92rem;
}

.user-pill {
  font-weight: 500;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.flag-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.flag-btn:hover {
  border-color: var(--text-muted);
}

.flag-btn.active {
  border-color: var(--green);
  background: var(--green-soft);
  box-shadow: 0 0 0 2px rgba(173, 75, 75, 0.14);
}

.flag-svg {
  width: 20px;
  height: 14px;
  border-radius: 2px;
  display: block;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.14);
}

@media (max-width: 980px) {
  .topbar-inner {
    flex-wrap: wrap;
  }
  .brand {
    flex-wrap: wrap;
  }
}

/* Person Tabs */
.person-nav {
  background: #F5EBDA;
  border-bottom: 1px solid #D4C0A3;
}

.person-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 12px;
  margin: 0 -12px;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

.person-tabs::-webkit-scrollbar {
  display: none;
}

.person-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.25;
  transition: all 0.15s ease;
}

.person-tab:hover {
  border-color: var(--text-muted);
}

.person-tab.is-complete {
  background: #F3F7F3;
  border-color: #CBDCC9;
  color: #2A4530;
}

.person-tab.is-complete .tab-count-plain {
  color: #3D6D49;
  opacity: 0.95;
}

.person-tab:focus {
  outline: none;
}

.person-tab.active {
  background: #FBF3E0;
  border-color: #C8A252;
  color: #5A3E18;
  box-shadow: inset 0 1px 2px rgba(140, 106, 42, 0.14);
}

.person-tab.is-complete.active {
  background: #E8F1E9;
  border-color: #82AB8C;
  color: #23472D;
  box-shadow: inset 0 1px 2px rgba(44, 74, 52, 0.12);
}

/* Landing Page (Weihnachtsliste - Variante B kompakt, 2x4 Raster) */
.landing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
  align-items: stretch;
}

@media (max-width: 720px) {
  .landing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .occ-switch {
    gap: 3px;
    padding: 1px 4px;
  }
  .occ-btn {
    min-width: 26px;
    height: 23px;
    padding: 0 7px;
    font-size: 0.8rem;
  }
}

.landing-card {
  background: linear-gradient(155deg, #FFFDF9 0%, #F7EFE2 100%);
  border: 1.5px solid #D8C7AE;
  border-radius: 12px;
  padding: 13px 12px;
  min-height: 112px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 3px #F4ECE0, inset 0 0 0 4px rgba(182, 137, 52, 0.25), var(--shadow);
  transition: all 0.22s ease;
}

.avatar-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--surface-soft);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.avatar-circle.avatar-lg {
  width: 46px;
  height: 46px;
  font-size: 1.15rem;
}

.avatar-circle.is-complete {
  border: 2px solid #5A8767;
  background: #5A8767;
  color: #FFFDF9;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-card-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.landing-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 4px;
  min-height: 24px;
}

.landing-card-name.is-compact {
  font-size: 0.87rem;
}

.landing-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.landing-check {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #5A8767;
  background: linear-gradient(155deg, #E5F2E8 0%, #CBE2D1 100%);
  border: 1px solid #5A8767;
  line-height: 1;
}

.landing-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.occ-switch {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  background: rgba(237, 228, 214, 0.7);
  border: 1px solid #D8C7AE;
  border-radius: 999px;
  padding: 0 2px;
  flex-shrink: 0;
  max-width: 100%;
}

.occ-btn {
  border: none;
  background: transparent;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
}

.occ-btn:hover {
  background: rgba(255, 253, 249, 0.85);
  color: var(--text);
}

.occ-btn.active {
  background: #FFFDF9;
  color: var(--green);
  box-shadow: 0 1px 3px rgba(42, 33, 28, 0.15);
}

.landing-stats strong {
  color: var(--text);
  font-weight: 600;
}

.wishlist-header-row {
  align-items: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.wishlist-owner-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

@media (max-width: 640px) {
  .brand-row h1 {
    font-size: 1.15rem;
    white-space: normal;
  }
  .topbar-row-2 {
    gap: 8px;
  }
  .lock-tile {
    height: 28px;
    padding: 0 9px;
    font-size: 0.73rem;
  }
  .topbar-actions .btn,
  .topbar-actions .icon-btn,
  .topbar-actions .user-pill {
    height: 28px;
    font-size: 0.75rem;
    padding: 0 9px;
  }
  .topbar-actions .icon-btn {
    width: 30px;
    padding: 0;
  }
  .landing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .landing-card {
    padding: 8px 9px;
    gap: 8px;
  }
  .avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }
  .landing-check {
    width: 32px;
    height: 32px;
    font-size: 0.92rem;
  }
  .landing-card-name {
    font-size: 0.88rem;
  }
  .landing-badge {
    font-size: 0.68rem;
    padding: 0 6px;
    height: 19px;
  }
}

@media (max-width: 380px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}

.landing-card:hover {
  background: linear-gradient(155deg, #FFFDF8 0%, #FBF0D9 100%);
  border-color: #C8A252;
  box-shadow: inset 0 0 0 3px #FAF2E1, inset 0 0 0 4px rgba(182, 137, 52, 0.48), 0 4px 14px rgba(182, 137, 52, 0.14);
}

.landing-card.is-complete:hover {
  background: linear-gradient(155deg, #F8FCF9 0%, #DFEDE3 100%);
  border-color: #5A8767;
  box-shadow: inset 0 0 0 3px #EEF7F0, inset 0 0 0 4px rgba(90, 135, 103, 0.42), 0 4px 14px rgba(44, 74, 52, 0.12);
}

.landing-card.is-complete {
  background: linear-gradient(155deg, #E5F2E8 0%, #CBE2D1 100%);
  border-color: #5A8767;
  box-shadow: inset 0 0 0 3px #E2F0E5, inset 0 0 0 4px rgba(44, 74, 52, 0.25), var(--shadow);
}

.landing-card-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--green);
  white-space: nowrap;
}

.landing-card-right {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  height: 21px;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0 8px;
  border-radius: 6px;
  white-space: nowrap;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.landing-card.is-complete .landing-badge {
  background: #5A8767;
  border-color: #5A8767;
  color: #FFFDF9;
}

.legend-plain {
  margin-top: 8px;
  font-size: 0.86rem;
  background: rgba(255, 253, 249, 0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
}

.legend-plain-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.legend-plain-header h3 {
  font-size: 1rem;
  white-space: nowrap;
}

.legend-plain-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.legend-list-vertical {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.legend-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text-muted);
  line-height: 1.4;
}

.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
  margin-top: 4px;
}

.tab-count-plain {
  font-size: 0.78rem;
  opacity: 0.78;
  font-weight: 500;
}

.occasion-heading {
  font-size: 1.15rem;
  margin: 22px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  color: var(--green);
}

.occasion-heading:first-child {
  margin-top: 4px;
}

.person-tab.active .tab-count {
  background: rgba(255, 255, 255, 0.22);
}

/* Main Content & Design 2 Parchment Double Frame */
.main-content {
  padding-top: 22px;
  padding-bottom: 64px;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.bg-tree {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  opacity: 0.14;
}

.bg-tree svg {
  width: 100%;
  height: auto;
  display: block;
}

.bg-tree-left {
  left: -175px;
  top: -8px;
  width: 340px;
}

.bg-tree-right {
  right: -175px;
  bottom: -24px;
  width: 360px;
}

@media (max-width: 900px) {
  .bg-tree-left {
    left: -110px;
    width: 240px;
    opacity: 0.1;
  }
  .bg-tree-right {
    right: -110px;
    width: 250px;
    opacity: 0.1;
  }
}

.decor-shell {
  position: relative;
  z-index: 2;
  padding: 24px 26px 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FCF7EE 0%, #F9F2E6 60%, #F5EFE6 100%);
  border: 1.5px solid #D4C0A3;
  box-shadow: inset 0 0 0 6px rgba(255, 253, 249, 0.45), 0 4px 18px rgba(42, 33, 28, 0.06);
}

.decor-shell::before,
.decor-shell::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: rgba(182, 137, 52, 0.55);
  border-style: solid;
  pointer-events: none;
  z-index: 2;
}

.decor-shell::before {
  top: 10px;
  left: 10px;
  border-width: 1.5px 0 0 1.5px;
  border-top-left-radius: 5px;
}

.decor-shell::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 1.5px 1.5px 0;
  border-bottom-right-radius: 5px;
}

@media (max-width: 640px) {
  .decor-shell {
    padding: 26px 20px 28px;
  }
  .decor-shell::before {
    top: 9px;
    left: 9px;
    width: 18px;
    height: 18px;
  }
  .decor-shell::after {
    bottom: 9px;
    right: 9px;
    width: 18px;
    height: 18px;
  }
  .landing-title-row h2 {
    font-size: 1.16rem;
    white-space: nowrap;
  }
  .landing-snowflake {
    width: 20px;
    height: 20px;
  }
}

.decor-shell > * {
  position: relative;
  z-index: 3;
}

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

.landing-title-row h2,
#list-heading {
  color: var(--green);
}

.landing-snowflake {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.85;
  pointer-events: none;
}

.fine-line-divider {
  width: 280px;
  max-width: 55%;
  margin: 0;
  opacity: 0.85;
  pointer-events: none;
  flex-shrink: 1;
}

@media (max-width: 600px) {
  .landing-title-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .fine-line-divider {
    width: 100%;
    max-width: 280px;
  }
}

.fine-line-divider svg {
  display: block;
  width: 100%;
  height: auto;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-header.compact {
  margin-bottom: 6px;
}

.section-header.compact p {
  margin: 2px 0 0;
}

.section-header h2 {
  font-size: 1.55rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  padding: 9px 15px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

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

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

.btn-outline:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.btn-danger-outline {
  background: var(--surface);
  color: var(--red);
  border-color: #E2C6C6;
}

.btn-danger-outline:hover:not(:disabled) {
  background: var(--red-soft);
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.82rem;
}

.icon-btn {
  position: relative;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 1rem;
}

.notif-dot {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--green);
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  padding: 2px 4px;
}

.text-btn.danger {
  color: var(--red);
}

/* Approval Banner */
.approval-section {
  background: var(--gold-soft);
  border: 1px solid #EBD7A4;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 22px;
}

.approval-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #EFE0B9;
  flex-wrap: wrap;
}

.approval-item:first-of-type {
  border-top: none;
}

.view-switch-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.view-switch-group .btn.active {
  background: #FBF3E0;
  border-color: #C8A252;
  color: #5A3E18;
  font-weight: 600;
  box-shadow: inset 0 1px 2px rgba(140, 106, 42, 0.14);
}

/* Wishes Grid */
.wishes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* Wishes List */
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wish-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.wish-list-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.wish-list-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wish-list-status {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.wish-list-reserve-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.wish-list-open-btn {
  cursor: pointer;
  border: 1px solid #DFD4C3;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.wish-list-open-btn .hover-label {
  display: none;
}

.wish-list-open-btn:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.wish-list-open-btn:hover .default-label {
  display: none;
}

.wish-list-open-btn:hover .hover-label {
  display: inline;
}

.wish-list-both-hover {
  display: none;
  align-items: center;
  gap: 4px;
}

.wish-list-reserve-wrap.is-both:hover .wish-list-open-trigger {
  display: none;
}

.wish-list-reserve-wrap.is-both:hover .wish-list-both-hover {
  display: inline-flex;
}

.wish-links-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wish-status-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.wish-format-badge {
  display: inline-flex;
  align-items: center;
  background: var(--gold-soft);
  border: 1px solid #E2CCA0;
  color: #6B4D18;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.approval-format-input {
  margin-top: 6px;
  padding: 5px 9px;
  font-size: 0.84rem;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  max-width: 280px;
}

.wish-list-meta {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .wish-list-row {
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  .wish-list-title {
    white-space: normal;
  }
  .wish-list-meta {
    width: 100%;
  }
}

.wish-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.wish-card.is-reserved {
  border-color: #C7D7CE;
  background: #FCFDFB;
}

.wish-media-wrap {
  position: relative;
}

.wish-status-topleft {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 20px);
  z-index: 2;
  box-shadow: 0 1px 4px rgba(42, 33, 28, 0.08);
}

.wish-status-row {
  padding: 12px 16px 0 16px;
}

.btn-quiet {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  font-size: 0.8rem;
  padding: 5px 8px;
}

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

.wish-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}

.wish-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.wish-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.wish-title {
  font-size: 1.08rem;
  line-height: 1.3;
}

@keyframes priorityGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(38, 75, 110, 0.24); }
  50% { box-shadow: 0 0 0 3px rgba(38, 75, 110, 0); }
}

.herzenswunsch-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: #E8F0F6;
  color: #264B6E;
  border: 1px solid #BCD0E2;
  width: fit-content;
  animation: priorityGlow 2.4s ease-in-out infinite;
}

.wish-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.wish-desc {
  font-size: 0.9rem;
  color: var(--text);
  white-space: pre-line;
  margin: 0;
}

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

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--green);
  background: var(--green-soft);
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
}

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

.wish-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 6px;
  width: fit-content;
}

.status-pill.status-multiline {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 1.35;
  padding: 5px 10px;
}

.status-reserved {
  background: var(--moss-soft);
  color: var(--moss);
  border: 1px solid #C8D9CC;
}

.status-group {
  background: var(--gold-soft);
  color: #856214;
  border: 1px solid #E8D5A7;
}

.status-open {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.approved-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--moss-soft);
  color: var(--moss);
  border: 1px solid #C8D9CC;
  width: fit-content;
}

.group-couples-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.82rem;
}

.group-couples-box.is-pending {
  opacity: 0.68;
  border-style: dashed;
}

.group-min-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.group-setup-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.couple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.couple-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 500;
}

.couple-amount {
  width: 82px;
  padding: 4px 8px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-size: 0.82rem;
  text-align: left;
}

.couple-amount::-webkit-inner-spin-button {
  margin-left: 8px;
}

.notes-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  width: fit-content;
}

.notes-toggle:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.notes-toggle.has-unread {
  background: var(--gold-soft);
  border-color: var(--gold);
  color: #7A5812;
  font-weight: 600;
}

.note-item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.note-actions {
  display: inline-flex;
  gap: 4px;
  flex-shrink: 0;
}

.wish-pos-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 28px;
  padding: 0 5px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Secret Notes inside Card */
.notes-box {
  background: var(--surface-soft);
  border-radius: 8px;
  padding: 10px;
  font-size: 0.82rem;
}

.note-item {
  margin-bottom: 6px;
}

.note-form {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.note-form input {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* Sub-sections */
.sub-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.secret-gifts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.secret-gift-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.mini-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 24, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 50;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18);
}

.modal-lg {
  max-width: 720px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

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

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

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.86rem;
  font-weight: 500;
}

.field input[type="text"],
.field input[type="url"],
.field input[type="password"],
.field textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.checkbox-field,
.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  cursor: pointer;
  padding-bottom: 8px;
}

.field-label-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.btn-add-link-flush {
  padding-left: 0;
  padding-right: 0;
}

.links-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px;
  align-items: center;
}

.link-row input {
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.84rem;
}

.image-paste-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.image-paste-box:focus {
  outline: none;
  border-color: var(--green);
}

.image-paste-box.is-waiting-paste {
  border-color: var(--red);
  background: var(--red-soft);
}

/* Interactive Guide Tour */
.tour-step-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tour-step-badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #6B4D18;
  background: var(--gold-soft);
  border: 1px solid #E2CCA0;
  padding: 2px 9px;
  border-radius: 999px;
}

.tour-visual {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.tour-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.12rem;
  margin: 0 0 8px;
}

.tour-bullets {
  margin: 0 0 14px;
  padding-left: 18px;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tour-bullets li + li {
  margin-top: 5px;
}

.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tour-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.tour-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: #D7C8B3;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.tour-dot.active {
  background: var(--red);
  transform: scale(1.25);
}

.tour-actions {
  display: flex;
  gap: 8px;
}

.mini-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.mini-tile {
  flex: 1;
  min-width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
}

.mini-tile.is-green {
  background: var(--moss-soft);
  border-color: #9EC0A6;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-soft);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}

.mini-tile.is-green .mini-avatar {
  border-color: var(--moss);
  color: var(--moss);
  background: #fff;
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.mini-pill.green {
  background: var(--moss-soft);
  border-color: #9EC0A6;
  color: var(--moss);
}

.mini-pill.gold {
  background: var(--gold-soft);
  border-color: #E2CCA0;
  color: #6B4D18;
}

.mini-pill.red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.83rem;
}

.mini-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.81rem;
  padding: 3px 0;
}

/* Christmas Quotes Ticker */
.ticker-bar {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  background: linear-gradient(90deg, #FCF8F0, var(--surface), #FCF8F0);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 0;
  box-shadow: var(--shadow);
}

.ticker-bar::before,
.ticker-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  z-index: 2;
  pointer-events: none;
}

.ticker-bar::before {
  left: 0;
  background: linear-gradient(90deg, var(--surface), transparent);
}

.ticker-bar::after {
  right: 0;
  background: linear-gradient(270deg, var(--surface), transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 36px;
  padding-left: 24px;
  animation: ticker-scroll 280s linear infinite;
}

.ticker-bar:hover .ticker-track {
  animation-play-state: paused;
}

.ticker-item {
  white-space: nowrap;
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 0.92rem;
  color: #4D3D33;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.ticker-star {
  color: var(--gold);
  font-style: normal;
}

.ticker-author {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.image-preview-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.image-preview-wrap img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.info-banner {
  background: var(--gold-soft);
  border: 1px solid #EBD7A4;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.84rem;
}

/* Admin */
.admin-block {
  border-bottom: 1px solid var(--border);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.admin-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.admin-block h4 {
  margin-bottom: 10px;
}

.inline-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.inline-form input[type="text"] {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.admin-users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-user-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
}

.admin-export-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 14px;
}

.paperless-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-item {
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--green);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.88rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  z-index: 80;
}

.guide-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  display: grid;
  gap: 12px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.guide-item-title {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  text-align: left;
}

.onboarding-card {
  max-width: 720px;
  margin: 18px auto 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.onboarding-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.onboarding-header h2 {
  margin: 0;
}

.onboarding-note {
  margin: 20px 0 16px;
  font-size: 0.93rem;
  color: var(--text);
  text-align: center;
}

.onboarding-actions {
  display: flex;
  justify-content: center;
}

body.is-onboarding .person-nav,
body.is-onboarding .decor-shell {
  display: none;
}

@media (max-width: 640px) {
  .link-row {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .onboarding-card {
    padding: 20px 18px;
  }
}
