:root {
  --transition-speed: 0.4s;
  --glass-blur: 14px;
  --noise-opacity: 0.035;
  --ease-elastic: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --title-font: "Arimo", "Trebuchet MS", sans-serif;
  --body-font: "Inter", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--bg-color);
  overflow-x: hidden;
  transition: color 0.6s ease, background-color 0.6s ease;
}

/* --- MOOD SYSTEM: COLOR PALETTES --- */

/* Default: Night Date (Wine/Gold/Dark) */
body[data-mood="night"] {
  --bg-color: #0f0a13;
  --text-color: #fceceb;
  --text-muted: #c9b3b8;
  
  --orb-1: #691e3f;  /* Deep Wine */
  --orb-2: #8a3429;  /* Rust */
  --orb-3: #2d1b36;  /* Deep Purple */
  
  --glass-bg: rgba(23, 15, 28, 0.55);
  --glass-border: rgba(255, 200, 200, 0.08);
  --glass-shine: rgba(255, 230, 230, 0.03);
  
  --accent-glow: #e09f7d; /* Gold/Peach */
  --accent-primary: #d45d79;
  
  --status-planned: #b08d95;
  --status-progress: #e09f7d;
  --status-done: #6da383;
}

/* Morning Coffee (Peach/Beige/Soft) */
body[data-mood="morning"] {
  --bg-color: #fdfcf8;
  --text-color: #4a3e3b;
  --text-muted: #8c7b75;
  
  --orb-1: #f2d7d5;  /* Soft Pink */
  --orb-2: #fae5d3;  /* Peach */
  --orb-3: #e8daef;  /* Light Lavender */
  
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shine: rgba(255, 255, 255, 0.4);
  
  --accent-glow: #e6b0aa;
  --accent-primary: #d98880;
  
  --status-planned: #aab7b8;
  --status-progress: #d4ac0d;
  --status-done: #52be80;
}

/* Starry Night (Deep Blue/Silver) */
body[data-mood="stars"] {
  --bg-color: #050a14;
  --text-color: #e1e9f5;
  --text-muted: #8da4c4;
  
  --orb-1: #1a2d52; /* Dark Blue */
  --orb-2: #21406b; /* Mid Blue */
  --orb-3: #0f172a; /* Deep Navy */
  
  --glass-bg: rgba(13, 20, 36, 0.6);
  --glass-border: rgba(150, 180, 255, 0.09);
  --glass-shine: rgba(200, 220, 255, 0.04);
  
  --accent-glow: #8cb6f5;
  --accent-primary: #5b8bd9;
  
  --status-planned: #7687a1;
  --status-progress: #6fa6d6;
  --status-done: #5fb899;
}

/* Cozy Vintage (Warm Brown/Film) */
body[data-mood="vintage"] {
  --bg-color: #1a1614;
  --text-color: #e8dcd4;
  --text-muted: #a6968c;
  
  --orb-1: #4a332a; /* Coffee */
  --orb-2: #6e4c3e; /* Clay */
  --orb-3: #2e2621; /* Dark Wood */
  
  --glass-bg: rgba(30, 25, 22, 0.65);
  --glass-border: rgba(200, 180, 160, 0.1);
  --glass-shine: rgba(255, 240, 220, 0.03);
  
  --accent-glow: #d69e6b;
  --accent-primary: #bf7e4e;
  
  --status-planned: #8f847b;
  --status-progress: #cc9a62;
  --status-done: #7a9c72;
}

/* --- BACKGROUND & AMBIENT --- */

.ambient-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
  background-color: var(--bg-color);
}

.noise-overlay {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--noise-opacity);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  background: var(--orb-1);
  width: 60vw;
  height: 60vw;
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.orb-2 {
  background: var(--orb-2);
  width: 50vw;
  height: 50vw;
  bottom: -5%;
  right: -5%;
  animation-duration: 30s;
  animation-direction: alternate-reverse;
}

.orb-3 {
  background: var(--orb-3);
  width: 40vw;
  height: 40vw;
  top: 40%;
  left: 30%;
  animation-duration: 35s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.05); }
  100% { transform: translate(-20px, 20px) scale(0.95); }
}

/* --- LAYOUT --- */

.page-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

main {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- GLASS PANELS --- */

.glass-panel,
.glass-card,
.modal-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 
    0 4px 24px -1px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 0 var(--glass-shine);
  border-radius: 24px;
}

/* --- TOPBAR --- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  font-family: var(--title-font);
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--text-color), var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.brand.site-text-editable {
  background: none;
  color: var(--text-color);
  -webkit-text-fill-color: currentColor;
}

.mood-switch {
  display: flex;
  gap: 8px;
  background: rgba(0,0,0,0.1);
  padding: 4px;
  border-radius: 99px;
  border: 1px solid var(--glass-border);
}

.content-font-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.12);
}

.content-font-label {
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.content-font-size-input {
  width: 96px;
  padding: 7px 10px;
  font-size: 0.84rem;
}

.content-font-size-input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.content-font-reset-btn {
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.78rem;
  cursor: pointer;
}

.content-font-reset-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mood-btn {
  background: transparent;
  border: none;
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s var(--ease-elastic);
  color: var(--text-muted);
}

.mood-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-color);
}

.mood-btn.active {
  background: var(--glass-bg);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  color: var(--text-color);
  border: 1px solid var(--glass-border);
}

.mood-label {
  font-size: 0.85rem;
  font-weight: 500;
  display: none;
}

@media (min-width: 640px) {
  .mood-label { display: block; }
}

.admin-controls .action-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s;
  font-size: 1.2rem;
}

.action-btn:hover {
  background: rgba(255,255,255,0.1);
  transform: scale(1.05);
}

/* --- HERO --- */

.hero {
  padding: 27px 40px 60px;
  display: grid;
  gap: 18px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--accent-glow);
  margin-bottom: 16px;
  font-weight: 600;
}

.hero h1 {
  font-family: var(--title-font);
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: 400;
  line-height: 0.95;
  margin: 0 0 16px 0;
  letter-spacing: -0.02em;
}

.subtitle {
  font-family: var(--title-font);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 400;
}

.hero-lead {
  font-style: normal;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.site-text-editable {
  border-radius: 8px;
  outline: none;
  border: 1px dashed transparent;
  padding: 2px 6px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-text-editable:focus {
  border-color: var(--accent-glow);
  background: rgba(255, 255, 255, 0.05);
}

/* --- TIMER --- */

.timer-display {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(10px, 4vw, 30px);
  margin-top: 9px;
  flex-wrap: wrap;
}

.timer-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-value {
  font-family: var(--title-font);
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 300;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px var(--orb-1);
}

.timer-label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-top: 8px;
}

.timer-separator {
  font-family: var(--title-font);
  font-size: 3rem;
  color: var(--text-muted);
  opacity: 0.3;
  transform: translateY(-15px);
}

.timer-footer {
  width: 100%;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.7;
}

/* --- MEMORY CAROUSEL --- */

.memory-section {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.memory-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.memory-header h2 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.35rem, 2.7vw, 2rem);
  font-weight: 600;
}

.memory-index {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.memory-jump-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-jump-btn {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0 8px;
  user-select: none;
}

.memory-jump-buttons.reorder-enabled .memory-jump-btn {
  cursor: grab;
  touch-action: none;
}

.memory-jump-buttons.reorder-enabled .memory-jump-btn.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.memory-jump-buttons.reorder-enabled .memory-jump-btn.drop-target {
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 2px rgba(212, 93, 121, 0.28);
}

.memory-jump-buttons.reorder-enabled .memory-jump-btn.drop-before {
  box-shadow:
    -3px 0 0 0 var(--accent-glow),
    0 0 0 2px rgba(212, 93, 121, 0.28);
}

.memory-jump-buttons.reorder-enabled .memory-jump-btn.drop-after {
  box-shadow:
    3px 0 0 0 var(--accent-glow),
    0 0 0 2px rgba(212, 93, 121, 0.28);
}

.memory-jump-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent-glow);
  color: #fff;
}

.memory-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.memory-next-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.memory-media-area {
  min-width: 0;
}

.memory-photo-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  min-height: 16px;
  margin-bottom: 12px;
}

.memory-photo-dots.reorder-enabled .memory-photo-dot {
  cursor: grab;
  touch-action: none;
}

.memory-photo-dots.reorder-enabled .memory-photo-dot.dragging {
  opacity: 0.55;
  cursor: grabbing;
}

.memory-photo-dot.drop-before {
  box-shadow: -3px 0 0 0 var(--accent-glow);
}

.memory-photo-dot.drop-after {
  box-shadow: 3px 0 0 0 var(--accent-glow);
}

.memory-photo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.memory-photo-dot:hover {
  transform: scale(1.15);
}

.memory-photo-dot.active {
  background: var(--accent-glow);
  border-color: var(--accent-glow);
}

.memory-image-box {
  width: min(100%, 860px);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  position: relative;
  min-height: 240px;
  padding: 10px;
}

.memory-image-box.is-portrait {
  width: min(100%, 560px);
}

.memory-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.memory-video {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  display: block;
}

.memory-empty {
  color: var(--text-muted);
  padding: 20px;
  text-align: center;
}

.memory-delete-photo-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 160, 160, 0.45);
  background: rgba(70, 20, 20, 0.7);
  color: #ffd9d9;
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  z-index: 3;
}

.memory-delete-photo-btn:hover {
  background: rgba(120, 26, 26, 0.85);
}

.memory-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.memory-nav:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.16);
}

.quick-add-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.quick-add-btn:hover {
  transform: scale(1.06);
  background: rgba(255, 255, 255, 0.18);
}

.memory-caption {
  text-align: center;
}

.memory-caption h3 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
}

.memory-caption p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.memory-admin-tools {
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.memory-admin-tools h4 {
  margin: 0;
  font-family: var(--title-font);
  font-size: 1rem;
}

.memory-meta-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-memory-form {
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px dashed var(--glass-border);
}

.memory-description-input {
  min-height: 72px;
  resize: vertical;
}

.memory-upload-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.memory-upload-hint {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* --- GRID --- */

.content-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- GRATITUDE --- */

.gratitude-section {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gratitude-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gratitude-header h2 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  font-weight: 600;
}

.gratitude-collapse-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gratitude-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.gratitude-section.collapsed .gratitude-collapse-btn {
  transform: rotate(-90deg);
}

.gratitude-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gratitude-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gratitude-item {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.12);
}

.gratitude-item.drop-before {
  box-shadow: inset 0 3px 0 0 var(--accent-glow);
}

.gratitude-item.drop-after {
  box-shadow: inset 0 -3px 0 0 var(--accent-glow);
}

.gratitude-item.dragging {
  opacity: 0.55;
}

.gratitude-number {
  color: var(--text-muted);
  font-size: 0.92rem;
  min-width: 24px;
}

.gratitude-drag-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  cursor: grab;
  touch-action: none;
}

.gratitude-drag-btn:active {
  cursor: grabbing;
}

.gratitude-text {
  margin: 0;
  line-height: 1.45;
  font-size: 0.96rem;
}

.gratitude-text.spoiler-hidden {
  color: transparent;
  user-select: none;
  filter: blur(6px);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 2px 6px;
}

.gratitude-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  color: var(--text-color);
}

.gratitude-actions {
  display: flex;
  gap: 6px;
}

.gratitude-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  cursor: pointer;
}

.gratitude-add-form {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gratitude-input {
  min-height: 92px;
  resize: vertical;
}

/* --- ROADMAP --- */

.roadmap-section {
  position: relative;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.roadmap-section::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(circle at 90% 10%, rgba(224, 159, 125, 0.12), transparent 38%);
  pointer-events: none;
}

.roadmap-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.roadmap-title {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.3rem, 2.8vw, 1.95rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.roadmap-subtitle {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.roadmap-timeline {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding-top: 44px;
}

.roadmap-timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  right: 20px;
  top: 21px;
  height: 2px;
  background: linear-gradient(90deg, rgba(224, 159, 125, 0.2), rgba(224, 159, 125, 0.85), rgba(214, 158, 107, 0.2));
  box-shadow: 0 0 16px rgba(224, 159, 125, 0.35);
}

.roadmap-level-card {
  position: relative;
  border-radius: 18px;
  padding: 18px 16px 16px;
  border: 1px solid rgba(224, 159, 125, 0.18);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(16, 10, 18, 0.45));
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 270px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  isolation: isolate;
}

.roadmap-level-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(224, 159, 125, 0.26), rgba(212, 93, 121, 0.08), rgba(214, 158, 107, 0.24));
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: -1;
}

.roadmap-level-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(224, 159, 125, 0.5);
  box-shadow: 0 14px 32px rgba(8, 4, 10, 0.5), 0 0 30px rgba(214, 158, 107, 0.16);
}

.roadmap-level-card:hover::after {
  opacity: 1;
}

.roadmap-node {
  position: absolute;
  top: -30px;
  left: 18px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid rgba(224, 159, 125, 0.75);
  background: rgba(22, 14, 28, 0.95);
  box-shadow: 0 0 10px rgba(224, 159, 125, 0.5);
}

.roadmap-node.is-active {
  border-color: #5ee38d;
  background: rgba(94, 227, 141, 0.18);
  box-shadow: 0 0 0 4px rgba(94, 227, 141, 0.12), 0 0 16px rgba(94, 227, 141, 0.58);
}

.roadmap-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(94, 227, 141, 0.4);
  background: rgba(20, 54, 33, 0.45);
  color: #b7f6ca;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}

.roadmap-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #60ff99;
  box-shadow: 0 0 0 0 rgba(96, 255, 153, 0.72);
  animation: roadmapPulse 1.7s ease-out infinite;
}

.roadmap-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid rgba(224, 159, 125, 0.35);
  background: rgba(17, 11, 23, 0.75);
  color: rgba(224, 159, 125, 0.92);
  display: grid;
  place-items: center;
}

.roadmap-lock-badge svg {
  width: 13px;
  height: 13px;
}

.roadmap-level-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(224, 159, 125, 0.35);
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  color: var(--accent-glow);
}

.roadmap-level-icon svg {
  width: 22px;
  height: 22px;
}

.roadmap-level-heading {
  margin: 0;
  font-family: var(--title-font);
  font-size: 1.03rem;
  line-height: 1.33;
  font-weight: 600;
}

.roadmap-level-text {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.roadmap-lock-tooltip {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 12px);
  width: min(280px, calc(100vw - 50px));
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(224, 159, 125, 0.45);
  background: linear-gradient(155deg, rgba(31, 20, 40, 0.97), rgba(63, 36, 26, 0.95));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.45);
  color: #f7e9df;
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.roadmap-level-card.has-tooltip:hover .roadmap-lock-tooltip,
.roadmap-level-card.has-tooltip:focus-within .roadmap-lock-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes roadmapPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 255, 153, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(96, 255, 153, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(96, 255, 153, 0);
  }
}

/* --- COUPONS --- */

.coupon-section {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coupon-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.coupon-header-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.coupon-header h2 {
  margin: 0;
  font-family: var(--title-font);
  font-size: clamp(1.2rem, 2.6vw, 1.8rem);
  font-weight: 600;
}

.coupon-header p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.coupon-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(224, 159, 125, 0.28);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.coupon-counter #couponCounterValue {
  font-family: var(--title-font);
  color: var(--accent-glow);
  letter-spacing: 0.04em;
  font-size: 0.92rem;
}

.coupon-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.coupon-card {
  position: relative;
  min-height: 180px;
  perspective: 1200px;
  cursor: pointer;
}

.coupon-card:focus-visible {
  outline: 2px solid var(--accent-glow);
  outline-offset: 4px;
  border-radius: 14px;
}

.coupon-card-inner {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.coupon-card.is-flipped .coupon-card-inner {
  transform: rotateY(180deg);
}

.coupon-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(224, 159, 125, 0.26);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.04), rgba(23, 15, 30, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 16px;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.coupon-face::before,
.coupon-face::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: var(--bg-color);
  border: 1px solid rgba(224, 159, 125, 0.18);
}

.coupon-face::before {
  left: -11px;
}

.coupon-face::after {
  right: -11px;
}

.coupon-card:hover .coupon-face {
  border-color: rgba(224, 159, 125, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 10px 24px rgba(14, 8, 18, 0.42);
}

.coupon-front {
  background: linear-gradient(145deg, rgba(19, 12, 24, 0.88), rgba(63, 32, 24, 0.58));
}

.coupon-back {
  transform: rotateY(180deg);
  background: linear-gradient(145deg, rgba(64, 29, 25, 0.85), rgba(22, 14, 32, 0.84));
}

.coupon-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(224, 159, 125, 0.32);
  display: grid;
  place-items: center;
  color: var(--accent-glow);
  background: rgba(0, 0, 0, 0.2);
}

.coupon-icon {
  width: 20px;
  height: 20px;
}

.coupon-front-title {
  font-family: var(--title-font);
  font-size: 1.06rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-glow);
}

.coupon-front-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.coupon-back-text {
  font-family: var(--title-font);
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text-color);
  max-width: 90%;
}

.coupon-card.is-selected .coupon-face {
  border-color: rgba(94, 227, 141, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 0 24px rgba(94, 227, 141, 0.22);
}

.coupon-card.is-unavailable {
  opacity: 0.46;
  filter: grayscale(0.2);
}

.coupon-card.is-unavailable::after {
  content: "🔒";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(224, 159, 125, 0.38);
}

.coupon-card.is-unavailable .coupon-card-inner {
  transform: rotateY(0deg) !important;
}

.coupon-card.is-denied {
  animation: couponDenied 0.35s ease;
}

@keyframes couponDenied {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

.section-header {
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header h2 {
  font-family: var(--title-font);
  font-size: 1.8rem;
  font-weight: 500;
  margin: 0;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.progress-track {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent-glow);
  width: 0%;
  transition: width 1s var(--ease-elastic);
  box-shadow: 0 0 10px var(--accent-glow);
}

.ideas-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

/* --- CARDS --- */

.idea-card {
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.idea-card:hover {
  transform: translateY(-5px);
  box-shadow: 
    0 10px 40px -5px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
}

.card-status-line {
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--status-planned), transparent);
  opacity: 0.5;
}

.idea-card[data-status="done"] .card-status-line { background: var(--status-done); opacity: 1; box-shadow: 0 0 10px var(--status-done); }
.idea-card[data-status="in_progress"] .card-status-line { background: var(--status-progress); opacity: 1; }

.card-content {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.idea-title {
  font-family: var(--body-font);
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.idea-title-editable {
  padding: 2px 6px;
  border-radius: 8px;
  outline: none;
  border: 1px dashed transparent;
}

.idea-title-editable:focus {
  border-color: var(--accent-glow);
  background: rgba(255, 255, 255, 0.05);
}

.status-pill {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.status-pill-select {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  cursor: pointer;
}

.delete-idea-btn {
  opacity: 0;
  pointer-events: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.idea-card:hover .delete-idea-btn {
  opacity: 1;
  pointer-events: auto;
}

/* --- CAROUSEL --- */

.carousel-container {
  flex: 1;
  min-height: 220px;
  background: rgba(0,0,0,0.2);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  display: grid;
  place-items: center;
}

.carousel-track {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.carousel-track img,
.carousel-track video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.carousel-track img.active,
.carousel-track video.active {
  opacity: 1;
}

.carousel-overlay {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #fff;
  pointer-events: none;
}

.carousel-controls {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8px;
  opacity: 0;
  transition: opacity 0.2s;
}

.carousel-container:hover .carousel-controls {
  opacity: 1;
}

.nav-btn {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.nav-btn:hover {
  background: rgba(255,255,255,0.3);
}

/* --- INPUTS & BUTTONS --- */

.glass-input, 
.glass-select {
  background: rgba(0,0,0,0.1);
  border: 1px solid var(--glass-border);
  color: var(--text-color);
  padding: 10px 14px;
  border-radius: 8px;
  font-family: inherit;
  width: 100%;
  transition: all 0.2s;
}

.glass-input:focus, 
.glass-select:focus {
  outline: none;
  background: rgba(0,0,0,0.2);
  border-color: var(--accent-glow);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.05);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-primary), #c04d6b);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(212, 93, 121, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(212, 93, 121, 0.4);
}

.primary-btn.sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.danger-btn {
  border: 1px solid rgba(255, 120, 120, 0.45);
  background: rgba(120, 10, 10, 0.35);
  color: #ffd4d4;
  border-radius: 10px;
  padding: 9px 12px;
  font-weight: 600;
  cursor: pointer;
  width: fit-content;
}

.danger-btn:hover {
  background: rgba(150, 10, 10, 0.45);
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: var(--text-muted);
  transition: 0.2s;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-color);
}

.file-upload-btn {
  display: inline-block;
  cursor: pointer;
}

.file-upload-btn input {
  display: none;
}

.file-upload-btn span {
  display: inline-block;
  padding: 6px 12px;
  border: 1px dashed var(--glass-border);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: 0.2s;
}

.file-upload-btn:hover span {
  border-color: var(--accent-glow);
  color: var(--text-color);
}

/* --- ADMIN --- */

.admin-tools {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-row {
  display: flex;
  gap: 8px;
}

.upload-form {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.photo-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.photo-chip {
  font-size: 0.7rem;
  background: rgba(255,0,0,0.1);
  color: #ff8888;
  border: 1px solid rgba(255,0,0,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
}

/* --- MODAL --- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-glass {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  text-align: center;
}

.modal-glass h3 {
  font-family: var(--title-font);
  font-size: 2rem;
  margin: 0 0 8px 0;
}

.modal-form {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.7;
}

.hidden { display: none !important; }

/* --- RESPONSIVE --- */

@media (max-width: 768px) {
  .hero h1 { font-size: 2.8rem; }
  .timer-display { gap: 10px; }
  .timer-separator { font-size: 2rem; transform: translateY(-8px); }
  .ideas-masonry { grid-template-columns: 1fr; }
  .topbar { justify-content: center; }
  .mood-label { display: none; }
  .content-font-control {
    width: 100%;
    justify-content: space-between;
  }
  .content-font-size-input {
    width: 88px;
  }
  .memory-section {
    padding: 18px;
  }
  .memory-stage {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .memory-next-stack {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
  }
  .memory-nav {
    width: 100%;
    border-radius: 12px;
    height: 36px;
    font-size: 1.3rem;
  }
  .quick-add-btn {
    width: 44px;
    height: 36px;
    border-radius: 12px;
  }
  .memory-image-box {
    width: min(100%, 760px);
    min-height: 180px;
    padding: 8px;
  }
  .memory-image-box.is-portrait {
    width: min(100%, 430px);
  }
  .memory-image {
    max-height: 62vh;
  }
  .memory-video {
    max-height: 62vh;
  }
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .section-header-actions {
    justify-content: space-between;
  }
  .gratitude-section {
    padding: 18px;
  }
  .gratitude-item {
    grid-template-columns: auto auto 1fr;
  }
  .gratitude-actions {
    grid-column: 2 / 4;
    justify-self: end;
  }
  .roadmap-section {
    padding: 18px;
  }
  .roadmap-header {
    align-items: flex-start;
  }
  .roadmap-timeline {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 0;
    padding-left: 26px;
  }
  .roadmap-timeline::before {
    left: 7px;
    right: auto;
    top: 6px;
    bottom: 18px;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, rgba(224, 159, 125, 0.25), rgba(224, 159, 125, 0.8), rgba(214, 158, 107, 0.22));
  }
  .roadmap-level-card {
    min-height: 0;
  }
  .roadmap-node {
    top: 18px;
    left: -35px;
  }
  .roadmap-lock-tooltip {
    right: 0;
  }
  .coupon-section {
    padding: 18px;
  }
  .coupon-header {
    align-items: stretch;
  }
  .coupon-counter {
    align-self: flex-start;
  }
  .coupon-grid {
    gap: 10px;
  }
  .coupon-card,
  .coupon-card-inner {
    min-height: 160px;
  }
  .coupon-face {
    padding: 12px;
  }
  .coupon-back-text {
    font-size: 0.94rem;
  }
  .danger-btn {
    width: 100%;
  }
}
