/* ============================================================
   HOT CAL SUMMER — James ♥ Sophie
   Sunset-sticker aesthetic: cream paper, hot gradients,
   chunky boxes with hard offset shadows.
   ============================================================ */

:root {
  /* palette */
  --paper:   #FFF4E4;
  --ink:     #3B0A2A;      /* borders, hard shadows, dark fills */
  --text:    #3B0A2A;      /* body text — splits from ink in dark mode */
  --ink-soft:#7A4B63;

  --card:       #fff;      /* boxes, cells, chips */
  --card-warm:  #FFF9EC;   /* weekend tint */
  --card-dim:   #FAF0E2;   /* other-month cells */
  --card-hover: #FFF6E0;
  --paint-hover:#D8FFF7;
  --grid-line:  rgba(59,10,42,.18);
  --backdrop:   rgba(59,10,42,.45);

  --sun-1:   #FF5E78;   /* hot pink */
  --sun-2:   #FF9349;   /* tangerine */
  --sun-3:   #FFC93C;   /* golden */

  /* category colours */
  --c-shared:   #FF4D8D;
  --c-work:     #FF8A3D;
  --c-shift:    #00BFA5;
  --c-personal: #FFC53D;
  --c-family:   #8C7BFF;
  --c-birthday: #E14EC8;
  --c-bankhol:  #59B0FF;

  --radius: 16px;
  --border: 2.5px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);

  --font-display: 'Shrikhand', cursive;
  --font-body: 'Outfit', sans-serif;
}

/* ============ DARK MODE — dusk edition ============ */
/* applied via data-theme, set by the ☀/🌙 toggle (defaults to the system) */
:root[data-theme="dark"] {
  --paper:   #1D1022;                 /* deep dusk plum */
  --ink:     #120818;                 /* borders & shadows stay near-black */
  --text:    #FFE9D6;                 /* warm cream text */
  --ink-soft:#C79BB8;

  --card:       #2E1B35;
  --card-warm:  #35203C;
  --card-dim:   #24142A;
  --card-hover: #3B2544;
  --paint-hover:rgba(0,191,165,.28);
  --grid-line:  rgba(255,233,214,.14);
  --backdrop:   rgba(8,3,10,.62);
}
:root[data-theme="dark"] body {
  /* the sunset glow reads as city lights after dark */
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(255,94,120,.13), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(255,147,73,.10), transparent 55%);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body { overscroll-behavior-y: contain; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--text);
  min-height: 100vh;
  /* subtle sunset wash + grain */
  background-image:
    radial-gradient(1200px 500px at 85% -10%, rgba(255,94,120,.16), transparent 60%),
    radial-gradient(900px 420px at -10% 8%, rgba(255,201,60,.22), transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  background-attachment: fixed;
}

.app {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 14px 200px;
}

button { font-family: inherit; cursor: pointer; color: inherit; }

/* ============ HEADER ============ */

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.header-tools {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  margin-top: 8px;
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.05;
  letter-spacing: .01em;
  background: linear-gradient(100deg, var(--sun-1) 10%, var(--sun-2) 55%, var(--sun-3) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(2px 2px 0 var(--ink));
  transform: rotate(-1.5deg);
  display: inline-block;
}
.logo span {
  display: inline-block;
  transform: rotate(2deg);
  background: linear-gradient(100deg, var(--sun-2) 5%, var(--sun-3) 90%);
  -webkit-background-clip: text;
  background-clip: text;
}

.tagline {
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

.view-switch {
  display: inline-flex;
  background: var(--card);
  border: var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  width: max-content;
}
.vs-btn {
  border: none;
  background: transparent;
  padding: 9px 20px;
  font-weight: 700;
  font-size: .9rem;
  transition: background .15s;
}
.vs-btn + .vs-btn { border-left: var(--border); }
.vs-btn.active {
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2));
  color: #fff;
  text-shadow: 1px 1px 0 rgba(59,10,42,.4);
}

.nav-btn {
  background: var(--card);
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  font-size: 1.05rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  transition: transform .1s, box-shadow .1s;
}
.today-btn { width: auto; padding: 0 16px; font-size: .9rem; }
.nav-btn:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }

.period-label {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  font-weight: 400;
  margin-left: 6px;
  color: var(--text);
}

/* ============ COMING UP STRIP ============ */

.coming-up { margin-bottom: 16px; }

.strip-title {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 4px 10px;
  scrollbar-width: thin;
}

.up-card {
  flex: 0 0 auto;
  min-width: 150px;
  max-width: 210px;
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
}
.up-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--cat, var(--sun-2));
}
.up-when {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin-left: 6px;
}
.up-title {
  font-weight: 700;
  font-size: .92rem;
  margin: 2px 0 4px 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-meta { margin-left: 6px; display: flex; align-items: center; gap: 6px; }

.strip-empty {
  font-size: .9rem;
  color: var(--ink-soft);
  padding: 8px 4px;
  font-weight: 600;
}

/* ============ FILTERS ============ */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: var(--border);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  padding: 6px 13px;
  font-weight: 700;
  font-size: .8rem;
  transition: transform .1s, opacity .15s;
}
.filter-chip .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--cat);
}
.filter-chip.off { opacity: .35; box-shadow: none; transform: translate(2px,2px); }
.filter-chip:active { transform: translate(2px,2px); }
.filter-chip.action { background: var(--ink); color: #fff; }
.filter-chip.action.current { background: linear-gradient(100deg, var(--sun-1), var(--sun-2)); text-shadow: 1px 1px 0 rgba(59,10,42,.35); }

/* ============ SHIFT PAINTER ============ */

.paint-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: linear-gradient(100deg, #00BFA5, #00D9BC);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 14px;
  margin-bottom: 16px;
  color: #fff;
}
.paint-hint { font-weight: 800; font-size: .82rem; text-shadow: 1px 1px 0 rgba(59,10,42,.35); }
.paint-opts { display: flex; gap: 7px; flex-wrap: wrap; }
.paint-opt {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font-weight: 700;
  font-size: .8rem;
  padding: 6px 12px;
}
.paint-opt.active {
  background: var(--ink);
  color: #fff;
  box-shadow: 2px 2px 0 rgba(255,255,255,.6);
}
.paint-done {
  margin-left: auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  font-size: .8rem;
  padding: 7px 16px;
}

/* ============ MONTH VIEW ============ */

.month-grid {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.dow-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2) 60%, var(--sun-3));
  border-bottom: var(--border);
}
.dow {
  text-align: center;
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: .1em;
  color: #fff;
  text-shadow: 1px 1px 0 rgba(59,10,42,.4);
  padding: 8px 2px;
}

.weeks { display: grid; }
.week-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.week-row + .week-row .day-cell { border-top: 1.5px solid var(--grid-line); }

.day-cell {
  min-height: 86px;
  padding: 5px 4px 6px;
  border-right: 1.5px solid var(--grid-line);
  position: relative;
  text-align: left;
  background: var(--card);
  border-left: none; border-bottom: none; border-top: none;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: background .12s;
}
.day-cell:nth-child(7n) { border-right: none; }
.day-cell:hover { background: var(--card-hover); }
.day-cell.other { background: var(--card-dim); }
.day-cell.other .day-num { opacity: .35; }
.day-cell.weekend { background: var(--card-warm); }
.day-cell.weekend.other { background: var(--card-dim); }

.day-num {
  font-weight: 700;
  font-size: .8rem;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.day-cell.today .day-num {
  background: linear-gradient(120deg, var(--sun-1), var(--sun-2));
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  font-weight: 800;
}

.pill {
  display: flex;
  align-items: center;
  gap: 4px;
  border-radius: 7px;
  padding: 2px 5px;
  font-size: .66rem;
  font-weight: 700;
  color: #fff;
  background: var(--cat, var(--sun-2));
  border: 1.5px solid var(--ink);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: .5px .5px 0 rgba(59,10,42,.35);
}
.pill.light { color: var(--ink); text-shadow: none; }
.pill-more {
  font-size: .64rem;
  font-weight: 800;
  color: var(--ink-soft);
  padding-left: 4px;
}

.hol-tag {
  font-size: .6rem;
  font-weight: 800;
  color: var(--c-bankhol);
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.1;
}

.occ-tag {
  font-size: .62rem;
  font-weight: 800;
  color: #B8578F;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wday-hol.occ { color: #B8578F; text-transform: none; }

.day-cell.paintable { cursor: crosshair; }
.day-cell.paintable:hover { background: var(--paint-hover); }

/* ============ WEEK VIEW ============ */

.week-list { display: flex; flex-direction: column; gap: 12px; }

.wday-card {
  background: var(--card);
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.wday-card.today { box-shadow: var(--shadow); outline: 3px solid var(--sun-2); outline-offset: -3px; }

.wday-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 2px dashed var(--grid-line);
  background: var(--card-warm);
}
.wday-card.today .wday-head { background: linear-gradient(100deg, var(--sun-1), var(--sun-2)); color: #fff; text-shadow: 1px 1px 0 rgba(59,10,42,.35); }
.wday-name { font-family: var(--font-display); font-size: 1.05rem; font-weight: 400; }
.wday-date { font-weight: 700; font-size: .8rem; opacity: .85; }
.wday-hol { margin-left: auto; font-size: .68rem; font-weight: 800; text-transform: uppercase; color: var(--c-bankhol); }
.wday-card.today .wday-hol { color: #fff; }

.wday-events { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 7px; }
.wday-empty { font-size: .82rem; color: var(--ink-soft); font-weight: 600; padding: 2px 4px; }

.ev-row {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 7px 10px;
  background: var(--card);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  text-align: left;
  width: 100%;
  font-family: inherit;
  transition: transform .1s, box-shadow .1s;
}
.ev-row:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.ev-swatch { width: 13px; height: 13px; border-radius: 4px; border: 2px solid var(--ink); background: var(--cat); flex: 0 0 auto; }
.ev-time { font-weight: 800; font-size: .74rem; color: var(--ink-soft); min-width: 42px; }
.ev-title { font-weight: 700; font-size: .9rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-bell { font-size: .75rem; }

.person-badge {
  flex: 0 0 auto;
  font-size: .62rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 2px 7px;
  background: var(--paper);
}

/* ============ YEAR VIEW ============ */

.year-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.mini-month {
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  padding: 10px;
  text-align: left;
  font-family: inherit;
  transition: transform .12s;
}
.mini-month:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.mini-month h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--sun-1);
}
.mini-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: .58rem;
  font-weight: 600;
  border-radius: 5px;
  position: relative;
  color: var(--ink-soft);
}
.mini-day.has { background: var(--cat); color: #fff; font-weight: 800; }
.mini-day.today { outline: 2px solid var(--sun-2); font-weight: 800; color: var(--text); }

/* ============ FOOTER TOOLBAR / FAB ============ */

.bottombar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  max-width: 540px;
  margin: 0 auto;
  background: var(--card);
  border: var(--border);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -4px 0 var(--ink);
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.bb-nav { display: flex; align-items: center; gap: 10px; }
.bb-nav .period-label { flex: 1; text-align: center; margin: 0; }
.bb-row { display: flex; align-items: center; gap: 8px; }
.bb-row .view-switch { flex: 1; display: flex; width: auto; }
.bb-row .vs-btn { flex: 1; padding: 9px 0; }

.tool-btn {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  box-shadow: 2.5px 2.5px 0 var(--ink);
  font-weight: 700;
  font-size: .74rem;
  padding: 7px 12px;
}
.tool-btn:active { transform: translate(2px,2px); box-shadow: 0 0 0 var(--ink); }
.tool-btn.on { background: var(--c-shift); color: #fff; text-shadow: 1px 1px 0 rgba(59,10,42,.35); }

.fab {
  position: fixed;
  right: 16px;
  bottom: 148px;
  width: 62px; height: 62px;
  border-radius: 50%;
  border: 3px solid var(--ink);
  background: linear-gradient(135deg, var(--sun-1), var(--sun-2));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 5px 5px 0 var(--ink);
  z-index: 50;
  transition: transform .12s, box-shadow .12s;
  text-shadow: 1px 1px 0 rgba(59,10,42,.4);
}
.fab:hover { transform: rotate(90deg) scale(1.05); }
.fab:active { transform: translate(4px,4px); box-shadow: 0 0 0 var(--ink); }

/* ============ MODALS ============ */

.overlay[hidden], .paint-bar[hidden] { display: none; }

.overlay {
  position: fixed;
  inset: 0;
  background: var(--backdrop);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: end center;
  z-index: 100;
  padding: 20px 0 0;
}
@media (min-width: 640px) { .overlay { place-items: center; padding: 20px; } }

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--paper);
  border: var(--border);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -6px 0 var(--ink);
  padding: 18px 18px 26px;
  animation: pop-up .22s cubic-bezier(.2,.9,.3,1.2);
}
@media (min-width: 640px) {
  .modal { border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
}
@keyframes pop-up {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; color: var(--sun-1); }
.close-x {
  border: 2px solid var(--ink);
  background: var(--card);
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 1.2rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--ink);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; flex: 1; }
.field > span { font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.field > span em { text-transform: none; letter-spacing: 0; font-weight: 600; }
.field-row { display: flex; gap: 12px; }

.field input[type=text],
.field input[type=date],
.field input[type=time],
.field select {
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  padding: 10px 12px;
  width: 100%;
  outline: none;
}
.field input:focus, .field select:focus { box-shadow: 2.5px 2.5px 0 var(--sun-1); border-color: var(--sun-1); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  font-size: .8rem;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform .1s;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat); border: 1.5px solid var(--ink); }
.chip.selected {
  background: var(--cat, var(--ink));
  color: #fff;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  text-shadow: 1px 1px 0 rgba(59,10,42,.35);
}
.chip.selected .dot { background: var(--card); }
.person-chip.selected { background: var(--ink); }

.checkbox-field .check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .9rem;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 12px;
  box-shadow: 2.5px 2.5px 0 var(--ink);
  padding: 10px 12px;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--sun-1); }

.modal-actions { display: flex; gap: 10px; margin-top: 6px; }
.btn-save {
  flex: 1;
  border: var(--border);
  border-radius: 14px;
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2));
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 13px;
  box-shadow: var(--shadow);
  text-shadow: 1px 1px 0 rgba(59,10,42,.4);
  transition: transform .1s, box-shadow .1s;
}
.btn-save:active { transform: translate(3px,3px); box-shadow: 0 0 0 var(--ink); }
.btn-save.full { width: 100%; margin-top: 8px; }
.btn-danger {
  border: var(--border);
  border-radius: 14px;
  background: var(--card);
  color: #D6335C;
  font-weight: 800;
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
}

/* day sheet */
.day-list { display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.day-empty { color: var(--ink-soft); font-weight: 600; font-size: .9rem; padding: 6px 2px; }

/* login */
.login-overlay { background: linear-gradient(160deg, #FF5E78 0%, #FF9349 55%, #FFC93C 100%); backdrop-filter: none; }
.login-modal { max-width: 380px; text-align: center; }
.login-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  background: linear-gradient(100deg, var(--sun-1), var(--sun-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(1.5px 1.5px 0 var(--ink));
}
.login-title span {
  background: linear-gradient(100deg, var(--sun-2), var(--sun-3));
  -webkit-background-clip: text;
  background-clip: text;
}
.login-sub {
  font-weight: 700;
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 6px 0 20px;
}
.login-modal .field { text-align: left; }
.login-modal .chip-row { justify-content: center; }
.login-modal input { text-align: center; letter-spacing: .3em; font-size: 1.2rem; }
.login-err { color: #D6335C; font-weight: 700; font-size: .85rem; margin-bottom: 10px; }

/* pull to refresh */
.ptr {
  position: fixed;
  top: -58px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--card);
  border: var(--border);
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  z-index: 90;
  transition: transform .3s cubic-bezier(.2, .9, .3, 1.2);
  pointer-events: none;
}
.ptr.dragging { transition: none; }
.ptr.ready { background: linear-gradient(135deg, var(--sun-1), var(--sun-2)); }
.ptr.refreshing .ptr-sun { animation: ptr-spin .7s linear infinite; }
.ptr-sun { display: block; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  border-radius: 999px;
  padding: 10px 20px;
  z-index: 200;
  box-shadow: 3px 3px 0 rgba(59,10,42,.3);
  animation: toast-in .2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ============ DESKTOP TWEAKS ============ */
@media (min-width: 720px) {
  .app { padding: 26px 22px 200px; }
  .fab { right: 22px; bottom: 148px; }
  .day-cell { min-height: 108px; padding: 7px 6px 8px; }
  .pill { font-size: .72rem; }
}
