:root {
  --radius: 0.75rem;
  --background: #fcfbf8;
  --foreground: #15181a;
  --card: #ffffff;
  --muted: #eceae6;
  --muted-foreground: #5c6368;
  --primary: #0f5c55;
  --primary-foreground: #f5faf8;
  --secondary: #2a6f6a;
  --accent: #e8f0ee;
  --destructive: #b42318;
  --success: #1f7a4c;
  --success-foreground: #f5faf8;
  --warning: #9a6700;
  --accent-warm: #b85c38;
  --accent-warm-soft: #f3e8df;
  --cal-over-bg: #f8d4d4;
  --cal-ok-bg: #d4ead8;
  --border: #e3e1dc;
  --input: #f4f3f0;
  --shadow-cozy: 0 2px 10px rgba(15, 92, 85, 0.07), 0 1px 2px rgba(21, 24, 26, 0.04);
  --shadow-soft: 0 6px 20px rgba(15, 92, 85, 0.09);
  --shadow-lifted: 0 10px 32px rgba(15, 92, 85, 0.11), 0 2px 8px rgba(21, 24, 26, 0.05);
  --font: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-display: "IBM Plex Sans", "Segoe UI", sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(15, 92, 85, 0.07), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(42, 111, 106, 0.05), transparent 50%),
    var(--background);
  color: var(--foreground);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app {
  min-height: 100svh;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  0% { transform: scale(0.9); opacity: 0; }
  70% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes build-in {
  from { transform: scale(0.96); opacity: 0.6; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes coin-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes ping {
  75%, 100% { transform: scale(2); opacity: 0; }
}

.animate-float { animation: float 5s ease-in-out infinite; }
.animate-fade-in-up { animation: fade-in-up 0.5s ease-out both; }
.animate-fade-in { animation: fade-in 0.5s ease-out both; }
.animate-pop { animation: pop 0.4s ease-out both; }
.animate-build-in { animation: build-in 0.6s ease-out both; }

.press-scale {
  transition: transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.press-scale:active:not(:disabled) { transform: scale(0.96); }

.text-muted { color: var(--muted-foreground); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-tiny { font-size: 0.6875rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-black { font-weight: 900; }
.text-primary { color: var(--primary); }
.text-destructive { color: var(--destructive); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.capitalize { text-transform: capitalize; }
.line-through { text-decoration: line-through; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-1 { flex: 1; }
.min-w-0 { min-width: 0; }
.flex-between { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-sm { margin-top: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.max-w-xs { max-width: 18rem; }
.text-center { text-align: center; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.15rem;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: none;
}

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

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--foreground);
  flex-shrink: 0;
}

.progress-track {
  flex: 1;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.5s ease;
}

.progress-fill.bg-secondary { background: var(--secondary); }
.progress-fill.bg-destructive { background: var(--destructive); }
.progress-fill.bg-warning { background: var(--warning); }
.progress-fill.bg-primary { background: var(--primary); }

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.label-sm {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

/* Landing */
.landing {
  min-height: 100svh;
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem calc(2rem + env(safe-area-inset-bottom, 0px));
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.35rem;
}

.landing-visual {
  position: relative;
  display: grid;
  place-items: center;
}

.landing-visual::before {
  content: "";
  position: absolute;
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 92, 85, 0.14), transparent 68%);
  z-index: 0;
}

.landing-image {
  position: relative;
  z-index: 1;
  width: 18rem;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(15, 92, 85, 0.18));
}

.landing-title {
  margin: 0.35rem 0 0;
  font-size: 3rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--primary);
}

.landing-tagline {
  margin: 0.65rem 0 0;
  font-size: 1rem;
  color: var(--muted-foreground);
  max-width: 18rem;
  line-height: 1.45;
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.landing-disclaimer {
  margin: 0;
  font-size: 0.75rem;
  text-align: center;
  color: var(--muted-foreground);
  padding: 0 1rem;
}

/* Onboarding */
.onboarding {
  min-height: 100svh;
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.5rem 2rem;
}

.onboarding-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.onboarding-body h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.onboarding-body p {
  margin: 0.5rem 0 0;
  color: var(--muted-foreground);
}

.onboarding-field {
  margin-top: 2rem;
  flex: 1;
}

.input-field {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--card);
  font-family: var(--font);
  font-size: 1.125rem;
  color: var(--foreground);
  outline: none;
  box-shadow: var(--shadow-soft);
}

.input-field:focus {
  border-color: var(--primary);
}

.budget-input-wrap {
  position: relative;
  width: 100%;
}

.budget-big-input {
  width: 100%;
  text-align: center;
  font-size: 3.75rem;
  font-weight: 900;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--border);
  outline: none;
  padding: 1rem 3.5rem 1rem 0;
  color: var(--foreground);
  font-family: var(--font);
}

.budget-big-input:focus {
  border-bottom-color: var(--primary);
}

.budget-euro {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--muted-foreground);
}

.budget-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  text-align: left;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  background: var(--card);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.option-btn.selected {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: var(--shadow-cozy);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-btn {
  border-radius: 999px;
  padding: 0.625rem 1rem;
  border: 2px solid var(--border);
  background: var(--card);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn.selected {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.chip-readonly {
  border-radius: 999px;
  background: var(--accent);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
}

.budget-page-title {
  flex: 1;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.budget-summary {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.sticky-summary {
  position: sticky;
  top: 0.5rem;
  z-index: 10;
}

.budget-total-big {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.budget-summary-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.budget-summary-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.budget-categories {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.budget-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}

.budget-emoji { font-size: 1.5rem; }
.budget-cat-name { flex: 1; font-weight: 600; }

.budget-amount-wrap {
  position: relative;
  width: 7rem;
}

.budget-amount {
  width: 100%;
  text-align: right;
  font-weight: 700;
  font-size: 1.125rem;
  background: var(--input);
  border: none;
  border-radius: 0.75rem;
  padding: 0.5rem 1.75rem 0.5rem 0.75rem;
  outline: none;
  font-variant-numeric: tabular-nums;
}

.budget-amount:focus {
  box-shadow: 0 0 0 2px var(--primary);
}

.budget-amount-euro {
  position: absolute;
  right: 0.625rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

.terms-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
}

.terms-center h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 900;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  text-align: left;
}

.checkbox {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.welcome-image-wrap {
  position: relative;
}

.welcome-badge {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: var(--success);
  color: var(--success-foreground);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lifted);
  animation: coin-bounce 1s ease-in-out infinite;
}

.scan-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
}

.scan-image-wrap {
  position: relative;
  width: 18rem;
  height: 18rem;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.scan-reveal {
  transition: clip-path 0.7s ease;
}

.scan-sparkles span {
  position: absolute;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--warning);
  animation: float 3s ease-in-out infinite;
}

.scan-progress {
  width: 100%;
  max-width: 18rem;
}

/* App shell */
.app-shell {
  min-height: 100svh;
  background: var(--background);
}

.app-content {
  max-width: 28rem;
  margin: 0 auto;
  position: relative;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
}

.bottom-nav-inner {
  max-width: 28rem;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  display: flex;
  border-radius: 1.5rem;
  background: rgba(254, 252, 249, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lifted);
  padding: 0.5rem;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: 1rem;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}

.nav-item.active {
  color: var(--primary);
}

.nav-item.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  display: flex;
  transition: transform 0.15s ease;
}

.nav-label {
  font-size: 0.6875rem;
  font-weight: 700;
}

.app-page {
  padding: 1.75rem 1.25rem calc(5.75rem + env(safe-area-inset-bottom, 0px));
}

.pb-nav {
  padding-bottom: 6rem;
}

.page-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.page-title-sm {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
}

.page-header-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 900;
  margin: 1.5rem 0 0.75rem;
}

/* House hero */
.home-header {
  margin-bottom: 1rem;
}

.home-header .app-greeting {
  margin: 0.15rem 0 0;
}

.house-hero {
  position: relative;
  border-radius: 1.75rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(201, 107, 60, 0.12), transparent 70%),
    linear-gradient(165deg, #f3ebe1 0%, #e8dfd2 48%, #ddd2c4 100%);
  min-height: 18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.house-stage {
  position: relative;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  padding: 1.1rem 0.75rem 0.85rem;
}

.house-img {
  width: 100%;
  height: auto;
  max-height: 17.5rem;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(74, 44, 20, 0.18));
}

.room-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
}

.room-pin.label-left {
  flex-direction: row-reverse;
  gap: 0.4rem;
}

.room-pin.label-right {
  flex-direction: row;
  gap: 0.4rem;
}

.room-pin-dot {
  position: relative;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--primary);
  border: 3px solid #fefcf9;
  box-shadow: 0 4px 14px rgba(201, 107, 60, 0.45);
  flex-shrink: 0;
}

.room-pin-dot::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(201, 107, 60, 0.45);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.room-pin-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: rgba(254, 252, 249, 0.94);
  border: 1px solid rgba(224, 217, 207, 0.95);
  box-shadow: var(--shadow-cozy);
  font-size: 0.6875rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.room-pin-emoji {
  font-size: 0.8rem;
}

.room-pin:hover .room-pin-label,
.room-pin:focus-visible .room-pin-label {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.room-pin:focus-visible {
  outline: none;
}

.room-pin:focus-visible .room-pin-dot {
  box-shadow: 0 0 0 3px rgba(201, 107, 60, 0.35);
}

/* legacy alias */
.room-dot {
  position: absolute;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: rgba(254, 252, 249, 0.9);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-cozy);
  display: grid;
  place-items: center;
  animation: pop 0.4s ease-out both;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(250, 247, 242, 0.55);
  backdrop-filter: blur(4px);
  text-align: center;
  z-index: 3;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 4px solid var(--primary);
  border-top-color: transparent;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.scan-toast {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 999px;
  background: var(--success);
  color: var(--success-foreground);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--shadow-cozy);
  z-index: 4;
}

.room-chips {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 0.85rem;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.room-chips::-webkit-scrollbar {
  display: none;
}

.room-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.55rem 0.85rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.75rem;
  font-weight: 700;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.room-chip:hover {
  border-color: rgba(201, 107, 60, 0.45);
}

.app-greeting {
  margin: 1.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.budget-ring-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.ring-wrap {
  position: relative;
  width: 8rem;
  height: 8rem;
  flex-shrink: 0;
}

.ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
}

.ring-pct {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ring-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ring-remaining {
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  margin: 0.25rem 0 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
}

.stat-card {
  padding: 1rem;
}

.stat-value {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.stat-value-sm {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  font-weight: 900;
}

.receipts-link {
  margin-top: 1rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.receipts-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: rgba(240, 232, 220, 0.6);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.cat-card {
  padding: 1rem;
  display: block;
}

.cat-card-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cat-emoji {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1rem;
  background: rgba(240, 232, 220, 0.6);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.cat-info { flex: 1; min-width: 0; }
.cat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.cat-amount { font-size: 0.875rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cat-bar { margin-top: 0.5rem; }

/* Calendar */
.coming-soon {
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
}

.coming-soon-emoji {
  font-size: 3rem;
}

/* Settings */
.settings-block {
  margin-top: 1rem;
  padding: 1.25rem;
}

.settings-name {
  margin: 0.5rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.settings-budget {
  margin: 0.5rem 0 0;
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--primary);
}

.btn-reset {
  margin-top: 2rem;
  width: 100%;
  padding: 1rem;
  border-radius: 1.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--destructive);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

/* Summary */
.summary-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-hero {
  margin-top: 1.25rem;
  padding: 1.25rem;
}

.summary-big {
  margin: 0.25rem 0 0;
  font-size: 1.875rem;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.cat-breakdown {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.breakdown-row .breakdown-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.tip-card {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(201, 107, 60, 0.1);
  border-color: rgba(201, 107, 60, 0.2);
}

.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.item-row {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.product-row {
  align-items: flex-start;
}

.product-meta {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.product-brand {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  line-height: 1.2;
}

.product-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.3;
  color: var(--foreground);
}

.product-size {
  font-weight: 600;
  color: var(--muted-foreground);
  font-size: 0.85em;
}

.product-price {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  margin: 0.15rem 0 0;
}

.product-title-input {
  font-weight: 650 !important;
  letter-spacing: -0.015em;
}

.freq-by-cat {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.freq-cat-block .item-list {
  margin-top: 0.45rem;
}

.freq-cat-label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.freq-cat-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.receipt-cat-group {
  padding: 0.55rem 0 0.15rem;
  border-top: 1px solid var(--border);
}

.receipt-cat-group:first-child {
  border-top: none;
  padding-top: 0.15rem;
}

.receipt-cat-group .freq-cat-label {
  padding: 0.35rem 0.85rem 0.25rem;
}

.receipt-cat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gap-sm { gap: 0.5rem; }

.expiry-bad {
  background: rgba(204, 68, 68, 0.1);
  border-color: rgba(204, 68, 68, 0.3);
}

.expiry-warn {
  background: rgba(212, 160, 60, 0.15);
  border-color: rgba(212, 160, 60, 0.3);
}

/* Receipts */
.receipt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.receipt-card {
  overflow: hidden;
}

.receipt-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.receipt-items {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.receipt-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.receipt-item:last-child {
  border-bottom: none;
}

.item-check {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  cursor: pointer;
}

.item-check.checked {
  background: var(--success);
  border-color: var(--success);
  color: var(--success-foreground);
}

.btn-delete {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.7;
}

.chevron-rotate {
  transition: transform 0.2s ease;
}

.chevron-rotate.open {
  transform: rotate(180deg);
}

/* Room */
.room-hero {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at center, #f7f1e8 0%, #ebe3d6 100%);
  margin-top: 0.25rem;
  padding: 0.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
}

.room-hero img {
  width: 100%;
  height: auto;
  max-height: 16.5rem;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 1rem;
  filter: drop-shadow(0 12px 20px rgba(74, 44, 20, 0.12));
}

.room-stats {
  margin-top: 0.85rem;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.room-stats-divider {
  width: 1px;
  align-self: stretch;
  background: var(--border);
}

.room-spent {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0;
}

.room-budget {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  margin: 0.15rem 0 0;
}

.storage-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.storage-card {
  overflow: hidden;
}

.storage-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  list-style: none;
}

.storage-summary::-webkit-details-marker {
  display: none;
}

.storage-items {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.storage-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.storage-item.archiving {
  opacity: 0;
  transform: translateX(-1rem);
}

.storage-item:last-child {
  border-bottom: none;
}

.cat-summary-row {
  margin-top: 1.25rem;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
}

.subcat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.subcat-card {
  padding: 1rem;
}

.page-center {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 2rem;
}

/* Calendar */
.cal-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  margin-top: 1rem;
}

.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.25rem 0 0.75rem;
}

.cal-month-label {
  text-transform: capitalize;
  margin: 0;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.cal-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}

.cal-day {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.25rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.cal-day:active {
  transform: scale(0.96);
}

.cal-day-empty {
  border: none;
  background: transparent;
  cursor: default;
}

.cal-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.cal-day-amt {
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-day.has-spend {
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  border-color: color-mix(in srgb, var(--primary) 25%, var(--border));
}

.cal-day.today .cal-day-num {
  color: var(--primary);
}

.cal-day.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent);
}

.cal-detail {
  margin-top: 1.25rem;
  padding: 1rem;
}

.cal-detail-empty {
  padding: 1.5rem;
}

.cal-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.cal-receipt-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cal-receipt-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cal-receipt-icon {
  font-size: 1.25rem;
}

.gmail-status.connected {
  margin-top: 0.25rem;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

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

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

/* Toasts */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 5.5rem;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: 0.85rem 1.1rem;
  border-radius: 1rem;
  background: var(--foreground);
  color: #fefcf9;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--shadow-lifted);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--destructive); }
.toast-info { background: var(--foreground); }
.toast-out { opacity: 0; transform: translateY(8px); }

.empty-state {
  padding: 1.5rem 1.25rem;
  text-align: center;
}

.home-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.home-actions .btn-primary,
.home-actions .btn-secondary {
  width: 100%;
  border-radius: var(--radius);
  padding: 0.9rem 0.75rem;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.quick-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem;
}

.upload-drop {
  display: block;
  padding: 2.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  border-style: dashed;
  border-width: 2px;
}

.shopping-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
}

.inv-actions {
  display: flex;
  gap: 0.35rem;
}

.storage-item.low-stock {
  background: rgba(212, 160, 60, 0.12);
}

.receipt-edit-name {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--foreground);
  padding: 0;
  outline: none;
}

.receipt-edit-name:focus {
  color: var(--primary);
}

.receipt-edit-price {
  width: 4.5rem;
  text-align: right;
  border: none;
  background: var(--input);
  border-radius: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem 0.4rem;
  outline: none;
}

.p-6 { padding: 1.5rem; }
.mt-3 { margin-top: 0.75rem; }
.hidden { display: none !important; }
.block { display: block; }

/* Budget alerts */
.budget-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
}

.budget-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
  line-height: 1.35;
}

.budget-alert .alert-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  margin-top: 0.35rem;
  flex-shrink: 0;
  background: var(--warning);
}

.budget-alert.warn {
  background: rgba(154, 103, 0, 0.1);
  border: 1px solid rgba(154, 103, 0, 0.28);
}

.budget-alert.warn .alert-dot { background: var(--warning); }

.budget-alert.over {
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.25);
}

.budget-alert.over .alert-dot { background: var(--destructive); }

.budget-alert.ok {
  background: rgba(31, 122, 76, 0.1);
  border: 1px solid rgba(31, 122, 76, 0.28);
}

.budget-alert.ok .alert-dot { background: var(--success); }

/* Spotify-vibe share + badge system */
.share-pill {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  background: var(--card);
  color: var(--foreground);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.share-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.28rem 0.65rem 0.28rem 0.28rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(15, 92, 85, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.share-badge:hover {
  border-color: var(--primary);
}

.share-badge-medal {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: transparent;
  position: relative;
  flex-shrink: 0;
  box-shadow: none;
  overflow: visible;
}

.share-badge-medal::after { display: none; }

.share-badge-medal .badge-ring {
  width: 2.5rem !important;
  height: 2.5rem !important;
}

.share-badge-medal .badge-ring-svg {
  width: 2.5rem;
  height: 2.5rem;
}

.share-badge-medal .badge-ring-icon { font-size: 0.85rem; }

.badge-ring {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}

.badge-ring-svg {
  display: block;
  overflow: visible;
}

.badge-ring-fill {
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.badge-ring-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  pointer-events: none;
}

.persona-strip { margin-top: 1.25rem; }

.persona-circles {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding: 0.85rem 0 0.35rem;
  scrollbar-width: none;
}

.persona-circles::-webkit-scrollbar { display: none; }

.persona-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  width: 4.5rem;
}

.persona-chip-name {
  font-size: 0.65rem;
  font-weight: 650;
  text-align: center;
  line-height: 1.2;
  color: var(--muted-foreground);
}

.persona-chip.earned .persona-chip-name { color: var(--foreground); }

.cat-card-rings { align-items: center; }

.cat-ring-stack {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.cat-ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat-ring-emoji { position: relative; z-index: 1; font-size: 0.95rem; line-height: 1; }
.cat-ring-pct { margin: 0.25rem 0 0; }

.share-badge-mark {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
}

.share-badge-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding-right: 0.2rem;
}

.share-badge-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.share-badge-count {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted-foreground);
  font-variant-numeric: tabular-nums;
}

.share-badge.is-locked .share-badge-medal {
  background: var(--muted);
  color: var(--muted-foreground);
  box-shadow: none;
}

.share-badge-medal.tone-teal,
.badge-tile.tone-teal .badge-medal,
.wrap-badge-hero.tone-teal,
.wrap-mini-badge.tone-teal { --badge-bg: #0f5c55; --badge-fg: #f5faf8; }
.share-badge-medal.tone-mint,
.badge-tile.tone-mint .badge-medal,
.wrap-badge-hero.tone-mint,
.wrap-mini-badge.tone-mint { --badge-bg: #1f7a4c; --badge-fg: #f5faf8; }
.share-badge-medal.tone-deep,
.badge-tile.tone-deep .badge-medal,
.wrap-badge-hero.tone-deep,
.wrap-mini-badge.tone-deep { --badge-bg: #164e4a; --badge-fg: #f5faf8; }
.share-badge-medal.tone-sage,
.badge-tile.tone-sage .badge-medal,
.wrap-badge-hero.tone-sage,
.wrap-mini-badge.tone-sage { --badge-bg: #2a6f6a; --badge-fg: #f5faf8; }
.share-badge-medal.tone-cool,
.badge-tile.tone-cool .badge-medal,
.wrap-badge-hero.tone-cool,
.wrap-mini-badge.tone-cool { --badge-bg: #3d5a5c; --badge-fg: #f5faf8; }
.share-badge-medal.tone-warm,
.badge-tile.tone-warm .badge-medal,
.wrap-badge-hero.tone-warm,
.wrap-mini-badge.tone-warm { --badge-bg: #5c6b4a; --badge-fg: #f5faf8; }
.share-badge-medal.tone-gold,
.badge-tile.tone-gold .badge-medal,
.wrap-badge-hero.tone-gold,
.wrap-mini-badge.tone-gold { --badge-bg: #8a6d2f; --badge-fg: #fff8e8; }

.share-badge-medal.tone-teal,
.share-badge-medal.tone-mint,
.share-badge-medal.tone-deep,
.share-badge-medal.tone-sage,
.share-badge-medal.tone-cool,
.share-badge-medal.tone-warm,
.share-badge-medal.tone-gold {
  background: var(--badge-bg);
  color: var(--badge-fg);
}

.badge-section { padding: 1rem 1.05rem 1.15rem; }

.badge-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.badge-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: 0.9rem 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  min-height: 8.5rem;
}

.badge-tile.locked { opacity: 0.55; }

.badge-tile.earned {
  background: linear-gradient(165deg, rgba(15, 92, 85, 0.08), transparent 55%), var(--card);
  border-color: rgba(15, 92, 85, 0.22);
}

.badge-circle-wrap { margin-bottom: 0.15rem; }

.badge-name {
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.badge-blurb {
  font-size: 0.68rem;
  color: var(--muted-foreground);
  line-height: 1.3;
}

.badge-detail {
  font-size: 0.62rem;
  font-weight: 650;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.badge-tile.locked .badge-detail { color: var(--muted-foreground); }

.share-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: end center;
}

.share-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 22, 0.55);
}

.share-panel {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-height: 94svh;
  overflow: auto;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.15rem 1.15rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
}

.share-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--muted-foreground);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
}

.share-wrap-stage {
  margin-top: 0.35rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0c2e2b;
  color: #eef6f4;
  min-height: 22rem;
  position: relative;
  user-select: none;
  cursor: pointer;
}

.wrap-slides { position: relative; min-height: 22rem; }

.wrap-slide {
  display: none;
  padding: 1.5rem 1.25rem 1.35rem;
  min-height: 22rem;
  background:
    radial-gradient(ellipse 90% 70% at 10% 0%, rgba(42, 111, 106, 0.55), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 100%, rgba(15, 92, 85, 0.45), transparent 50%),
    #0c2e2b;
  flex-direction: column;
}

.wrap-slide.is-active { display: flex; animation: fade-in 0.35s ease both; }

.wrap-kicker {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(238, 246, 244, 0.62);
}

.wrap-month {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  text-transform: capitalize;
  color: rgba(238, 246, 244, 0.72);
}

.wrap-name {
  margin: 1.1rem 0 0;
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.wrap-hero-num {
  margin: 0.55rem 0 0;
  font-size: 2.6rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: #9fd5cb;
  font-variant-numeric: tabular-nums;
}

.wrap-hero-sub {
  margin: 0.35rem 0 0;
  color: rgba(238, 246, 244, 0.7);
  font-size: 0.9rem;
}

.wrap-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.45rem;
  margin-top: auto;
  padding-top: 1.5rem;
}

.wrap-stat-row div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 0.65rem 0.45rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wrap-stat-row em {
  font-style: normal;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(238, 246, 244, 0.55);
}

.wrap-stat-row strong {
  font-size: 0.82rem;
  font-weight: 650;
}

.wrap-budget-ring {
  position: relative;
  width: 10rem;
  height: 10rem;
  margin: 1.25rem auto 0.5rem;
}

.wrap-fill-ring { width: 100%; height: 100%; }

.wrap-budget-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.wrap-budget-center .wrap-hero-num {
  margin: 0;
  font-size: 1.65rem;
}

.wrap-budget-center .wrap-hero-sub {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

.wrap-fill-circle {
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  margin: 0.5rem auto;
}

.wrap-fill-circle svg { width: 100%; height: 100%; }

.wrap-fill-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.75rem;
  line-height: 1;
}

.wrap-circle-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.wrap-circle-chip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 650;
  font-size: 0.82rem;
}

.wrap-circle-emoji {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(159, 213, 203, 0.18);
  font-size: 1.1rem;
}

.share-actions-social {
  grid-template-columns: 1fr 1fr;
}

.share-btn-ig {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  color: #fff;
  border-color: transparent;
}

.share-btn-fb {
  background: #1877f2;
  color: #fff;
  border-color: #1877f2;
}

.share-btn-native {
  grid-column: 1 / -1;
}

.wrap-badge-hero {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  flex: 1;
  justify-content: center;
}

.wrap-badge-ring {
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--badge-bg, #0f5c55);
  color: var(--badge-fg, #f5faf8);
  box-shadow:
    0 0 0 6px rgba(255, 255, 255, 0.06),
    0 0 0 12px rgba(255, 255, 255, 0.03),
    0 18px 40px rgba(0, 0, 0, 0.35);
  animation: pop 0.45s ease both;
}

.wrap-badge-mark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.wrap-badge-title {
  margin: 0.75rem 0 0;
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.wrap-badge-blurb {
  margin: 0;
  color: rgba(238, 246, 244, 0.72);
  font-size: 0.9rem;
  max-width: 16rem;
}

.wrap-badge-rarity {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(159, 213, 203, 0.9);
}

.wrap-badge-hero.is-locked .wrap-badge-ring {
  background: #3a4a48;
  color: #9aa8a5;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04);
}

.wrap-progress {
  margin: 1rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(238, 246, 244, 0.6);
}

.wrap-badge-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.wrap-mini-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-weight: 650;
  font-size: 0.9rem;
}

.wrap-mini-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--badge-bg, #0f5c55);
  color: var(--badge-fg, #f5faf8);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.wrap-footer-line {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.8rem;
  color: rgba(238, 246, 244, 0.55);
}

.wrap-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.wrap-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 2px;
  border: none;
  padding: 0;
  background: var(--muted);
  cursor: pointer;
}

.wrap-dot.is-active { background: var(--primary); width: 1.1rem; }

.share-hint {
  margin: 0.9rem 0 0.7rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
  text-align: center;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.share-btn {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  background: var(--card);
  color: var(--foreground);
  font-family: var(--font);
}

.share-btn-wa { background: var(--card); }
.share-btn-x { background: var(--card); }
.share-btn-native {
  grid-column: 1 / -1;
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* legacy wrap card kept for safety */
.share-wrap-card {
  background: var(--accent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.15rem;
  margin-top: 0.5rem;
}
.share-wrap-brand,
.share-wrap-month,
.share-wrap-title,
.share-wrap-big,
.share-wrap-sub,
.share-wrap-grid,
.share-wrap-footer { display: none; }

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
}

.alloc-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.alloc-edit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.room-add-form {
  padding: 0.85rem;
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.room-add-form.hidden { display: none; }

.room-add-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.room-item-name-input {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--foreground);
  padding: 0;
  margin: 0;
}

.room-item-name-input:focus {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.room-item-del {
  margin-left: 0.15rem;
}

.item-used .receipt-edit-name {
  text-decoration: line-through;
  opacity: 0.7;
}

.receipt-hint {
  padding: 0.35rem 0.85rem 0.75rem;
}

/* Shopping + stock editors */
.shop-add {
  display: grid;
  grid-template-columns: 1fr 4rem auto;
  gap: 0.5rem;
  padding: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.shop-qty-input,
.inline-qty {
  width: 3.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--input);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.35rem;
  text-align: center;
}

.shop-done { opacity: 0.55; }
.shop-done .font-bold,
.shop-done .receipt-edit-name { text-decoration: line-through; }

.stock-meter {
  height: 0.35rem;
  border-radius: 999px;
  background: var(--muted);
  margin: 0.35rem 0;
  overflow: hidden;
}

.stock-meter-fill {
  height: 100%;
  background: var(--secondary);
  border-radius: 999px;
}

.stock-meter-fill.warn { background: var(--warning); }

.stock-row .inv-actions { flex-shrink: 0; }

.bottom-nav-inner .nav-label { font-size: 0.62rem; }

/* Simplified room inventory */
.room-hero-compact {
  border-radius: 1.15rem;
  overflow: hidden;
  background: #ebe3d6;
  height: 7.5rem;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
}

.room-hero-compact img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.zone-chip-row {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  margin-bottom: 0.65rem;
  scrollbar-width: none;
}

.zone-chip-row::-webkit-scrollbar { display: none; }

.zone-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: var(--foreground);
}

.zone-chip.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.zone-chip-count {
  font-size: 0.65rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

.zone-chip.active .zone-chip-count { opacity: 0.9; }

.room-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.35rem;
}

.room-search {
  padding: 0.7rem 0.9rem !important;
  font-size: 0.9rem !important;
}

.filter-pills {
  display: flex;
  gap: 0.3rem;
}

.filter-pill {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.filter-pill.active {
  background: var(--foreground);
  color: var(--primary-foreground);
  border-color: var(--foreground);
}

.room-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
}

.room-item-main { flex: 1; min-width: 0; }

.room-item-name {
  margin: 0;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-item-qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.qty-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--input);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  color: var(--foreground);
}

.qty-value {
  width: 3.2rem;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--card);
  font-weight: 900;
  font-size: 1rem;
  padding: 0.4rem 0.2rem;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}

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

/* ── Charts & smoother UI ─────────────────────────────── */
body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(201, 107, 60, 0.09), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(107, 158, 114, 0.08), transparent 50%),
    var(--background);
}

.page-enter { animation: fade-in-up 0.45s ease-out both; }

.brand-mark {
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 800;
}

.insight-card {
  margin-top: 1rem;
  padding: 1rem 1.1rem 1.15rem;
  border: 1px solid var(--border);
  box-shadow: none;
  transition: border-color 0.15s ease;
}

.insight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.insight-head .font-bold { margin: 0.1rem 0 0; }

.chart-wrap { width: 100%; }
.chart-svg { width: 100%; height: auto; display: block; overflow: visible; }

.chart-line {
  filter: drop-shadow(0 2px 4px rgba(201, 107, 60, 0.25));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw-line 1.1s ease forwards;
}

@keyframes draw-line { to { stroke-dashoffset: 0; } }

.chart-area { opacity: 0; animation: fade-in 0.8s ease 0.15s forwards; }
.chart-dot { opacity: 0; animation: fade-in 0.4s ease 0.7s forwards; }

.chart-axis {
  font-size: 9px;
  fill: var(--muted-foreground);
  font-family: inherit;
  font-weight: 700;
}

.chart-bar { transform-origin: bottom; animation: bar-grow 0.55s ease both; }
@keyframes bar-grow {
  from { transform: scaleY(0.15); opacity: 0.3; }
  to { transform: scaleY(1); opacity: 1; }
}

.chart-empty {
  padding: 1.25rem 0.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  font-weight: 600;
}

.sparkline { width: 4.5rem; height: 1.75rem; flex-shrink: 0; }

.stock-bars { display: flex; flex-direction: column; gap: 0.65rem; }
.stock-bar-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.stock-bar-pct { font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.stock-bar-track {
  height: 0.55rem;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
}
.stock-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), #8fbf94);
  animation: fill-w 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.stock-bar-fill.warn { background: linear-gradient(90deg, var(--warning), #e0b35a); }
@keyframes fill-w { to { width: var(--w); } }

.stock-health-meter {
  height: 0.65rem;
  border-radius: 999px;
  background: var(--muted);
  overflow: hidden;
  margin-top: 0.35rem;
}
.stock-health-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  animation: fill-w 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.chart-skeleton {
  height: 4.5rem;
  border-radius: 0.85rem;
  background: linear-gradient(90deg, var(--muted), var(--card), var(--muted));
  background-size: 200% 100%;
  animation: shimmer 1.2s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.activity-mini {
  list-style: none;
  margin: 0.65rem 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.activity-mini li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
}
.act-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
}
.act-dot.use { background: var(--warning); }

.lift-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.lift-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-cozy); }

.ring-progress {
  transition: stroke-dashoffset 0.9s cubic-bezier(0.22, 1, 0.36, 1);
  animation: ring-in 1s ease both;
}
@keyframes ring-in { from { stroke-dashoffset: var(--ring-len); } }

.soft-pulse { animation: soft-pulse 2.8s ease-in-out infinite; }
@keyframes soft-pulse {
  0%, 100% { box-shadow: var(--shadow-soft); }
  50% { box-shadow: 0 0 0 4px rgba(201, 107, 60, 0.12), var(--shadow-cozy); }
}

.bottom-nav {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(254, 252, 249, 0.88);
}

.nav-item { transition: color 0.18s ease, transform 0.18s ease; }
.nav-item.active { transform: translateY(-1px); }
.qty-btn { transition: transform 0.12s ease, background 0.15s ease; }
.qty-btn:active { transform: scale(0.9); background: var(--accent); }
.zone-chip { transition: background 0.18s ease, transform 0.15s ease, border-color 0.15s ease; }
.zone-chip:active { transform: scale(0.96); }
.room-item { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.room-item:hover { box-shadow: var(--shadow-soft); }

/* Room tiles instead of dollhouse */
.room-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.room-tile {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 0.85rem;
  text-decoration: none;
  min-height: 3.6rem;
}

.room-tile-emoji { font-size: 1.35rem; line-height: 1; }
.room-tile-name { flex: 1; font-weight: 800; font-size: 0.95rem; }
.room-tile-go { opacity: 0.45; display: flex; }

.scan-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.scan-toast.inline {
  position: static;
  display: inline-flex;
  margin-top: 0.65rem;
}


/* ── Less AI / product look overrides ───────────────────── */
body {
  background:
    radial-gradient(ellipse 120% 70% at 50% -10%, rgba(15, 92, 85, 0.07), transparent 55%),
    radial-gradient(ellipse 80% 50% at 100% 100%, rgba(42, 111, 106, 0.05), transparent 50%),
    var(--background) !important;
  color: var(--foreground);
  letter-spacing: -0.011em;
}

h1, h2, .page-title, .app-greeting, .page-title-sm, .summary-big, .ring-remaining {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  font-weight: 650;
}

.app-greeting { font-size: 1.65rem; font-weight: 650; margin-top: 0.2rem; }
.home-sub { margin: 0.35rem 0 0; }
.page-title { font-weight: 650; letter-spacing: -0.03em; }
.brand-mark {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  font-weight: 600;
  font-size: 0.68rem;
}

.home-header { margin-bottom: 0.35rem; }

.budget-ring-card.home-hero {
  margin-top: 0.85rem;
  background:
    linear-gradient(135deg, rgba(15, 92, 85, 0.06), transparent 55%),
    var(--card);
  border-radius: 1.25rem !important;
}

.ring-wrap {
  filter: drop-shadow(0 4px 12px rgba(15, 92, 85, 0.12));
}

.home-hero .ring-progress {
  stroke-width: 11;
}

.home-inline-link {
  display: inline-block;
  margin-top: 0.55rem;
}

.home-more { margin-top: 1.25rem; }

.empty-state { margin-top: 1rem; }

.btn-secondary, .btn-ghost, .btn-reset {
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  font-weight: 600 !important;
}

.btn-secondary {
  border: 1px solid var(--border) !important;
  background: var(--card) !important;
}

.chip-btn, .zone-chip, .filter-pill, .room-chip, .share-pill, .nav-item {
  border-radius: 0.4rem !important;
}

.share-pill {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  color: var(--foreground) !important;
  box-shadow: none !important;
  font-weight: 600;
  padding: 0.4rem 0.7rem !important;
}

.share-badge {
  border-radius: 999px !important;
}

.badge-tile {
  box-shadow: none !important;
}

.share-wrap-stage {
  border-radius: var(--radius) !important;
}

.bottom-nav {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--card) !important;
  border-top: 1px solid var(--border);
  box-shadow: none !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-inner {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0.4rem 0.35rem !important;
  max-width: 28rem;
  margin: 0 auto;
}

.nav-item.active {
  background: var(--accent) !important;
  color: var(--primary) !important;
  transform: none !important;
}

.nav-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card, .insight-card, .stat-card, .budget-ring-card, .summary-hero,
.gmail-status, .settings-block, .receipt-card, .cat-card, .room-tile,
.empty-state, .item-row, .room-item {
  border-radius: var(--radius) !important;
  box-shadow: none !important;
}

.insight-card:hover, .lift-card:hover, .room-item:hover, .card:hover {
  box-shadow: none !important;
  transform: none !important;
}

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

.progress-track, .stock-bar-track, .stock-health-meter, .stock-meter {
  border-radius: 2px !important;
  height: 0.4rem;
}

.progress-fill, .stock-bar-fill, .stock-health-fill, .stock-meter-fill {
  border-radius: 2px !important;
  background: var(--primary) !important;
}

.stock-bar-fill.warn, .stock-meter-fill.warn, .progress-fill.bg-warning {
  background: var(--warning) !important;
}

.progress-fill.bg-destructive { background: var(--destructive) !important; }
.progress-fill.bg-secondary { background: var(--secondary) !important; }

.input-field, .budget-big-input, .budget-amount, .receipt-edit-name,
.receipt-edit-price, .qty-value, .room-item-name-input, .shop-qty-input, .inline-qty {
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  font-family: var(--font) !important;
}

.qty-btn {
  border-radius: var(--radius) !important;
  background: var(--card) !important;
}

.room-tile {
  padding: 0.85rem 0.75rem !important;
}

.room-tile-emoji { font-size: 1.05rem !important; opacity: 0.9; }
.room-tile-name { font-weight: 650 !important; }
.cat-emoji { font-size: 1.1rem !important; }

.animate-float, .soft-pulse { animation: none !important; }

.chart-line { filter: none !important; }
.chart-bar.hot { fill: var(--primary) !important; }

.budget-alert {
  border-radius: var(--radius) !important;
}

.scan-toast, .welcome-badge {
  border-radius: var(--radius) !important;
  box-shadow: none !important;
}

.label-sm {
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.65rem;
  color: var(--muted-foreground);
}

.ring-pct { font-weight: 650; }
.stat-value { font-weight: 650; letter-spacing: -0.02em; }

.section-title {
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  margin: 1.35rem 0 0.65rem;
}

.stat-grid { margin-top: 1.1rem; }

/* Feature pages */
.feature-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin: 0.75rem 0 0.25rem;
  padding-bottom: 0.2rem;
}
.feature-chip {
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.feature-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  margin-top: 1rem;
  text-decoration: none;
  border: 1px solid var(--border);
}
.feature-link .block { display: block; margin: 0.15rem 0 0.2rem; }
.feature-link .nav-chevron,
.feature-link svg { opacity: 0.4; flex-shrink: 0; }
.story-card { padding: 1.5rem 1.2rem; min-height: 12rem; }
.story-title { font-size: 1.25rem; font-weight: 650; margin: 0.5rem 0 0; letter-spacing: -0.02em; }
.story-big { font-size: 2.2rem; font-weight: 650; margin: 0.75rem 0 0; letter-spacing: -0.03em; color: var(--primary); }
.story-dots { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; }
.story-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  border: none; background: var(--muted); padding: 0; cursor: pointer;
}
.story-dot.active { background: var(--primary); }
.dinner-card { padding: 1rem; }
.upload-preview { margin-top: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; max-height: 12rem; }
.upload-preview-img { width: 100%; height: 12rem; object-fit: cover; object-position: top; }
.upload-line { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.85rem; }
.upload-line-meta { display: flex; gap: 0.5rem; align-items: center; }
.cat-chip-row { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.cat-chip {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  padding: 0.3rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cat-chip.active { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.line-skipped { opacity: 0.4; text-decoration: line-through; }
.item-split { outline: 1px dashed var(--warning); }
.shop-add {
  grid-template-columns: 1fr 3.25rem auto auto !important;
}


/* Internet sourcing links (store search) */
.shopping-row-stack {
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.55rem;
  padding: 0.85rem !important;
}
.shopping-row-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}
.source-links { width: 100%; }
.source-links-label { margin: 0 0 0.35rem; }
.source-link-row, .source-links.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.source-link {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.28rem 0.55rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
}
.source-link.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.source-link:hover { border-color: var(--primary); }

.price-compare {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.price-compare-match {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.price-compare-loading { margin: 0; }
.price-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}
.price-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.1rem;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.35rem 0.55rem;
  text-decoration: none;
  min-width: 4.2rem;
}
.price-chip.best {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
}
.price-chip-store {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted-foreground);
}
.price-chip-price {
  font-size: 0.85rem;
  font-weight: 700;
}
.opt-savings {
  text-align: center;
  padding: 1.1rem !important;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
}
.opt-plan { padding: 1rem !important; }
.opt-plan-best {
  border-color: var(--primary);
}
.opt-plan-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}
.opt-total {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}
.opt-store-block + .opt-store-block {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.opt-store-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.opt-item-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.opt-item-lines li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.85rem;
  padding: 0.2rem 0;
}
.opt-item-lines a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.opt-singles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.opt-single-chip {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border);
  padding: 0.7rem 0.75rem !important;
}
.mb-sm { margin-bottom: 0.65rem; }

.go-here {
  text-align: center;
  padding: 1.15rem !important;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  background: color-mix(in srgb, var(--primary) 10%, var(--card));
  margin-bottom: 0.75rem;
}
.go-here-store {
  font-size: 1.55rem;
  font-weight: 750;
  margin: 0.15rem 0 0;
  letter-spacing: -0.02em;
}
.go-here-meta {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 0.85rem;
}
.replace-from { text-decoration: line-through; opacity: 0.65; font-weight: 500; }
.replace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.replace-actions .btn-primary,
.replace-actions .btn-secondary {
  width: auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
}
.shop-go-tip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding: 0.85rem 1rem !important;
}
.shop-go-tip .btn-primary { width: auto; padding: 0.5rem 0.85rem; font-size: 0.8rem; }

.market-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}
.market-hits {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.market-hit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  border: 1px solid var(--border);
  padding: 0.7rem 0.85rem !important;
}
.market-pred-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.pred-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.4rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  max-width: 100%;
}
.pred-chip.on {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 14%, var(--card));
}
.market-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.cat-aisles {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.15rem 0 0.65rem;
  margin-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}
.cat-aisles .pred-chip { flex: 0 0 auto; }
.cat-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
}
.cat-select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.cat-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
}
.cat-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: color-mix(in srgb, var(--muted-foreground) 6%, var(--card));
  border-bottom: 1px solid var(--border);
}
.cat-card-img-empty {
  background: color-mix(in srgb, var(--muted-foreground) 10%, var(--card));
}
.cat-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.55rem 0.6rem 0.65rem;
  flex: 1;
}
.cat-card-name {
  font-size: 0.78rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;
}
.cat-card-price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: auto;
}
.cat-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.4rem;
}
.cat-card-actions .btn-primary,
.cat-card-actions .btn-secondary {
  width: 100%;
  padding: 0.4rem 0.35rem;
  font-size: 0.68rem;
}
.cat-card-actions .btn-primary:disabled {
  opacity: 0.55;
}

/* E-shop style market (Rimi-like catalog) */
.market-page { padding-bottom: 2rem; }
.eshop-top { margin-bottom: 0.35rem; }
.eshop-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.55rem 0.75rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.eshop-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 0.72rem;
}
.eshop-menu-toggle {
  display: none !important;
}
.market-search {
  grid-template-columns: 1fr auto !important;
}
.eshop-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}
.eshop-menu {
  display: block;
  position: relative;
  z-index: 1;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.65rem 0.85rem;
  overflow: visible;
  box-shadow: none;
}
.eshop-menu.open { display: block; }
.eshop-menu-backdrop { display: none !important; }
.eshop-menu-title {
  margin: 0 0.25rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}
.eshop-menu-group {
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.eshop-menu-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.eshop-menu-group-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--foreground);
  margin: 0;
  padding: 0.45rem 0.35rem;
  cursor: pointer;
  list-style: none;
}
.eshop-menu-group-label::-webkit-details-marker { display: none; }
.eshop-menu-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0 0.15rem 0.45rem;
}
.eshop-menu-item {
  display: inline-flex;
  width: auto;
  text-align: center;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius);
  cursor: pointer;
}
.eshop-menu-item.active,
.eshop-menu-item:hover {
  background: color-mix(in srgb, var(--primary) 14%, var(--card));
  border-color: var(--primary);
  color: var(--primary);
}
.eshop-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.eshop-heading {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
}
.eshop-count {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.eshop-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.eshop-top { margin-bottom: 0.75rem; }
.eshop-tabs { margin-bottom: 1rem; }
.eshop-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.eshop-sort-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.eshop-sort-btn {
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  border-radius: var(--radius);
  padding: 0.6rem 0.95rem;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
}
.eshop-sort-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.eshop-filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.eshop-filter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.eshop-filter > span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-foreground);
  letter-spacing: 0.02em;
}
.eshop-filter .cat-select {
  width: 100%;
  min-height: 2.6rem;
  font-size: 0.9rem;
}
.eshop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.eshop-card {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--border);
  background: var(--card);
}
.eshop-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f7f8f6;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem;
}
.eshop-card-img-empty {
  display: block;
  background: #eef0ed;
}
.eshop-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.95rem 1rem 1.05rem;
  flex: 1;
}
.eshop-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.eshop-card-meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-foreground);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.eshop-store-pill {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--accent);
  color: var(--foreground);
}
.eshop-card-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.9em;
  color: var(--foreground);
}
.eshop-card-footer {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.eshop-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.eshop-card-price .eshop-price {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.eshop-card-price s {
  font-size: 0.82rem;
  color: var(--muted-foreground);
}
.eshop-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}
.eshop-card-actions .btn-primary,
.eshop-card-actions .btn-secondary {
  width: 100%;
  padding: 0.6rem 0.45rem;
  font-size: 0.8rem;
  font-weight: 700;
}
.eshop-card-actions .btn-primary:disabled { opacity: 0.55; }
.eshop-loading {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.eshop-skeleton {
  min-height: 16rem;
  border-radius: var(--radius);
  background: linear-gradient(90deg, #e8ebe8 25%, #f3f4f2 50%, #e8ebe8 75%);
  background-size: 200% 100%;
  animation: fade-in 0.8s ease infinite alternate;
}
.market-search {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  gap: 0.5rem;
  align-items: stretch;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  margin-bottom: 0;
}
.market-search .input-field {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.market-search .btn-primary {
  width: auto;
  padding: 0.7rem 1.1rem;
}

.market-page.app-page,
.app-page.market-page {
  max-width: 74rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1.15rem 6.5rem;
}

@media (min-width: 720px) {
  .eshop-layout {
    display: grid;
    grid-template-columns: 15.5rem 1fr;
    align-items: start;
    gap: 1.35rem;
  }
  .eshop-menu {
    position: sticky;
    top: 0.75rem;
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
  .eshop-menu-items {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .eshop-menu-item {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 0.5rem 0.65rem;
  }
  .eshop-menu-item.active,
  .eshop-menu-item:hover {
    border-color: transparent;
  }
  .eshop-grid,
  .eshop-loading {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
  }
}

@media (min-width: 1100px) {
  .eshop-grid,
  .eshop-loading {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.shop-cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.shop-cta-row .btn-primary,
.shop-cta-row .btn-secondary { width: 100%; }

.opt-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.opt-tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
  cursor: pointer;
}
.opt-tab.active {
  background: var(--primary);
  color: var(--primary-foreground);
}
.opt-panel[hidden] { display: none !important; }
.cart-only-list .item-row { gap: 0.75rem; }
.store-bags { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 0.75rem; }
.store-bag { padding: 0 !important; overflow: hidden; }
.store-bag-sum,
.opt-details-sum {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
.store-bag-sum::-webkit-details-marker,
.opt-details-sum::-webkit-details-marker { display: none; }
.store-bag .opt-item-lines { padding: 0 1rem 0.85rem; }
.opt-details { padding: 0 !important; margin-bottom: 0.65rem; }
.opt-details .item-list,
.opt-details .opt-singles { padding: 0 1rem 0.85rem; }
.opt-plan { padding: 1rem !important; margin-bottom: 0.65rem; }

/* Embedded demo (robertstreize.com iframe) */
html.embed-mode body {
  overflow-x: hidden;
}
html.embed-mode .boot-fallback {
  min-height: 100%;
}

/* ── Lovable dollhouse look (visual only) ───────────────── */
.dollhouse-hero {
  position: relative;
  padding: 0.65rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  border-radius: 1.25rem !important;
  box-shadow: var(--shadow-soft) !important;
}

.dollhouse-hero-img {
  width: 100%;
  height: auto;
  border-radius: 0.9rem;
  display: block;
  object-fit: cover;
}

.dollhouse-hotspots {
  position: absolute;
  inset: 0.65rem;
  pointer-events: none;
}

.dollhouse-hotspot {
  position: absolute;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.55rem 0.35rem 0.4rem;
  border-radius: 999px;
  background: rgba(252, 251, 248, 0.94);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-cozy);
  text-decoration: none;
  color: var(--foreground);
  transform: translate(-50%, -50%);
  max-width: 46%;
}

.dollhouse-hotspot-emoji {
  font-size: 1.1rem;
  line-height: 1;
}

.dollhouse-hotspot-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.room-grid-compact {
  margin-top: 0.35rem;
}

.room-grid-compact .room-tile {
  padding: 0.7rem 0.75rem;
  min-height: 3rem;
  background: linear-gradient(180deg, var(--card), #f8f7f4);
}

.lovable-surface .bottom-nav {
  background: transparent !important;
  border-top: none !important;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) !important;
}

.lovable-surface .bottom-nav-inner {
  border-radius: 1.5rem !important;
  background: rgba(252, 251, 248, 0.94) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border: 1px solid rgba(227, 225, 220, 0.95) !important;
  box-shadow: var(--shadow-lifted) !important;
  padding: 0.45rem 0.5rem !important;
}

.lovable-surface .nav-item.active {
  background: var(--accent-warm-soft) !important;
  color: var(--accent-warm) !important;
  border-radius: 1rem !important;
}

.lovable-surface .card,
.lovable-surface .budget-ring-card,
.lovable-surface .cat-card,
.lovable-surface .room-tile,
.lovable-surface .empty-state {
  box-shadow: var(--shadow-cozy) !important;
  border: 1px solid var(--border) !important;
}

html.embed-mode .home-actions {
  display: none;
}

/* ── Dollhouse / Lovable polish ─────────────────────────── */
.text-warm { color: var(--accent-warm); }

.btn-warm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--accent-warm);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(184, 92, 56, 0.35);
  text-decoration: none;
}

.btn-warm-lg {
  width: 100%;
  max-width: 280px;
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

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

.home-lovable {
  padding-top: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.cottage-hero {
  position: relative;
  min-height: 52vh;
  max-height: 420px;
  overflow: hidden;
  background-size: cover;
  background-position: center 35%;
  background-color: #c9b8a8;
}

.cottage-hero-img {
  width: 100%;
  height: 100%;
  min-height: 52vh;
  object-fit: cover;
  object-position: center 35%;
}

.cottage-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 18, 16, 0.05) 0%, rgba(20, 18, 16, 0.15) 45%, rgba(252, 251, 248, 0.92) 88%, var(--background) 100%);
  pointer-events: none;
}

.cottage-hero-content {
  position: absolute;
  inset: auto 1.25rem 1.5rem;
  text-align: center;
  z-index: 2;
}

.cottage-greeting {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.cottage-sub {
  margin: 0.35rem 0 1rem;
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.cottage-cta {
  justify-content: center;
}

.home-dashboard {
  padding: 0 1rem 1.5rem;
  margin-top: -0.5rem;
  background:
    radial-gradient(ellipse 90% 40% at 50% 0%, rgba(184, 92, 56, 0.06), transparent 70%),
    linear-gradient(180deg, #f7f3ea 0%, var(--background) 45%);
}

.home-budget-card {
  margin-top: 0.5rem;
}

.ring-progress-warm {
  stroke: var(--accent-warm) !important;
}

.home-stat-grid {
  margin-top: 0.75rem;
}

.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.85rem 0 0.25rem;
}

.home-quick-link {
  flex: 1 1 auto;
  min-width: 30%;
  text-align: center;
  padding: 0.55rem 0.65rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: var(--shadow-cozy);
}

.home-section-title {
  margin-top: 1.25rem;
}

/* Calendar — Lovable */
.cal-page-head {
  margin-bottom: 0.75rem;
}

.cal-goal-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  margin-top: 0.5rem;
}

.cal-goal-value {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--accent-warm);
  margin: 0.15rem 0 0;
}

.cal-goal-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cal-edit-btn {
  border-radius: 999px !important;
  padding: 0.5rem 0.85rem !important;
}

.cal-add-btn {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 1.35rem;
  line-height: 1;
}

.cal-stat-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.cal-stat {
  padding: 0.75rem 0.65rem;
  text-align: center;
}

.cal-stat-value {
  font-size: 1.05rem;
  font-weight: 900;
  margin: 0.2rem 0 0;
}

.cal-grid-lovely .cal-day {
  border: none;
  background: transparent;
  border-radius: 999px;
  aspect-ratio: auto;
  min-height: 3.25rem;
  padding: 0.2rem;
}

.cal-grid-lovely .cal-day.cal-spend-over {
  background: var(--cal-over-bg);
}

.cal-grid-lovely .cal-day.cal-spend-ok {
  background: var(--cal-ok-bg);
}

.cal-grid-lovely .cal-day.cal-future .cal-day-amt {
  color: var(--muted-foreground);
  font-weight: 600;
}

.cal-grid-lovely .cal-day.selected {
  box-shadow: 0 0 0 2px var(--accent-warm);
  background: var(--card);
}

.cal-grid-lovely .cal-day.today:not(.selected) {
  box-shadow: 0 0 0 2px rgba(184, 92, 56, 0.45);
}

.cal-today-card {
  margin-top: 1rem;
  padding: 1.15rem 1.25rem;
}

.cal-today-title {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0.35rem 0 0.85rem;
  text-transform: capitalize;
}

.cal-today-rows {
  display: grid;
  gap: 0.45rem;
}

.cal-today-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.cal-today-remain {
  font-weight: 800;
  color: var(--accent-warm);
  margin-top: 0.25rem;
  padding-top: 0.35rem;
  border-top: 1px dashed var(--border);
}

/* AI summary */
.ai-summary-head .page-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ai-sparkle {
  color: var(--accent-warm);
  font-size: 1.1rem;
}

.ai-hero-card {
  text-align: center;
  padding: 1.35rem 1rem;
  margin-top: 0.5rem;
}

.ai-hero-amount {
  color: var(--accent-warm) !important;
  font-size: 2.25rem !important;
}

.recipe-suggest {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.95rem 1rem;
  background: var(--accent-warm-soft) !important;
  border: 1px solid rgba(184, 92, 56, 0.15) !important;
}

.recipe-suggest-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.ai-cat-breakdown .progress-fill.bg-primary,
.ai-cat-breakdown .progress-fill.bg-secondary {
  background: var(--accent-warm) !important;
}

.ai-stat-grid {
  margin-top: 0.75rem;
}

/* Room diorama */
.room-page {
  padding-top: 0.75rem !important;
}

.room-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.room-spend-pill {
  text-align: right;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-cozy);
}

.room-stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 38%) minmax(0, 62%);
  gap: 0.65rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.room-diorama {
  border-radius: 1rem;
  overflow: hidden;
  background: var(--accent-warm-soft);
  box-shadow: var(--shadow-cozy);
  min-height: 200px;
}

.room-diorama-img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  object-position: center;
}

/* Interactive furniture (tap to open) */
.room-diorama-live {
  position: relative;
  min-height: 200px;
}

.room-diorama-live .room-diorama-img {
  display: block;
}

.furniture-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.furniture-piece {
  position: absolute;
  pointer-events: auto;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.furniture-body {
  position: absolute;
  inset: 0;
  border-radius: 0.55rem;
  background: color-mix(in srgb, var(--accent-warm) 18%, rgba(255, 255, 255, 0.55));
  border: 2px solid color-mix(in srgb, var(--accent-warm) 35%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.furniture-door {
  position: absolute;
  top: 4%;
  left: 4%;
  width: 46%;
  height: 92%;
  border-radius: 0.45rem 0.1rem 0.1rem 0.45rem;
  background: color-mix(in srgb, var(--accent-warm) 28%, rgba(255, 255, 255, 0.75));
  border: 2px solid color-mix(in srgb, var(--accent-warm) 45%, transparent);
  transform-origin: left center;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 2px 0 8px rgba(28, 20, 16, 0.12);
}

.furniture-cabinet .furniture-door {
  width: 48%;
  border-radius: 0.4rem;
}

.furniture-shelf .furniture-door {
  width: 100%;
  height: 42%;
  top: 0;
  left: 0;
  transform-origin: top center;
  border-radius: 0.4rem 0.4rem 0.1rem 0.1rem;
}

.furniture-counter .furniture-door {
  width: 100%;
  height: 38%;
  top: 0;
  left: 0;
  transform-origin: top center;
}

.furniture-piece.is-open .furniture-door {
  transform: perspective(400px) rotateY(-68deg);
}

.furniture-shelf.furniture-piece.is-open .furniture-door,
.furniture-counter.furniture-piece.is-open .furniture-door {
  transform: perspective(400px) rotateX(58deg);
}

.furniture-piece.is-active .furniture-body {
  background: color-mix(in srgb, var(--accent-warm) 32%, rgba(255, 255, 255, 0.65));
  border-color: var(--accent-warm);
}

.furniture-face {
  position: absolute;
  inset: auto 0 6% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  pointer-events: none;
}

.furniture-emoji {
  font-size: 1.1rem;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
}

.furniture-label {
  font-size: 0.62rem;
  font-weight: 750;
  color: #4a3530;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  max-width: 92%;
  text-align: center;
  line-height: 1.15;
}

.room-diorama-hint {
  position: absolute;
  bottom: 0.45rem;
  left: 0.5rem;
  right: 0.5rem;
  margin: 0;
  padding: 0.3rem 0.5rem;
  border-radius: 0.45rem;
  background: rgba(252, 251, 248, 0.88);
  font-size: 0.65rem;
  font-weight: 650;
  color: var(--muted-foreground);
  text-align: center;
  pointer-events: none;
}

.furniture-piece:active {
  transform: scale(0.98);
}

html.embed-mode .room-diorama-hint {
  font-size: 0.6rem;
}

html.embed-mode .furniture-label {
  font-size: 0.58rem;
}

.storage-drawer {
  padding: 0.85rem 0.75rem !important;
  min-height: 200px;
}

.storage-drawer-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border);
}

.storage-room-badge {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-warm-soft);
  font-size: 1.1rem;
}

.storage-drawer-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
}

.storage-zone-list {
  display: grid;
  gap: 0.45rem;
}

.storage-zone-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.65rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: var(--card);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  box-shadow: var(--shadow-cozy);
}

.storage-zone-row.active {
  border-color: var(--accent-warm);
  background: var(--accent-warm-soft);
}

.storage-zone-icon {
  font-size: 1.1rem;
}

.storage-zone-label {
  font-weight: 700;
  font-size: 0.85rem;
}

.storage-zone-meta {
  font-size: 0.7rem;
  color: var(--muted-foreground);
}

.storage-zone-chevron {
  color: var(--muted-foreground);
  font-size: 1.1rem;
}

.room-items-panel {
  margin-top: 0.25rem;
}

/* Compact interactive dollhouse */
.dollhouse-mini {
  margin-top: 1.25rem;
  padding: 1rem 1rem 0.85rem !important;
  overflow: hidden;
}

.dollhouse-mini-head {
  text-align: center;
  margin-bottom: 0.75rem;
}

.dollhouse-mini-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.dollhouse-mini-stage {
  position: relative;
  max-width: 300px;
  margin: 0 auto;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 8px 28px rgba(184, 92, 56, 0.12),
    inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  aspect-ratio: 1402 / 1122;
  background: var(--accent-warm-soft);
}

.dollhouse-mini-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dollhouse-mini:hover .dollhouse-mini-img {
  transform: scale(1.02);
}

.dollhouse-zones {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dollhouse-zone {
  position: absolute;
  pointer-events: auto;
  border: none;
  border-radius: 38% 42% 40% 36%;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  padding: 0;
  overflow: visible;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-tap-highlight-color: transparent;
}

.dollhouse-zone-shine {
  position: absolute;
  inset: -2%;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 85% 75% at 50% 45%,
    rgba(255, 235, 210, 0.72) 0%,
    rgba(184, 92, 56, 0.22) 45%,
    transparent 72%
  );
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 0.35s ease,
    transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: none;
  pointer-events: none;
}

.dollhouse-pin {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(184, 92, 56, 0.15);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  font-size: 0.95rem;
  line-height: 1;
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.dollhouse-zone-chip {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%) translateY(6px);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(184, 92, 56, 0.18);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition:
    opacity 0.28s ease,
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.dollhouse-zone-emoji {
  font-size: 0.85rem;
  line-height: 1;
}

.dollhouse-zone-name {
  color: var(--foreground);
}

.dollhouse-zone-amt {
  color: var(--accent-warm);
  font-weight: 800;
}

.dollhouse-zone:hover .dollhouse-zone-shine,
.dollhouse-zone:focus-visible .dollhouse-zone-shine,
.dollhouse-zone.is-active .dollhouse-zone-shine {
  opacity: 1;
  transform: scale(1);
}

.dollhouse-zone:hover .dollhouse-zone-chip,
.dollhouse-zone:focus-visible .dollhouse-zone-chip,
.dollhouse-zone.is-active .dollhouse-zone-chip,
.dollhouse-zone:active .dollhouse-zone-chip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.dollhouse-zone:hover .dollhouse-pin,
.dollhouse-zone:focus-visible .dollhouse-pin,
.dollhouse-zone.is-active .dollhouse-pin,
.dollhouse-zone:active .dollhouse-pin {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
}

.dollhouse-zone:active {
  transform: scale(0.98);
}

.dollhouse-zone:active .dollhouse-zone-shine {
  opacity: 1;
  background: radial-gradient(
    ellipse 90% 80% at 50% 45%,
    rgba(255, 240, 215, 0.82) 0%,
    rgba(184, 92, 56, 0.3) 50%,
    transparent 75%
  );
}

.dollhouse-mini-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border);
}

.dollhouse-legend-item {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.dollhouse-legend-item:hover {
  border-color: var(--accent-warm);
  background: var(--accent-warm-soft);
}

.dollhouse-mini-legend {
  opacity: 0.85;
}

@media (max-width: 360px) {
  .room-stage-layout {
    grid-template-columns: 1fr;
  }

  .room-diorama {
    max-height: 160px;
  }

  .room-diorama-img {
    min-height: 160px;
  }
}

/* ── Phone-native app shell ───────────────────────────────── */
.phone-app {
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.phone-app .app-content {
  max-width: 100%;
  overflow-x: hidden;
}

.phone-app .app-page {
  padding: 1.25rem 1rem calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

.phone-app .page-title {
  font-size: 1.35rem;
}

.phone-app .page-header-row {
  margin-bottom: 1rem;
}

.phone-app .bottom-nav {
  padding: 0 0.65rem;
  padding-bottom: max(0.55rem, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, transparent 0%, rgba(252, 251, 248, 0.55) 35%, rgba(252, 251, 248, 0.92) 100%);
  pointer-events: none;
}

.phone-app .bottom-nav-inner {
  pointer-events: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.4rem 0.35rem;
  border-radius: 1.35rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 8px 28px -8px rgba(28, 24, 20, 0.18),
    0 2px 8px rgba(28, 24, 20, 0.06);
  transition: transform 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.phone-app .nav-item {
  gap: 0.15rem;
  padding: 0.45rem 0.25rem;
  min-height: 44px;
  border-radius: 0.9rem;
  transition:
    color 0.2s ease,
    background 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.phone-app .nav-item:active {
  transform: scale(0.94);
}

.phone-app .nav-item.active {
  background: var(--accent-warm-soft);
  color: var(--accent-warm);
}

.phone-app .nav-item.active .nav-icon {
  transform: scale(1.05);
}

.phone-app .nav-label {
  font-size: 0.6rem;
  letter-spacing: 0.01em;
}

.phone-app .card,
.phone-app .budget-ring-card,
.phone-app .cat-card,
.phone-app .room-tile {
  border-radius: 1.125rem;
  transition:
    transform 0.25s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.25s ease,
    border-color 0.2s ease;
}

.phone-app .home-quick-link:active,
.phone-app .dollhouse-legend-item:active {
  transform: scale(0.97);
}

.phone-app .page-enter {
  animation: phone-page-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes phone-page-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .phone-app .page-enter,
  .phone-app .nav-item,
  .phone-app .bottom-nav-inner,
  .press-scale {
    animation: none !important;
    transition: none !important;
  }
}

/* Embed / iframe phone frame */
html.embed-mode {
  overscroll-behavior: none;
  scroll-behavior: auto;
}

html.embed-mode body {
  overscroll-behavior-y: contain;
}

html.embed-mode .phone-app .app-page {
  padding: 0.85rem 0.85rem calc(4.85rem + env(safe-area-inset-bottom, 0px));
}

html.embed-mode .phone-app .home-lovable {
  padding-bottom: 0;
}

html.embed-mode .cottage-hero {
  min-height: 0;
  max-height: 200px;
  height: 34vh;
}

html.embed-mode .cottage-hero-img {
  min-height: 0;
  height: 100%;
  object-position: center 30%;
}

html.embed-mode .cottage-greeting {
  font-size: 1.35rem;
}

html.embed-mode .cottage-sub {
  font-size: 0.82rem;
  margin-bottom: 0.65rem;
}

html.embed-mode .home-dashboard {
  padding: 0 0.85rem 1rem;
  margin-top: -0.35rem;
}

html.embed-mode .dollhouse-mini {
  margin-top: 0.5rem;
}

html.embed-mode .dollhouse-mini-stage {
  max-height: 220px;
}

html.embed-mode .page-title {
  font-size: 1.2rem;
}

html.embed-mode .phone-app .nav-label {
  font-size: 0.56rem;
}

html.embed-mode .phone-app .bottom-nav {
  padding: 0 0.5rem;
  padding-bottom: max(0.4rem, env(safe-area-inset-bottom, 0px));
}

html.embed-mode .phone-app .bottom-nav-inner {
  padding: 0.35rem 0.3rem;
}

html.embed-mode .cal-page .page-header-row,
html.embed-mode .ai-summary-page .page-header-row {
  margin-bottom: 0.75rem;
}

html.embed-mode .home-stat-grid {
  gap: 0.5rem;
}

html.embed-mode .home-stat-grid .stat-card {
  padding: 0.55rem 0.65rem;
}

html.embed-mode .home-quick-links {
  gap: 0.4rem;
  margin-top: 0.65rem;
}

html.embed-mode .home-quick-link {
  font-size: 0.72rem;
  padding: 0.5rem 0.55rem;
}

/* ── Saraksts: Rimi-style catalog ─────────────────────────── */
.shop-page {
  padding-top: 0.65rem;
  padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

.shop-sticky {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: -0.65rem -1rem 0.75rem;
  padding: 0.65rem 1rem 0.5rem;
  background:
    linear-gradient(180deg, var(--background) 0%, var(--background) 78%, rgba(252, 251, 248, 0.92) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.shop-header {
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.shop-header .page-title {
  font-size: 1.3rem;
}

.shop-share-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
}

.shop-search {
  margin-bottom: 0.55rem;
}

.shop-view-tabs {
  margin-bottom: 0 !important;
}

.shop-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.2rem;
  border-radius: 999px;
  background: var(--accent-warm-soft);
  color: var(--accent-warm);
  font-size: 0.68rem;
  font-weight: 800;
}

.shop-panel {
  animation: phone-page-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.shop-cat-scroll-wrap {
  margin: 0 -0.15rem 0.5rem;
}

.shop-cat-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 0.15rem 0.15rem 0.55rem;
  scrollbar-width: none;
}

.shop-cat-scroll::-webkit-scrollbar {
  display: none;
}

.shop-cat-pill {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.shop-cat-pill.active,
.shop-cat-pill:hover {
  background: var(--accent-warm-soft);
  border-color: color-mix(in srgb, var(--accent-warm) 55%, var(--border));
  color: var(--accent-warm);
}

.shop-cat-emoji {
  font-size: 0.95rem;
  line-height: 1;
}

.shop-catalog-toolbar {
  margin-bottom: 0.55rem;
}

.shop-catalog-toolbar .eshop-heading {
  font-size: 1.15rem;
}

.shop-catalog-controls {
  margin-bottom: 0.85rem;
  padding: 0.75rem;
}

.shop-catalog-grid {
  margin-bottom: 0.5rem;
}

html.embed-mode .shop-sticky {
  margin-left: -0.85rem;
  margin-right: -0.85rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
}

html.embed-mode .shop-catalog-controls {
  padding: 0.6rem;
}

html.embed-mode .eshop-grid.shop-catalog-grid {
  gap: 0.65rem;
}

html.embed-mode .shop-cat-pill {
  font-size: 0.7rem;
  padding: 0.38rem 0.62rem;
}

/* Rimi.lv vertical category dropdown */
.rimi-cat-dropdown {
  position: relative;
  margin-bottom: 0.65rem;
}

.rimi-cat-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 2px 8px rgba(28, 20, 16, 0.04);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.22s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.rimi-cat-trigger.is-open {
  border-color: color-mix(in srgb, var(--accent-warm) 40%, var(--border));
  box-shadow: 0 4px 16px rgba(28, 20, 16, 0.08);
}

.rimi-cat-trigger-icon {
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
}

.rimi-cat-trigger-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.rimi-cat-trigger-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
}

.rimi-cat-trigger-sub {
  font-size: 0.88rem;
  font-weight: 650;
  color: #6b2d4a;
  line-height: 1.25;
}

.rimi-cat-trigger .rimi-cat-chevron {
  flex-shrink: 0;
  color: #9a8f88;
  transition: transform 0.22s ease;
}

.rimi-cat-trigger.is-open .rimi-cat-chevron {
  transform: rotate(180deg);
}

.rimi-cat-panel {
  margin-top: 0.4rem;
  background: #fff;
  border: 1px solid #e8e4de;
  border-radius: 0.75rem;
  box-shadow:
    0 16px 48px -16px rgba(28, 20, 16, 0.22),
    0 4px 12px rgba(28, 20, 16, 0.06);
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  animation: rimi-panel-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rimi-cat-panel.is-closed {
  display: none;
}

@keyframes rimi-panel-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rimi-cat-list {
  padding: 0.15rem 0;
}

.rimi-cat-block:last-child .rimi-cat-group-row,
.rimi-cat-block:last-child .rimi-cat-subs {
  border-bottom: none;
}

.rimi-cat-group-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.78rem 0.9rem;
  border: none;
  border-bottom: 1px solid #ece9e4;
  background: #fff;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
}

.rimi-cat-group-row .rimi-cat-chevron {
  margin-left: auto;
  flex-shrink: 0;
  color: #a39a92;
  transition: transform 0.2s ease;
}

.rimi-cat-group-row.is-open .rimi-cat-chevron {
  transform: rotate(180deg);
}

.rimi-cat-icon {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 0.45rem;
  background: #f5f3f0;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.rimi-cat-group-label {
  flex: 1;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.3;
  color: #6b2d4a;
}

.rimi-cat-subs {
  background: #faf9f7;
  padding: 0.25rem 0.65rem 0.55rem 3.35rem;
  border-bottom: 1px solid #ece9e4;
}

.rimi-cat-sub {
  display: block;
  width: 100%;
  padding: 0.48rem 0.65rem;
  margin: 0.12rem 0;
  border: none;
  background: transparent;
  text-align: left;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #4a4540;
  border-radius: 0.45rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.rimi-cat-sub.active,
.rimi-cat-sub:hover {
  background: var(--accent-warm-soft);
  color: var(--accent-warm);
}

html.embed-mode .rimi-cat-panel {
  max-height: min(44vh, 320px);
}

html.embed-mode .rimi-cat-group-label {
  font-size: 0.8rem;
}

html.embed-mode .rimi-cat-trigger-sub {
  font-size: 0.82rem;
}

/* ── UI polish v54 ─────────────────────────────────────────── */
.shop-sticky-compact {
  margin-bottom: 0.5rem;
}

.shop-sticky-compact .page-title {
  font-size: 1.2rem;
}

.shop-toolbar-row {
  margin-bottom: 0.45rem;
}

.shop-search-compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.shop-search-compact .input-field {
  padding: 0.65rem 0.85rem;
  font-size: 0.92rem;
}

.shop-catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.shop-cat-trigger-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-family: inherit;
  font-weight: 650;
  font-size: 0.82rem;
  color: #6b2d4a;
  flex-shrink: 0;
  max-width: 42%;
}

.shop-cat-trigger-emoji {
  font-size: 1rem;
  line-height: 1;
}

.shop-cat-trigger-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.shop-chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--foreground);
  border-radius: 999px;
  padding: 0.38rem 0.65rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.shop-chip.active {
  background: var(--accent-warm-soft);
  border-color: color-mix(in srgb, var(--accent-warm) 50%, var(--border));
  color: var(--accent-warm);
}

.shop-chip-select {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 0.38rem 0.55rem;
  font-family: inherit;
  font-size: 0.72rem;
  max-width: 7.5rem;
}

.shop-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0.35rem 0 0.5rem;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.shop-breadcrumb-active {
  font-weight: 700;
  color: var(--accent-warm);
}

.shop-breadcrumb-sep {
  opacity: 0.45;
}

.shop-catalog-count {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted-foreground);
}

.shop-cat-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.45);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.shop-cat-sheet-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.shop-cat-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  max-height: min(78vh, 520px);
  background: #fff;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -12px 48px rgba(20, 16, 12, 0.18);
  transform: translateY(105%);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.shop-cat-sheet.is-open {
  transform: translateY(0);
}

.shop-cat-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 0.55rem auto 0.35rem;
}

.shop-cat-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 1rem 0.5rem;
}

.shop-cat-sheet-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #6b2d4a;
}

.shop-cat-sheet-close {
  border: none;
  background: var(--muted);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
}

.shop-cat-sheet-list {
  max-height: calc(min(78vh, 520px) - 3.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.eshop-card-img-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #f5f3f0, #ebe8e3);
  font-size: 2.25rem;
}

.eshop-card-actions-compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.eshop-card-actions-compact .btn-primary {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
}

.eshop-card-link {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted-foreground);
  text-decoration: none;
}

.eshop-card.is-added {
  border-color: color-mix(in srgb, var(--accent-warm) 45%, var(--border));
}

.eshop-card.pop-added {
  animation: pop-added 0.45s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes pop-added {
  0% { transform: scale(1); }
  40% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

.shop-list-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 28;
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  background: linear-gradient(180deg, transparent, rgba(252, 251, 248, 0.92) 25%, var(--background) 100%);
  max-width: 28rem;
  margin: 0 auto;
}

.shop-list-footer .btn-warm,
.shop-list-footer .btn-secondary {
  flex: 1;
  padding: 0.7rem 0.75rem;
  font-size: 0.82rem;
}

.shop-panel-list.has-footer {
  padding-bottom: 4.5rem;
}

.shop-row-quick {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.shop-quick-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

.shop-quick-done {
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.shop-quick-del {
  color: var(--muted-foreground);
}

.shop-embed-hint {
  margin-bottom: 0.75rem;
  border-color: color-mix(in srgb, var(--accent-warm) 35%, var(--border));
  background: linear-gradient(135deg, var(--accent-warm-soft), var(--card));
}

.pull-refresh-hint {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--muted-foreground);
  padding: 0.35rem;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.pull-refresh-hint.is-ready {
  color: var(--accent-warm);
}

.home-stat-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.home-stat-link:active {
  transform: scale(0.98);
}

.ai-insight-card {
  margin-bottom: 1rem;
  border-color: color-mix(in srgb, var(--accent-warm) 25%, var(--border));
  background: linear-gradient(135deg, rgba(184, 92, 56, 0.08), var(--card));
}

.ai-insight-text {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  line-height: 1.45;
  font-weight: 550;
}

.more-hub-page .page-title {
  margin-bottom: 0.25rem;
}

.more-hub-grid {
  display: grid;
  gap: 0.65rem;
}

.more-hub-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.85rem 1rem;
}

.more-hub-emoji {
  font-size: 1.35rem;
  grid-row: span 2;
}

.more-hub-label {
  font-weight: 750;
}

html.embed-mode .shop-list-footer {
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  padding: 0.45rem 0.85rem;
}

html.embed-mode .shop-cat-sheet {
  max-height: min(70vh, 400px);
}
