/* ==========================================================================
   Aesthetic Digital Journal & Planner Stylesheet (Vanilla CSS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Variables & Design System Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Desk Elements */
  --desk-bg: radial-gradient(circle, #e6ded4 0%, #c4b9aa 100%);
  --desk-wood-grain: repeating-linear-gradient(90deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 4px, rgba(0,0,0,0.03) 4px, rgba(0,0,0,0.03) 8px);
  --notebook-shadow: 0 15px 35px rgba(50, 40, 30, 0.15), 0 5px 15px rgba(0, 0, 0, 0.08);
  --page-border: 1px solid rgba(74, 68, 60, 0.1);
  --ring-gradient: linear-gradient(135deg, #e5c07b 0%, #b39150 40%, #87672d 70%, #d5b26b 100%);
  --ring-shadow: 0 4px 6px rgba(0, 0, 0, 0.15), inset 0 1px 2px rgba(255, 255, 255, 0.3);

  /* Default Typography */
  --font-cursive-family: 'Caveat', 'Sacramento', cursive;
  --font-typewriter-family: 'Special Elite', 'Courier Prime', monospace;
  --font-minimalist-family: 'Quicksand', 'Montserrat', sans-serif;
  --font-chubby-family: 'Fredoka', 'Comfortaa', sans-serif;

  /* Theme-specific Overrides (Sage default) */
  --primary-color: #abbf9e;
  --primary-light: #f2f6f0;
  --accent-color: #8fa87e;
  --text-color: #2a2420;
  --page-color: #fcfaf6;
  --grid-color: rgba(74, 68, 60, 0.09);
  
  /* Preset Colors */
  --pastel-pink: #e2b8b1;
  --pastel-pink-light: #fbf2f1;
  --pastel-green: #abbf9e;
  --pastel-green-light: #f2f6f0;
  --pastel-autumn: #d4a373;
  --pastel-autumn-light: #faf4ed;
  --pastel-lavender: #c7c1db;
  --pastel-lavender-light: #f4f3f9;
}

/* Theme Classes */
body.theme-sage {
  --primary-color: var(--pastel-green);
  --primary-light: var(--pastel-green-light);
  --accent-color: #8fa87e;
}
body.theme-blush {
  --primary-color: var(--pastel-pink);
  --primary-light: var(--pastel-pink-light);
  --accent-color: #cda19a;
}
body.theme-autumn {
  --primary-color: var(--pastel-autumn);
  --primary-light: var(--pastel-autumn-light);
  --accent-color: #bc8a5f;
}
body.theme-lavender {
  --primary-color: var(--pastel-lavender);
  --primary-light: var(--pastel-lavender-light);
  --accent-color: #aba0cb;
}

/* Dark Mode */
body.dark-mode {
  --desk-bg: radial-gradient(circle, #1a1a2e 0%, #16213e 100%);
  --page-color: #1e1e2e;
  --text-color: #e0dcd4;
  --primary-light: #2a2a3e;
  --grid-color: rgba(224, 220, 212, 0.09);
  --page-border: 1px solid rgba(224, 220, 212, 0.1);
  --notebook-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 5px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .journal-book {
  background: #16161e;
  border: 1px solid rgba(255,255,255,0.05);
}

body.dark-mode .journal-page {
  background-color: var(--page-color);
}

body.dark-mode .customizer-toolbar,
body.dark-mode .sync-btn {
  background: rgba(30, 30, 46, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-color);
}

body.dark-mode .text-btn {
  color: var(--text-color);
}

body.dark-mode .calendar-table td {
  border-color: rgba(224, 220, 212, 0.08);
}

body.dark-mode .calendar-table th {
  border-bottom-color: rgba(224, 220, 212, 0.15);
}

body.dark-mode .washi-tape {
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
}

body.dark-mode .daily-schedule-block,
body.dark-mode .daily-doodles-pad {
  background: rgba(30, 30, 46, 0.5);
  border-color: rgba(224, 220, 212, 0.08);
}

body.dark-mode .day-box-header {
  border-bottom-color: rgba(224, 220, 212, 0.05);
}

body.dark-mode .focus-box {
  border-color: rgba(224, 220, 212, 0.15);
}

body.dark-mode .bullet-num {
  color: var(--text-color);
}

body.dark-mode .schedule-time {
  color: var(--text-color);
}

body.dark-mode .sticker-drawer {
  background: rgba(30, 30, 46, 0.9);
  border-left-color: rgba(255,255,255,0.08);
}

body.dark-mode .drawer-toggle-btn {
  background: #2a2a3e;
  color: var(--text-color);
}

body.dark-mode .sticker-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .habit-dot {
  border-color: rgba(224, 220, 212, 0.3);
}

body.dark-mode .habit-tracker-table td {
  border-bottom-color: rgba(224, 220, 212, 0.08);
}

body.dark-mode .sync-modal {
  background: #1e1e2e;
  color: var(--text-color);
}

body.dark-mode .sync-modal-desc,
body.dark-mode .sync-modal-hint {
  color: var(--text-color);
  opacity: 0.6;
}

body.dark-mode .auth-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-color);
}

body.dark-mode .login-overlay {
  background: var(--desk-bg);
}

body.dark-mode .login-box {
  background: #1e1e2e;
  color: var(--text-color);
}

body.dark-mode .login-input {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-color);
}

body.dark-mode .tab-btn {
  background: #1a1a2e;
  border-left-color: rgba(255,255,255,0.05);
  color: var(--text-color);
}

body.dark-mode .mobile-bottom-nav {
  background: rgba(30, 30, 46, 0.95);
  border-top-color: rgba(255,255,255,0.08);
}

body.dark-mode .mobile-nav-label {
  color: var(--text-color);
}

body.dark-mode input,
body.dark-mode textarea {
  color: var(--text-color);
}

body.dark-mode .bottom-quote-block .cursive-quote {
  color: var(--text-color);
  opacity: 0.5;
}

body.dark-mode .section-title {
  color: var(--text-color);
}

body.dark-mode .day-box-textarea,
body.dark-mode .daily-notes-input,
body.dark-mode .daily-focus-input,
body.dark-mode .transparent-textarea {
  color: var(--text-color);
}

body.dark-mode .floral-divider-bar {
  color: rgba(224, 220, 212, 0.2);
}

body.dark-mode .date-navigator {
  background: rgba(30, 30, 46, 0.85);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .styled-select {
  background: rgba(30, 30, 46, 0.9);
  border-color: rgba(255,255,255,0.12);
  color: #f0ece4;
}

body.dark-mode .styled-select select {
  color: #f0ece4;
}

body.dark-mode .weekly-day-box {
  background: rgba(30, 30, 46, 0.45);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .daily-water-tracker,
body.dark-mode .daily-mood-tracker {
  background: rgba(30, 30, 46, 0.4);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .sync-status {
  background: rgba(30, 30, 46, 0.5);
  border-color: rgba(255,255,255,0.08);
  color: var(--text-color);
}

body.dark-mode .canvas-control-btn {
  background: rgba(30, 30, 46, 0.7);
  border-color: rgba(255,255,255,0.12);
  color: var(--text-color);
}

body.dark-mode .sticker-instructions {
  background: rgba(30, 30, 46, 0.4);
  color: var(--text-color);
}

body.dark-mode .nav-arrow-btn {
  color: var(--text-color);
}

body.dark-mode .nav-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode select {
  color: var(--text-color);
  background: rgba(30, 30, 46, 0.9);
}

body.dark-mode .weekly-reflection-box {
  background: rgba(30, 30, 46, 0.45);
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .sage-highlight {
  background-color: rgba(171, 191, 158, 0.2);
  border-bottom-color: var(--pastel-green);
}

body.dark-mode .blush-highlight {
  background-color: rgba(226, 184, 177, 0.2);
  border-bottom-color: var(--pastel-pink);
}

body.dark-mode .autumn-highlight {
  background-color: rgba(212, 163, 115, 0.2);
  border-bottom-color: var(--pastel-autumn);
}

body.dark-mode .lavender-highlight {
  background-color: rgba(199, 193, 219, 0.2);
  border-bottom-color: var(--pastel-lavender);
}

body.dark-mode .day-num-span {
  opacity: 0.9;
}

body.dark-mode .section-title {
  border-bottom-color: rgba(224, 220, 212, 0.15);
}

body.dark-mode ::placeholder {
  color: rgba(224, 220, 212, 0.35);
}

body.dark-mode .text-btn.danger {
  color: #e57373;
}

body.dark-mode .text-btn {
  color: var(--text-color);
  opacity: 0.8;
}

body.dark-mode .text-btn:hover {
  opacity: 1;
}

body.dark-mode .date-display-text {
  color: #f0ece4;
}

body.dark-mode .toolbar-item {
  color: #f0ece4;
}

body.dark-mode .logo-title {
  color: #f0ece4;
}

/* Font Classes */
body.font-cursive {
  font-family: var(--font-cursive-family);
  font-size: 22px;
}
body.font-typewriter {
  font-family: var(--font-typewriter-family);
  font-size: 18px;
}
body.font-minimalist {
  font-family: var(--font-minimalist-family);
  font-size: 18px;
}
body.font-chubby {
  font-family: var(--font-chubby-family);
  font-size: 18px;
}

/* Font Inheritance Utility */
.font-inherit {
  font-family: inherit;
  font-size: inherit;
  color: var(--text-color);
}

/* --------------------------------------------------------------------------
   Reset & Base Styles
   -------------------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text-color);
  background: var(--desk-bg);
  background-attachment: fixed;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--desk-wood-grain);
  pointer-events: none;
  opacity: 0.25;
  z-index: 0;
}

/* --------------------------------------------------------------------------
   Customizer Toolbar (Top)
   -------------------------------------------------------------------------- */
.customizer-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  width: 95%;
  max-width: 1400px;
  margin: 5px auto 5px auto;
  padding: 6px 20px;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.logo-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

.date-navigator {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 12px;
  border-radius: 20px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.nav-arrow-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-color);
  transition: background 0.2s, transform 0.1s;
}

.nav-arrow-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.nav-arrow-btn:active {
  transform: scale(0.9);
}

.nav-arrow-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.date-display-text {
  font-weight: 600;
  min-width: 190px;
  text-align: center;
  font-size: 0.95rem;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.toolbar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}

.styled-select {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(74, 68, 60, 0.2);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-color);
  outline: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s;
}

.styled-select:focus {
  border-color: var(--primary-color);
}

.palette-picker {
  display: flex;
  gap: 6px;
}

.palette-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: transform 0.2s, border-color 0.2s;
}

.palette-btn:hover {
  transform: scale(1.15);
}

.palette-btn.active {
  border-color: var(--text-color);
  transform: scale(1.1);
}

.palette-btn.sage { background-color: var(--pastel-green); }
.palette-btn.blush { background-color: var(--pastel-pink); }
.palette-btn.autumn { background-color: var(--pastel-autumn); }
.palette-btn.lavender { background-color: var(--pastel-lavender); }

.dark-mode-btn {
  background: none;
  border: 1px solid rgba(74, 68, 60, 0.15);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
  margin-left: 4px;
}

.dark-mode-btn:hover {
  background: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

body.dark-mode .dark-mode-btn {
  border-color: rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.1);
}

body.dark-mode .dark-mode-btn:hover {
  background: rgba(255,255,255,0.2);
}

.text-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}

.text-btn.danger {
  color: #c97d72;
}

.text-btn.danger:hover {
  background: rgba(201, 125, 114, 0.1);
}

/* --------------------------------------------------------------------------
   Desk environment
   -------------------------------------------------------------------------- */
.desk-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100vw;
  min-height: 100vh;
  padding-bottom: 40px;
  z-index: 1;
}

.workspace {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1100px;
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Notebook Layout
   -------------------------------------------------------------------------- */
.notebook-wrapper {
  display: flex;
  position: relative;
  margin-right: 50px; /* space for right sticker drawer handle */
}

/* Side Divider Tabs (Index markers) */
.notebook-tabs {
  position: absolute;
  left: -48px;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2;
}

.tab-btn {
  background: #f0e9df;
  border: var(--page-border);
  border-right: none;
  padding: 12px 10px;
  width: 48px;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: -3px 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s, background-color 0.2s, width 0.2s;
}

.tab-btn:hover {
  background: #e8ded1;
  width: 52px;
  transform: translateX(-4px);
}

.tab-btn.active {
  background: var(--page-color);
  width: 54px;
  transform: translateX(-6px);
  z-index: 3;
  border-left: 3px solid var(--primary-color);
  box-shadow: -5px 2px 10px rgba(50, 40, 30, 0.1);
}

.tab-icon {
  font-size: 1.5rem;
}

.tab-label {
  font-size: 0.8rem;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-color);
}

/* The Open Book container */
.journal-book {
  position: relative;
  display: flex;
  background: #fdfcf9;
  border-radius: 20px;
  box-shadow: var(--notebook-shadow);
  padding: 10px;
  border: 1px solid rgba(0,0,0,0.08);
  width: 94vw;
  max-width: 1400px;
  height: 88vh;
  min-height: 600px;
  transition: transform 0.3s;
}

/* Journal Page (Left & Right) */
.journal-page {
  flex: 1;
  background-color: var(--page-color);
  height: 100%;
  position: relative;
  padding: 30px 35px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 1;
}

.left-page {
  border-radius: 15px 0 0 15px;
  border-right: none;
  padding-right: 35px;
  box-shadow: inset -10px 0 20px rgba(0, 0, 0, 0.03);
}

.right-page {
  border-radius: 0 15px 15px 0;
  border-left: none;
  padding-left: 35px;
  box-shadow: inset 10px 0 20px rgba(0, 0, 0, 0.03);
}

/* Grid Pattern Paper */
.dot-grid {
  background-image: radial-gradient(var(--grid-color) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}

/* --------------------------------------------------------------------------
   Spiral spine & binding
   -------------------------------------------------------------------------- */
.spiral-spine {
  position: absolute;
  left: 50%;
  top: 15px;
  bottom: 15px;
  width: 20px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}

.coil-ring {
  width: 32px;
  height: 12px;
  background: var(--ring-gradient);
  border-radius: 6px;
  box-shadow: var(--ring-shadow);
  position: relative;
}

.coil-ring::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  top: 3px;
  left: -8px;
}

.coil-ring::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  top: 3px;
  right: -8px;
}

/* --------------------------------------------------------------------------
   Sticker Overlay (Top layer over both pages)
   -------------------------------------------------------------------------- */
.sticker-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  pointer-events: none;
  z-index: 100;
}

.placed-sticker {
  position: absolute;
  cursor: move;
  pointer-events: auto;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

.placed-sticker:hover {
  transform: scale(1.05);
}

.placed-sticker.dragging {
  opacity: 0.8;
  transform: scale(1.1);
}

.placed-sticker .delete-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e2b8b1;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid #fff;
  cursor: pointer;
  pointer-events: auto;
}

.placed-sticker:hover .delete-btn {
  display: flex;
}

.resize-handle {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: rgba(74, 68, 60, 0.3);
  color: #fff;
  border-radius: 3px;
  font-size: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: nwse-resize;
  pointer-events: auto;
  line-height: 1;
}

.placed-sticker:hover .resize-handle {
  display: flex;
}

/* --------------------------------------------------------------------------
   Washi Tape Designs
   -------------------------------------------------------------------------- */
.washi-tape {
  position: relative;
  display: inline-block;
  padding: 4px 18px;
  color: var(--text-color);
  font-weight: 700;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  box-shadow: 0 2px 5px rgba(74, 68, 60, 0.08);
  transform: rotate(-1.5deg);
  border-left: 2px dashed rgba(255,255,255,0.3);
  border-right: 2px dashed rgba(255,255,255,0.3);
  opacity: 0.85;
}

/* Jagged tape ends */
.washi-tape::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: repeating-linear-gradient(45deg, transparent, transparent 2px, rgba(0,0,0,0.05) 2px, rgba(0,0,0,0.05) 4px);
}

.washi-tape.pink-tape {
  background-color: var(--pastel-pink);
}

.washi-tape.green-tape {
  background-color: var(--pastel-green);
}

.washi-tape.autumn-tape {
  background-color: var(--pastel-autumn);
}

.washi-tape.lavender-tape {
  background-color: var(--pastel-lavender);
}

.washi-tape.angle-left {
  transform: rotate(-2.5deg);
}

.washi-tape.angle-right {
  transform: rotate(2deg);
}

.washi-tape.tape-medium {
  padding: 6px 30px;
}

.washi-tape.tape-long {
  width: 100%;
  text-align: center;
  transform: rotate(0.5deg);
}

/* --------------------------------------------------------------------------
   Floral SVG Doodles
   -------------------------------------------------------------------------- */
.floral-doodle {
  position: absolute;
  color: rgba(74, 68, 60, 0.35);
  pointer-events: none;
  z-index: 0;
}

.floral-doodle.corner-tl {
  top: 15px;
  left: 15px;
  width: 70px;
  height: 70px;
}

.floral-doodle.corner-br {
  bottom: 10px;
  right: 15px;
  width: 60px;
  height: 60px;
}

.floral-svg {
  width: 100%;
  height: 100%;
  stroke-dasharray: 200;
  stroke-dashoffset: 0;
}

/* Divider SVG line */
.floral-divider-bar {
  margin: 15px 0 5px 0;
  color: rgba(74, 68, 60, 0.2);
  width: 100%;
}

/* --------------------------------------------------------------------------
   Inputs & Textareas Common
   -------------------------------------------------------------------------- */
input[type="text"], textarea {
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-color);
  resize: none;
}

.transparent-textarea {
  width: 100%;
  background: transparent;
  line-height: 1.5;
}

/* Bullet list styling */
.bullet-list-fillable {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.bullet-row {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 0;
}

.bullet-num {
  font-weight: bold;
  opacity: 0.6;
  width: 18px;
}

.list-input {
  flex: 1;
  border-bottom: 1px dotted rgba(74, 68, 60, 0.15) !important;
  padding: 3px 5px;
  transition: border-bottom-color 0.2s;
  font-size: 0.95rem;
}

.list-input:focus {
  border-bottom-color: var(--primary-color) !important;
}

/* Custom Dainty Checkbox */
.dainty-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(74, 68, 60, 0.4);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, border-color 0.2s;
  background-color: transparent;
  flex-shrink: 0;
}

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

.dainty-checkbox:checked::after {
  content: "✓";
  font-size: 10px;
  color: #fff;
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   MONTHLY VIEW DETAILS
   -------------------------------------------------------------------------- */
.page-header-container {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-left: 20px;
}

/* Calendar styling */
.calendar-wrapper {
  margin-top: 10px;
  z-index: 1;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-table th {
  text-align: center;
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 1px solid rgba(74, 68, 60, 0.15);
  font-size: 1rem;
  opacity: 0.7;
}

.calendar-table td {
  width: 14.28%;
  height: 75px;
  border: 1px solid rgba(74, 68, 60, 0.08);
  vertical-align: top;
  padding: 5px;
  position: relative;
}

.calendar-table td.empty-cell {
  background-color: rgba(0,0,0,0.01);
}

.calendar-table td.today-cell {
  background-color: var(--primary-light);
  border: 1px solid var(--primary-color);
}

.cell-day-num {
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0.75;
  display: inline-block;
  margin-bottom: 2px;
}

.cell-textarea {
  width: 100%;
  height: calc(100% - 15px);
  font-size: 0.7rem;
  line-height: 1.1;
  padding: 1px;
  overflow: hidden;
}

/* Quote Block */
.bottom-quote-block {
  margin-top: auto;
  text-align: center;
  padding-bottom: 10px;
}

.cursive-quote {
  font-size: 1.6rem;
  font-style: italic;
  opacity: 0.8;
}

.sparkles {
  font-size: 0.9rem;
  letter-spacing: 5px;
  margin-top: 3px;
}

/* Right Page */
.focus-box {
  border: 1px dotted rgba(74, 68, 60, 0.15);
  padding: 10px;
  height: 75px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 1rem;
}

.wants-needs-container {
  display: flex;
  gap: 20px;
  margin-top: 15px;
}

.wants-column, .needs-column {
  flex: 1;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(74, 68, 60, 0.1);
  padding-bottom: 2px;
  margin-bottom: 5px;
}

.text-green { color: var(--pastel-green); }
.text-blush { color: var(--pastel-pink); }
.text-autumn { color: var(--pastel-autumn); }
.text-lavender { color: var(--pastel-lavender); }

.goals-habit-container {
  display: flex;
  gap: 20px;
  margin-top: 10px;
}

.goals-block {
  width: 40%;
}

.habit-block {
  width: 60%;
}

.habit-tracker-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.habit-tracker-table th {
  font-size: 0.9rem;
  font-weight: 700;
  padding-bottom: 4px;
}

.habit-tracker-table td {
  padding: 6px 3px;
  text-align: center;
  border-bottom: 1px dotted rgba(74, 68, 60, 0.08);
}

.habit-name-input {
  font-size: 0.9rem;
  width: 75px;
  border-bottom: 1px solid transparent !important;
}

.habit-name-input:focus {
  border-bottom-color: rgba(74, 68, 60, 0.2) !important;
}

/* Dainty habit circles */
.habit-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid rgba(74, 68, 60, 0.35);
  border-radius: 50%;
  cursor: pointer;
  background-color: transparent;
  transition: background-color 0.2s, transform 0.1s;
}

.habit-dot:hover {
  transform: scale(1.2);
}

.habit-dot.completed {
  background-color: var(--primary-color);
  border-color: var(--accent-color);
}

/* --------------------------------------------------------------------------
   WEEKLY VIEW DETAILS
   -------------------------------------------------------------------------- */
.weekly-header-block {
  margin-bottom: 20px;
}

.weekly-days-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  height: calc(100% - 70px);
}

.weekly-day-box {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(74, 68, 60, 0.08);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.day-box-header {
  font-size: 0.95rem;
  font-weight: 700;
  padding: 6px 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(74, 68, 60, 0.05);
}

.blush-highlight { background-color: var(--pastel-pink-light); border-bottom: 2px solid var(--pastel-pink); }
.sage-highlight { background-color: var(--pastel-green-light); border-bottom: 2px solid var(--pastel-green); }
.autumn-highlight { background-color: var(--pastel-autumn-light); border-bottom: 2px solid var(--pastel-autumn); }
.lavender-highlight { background-color: var(--pastel-lavender-light); border-bottom: 2px solid var(--pastel-lavender); }

.day-num-span {
  font-size: 0.9rem;
  opacity: 0.8;
}

.day-box-textarea {
  flex: 1;
  padding: 10px;
  line-height: 1.5;
  font-size: 0.95rem;
}

.reflection-box {
  grid-column: span 2;
  height: 100%;
}

.weekly-footer-decor {
  margin-top: auto;
  color: rgba(74, 68, 60, 0.2);
}

/* --------------------------------------------------------------------------
   DAILY VIEW DETAILS
   -------------------------------------------------------------------------- */
.daily-header-block {
  margin-bottom: 15px;
}

.today-focus-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.mini-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.daily-focus-input {
  flex: 1;
  border-bottom: 1px dotted rgba(74, 68, 60, 0.2) !important;
  font-size: 1rem;
}

.daily-schedule-block {
  flex: 1;
  border: 1px solid rgba(74, 68, 60, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  padding: 14px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-rows {
  overflow-y: auto;
  flex: 1;
  margin-top: 5px;
  padding-right: 5px;
}

.schedule-row {
  display: flex;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dotted rgba(74, 68, 60, 0.06);
}

.schedule-time {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.6;
  width: 65px;
  flex-shrink: 0;
}

.schedule-input {
  flex: 1;
  font-size: 0.8rem;
  padding-left: 8px;
}

.daily-trackers-row {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.daily-water-tracker, .daily-mood-tracker {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(74, 68, 60, 0.06);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.tracker-title {
  font-size: 0.95rem;
  font-weight: 700;
}

.water-cups, .mood-emojis {
  display: flex;
  gap: 5px;
}

.water-cup {
  cursor: pointer;
  opacity: 0.25;
  filter: grayscale(1);
  transition: opacity 0.2s, transform 0.1s, filter 0.2s;
  font-size: 1.3rem;
}

.water-cup:hover {
  transform: scale(1.2);
}

.water-cup.filled {
  opacity: 1;
  filter: grayscale(0);
}

.mood-face {
  cursor: pointer;
  opacity: 0.35;
  font-size: 1.4rem;
  transition: opacity 0.2s, transform 0.1s, filter 0.2s;
  border-radius: 50%;
}

.mood-face:hover {
  transform: scale(1.2);
  opacity: 0.8;
}

.mood-face.active {
  opacity: 1;
  transform: scale(1.25);
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  background-color: var(--primary-light);
}

/* Daily Right Page */
.daily-gratitude-block {
  margin-bottom: 15px;
}

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

.gratitude-row {
  font-weight: bold;
  font-size: 0.95rem;
}

.daily-notes-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

.daily-notes-input {
  flex: 1;
  border: 1px dotted rgba(74, 68, 60, 0.15);
  border-radius: 8px;
  padding: 12px;
  margin-top: 5px;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Doodle Sketch Canvas */
.daily-doodles-pad {
  height: 220px;
  border: 1px solid rgba(74, 68, 60, 0.08);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
}

.doodle-pad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
}

.canvas-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.canvas-control-btn {
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(74,68,60,0.15);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  font-weight: bold;
}

.canvas-brush-colors {
  display: flex;
  gap: 4px;
}

.brush-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.1s;
}

.brush-color:hover, .brush-color.active {
  transform: scale(1.25);
  border-color: #4a443c;
}

.brush-color.black { background-color: #4a443c; }
.brush-color.pink { background-color: var(--pastel-pink); }
.brush-color.green { background-color: var(--pastel-green); }
.brush-color.autumn { background-color: var(--pastel-autumn); }
.brush-color.lavender { background-color: var(--pastel-lavender); }

.canvas-wrapper {
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  background-color: #fff;
  border: 1px solid rgba(74,68,60,0.05);
}

#doodle-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

/* --------------------------------------------------------------------------
   Sticker Drawer (Right Side)
   -------------------------------------------------------------------------- */
.sticker-drawer {
  position: fixed;
  right: -310px; /* Hidden state */
  top: 50%;
  transform: translateY(-50%);
  height: 80vh;
  width: 310px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: -5px 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 15px 0 0 15px;
  z-index: 500;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
}

.sticker-drawer.collapsed {
  right: -310px;
}

.sticker-drawer:not(.collapsed) {
  right: 0;
}

.drawer-toggle-btn {
  position: absolute;
  left: -42px;
  top: 120px;
  background: #f0e9df;
  border: var(--page-border);
  border-right: none;
  padding: 15px 8px;
  border-radius: 10px 0 0 10px;
  cursor: pointer;
  box-shadow: -4px 4px 8px rgba(0,0,0,0.06);
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, left 0.2s;
}

.drawer-toggle-btn:hover {
  background: #e8ded1;
}

.toggle-text {
  writing-mode: vertical-rl;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.drawer-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.drawer-title {
  font-size: 1.15rem;
  margin-bottom: 5px;
  border-bottom: 2px dashed rgba(74, 68, 60, 0.15);
  padding-bottom: 5px;
}

.drawer-subtitle {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-bottom: 15px;
  line-height: 1.3;
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.sticker-item {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(74, 68, 60, 0.08);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background-color 0.2s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.sticker-item:hover {
  transform: scale(1.1);
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0,0,0,0.06);
}

.sticker-svg {
  width: 80%;
  height: 80%;
  color: var(--text-color);
}

.sticker-emoji {
  font-size: 1.8rem;
}

.text-sticker {
  grid-column: span 3;
  aspect-ratio: auto;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transform: rotate(-1deg);
}

.sticker-text-input {
  background: transparent;
  border: none;
  outline: none;
  font-weight: 700;
  font-size: inherit;
  color: inherit;
  width: 100%;
  text-align: center;
  padding: 0;
}

.sticker-text-input:focus {
  border-bottom: 1px dashed currentColor;
}

.snippet-pink { background-color: var(--pastel-pink); }
.snippet-sage { background-color: var(--pastel-green); }

.label-selfcare {
  background-color: var(--pastel-pink-light);
  border: 1.5px dashed var(--pastel-pink);
  color: #a46d65;
}

.label-goals {
  background-color: var(--pastel-autumn-light);
  border: 1.5px dashed var(--pastel-autumn);
  color: #9f6534;
}

.label-focus {
  background-color: var(--pastel-green-light);
  border: 1.5px dashed var(--pastel-green);
  color: #5d7550;
}

.label-cozy {
  background-color: var(--pastel-lavender-light);
  border: 1.5px dashed var(--pastel-lavender);
  color: #6a5a9e;
}

.sticker-text-span {
  font-family: var(--font-cursive-family);
}

.sticker-instructions {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.4);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(74,68,60,0.05);
}

.sticker-instructions h4 {
  font-size: 0.75rem;
  margin-bottom: 5px;
}

.sticker-instructions ul {
  font-size: 0.7rem;
  padding-left: 12px;
  line-height: 1.4;
  opacity: 0.8;
}

/* Placed sticker types inside the journal page */
.placed-emoji-sticker {
  font-size: 2.2rem;
}

.placed-svg-sticker {
  width: 60px;
  height: 60px;
}

.placed-text-sticker {
  padding: 6px 12px;
  font-weight: bold;
  border-radius: 4px;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow: 0 3px 6px rgba(0,0,0,0.06);
}

.placed-sticker-input {
  background: transparent;
  border: none;
  outline: none;
  font-weight: bold;
  font-size: inherit;
  font-family: inherit;
  color: inherit;
  width: 100%;
  padding: 0;
  text-align: center;
}

.placed-sticker-input:focus {
  border-bottom: 1px dashed currentColor;
  cursor: text;
}

/* --------------------------------------------------------------------------
   Scrollbar & Utility Styles
   -------------------------------------------------------------------------- */
.scrollbar-dainty::-webkit-scrollbar {
  width: 4px;
}
.scrollbar-dainty::-webkit-scrollbar-track {
  background: transparent;
}
.scrollbar-dainty::-webkit-scrollbar-thumb {
  background: rgba(74, 68, 60, 0.15);
  border-radius: 2px;
}
.scrollbar-dainty::-webkit-scrollbar-thumb:hover {
  background: rgba(74, 68, 60, 0.3);
}

/* Views display controls */
.journal-view {
  display: none;
  width: 100%;
  height: 100%;
}

.journal-view.active-view {
  display: flex;
}

/* --------------------------------------------------------------------------
   Page Flip Animation
   -------------------------------------------------------------------------- */
.journal-book {
  perspective: 1200px;
  transform-style: preserve-3d;
}

/* Flip forward: right page lifts and flips left */
@keyframes pageFlipForward {
  0% {
    transform: rotateY(0deg) scale(1);
    box-shadow: var(--notebook-shadow);
  }
  25% {
    transform: rotateY(-12deg) scale(0.97);
    box-shadow: 15px 8px 30px rgba(50, 40, 30, 0.25), 5px 3px 10px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: rotateY(-6deg) scale(0.985);
    box-shadow: 8px 4px 20px rgba(50, 40, 30, 0.18), 3px 2px 8px rgba(0, 0, 0, 0.08);
  }
  100% {
    transform: rotateY(0deg) scale(1);
    box-shadow: var(--notebook-shadow);
  }
}

/* Flip backward: left page lifts and flips right */
@keyframes pageFlipBackward {
  0% {
    transform: rotateY(0deg) scale(1);
    box-shadow: var(--notebook-shadow);
  }
  25% {
    transform: rotateY(12deg) scale(0.97);
    box-shadow: -15px 8px 30px rgba(50, 40, 30, 0.25), -5px 3px 10px rgba(0, 0, 0, 0.1);
  }
  50% {
    transform: rotateY(6deg) scale(0.985);
    box-shadow: -8px 4px 20px rgba(50, 40, 30, 0.18), -3px 2px 8px rgba(0, 0, 0, 0.08);
  }
  100% {
    transform: rotateY(0deg) scale(1);
    box-shadow: var(--notebook-shadow);
  }
}

/* Page edge shadow during flip */
@keyframes pageEdgeShadow {
  0% { opacity: 0; }
  25% { opacity: 1; }
  50% { opacity: 0.6; }
  100% { opacity: 0; }
}

.journal-book.flip-forward {
  animation: pageFlipForward 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.journal-book.flip-forward::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to left, rgba(50, 40, 30, 0.08) 0%, transparent 40%);
  border-radius: 20px;
  pointer-events: none;
  z-index: 200;
  animation: pageEdgeShadow 0.55s ease forwards;
}

.journal-book.flip-backward {
  animation: pageFlipBackward 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.journal-book.flip-backward::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(50, 40, 30, 0.08) 0%, transparent 40%);
  border-radius: 20px;
  pointer-events: none;
  z-index: 200;
  animation: pageEdgeShadow 0.55s ease forwards;
}

/* Mobile flip: single card flip */
@media (max-width: 640px) {
  @keyframes pageFlipForward {
    0% {
      transform: rotateY(0deg) scale(1);
    }
    30% {
      transform: rotateY(-18deg) scale(0.95);
      box-shadow: 10px 5px 25px rgba(50, 40, 30, 0.2);
    }
    60% {
      transform: rotateY(-5deg) scale(0.98);
    }
    100% {
      transform: rotateY(0deg) scale(1);
    }
  }

  @keyframes pageFlipBackward {
    0% {
      transform: rotateY(0deg) scale(1);
    }
    30% {
      transform: rotateY(18deg) scale(0.95);
      box-shadow: -10px 5px 25px rgba(50, 40, 30, 0.2);
    }
    60% {
      transform: rotateY(5deg) scale(0.98);
    }
    100% {
      transform: rotateY(0deg) scale(1);
    }
  }
}

/* --------------------------------------------------------------------------
   Decorative Accessories (Around the book on the table)
   -------------------------------------------------------------------------- */
.stationery-accessory {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  opacity: 0.75;
}

.tape-roll {
  right: 15px;
  top: 15px;
  width: 50px;
  height: 50px;
  background-color: var(--pastel-pink);
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), inset 0 0 15px rgba(0,0,0,0.2);
  border: 1px solid rgba(0,0,0,0.1);
}

.tape-roll::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  background-color: #c4b9aa; /* desk color inside */
  border-radius: 50%;
  top: 14px; left: 14px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.15), 0 1px 1px #fff;
}

.pen-micron {
  right: 10px;
  top: 120px;
  width: 10px;
  height: 180px;
  background: #fdfdfd;
  border-radius: 5px;
  border: 1.5px solid #222;
  transform: rotate(5deg);
  box-shadow: 2px 4px 8px rgba(0,0,0,0.15);
}

.pen-micron::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 40px;
  background: #111;
  border-radius: 5px 5px 0 0;
  top: -2px; left: -1.5px;
}

/* Floating dry petals */
.petal-dry-1 {
  left: 20px;
  bottom: 20px;
  width: 18px;
  height: 14px;
  background-color: #c07d84;
  border-radius: 50% 0 50% 50%;
  transform: rotate(45deg);
  filter: blur(0.5px);
  opacity: 0.6;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.petal-dry-2 {
  left: 50px;
  bottom: 12px;
  width: 14px;
  height: 10px;
  background-color: #a46168;
  border-radius: 50% 0 50% 50%;
  transform: rotate(-15deg);
  filter: blur(0.5px);
  opacity: 0.5;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.petal-dry-3 {
  right: 40px;
  bottom: 15px;
  width: 16px;
  height: 12px;
  background-color: #b9767d;
  border-radius: 50% 0 50% 50%;
  transform: rotate(115deg);
  filter: blur(0.5px);
  opacity: 0.65;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* --------------------------------------------------------------------------
   Login Screen
   -------------------------------------------------------------------------- */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--desk-bg);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: #fdfcf9;
  border-radius: 20px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 360px;
  width: 90%;
}

.login-flower {
  font-size: 3rem;
  margin-bottom: 10px;
}

.login-title {
  font-size: 1.4rem;
  color: var(--text-color);
  margin-bottom: 5px;
}

.login-subtitle {
  font-size: 0.85rem;
  opacity: 0.6;
  margin-bottom: 20px;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(74, 68, 60, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  text-align: center;
  margin-bottom: 12px;
}

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

.login-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: var(--primary-color);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.login-btn:hover {
  opacity: 0.9;
}

.login-error {
  color: #c97d72;
  font-size: 0.8rem;
  margin-top: 8px;
  min-height: 1em;
}

/* --------------------------------------------------------------------------
   Sync UI
   -------------------------------------------------------------------------- */
.sync-toolbar {
  gap: 6px;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background 0.3s;
}

.sync-dot.offline { background: #ccc; }
.sync-dot.syncing { background: #e9c46a; animation: pulse 1s infinite; }
.sync-dot.synced { background: #abbf9e; }
.sync-dot.error { background: #c97d72; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.sync-label {
  font-size: 0.7rem;
  opacity: 0.7;
}

.sync-btn {
  font-size: 0.75rem;
  padding: 4px 8px;
  border: 1px solid rgba(74, 68, 60, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.5);
}

.sync-btn:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Sync Modal */
.sync-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.sync-modal-overlay.visible {
  display: flex;
}

.sync-modal {
  background: #fdfcf9;
  border-radius: 20px;
  padding: 30px;
  max-width: 420px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 20001;
}

.sync-modal-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.sync-modal-desc {
  font-size: 0.85rem;
  opacity: 0.7;
  margin-bottom: 20px;
  line-height: 1.4;
}

.sync-modal-section {
  margin-bottom: 16px;
}

.sync-modal-section h4 {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.sync-modal-hint {
  font-size: 0.75rem;
  opacity: 0.6;
  margin-bottom: 8px;
  line-height: 1.3;
}

.sync-modal-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(74, 68, 60, 0.15);
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.2s, transform 0.1s;
}

.sync-modal-btn:active {
  transform: scale(0.97);
}

.sync-modal-btn.primary {
  background: var(--primary-color);
  color: #fff;
  border: none;
}

.sync-modal-btn.primary:hover {
  opacity: 0.9;
}

.sync-modal-btn.small {
  padding: 4px 10px;
  font-size: 0.75rem;
}

.sync-modal-divider {
  text-align: center;
  margin: 16px 0;
  position: relative;
}

.sync-modal-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(74, 68, 60, 0.1);
}

.sync-modal-divider span {
  background: #fdfcf9;
  padding: 0 12px;
  position: relative;
  font-size: 0.8rem;
  opacity: 0.5;
}

.sync-modal-error {
  font-size: 0.75rem;
  color: #c97d72;
  margin-top: 6px;
  min-height: 1em;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-input {
  padding: 10px 14px;
  border: 1px solid rgba(74, 68, 60, 0.15);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  font-family: inherit;
}

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

.auth-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

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

.sync-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.4;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: opacity 0.2s, background 0.2s;
}

.sync-modal-close:hover {
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.05);
}

/* --------------------------------------------------------------------------
   Mobile Bottom Nav (hidden on desktop)
   -------------------------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
}

/* Sticker Drawer Backdrop (mobile) */
.sticker-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 7999;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.sticker-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   Responsive Rules
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .journal-book {
    width: 92vw;
    height: 75vh;
    min-height: 450px;
  }
  .calendar-table td {
    height: 50px;
  }
}

@media (max-width: 820px) {
  .journal-book {
    width: 94vw;
    height: 75vh;
    min-height: 420px;
  }
  .calendar-table td {
    height: 42px;
  }
  .wants-needs-container {
    flex-direction: column;
    gap: 10px;
  }
  .goals-habit-container {
    flex-direction: column;
    gap: 10px;
  }
  .goals-block, .habit-block {
    width: 100%;
  }
  .pen-micron, .tape-roll {
    display: none;
  }
}

/* Mobile: Single page layout instead of spread */
@media (max-width: 640px) {
  body {
    padding: 0;
    align-items: flex-start;
    overflow-x: hidden;
  }

  body::before {
    display: none;
  }

  /* ---- Mobile Bottom Nav ---- */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9000;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(74, 68, 60, 0.1);
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.06);
  }

  .mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 10px;
    transition: background 0.2s, transform 0.1s;
    color: var(--text-color);
    opacity: 0.55;
  }

  .mobile-nav-btn.active {
    opacity: 1;
    background: var(--primary-light);
  }

  .mobile-nav-btn:active {
    transform: scale(0.92);
  }

  .mobile-nav-icon {
    font-size: 1.25rem;
  }

  .mobile-nav-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  /* ---- Hide desktop bottom nav tabs (kept for desktop) ---- */
  .notebook-tabs {
    display: none;
  }

  /* ---- Desk Container ---- */
  .desk-container {
    padding-bottom: 70px;
    padding-top: 0;
  }

  /* ---- Compact Toolbar ---- */
  .customizer-toolbar {
    width: 100%;
    border-radius: 0;
    padding: 8px 12px;
    gap: 6px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    border: none;
    border-bottom: 1px solid rgba(74, 68, 60, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin: 0;
    justify-content: center;
  }

  .toolbar-left {
    width: 100%;
    text-align: center;
  }

  .logo-title {
    font-size: 1rem;
  }

  .toolbar-center {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .date-navigator {
    padding: 4px 8px;
    gap: 4px;
  }

  .date-display-text {
    font-size: 0.8rem;
    min-width: 140px;
  }

  .nav-arrow-btn {
    width: 30px;
    height: 30px;
  }

  .toolbar-right {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .toolbar-item {
    font-size: 0.75rem;
    gap: 4px;
  }

  .styled-select {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  .palette-picker {
    gap: 5px;
  }

  .palette-btn {
    width: 22px;
    height: 22px;
  }

  .text-btn {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  /* ---- Workspace & Notebook ---- */
  .workspace {
    margin-top: 0;
    padding: 8px;
  }

  .notebook-wrapper {
    flex-direction: column;
    width: 100%;
    margin-right: 0;
  }

  .journal-book {
    width: 100%;
    height: auto;
    min-height: auto;
    flex-direction: column;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }

  .spiral-spine {
    display: none;
  }

  .journal-page {
    border-radius: 14px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 12px;
    height: auto;
    min-height: auto;
    padding: 16px;
  }

  .left-page {
    border-radius: 14px !important;
    padding-right: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  }

  .right-page {
    border-radius: 14px !important;
    padding-left: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
  }

  .sticker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  /* ---- Sticker Drawer Backdrop (mobile) ---- */
  .sticker-backdrop {
    display: block;
  }

  /* ---- Sticker Drawer → Bottom Sheet ---- */
  .sticker-drawer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    width: 100%;
    height: 70vh;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid rgba(74, 68, 60, 0.1);
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.12);
    z-index: 8000;
    transition: bottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
  }

  .sticker-drawer.collapsed {
    bottom: -75vh;
  }

  .sticker-drawer:not(.collapsed) {
    bottom: 0;
  }

  .drawer-toggle-btn {
    display: none;
  }

  .drawer-content {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    flex: 1;
    overflow-y: auto;
  }

  .sticker-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .text-sticker {
    grid-column: span 4;
  }

  /* ---- Hide Decorative Accessories on Mobile ---- */
  .stationery-accessory {
    display: none;
  }

  /* ---- Monthly View ---- */
  .page-header-container {
    padding-left: 0;
    margin-bottom: 12px;
  }

  .washi-tape {
    font-size: 0.8rem;
    padding: 4px 12px;
  }

  .calendar-table th {
    font-size: 0.75rem;
    padding: 4px 0;
  }

  .calendar-table td {
    height: 52px;
    padding: 3px;
  }

  .cell-day-num {
    font-size: 0.75rem;
  }

  .cell-textarea {
    font-size: 0.65rem;
  }

  .cursive-quote {
    font-size: 1.2rem;
  }

  .focus-box {
    height: 50px;
    font-size: 0.8rem;
    margin-top: 10px;
  }

  .wants-needs-container {
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
  }

  .section-title {
    font-size: 0.85rem;
  }

  .goals-habit-container {
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
  }

  .goals-block, .habit-block {
    width: 100%;
  }

  .habit-tracker-table th {
    font-size: 0.65rem;
    padding-bottom: 2px;
  }

  .habit-tracker-table td {
    padding: 4px 1px;
  }

  .habit-name-input {
    width: 50px;
    font-size: 0.65rem;
  }

  .habit-dot {
    width: 14px;
    height: 14px;
  }

  .bullet-row {
    gap: 4px;
  }

  .list-input {
    font-size: 0.85rem;
    padding: 3px 4px;
  }

  .dainty-checkbox {
    width: 20px;
    height: 20px;
  }

  /* ---- Weekly View ---- */
  .weekly-header-block {
    margin-bottom: 12px;
  }

  .washi-tape.tape-medium {
    padding: 5px 16px;
    font-size: 0.75rem;
  }

  .weekly-days-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    height: auto;
  }

  .weekly-day-box {
    min-height: 80px;
  }

  .day-box-header {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .day-box-textarea {
    padding: 8px;
    font-size: 0.8rem;
    min-height: 60px;
  }

  .reflection-box {
    grid-column: span 1;
  }

  /* ---- Daily View ---- */
  .daily-header-block {
    margin-bottom: 10px;
  }

  .washi-tape.lavender-tape.tape-medium {
    padding: 5px 16px;
    font-size: 0.8rem;
  }

  .today-focus-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
  }

  .mini-title {
    font-size: 0.8rem;
  }

  .daily-focus-input {
    font-size: 0.85rem;
    width: 100%;
  }

  .daily-schedule-block {
    margin-bottom: 12px;
    padding: 8px;
  }

  .schedule-row {
    padding: 5px 0;
  }

  .schedule-time {
    font-size: 0.7rem;
    width: 55px;
  }

  .schedule-input {
    font-size: 0.8rem;
    padding: 2px 6px;
  }

  .daily-trackers-row {
    flex-direction: column;
    gap: 8px;
  }

  .daily-water-tracker, .daily-mood-tracker {
    padding: 8px 10px;
  }

  .water-cup {
    font-size: 1.3rem;
    padding: 2px;
  }

  .mood-face {
    font-size: 1.4rem;
    padding: 2px;
  }

  .tracker-title {
    font-size: 0.75rem;
  }

  .daily-gratitude-block {
    margin-bottom: 12px;
  }

  .gratitude-row {
    font-size: 0.8rem;
  }

  .daily-notes-block {
    margin-bottom: 12px;
  }

  .daily-notes-input {
    font-size: 0.8rem;
    min-height: 120px;
  }

  /* ---- Doodle Canvas ---- */
  .daily-doodles-pad {
    height: 180px;
    padding: 6px;
  }

  .doodle-pad-header {
    flex-wrap: wrap;
    gap: 4px;
  }

  .canvas-controls {
    gap: 6px;
  }

  .canvas-control-btn {
    padding: 4px 8px;
    font-size: 0.7rem;
  }

  .brush-color {
    width: 16px;
    height: 16px;
  }

  /* ---- Floral Doodles ---- */
  .floral-doodle.corner-tl {
    top: 8px;
    left: 8px;
    width: 50px;
    height: 50px;
  }

  .floral-doodle.corner-br {
    bottom: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
  }

  /* Sync modal mobile */
  .sync-modal {
    padding: 20px;
    margin: 10px;
  }

  .sync-modal-title {
    font-size: 1.1rem;
  }

  .sync-modal-input-row {
    flex-direction: column;
  }
}

/* Smaller phones */
@media (max-width: 380px) {
  .calendar-table td {
    height: 44px;
    padding: 2px;
  }

  .cell-textarea {
    font-size: 0.6rem;
  }

  .sticker-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .text-sticker {
    grid-column: span 3;
  }

  .habit-name-input {
    width: 40px;
  }
}
