*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
.hidden { display: none !important; }

:root {
  --bg:         #f5f5f7;
  --surface:    #ffffff;
  --surface2:   #ebebee;
  --border:     #dddde3;
  --text:       #111318;
  --text-muted: #8a8f9a;
  --today:      #e8622a;
  --today-text: #ffffff;
  --radius:     16px;
  --radius-sm:  10px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Scroll hint pill ────────────────────────────────── */
.scroll-hint {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.85);
  background: rgba(17,19,24,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  padding: 11px 26px;
  border-radius: 100px;
  font-family: 'Jost', sans-serif;
  font-size: 17px;
  font-weight: 300;
  letter-spacing: 2px;
  pointer-events: none;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
  text-transform: uppercase;
}
.scroll-hint.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ── Layout ──────────────────────────────────────────── */
.main-layout {
  display: flex;
  align-items: flex-start;
  max-width: 1060px;
  margin: 0 auto;
  padding: 36px 24px 48px;
  gap: 20px;
}
.cal-section { flex: 1; min-width: 0; }

/* ── Cal top: month left, legend right ───────────────── */
.cal-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}
.month-display { line-height: 1; }
.month-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
#month-label {
  font-family: 'Jost', sans-serif;
  font-size: 48px;
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1;
  color: var(--text);
  text-transform: uppercase;
}
.year-label {
  font-family: 'Jost', sans-serif;
  font-size: 13px;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-top: 4px;
  display: block;
  text-transform: uppercase;
}

/* ── Month nav buttons (stacked ▲▼ beside month label) ── */
.month-nav-stack {
  display: flex; flex-direction: column; gap: 2px; align-self: center;
}
.month-nav-btn {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.month-nav-btn:hover { background: var(--surface2); color: var(--text); border-color: var(--text-muted); }

/* ── Legend ──────────────────────────────────────────── */
.legend { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-bottom: 4px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.legend-swatch { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ── Day headers ─────────────────────────────────────── */
.day-headers {
  display: grid;
  grid-template-columns: repeat(7, 1fr) 38px;
  margin-bottom: 4px;
}
.day-headers div {
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding-bottom: 8px;
}

/* ── Calendar weeks ──────────────────────────────────── */
.cal-weeks-wrap { overflow: hidden; }
#cal-weeks {
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  will-change: transform, opacity;
}
.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr) 38px;
  align-items: center;
  border-radius: 10px;
  transition: background 0.1s;
}
.week-row:hover { background: rgba(0,0,0,0.025); }
.week-row--active { background: rgba(232,98,42,0.07); }
.week-row--active:hover { background: rgba(232,98,42,0.10); }

/* ── Day cells ───────────────────────────────────────── */
.day-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 0 10px;
  min-height: 74px;
  cursor: pointer;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
/* Other-month cells are dimmed but pointer-events enabled for drag + click-to-navigate */
.day-cell.other-month { opacity: 0.25; }
.day-cell.drag-selected { background: rgba(232,98,42,0.08); border-radius: 8px; }
.day-cell.tap-selected  { background: rgba(232,98,42,0.10); border-radius: 8px; }

/* ── Date circle ─────────────────────────────────────── */
.day-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  position: relative; z-index: 2;
  transition: transform 0.12s;
  flex-shrink: 0;
}
.day-cell:hover .day-circle { transform: scale(1.1); }
.day-num {
  font-size: 13px; font-weight: 500;
  color: #5c6270; line-height: 1;
}
.day-circle.is-today { background: var(--today) !important; border: none !important; }
.day-circle.is-today .day-num { color: var(--today-text) !important; font-weight: 700; }

/* ── Multi-day capsules (stretched circles) ──────────── */
.capsule-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.day-capsule {
  height: 36px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
}

/* ✕ superscript on single-day busy entries */
.busy-badge {
  position: absolute;
  top: 1px; right: 1px;
  font-size: 9px; font-weight: 900;
  line-height: 1; z-index: 5;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(255,255,255,0.9), 0 0 3px rgba(255,255,255,0.9);
}
.day-circle.is-today .busy-badge {
  color: #fff !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
/* ✕ inside a busy multi-day capsule */
.capsule-busy-x {
  position: absolute;
  top: 3px; right: 5px;
  font-size: 8px; font-weight: 900;
  line-height: 1; opacity: 0.85;
  pointer-events: none;
}
/* Rounded caps on the open ends */
.cap-start { border-radius: 999px 0 0 999px; }
.cap-end   { border-radius: 0 999px 999px 0; }
/* mid: no border-radius, top+bottom border applied inline */

/* Small circles for single-day entries sitting alongside a range */
.cell-singles {
  display: flex; gap: 4px; justify-content: center;
  margin-top: 3px;
}
.single-circle {
  width: 20px; height: 20px; border-radius: 50%;
  background: transparent; flex-shrink: 0;
}

/* ── Week expand button: orange empty circle + ↗ ─────── */
.week-expand-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--today);
  background: transparent;
  color: var(--today);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  align-self: center; justify-self: center;
  transition: background 0.18s, color 0.18s, transform 0.18s, border-color 0.18s;
  flex-shrink: 0;
  line-height: 1;
}
.week-expand-btn:hover {
  background: var(--today);
  color: #fff;
  transform: scale(1.12);
}
.week-expand-btn--active {
  background: var(--today);
  color: #fff;
  border-color: var(--today);
  opacity: 1 !important;
}

/* ── Month dots ──────────────────────────────────────── */
.month-dots-wrap {
  margin-top: 22px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.month-dots-wrap::-webkit-scrollbar { display: none; }
#month-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 6px 20px;
  min-width: max-content;
}
.month-dot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; padding: 0;
  transition: transform 0.15s;
}
.month-dot:hover { transform: translateY(-2px); }
.month-dot.active { transform: translateY(-3px); }
.month-dot-pip {
  width: 26px; height: 26px; border-radius: 50%;
  background: transparent;
  border: 2px solid currentColor;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  flex-shrink: 0;
}
.month-dot.active .month-dot-pip {
  background: currentColor;
  box-shadow: 0 3px 10px rgba(0,0,0,0.18);
  transform: scale(1.15);
}
.month-dot-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-muted);
  white-space: nowrap;
}
.month-dot.active .month-dot-label { color: var(--text); }

/* ── Week panel ──────────────────────────────────────── */
.week-panel {
  width: 296px; flex-shrink: 0;
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden; position: sticky; top: 24px;
  max-height: calc(100vh - 100px);
  display: flex; flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.week-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 14px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.week-panel-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 3px; }
.week-panel-header h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.3px; }
.panel-close {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.panel-close:hover { background: var(--surface2); }
.week-panel-content { overflow-y: auto; flex: 1; padding: 12px; display: flex; flex-direction: column; gap: 8px; }

/* Week day cards */
.week-day-card { border-radius: 12px; padding: 12px 14px; min-height: 56px; }
.week-day-card-header { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.week-day-add { margin-left: auto; font-size: 16px; font-weight: 300; opacity: 0.35; line-height: 1; }
.week-day-card:hover .week-day-add { opacity: 0.7; }
.week-day-name { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.6; }
.week-day-num  { font-size: 22px; font-weight: 900; letter-spacing: -0.5px; line-height: 1; opacity: 0.8; }
.week-card-entries { display: flex; flex-direction: column; gap: 4px; }
.week-card-entry {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500;
  background: rgba(255,255,255,0.55); border-radius: 7px; padding: 5px 8px;
}
.week-card-entry-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.week-card-empty { font-size: 11px; opacity: 0.4; font-style: italic; margin-top: 2px; }

/* ── Entry cards (modal) ─────────────────────────────── */
.entry-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.entry-list:empty::after { content: 'Nothing yet — be the first!'; color: var(--text-muted); font-size: 13px; font-style: italic; display: block; }
.entry-card {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 12px; display: flex; align-items: flex-start; gap: 9px;
  border-left: 3px solid transparent;
}
.entry-card.available { border-left-color: #22c55e; }
.entry-card.busy      { border-left-color: #ef4444; }
.entry-card.event     { border-left-color: #f59e0b; }
.entry-person-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.entry-name { font-size: 13px; font-weight: 600; }
.entry-label { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.entry-location { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.entry-event-title { font-size: 13px; font-weight: 600; }
.entry-event-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.entry-event-link { display: inline-block; margin-top: 5px; font-size: 12px; color: #3b82f6; text-decoration: none; }
.entry-event-link:hover { text-decoration: underline; }

/* Edit / delete buttons on own entries */
.entry-actions {
  display: flex; flex-direction: column; gap: 4px;
  margin-left: auto; flex-shrink: 0;
}
.entry-action-btn {
  width: 24px; height: 24px;
  border-radius: 6px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.entry-action-btn:hover { background: var(--surface2); color: var(--text); }
.entry-delete-btn:hover { background: #fee2e2; color: #ef4444; border-color: #fca5a5; }

/* ── Edit mode banner ────────────────────────────────── */
.edit-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: #fffbeb; border: 1px solid #fcd34d;
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: 13px; margin-bottom: 12px;
}
.cancel-edit-btn {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--text-muted); padding: 2px 6px;
  border-radius: 4px; transition: background 0.15s;
}
.cancel-edit-btn:hover { background: var(--surface2); }

/* ── Loading ─────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(245,245,247,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; backdrop-filter: blur(4px);
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border); border-top-color: var(--today);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Modal ───────────────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(17,19,24,0.45); backdrop-filter: blur(6px); }
.modal-box {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto; padding: 24px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.18);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover { background: var(--surface2); }
.modal-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 6px; }

.modal-date-range {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 4px;
}
.modal-date-range input[type="date"] {
  font-family: 'Jost', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--text); background: transparent;
  border: none; border-bottom: 2px solid var(--border);
  outline: none; padding: 2px 0; cursor: pointer;
  width: 130px;
}
.modal-date-range input[type="date"]:focus { border-bottom-color: var(--today); }
.modal-date-sep {
  font-size: 13px; color: var(--text-muted); flex-shrink: 0;
}
.modal-date-count {
  font-size: 11px; color: var(--today); font-family: 'Jost', sans-serif;
  font-weight: 500; letter-spacing: 0.3px; min-height: 16px;
  margin-bottom: 12px;
}

/* ── Color picker swatch ─────────────────────────────── */
.name-color-row { display: flex; gap: 8px; align-items: center; margin-bottom: 9px; }
.name-color-row input[type="text"] { margin-bottom: 0; flex: 1; }
.color-swatch-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  border: 2.5px solid rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  padding: 0;
}
.color-swatch-btn:hover { transform: scale(1.12); box-shadow: 0 2px 10px rgba(0,0,0,0.22); }
.color-input-hidden {
  position: absolute; width: 0; height: 0;
  opacity: 0; pointer-events: none; border: none; padding: 0;
}

/* ── Add form ────────────────────────────────────────── */
.add-form { padding-top: 8px; }
.form-heading-row {
  display: flex; align-items: center; gap: 10px;
  margin: 14px 0 16px;
}
.form-divider-line { flex: 1; height: 1px; background: var(--border); }
.form-divider-label {
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--text-muted); white-space: nowrap;
}
input[type="text"], input[type="url"], textarea {
  width: 100%; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 11px;
  color: var(--text); font-family: inherit; font-size: 14px;
  outline: none; transition: border-color 0.15s; margin-bottom: 9px; resize: vertical;
}
input:focus, textarea:focus { border-color: var(--today); }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
.type-picker { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.type-option { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.type-option input[type="radio"] { accent-color: var(--today); cursor: pointer; margin: 0; }
.type-label {
  font-size: 13px; font-weight: 500; padding: 7px 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg); cursor: pointer; flex: 1; transition: border-color 0.15s;
}
.type-option input[type="radio"]:checked + .available-label { border-color: #22c55e; color: #15803d; }
.type-option input[type="radio"]:checked + .busy-label      { border-color: #ef4444; color: #b91c1c; }
.type-option input[type="radio"]:checked + .event-label     { border-color: #f59e0b; color: #b45309; }
.event-fields { display: flex; flex-direction: column; }
.submit-btn {
  width: 100%; background: var(--text); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 12px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: opacity 0.15s, transform 0.1s; margin-top: 2px;
}
.submit-btn:hover { opacity: 0.85; }
.submit-btn:active { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.form-error { color: #ef4444; font-size: 12px; margin-top: 7px; text-align: center; }

/* ── Tap-select floating bar ─────────────────────────── */
.tap-select-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 14px 20px 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
  z-index: 150;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}
.tap-select-bar.active { transform: translateY(0); }
#tap-select-count { font-size: 14px; font-weight: 600; color: var(--text); }
.tap-select-actions { display: flex; gap: 10px; }
.tap-cancel-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 9px 16px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--text-muted); cursor: pointer;
}
.tap-confirm-btn {
  background: var(--text); color: #fff;
  border: none; border-radius: var(--radius-sm); padding: 9px 18px;
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}

/* ── Onboarding overlay ──────────────────────────────── */
.onboarding {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(17,19,24,0.5); backdrop-filter: blur(6px);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 20px;
}
.onboarding-box {
  background: var(--surface); border-radius: var(--radius);
  padding: 28px 24px 24px; width: 100%; max-width: 420px;
  box-shadow: 0 24px 72px rgba(0,0,0,0.22);
}
.onboard-eyebrow {
  font-size: 9px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--text-muted); margin-bottom: 6px;
}
.onboard-title {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  margin-bottom: 20px;
}
.onboard-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.onboard-step { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.onboard-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.onboard-icon.avail { background: #dcfce7; color: #15803d; }
.onboard-icon.busy  { background: #fee2e2; color: #b91c1c; }
.onboard-icon.event { background: #fef3c7; color: #b45309; }
.onboard-hint {
  font-size: 13px; color: var(--text-muted); margin-bottom: 18px;
  padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm);
}

/* ── Entry note ──────────────────────────────────────── */
.entry-note { font-size: 12px; color: var(--text-muted); margin-top: 3px; font-style: italic; }

/* ════════════════════════════════════════════
   WIDGETS
════════════════════════════════════════════ */
.widgets-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px 56px;
}

.widget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.widget {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
}

.widget-map { }

.widget-eyebrow {
  font-family: 'Jost', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 2.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 16px;
  display: block;
}

/* ── Weather ─────────────────────────────── */
.w-row { display: flex; gap: 14px; align-items: center; }

.w-circle {
  width: 90px; height: 90px; flex-shrink: 0;
  background: var(--text);
  border-radius: 50%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

.w-temp {
  font-family: 'Jost', sans-serif;
  font-size: 26px; font-weight: 300;
  color: #fff; line-height: 1;
  letter-spacing: -0.5px;
}

.w-hl {
  font-family: 'Jost', sans-serif;
  font-size: 8px; letter-spacing: 0.3px;
  color: rgba(255,255,255,0.45);
  margin-top: 5px;
}

.w-info { flex: 1; min-width: 0; }

.w-city {
  font-family: 'Jost', sans-serif;
  font-size: 9px; letter-spacing: 2px;
  color: var(--text-muted); text-transform: uppercase;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}

.w-cond {
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 300;
  color: var(--text); text-transform: capitalize;
  margin-bottom: 12px; min-height: 18px;
}

.w-stats { display: flex; gap: 8px; }

.w-stat {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 8px 10px; flex: 1;
}

.w-stat-label {
  font-family: 'Jost', sans-serif;
  font-size: 7px; letter-spacing: 1.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  display: block; margin-bottom: 3px;
}

.w-stat-val {
  font-family: 'Jost', sans-serif;
  font-size: 18px; font-weight: 300;
  color: var(--text); line-height: 1;
}

.w-stat-unit { font-size: 8px; color: var(--text-muted); }

/* ── Notes ───────────────────────────────── */
.notes-compose { margin-bottom: 14px; }
#trip-note-body {
  width: 100%; display: block; box-sizing: border-box;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'Inter', sans-serif; font-size: 13px; line-height: 1.55;
  color: var(--text); background: transparent;
  resize: none; margin-bottom: 8px;
}
#trip-note-body:focus { border-color: var(--today); outline: none; }

.notes-compose-row { display: flex; gap: 8px; align-items: center; }
#note-author-input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface2); padding: 7px 10px;
  font-family: 'Jost', sans-serif; font-size: 13px; color: var(--text);
  outline: none;
}
#note-author-input:focus { border-color: var(--today); }
.note-post-btn {
  background: var(--today); color: #fff; border: none;
  border-radius: 8px; padding: 7px 16px; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 600;
  transition: opacity 0.15s; white-space: nowrap;
}
.note-post-btn:hover { opacity: 0.85; }

.notes-log { display: flex; flex-direction: column; gap: 0; }
.note-entry {
  padding: 10px 0; border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.note-entry:last-child { border-bottom: none; }
.note-entry-body {
  font-family: 'Inter', sans-serif; font-size: 13px;
  line-height: 1.5; color: var(--text);
}
.note-entry-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Jost', sans-serif; font-size: 10px;
  color: var(--text-muted); letter-spacing: 0.3px;
}
.note-entry-delete {
  background: none; border: none; cursor: pointer; padding: 2px 4px;
  color: var(--text-muted); font-size: 11px; opacity: 0.4;
  transition: opacity 0.15s;
}
.note-entry-delete:hover { opacity: 1; color: #e53; }

/* ── Map ─────────────────────────────────── */
.widget-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pin-btn {
  font-family: 'Jost', sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text);
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.pin-btn:hover { background: var(--border); }
.pin-btn:disabled { opacity: 0.4; cursor: default; }

.pin-form { margin-bottom: 12px; }

.pin-location-row {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 8px;
}

.pin-location-row input[type="text"] {
  flex: 1; min-width: 0; margin-bottom: 0;
}

.pin-gps-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text); font-size: 18px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.pin-gps-btn:hover { background: var(--border); }
.pin-gps-btn:disabled { opacity: 0.4; cursor: default; }

.pin-search-results {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.pin-result-item {
  padding: 10px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px; color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}
.pin-result-item:last-child { border-bottom: none; }
.pin-result-item:hover, .pin-result-item:active { background: var(--surface2); }
.pin-result-name { font-weight: 500; }
.pin-result-sub  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.pin-form #pin-note-input { margin-bottom: 8px; }

.pin-form-actions {
  display: flex; gap: 8px;
}

.pin-action-btn {
  font-family: 'Jost', sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.5px;
  padding: 9px 16px;
  border-radius: 100px;
  cursor: pointer; flex-shrink: 0;
  transition: opacity 0.15s;
}
.pin-action-btn:disabled { opacity: 0.4; cursor: default; }
.pin-cancel-btn  { background: transparent; border: 1.5px solid var(--border); color: var(--text-muted); }
.pin-confirm-btn { background: var(--text); border: 1.5px solid var(--text); color: #fff; }

#trip-map {
  width: 100%; height: 260px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface2);
}

.map-secret-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 1000;
  background: none; border: none; padding: 4px 6px;
  font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 600;
  color: var(--text-muted); opacity: 0.25; cursor: pointer;
  letter-spacing: 0.5px; line-height: 1;
  transition: opacity 0.2s;
  user-select: none; -webkit-user-select: none;
}
.map-secret-btn:hover { opacity: 0.6; }

.map-auth-overlay {
  position: absolute; bottom: 36px; right: 10px; z-index: 1001;
  display: flex; gap: 6px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.map-auth-overlay input {
  border: none; background: none; outline: none;
  font-family: 'Jost', sans-serif; font-size: 13px;
  color: var(--text); width: 130px;
}
.map-auth-overlay button {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--today); padding: 0 2px;
  line-height: 1;
}
@keyframes auth-shake {
  0%,100% { transform: translateX(0); }
  20%,60%  { transform: translateX(-6px); }
  40%,80%  { transform: translateX(6px); }
}
.auth-shake { animation: auth-shake 0.4s ease; }

.map-footer {
  margin-top: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 10px; letter-spacing: 1.5px;
  color: var(--text-muted); text-transform: uppercase;
}

.pin-history {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 4px;
}

.pin-history-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.pin-history-item:last-child { border-bottom: none; }

.pin-hist-dot {
  width: 8px; height: 8px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--text);
  margin-top: 5px;
}

.pin-hist-info { flex: 1; min-width: 0; }

.pin-hist-place {
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 400;
  color: var(--text); line-height: 1.2;
}

.pin-hist-note {
  font-family: 'Inter', sans-serif;
  font-size: 12px; color: var(--text-muted);
  margin-top: 2px; font-style: italic;
}

.pin-hist-meta {
  font-family: 'Jost', sans-serif;
  font-size: 10px; letter-spacing: 0.3px;
  color: var(--text-muted); flex-shrink: 0;
  white-space: nowrap; padding-top: 4px;
}

/* ── Last.fm ─────────────────────────────── */
.lfm-top-section {
  max-width: 1060px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.lfm-widget { margin-bottom: 0; }

/* ── Music widget tabs ───────────────────────────────── */
.lfm-tabs {
  display: flex; gap: 0; margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.lfm-tab {
  background: none; border: none; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 9px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text-muted); padding: 0 0 10px; margin-right: 20px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  text-align: left; line-height: 1.4;
}
.lfm-tab.active { color: var(--text); border-bottom-color: var(--today); }
.lfm-tab:hover:not(.active) { color: var(--text); }

/* ── Song suggestions ────────────────────────────────── */
.suggest-search-wrap { position: relative; margin-bottom: 10px; }
.suggest-search-wrap input {
  width: 100%; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface2); padding: 9px 12px;
  font-family: 'Jost', sans-serif; font-size: 14px; color: var(--text);
  outline: none;
}
.suggest-search-wrap input:focus { border-color: var(--today); }

.suggest-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 200;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.suggest-result-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.suggest-result-item:last-child { border-bottom: none; }
.suggest-result-item:hover { background: var(--surface2); }
.suggest-result-art {
  width: 36px; height: 36px; border-radius: 4px; flex-shrink: 0;
  background: var(--border); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}
.suggest-result-info { flex: 1; min-width: 0; }
.suggest-result-song {
  font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 500;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-result-artist {
  font-family: 'Jost', sans-serif; font-size: 11px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.suggest-name-row {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
}
.suggest-name-label {
  font-family: 'Jost', sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted);
}
.suggest-name-input-row {
  display: flex; gap: 8px; align-items: center;
}
.suggest-name-input-row input {
  flex: 1;
}
.suggest-name-row input {
  flex: 1; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface2); padding: 8px 12px;
  font-family: 'Jost', sans-serif; font-size: 13px; color: var(--text);
  outline: none;
}
.suggest-name-row input:focus { border-color: var(--today); }
.suggest-submit-btn {
  background: var(--today); color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px; cursor: pointer;
  font-family: 'Jost', sans-serif; font-size: 13px; font-weight: 600;
  white-space: nowrap; transition: opacity 0.15s;
}
.suggest-submit-btn:hover { opacity: 0.85; }

.suggest-pending {
  font-family: 'Jost', sans-serif; font-size: 12px;
  color: var(--text-muted); margin-bottom: 10px; font-style: italic;
}

.suggest-list { display: flex; flex-direction: column; gap: 0; }
.suggest-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: opacity 0.15s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { opacity: 0.7; }
.suggest-item-art {
  width: 40px; height: 40px; border-radius: 6px; flex-shrink: 0;
  background: var(--border); background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.suggest-item-info { flex: 1; min-width: 0; }
.suggest-item-song {
  font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-item-artist {
  font-family: 'Jost', sans-serif; font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.suggest-item-meta {
  font-family: 'Jost', sans-serif; font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.3px; flex-shrink: 0; text-align: right; line-height: 1.4;
}
.suggest-item-delete {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-muted); font-size: 12px; flex-shrink: 0; opacity: 0.5;
  transition: opacity 0.15s;
}
.suggest-item-delete:hover { opacity: 1; color: #e53; }

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

.lfm-circle {
  width: 72px; height: 72px; flex-shrink: 0;
  background: var(--text);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: rgba(255,255,255,0.4);
  background-size: cover; background-position: center;
  transition: box-shadow 0.4s;
  overflow: hidden;
}
.lfm-circle.lfm-playing {
  box-shadow: 0 0 0 3px var(--today), 0 0 0 6px rgba(232,98,42,0.15);
}

.lfm-info { flex: 1; min-width: 0; }

.lfm-track {
  font-family: 'Jost', sans-serif;
  font-size: 16px; font-weight: 400;
  color: var(--text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 3px;
  transition: opacity 0.15s;
}
.lfm-track:hover { opacity: 0.65; }

.lfm-artist {
  font-family: 'Jost', sans-serif;
  font-size: 12px; font-weight: 300;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}

.lfm-time {
  font-family: 'Jost', sans-serif;
  font-size: 10px; letter-spacing: 1px;
  color: var(--text-muted); text-transform: uppercase;
}

.lfm-more-btn {
  background: none; border: none; padding: 0;
  margin-top: 10px;
  font-family: 'Jost', sans-serif;
  font-size: 11px; letter-spacing: 1px;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: lowercase;
  display: block;
  width: 100%;
  text-align: right;
}
.lfm-more-btn:hover { color: var(--text); }

.lfm-history {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 0;
}

.lfm-history-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.lfm-history-item:last-child { border-bottom: none; }
.lfm-history-item:hover { opacity: 0.7; }

.lfm-hist-art {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--text);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: rgba(255,255,255,0.35);
}

.lfm-hist-info { flex: 1; min-width: 0; }

.lfm-hist-track {
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 400;
  color: var(--text); line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lfm-hist-artist {
  font-family: 'Jost', sans-serif;
  font-size: 11px; font-weight: 300;
  color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lfm-hist-time {
  font-family: 'Jost', sans-serif;
  font-size: 10px; letter-spacing: 0.5px;
  color: var(--text-muted); flex-shrink: 0;
}

/* Widgets responsive */
@media (max-width: 720px) {
  .lfm-top-section { padding: 20px 20px 0; }
  .widgets-section  { padding: 0 20px 40px; }
}
@media (max-width: 600px) {
  .widget-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .lfm-top-section { padding: 14px 16px 0; }
  .widgets-section  { padding: 0 16px 32px; }
  #trip-map { height: 220px; }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 720px) {
  .main-layout { flex-direction: column; padding: 20px 20px 40px; gap: 16px; }
  .week-panel { width: 100%; position: static; max-height: none; }
  .day-cell { min-height: 60px; }
  .day-circle { width: 30px; height: 30px; }
  .day-num { font-size: 12px; }
  #month-label { font-size: 38px; }
  .day-capsule { height: 30px; }
  .single-circle { width: 16px; height: 16px; }
}
@media (max-width: 480px) {
  .main-layout { padding: 14px 16px 24px; }
  #month-label { font-size: 30px; letter-spacing: 1px; }
  .year-label { font-size: 11px; }
  .legend { display: none; } /* hidden on small screens, visible in modal */
  .month-nav-btn { width: 20px; height: 20px; font-size: 7px; }
  .month-dot-pip { width: 20px; height: 20px; }
  .month-dot-label { font-size: 8px; }
  .week-expand-btn { width: 22px; height: 22px; font-size: 10px; }
  .day-headers { margin-bottom: 2px; }
  .day-headers div { font-size: 9px; padding-bottom: 4px; }
  .day-cell { min-height: 52px; padding: 4px 0 6px; }
  .day-circle { width: 28px; height: 28px; }
  .day-num { font-size: 11px; }
  .day-capsule { height: 28px; }
  .modal-box { padding: 18px; }
}
