:root {
  --bg: #0f0f17;
  --accent: #29c9f3;
  --card-bg: rgba(30, 30, 46, 0.4);
  --border: rgba(255, 255, 255, 0.1);
  --purple: #8b5cf6;
  --text-dim: #a0a0cc;
  --danger: #ef4444;
  --success: #10b981;
  --pink: #ff69b4;
  --spotify: #1DB954;
  --tidal: #00ffff;
  --gradient: linear-gradient(135deg, var(--accent), var(--pink));
}

* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent; 
}

body { 
  margin: 0; 
  background: var(--bg); 
  font-family: system-ui, -apple-system, sans-serif; 
  color: #e0e0ff; 
  height: 100vh; 
  height: 100dvh; 
  display: flex; 
  flex-direction: column; 
  overflow: hidden; 
  overscroll-behavior-y: contain; 
}

/* CUSTOM CURSORS */
body.cursor-ken, body.cursor-ken * { cursor: url('https://i.imgur.com/x65SIV8.png'), auto !important; }
body.cursor-bunny, body.cursor-bunny * { cursor: url('https://i.imgur.com/g0qBErg.png'), auto !important; }

/* ========================================================
   UNIVERSAL RANGE SLIDER STYLING (CHROME & FIREFOX FIX)
   ======================================================== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
  width: 100%;
  outline: none;
  margin: 0;
}

/* TRACK (THE LINE) */
input[type="range"]::-webkit-slider-runnable-track {
  background-color: var(--accent);
  height: 6px;
  border-radius: 3px;
  box-shadow: inset 0 0 5px rgba(41, 201, 243, 0.4);
}
input[type="range"]::-moz-range-track {
  background-color: var(--accent);
  height: 6px;
  border-radius: 3px;
  box-shadow: inset 0 0 5px rgba(41, 201, 243, 0.4);
}

/* THUMB (THE CIRCLE) */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 
    0 0 10px rgba(41, 201, 243, 0.7),
    0 0 20px rgba(41, 201, 243, 0.3);
  margin-top: -7px;
  transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
input[type="range"]::-moz-range-thumb {
  border: none;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 
    0 0 10px rgba(41, 201, 243, 0.7),
    0 0 20px rgba(41, 201, 243, 0.3);
  transition: background 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

nav { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  padding: 15px 20px; 
  background: rgba(0, 0, 0, 0.85); 
  backdrop-filter: blur(20px); 
  z-index: 99999; 
  border-bottom: 1px solid var(--border); 
  flex-shrink: 0; 
  position: relative; 
}

/* NAV BAR RESPONSIVE SCROLL FIX */
.nav-tabs-wrapper { 
  display: flex; 
  justify-content: flex-start; 
  gap: 12px; 
  flex-grow: 1; 
  overflow-x: auto; 
  scrollbar-width: none; 
  -ms-overflow-style: none; 
  padding: 0 80px 0 0; 
}
@media (min-width: 1100px) { .nav-tabs-wrapper { justify-content: center; padding: 0 80px; } }
.nav-tabs-wrapper::-webkit-scrollbar { display: none; }

.nav-item { 
  padding: 8px 14px; 
  border-radius: 10px; 
  font-size: 14px; 
  color: var(--text-dim); 
  transition: 0.3s; 
  border: 1px solid transparent; 
  white-space: nowrap; 
  cursor: pointer; 
  pointer-events: auto !important;
}
.nav-item.active { 
  background: rgba(41, 201, 243, 0.2); 
  color: white; 
  border-color: var(--accent); 
  box-shadow: 0 0 15px rgba(41, 201, 243, 0.3); 
}
#auth-tab { 
  color: var(--pink); 
  border: 1px solid rgba(255, 105, 180, 0.2); 
  position: absolute; 
  right: 20px; 
  background: var(--bg); 
}

#view-container { flex-grow: 1; overflow-y: auto; width: 100%; position: relative; scrollbar-width: none; }
#view-container::-webkit-scrollbar { display: none; }
.view { display: none; width: 100%; max-width: 1300px; margin: 0 auto; padding: 40px 20px; position: relative; z-index: 1;}

#ptr-element { height: 0px; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; padding-bottom: 15px; color: var(--accent); font-weight: bold; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; width: 100%; position: relative; z-index: 50; pointer-events: none;}

.header { font-size: 32px; font-weight: 700; color: var(--accent); text-shadow: 0 0 20px rgba(41, 201, 243, 0.6); margin-bottom: 24px; text-align: center; }
.sub-header { font-size: 18px; color: var(--text-dim); margin-bottom: 30px; text-align: center; }

@keyframes gentlePulse { 
  0% { opacity: 0.85; text-shadow: 0 0 10px var(--pink), 0 0 20px var(--purple); } 
  50% { opacity: 1; text-shadow: 0 0 25px var(--pink), 0 0 40px var(--purple); transform: scale(1.02) translateX(-50%); } 
  100% { opacity: 0.85; text-shadow: 0 0 10px var(--pink), 0 0 20px var(--purple); } 
}
.destiny-banner { font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: 2px; color: white; text-align: center; animation: gentlePulse 3s infinite ease-in-out; display: none; background: rgba(30,30,46,0.6); padding: 12px 25px; border-radius: 99px; border: 1px solid rgba(255,105,180,0.4); box-shadow: 0 10px 30px rgba(0,0,0,0.4); backdrop-filter: blur(10px); position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 50; white-space: nowrap;}

.filter-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; width: 100%; position: relative; }
.sub-nav { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; flex: 1; margin-bottom: 0; }
.spacer { width: 140px; flex-shrink: 0; } 

.sort-dropdown { width: 140px; flex-shrink: 0; background: rgba(139, 92, 246, 0.1); border: 1px solid var(--purple); color: white; padding: 8px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; outline: none; transition: 0.3s; box-shadow: 0 0 10px rgba(139, 92, 246, 0.2); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;utf8,<svg fill='%238b5cf6' height='24' viewBox='0 0 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>"); background-repeat: no-repeat; background-position-x: 95%; background-position-y: center; cursor: pointer;}
.sort-dropdown option { background: #1a1a25; color: white; }
.sort-dropdown.active-sort { border-color: var(--accent); box-shadow: 0 0 15px rgba(41, 201, 243, 0.4); background-color: rgba(41, 201, 243, 0.1); color: white; }

.sub-item { padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.03); border: 1px solid var(--border); color: var(--text-dim); transition: 0.3s; cursor: pointer; user-select: none; pointer-events: auto !important;}
.sub-item.active { background: var(--purple); color: white; border-color: var(--purple); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
.sub-item.drag-over { border-color: white !important; background: rgba(255,255,255,0.15); transform: scale(1.05); }

/* SUBTAB COLOR SPECIFICS */
.sub-item[data-status*="bunny"].active, .sub-item.comfort-bunny.active { background: var(--accent) !important; border-color: var(--accent) !important; box-shadow: 0 0 15px rgba(41, 201, 243, 0.4) !important; }
.sub-item[data-status*="ken"].active, .sub-item.comfort-ken.active { background: var(--pink) !important; border-color: var(--pink) !important; box-shadow: 0 0 15px rgba(255, 105, 180, 0.4) !important; }
.sub-item[data-status*="riniken"].active { background: var(--gradient) !important; color: white !important; border-color: transparent !important; box-shadow: 0 0 15px rgba(255, 105, 180, 0.4) !important; }

.nested-nav { display: none; margin-top: -10px; margin-bottom: 25px; gap: 12px; justify-content: center; width: 100%; }
.nested-nav.active { display: flex; }

/* PRIVACY LOCKS */
.locked-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--pink);
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card-bg);
  max-width: 500px;
  margin: 0 auto;
  text-shadow: 0 0 15px rgba(255, 105, 180, 0.3);
}

body:not(.is-admin) #ourstory .filter-row,
body:not(.is-admin) #ourstory .sub-view { display: none !important; }
body:not(.is-admin) #ourstory .locked-msg { display: flex; }

body:not(.is-admin) #ourhub .filter-row,
body:not(.is-admin) #ourhub .sub-view { display: none !important; }
body:not(.is-admin) #ourhub .locked-msg { display: flex; }

body:not(.is-admin) #qotd-content-area,
body:not(.is-admin) #whiteboard-content-area,
body:not(.is-admin) #stopwatch-content-area { display: none !important; }

body:not(.is-admin) #random-qotd .locked-msg,
body:not(.is-admin) #random-whiteboard .locked-msg,
body:not(.is-admin) #random-stopwatch .locked-msg { display: flex; }

body:not(.is-admin) #calendar-content-area { display: none !important; }
body:not(.is-admin) #random-calendar .locked-msg { display: flex; }

body:not(.is-admin) #newsfeed-content-area { display: none !important; }
body:not(.is-admin) .newsfeed-lock { display: flex; }

/* JOURNEY BOXES */
.journey-wrapper {
  padding: 2px;
  border-radius: 20px;
  margin-top: 25px;
  width: 100%;
  max-width: 670px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.journey-wrapper.riniken { background: var(--gradient); }
.journey-wrapper.bunny { background: var(--accent); box-shadow: 0 10px 30px rgba(41, 201, 243, 0.2); }
.journey-wrapper.ken { background: var(--pink); box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2); }
.journey-box {
  background: var(--bg);
  border-radius: 18px;
  padding: 25px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* WIDGET CARDS FOR RINI-KEN TAB */
.widget-container { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 20px; margin-left: auto; margin-right: auto; max-width: 670px; }
.widget-card { background: rgba(20, 20, 30, 0.6); border: 1px solid var(--border); border-radius: 20px; padding: 30px; width: 100%; max-width: 320px; display: flex; flex-direction: column; align-items: center; gap: 15px; backdrop-filter: blur(10px); transition: 0.3s; position: relative; overflow: hidden; pointer-events: auto !important;}
.widget-card:hover { transform: translateY(-5px); border-color: var(--purple); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2); }
.widget-title { font-size: 14px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-dim); font-weight: 700; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.custom-emote { height: 22px; width: 22px; object-fit: contain; vertical-align: middle; pointer-events: none;}
.widget-time { font-size: 48px; font-weight: 800; color: white; text-shadow: 0 0 20px rgba(255, 255, 255, 0.2); letter-spacing: 2px; }
.widget-weather { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--accent); font-weight: 600; background: rgba(41, 201, 243, 0.1); padding: 8px 16px; border-radius: 99px; }
.widget-bg { position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle, rgba(41,201,243,0.05) 0%, transparent 70%); z-index: -1; }

.widget-card.bunny .widget-weather { color: var(--accent); background: rgba(41, 201, 243, 0.1); }
.widget-card.bunny:hover { border-color: var(--accent); box-shadow: 0 10px 30px rgba(41, 201, 243, 0.2); }
.widget-card.ken .widget-weather { color: var(--pink); background: rgba(255, 105, 180, 0.1); }
.widget-card.ken:hover { border-color: var(--pink); box-shadow: 0 10px 30px rgba(255, 105, 180, 0.2); }
.widget-card.ken .widget-bg { background: radial-gradient(circle, rgba(255,105,180,0.05) 0%, transparent 70%); }

/* PERFECT ROUNDED GRADIENT LEFT BORDERS */
.riniken-left-border, .habit-card[data-owner="riniken"] { border-left: 4px solid transparent !important; position: relative; }
.riniken-left-border::before, .habit-card[data-owner="riniken"]::before {
  content: ""; position: absolute; top: -1px; bottom: -1px; left: -4px; width: 30px;
  padding: 0 0 0 4px; background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out; mask-composite: exclude; pointer-events: none; z-index: 2;
}
.habit-card[data-owner="riniken"]::before { border-top-left-radius: 15px; border-bottom-left-radius: 15px; }
.feed-card.riniken-left-border::before { border-top-left-radius: 15px; border-bottom-left-radius: 15px; }
.list-item.riniken-left-border::before { border-top-left-radius: 20px; border-bottom-left-radius: 20px; }

/* HABIT TRACKER CSS */
.habit-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 15px; padding: 15px 20px; display: flex; flex-direction: column; gap: 10px; transition: 0.3s; position: relative; }
.habit-card:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.habit-card[data-owner="bunny"] { border-left: 4px solid var(--accent); }
.habit-card[data-owner="ken"] { border-left: 4px solid var(--pink); }

.habit-header { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1;}
.habit-title { font-size: 16px; font-weight: 600; color: white; }
.habit-delete { color: var(--danger); font-size: 11px; cursor: pointer; font-weight: bold; text-transform: uppercase; transition: 0.2s; pointer-events: auto !important;}
.habit-delete:hover { color: #ff6b6b; text-shadow: 0 0 8px rgba(239, 68, 68, 0.5);}
.habit-days { display: flex; justify-content: space-between; margin-top: 8px; position: relative; z-index: 1; pointer-events: auto !important;}
.day-circle { width: 35px; height: 35px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: var(--text-dim); transition: 0.3s; user-select: none; background: rgba(0,0,0,0.2); cursor: pointer;}
.day-circle:hover { border-color: rgba(255,255,255,0.3); color: white; }
.habit-card[data-owner="riniken"] .day-circle.active { background: var(--gradient); border-color: transparent; color: white; box-shadow: 0 0 12px rgba(255, 105, 180, 0.5); }
.habit-card[data-owner="bunny"] .day-circle.active { background: var(--accent); border-color: var(--accent); color: white; box-shadow: 0 0 12px rgba(41, 201, 243, 0.5); }
.habit-card[data-owner="ken"] .day-circle.active { background: var(--pink); border-color: var(--pink); color: white; box-shadow: 0 0 12px rgba(255, 105, 180, 0.5); }

/* ROULETTE WHEEL CSS */
.wheel-wrapper { position: relative; width: 350px; height: 350px; margin: 0 auto; margin-top: 30px; pointer-events: auto !important; }
.wheel-pointer { position: absolute; top: -20px; left: 50%; transform: translateX(-50%); font-size: 40px; color: white; z-index: 10; text-shadow: 0 4px 10px rgba(0,0,0,0.6); pointer-events: none;}
#wheelCanvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 30px rgba(0,0,0,0.5); transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99); }
.spin-btn { margin-top: 40px; background: linear-gradient(45deg, var(--accent), var(--purple)); color: white; border: none; padding: 15px 45px; font-size: 18px; font-weight: 800; border-radius: 99px; transition: 0.3s; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); text-transform: uppercase; letter-spacing: 2px; cursor: pointer; pointer-events: auto !important;}
.spin-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6); }
.spin-btn:disabled { opacity: 0.5; pointer-events: none; transform: none; }

/* GALACTIC GRID CALENDAR CSS */
.calendar-controls { display: flex; justify-content: space-between; align-items: center; max-width: 400px; margin: 0 auto 20px auto; pointer-events: auto !important;}
.cal-btn { background: var(--card-bg); border: 1px solid var(--border); color: white; padding: 8px 18px; border-radius: 12px; cursor: pointer; transition: 0.2s; font-weight: 800; font-size: 14px;}
.cal-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); box-shadow: 0 0 15px rgba(41,201,243,0.3);}
.calendar-wrapper { max-width: 650px; margin: 0 auto; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; width: 100%; }
.cal-day-name { text-align: center; font-size: 12px; color: var(--text-dim); text-transform: uppercase; font-weight: 800; margin-bottom: 5px;}
.cal-cell { background: rgba(0,0,0,0.3); border: 1px solid var(--border); border-radius: 14px; aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 6px; position: relative; transition: 0.3s; backdrop-filter: blur(10px); cursor: pointer; pointer-events: auto !important;}
.cal-cell:hover { transform: scale(1.05); z-index: 10; background: rgba(255,255,255,0.05); }
.cal-date { font-size: 14px; font-weight: 700; color: white; opacity: 0.8; margin-bottom: 2px; pointer-events: none;}
.cal-cell.empty { background: transparent; border-color: transparent; pointer-events: none; }
.cal-cell.today { background: rgba(255,255,255,0.1); border-color: white; }
.cal-cell.selected { border-color: var(--accent) !important; background: rgba(41,201,243,0.2) !important; box-shadow: 0 0 15px rgba(41,201,243,0.4); transform: scale(1.05); z-index: 10; }
.event-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 2px; flex-shrink: 0; pointer-events: none;}
.event-bunny { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.event-ken { background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.event-riniken { background: var(--purple); box-shadow: 0 0 8px var(--purple); }
.event-title-sm { font-size: 9px; text-align: center; color: white; margin-top: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; opacity: 0.8; font-weight: 600; pointer-events: none;}

.cal-cell.riniken-border::after { content: ""; position: absolute; inset: -1px; border-radius: 15px; padding: 1px; background: var(--gradient); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: destination-out; mask-composite: exclude; pointer-events: none; }

/* DUAL STAR RATINGS */
.rating-container { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; margin-bottom: 5px; }
.star-row { display: flex; gap: 4px; font-size: 18px; line-height: 1; align-items: center; justify-content: center;}
.star-row span { color: rgba(255,255,255,0.15); transition: 0.2s; user-select: none; cursor: pointer; pointer-events: auto !important; }
.star-row.bunny-stars span.active, .star-row.bunny-stars span:hover { color: var(--accent); text-shadow: 0 0 8px var(--accent); }
.star-row.ken-stars span.active, .star-row.ken-stars span:hover { color: var(--pink); text-shadow: 0 0 8px var(--pink); }

.list-content { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; width: 100%; }

/* CLEAN STANDARD LIST ITEMS */
.list-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 8px; min-height: 100px; backdrop-filter: blur(10px); position: relative; transition: 0.3s; pointer-events: auto !important;}
.list-item:hover { transform: translateY(-4px); border-color: var(--pink) !important; box-shadow: 0 8px 20px rgba(255, 105, 180, 0.15) !important; cursor: pointer; }

/* OVERRIDE FOR COMPLETED ITEMS TO GLOW BLUE */
.list-item.completed { border-color: var(--accent) !important; box-shadow: 0 0 15px rgba(41, 201, 243, 0.2) !important; }
.list-item.completed:hover { box-shadow: 0 8px 25px rgba(41, 201, 243, 0.4) !important; transform: translateY(-4px); }
.list-item.completed .circle-check { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 10px rgba(41, 201, 243, 0.4); }
.list-item.completed .item-title { text-decoration: line-through; opacity: 0.5; }

#upcoming-events-list .list-item { flex-direction: row; justify-content: space-between; align-items: center; padding: 12px 20px;}
#upcoming-events-list .item-text-group { text-align: left; }
#upcoming-events-list .item-title { font-size: 14px; font-weight: bold; color: white; margin-bottom: 2px;}
#upcoming-events-list .item-date { font-size: 12px; color: var(--text-dim); }

.circle-check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--text-dim); transition: 0.3s; flex-shrink: 0; cursor: pointer; pointer-events: auto !important;}
.item-title { font-size: 16px; font-weight: 600; color: white; transition: 0.2s;}
.item-desc { font-size: 13px; color: var(--text-dim); line-height: 1.4; white-space: pre-wrap; user-select: text; }

.item-controls { display: flex; justify-content: flex-end; gap: 15px; padding-top: 10px; margin-top: auto; border-top: none; }
.item-controls span { text-transform: uppercase; font-weight: 700; font-size: 11px; transition: 0.2s; cursor: pointer; }

.ctrl-btn { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); padding: 10px; border-radius: 10px; font-size: 11px; font-weight: 800; flex: 1; text-align: center; cursor: pointer;}
.ctrl-btn.edit { background: rgba(41, 201, 243, 0.1); color: var(--accent); border-color: rgba(41, 201, 243, 0.2); }
.api-item-controls { display: flex; justify-content: flex-end; gap: 8px; padding: 12px; margin-top: auto; }

/* SEARCH & SUGGESTIONS */
.suggestions-box { position: absolute; top: 100%; left: 0; width: 100%; background: #1a1a25; border: 1px solid var(--border); border-radius: 12px; max-height: 350px; overflow-y: auto; z-index: 9999999; display: none; margin-top: 5px; padding: 10px; box-shadow: 0 15px 30px rgba(0,0,0,0.6); pointer-events: auto !important;}
.suggestion-item { display: flex; align-items: center; gap: 15px; padding: 10px; transition: 0.2s; border-radius: 10px; width: 100%; text-align: left; cursor: pointer; pointer-events: auto !important;}
.suggestion-item:hover { background: rgba(255, 255, 255, 0.05); }

.card-txt, .sugg-txt { flex-grow: 1; text-align: left; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.card-txt { padding: 12px; }
.card-txt b, .sugg-txt b { display: block; font-size: 14px; color: white; margin-bottom: 4px; line-height: 1.2; text-align: left; }
.card-txt small, .sugg-txt small { display: block; font-size: 12px; color: var(--text-dim); text-align: left; margin-bottom: 2px; }

#home.active { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-height: 100%; position: relative; padding: 100px 20px 40px 20px;}
.status-text { color: var(--accent); font-size: 18px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 28px; }
.progress-container { width: 55px; height: 320px; background: #1e1e2e; border-radius: 999px; position: relative; box-shadow: inset 0 2px 10px rgba(0,0,0,0.6); overflow: hidden; touch-action: none; pointer-events: auto !important;}
.progress-fill { position: absolute; bottom: 0; width: 100%; background: linear-gradient(to top, var(--accent), #0284c8); border-radius: 999px; pointer-events: none; box-shadow: 0 0 30px rgba(41, 201, 243, 0.8); }

.input-bar, .search-wrapper { width: 100%; max-width: 500px; margin: 0 auto 20px auto; display: none; align-items: center; gap: 10px; background: var(--card-bg); padding: 10px 15px; border-radius: 15px; border: 1px solid var(--border); position: relative; backdrop-filter: blur(10px); z-index: 10001; pointer-events: auto !important;}
body.is-admin .input-bar, body.is-admin .search-wrapper { display: flex; }
input { flex: 1; background: transparent; border: none; color: white; outline: none; font-size: 16px; pointer-events: auto !important;}
.add-btn { background: var(--purple); color: white; border: none; border-radius: 10px; width: 40px; height: 40px; font-size: 18px; font-weight: bold; flex-shrink: 0; cursor: pointer; pointer-events: auto !important;}

.grid-display { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 15px; width: 100%; min-height: 100px; }
.api-card { background: #1a1a25; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); display: flex; flex-direction: column; transition: 0.3s; position: relative; min-height: 380px; pointer-events: auto !important;}
.api-card:hover { transform: translateY(-4px); border-color: var(--pink) !important; box-shadow: 0 8px 20px rgba(255, 105, 180, 0.15) !important; }
.api-card img { width: 100%; aspect-ratio: 2/3; object-fit: cover; pointer-events: none; }
.dragging { opacity: 0.4; border: 2px dashed var(--accent); transform: scale(0.98); }

/* MODAL FIX */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); align-items: center; justify-content: center; z-index: 999999; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.active { display: flex; opacity: 1; pointer-events: auto; }
.modal-box { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 30px; width: 90%; max-width: 350px; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); transform: translateY(20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-box { transform: translateY(0); }
.modal-title { font-size: 18px; font-weight: 700; color: white; text-align: center; }
.modal-input { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 12px; padding: 15px; color: white; font-size: 20px; font-weight: bold; text-align: center; outline: none; transition: 0.3s; width: 100%;}
.modal-input::-webkit-outer-spin-button, .modal-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.modal-input[type=number] { -moz-appearance: textfield; }
.modal-actions { display: flex; gap: 10px; justify-content: center; width: 100%;}
.modal-btn { padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 14px; cursor: pointer; border: none; transition: 0.2s; flex: 1; color: #0f0f17; text-transform: uppercase;}
.modal-btn.cancel { background: rgba(255,255,255,0.1); color: var(--text-dim); }
.modal-btn.cancel:hover { background: rgba(255,255,255,0.2); color: white; }

/* OUR HUB, WHITEBOARD, & STOPWATCH STYLES */
.timeline-container { position: relative; max-width: 600px; margin: 0 auto; padding: 20px 0; }
.timeline-container::after { content: ''; position: absolute; width: 4px; background: var(--gradient); top: 0; bottom: 0; left: 50%; margin-left: -2px; border-radius: 10px; z-index: 0; }
.timeline-item { padding: 10px 40px; position: relative; background: inherit; width: 50%; z-index: 1; }
.timeline-item.left { left: 0; } .timeline-item.right { left: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background: var(--bg); border: 4px solid var(--accent); top: 15px; border-radius: 50%; z-index: 1; }
.timeline-item.right::after { left: -10px; border-color: var(--pink); }

/* TIMELINE GRADIENT FIX & HOVER */
.timeline-content { padding: 20px; background: var(--gradient); border-radius: 15px; border: none; box-shadow: 0 10px 30px rgba(0,0,0,0.4); color: white; transition: 0.3s;}
.timeline-content:hover { transform: translateY(-4px); box-shadow: 0 15px 35px rgba(255, 105, 180, 0.4); cursor: pointer;}

/* WEDDING EXPENSE DRAG HANDLING & INPUTS */
.expense-card { transition: 0.3s; pointer-events: auto !important; }
.expense-card.dragging { opacity: 0.4; border: 2px dashed var(--pink); transform: scale(0.98); }
.expense-drag-handle { background: rgba(0,0,0,0.3); padding: 15px; border-top-left-radius: 20px; border-top-right-radius: 20px; font-weight: 800; color: white; font-size: 14px; text-transform: uppercase; text-align: center; cursor: grab; border-bottom: 1px solid var(--border); user-select: none; }
.expense-drag-handle:active { cursor: grabbing; }

.expense-detail-input {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border);
    color: white;
    padding: 15px;
    border-radius: 12px;
    min-height: 80px;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    outline: none;
    transition: 0.3s;
}
.expense-detail-input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 10px rgba(255, 105, 180, 0.3);
}

/* NEW HOME CARDS GRADIENT BORDER FIX */
.home-card { 
  background: var(--card-bg); 
  border: 2px solid transparent; 
  border-radius: 20px; 
  padding: 20px; 
  pointer-events: auto !important;
  position: relative;
  transition: 0.3s;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.15);
  cursor: pointer;
}
.home-card::after { 
  content: ""; 
  position: absolute; 
  inset: 0px; 
  border-radius: 20px; 
  padding: 2px; 
  background: var(--gradient); 
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 
  -webkit-mask-composite: destination-out; 
  mask-composite: exclude; 
  pointer-events: none; 
}

/* COMFORT CACHE CARDS GRADIENT BORDER FIX */
.comfort-card {
  background: var(--card-bg);
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 20px;
  position: relative;
  break-inside: avoid;
  margin-bottom: 15px;
  pointer-events: auto !important;
  transition: 0.3s;
}
.comfort-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(255, 105, 180, 0.15);
  cursor: pointer;
}
.comfort-card::after {
  content: ""; 
  position: absolute; 
  inset: 0px; 
  border-radius: 20px; 
  padding: 2px; 
  background: var(--gradient); 
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 
  -webkit-mask-composite: destination-out; 
  mask-composite: exclude; 
  pointer-events: none;
}

.score-circle { width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 800; color: white; background: var(--bg); border: 4px solid var(--accent); box-shadow: 0 0 15px rgba(41,201,243,0.5); }

/* SLEEK TIMER & STOPWATCH UI */
.time-display { font-size: 72px; font-weight: 800; font-variant-numeric: tabular-nums; color: white; text-shadow: 0 0 30px rgba(255,255,255,0.2); margin: 20px 0; letter-spacing: 2px;}
.timer-input { background: rgba(0,0,0,0.3); border: 2px solid var(--border); color: white; font-size: 24px; font-weight: bold; text-align: center; padding: 10px; border-radius: 12px; width: 80px; outline: none; transition: 0.3s;}
.timer-input::-webkit-outer-spin-button, .timer-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.timer-input { -moz-appearance: textfield; }

/* THE "ANTIGRAVITY" SLEEK BUTTONS (HOVER GLOW BORDER FIX) */
.time-btn { 
  position: relative;
  padding: 12px 25px; 
  border-radius: 12px; 
  font-weight: 800; 
  font-size: 14px; 
  text-transform: uppercase; 
  cursor: pointer; 
  transition: 0.3s; 
  border: 1px solid rgba(255,255,255,0.1); 
  color: white; 
  background: rgba(0,0,0,0.3); 
  pointer-events: auto !important;
  z-index: 1;
}

.time-btn::after {
  content: ""; 
  position: absolute; 
  inset: -1px; 
  border-radius: 13px; 
  padding: 1px; 
  background: var(--gradient); 
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); 
  -webkit-mask-composite: destination-out; 
  mask-composite: exclude; 
  pointer-events: none; 
  opacity: 0;
  transition: 0.3s ease;
  z-index: -1;
}

.time-btn:hover {
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(255, 105, 180, 0.3);
  transform: translateY(-2px);
}

.time-btn:hover::after {
  opacity: 1;
}

/* WHITEBOARD CSS FIXES */
#live-whiteboard { 
    border: 2px solid var(--border); 
    border-radius: 20px; 
    background: rgba(0,0,0,0.5); /* BACK TO DARK MODE */
    cursor: crosshair; 
    touch-action: none; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    width: 100%; 
    max-width: 1200px; /* MATCHES HTML SCALING */
    aspect-ratio: 12 / 7; /* ENSURES MOUSE TRACKING IS FLAWLESS */
    height: auto;
    pointer-events: auto !important;
}

@media (max-width: 600px) { .grid-display { grid-template-columns: repeat(2, 1fr); } .filter-row { flex-direction: column; align-items: center; gap: 15px; } .spacer { display: none; } .timeline-item { width: 100%; padding-left: 30px; padding-right: 0; left: 0 !important; } .timeline-container::after { left: 10px; } .timeline-item::after { left: -1px !important; } }
