/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --bg: #F8F9FA;
  --card-bg: #FFFFFF;
  --text: #212529;
  --text-muted: #6C757D;
  --border: #DEE2E6;
  --border-dark: #CED4DA;
  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-input: 6px;
  --shadow-card: 0 2px 8px rgba(0,0,0,.08);
  --shadow-modal: 0 8px 32px rgba(0,0,0,.18);
  --transition: 0.15s ease;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --habits: #7C3AED;
  --habits-light: #EDE9FE;
  --habits-dark: #4C1D95;
  --journey: #C2740F;
  --journey-light: #FEF3C7;
  --journey-dark: #92400E;
  --manage: #0E7490;
  --manage-light: #CFFAFE;
  --manage-dark: #155E75;
  --success: #28A745;
  --warning: #FFC107;
  --warning-bg: #FFF3CD;
  --error: #DC3545;
  --error-light: #F8D7DA;

  --mode-color: var(--habits);
}

.mode-habits  { --mode-color: var(--habits); }
.mode-journey { --mode-color: var(--journey); }
.mode-manage  { --mode-color: var(--manage); }

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.06); }
}

@keyframes scale-in {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

/* ============================================================
   SPLASH
   ============================================================ */
.splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 24px;
}

.splash-icon {
  font-size: 64px;
  display: block;
  margin-bottom: 16px;
  animation: pulse 1.5s ease infinite;
}

.splash-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.splash-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   DATABASE ERROR SCREEN
   ============================================================ */
.db-error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 32px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.db-error-icon {
  font-size: 56px;
  margin-bottom: 20px;
}

.db-error-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.db-error-detail {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.db-error-advice {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.db-error-tech {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
  background: var(--border);
  border-radius: var(--radius-input);
  padding: 8px 12px;
  margin-bottom: 24px;
  word-break: break-word;
  text-align: left;
  width: 100%;
}

.db-error-retry {
  min-width: 160px;
}

/* ============================================================
   TEMPLATE SET ERROR SCREEN
   ============================================================ */
.ts-error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 32px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.ts-error-icon {
  font-size: 56px;
  margin-bottom: 20px;
}

.ts-error-heading {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.ts-error-detail {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.6;
}

.ts-error-advice {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.ts-error-retry {
  min-width: 160px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
  position: sticky;
  top: 0;
  height: 56px;
  background: var(--mode-color);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  z-index: 10;
}

.btn-back {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: rgba(255,255,255,0.18);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  font-family: var(--font);
}

.btn-back:hover { background: rgba(255,255,255,0.28); }

.top-bar-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}

.top-bar-icon { font-size: 20px; }

/* ============================================================
   MENU
   ============================================================ */
.menu-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.menu-header {
  text-align: center;
  margin-bottom: 20px;
}

.menu-logo {
  font-size: 48px;
  display: block;
  margin-bottom: 8px;
}

.menu-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.menu-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

.menu-xp-bar-wrap { margin-bottom: 16px; }

.menu-xp-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.menu-btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--btn-color, var(--habits));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-height: 90px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.menu-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

.menu-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-card);
}

.menu-btn-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
}

.menu-btn-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.menu-btn-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.menu-btn-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes badge-gold-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

.menu-btn-badge--done {
  background: linear-gradient(120deg, #b07d2a, #f5d060, #c8942f, #f5d060, #b07d2a);
  background-size: 300% 300%;
  animation: badge-gold-shimmer 2.5s ease infinite;
  color: #fff;
}

/* ============================================================
   XP BAR
   ============================================================ */
.xp-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}

.xp-bar-fill {
  height: 100%;
  background: var(--mode-color, var(--habits));
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 20px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* ============================================================
   VIEW CONTENT
   ============================================================ */
.view-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 80px;
}

.settings-version {
  font-size: 13px;
  color: var(--text-muted);
  opacity: 0.6;
  text-align: center;
  margin: 0 0 16px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  height: 48px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: filter var(--transition), transform var(--transition);
}

.btn:hover  { filter: brightness(1.08); }
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--mode-color); color: white; }

.btn-outline {
  background: transparent;
  border: 2px solid var(--mode-color);
  color: var(--mode-color);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn-danger { background: var(--error); color: white; }

.btn-full { width: 100%; }

.btn-sm {
  height: 36px;
  padding: 8px 16px;
  font-size: 13px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-input);
  font-size: 16px;
  font-family: var(--font);
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}

.form-input:focus { border-color: var(--mode-color); }

.form-group { flex: 1; }

.form-row {
  display: flex;
  gap: 12px;
}

/* ============================================================
   HABIT ROWS
   ============================================================ */
.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
}

.habit-row:last-child { border-bottom: none; }

.habit-check {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
  font-family: var(--font);
  transition: background var(--transition), border-color var(--transition);
}

.habit-check.checked {
  background: var(--mode-color);
  border-color: var(--mode-color);
}

.habit-name {
  flex: 1;
  font-size: 16px;
  color: var(--text);
}

.habit-done .habit-name {
  text-decoration: line-through;
  color: var(--text-muted);
}

.habit-xp-tag {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--border);
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ============================================================
   HABIT MANAGE ROWS
   ============================================================ */
.habit-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.habit-manage-row:last-child { border-bottom: none; }

.habit-manage-name {
  font-size: 15px;
  color: var(--text);
}

.habit-manage-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.habit-manage-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   RECURRENCE FORM
   ============================================================ */
.recurrence-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recurrence-inline .form-input {
  width: 80px;
  flex-shrink: 0;
}

.recurrence-unit {
  font-size: 15px;
  color: var(--text-muted);
  white-space: nowrap;
}

.recurrence-note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.recurrence-radio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
}

.recurrence-radio-row:last-child { border-bottom: none; }

.recurrence-radio-row input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--mode-color);
}

/* ============================================================
   DAY-OF-WEEK SELECTOR
   ============================================================ */
.dow-selector {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.dow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  color: var(--text);
}

.dow-btn.selected {
  background: var(--mode-color);
  border-color: var(--mode-color);
  color: white;
}

.dow-btn:hover:not(.selected) {
  border-color: var(--mode-color);
  color: var(--mode-color);
}

/* ============================================================
   DEED CARD
   ============================================================ */
.deed-card {
  background: var(--journey-light);
  border-color: var(--journey-light);
}

.deed-text {
  font-size: 15px;
  font-style: italic;
  color: var(--journey-dark);
  text-align: center;
  padding: 4px 0;
}

/* ============================================================
   JOURNEY
   ============================================================ */
.journey-chapter {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.journey-level {
  font-size: 32px;
  font-weight: 800;
  margin: 4px 0;
}

.journey-xp-text {
  font-size: 13px;
  color: var(--text-muted);
}

.journey-xp-bar { margin: 8px 0; }

/* ============================================================
   XP STACK (habit reward preview)
   ============================================================ */
.xp-stack-card {
  text-align: center;
  padding: 20px 20px 16px;
}

.xp-stack-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.xp-stack-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.xp-pill {
  border-radius: 100px;
  font-weight: 700;
  color: white;
  position: relative;
  text-align: center;
}

.xp-pill-1 {
  background: var(--mode-color);
  font-size: 22px;
  padding: 10px 36px;
  z-index: 5;
}

.xp-pill-2 {
  background: #6B7280;
  font-size: 16px;
  padding: 8px 28px;
  margin-top: -8px;
  z-index: 4;
}

.xp-pill-3 {
  background: #9CA3AF;
  font-size: 13px;
  padding: 6px 22px;
  margin-top: -7px;
  z-index: 3;
}

.xp-stack-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

.xp-stack-done {
  font-size: 15px;
  font-weight: 600;
  color: var(--habits);
  padding: 4px 0;
}

/* ============================================================
   HABIT VITALITY BAR
   ============================================================ */
.vitality-quality {
  font-size: 15px;
  font-weight: 700;
  color: var(--habits);
  margin-bottom: 8px;
}

.vitality-bar {
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 8px;
}

.vitality-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--habits-light) 0%, var(--habits) 100%);
  border-radius: 10px;
  transition: width 0.6s cubic-bezier(.16,1,.3,1);
}

.vitality-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================================
   DEED ENTRIES
   ============================================================ */
.deed-entry {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.deed-entry:last-child { border-bottom: none; }

.deed-date {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.deed-text-small {
  font-size: 14px;
  font-style: italic;
  color: var(--text);
}

/* ============================================================
   EMPTY STATES
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
}

.empty-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

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

.empty-state-small {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal {
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
}

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
    justify-content: center;
  }

  .modal {
    border-radius: var(--radius-card);
    max-width: 440px;
    width: 100%;
    animation: scale-in 0.18s cubic-bezier(.16,1,.3,1);
    box-shadow: var(--shadow-modal);
  }
}

.modal-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

.modal-body {
  font-size: 15px;
  text-align: center;
  color: var(--text-muted);
  margin: 8px 0;
  line-height: 1.5;
}

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-direction: column;
}

/* ============================================================
   SW UPDATE BANNER
   ============================================================ */
#sw-update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--manage);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

#sw-update-banner[hidden] { display: none; }

#sw-update-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 2px solid #fff;
  border-radius: 20px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
}

#sw-update-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 1000;
}

.toast {
  background: #212529;
  color: white;
  border-radius: 20px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  max-width: 320px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success { background: var(--success); }
.toast.warning { background: var(--journey); }
.toast.error   { background: var(--error); }

/* ============================================================
   RETURNING USER VIEW
   ============================================================ */
.returning-view {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.returning-card {
  max-width: 440px;
  width: 100%;
  padding: 32px 24px;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: var(--shadow-modal);
}

.returning-icon {
  font-size: 48px;
  text-align: center;
  display: block;
  margin-bottom: 16px;
}

.returning-message {
  font-size: 17px;
  text-align: center;
  margin-bottom: 8px;
  color: var(--text);
  line-height: 1.5;
}

.returning-question {
  font-size: 15px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
}

.returning-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============================================================
   XP SUMMARY
   ============================================================ */
.xp-summary-level {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.xp-summary-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.xp-today-earned {
  font-size: 14px;
  font-weight: 600;
  color: var(--habits);
  margin-top: 4px;
}

/* ============================================================
   INFO TABLE
   ============================================================ */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.info-table th,
.info-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.info-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 600;
}

.info-table tr:last-child td { border-bottom: none; }

/* ============================================================
   INFO FORMULA
   ============================================================ */
.info-formula {
  background: var(--bg);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-size: 14px;
  margin: 8px 0;
  line-height: 1.7;
}

.info-formula code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  color: var(--habits-dark);
}

/* ============================================================
   HABIT CAP WARNING
   ============================================================ */
.habit-cap-warning {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--warning-bg);
  border: 1px solid var(--warning);
  border-radius: var(--radius-card);
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ============================================================
   XP HINT
   ============================================================ */
.xp-hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* ============================================================
   CREDITS
   ============================================================ */
.credits-body { margin-top: 14px; }

.credits-list {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: 16px;
  row-gap: 6px;
  margin: 0 0 14px;
}

.credits-list dt {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.credits-list dd {
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

.credits-ack {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.credits-link {
  color: var(--mode-color);
  text-decoration: underline;
}

.credits-link:hover,
.credits-link:focus { opacity: 0.75; }

/* ============================================================
   DANGER ZONE
   ============================================================ */
.danger-zone .card-title { color: var(--error); }

/* ============================================================
   CHAPTER NOTE
   ============================================================ */
.chapter-note {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ============================================================
   WINDOW NOTE
   ============================================================ */
.window-note {
  font-size: 14px;
  color: var(--text-muted);
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  body { font-size: 16px; }

  .btn { height: 52px; }

  .menu-btn { min-height: 96px; }

  .view-content { padding: 14px 12px 96px; }

  .modal-actions { flex-direction: column; }
}
