/* VÄLO STUDIO — Clean Light Luxury E-Commerce Theme */

:root {
  --bg: #fcfbf9;
  --panel-bg: rgba(255, 255, 255, 0.78);
  --panel-border: rgba(164, 132, 100, 0.12);
  --border: rgba(0, 0, 0, 0.06);
  --text: #1a1918;
  --text-muted: #7d7870;
  
  /* Brand Champagne / Bronze Accents */
  --accent: #9b7e63;
  --accent-hover: #7d634c;
  --accent-soft: rgba(155, 126, 99, 0.06);
  --accent-glow: rgba(155, 126, 99, 0.15);
  
  --radius: 20px;
  --card-radius: 12px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow: 0 10px 40px rgba(155, 126, 99, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --glow: 0 0 15px var(--accent-glow);
}

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

[hidden] {
  display: none !important;
}

valo-garment-card,
valo-journal-card,
valo-outfit-tray,
valo-silhouette-dropzone {
  display: block;
}

body {
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(155, 126, 99, 0.03) 0%, transparent 45%),
    radial-gradient(circle at 90% 80%, rgba(155, 126, 99, 0.02) 0%, transparent 50%);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.app-header {
  border-bottom: 1px solid var(--border);
  background: rgba(252, 251, 249, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 40px;
}

.header-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.brand h1 {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.15em;
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-details .subtitle {
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-top: 2px;
}

/* Navigation Links */
.main-nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 450;
  padding: 8px 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
}

.nav-link.active::after, .nav-link:hover::after {
  width: 100%;
}

/* Header Icons */
.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Auth Container & Profile Header */
.auth-container {
  display: flex;
  align-items: center;
}

.auth-btn.sign-in-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.auth-btn.sign-in-btn:hover {
  background: var(--bg);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(155, 126, 99, 0.12);
}

.auth-btn.sign-in-btn:active {
  transform: translateY(0);
}

.google-icon {
  flex-shrink: 0;
  display: block;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--panel-border);
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(155, 126, 99, 0.06);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent);
  background: var(--accent-soft);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  font-size: 10px;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sign-out-btn {
  font-size: 11px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin-left: 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.sign-out-btn:hover {
  color: var(--accent-hover);
}

.meta-item {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
}

.meta-item:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.03);
}

.bag-count {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Layout */
.layout {
  display: grid;
  grid-template-columns: 360px 1fr 380px;
  gap: 30px;
  padding: 40px;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  align-items: start;
  flex: 1;
}

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

/* Glassmorphic Panels */
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  backdrop-filter: blur(20px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.panel:hover {
  border-color: rgba(155, 126, 99, 0.25);
  box-shadow: 0 12px 50px rgba(155, 126, 99, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  padding-bottom: 12px;
}

.panel h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.step-badge {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--accent);
  opacity: 0.8;
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.panel-subtitle {
  display: block;
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  margin-top: 2px;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  padding-bottom: 8px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

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

.tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-sans);
  position: relative;
  white-space: nowrap;
  border-radius: 4px;
}

.tab:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.02);
}

.tab.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -9px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

/* Catalog Grid */
.catalog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Scrollbar customization */
.catalog-grid::-webkit-scrollbar {
  width: 4px;
}
.catalog-grid::-webkit-scrollbar-track {
  background: transparent;
}
.catalog-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
.catalog-grid::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* Garment Card */
.garment-card {
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--card-radius);
  padding: 12px;
  background: #ffffff;
  cursor: grab;
  text-align: left;
  position: relative;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  user-select: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.garment-card:hover {
  border-color: rgba(155, 126, 99, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(155, 126, 99, 0.08);
}

.garment-card.selected {
  border-color: var(--accent);
  background: #fffdfa;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 20px rgba(155, 126, 99, 0.12);
}

.g-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.garment-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.garment-card:hover img {
  transform: scale(1.06);
}

.g-info {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-category {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}

.garment-card .g-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--text);
  margin: 2px 0 0 0;
  transition: color 0.3s ease;
}

.g-price {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.garment-card.selected .g-price {
  color: var(--accent);
}

.garment-card .check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  line-height: 22px;
  text-align: center;
  font-weight: bold;
  display: none;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.garment-card.selected .check {
  display: block;
}

/* Upload Tile */
.garment-card.upload-tile {
  border: 1.5px dashed rgba(155, 126, 99, 0.3);
  cursor: pointer;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 12px;
  color: var(--text-muted);
  min-height: 200px;
  background: rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
}

.upload-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.garment-card.upload-tile:hover {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(155, 126, 99, 0.08);
}

.garment-card.upload-tile:hover .upload-icon-circle {
  transform: scale(1.08);
  background: var(--accent);
  color: #ffffff;
}

.upload-tile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.upload-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.upload-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

.remove-custom {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.remove-custom:hover {
  background: #e74c3c;
  color: #fff;
}

/* Dropzone (Dressing Room Portrait) */
.dropzone {
  position: relative;
  border: 1px dashed rgba(155, 126, 99, 0.25);
  border-radius: var(--radius);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: rgba(155, 126, 99, 0.015);
  transition: all 0.3s ease;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  pointer-events: none;
}

.dropzone:hover {
  border-color: rgba(155, 126, 99, 0.5);
  background: rgba(155, 126, 99, 0.03);
}

.dropzone.drag-file, .dropzone.drag-garment {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--glow);
}

.dropzone-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.dropzone:hover .dropzone-empty {
  transform: translateY(-2px);
}

.upload-icon-pulse {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(155, 126, 99, 0.05);
  transition: all 0.3s ease;
}

.dropzone:hover .upload-icon-pulse {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

.dropzone-empty p {
  font-size: 14px;
  line-height: 1.6;
}

.dropzone-empty .subtext {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  display: inline-block;
}

#photoPreview {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  animation: fadeIn 0.5s ease;
}

.drop-hint-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(252, 251, 249, 0.95);
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 2px solid var(--accent);
  border-radius: var(--radius);
}

.dropzone.drag-garment .drop-hint-overlay {
  display: flex;
}

/* Outfit Capsule Tray */
.outfit-tray {
  margin-top: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.03);
  border-radius: var(--card-radius);
}

.outfit-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.outfit-tray-header h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
  transition: color 0.3s ease;
}

.link-btn:hover {
  color: #e74c3c;
}

.outfit-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  align-items: center;
}

.empty-note {
  font-size: 12px;
  color: var(--text-muted);
}

/* Tag/Chip style */
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid rgba(155, 126, 99, 0.2);
  border-radius: 8px;
  padding: 6px 12px;
  animation: scaleUp 0.25s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.chip img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 4px;
  padding: 1px;
}

.chip-details {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.chip-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-price {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
}

.chip button {
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.3s ease;
  margin-left: 2px;
}

.chip button:hover {
  color: #e74c3c;
}

/* Generate Button */
.primary-btn {
  width: 100%;
  margin-top: 24px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--card-radius);
  padding: 15px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.primary-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
}

.primary-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(155, 126, 99, 0.2);
}

.primary-btn:hover:not(:disabled)::after {
  animation: shine 1.5s infinite;
}

.primary-btn:disabled {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.25);
  box-shadow: none;
  cursor: not-allowed;
}

.primary-btn svg {
  transition: transform 0.3s ease;
}

.primary-btn:hover:not(:disabled) svg {
  transform: translateX(4px);
}

.error-note {
  color: #e74c3c;
  font-size: 12.5px;
  margin-top: 12px;
  text-align: center;
}

/* Result Box (Studio Canvas) */
.result-box {
  min-height: 440px;
  border-radius: var(--radius);
  background: rgba(155, 126, 99, 0.015);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.result-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.placeholder-art {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.03);
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-placeholder p {
  font-size: 13px;
  line-height: 1.6;
}

/* Elegant Spinner */
.result-loading {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.elegant-loader {
  position: relative;
  width: 50px;
  height: 50px;
}

.spinner-ring {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 50px;
  height: 50px;
  border: 2px solid transparent;
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-core {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(155, 126, 99, 0.05);
  border: 1px solid rgba(155, 126, 99, 0.25);
  animation: pulse 1.5s ease-in-out infinite;
}

#loadingText {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#resultImage {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  animation: fadeIn 0.8s ease;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.08));
}

.result-error {
  color: #e74c3c;
  font-size: 13px;
  padding: 30px;
  text-align: center;
  line-height: 1.6;
}

/* Action Buttons */
.result-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.secondary-btn {
  flex: 1;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  color: var(--text);
  border-radius: var(--card-radius);
  padding: 12px;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.secondary-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: 0 4px 15px rgba(155, 126, 99, 0.05);
}

/* Footer styling */
.app-footer {
  border-top: 1px solid var(--border);
  background: rgba(252, 251, 249, 0.95);
  padding: 30px 40px;
  margin-top: auto;
}

.footer-content {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.app-footer p {
  color: var(--text-muted);
  font-size: 12px;
}

.app-footer .footer-note {
  font-size: 10.5px;
  opacity: 0.6;
}

/* Background Selector Dropdown */
.background-selector {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.background-selector label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

.select-wrapper {
  position: relative;
  width: 100%;
}

.select-wrapper select {
  width: 100%;
  padding: 12px 40px 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--card-radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all 0.3s ease;
}

.select-wrapper select:focus, .select-wrapper select:hover {
  outline: none;
  border-color: rgba(155, 126, 99, 0.4);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(155, 126, 99, 0.05);
}

.select-arrow {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
  transition: border-top-color 0.3s ease;
}

.select-wrapper select:focus + .select-arrow,
.select-wrapper select:hover + .select-arrow {
  border-top-color: var(--accent);
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleUp {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes shine {
  100% { transform: translateX(100%); }
}

/* Media Toggle (Static / Video) */
.media-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 30px;
  padding: 4px;
  margin-top: 20px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 30px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-btn:hover {
  color: var(--text);
}

.toggle-btn.active {
  background: var(--text);
  color: var(--bg);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* Video Loader & Player */
.video-loading {
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px;
}

.video-loading-hint {
  font-size: 11px;
  font-style: italic;
  opacity: 0.8;
  margin-top: 2px;
}

#resultVideo {
  width: 100%;
  height: 100%;
  max-height: 480px;
  object-fit: contain;
  animation: fadeIn 0.8s ease;
  filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.08));
}

/* Journal Nav Badge */
.journal-badge {
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Main Container & Page Views */
.main-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.page-view {
  width: 100%;
  animation: fadeIn 0.3s ease;
}

.page-view[hidden] {
  display: none !important;
}

/* Dedicated Journal Lookbook Page */
.journal-page {
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px;
  width: 100%;
}

.journal-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.journal-header-titles h2 {
  font-family: var(--font-serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text);
}

.journal-header-titles .subtitle {
  font-size: 14px;
  color: var(--accent);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.journal-nav-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 12px;
}

.journal-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.empty-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.journal-empty h3 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
}

.journal-empty .subtext {
  font-size: 14px;
  line-height: 1.5;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

.journal-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(155, 126, 99, 0.06);
  transition: all 0.3s ease;
}

.journal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(155, 126, 99, 0.12);
  border-color: var(--accent);
}

.journal-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  background: #f5f4f1;
  overflow: hidden;
}

.journal-card-img, .journal-card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-media-switcher {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  background: rgba(26, 25, 24, 0.85);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  z-index: 5;
}

.card-media-btn {
  border: none;
  background: transparent;
  color: #d0cbc5;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-media-btn:hover {
  color: #ffffff;
}

.card-media-btn.active {
  background: var(--accent);
  color: #ffffff;
}

.journal-scene-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(26, 25, 24, 0.75);
  backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.journal-card-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.journal-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.journal-card-scene-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.journal-card-date {
  font-size: 12px;
  color: var(--text-muted);
}

.journal-capsule-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.journal-capsule-chip {
  font-size: 11px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.journal-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-remix {
  flex: 2;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

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

.btn-use-photo {
  flex: 1.2;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-use-photo:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-delete-entry {
  flex: 0 0 34px;
  padding: 8px 0;
  background: transparent;
  color: #a9a49f;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-delete-entry:hover {
  background: #c94a4a;
  color: #ffffff;
  border-color: #c94a4a;
}

/* ==========================================================================
   Luxury Dialog / Confirmation Modal
   ========================================================================== */
.valo-modal-dialog {
  border: none;
  background: transparent;
  padding: 0;
  margin: auto;
  max-width: 460px;
  width: 92%;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(26, 25, 24, 0.22), 0 0 30px var(--accent-glow);
  outline: none;
  animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.valo-modal-dialog::backdrop {
  background: rgba(26, 25, 24, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFadeIn 0.25s ease;
}

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

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content-card {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 32px 34px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.modal-icon-warning {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(198, 74, 57, 0.08);
  color: #c64a39;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
}

.modal-message {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

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

.btn-modal-cancel {
  padding: 10px 22px;
  background: #f7f5f2;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: #eae6e0;
  border-color: rgba(155, 126, 99, 0.3);
}

.btn-modal-confirm {
  padding: 10px 24px;
  background: #c64a39;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(198, 74, 57, 0.25);
  transition: all 0.2s ease;
}

.btn-modal-confirm:hover {
  background: #b03e2e;
  box-shadow: 0 6px 20px rgba(198, 74, 57, 0.35);
  transform: translateY(-1px);
}



