/* =========================================================
   PLANORA EXTRAS  (extras.css)
   Styles for accounts, toasts, profile settings sheets,
   the streak page and phone-layout fixes.
   Uses the colour tokens already defined in style.css.
   ========================================================= */

/* ---------- Toasts (replace alert pop-ups) ---------- */
#planora-toast-host {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%);
  z-index: 100000000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 420px;
}
@media (min-width: 700px) {
  #planora-toast-host { bottom: 32px; }
}
.planora-toast {
  background: var(--purple-900);
  color: #fff;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(38,33,92,0.25);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease;
  text-align: center;
  pointer-events: auto;
}
.planora-toast.show { opacity: 1; transform: translateY(0); }
.planora-toast.error { background: var(--pink-800); }
.planora-toast.success { background: #0F6E56; }

/* ---------- Login / create account ---------- */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--purple-50);
  border-radius: 14px;
  padding: 4px;
  margin: 22px 0 4px;
  gap: 4px;
}
.auth-tab {
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: background .2s ease, color .2s ease;
}
.auth-tab.active {
  background: #fff;
  color: var(--purple-800);
  box-shadow: 0 1px 4px rgba(83,74,183,0.12);
}
#login-screen .login-form { margin-top: 14px; }
#login-screen .login-form[hidden] { display: none; }
.password-field { position: relative; }
.password-field input { padding-right: 46px; }
.pw-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--gray-400);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pw-toggle:hover { color: var(--purple-600); background: var(--purple-50); }
.auth-error {
  color: var(--pink-800);
  background: #FBEAF0;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}
.auth-error[hidden] { display: none; }
.btn-primary:disabled { opacity: .7; cursor: default; }

#login-screen .sso-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
#login-screen .sso-row #go-dashboard-btn { grid-column: 1 / -1; margin-top: 6px !important; }
#login-screen .sso-row [hidden] { display: none !important; }
.sso-slot { min-width: 0; display: flex; justify-content: center; align-items: center; }
.sso-slot > .btn-secondary { height: 46px; }
.btn-secondary.apple i { font-size: 18px; color: #000; }
.btn-secondary:hover { border-color: var(--purple-200); background: var(--gray-50); }

.skip-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 16px auto 0;
  background: none;
  border: none;
  color: var(--purple-600);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 12px;
}
.skip-link:hover { background: var(--purple-50); }
.skip-link[hidden] { display: none; }
.auth-demo-note {
  text-align: center;
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 14px;
}
.auth-demo-note[hidden] { display: none; }
#login-screen .footer-link[hidden] { display: none; }

.auth-continue {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 0.5px solid var(--purple-100);
  border-radius: 16px;
  padding: 12px 14px;
  margin-top: 18px;
}
.auth-continue[hidden] { display: none; }
.auth-continue-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--purple-400); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.auth-continue-text { display: flex; flex-direction: column; font-size: 12px; color: var(--gray-600); }
.auth-continue-text strong { font-size: 15px; color: var(--purple-900); font-weight: 500; }

/* ---------- Bottom sheets / dialogs ---------- */
.auth-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(38,33,92,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000000;
  animation: fadeIn .2s ease;
}
.auth-sheet-backdrop[hidden] { display: none; }
.auth-sheet {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  width: 100%;
  max-width: 400px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 20px 60px rgba(38,33,92,0.25);
}
.auth-sheet-head { display: flex; align-items: center; gap: 12px; }
.auth-sheet-head > i {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--purple-50); color: var(--purple-600);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  flex-shrink: 0;
}
.auth-sheet-head h3 { font-size: 17px; }
.auth-sheet-head .subtitle { font-size: 12px; }
.auth-sheet-head > div { flex: 1; }
.auth-sheet-close {
  border: none; background: var(--purple-50); color: var(--purple-600);
  width: 34px; height: 34px; border-radius: 10px; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
}
.auth-sheet-info { font-size: 13px; color: var(--gray-600); line-height: 1.5; }
.auth-sheet label { font-size: 12px; color: var(--gray-600); margin-bottom: -6px; }
.auth-sheet .btn-danger {
  width: 100%; padding: 14px; border: none; border-radius: 16px;
  background: var(--pink-800); color: #fff; font-size: 15px; font-weight: 500;
}
.auth-sheet .btn-secondary { padding: 13px; }
.sheet-divider { height: 0.5px; background: var(--purple-100); margin: 4px 0; }
.toggle-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 14px; color: var(--gray-900); padding: 6px 0;
}
.toggle-row small { display: block; color: var(--gray-400); font-size: 12px; margin-top: 2px; }
.switch { position: relative; width: 46px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0; border-radius: 28px; background: var(--gray-200);
  transition: background .2s ease; cursor: pointer;
}
.switch span::after {
  content: ""; position: absolute; width: 22px; height: 22px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--purple-400); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Profile ---------- */
.settings-row { cursor: pointer; transition: background .15s ease; border-radius: 10px; }
.settings-row:hover { background: var(--gray-50); }
.profile-edit-btn { cursor: pointer; }
.profile-info p { word-break: break-all; }
.provider-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--purple-600); background: var(--purple-50);
  border-radius: 999px; padding: 2px 8px; margin-top: 4px;
}

/* ---------- Streak page ---------- */
#streak-screen { padding-bottom: 100px; align-items: stretch; text-align: left; }
#streak-screen .sk-stats .stat-mini { text-align: center; }
@media (min-width: 700px) {
  #streak-screen { padding: 0 !important; }
  #streak-screen.active { display: grid; grid-template-columns: 110px 1fr; gap: 0; }
  #streak-screen .side-rail { display: flex; }
  #streak-screen .dash-main { padding: 36px 48px 40px; overflow-y: auto; max-height: 640px; }
}
.sk-hero {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(135deg, #FDF1DC 0%, var(--amber-100) 100%);
  border-radius: 22px; padding: 22px; margin-bottom: 16px;
}
.sk-hero .flame {
  width: 64px; height: 64px; border-radius: 18px; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #D85A30; flex-shrink: 0;
}
.sk-hero .num { font-size: 40px; font-weight: 600; color: var(--amber-900); line-height: 1; }
.sk-hero .lbl { font-size: 14px; color: var(--amber-800); margin-top: 4px; }
.sk-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.streak-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.streak-month .dow { font-size: 11px; color: var(--gray-400); text-align: center; }
.streak-day {
  aspect-ratio: 1; border-radius: 10px; background: var(--purple-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--gray-600);
}
.streak-day.done { background: var(--purple-400); color: #fff; }
.streak-day.partial { background: var(--purple-100); color: var(--purple-800); }
.streak-day.today { outline: 2px solid var(--purple-600); outline-offset: 1px; }
.streak-day.future { opacity: .4; }
.streak-day.blank { background: transparent; }
.streak-tip { font-size: 13px; color: var(--gray-600); line-height: 1.5; margin-top: 12px; }

/* ---------- Bottom navigation: the active tab was white-on-white ---------- */
.bottom-nav .nav-item { color: var(--gray-400) !important; background: transparent !important; }
.bottom-nav .nav-item.active { color: var(--purple-600) !important; }

/* ---------- Phone layout fixes ---------- */
@media (max-width: 699px) {
  /* The desktop sidebar was showing as a big block at the top on phones;
     phones use the bottom navigation bar instead. */
  .side-rail { display: none !important; }
  .two-col { display: block; }
  .bottom-nav { z-index: 50; }
  .bottom-nav .nav-item { flex: 1; min-width: 0; }
}

/* Keyboard focus that's easy to see */
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--purple-400);
  outline-offset: 2px;
}

/* =========================================================
   ASK PLANORA — one box for everything (smart-planner.js)
   ========================================================= */
.sp-root { display: flex; flex-direction: column; gap: 10px; }
.sp-head { display: flex; align-items: center; justify-content: space-between; }
.sp-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--purple-900); }
.sp-title i { color: var(--purple-400); font-size: 18px; }
.sp-clear {
  border: none; background: var(--purple-50); color: var(--purple-600);
  font-size: 12px; font-weight: 500; border-radius: 10px; padding: 6px 10px;
  display: flex; align-items: center; gap: 4px;
}
.sp-clear[hidden] { display: none; }
.sp-log { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; padding-right: 2px; }
.sp-bubble { padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; max-width: 92%; white-space: pre-wrap; }
.sp-bubble.me { align-self: flex-end; background: var(--purple-400); color: #fff; border-radius: 14px 14px 4px 14px; }
.sp-bubble.ai { align-self: flex-start; background: var(--purple-50); color: var(--gray-900); border-radius: 14px 14px 14px 4px; }
.sp-bubble.ai strong { color: var(--purple-800); font-weight: 600; }
.sp-bubble.error { background: #FBEAF0; color: var(--pink-800); }
.sp-bubble.thinking::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: spDots 1.2s steps(4, end) infinite; }
@keyframes spDots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.sp-after { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-after a {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500;
  color: var(--purple-600); background: #fff; border: 0.5px solid var(--purple-100);
  border-radius: 999px; padding: 6px 12px; text-decoration: none;
}
.sp-examples { display: flex; flex-wrap: wrap; gap: 6px; }
.sp-examples[hidden] { display: none; }
.sp-example {
  border: 0.5px solid var(--purple-100); background: #fff; color: var(--purple-800);
  font-size: 12px; border-radius: 999px; padding: 6px 11px; text-align: left;
}
.sp-example:hover { background: var(--purple-50); }
.sp-input-row { display: flex; gap: 8px; align-items: flex-end; }
.sp-input {
  flex: 1; min-width: 0; resize: none; min-height: 48px; max-height: 160px;
  padding: 12px 14px; border-radius: 14px; border: 0.5px solid var(--purple-100);
  background: var(--purple-50); font-family: inherit; font-size: 14px; line-height: 1.45; color: var(--gray-900); outline: none;
}
.sp-input:focus { background: #fff; border-color: var(--purple-400); box-shadow: 0 0 0 3px var(--purple-50); }
.sp-send {
  flex-shrink: 0; width: 46px; height: 46px; border: none; border-radius: 13px;
  background: var(--purple-400); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sp-send:hover { background: var(--purple-600); }
.sp-send:disabled { opacity: .5; cursor: default; }

.sp-review { border-top: 0.5px solid var(--purple-100); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.sp-review[hidden] { display: none; }
.sp-review-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 500; color: var(--purple-900); }
.sp-review-sum { font-size: 12px; color: var(--gray-600); font-weight: 400; }
.sp-goal { background: linear-gradient(135deg, var(--purple-50), #fff); border: 0.5px solid var(--purple-100); border-radius: 14px; padding: 12px; }
.sp-goal-top { display: flex; gap: 10px; align-items: center; }
.sp-goal-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--purple-400); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.sp-goal-title { font-size: 14px; font-weight: 500; color: var(--purple-900); }
.sp-goal-meta { font-size: 11.5px; color: var(--gray-600); margin-top: 1px; }
.sp-milestones { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.sp-milestones li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gray-900); }
.sp-milestones li i { color: var(--purple-400); font-size: 13px; }
.sp-milestones li span { margin-left: auto; color: var(--gray-400); font-size: 11.5px; white-space: nowrap; }
.sp-day { display: flex; flex-direction: column; gap: 6px; }
.sp-day-label { font-size: 11.5px; font-weight: 600; color: var(--purple-600); text-transform: uppercase; letter-spacing: .04em; }
.sp-task {
  display: flex; align-items: flex-start; gap: 10px; background: #fff;
  border: 0.5px solid var(--purple-100); border-left: 4px solid var(--purple-400);
  border-radius: 12px; padding: 10px 10px 10px 12px;
}
.sp-task.goal { border-left-color: var(--blue-400); }
.sp-task.off { opacity: .45; }
.sp-task.off .sp-task-title { text-decoration: line-through; }
.sp-task-body { flex: 1; min-width: 0; }
.sp-task-title { font-size: 13.5px; font-weight: 500; color: var(--gray-900); word-wrap: break-word; }
.sp-task-meta { font-size: 12px; color: var(--gray-600); margin-top: 2px; display: flex; align-items: center; gap: 4px; }
.sp-task-note { font-size: 11.5px; color: var(--amber-800); background: #FDF1DC; border-radius: 8px; padding: 4px 8px; margin-top: 6px; display: flex; gap: 5px; align-items: flex-start; }
.sp-task-btns { display: flex; gap: 2px; }
.sp-task-btns button { border: none; background: none; color: var(--gray-400); width: 30px; height: 30px; border-radius: 8px; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.sp-task-btns button:hover { background: var(--purple-50); color: var(--purple-600); }
.sp-check { position: relative; width: 20px; height: 20px; margin-top: 1px; flex-shrink: 0; cursor: pointer; }
.sp-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sp-check span { position: absolute; inset: 0; border-radius: 6px; border: 1.5px solid var(--purple-200); background: #fff; }
.sp-check input:checked + span { background: var(--purple-400); border-color: var(--purple-400); }
.sp-check input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.sp-check input:focus-visible + span { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.sp-task.editing { flex-direction: column; align-items: stretch; gap: 8px; border-left-color: var(--amber-100); }
.sp-task.editing input, .sp-task.editing select {
  width: 100%; padding: 9px 10px; font-size: 13px; border-radius: 10px;
  border: 0.5px solid var(--purple-100); background: #fff; font-family: inherit; color: var(--gray-900);
}
.sp-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-edit-grid label:first-child { grid-column: 1 / -1; }
.sp-edit-grid input, .sp-edit-grid select { min-width: 0; }
.sp-edit-grid label { font-size: 11px; color: var(--gray-600); display: flex; flex-direction: column; gap: 3px; }
.sp-edit-actions { display: flex; gap: 8px; }
.sp-edit-actions button { flex: 1; width: auto; min-width: 0; padding: 10px; font-size: 13px; }
.sp-actions { display: flex; gap: 8px; position: sticky; bottom: 0; background: #fff; padding-top: 4px; }

.sp-actions .btn-primary { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px; }
@media (max-width: 420px) {
  .sp-edit-grid { grid-template-columns: 1fr 1fr; }
  .sp-edit-grid label:first-child { grid-column: 1 / -1; }
}

/* Ask Planora on the AI Planner page */
.sp-planner-card { margin-bottom: 18px; }
.sp-planner-card .sp-log { max-height: 360px; }
.more-tools-label { font-size: 12px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; margin: 6px 0 10px; }
.manual-toggle {
  border: none; background: none; color: var(--purple-600); font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 0; margin-bottom: 8px;
}
.goal-sessions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--gray-600); margin-top: 10px; }
.goal-sessions .pill { background: var(--purple-50); color: var(--purple-800); border-radius: 999px; padding: 3px 9px; }
.goal-sessions .pill.next { background: var(--blue-50); color: var(--blue-800); }

/* Keep Ask Planora inside its column on Home and out from under the + button */
.two-col > * { min-width: 0; }
.task-input-panel { min-width: 0; max-width: 100%; }
.sp-actions .btn-secondary, .sp-actions .btn-primary { width: auto; min-width: 0; }
.sp-actions .btn-secondary { flex: 0 0 auto; padding-left: 18px; padding-right: 18px; }
body.sp-reviewing .fab { opacity: 0; pointer-events: none; transform: scale(.8); }
.fab { transition: opacity .2s ease, transform .2s ease; }

/* =========================================================
   PLANORA REDESIGN — calm, one product
   (shared nav, Home, sheets, plan preview, empty states)
   ========================================================= */

:root {
  --pl-radius: 16px;
  --pl-line: rgba(83, 74, 183, 0.14);
  --pl-muted: #4F4A6B;
  --pl-text: #1E1A4D;
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Navigation (rendered by planora-core.js) ---------- */
a.nav-item { text-decoration: none; }
.nav-item span { font-size: 11px; line-height: 1.2; }
.side-rail a.logo-mark { text-decoration: none; }
.side-rail .nav-item { padding: 6px 4px; border-radius: 12px; min-width: 76px; }
.side-rail .nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.side-rail .nav-item.active { color: #fff; background: rgba(255,255,255,0.12); }
.side-rail .nav-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.bottom-nav { align-items: center; padding: 8px 6px calc(10px + env(safe-area-inset-bottom)); }
.bottom-nav .nav-item { min-height: 48px; justify-content: center; }
.bottom-nav .nav-add { flex: 0 0 64px; color: #fff !important; }
.nav-add-circle {
  width: 48px; height: 48px; border-radius: 16px; background: var(--purple-400);
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 6px 16px rgba(127,119,221,0.35); margin-top: -18px;
}
.nav-add-circle i { font-size: 24px; }
.nav-add:active .nav-add-circle { transform: scale(0.96); }
@media (max-width: 699px) {
  /* the + in the bottom bar replaces the floating button on phones */
  body .fab, #app .fab { display: none !important; }
}

/* ---------- Shared type ---------- */
.card-title { font-size: 16px; font-weight: 500; color: var(--pl-text); margin: 0; }
.card-sub { font-size: 13.5px; color: var(--pl-muted); line-height: 1.5; margin: 4px 0 14px; }
.btn-danger {
  width: 100%; padding: 13px; border: none; border-radius: 16px;
  background: var(--pink-800); color: #fff; font-size: 15px; font-weight: 500;
}
.icon-link { color: var(--purple-400); font-size: 20px; display: inline-flex; padding: 4px; border-radius: 8px; }
.icon-link:hover { background: var(--purple-50); }

/* ---------- Home ---------- */
.home-header { align-items: flex-start; margin-bottom: 18px; }
.home-greeting { font-size: 26px; font-weight: 500; color: var(--pl-text); margin: 2px 0 4px; letter-spacing: -0.01em; }
.home-header .ai-greeting-msg { font-size: 14.5px; color: var(--pl-muted); line-height: 1.5; max-width: 52ch; }
.streak-chip {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  background: #FDF1DC; color: var(--amber-900); border-radius: 999px; padding: 7px 12px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
}
.streak-chip i { color: #D85A30; font-size: 16px; }
.streak-chip[hidden] { display: none; }

.home-grid { display: flex; flex-direction: column; gap: 14px; }
.home-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home-left > .card { margin-bottom: 0; }
@media (min-width: 700px) {
  .home-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
  .home-ask { position: sticky; top: 0; margin-top: 0 !important; }
}
.home-ask { margin-top: 0; }

/* Today's focus */
.focus-card[hidden], .first-day-card[hidden] { display: none; }
.focus-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.focus-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-top: 0.5px solid var(--pl-line);
}
.focus-item:first-child { border-top: none; padding-top: 4px; }
.focus-num {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--purple-50); color: var(--purple-800);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600;
}
.focus-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.focus-title { font-size: 15px; color: var(--gray-900); font-weight: 500; overflow-wrap: anywhere; }
.focus-meta { font-size: 12.5px; color: var(--pl-muted); }
.focus-done {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  border: 1px solid var(--purple-100); background: #fff; color: var(--purple-400);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.focus-done:hover { background: var(--purple-400); color: #fff; border-color: var(--purple-400); }

/* Recommendations (0-2) */
.home-recs { display: flex; flex-direction: column; gap: 10px; }
.home-recs:empty { display: none; }
.rec-card {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; align-items: start;
  background: #fff; border: 0.5px solid var(--pl-line); border-left: 3px solid var(--blue-400);
  border-radius: 14px; padding: 14px 14px 12px;
}
.rec-icon { color: var(--blue-600); font-size: 20px; margin-top: 1px; }
.rec-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--gray-900); }
.rec-actions { grid-column: 2; display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.rec-actions .btn-primary { width: auto; padding: 9px 16px; font-size: 13.5px; border-radius: 12px; }
.rec-x {
  border: none; background: none; color: var(--gray-400); width: 36px; height: 36px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 16px;
}
.rec-x:hover { background: var(--purple-50); color: var(--purple-600); }

/* First day */
.first-day-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pick-chip { position: relative; cursor: pointer; }
.pick-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-chip span {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--purple-100); background: #fff; font-size: 13.5px; color: var(--purple-800);
}
.pick-chip span::before { content: "+"; font-weight: 600; color: var(--purple-400); }
.pick-chip input:checked + span { background: var(--purple-400); color: #fff; border-color: var(--purple-400); }
.pick-chip input:checked + span::before { content: "✓"; color: #fff; }
.pick-chip input:focus-visible + span { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.first-day-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.first-day-actions .btn-primary { width: auto; padding: 12px 18px; }
.first-day-actions .btn-primary:disabled { opacity: .55; }

/* Schedule */
.schedule-card .card-header { margin-bottom: 10px; }
.schedule-empty { text-align: center; padding: 18px 8px 8px; color: var(--pl-muted); font-size: 14px; line-height: 1.5; }
.schedule-empty[hidden] { display: none; }
.schedule-empty strong { color: var(--pl-text); font-weight: 500; }
.empty-actions { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.empty-actions .btn-primary, .empty-actions .btn-secondary { width: auto; padding: 10px 16px; font-size: 13.5px; }

.journal-nudge {
  display: flex; align-items: center; gap: 12px; text-decoration: none;
  background: #fff; border: 0.5px solid var(--pl-line); border-radius: 14px; padding: 12px 14px;
  color: var(--gray-900); font-size: 13.5px; line-height: 1.45;
}
.journal-nudge[hidden] { display: none; }
.journal-nudge > i:first-child { font-size: 22px; color: var(--purple-400); }
.journal-nudge span { flex: 1; color: var(--pl-muted); }
.journal-nudge strong { color: var(--pl-text); font-weight: 500; }
.journal-nudge > i:last-child { color: var(--gray-400); }

/* ---------- Ask Planora (updated component) ---------- */
.sp-input-row { position: relative; }
.sp-input { min-height: 52px; font-size: 15px; }
.sp-log[hidden] { display: none; }
.sp-examples { margin-top: -2px; }
.sp-dots { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.sp-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--purple-400); opacity: .35; animation: spDot 1.2s infinite ease-in-out; }
.sp-dots i:nth-child(2) { animation-delay: .15s; }
.sp-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes spDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .sp-dots i { animation: none; opacity: .7; } }
.sp-bubble.thinking::after { content: none; }
.sp-retry {
  display: inline-block; margin-left: 6px; border: none; background: #fff; color: var(--pink-800);
  border-radius: 8px; padding: 4px 10px; font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.sp-task-goal { font-size: 11.5px; color: var(--blue-800); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.sp-task.update { border-left-color: var(--amber-100); }
.sp-from { text-decoration: line-through; color: var(--gray-400); }
.sp-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--pl-muted); }
.sp-milestones li .t { flex: 1; }
.sp-milestones li .d { margin-left: auto; color: var(--gray-400); font-size: 11.5px; white-space: nowrap; }

/* ---------- Sheets (bottom sheet on phones, dialog on desktop) ---------- */
.pl-sheet .auth-sheet { max-width: 440px; }
.pl-sheet .auth-sheet.wide { max-width: 560px; }
.pl-sheet-body { display: flex; flex-direction: column; gap: 12px; }
.pl-sheet .sp-review { border-top: none; padding-top: 0; }
@media (max-width: 699px) {
  .auth-sheet-backdrop { align-items: flex-end; padding: 0; }
  .auth-sheet-backdrop .auth-sheet {
    max-width: none !important; border-radius: 22px 22px 0 0; max-height: 88dvh;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    animation: plSheetUp .22s ease;
  }
}
@keyframes plSheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
body.pl-sheet-open { overflow: hidden; }
.pl-form { display: flex; flex-direction: column; gap: 12px; }
.pl-form input[type="text"], .pl-form input[type="date"], .pl-form input[type="time"], .pl-form select, .pl-form textarea {
  width: 100%; padding: 11px 12px; border-radius: 12px; border: 0.5px solid var(--purple-100);
  background: #fff; font-family: inherit; font-size: 14px; color: var(--gray-900);
}
.pl-form textarea { resize: vertical; line-height: 1.45; }
.pl-hint { font-size: 12.5px; color: var(--pl-muted); line-height: 1.45; margin: 0; }
.pl-row-actions { display: flex; gap: 8px; }
.pl-row-actions > * { flex: 1; width: auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.pl-check-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--gray-900); }
.pl-check-row input { width: 18px; height: 18px; accent-color: var(--purple-400); }
.pl-link-danger { border: none; background: none; color: var(--pink-800); font-size: 13.5px; font-weight: 500; padding: 8px; align-self: center; }
.pl-link-danger:hover { text-decoration: underline; }
.pl-form input[type="range"] { accent-color: var(--purple-400); width: 100%; }

/* Comfortable touch targets */
@media (pointer: coarse) {
  .sp-task-btns button, .rec-x { width: 40px; height: 40px; }
}

/* ---------- Planora page ---------- */
.planora-main .sp-planner-card { margin-bottom: 22px; }
.pl-section { margin-bottom: 22px; }
.pl-section > .card-title { margin-bottom: 10px; }
.pl-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pl-head-btn { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 10px; }
.pl-head-btn:hover { background: var(--purple-50); }

.pl-empty {
  background: #fff; border: 0.5px dashed var(--purple-200); border-radius: var(--pl-radius);
  padding: 22px 18px; text-align: center; color: var(--pl-muted); font-size: 14px; line-height: 1.5;
}
.pl-empty > i { font-size: 28px; color: var(--purple-400); }
.pl-empty p { margin: 6px 0 14px; }
.pl-empty strong { color: var(--pl-text); font-weight: 500; }
.pl-empty .btn-primary { width: auto; padding: 11px 18px; }

.goal-card {
  background: #fff; border: 0.5px solid var(--pl-line); border-radius: var(--pl-radius);
  margin-bottom: 10px; overflow: hidden;
}
.goal-card.achieved { opacity: .8; }
.goal-summary {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  background: none; border: none; text-align: left; color: inherit;
}
.goal-summary:hover { background: var(--gray-50); }
.goal-ring {
  --p: 0; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--purple-400) calc(var(--p) * 1%), var(--purple-50) 0);
  display: flex; align-items: center; justify-content: center;
}
.goal-ring span {
  width: 36px; height: 36px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--purple-800);
}
.goal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.goal-card .goal-title { font-size: 15px; font-weight: 500; color: var(--pl-text); overflow-wrap: anywhere; }
.goal-card .goal-date { font-size: 12.5px; color: var(--pl-muted); }
.goal-chev { color: var(--gray-400); transition: transform .2s ease; }
.goal-summary[aria-expanded="true"] .goal-chev { transform: rotate(180deg); }
.goal-detail { padding: 0 16px 16px; border-top: 0.5px solid var(--pl-line); }
.goal-detail .goal-sessions { margin-top: 12px; }
.goal-detail .goal-milestones { margin-top: 10px; }
.ms-date { margin-left: auto; font-size: 11.5px; color: var(--gray-400); white-space: nowrap; }
.goal-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.goal-actions > button { width: auto; flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 14px; font-size: 13.5px; }
.goal-actions > .danger { flex: 0 0 auto; color: var(--pink-800); }

.quick-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 699px) { .quick-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick-tool.planner-tab, .quick-tool {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
  background: #fff; border: 0.5px solid var(--pl-line); border-radius: 14px; padding: 12px;
  font-size: 13px; font-weight: 500; color: var(--pl-text); width: auto; min-height: 72px;
}
.quick-tool i { font-size: 20px; color: var(--purple-400); margin: 0; }
.quick-tool:hover { border-color: var(--purple-200); background: var(--gray-50); }
.quick-tool.planner-tab.active { background: var(--purple-50); border-color: var(--purple-400); color: var(--purple-800); }
.tool-area { margin-top: 14px; }
.tool-area[hidden] { display: none; }
.tool-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.tool-head .card-sub { margin-bottom: 10px; }
.tool-confirm { margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.in-plan { font-size: 11px; color: #0F6E56; background: #E1F5EE; border-radius: 999px; padding: 2px 8px; margin-left: 6px; white-space: nowrap; }
.in-plan-note { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: #0F6E56; background: #E1F5EE; border-radius: 12px; padding: 10px 12px; margin-top: 12px; }

/* Schedule items: the complete checkbox must be visible */
.task-item .task-check-btn {
  border: 1px solid #9B83DF !important; background: #fff !important;
  width: 32px !important; height: 32px !important; border-radius: 8px !important;
}
/* Tapping a task's name opens Start · Reschedule · Delete */
.task-open { flex: 1; min-width: 0; cursor: pointer; border-radius: 8px; }
.task-open:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 3px; }
.task-item .task-check-btn i { color: transparent; }
.task-item .task-check-btn:hover { border-color: var(--purple-400) !important; background: var(--purple-50) !important; }
.task-item .task-check-btn:hover i, .task-item.completed .task-check-btn i { color: var(--purple-600) !important; }
/* Same edit button as the original Calendar boxes */
.task-item .task-edit-btn {
  width: 32px !important; height: 32px !important; border-radius: 8px !important;
  border: 1px solid var(--purple-100) !important; background: var(--purple-50) !important; color: var(--purple-600) !important;
}
.task-item .task-edit-btn i { font-size: 16px; color: var(--purple-600); }
.task-item .task-edit-btn:hover { background: var(--purple-100) !important; }
.task-item .task-actions { gap: 8px; }
.task-item .t-goal { font-size: 11.5px; color: var(--blue-800); margin-top: 3px; display: flex; gap: 4px; align-items: center; }

/* ---------- Journal: calm first screen + "More" ---------- */
.journal-more {
  margin: 18px 0 8px; background: #fff; border: 0.5px solid var(--pl-line); border-radius: var(--pl-radius);
}
.journal-more > summary {
  list-style: none; cursor: pointer; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px;
  border-radius: var(--pl-radius);
}
.journal-more > summary::-webkit-details-marker { display: none; }
.journal-more > summary span { font-size: 15px; font-weight: 500; color: var(--pl-text); display: flex; align-items: center; gap: 8px; }
.journal-more > summary span::after { content: "\203A"; margin-left: auto; font-size: 20px; color: var(--gray-400); transition: transform .2s ease; }
.journal-more[open] > summary span::after { transform: rotate(90deg); }
.journal-more > summary small { font-size: 12.5px; color: var(--pl-muted); padding-left: 26px; }
.journal-more > summary:hover { background: var(--gray-50); }
.journal-more > summary:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.journal-more-body { padding: 4px 12px 12px; }
.journal-more-body > .card { margin-top: 12px; }
button.goal-item { width: 100%; text-align: left; font: inherit; cursor: pointer; margin-bottom: 8px; }
button.goal-item:hover { border-color: var(--purple-200); }
.journal-goals-empty { font-size: 13px; color: var(--pl-muted); padding: 6px 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.journal-goals-empty button { border: none; background: var(--purple-50); color: var(--purple-800); border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 500; }
.journal-goals-link { display: inline-block; font-size: 12.5px; color: var(--purple-600); margin-top: 4px; text-decoration: none; font-weight: 500; }
.journal-goals-link:hover { text-decoration: underline; }

/* ---------- Phones: every page is a single column ---------- */
@media (max-width: 699px) {
  #dashboard-screen.active, #calendar-screen.active, #profile-screen.active,
  #streak-screen.active, #journal-screen.active, #planner-screen.active {
    display: flex !important; flex-direction: column; grid-template-columns: none !important;
  }
  #journal-screen .journal-main, .dash-main {
    max-height: none !important; overflow: visible !important;
  }
  #journal-screen .journal-main { padding: 24px 16px 120px !important; }
  #journal-screen { padding: 0 !important; }
  .home-greeting { font-size: 24px; }
  .save-bar { bottom: 92px !important; }
}

/* ---------- Calendar ---------- */
.cal-goal-tag { font-size: 11.5px; color: var(--blue-800); margin: 3px 0 0; display: flex; gap: 4px; align-items: center; }
.cal-empty { text-align: center; padding: 18px 8px; color: var(--pl-muted); }
.cal-empty p { margin: 0 0 10px; font-size: 14px; }
.cal-empty .btn-secondary { width: auto; display: inline-flex; padding: 10px 16px; font-size: 13.5px; }

/* ---------- Profile ---------- */
.profile-main > .card { margin-bottom: 14px; }
.profile-progress a.stat-mini { text-decoration: none; color: inherit; }
.profile-progress a.stat-mini:hover { border-color: var(--purple-200); }
.pf-details { margin-top: 14px; border-top: 0.5px solid var(--pl-line); }
.pf-details > summary {
  list-style: none; cursor: pointer; padding: 12px 0 2px; font-size: 14px; font-weight: 500; color: var(--purple-600);
  display: flex; align-items: center; gap: 6px;
}
.pf-details > summary::-webkit-details-marker { display: none; }
.pf-details > summary::after { content: "\203A"; font-size: 18px; transition: transform .2s ease; }
.pf-details[open] > summary::after { transform: rotate(90deg); }
.pf-details > summary:focus-visible { outline: 2px solid var(--purple-400); outline-offset: 2px; border-radius: 6px; }
.pf-details-body { display: flex; flex-direction: column; gap: 18px; padding-top: 12px; }
.pf-block .card-header { margin-bottom: 8px; font-size: 13.5px; color: var(--pl-text); }
.pf-note { font-size: 12.5px; color: var(--pl-muted); margin: 0; }
.profile-badge[hidden] { display: none; }
@media (min-width: 700px) {
  #profile-screen .profile-main { max-width: 640px; }
}

/* =========================================================
   UPGRADE: command centre, focus mode, search, quick add
   ========================================================= */

/* Header side: weekly progress + search */
.home-header-side { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.week-chip {
  display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap;
  background: #fff; color: var(--pl-text); border: 0.5px solid var(--pl-line);
  border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 500;
}
.week-chip[hidden] { display: none; }
.week-chip:hover { border-color: var(--purple-200); }
.icon-btn-round {
  width: 40px; height: 40px; border-radius: 12px; border: 0.5px solid var(--pl-line); background: #fff;
  color: var(--purple-600); display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.icon-btn-round:hover { background: var(--purple-50); }
@media (min-width: 700px) { .home-search { display: none; } }

/* Am I on track? */
.today-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: -4px 0 16px; }
.today-bar[hidden] { display: none; }
.wl { margin: 0; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 13.5px; color: var(--pl-muted); min-width: 0; }
.wl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-400); align-self: center; flex-shrink: 0; }
.wl-label { color: var(--pl-text); font-weight: 600; }
.wl-green .wl-dot { background: #1D9E75; }
.wl-yellow .wl-dot { background: #D9A21B; }
.wl-red .wl-dot { background: #D4537E; }
.wl-red .wl-label { color: var(--pink-800); }
.today-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.today-actions .btn-primary, .today-actions .btn-secondary {
  width: auto; padding: 10px 14px; font-size: 13.5px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px;
}
.today-actions [hidden] { display: none !important; }

/* Next up */
.next-card[hidden] { display: none; }
.next-card { border-left: 4px solid var(--purple-400); }
.next-card.is-detail { box-shadow: 0 0 0 3px var(--purple-50), var(--shadow-card); }
.next-label { margin: 0 0 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--purple-600); }
.next-title { margin: 0; font-size: 19px; font-weight: 500; color: var(--pl-text); line-height: 1.3; overflow-wrap: anywhere; }
.next-meta { margin: 4px 0 0; font-size: 13.5px; color: var(--pl-muted); }
.next-why { margin: 10px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--gray-900); line-height: 1.6; }
.next-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.next-actions .btn-primary { width: auto; padding: 11px 18px; display: inline-flex; align-items: center; gap: 6px; }
.next-actions .btn-secondary { width: auto; padding: 10px 14px; }
.btn-ghost { padding: 8px 10px; border-radius: 10px; }
.btn-ghost:hover { background: var(--purple-50); }

/* Today's focus items (done · open · start) */
.focus-item .focus-body { border: none; background: none; text-align: left; padding: 2px 0; cursor: pointer; font: inherit; color: inherit; }
.focus-item .focus-body:hover .focus-title { color: var(--purple-800); }
.focus-item.is-next .focus-title::after {
  content: "Next"; margin-left: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--purple-600); background: var(--purple-50); border-radius: 999px; padding: 2px 7px; vertical-align: 2px;
}
.focus-start {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; border: none;
  background: var(--purple-50); color: var(--purple-600); display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.focus-start:hover { background: var(--purple-400); color: #fff; }

/* Schedule item extra actions + repeat marker */
.task-item .task-more-btn {
  width: 34px; height: 34px; border-radius: 10px; border: none; background: transparent; color: var(--gray-600);
  display: flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer;
}
.task-item .task-more-btn:hover { background: var(--purple-50); color: var(--purple-600); }
.t-repeat { font-size: 13px; color: var(--purple-400); margin-left: 6px; vertical-align: -1px; }

/* ---------- Focus Mode ---------- */
.focus-mode {
  position: fixed; inset: 0; z-index: 20000000; background: linear-gradient(180deg, #F6F5FF 0%, #EEEDFE 100%);
  display: flex; align-items: center; justify-content: center; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: fadeIn .2s ease;
}
.focus-mode[hidden] { display: none; }
body.focus-open { overflow: hidden; }
.focus-inner { width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.focus-top { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.focus-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--purple-600); display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.focus-icon { width: 44px; height: 44px; border-radius: 14px; border: none; background: #fff; color: var(--purple-600); font-size: 20px; display: flex; align-items: center; justify-content: center; }
.focus-task { margin: 0; font-size: 24px; font-weight: 500; color: var(--pl-text); line-height: 1.3; overflow-wrap: anywhere; }
.focus-goal { margin: 0; font-size: 13.5px; color: var(--pl-muted); display: inline-flex; gap: 6px; align-items: center; }
.focus-ring { width: 220px; height: 220px; margin: 18px 0 -176px; pointer-events: none; }
.focus-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.focus-ring circle { fill: none; stroke-width: 6; }
.focus-ring .bg { stroke: var(--purple-100); }
.focus-ring .fg { stroke: var(--purple-400); stroke-linecap: round; stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transition: stroke-dashoffset 1s linear; }
.focus-mode.is-over .focus-ring .fg { stroke: #1D9E75; }
.focus-time { font-size: 52px; font-weight: 300; font-variant-numeric: tabular-nums; color: var(--pl-text); letter-spacing: -0.02em; height: 176px; display: flex; align-items: center; }
.focus-mode.is-paused .focus-time { opacity: .55; }
.focus-status { min-height: 20px; margin: 4px 0 8px; font-size: 14px; color: var(--pl-muted); }
.focus-actions { display: flex; gap: 10px; width: 100%; margin-top: 6px; }
.focus-actions > button { flex: 1; width: auto; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 15px; }
.focus-exit { border: none; background: none; color: var(--pl-muted); font-size: 13.5px; margin-top: 10px; padding: 10px; }
.focus-exit:hover { color: var(--pink-800); }
.focus-done .focus-check { font-size: 56px; color: #1D9E75; line-height: 1; }
.focus-next { width: 100%; background: #fff; border: 0.5px solid var(--pl-line); border-radius: 16px; padding: 14px; margin: 14px 0 4px; }
.focus-next-title { margin: 4px 0 0; font-size: 16px; font-weight: 500; color: var(--pl-text); }
.focus-pill {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 9000000;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 32px);
  background: var(--purple-900); color: #fff; border: none; border-radius: 999px; padding: 10px 16px;
  font-size: 13.5px; box-shadow: 0 8px 24px rgba(38,33,92,0.3);
}
.focus-pill .fp-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.focus-pill .fp-time { font-variant-numeric: tabular-nums; font-weight: 600; }
.focus-pill.is-paused { background: var(--gray-600); }
@media (max-width: 699px) { .focus-pill { bottom: calc(88px + env(safe-area-inset-bottom)); } }

/* ---------- Toast undo ---------- */
.planora-toast .toast-undo {
  margin-left: 10px; border: none; background: rgba(255,255,255,.18); color: #fff; font-weight: 600;
  border-radius: 8px; padding: 4px 10px; font-size: 13px; cursor: pointer;
}

/* ---------- Quick add ---------- */
.pl-understood { margin: -4px 0 0; font-size: 13px; color: var(--purple-800); background: var(--purple-50); border-radius: 10px; padding: 8px 10px; display: flex; gap: 6px; align-items: flex-start; flex-wrap: wrap; }
.pl-understood[hidden] { display: none; }
.pl-days { display: flex; gap: 6px; flex-wrap: wrap; }
.pl-days[hidden] { display: none; }
.day-chip { position: relative; }
.day-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px; border-radius: 10px; border: 1px solid var(--purple-100); background: #fff; font-size: 13px; color: var(--purple-800); }
.day-chip input:checked + span { background: var(--purple-400); color: #fff; border-color: var(--purple-400); }
.day-chip input:focus-visible + span { outline: 2px solid var(--purple-400); outline-offset: 2px; }
.pl-sheet .btn-secondary.danger { color: var(--pink-800); }

/* ---------- Review ---------- */
.review-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.review-stats > div { background: var(--gray-50); border-radius: 12px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.review-stats strong { font-size: 19px; font-weight: 500; color: var(--pl-text); }
.review-stats span { font-size: 12px; color: var(--pl-muted); }
.review-journal { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- Search ---------- */
.nav-search { background: none; border: none; }
.side-rail .nav-search { color: var(--purple-200); }
.side-rail .nav-search:hover { color: #fff; background: rgba(255,255,255,0.06); }
.pl-search-input {
  width: 100%; padding: 13px 14px; border-radius: 14px; border: 0.5px solid var(--purple-100);
  background: var(--purple-50); font-size: 15px; font-family: inherit; color: var(--gray-900);
}
.pl-search-input:focus { outline: none; background: #fff; border-color: var(--purple-400); box-shadow: 0 0 0 3px var(--purple-50); }
.pl-search-results { display: flex; flex-direction: column; gap: 2px; max-height: 55dvh; overflow-y: auto; }
.pl-search-group { margin: 10px 0 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--purple-600); }
.pl-search-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; text-decoration: none; color: inherit;
  background: none; border: none; border-radius: 10px; padding: 9px 8px; font: inherit; cursor: pointer;
}
.pl-search-row:hover, .pl-search-row:focus-visible { background: var(--gray-50); }
.pl-search-row > i { color: var(--purple-400); font-size: 18px; margin-top: 1px; }
.pl-search-row span { display: flex; flex-direction: column; min-width: 0; }
.pl-search-row strong { font-weight: 500; font-size: 14px; color: var(--pl-text); overflow-wrap: anywhere; }
.pl-search-row small { font-size: 12.5px; color: var(--pl-muted); }

/* ---------- Ask Planora: what-now card + follow-up actions ---------- */
.sp-now { margin-top: 8px; }
.sp-now-why { margin: 0 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.55; }
.sp-now-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sp-now-actions .btn-primary, .sp-now-actions .btn-secondary { width: auto; padding: 9px 14px; font-size: 13.5px; border-radius: 12px; display: inline-flex; align-items: center; gap: 6px; }
.sp-action {
  border: 0.5px solid var(--purple-100); background: #fff; color: var(--purple-600); font-size: 12.5px; font-weight: 500;
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.sp-action:hover { background: var(--purple-50); }
.sp-bubble .sp-after { margin-top: 8px; }
.pl-understood { flex-wrap: nowrap; }
.pl-understood > i { margin-top: 2px; }
@media (max-width: 699px) {
  .home-header .week-chip { display: none; }
  .home-header { gap: 10px; }
}

/* ---------- Calendar: Month | Week ---------- */
.view-toggle { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--purple-50); border-radius: 12px; padding: 3px; gap: 3px; margin: 0 0 14px; }
.view-toggle button { border: none; background: transparent; border-radius: 9px; padding: 8px 18px; font-size: 13.5px; font-weight: 500; color: var(--pl-muted); min-height: 38px; }
.view-toggle button[aria-selected="true"] { background: #fff; color: var(--purple-800); box-shadow: 0 1px 4px rgba(83,74,183,0.12); }
#monthView[hidden], .week-view[hidden] { display: none; }
.wk-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wk-nav h3 { margin: 0; font-size: 16px; font-weight: 500; color: var(--pl-text); }
.wk-nav button { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--purple-400); color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.wk-summary { font-size: 13px; color: var(--pl-muted); margin: 8px 0 10px; }
.wk-today { border: none; background: none; color: var(--purple-600); font-weight: 500; font-size: 13px; padding: 0; cursor: pointer; }

.wk-grid {
  display: grid; grid-template-columns: 46px repeat(7, minmax(0, 1fr));
  grid-template-rows: auto auto calc(var(--px) * var(--rows));
  max-height: 560px; overflow-y: auto; background: #fff; border: 0.5px solid var(--pl-line); border-radius: 14px;
}
.wk-head { position: sticky; top: 0; z-index: 3; background: #fff; text-align: center; padding: 8px 2px; border-bottom: 0.5px solid var(--pl-line); display: flex; flex-direction: column; gap: 1px; }
.wk-head span { font-size: 11px; color: var(--pl-muted); }
.wk-head strong { font-size: 15px; font-weight: 500; color: var(--pl-text); }
.wk-head.is-today strong { color: #fff; background: var(--purple-400); border-radius: 999px; width: 28px; height: 28px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.wk-allday-label { font-size: 10px; color: var(--pl-muted); padding: 6px 2px; text-align: right; border-bottom: 0.5px solid var(--pl-line); }
.wk-allday { border-left: 0.5px solid var(--pl-line); border-bottom: 0.5px solid var(--pl-line); padding: 4px 3px; display: flex; flex-direction: column; gap: 3px; min-height: 30px; }
.wk-times { position: relative; }
.wk-times span { position: absolute; right: 6px; transform: translateY(-6px); font-size: 10.5px; color: var(--gray-400); }
.wk-col { position: relative; border-left: 0.5px solid var(--pl-line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--px) - 1px), rgba(83,74,183,0.08) calc(var(--px) - 1px), rgba(83,74,183,0.08) var(--px)); }
.wk-col.is-today { background-color: rgba(238,237,254,0.45); }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: #D4537E; z-index: 2; }
.wk-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: #D4537E; }

.wk-task { display: flex; align-items: flex-start; gap: 4px; background: var(--purple-50); border-left: 3px solid var(--purple-400); border-radius: 8px; overflow: hidden; }
.wk-task.is-goal { background: var(--blue-50); border-left-color: var(--blue-400); }
.wk-task.is-study { background: #E1F5EE; border-left-color: #1D9E75; }
.wk-task.is-high { box-shadow: inset 0 0 0 1px rgba(212,83,126,0.35); }
.wk-task.is-done { opacity: .55; }
.wk-task.is-done .wk-title { text-decoration: line-through; }
.wk-timed { position: absolute; z-index: 1; }
.wk-open { flex: 1; min-width: 0; border: none; background: none; text-align: left; padding: 3px 4px 3px 0; cursor: pointer; display: flex; flex-direction: column; font: inherit; color: inherit; }
.wk-title { font-size: 11.5px; font-weight: 500; color: var(--pl-text); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wk-title i { font-size: 11px; color: var(--purple-400); }
.wk-time { font-size: 10.5px; color: var(--pl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-check { flex-shrink: 0; width: 18px; height: 18px; margin: 4px 0 0 3px; border-radius: 5px; border: 1.5px solid var(--purple-200); background: #fff; color: transparent; font-size: 12px; display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; }
.wk-check:hover, .wk-task.is-done .wk-check { color: var(--purple-600); border-color: var(--purple-400); }
.wk-chip .wk-time { display: none; }

/* phones: day-by-day list */
.wk-list { display: flex; flex-direction: column; gap: 10px; }
.wk-day { background: #fff; border: 0.5px solid var(--pl-line); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.wk-day.is-today { border-color: var(--purple-400); }
.wk-day h3 { margin: 0 0 2px; font-size: 13.5px; font-weight: 600; color: var(--pl-text); }
.wk-empty { margin: 0; font-size: 13px; color: var(--gray-400); }
.wk-row { padding: 6px 4px; border-radius: 10px; }
.wk-row .wk-check { width: 24px; height: 24px; margin: 4px 4px 0 2px; }
.wk-row .wk-title { font-size: 14px; }
.wk-row .wk-time { font-size: 12px; white-space: normal; }
.task-more-btn { width: 34px; height: 34px; border-radius: 10px; border: none; background: transparent; color: var(--gray-600); display: inline-flex; align-items: center; justify-content: center; font-size: 18px; cursor: pointer; }
.task-more-btn:hover { background: var(--purple-50); color: var(--purple-600); }
.wk-head { height: 54px; box-sizing: border-box; }
.wk-allday, .wk-allday-label { position: sticky; top: 54px; z-index: 3; background: #fff; }
.goal-next { background: var(--gray-50); border-radius: 12px; padding: 12px; margin-top: 12px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.goal-next-when { margin: 0; font-size: 15px; font-weight: 500; color: var(--pl-text); }
.goal-next-what { margin: 0 0 8px; font-size: 13.5px; color: var(--pl-muted); }
.goal-next .btn-primary { width: auto; padding: 10px 16px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.goal-next-line { color: var(--purple-600) !important; }
.journal-review-note { margin: 0 0 8px; font-size: 13.5px; color: var(--purple-800); background: var(--purple-50); border-radius: 10px; padding: 8px 12px; }
.pf-secondary { margin: 10px 0 0; font-size: 13px; color: var(--pl-muted); }
.pf-secondary a { color: var(--pl-muted); text-decoration: none; }
.pf-secondary a:hover { color: var(--purple-600); }


/* =========================================================
   Today's focus rows use the original task box
   (white card · purple left border · title + time · buttons on the right)
   ========================================================= */
.focus-list { gap: 0; }
.focus-list .focus-item {
  background: #fff;
  border-radius: 14px;
  padding: 13px 15px;
  border: 0.5px solid var(--purple-100);
  border-left: 4px solid var(--purple-400);
  margin-bottom: 8px;
  gap: 10px;
}
.focus-list .focus-item:first-child { border-top: 0.5px solid var(--purple-100); padding-top: 13px; }
.focus-list .focus-item:last-child { margin-bottom: 0; }
.focus-list .focus-item .focus-body { padding: 0; gap: 2px; }
.focus-list .focus-title { font-size: 14px; font-weight: 500; color: var(--gray-900); }
.focus-list .focus-meta { font-size: 12px; color: var(--gray-400); margin-top: 0; }
.focus-list .focus-row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.focus-list .focus-start {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--purple-100); background: var(--purple-50); color: var(--purple-600); font-size: 16px;
}
.focus-list .focus-start:hover { background: var(--purple-100); }
.focus-list .focus-done {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid #9B83DF; background: #fff; color: transparent; font-size: 18px;
}
.focus-list .focus-done:hover { background: var(--purple-50); color: var(--purple-600); border-color: var(--purple-600); }

/* Today's schedule: Start button (opens the Focus timer), same look as the edit button */
.task-item .task-start-btn {
  width: 32px; height: 32px; border-radius: 8px; padding: 0; cursor: pointer;
  border: 1px solid var(--purple-100); background: var(--purple-50); color: var(--purple-600);
  display: flex; align-items: center; justify-content: center;
}
.task-item .task-start-btn i { font-size: 16px; color: var(--purple-600); }
.task-item .task-start-btn:hover { background: var(--purple-100); }


/* =========================================================
   CALENDAR — Month · Week · Day  (calendar-views.js)
   Tasks: white card, coloured left edge, checkbox.
   Events: soft colour fill, calendar icon, no checkbox.
   ========================================================= */
.legacy-month[hidden] { display: none !important; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.cv-nav { display: flex; align-items: center; gap: 4px; }
.cv-btn {
  height: 38px; min-width: 38px; border: 1px solid var(--purple-100); background: #fff; border-radius: 10px;
  color: var(--purple-800); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 14px;
}
.cv-btn:hover { background: var(--purple-50); }
.cv-today { padding: 0 14px; font-weight: 500; }
.cv-arrow i { font-size: 18px; }
.cv-range {
  border: none; background: none; font: inherit; font-size: 18px; font-weight: 500; color: var(--purple-900);
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 10px; min-height: 40px; cursor: pointer;
}
.cv-range:hover { background: var(--purple-50); }
.cv-range i { font-size: 16px; color: var(--purple-600); }
.cv-switch { margin-left: auto; display: inline-grid; grid-template-columns: repeat(3, 1fr); background: var(--purple-50); border-radius: 12px; padding: 3px; gap: 3px; }
.cv-switch button { border: none; background: transparent; border-radius: 9px; padding: 7px 16px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--pl-muted, #6b6880); min-height: 36px; cursor: pointer; }
.cv-switch button[aria-selected="true"] { background: #fff; color: var(--purple-800); box-shadow: 0 1px 4px rgba(83,74,183,0.12); }
@media (max-width: 699px) {
  .cal-toolbar { gap: 8px; }
  .cv-range { order: -1; width: 100%; justify-content: flex-start; font-size: 17px; padding-left: 2px; }
  .cv-switch button { padding: 7px 10px; font-size: 13px; }
  .cv-today { padding: 0 11px; }
  .cv-nav { gap: 3px; }
}

/* date picker */
.cv-picker {
  position: absolute; z-index: 100000; width: 280px; background: #fff; border-radius: 16px; padding: 12px;
  box-shadow: 0 12px 36px rgba(38,33,92,.22); border: 1px solid var(--purple-100);
}
.cvp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.cvp-head strong { font-size: 14.5px; font-weight: 600; color: var(--purple-900); }
.cvp-head button, .cvp-grid button, .cvp-today { border: none; background: none; cursor: pointer; font: inherit; }
.cvp-head button { width: 34px; height: 34px; border-radius: 50%; color: var(--purple-800); font-size: 17px; }
.cvp-head button:hover, .cvp-grid button:hover { background: var(--purple-50); }
.cvp-dow, .cvp-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cvp-dow span { font-size: 11px; color: var(--gray-400); padding: 4px 0; }
.cvp-grid button { height: 34px; border-radius: 50%; font-size: 13px; color: var(--gray-900); }
.cvp-grid .is-out { color: var(--gray-400); }
.cvp-grid .is-today { color: var(--purple-600); font-weight: 700; }
.cvp-grid .is-selected { background: var(--purple-400) !important; color: #fff; }
.cvp-today { width: 100%; margin-top: 6px; padding: 9px; border-radius: 10px; color: var(--purple-700, #534AB7); font-weight: 500; background: var(--purple-50) !important; }

/* month */
.mv { background: #fff; border: 1px solid var(--purple-100); border-radius: 16px; overflow: hidden; }
.mv-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--purple-100); }
.mv-dow span { font-size: 11.5px; color: var(--gray-600); text-align: center; padding: 8px 0; font-weight: 500; }
.mv-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(104px, auto); }
.mv-day { border-right: 1px solid #EFEDFA; border-bottom: 1px solid #EFEDFA; padding: 4px; min-width: 0; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.mv-day:nth-child(7n) { border-right: none; }
.mv-day:hover { background: #FBFAFF; }
.mv-day.is-out { background: #FAFAFD; }
.mv-day.is-out .mv-num { color: var(--gray-400); }
.mv-num { align-self: flex-start; width: 26px; height: 26px; border-radius: 50%; border: none; background: none; font: inherit; font-size: 12.5px; color: var(--gray-900); cursor: pointer; flex-shrink: 0; }
.mv-day.is-today .mv-num { background: var(--purple-400); color: #fff; font-weight: 600; }
.mv-day.is-selected:not(.is-today) .mv-num { background: var(--purple-50); color: var(--purple-800); font-weight: 600; }
.mv-item {
  display: flex; align-items: center; gap: 4px; width: 100%; border: none; font: inherit; font-size: 11.5px; line-height: 1.2;
  text-align: left; padding: 2px 5px; border-radius: 6px; white-space: nowrap; overflow: hidden; min-height: 21px; cursor: pointer; color: var(--gray-900);
}
.mv-item i { font-size: 13px; color: var(--c); flex-shrink: 0; }
.mv-item .t { overflow: hidden; text-overflow: ellipsis; }
.mv-item b { font-weight: 600; color: var(--gray-600); }
.mv-item.is-event { background: var(--s); border-left: 3px solid var(--c); }
.mv-item.is-task { background: #fff; border: 1px solid var(--purple-100); }
.mv-item.is-done .t { text-decoration: line-through; color: var(--gray-400); }
.mv-item:hover { filter: brightness(0.97); }
.mv-more { border: none; background: none; font: inherit; font-size: 11.5px; color: var(--purple-600); text-align: left; padding: 1px 5px; cursor: pointer; font-weight: 500; }
.mv-dots { display: flex; flex-wrap: wrap; gap: 3px; padding: 2px 3px; align-items: center; }
.mv-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); display: block; }
.mv-dots i.is-task { border-radius: 2px; background: transparent; border: 1.5px solid var(--c); width: 7px; height: 7px; box-sizing: border-box; }
.mv-dots i.is-task.is-done { background: var(--c); opacity: .5; }
.mv-dots b { font-size: 9.5px; color: var(--gray-600); font-weight: 600; }
@media (max-width: 699px) {
  .mv-grid { grid-auto-rows: 58px; }
  .mv-day { padding: 3px 1px; align-items: center; }
  .mv-num { align-self: center; width: 28px; height: 28px; font-size: 13px; }
  .mv-dots { justify-content: center; }
}

/* week / day time grid */
.tg-scroll { overflow: auto; position: relative; border: 1px solid var(--purple-100); border-radius: 16px; background: #fff; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.tg { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(var(--colmin), 1fr)); position: relative; min-width: calc(56px + var(--days) * var(--colmin)); }
.tg-corner, .tg-head { position: sticky; top: 0; z-index: 6; background: #fff; border-bottom: 1px solid var(--purple-100); }
.tg-corner { left: 0; z-index: 7; display: flex; align-items: flex-end; justify-content: flex-end; font-size: 10px; color: var(--gray-400); padding: 0 6px 8px 2px; }
.tg-head { border-left: 1px solid #EFEDFA; padding: 6px 4px; min-width: 0; }
.tg-date { display: flex; flex-direction: column; align-items: center; border: none; background: none; width: 100%; cursor: pointer; padding: 2px; font: inherit; border-radius: 10px; }
.tg-date:hover { background: var(--purple-50); }
.tg-date .dow { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-600); font-weight: 500; }
.tg-date .num { font-size: 20px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--gray-900); }
.tg-head.is-today .dow { color: var(--purple-600); }
.tg-head.is-today .num { background: var(--purple-400); color: #fff; font-weight: 600; }
.tg-head.is-selected:not(.is-today) .num { background: var(--purple-50); color: var(--purple-800); }
.tg.is-day .tg-date { flex-direction: row; justify-content: flex-start; gap: 10px; padding-left: 8px; }
.tg-allday { display: flex; flex-direction: column; gap: 3px; margin-top: 4px; max-height: 84px; overflow-y: auto; }
.tg-allday:empty { display: none; }
.ad-item { display: flex; align-items: center; gap: 4px; border-radius: 6px; font-size: 11.5px; min-height: 24px; padding: 1px 4px; min-width: 0; }
.ad-item.is-event { border: none; background: var(--s); border-left: 3px solid var(--c); font: inherit; font-size: 11.5px; text-align: left; cursor: pointer; }
.ad-item.is-event i { color: var(--c); }
.ad-item.is-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item.is-task { background: #fff; border: 1px solid var(--purple-100); border-left: 3px solid var(--c); cursor: grab; }
.ad-open { border: none; background: none; font: inherit; font-size: 11.5px; text-align: left; padding: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: inherit; color: var(--gray-900); flex: 1; }
.ad-open small { color: var(--gray-400); }
.ad-item.is-done .ad-open { text-decoration: line-through; color: var(--gray-400); }
.tg-gutter { position: sticky; left: 0; z-index: 5; background: #fff; height: calc(24 * var(--hour)); }
.tg-gutter span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 10.5px; color: var(--gray-400); white-space: nowrap; }
.tg-col {
  position: relative; height: calc(24 * var(--hour)); border-left: 1px solid #EFEDFA; min-width: 0;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), #EFEDFA calc(var(--hour) - 1px), #EFEDFA var(--hour));
}
.tg-col.is-today { background-color: #FCFBFF; }
.tg-empty { text-align: center; color: var(--gray-400); font-size: 13px; margin: 10px 0 0; }

.blk {
  position: absolute; border-radius: 8px; overflow: hidden; display: flex; align-items: flex-start; gap: 5px; padding: 3px 6px 3px 5px;
  box-sizing: border-box; cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; z-index: 2;
}
.blk.is-task { background: #fff; border: 1px solid var(--purple-100); border-left: 4px solid var(--c); box-shadow: 0 1px 3px rgba(38,33,92,.08); }
.blk.is-event { background: var(--s); border: 1px solid transparent; border-left: 4px solid var(--c); border-radius: 10px; }
.blk:hover { z-index: 3; box-shadow: 0 4px 12px rgba(38,33,92,.14); }
.blk-check {
  flex-shrink: 0; width: 18px; height: 18px; border: 1.5px solid var(--c); border-radius: 5px; background: #fff; padding: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 12px; cursor: pointer;
}
.blk-check:hover { color: var(--c); }
.is-done > .blk-check, .ad-item.is-done .blk-check { background: var(--c); color: #fff; }
.blk.is-done { opacity: .62; }
.blk.is-done .blk-title { text-decoration: line-through; }
.blk-body { border: none; background: none; text-align: left; padding: 0; min-width: 0; flex: 1; display: flex; flex-direction: column; cursor: inherit; color: inherit; font: inherit; }
.blk-title { font-weight: 500; font-size: 12.5px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-900); }
.blk-title i { color: var(--c); margin-right: 3px; font-size: 13px; vertical-align: -2px; }
.blk-time { font-size: 11px; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.is-short { align-items: center; padding-top: 1px; padding-bottom: 1px; }
.blk.is-short .blk-body { flex-direction: row; gap: 6px; align-items: baseline; }
.blk.is-short .blk-check { width: 15px; height: 15px; margin-top: 0; font-size: 10px; }
.tg.is-day .blk-title { font-size: 13.5px; }
.tg.is-day .blk-time { font-size: 12px; }
.blk-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.blk-resize::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 20px; height: 3px; border-radius: 2px; background: var(--c); opacity: 0; transform: translateX(-50%); }
.blk:hover .blk-resize::after { opacity: .7; }
html.is-touch .blk-resize { height: 14px; }
html.is-touch .blk-resize::after { opacity: .45; }
.blk.is-dragging { opacity: .3; }
.blk-ghost { z-index: 8; pointer-events: none; flex-direction: column; gap: 0; box-shadow: 0 10px 28px rgba(38,33,92,.28); border: 2px solid var(--c) !important; background: #fff; }
.blk-ghost.is-event { background: var(--s); }
.blk-ghost.is-new { border: 2px dashed var(--purple-400) !important; box-shadow: none; background: rgba(238,237,254,.9); }
.blk-ghost.is-new.is-event { border-color: #3B6FD4 !important; background: rgba(230,240,252,.9); }
body.cv-dragging, body.cv-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: #E24B4A; z-index: 4; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #E24B4A; }
.tg-now span { position: absolute; right: 4px; top: -19px; font-size: 10.5px; color: #fff; background: #E24B4A; padding: 1px 7px; border-radius: 999px; font-weight: 600; white-space: nowrap; }

/* Task vs Event labels (sheets, previews) */
.item-kind { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; margin: 0 0 8px; }
.item-kind.is-task { background: var(--purple-50); color: var(--purple-800); }
.item-kind.is-event { background: #E6F0FC; color: #24519E; }
.sp-task-body .item-kind { margin: 0 0 3px; font-size: 10px; padding: 2px 7px; }
.sp-task-extra { font-size: 12px; color: var(--gray-600); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.ev-details { margin: 6px 0 14px; display: grid; gap: 6px; }
.ev-details div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; font-size: 14px; }
.ev-details dt { color: var(--gray-600); }
.ev-details dd { margin: 0; color: var(--gray-900); overflow-wrap: anywhere; }
.ev-details .muted { color: var(--gray-400); }
.create-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.create-opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--purple-100); background: #fff; border-radius: 16px; padding: 16px 14px; text-align: left; cursor: pointer; font: inherit; }
.create-opt:hover { background: var(--purple-50); border-color: var(--purple-200, #AFA9EC); }
.create-opt i { font-size: 24px; color: var(--purple-600); }
.create-opt.is-event i { color: #3B6FD4; }
.create-opt strong { display: block; font-size: 15px; color: var(--purple-900); }
.create-opt small { display: block; font-size: 12px; color: var(--gray-600); margin-top: 2px; }
@media (max-width: 420px) { .create-choice { grid-template-columns: 1fr; } }
.seg { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--purple-50); border-radius: 12px; padding: 3px; gap: 3px; }
.seg button { border: none; background: transparent; border-radius: 9px; padding: 8px 16px; font: inherit; font-size: 14px; font-weight: 500; color: var(--gray-600); min-height: 38px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.seg button[aria-selected="true"] { background: #fff; color: var(--purple-800); box-shadow: 0 1px 4px rgba(83,74,183,0.12); }
.slot-when { display: flex; align-items: center; gap: 6px; margin: 0; }
.slot-create [hidden] { display: none !important; }
.slot-more summary { cursor: pointer; font-size: 13.5px; color: var(--purple-600); padding: 4px 0; }
.slot-more[open] summary { margin-bottom: 6px; }

/* Home: events in Today's schedule (same box, no checkbox) */
.task-item.event-item { border-left-color: var(--c, #3B6FD4); background: linear-gradient(90deg, var(--s, #E6F0FC) 0, #fff 70%); }
.kind-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #24519E; background: #E6F0FC; border-radius: 999px; padding: 1px 7px 1px 5px; margin-right: 7px; vertical-align: 1px; }
.kind-tag i { font-size: 11px; }
/* bigger tick target on touch screens (the box stays small, the tap area grows) */
.blk-check { position: relative; }
html.is-touch .blk-check { width: 22px; height: 22px; }
html.is-touch .blk-check::after { content: ""; position: absolute; inset: -9px; }
html.is-touch .blk.is-short .blk-check { width: 18px; height: 18px; }


/* =========================================================
   HOME — calmer layout (Oct 2026)
   Header: greeting on the left; search + Planora on the right.
   Ask Planora opens in a pop-up. Main column: Today's schedule.
   Side column: journal check-in + shortcuts.
   ========================================================= */
.home-header-side { flex-direction: column; align-items: flex-end; gap: 10px; }
.home-header-row { display: flex; align-items: center; gap: 8px; }
@media (min-width: 700px) { .home-header .home-search { display: inline-flex !important; } }
.planora-btn {
  display: inline-flex; align-items: center; gap: 7px; border: none; cursor: pointer; font: inherit;
  font-size: 14.5px; font-weight: 600; color: #fff; padding: 10px 18px; min-height: 42px; border-radius: 999px;
  background: linear-gradient(135deg, #8E86E6 0%, #534AB7 100%);
  box-shadow: 0 6px 16px rgba(83, 74, 183, .28); transition: transform .15s ease, box-shadow .15s ease;
}
.planora-btn i { font-size: 17px; }
.planora-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(83, 74, 183, .34); }
.planora-btn:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }

/* today at a glance: one quiet card */
.today-bar {
  background: rgba(255, 255, 255, .72); border: 1px solid var(--purple-100); border-radius: 18px;
  padding: 12px 14px 12px 16px; margin: 0 0 16px !important;
}
.today-actions .btn-primary, .today-actions .btn-secondary { min-height: 38px; padding: 8px 14px !important; font-size: 13.5px !important; border-radius: 12px !important; width: auto !important; margin: 0 !important; }

/* two calm columns on wide screens, one on phones */
.home-grid { display: flex; flex-direction: column; gap: 16px; }
.home-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 900px) {
  .home-grid { display: grid !important; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 20px; align-items: start; }
  .home-right { position: sticky; top: 0; }
}
@media (min-width: 700px) and (max-width: 899px) { .home-grid { display: flex !important; } }

/* shortcuts */
.home-links { background: #fff; border: 1px solid var(--purple-100); border-radius: 18px; padding: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; box-shadow: var(--shadow-card, 0 1px 3px rgba(38,33,92,.06)); }
.home-links-title { grid-column: 1 / -1; margin: 0 0 2px 2px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); }
.home-links a, .home-links button {
  display: flex; align-items: center; gap: 9px; padding: 11px 12px; min-height: 46px; border-radius: 14px; border: none; cursor: pointer;
  background: var(--purple-50); color: var(--purple-900); font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; text-align: left;
}
.home-links a:hover, .home-links button:hover { background: var(--purple-100); }
.home-links i { font-size: 18px; color: var(--purple-600); }
@media (max-width: 899px) {
  .home-links { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px; gap: 6px; }
  .home-links-title { display: none; }
  .home-links a, .home-links button { flex-direction: column; justify-content: center; gap: 4px; padding: 10px 4px; font-size: 12px; text-align: center; min-height: 60px; }
  .home-links i { font-size: 20px; }
}

/* Ask Planora pop-up */
.ask-pop {
  position: fixed; inset: 0; z-index: 9000; background: rgba(38, 33, 92, .38);
  display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 24px; overflow-y: auto;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: askFade .18s ease;
}
.ask-pop[hidden] { display: none; }
.ask-pop-panel { position: relative; width: min(640px, 100%); animation: askUp .22s ease; }
.ask-pop .home-ask { margin: 0 !important; position: static !important; border-radius: 24px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(38, 33, 92, .3); max-height: 86vh; overflow-y: auto; }
.ask-pop-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 12px; border: none; cursor: pointer;
  background: var(--purple-50); color: var(--purple-800); font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.ask-pop-close:hover { background: var(--purple-100); }
.ask-pop .sp-head { padding-right: 46px; }
body.ask-open { overflow: hidden; }
body.ask-open .fab { opacity: 0; pointer-events: none; }
@keyframes askFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes askUp { from { transform: translateY(14px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (max-width: 699px) {
  .ask-pop { align-items: flex-end; padding: 0; }
  .ask-pop-panel { width: 100%; }
  .ask-pop .home-ask { border-radius: 24px 24px 0 0; max-height: 90dvh; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .ask-pop, .ask-pop-panel { animation: none; } }

/* phones: header keeps the greeting readable */
@media (max-width: 699px) {
  .home-header .planora-btn { padding: 9px 14px; font-size: 14px; min-height: 40px; }
}

/* Calendar month: the whole card is white (other months' days just have grey numbers) */
.mv, .mv-dow, .mv-grid, .mv-day, .mv-day.is-out { background: #fff !important; }
.mv-day:hover { background: #fff !important; box-shadow: inset 0 0 0 2px var(--purple-50); }
.home-right > * { width: 100%; box-sizing: border-box; }
@media (max-width: 699px) {
  .home-header { display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date side" "greet side" "msg msg"; column-gap: 12px; align-items: start; }
  .home-header > div:first-child { display: contents; }
  .home-header .date { grid-area: date; }
  .home-header .home-greeting { grid-area: greet; }
  .home-header .ai-greeting-msg { grid-area: msg; margin-top: 6px; }
  .home-header-side { grid-area: side; gap: 8px; }
  .home-header .week-chip { display: none !important; }
  .today-bar { padding: 12px; }
  .today-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 8px; }
  .today-actions .btn-primary, .today-actions .btn-secondary { justify-content: center; font-size: 13px !important; padding: 8px 8px !important; }
}
@media (max-width: 899px) {
  .home-grid { align-items: stretch !important; }
  /* one column: shortcuts first (easy to reach), then suggestions, schedule, journal */
  .home-left, .home-right { display: contents; }
  #first-day { order: 1; }
  #home-recs { order: 2; }
  #schedule-card { order: 3; }
  .home-links { order: 4; }
  #journal-nudge { order: 5; }
  .home-grid > * { width: 100%; box-sizing: border-box; }
}


/* =========================================================
   SIGN IN / CREATE ACCOUNT (Supabase) — index.html, reset-password.html
   ========================================================= */
#login-screen { align-items: center; justify-content: flex-start; }
.auth-card { width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
.auth-card [hidden] { display: none !important; }
.auth-card .logo-mark { margin-bottom: 8px; }
.auth-brand { font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--purple-600); margin: 0 0 18px; }
.auth-main { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.auth-title { font-size: 25px !important; font-weight: 600 !important; margin: 0 0 6px !important; color: var(--purple-900); }
.auth-subtitle { margin: 0 0 22px !important; }
.auth-checking { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 0; color: var(--purple-600); font-size: 15px; }
.auth-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--purple-100); border-top-color: var(--purple-400); animation: planoraSpin .8s linear infinite; }
@keyframes planoraSpin { to { transform: rotate(360deg); } }
.auth-banner { text-align: left; font-size: 13.5px; line-height: 1.45; border-radius: 12px; padding: 10px 12px; margin: 0 0 14px; background: var(--purple-50); color: var(--purple-900); border: 1px solid var(--purple-100); }
.auth-banner.is-error { background: #FBEAF0; color: #8E1F48; border-color: #F4C0D1; }
.auth-banner.is-warn { background: #FDF3E0; color: #7A4B0A; border-color: #F2D7A5; }
.oauth-buttons { display: flex; flex-direction: column; gap: 10px; }
.oauth-btn {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .08s ease, border-color .15s ease;
}
.oauth-btn .oauth-icon { width: 20px; height: 20px; flex-shrink: 0; }
.oauth-btn.google { background: #fff; color: #1f1f1f; border: 1px solid #DADCE0; }
.oauth-btn.google:hover { background: #F8F9FA; box-shadow: 0 1px 3px rgba(60,64,67,.15); }
.oauth-btn.apple { background: #000; color: #fff; border: 1px solid #000; }
.oauth-btn.apple .oauth-icon { width: 17px; height: 20px; }
.oauth-btn.apple:hover { background: #1c1c1e; }
.oauth-btn:active { transform: scale(.985); }
.oauth-btn:focus-visible, .auth-submit:focus-visible, .link-btn:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.oauth-btn:disabled, .auth-submit:disabled, .auth-sent .btn-secondary:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.oauth-btn.is-busy, .auth-submit.is-busy, .btn-secondary.is-busy { opacity: .85 !important; cursor: progress !important; }
.oauth-btn.is-busy::before, .auth-submit.is-busy::before, .btn-secondary.is-busy::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: planoraSpin .7s linear infinite; flex-shrink: 0;
}
.oauth-btn.is-busy .oauth-icon { display: none; }
.auth-divider { margin: 20px 0 !important; }
.auth-form { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.auth-form label { font-size: 13px; font-weight: 600; color: var(--purple-900); margin-top: 8px; }
.auth-form label .optional { font-weight: 400; color: var(--gray-400); }
.auth-form label:first-of-type { margin-top: 0; }
.auth-form input { min-height: 46px; }
.auth-form input:focus { outline: none; border-color: var(--purple-400); box-shadow: 0 0 0 3px var(--purple-50); }
.auth-submit { margin-top: 12px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 14px; font-weight: 600; }
.auth-submit:hover:not(:disabled) { background: var(--purple-600); }
.link-btn { background: none; border: none; padding: 6px 4px; color: var(--purple-600); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 8px; }
.link-btn:hover { text-decoration: underline; }
.auth-forgot { align-self: center; margin-top: 6px; }
.auth-help { font-size: 14px; color: var(--gray-600); line-height: 1.5; margin: 0 0 10px; text-align: left; }
.pw-rules { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--gray-600); }
.pw-rules li { display: flex; align-items: center; gap: 5px; }
.pw-rules li.ok { color: #0F6E56; }
.auth-sent { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.auth-sent-icon { font-size: 40px; color: var(--purple-400); text-align: center; }
.auth-sent .auth-help { text-align: center; }
#login-screen .footer-link { padding-top: 22px; margin-top: 0; text-align: center; }
.skip-link small { color: var(--gray-400); font-weight: 400; }
.reset-done { text-align: center; }

/* Privacy · Terms links under the sign-in card */
.auth-legal { margin: 18px 0 0; font-size: 12px; color: var(--text-muted, #6b7280); text-align: center; }
.auth-legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--primary, #5b4bc4); }

/* Privacy / Terms pages */
.legal-page { max-width: 720px; margin: 0 auto; padding: 40px 20px 64px; color: var(--text, #1f1d3a); line-height: 1.6; text-align: left; }
.legal-page .legal-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; color: var(--primary, #5b4bc4); text-decoration: none; margin-bottom: 24px; }
.legal-page h1 { font-size: 28px; margin: 0 0 4px; }
.legal-page .legal-updated { color: var(--text-muted, #6b7280); font-size: 14px; margin: 0 0 28px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { font-size: 15px; }
.legal-page ul { padding-left: 20px; }
.legal-page a { color: var(--primary, #5b4bc4); }

/* Google's real button sits invisibly over Planora's own Google button,
   so both sign-in buttons look the same as each other. */
.google-wrap { position: relative; }
.google-wrap .gsi-btn { position: absolute; top: 0; left: 0; transform-origin: 0 0; opacity: .01; z-index: 1; }
.google-wrap .gsi-btn[hidden] { display: none; }
.google-wrap.has-gsi:hover .oauth-btn.google { background: #F8F9FA; box-shadow: 0 1px 3px rgba(60,64,67,.15); }
.google-wrap.has-gsi:active .oauth-btn.google { transform: scale(.985); }
.google-wrap.has-gsi:focus-within .oauth-btn.google { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.oauth-btn.is-loading { opacity: .7; cursor: progress; }

/* Planora logo (round "P" with a clock) wherever the logo mark appears */
.logo-mark.has-logo { background: transparent !important; border-radius: 50% !important; padding: 0; overflow: visible; }
#journal-screen .side-rail .logo-mark.has-logo { background: transparent !important; }
.logo-mark .logo-img { width: 100%; height: 100%; display: block; border-radius: 50%; }
.auth-card .logo-mark.has-logo { width: 76px; height: 76px; filter: drop-shadow(0 6px 14px rgba(83, 74, 183, .28)); }
.legal-page .legal-brand img { width: 32px; height: 32px; border-radius: 50%; }

/* =========================================================
   COLOURS: categories and goals
   A task's stripe uses its goal's colour (all of a goal's tasks
   match), otherwise its category's colour, otherwise Planora purple.
   ========================================================= */
.task-item:not(.completed)[style*="--task-c"] { border-left-color: var(--task-c); }
.task-item .t-cat { font-size: 11.5px; color: var(--pl-muted, #6b6880); margin-top: 3px; display: flex; gap: 5px; align-items: center; }
.task-item .t-cat .cat-dot, .cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.task-item .t-cat .cat-dot { background: var(--task-c); }
.task-item[data-color-kind="goal"] .t-goal { color: var(--pl-text, #26215C); }
.task-item[data-color-kind="goal"] .t-goal i { color: var(--task-c); }
.sp-task[style*="--task-c"] { border-left-color: var(--task-c); }

/* goals show their colour */
.goal-card[style*="--goal-c"] { border-left: 4px solid var(--goal-c); }
.goal-card[style*="--goal-c"] .goal-ring { background: conic-gradient(var(--goal-c) calc(var(--p) * 1%), var(--goal-s) 0); }
.goal-item[style*="--goal-c"] { border-left: 4px solid var(--goal-c); }
.goal-item[style*="--goal-c"] .goal-progress-bar { background: var(--goal-c) !important; }

/* colour picker (goals, new categories) */
.color-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.color-swatch { position: relative; width: 30px; height: 30px; cursor: pointer; }
.color-swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.color-swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255,255,255,.0); transition: transform .12s ease; }
.color-swatch input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sw); transform: scale(.92); }
.color-swatch input:focus-visible + span { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 3px; }
.color-swatch:hover span { transform: scale(1.06); }
.goal-color-field { display: block; }
.pl-hint-inline { font-weight: 400; color: var(--pl-muted, #6b6880); font-size: 12px; margin-left: 6px; }

/* "+ New category…" inline box */
.cat-new { border: 1px solid var(--purple-100, #CECBF6); background: var(--purple-50, #EEEDFE); border-radius: 12px; padding: 12px; margin: 6px 0 12px; display: flex; flex-direction: column; gap: 8px; }
.cat-new input[type=text] { width: 100%; }
.cat-new .color-swatches { margin-top: 0; }
.cat-new-actions { display: flex; gap: 8px; justify-content: flex-end; }
.cat-new-actions .btn-primary, .cat-new-actions .btn-secondary { width: auto; padding: 8px 14px; }

/* Colour chips in the Add / Edit task box (Home) */
.edit-color-field { display: flex; flex-direction: column; gap: 8px; }
.edit-category-select { display: none; }
.edit-color-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.edit-color-chips[hidden] { display: none; }
.color-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--purple-100, #CECBF6); background: #fff; color: var(--purple-900, #26215C);
  font: inherit; font-size: 13px; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s;
}
.color-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chip); flex-shrink: 0; }
.color-chip:hover { border-color: var(--chip, var(--purple-400)); }
.color-chip.on { border-color: var(--chip); background: color-mix(in srgb, var(--chip) 12%, #fff); box-shadow: 0 0 0 1px var(--chip) inset; font-weight: 600; }
.color-chip.add { border-style: dashed; color: var(--purple-600, #534AB7); }
.color-chip.add i { font-size: 14px; }
.color-chip:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.edit-goal-color { background: var(--purple-50, #EEEDFE); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--purple-900, #26215C); }
.edit-goal-color[hidden] { display: none; }
.edit-goal-color p { margin: 0; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.edit-goal-color .btn-secondary { width: auto; align-self: flex-start; padding: 8px 12px; font-size: 13px; }
.edit-color-field .cat-new { margin: 0; }

/* Colour picker: plain colours for one task / event, and Default (like Google Calendar) */
.edit-color-dots { display: flex; flex-direction: column; gap: 10px; }
.edit-color-dots[hidden] { display: none; }
.color-dot-row { display: flex; flex-wrap: wrap; gap: 9px; }
.color-dot {
  width: 26px; height: 26px; border-radius: 50%; border: none; padding: 0; cursor: pointer;
  background: var(--sw); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.color-dot i { font-size: 14px; opacity: 0; }
.color-dot:hover { transform: scale(1.1); }
.color-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sw); }
.color-dot.on i { opacity: 1; }
.color-dot:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 3px; }
.color-default {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; border-radius: 10px; border: 1px solid transparent; background: var(--gray-50, #F4F3F8);
  font: inherit; font-size: 13px; color: var(--purple-900, #26215C); cursor: pointer;
}
.color-default:hover { background: var(--purple-50, #EEEDFE); }
.color-default.on { background: var(--purple-50, #EEEDFE); border-color: var(--purple-200, #AFA9EC); font-weight: 600; }
.color-default.on i { color: var(--purple-600, #534AB7); }
.edit-color-title { font-size: 12px; font-weight: 500; color: var(--purple-800, #3C3489); }

/* Pencil "Edit labels" chip */
.color-chip.edit-labels { padding: 7px 10px; color: var(--purple-600, #534AB7); }
.color-chip.edit-labels i { font-size: 15px; }

/* =========================================================
   LABELS editor (like Google Calendar)
   ========================================================= */
.labels-overlay {
  position: fixed; inset: 0; z-index: 2147483000; background: rgba(38, 33, 92, .35);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.labels-dialog {
  width: 100%; max-width: 440px; max-height: min(640px, calc(100vh - 32px)); display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; box-shadow: 0 24px 60px rgba(38, 33, 92, .28); overflow: hidden;
}
.labels-dialog h2 { margin: 0; padding: 22px 24px 4px; font-size: 21px; font-weight: 500; color: var(--purple-900, #26215C); }
.labels-hint { margin: 0; padding: 0 24px 12px; font-size: 13px; color: var(--pl-muted, #6b6880); border-bottom: 1px solid var(--purple-50, #EEEDFE); }
.labels-list { overflow-y: auto; padding: 12px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.labels-empty { margin: 8px 6px; font-size: 14px; color: var(--pl-muted, #6b6880); }
.label-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
.label-color {
  display: inline-flex; align-items: center; gap: 4px; padding: 8px 8px 8px 10px; border-radius: 10px;
  border: 1px solid transparent; background: none; cursor: pointer; color: var(--purple-800, #3C3489);
}
.label-color:hover, .label-color[aria-expanded="true"] { background: var(--purple-50, #EEEDFE); border-color: var(--purple-200, #AFA9EC); }
.label-color .dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.label-name { position: relative; }
.label-name input {
  width: 100%; box-sizing: border-box; padding: 10px 36px 10px 12px; border-radius: 10px; font: inherit; font-size: 14px;
  border: 1px solid var(--purple-100, #CECBF6); background: var(--gray-50, #F7F6FB); color: var(--purple-900, #26215C);
}
.label-name input:focus { outline: none; border-color: var(--purple-400, #7F77DD); background: #fff; box-shadow: 0 0 0 3px var(--purple-50, #EEEDFE); }
.label-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: none; padding: 6px; border-radius: 8px; color: var(--gray-500, #6b6880); cursor: pointer; }
.label-clear:hover { background: var(--purple-50, #EEEDFE); }
.label-del { border: none; background: none; padding: 8px; border-radius: 10px; color: var(--gray-500, #6b6880); cursor: pointer; }
.label-del:hover { background: #FDECEC; color: #C0392B; }
.label-palette { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 4px 4px; }
.label-palette[hidden] { display: none; }
.labels-foot { display: flex; align-items: center; gap: 10px; padding: 14px 18px 18px; border-top: 1px solid var(--purple-50, #EEEDFE); }
.labels-spacer { flex: 1; }
.labels-add { width: 40px; height: 40px; border-radius: 50%; border: none; background: var(--purple-50, #EEEDFE); color: var(--purple-700, #4A41A8); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
.labels-add:hover { background: var(--purple-100, #CECBF6); }
.labels-foot .btn-primary, .labels-foot .btn-secondary { width: auto; padding: 10px 20px; }
.labels-dialog .auth-error { margin: 0 24px 4px; }
.labels-dialog button:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }

/* =========================================================
   VOICE TYPING (🎤)
   ========================================================= */
.mic-btn {
  position: relative; flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--purple-100, #CECBF6);
  background: #fff; color: var(--purple-600, #534AB7); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 19px; transition: background .15s, color .15s, border-color .15s;
}
.mic-btn:hover { background: var(--purple-50, #EEEDFE); border-color: var(--purple-200, #AFA9EC); }
.mic-btn:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.mic-btn.listening { background: #E5484D; border-color: #E5484D; color: #fff; }
.mic-btn .mic-pulse { position: absolute; inset: -4px; border-radius: 15px; border: 2px solid #E5484D; opacity: 0; pointer-events: none; }
.mic-btn.listening .mic-pulse { animation: micPulse 1.3s ease-out infinite; }
@keyframes micPulse { 0% { opacity: .7; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .mic-btn.listening .mic-pulse { animation: none; opacity: .6; } }
.is-listening { border-color: #E5484D !important; box-shadow: 0 0 0 3px rgba(229, 72, 77, .12) !important; }
/* text box + mic side by side */
.voice-field { display: flex; gap: 8px; align-items: stretch; }
.voice-field > input { flex: 1; min-width: 0; }
.voice-field > .mic-btn { height: auto; min-height: 44px; }
/* Ask Planora row: textarea · mic · send */
.sp-input-row .mic-btn { align-self: flex-end; width: 46px; height: 46px; border-radius: 13px; }

/* =========================================================
   GOOGLE CALENDAR (gcal.js)
   ========================================================= */
.cv-gcal { margin-left: auto; gap: 7px; padding: 0 12px; font-weight: 500; position: relative; }
.cv-gcal + .cv-switch { margin-left: 0; }
.cv-gcal i { font-size: 17px; }
.cv-gcal.is-on { border-color: var(--purple-100); }
.cv-gcal-dot { width: 7px; height: 7px; border-radius: 50%; background: #1D9E75; }
.cv-gcal.is-syncing i { animation: gcal-spin 1s linear infinite; }
.cv-gcal:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
@media (max-width: 699px) {
  /* phone: Google button sits beside the date, so ‹ Today › and Month/Week/Day keep one row */
  .cal-toolbar .cv-range { width: calc(100% - 56px); }
  .cv-gcal { order: -1; margin-left: auto; padding: 0 10px; }
  .cv-gcal + .cv-switch { margin-left: auto; }
  .cv-gcal .cv-gcal-t { display: none; }
  .cv-gcal-dot { position: absolute; top: 6px; right: 6px; }
}
.mv-item.is-google i, .blk.is-google .blk-title i { color: var(--c); }
.blk.is-google .blk-body { cursor: pointer; }
.blk.is-google { border-style: solid; }

.gcal-dialog { max-width: 460px; }
.gcal-head { display: flex; align-items: center; gap: 12px; padding: 20px 18px 6px 24px; }
.gcal-head h2 { padding: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.gcal-logo { width: 36px; height: 36px; border-radius: 10px; background: var(--purple-50, #EEEDFE); color: var(--purple-700, #4A41A8); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.gcal-swatch { width: 16px; height: 16px; border-radius: 5px; background: var(--c); flex-shrink: 0; }
.gcal-x { border: none; background: none; width: 40px; height: 40px; border-radius: 10px; color: var(--gray-500, #6b6880); cursor: pointer; font-size: 18px; flex-shrink: 0; }
.gcal-x:hover { background: var(--purple-50, #EEEDFE); }
.gcal-body { padding: 6px 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.gcal-lead { margin: 0; font-size: 15px; line-height: 1.5; color: var(--purple-900, #26215C); }
.gcal-points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gcal-points li { display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--pl-muted, #5B5677); }
.gcal-points i { color: var(--purple-600, #534AB7); font-size: 18px; margin-top: 1px; }
.gcal-note { margin: 0; font-size: 14px; color: var(--pl-muted, #6b6880); display: flex; align-items: center; gap: 8px; }
.gcal-spin { animation: gcal-spin 1s linear infinite; }
@keyframes gcal-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gcal-spin, .cv-gcal.is-syncing i { animation: none; } }
.gcal-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.gcal-actions .btn-primary, .gcal-actions .btn-secondary { width: auto; padding: 10px 18px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.gcal-google {
  width: 100%; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  border-radius: 14px; border: 1px solid #DADCE0; background: #fff; color: #1F1F1F; font-family: inherit; font-size: 15px; font-weight: 600; line-height: 1; cursor: pointer;
}
.gcal-google:hover:not([disabled]) { background: #F8F9FA; border-color: #C6C9CE; }
.gcal-google[disabled] { opacity: .6; cursor: progress; }
.gcal-google:focus-visible { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.gcal-who { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--purple-900, #26215C); overflow-wrap: anywhere; }
.gcal-who i { color: #1D9E75; font-size: 20px; flex-shrink: 0; }
.gcal-sub { margin: -6px 0 0 28px; font-size: 13px; color: var(--pl-muted, #6b6880); }
.gcal-cals { border: 1px solid var(--purple-50, #EEEDFE); border-radius: 14px; padding: 6px 8px 8px; margin: 0; display: flex; flex-direction: column; }
.gcal-cals legend { font-size: 13px; font-weight: 600; color: var(--pl-muted, #5B5677); padding: 0 6px; }
.gcal-cal { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 10px; cursor: pointer; font-size: 14.5px; color: var(--purple-900, #26215C); }
.gcal-cal:hover { background: var(--gray-50, #F7F6FB); }
.gcal-cal input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gcal-box { width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--c); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; flex-shrink: 0; }
.gcal-box i { visibility: hidden; }
.gcal-cal input:checked + .gcal-box { background: var(--c); }
.gcal-cal input:checked + .gcal-box i { visibility: visible; }
.gcal-cal input:focus-visible + .gcal-box { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.gcal-name { min-width: 0; overflow-wrap: anywhere; }
.gcal-name small { color: var(--pl-muted, #6b6880); font-weight: 400; }
.gcal-hint { margin: 0; font-size: 13px; color: var(--pl-muted, #6b6880); }
.gcal-unlink { border: none; background: none; color: #B42318; font: inherit; font-size: 14px; font-weight: 500; padding: 10px 8px; border-radius: 10px; cursor: pointer; }
.gcal-unlink:hover, .gcal-unlink.is-confirm { background: #FDECEC; }
.gcal-row { margin: 0; display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--purple-900, #26215C); overflow-wrap: anywhere; }
.gcal-row i { color: var(--pl-muted, #6b6880); font-size: 18px; margin-top: 1px; flex-shrink: 0; }
.gcal-event .gcal-actions { margin-top: 8px; }
.gcal-err:empty { display: none; }

/* =========================================================
   CALENDAR — BOLDER (stronger lines, darker text, heavier items)
   ========================================================= */
.cal-view { --cal-line: #DCD8EF; --cal-edge: #C9C4E6; --cal-ink: #26215C; --cal-ink-2: #3F3A66; --cal-muted: #5B5677; }
/* frame + grid lines */
.mv, .tg-scroll { border-color: var(--cal-edge); }
.mv-dow, .tg-corner, .tg-head { border-bottom-color: var(--cal-edge); }
.mv-day { border-right-color: var(--cal-line); border-bottom-color: var(--cal-line); }
.tg-head { border-left-color: var(--cal-line); }
.tg-col {
  border-left-color: var(--cal-line);
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) - 1px), var(--cal-line) calc(var(--hour) - 1px), var(--cal-line) var(--hour));
}
.tg-col.is-today { background-color: #F8F6FF; }
/* labels */
.mv-dow span { font-size: 12.5px; font-weight: 600; color: var(--cal-ink-2); }
.mv-num { font-size: 13.5px; font-weight: 600; color: var(--cal-ink); }
.mv-day.is-out .mv-num { color: #A3A0B5; font-weight: 500; }
.tg-date .dow { font-size: 12px; font-weight: 600; color: var(--cal-ink-2); }
.tg-date .num { font-size: 22px; font-weight: 600; color: var(--cal-ink); }
.tg-head.is-today .dow { color: var(--purple-600, #534AB7); }
.tg-head.is-today .num { background: var(--purple-600, #534AB7); }
.mv-day.is-today .mv-num { background: var(--purple-600, #534AB7); }
.tg-gutter span { font-size: 11.5px; font-weight: 500; color: var(--cal-muted); }
.tg-corner { font-size: 11px; font-weight: 500; color: var(--cal-muted); }
.tg-empty { color: var(--cal-muted); }
/* items in the week / day grid */
.blk.is-task { border-color: var(--cal-edge); border-left-color: var(--c); border-left-width: 5px; box-shadow: 0 1px 4px rgba(38,33,92,.12); }
.blk.is-event { border-left-width: 5px; }
.blk-title { font-weight: 600; font-size: 13px; color: var(--cal-ink); }
.blk-time { font-size: 11.5px; font-weight: 500; color: var(--cal-ink-2); }
.blk-check { border-width: 2px; }
.tg.is-day .blk-title { font-size: 14.5px; }
.tg.is-day .blk-time { font-size: 12.5px; }
.ad-item { font-size: 12px; font-weight: 600; color: var(--cal-ink); }
.ad-item.is-event { font-size: 12px; font-weight: 600; }
.ad-item.is-task { border-color: var(--cal-edge); border-left-color: var(--c); }
/* items in the month grid */
.mv-item { font-size: 12px; font-weight: 600; color: var(--cal-ink); min-height: 22px; }
.mv-item b { font-weight: 700; color: var(--cal-ink-2); }
.mv-item.is-task { border-color: var(--cal-edge); border-left: 3px solid var(--c); }
.mv-item.is-done .t { font-weight: 500; }
.mv-more { font-weight: 600; color: var(--purple-700, #4A41A8); }
.mv-dots i { width: 8px; height: 8px; }
.mv-dots i.is-task { width: 8px; height: 8px; border-width: 2px; }
.cv-range { font-weight: 600; color: var(--purple-900, #26215C); }
.cv-switch button { color: #4A4566; }
.cv-switch button[aria-selected="true"] { font-weight: 600; }
.cv-today { font-weight: 600; }

/* Fix clashes bar (calendar) */
.cal-clash {
  display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px 10px 14px; border-radius: 14px;
  background: #FFF4E5; border: 1px solid #F5C98A; color: #5C3B00; font-size: 14px; line-height: 1.35;
}
.cal-clash > i { font-size: 18px; color: #B86E00; flex-shrink: 0; }
.cal-clash > span { flex: 1; min-width: 0; }
.cal-clash-btn {
  flex-shrink: 0; border: none; border-radius: 10px; padding: 9px 14px; min-height: 38px; cursor: pointer;
  background: #26215C; color: #fff; font: inherit; font-size: 14px; font-weight: 600;
}
.cal-clash-btn:hover { background: #3C3489; }
.cal-clash-btn:focus-visible { outline: 3px solid #AFA9EC; outline-offset: 2px; }
.cal-clash-btn[disabled] { opacity: .6; cursor: progress; }
@media (max-width: 699px) { .cal-clash { font-size: 13px; padding: 8px 8px 8px 12px; } }

/* Google Calendar: link option + Planora → Google section */
.gcal-opt { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--gray-50, #F7F6FB); cursor: pointer; font-size: 14.5px; line-height: 1.4; color: var(--purple-900, #26215C); position: relative; }
.gcal-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gcal-opt .gcal-box { margin-top: 1px; }
.gcal-opt input:checked + .gcal-box { background: var(--c); }
.gcal-opt input:checked + .gcal-box i { visibility: visible; }
.gcal-opt input:focus-visible + .gcal-box { outline: 3px solid var(--purple-200, #AFA9EC); outline-offset: 2px; }
.gcal-opt small { color: var(--pl-muted, #6b6880); }
.gcal-sync { border: 1px solid var(--purple-100, #CECBF6); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.gcal-sync.is-on { background: #F3FBF7; border-color: #BFE6D3; }
.gcal-sync-t { margin: 0; display: flex; gap: 10px; font-size: 14px; line-height: 1.45; color: var(--purple-900, #26215C); }
.gcal-sync-t i { font-size: 19px; color: var(--purple-600, #534AB7); margin-top: 1px; flex-shrink: 0; }
.gcal-sync.is-on .gcal-sync-t i { color: #1D9E75; }
.gcal-sync .gcal-sub { margin: -4px 0 0 29px; }
.gcal-sync-on { margin-left: 29px; width: auto; padding: 9px 16px; }
.gcal-linkbtn { margin-left: 29px; border: none; background: none; padding: 6px 0; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--purple-700, #4A41A8); text-decoration: underline; cursor: pointer; }
.gcal-warn { color: #B42318; }

/* =========================================================
   HOME — CALMER ON THE WEBSITE (laptops, html.web-mode) — 5 Oct 2026
   Only three things compete for attention: Today's schedule, the
   "move to today" suggestion and the Journal. The sidebar already has
   Calendar, Planora (goals) and New task, so the "Go to" box is gone.
   Phones and tablets keep their app layout; the readability changes
   (darker text, bolder titles) apply everywhere.
   ========================================================= */

/* ---- everywhere: easier to read ---- */
.home-greeting { font-weight: 700 !important; color: var(--pl-text); letter-spacing: -0.02em; }
.home-header .date { color: var(--pl-muted); font-weight: 600; }
.home-header .ai-greeting-msg { color: var(--pl-muted); }
.planora-btn { background: linear-gradient(135deg, #7B6CF0 0%, #4A3FC4 100%); box-shadow: 0 6px 16px rgba(81, 69, 205, .30); }
.wl { color: var(--pl-muted); }
.wl-label { color: var(--pl-text); font-weight: 700; }
.rec-icon { color: var(--purple-600); }
.rec-card p { color: var(--pl-text); }
.schedule-card .card-title { font-weight: 700 !important; color: var(--pl-text); }
.task-item .t-title { font-weight: 600; color: var(--pl-text); }
.task-item .t-time { color: var(--pl-muted); font-weight: 500; }
.task-item.completed .t-title { color: var(--gray-400); font-weight: 500; }
.completed-label { color: var(--pl-muted) !important; font-weight: 600; }
.journal-nudge strong { color: var(--pl-text); font-weight: 700; }
.journal-nudge span { color: var(--pl-muted); }
.lbl-short { display: none; }
.week-card { display: none; }                         /* phones/tablets: the week chip stays hidden, as before */

/* ---- website only: the calmer layout ---- */
html.web-mode .home-links { display: none !important; }
html.web-mode .home-header .ai-greeting-msg { font-size: 15px; }

html.web-mode .today-bar { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 2px !important; margin: 0 0 14px !important; }
html.web-mode .wl { font-size: 14px; }
html.web-mode .today-actions .btn-primary, html.web-mode .today-actions .btn-secondary {
  min-height: 36px; padding: 7px 14px !important; font-size: 13.5px !important; font-weight: 600 !important; border-radius: 999px !important;
}
html.web-mode .today-actions .btn-primary { background: var(--purple-50) !important; color: var(--purple-800) !important; border: 1px solid var(--purple-100) !important; box-shadow: none !important; }
html.web-mode .today-actions .btn-primary i { color: var(--purple-600); }
html.web-mode .today-actions .btn-primary:hover { background: var(--purple-100) !important; }
html.web-mode .today-actions .btn-secondary { background: #fff !important; color: var(--purple-800) !important; border: 1px solid var(--purple-100) !important; }

/* "2 tasks from earlier…  [Move to today]  ×" — one compact line */
html.web-mode .rec-card {
  grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 12px;
  background: #fff; border: 1px solid var(--purple-100); border-left: 4px solid var(--purple-600);
  border-radius: 14px; padding: 10px 10px 10px 14px; box-shadow: 0 1px 3px rgba(30, 26, 77, .05);
}
html.web-mode .rec-icon { margin: 0; }
html.web-mode .rec-card p { font-size: 14px; font-weight: 500; }
html.web-mode .rec-actions { grid-column: 3; grid-row: 1; margin: 0; gap: 4px; }
html.web-mode .rec-actions .btn-primary { padding: 8px 14px; font-size: 13.5px; border-radius: 999px; font-weight: 600; }

html.web-mode .schedule-card .card-title { font-size: 18px !important; }
html.web-mode .task-item .t-title { font-size: 15px; }
html.web-mode .task-item .t-time { font-size: 13px; }

/* Journal card */
html.web-mode .journal-nudge {
  background: #fff; border: 1px solid var(--purple-100); border-radius: 18px; padding: 14px 16px; gap: 14px;
  box-shadow: 0 1px 3px rgba(30, 26, 77, .05); font-size: 14px;
}
html.web-mode .journal-nudge:hover { border-color: var(--purple-200); }
html.web-mode .journal-nudge > i:first-child {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  background: #FFF1E6; color: #C2570C; font-size: 21px;
}
html.web-mode .journal-nudge strong { font-size: 15px; }
html.web-mode .journal-nudge > i:last-child { color: var(--purple-600); }
html.web-mode .journal-nudge:focus-visible { outline: 3px solid var(--purple-200); outline-offset: 2px; }

/* This week: a small progress line under the Journal */
html.web-mode .week-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--purple-100); }
html.web-mode .week-card[hidden] { display: none; }
html.web-mode .week-card .week-chip { display: inline !important; padding: 0 !important; border: none !important; background: none !important; font-size: 14px; font-weight: 600; color: var(--pl-text); text-decoration: none; }
html.web-mode .week-card .week-chip:hover { text-decoration: underline; }
html.web-mode .week-bar { height: 8px; border-radius: 999px; background: var(--purple-50); overflow: hidden; }
html.web-mode .week-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7B6CF0, #1D9E75); transition: width .3s ease; }
@media (max-width: 899px) { html.web-mode #home-week-card { order: 6; } }

/* =========================================================
   CALENDAR — CLEAN & PRESENTABLE (7 Oct 2026)
   Like Google Calendar: light grid, items without boxes in Month,
   solid events and soft tasks in Week/Day, nothing covering tasks.
   Events: solid colour + calendar icon. Tasks: soft tint + tick box.
   ========================================================= */
.cal-view { --cal-line: #E6E3F2; --cal-edge: #DAD6EC; }

/* page title smaller, so the calendar is the main thing */
#calendar-screen .dash-header h2#todayHeader { font-size: 26px !important; line-height: 1.15; }
#calendar-screen .dash-header .date { margin-bottom: 2px; }
html.web-mode #calendar-screen .dash-header { margin-bottom: 18px !important; }

/* ---------- Month ---------- */
.mv-dow span { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: #6F6A88; }
.mv-day { padding: 6px 6px 4px; gap: 1px; }
.mv-num { align-self: center; width: 28px; height: 28px; font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.mv-day.is-today .mv-num { background: var(--purple-600, #5145CD); color: #fff; }
.mv-item {
  background: transparent !important; border: none !important; border-radius: 6px; padding: 2px 6px; min-height: 22px;
  font-size: 12.5px; font-weight: 500; color: #2A2550; gap: 6px;
}
.mv-item:hover { background: #F2F0FB !important; filter: none; }
.mv-item b { font-weight: 500; color: #6F6A88; margin-right: 1px; }
.mv-item i { font-size: 12px; color: var(--c); }
.mv-item.is-task i { font-size: 13px; }
.mv-item.is-done .t { color: #9A96AE; text-decoration: line-through; }
.mv-item.is-done i { opacity: .6; }
/* all-day Google events: a solid bar, like Google */
.mv-item.is-google:not(:has(b)) { background: var(--c) !important; color: var(--on, #fff); font-weight: 600; }
.mv-item.is-google:not(:has(b)) i { color: var(--on, #fff); }
.mv-more { font-size: 12px; padding: 2px 6px; color: #5145CD; }

/* ---------- Week / Day grid ---------- */
.tg-date .dow { font-size: 11.5px; letter-spacing: .06em; color: #6F6A88; font-weight: 600; }
.tg-date .num { font-size: 22px; font-weight: 600; }
.tg-head.is-today .num { background: var(--purple-600, #5145CD); }
.tg-col.is-today { background-color: #FBFAFF; }
.tg-gutter span { font-size: 11px; font-weight: 500; color: #7A7592; }

/* blocks: no borders or shadows */
.blk { border-radius: 8px !important; box-shadow: none !important; }
html.web-mode .blk { padding: 4px 6px 4px 8px; gap: 6px; }
.blk.is-task {
  background: color-mix(in srgb, var(--c) 13%, #fff) !important;
  border: none !important; border-left: 4px solid var(--c) !important;
}
.blk.is-task:hover { background: color-mix(in srgb, var(--c) 20%, #fff) !important; }
.blk.is-event {
  background: var(--c) !important; border: none !important; color: var(--on, #fff);
}
.blk.is-event:hover { filter: brightness(.95); }
.blk.is-event .blk-title, .blk.is-event .blk-time, .blk.is-event .blk-title i { color: var(--on, #fff) !important; }
.blk.is-event .blk-time { opacity: .92; }
.blk-title { font-size: 12.5px; font-weight: 600; color: #1E1A3C; line-height: 1.25; }
.blk-time { font-size: 11.5px; font-weight: 500; color: #4A4566; }
.blk-check { width: 15px; height: 15px; border-width: 1.5px; border-radius: 5px; margin-top: 1px; background: rgba(255,255,255,.85); font-size: 11px; }
.blk.is-short .blk-check { width: 13px; height: 13px; }
.blk.is-done { opacity: .55; }
.blk:hover { z-index: 3; box-shadow: 0 3px 10px rgba(30, 26, 77, .14) !important; }
.tg.is-day .blk-title { font-size: 14px; }

/* "Anytime" row */
.ad-item { border-radius: 6px; font-size: 12px; font-weight: 600; min-height: 24px; }
.ad-item.is-event { background: var(--c) !important; color: var(--on, #fff) !important; border: none !important; }
.ad-item.is-event i, .ad-item.is-event span { color: var(--on, #fff) !important; }
.ad-item.is-task { background: color-mix(in srgb, var(--c) 13%, #fff) !important; border: none !important; border-left: 3px solid var(--c) !important; }

/* current time: a thin line and dot; the time is shown in the hour column */
.tg-now { height: 2px; background: #E5484D; }
.tg-now::before { background: #E5484D; }
.tg-now span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tg-now-time {
  position: absolute; right: 4px; transform: translateY(-50%); z-index: 2;
  font-size: 10.5px; font-weight: 700; color: #fff; background: #E5484D; padding: 1px 5px; border-radius: 999px; white-space: nowrap;
}

/* phone month: dots a little bigger */
.mv-dots i { width: 7px; height: 7px; }
/* one title: "Calendar" (the ‹ Today › bar already shows the dates) */
#calendar-screen .dash-header #todayHeader { display: none !important; }
#calendar-screen .dash-header .date {
  font-size: 26px !important; font-weight: 700 !important; color: var(--pl-text, #1E1A4D) !important; letter-spacing: -0.02em;
  text-transform: none !important; margin: 0 !important; line-height: 1.2;
}
html.web-mode #calendar-screen .dash-header .date { font-family: var(--d-display, inherit); font-size: 32px !important; }
.mv-dots i.is-task { border-radius: 50%; }

/* ---------- drag & drop like Google Calendar (7 Oct 2026) ---------- */
.mv-item[data-drag] { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
body.cv-dragging, body.cv-dragging * { cursor: grabbing !important; }
.mv-item.is-dragging { opacity: .35; }
.mv-ghost {
  position: fixed !important; z-index: 2147483000; pointer-events: none; margin: 0;
  background: #fff !important; border-radius: 8px !important; box-shadow: 0 10px 28px rgba(30, 26, 77, .28) !important;
  transform: rotate(-1.5deg); opacity: .97;
}
.mv-ghost.is-event { background: var(--c) !important; color: var(--on, #fff) !important; }
.mv-ghost.is-event i, .mv-ghost.is-event b { color: var(--on, #fff) !important; }
.mv-day.is-drop { background: #EFEDFF !important; box-shadow: inset 0 0 0 2px #6C5CE7 !important; }
.tg-head.is-drop .tg-allday { display: flex !important; min-height: 28px; border-radius: 8px; outline: 2px dashed #6C5CE7; outline-offset: 1px; background: #EFEDFF; }
.blk-ghost.is-anytime { position: relative !important; top: auto !important; height: auto !important; min-height: 24px; left: auto !important; width: auto !important; padding: 2px 6px; display: flex; flex-direction: row; gap: 6px; align-items: center; }
.blk-ghost.is-anytime .blk-time { font-size: 10.5px; }

/* Google event editor */
.gcal-edit { display: flex; flex-direction: column; gap: 12px; }
.gcal-edit label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--pl-muted, #4F4A6B); }
.gcal-edit input { font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--purple-100, #D8D3FA); color: var(--pl-text, #1E1A4D); background: #fff; }
.gcal-edit input:focus { outline: none; border-color: var(--purple-400, #6C5CE7); box-shadow: 0 0 0 3px var(--purple-50, #EFEDFF); }
.gcal-edit-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.blk.is-google[data-drag] { cursor: grab; }

/* =========================================================
   ASK PLANORA: 📎 PLAN FROM A DOCUMENT (7 Oct 2026)
   ========================================================= */
.sp-attach {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--purple-100, #D8D3FA);
  background: #fff; color: var(--purple-600, #5145CD); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 19px; transition: background .15s, border-color .15s;
}
.sp-attach:hover { background: var(--purple-50, #EFEDFF); border-color: var(--purple-200, #B4ABF5); }
.sp-attach:focus-visible { outline: 3px solid var(--purple-200, #B4ABF5); outline-offset: 2px; }
.sp-attach.is-on { background: var(--purple-50, #EFEDFF); border-color: var(--purple-400, #6C5CE7); }
.sp-attach[disabled] { opacity: .5; cursor: progress; }
.sp-attached { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 2px 0; }
.sp-attached[hidden] { display: none; }
.sp-file-chip {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 6px 6px 10px; border-radius: 10px;
  background: var(--purple-50, #EFEDFF); border: 1px solid var(--purple-100, #D8D3FA); color: var(--pl-text, #1E1A4D); font-size: 13.5px; font-weight: 600;
}
.sp-file-chip i { font-size: 17px; color: var(--purple-600, #5145CD); flex-shrink: 0; }
.sp-file-chip .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sp-file-chip.in-bubble { background: rgba(255,255,255,.6); padding-right: 10px; }
.sp-file-x { border: none; background: none; width: 26px; height: 26px; border-radius: 8px; color: var(--pl-muted, #4F4A6B); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sp-file-x:hover { background: var(--purple-100, #D8D3FA); }
.sp-file-hint { font-size: 12.5px; color: var(--pl-muted, #4F4A6B); }
.sp-reading { font-size: 13px; color: var(--pl-muted, #4F4A6B); }
.sp-root.sp-drop { outline: 2px dashed var(--purple-400, #6C5CE7); outline-offset: 4px; }
@media (max-width: 699px) { .sp-attach { width: 42px; height: 42px; } }
.sp-task-src { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 12.5px; color: var(--pl-muted, #4F4A6B); font-style: italic; }
.sp-task-src i { font-size: 14px; color: var(--purple-600, #5145CD); font-style: normal; margin-top: 1px; flex-shrink: 0; }

/* =========================================================
   PHONE DAY BAR (Today's schedule, one day at a time)
   Phones/tablets use the day bar; the website keeps the week strip.
   ========================================================= */
/* all devices (website too, 12 Oct 2026) */
#schedule-card .week-calendar { display: none !important; }
.day-bar {
    display: flex; align-items: center; gap: 8px;
    background: #F4F2FF; border-radius: 16px; padding: 6px; margin: 4px 0 14px;
}
.day-bar-btn {
    flex: 0 0 42px; width: 42px; height: 44px; border: 0; border-radius: 12px;
    background: #fff; color: #5145CD; font-size: 20px; padding: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 1px 2px rgba(30, 26, 77, .08); position: relative;
}
.day-bar-btn:active { background: #EFEDFF; }
.day-bar-pick input {
    position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
    border: 0; padding: 0; pointer-events: none;
}
.day-bar-mid { flex: 1; min-width: 0; text-align: center; line-height: 1.25; }
.day-bar-mid strong { display: block; font-size: 17px; font-weight: 700; color: #1E1A4D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-bar-mid span { font-size: 13px; color: #66617F; white-space: nowrap; }
.day-bar-today {
    border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
    color: #5145CD; text-decoration: underline; cursor: pointer;
}

/* =========================================================
   ASK PLANORA COMPOSER (12 Oct 2026)
   Why it was narrow: the text box shared one row with three fixed
   buttons (attach 44 + mic 46 + send 46 + gaps), so on a phone card
   it got ~130px. Now, whenever the Ask box itself is narrow (phones,
   or a narrow column on the website), the text box gets the full
   width and the buttons sit in a row underneath, inside one box.
   Wide boxes keep the single row.
   ========================================================= */
.sp-root { container-type: inline-size; container-name: ask; }
.sp-send.is-empty { opacity: .45; }
.sp-send.is-empty:hover { background: var(--purple-400); }

@container ask (min-width: 1px) {   /* every width: text box on top, buttons underneath */
  .sp-input-row {
    flex-wrap: wrap; align-items: center; gap: 6px;
    background: #fff; border: 1px solid var(--purple-100, #D8D3FA); border-radius: 18px;
    padding: 4px 6px 6px;
    transition: border-color .15s, box-shadow .15s;
  }
  .sp-input-row:focus-within { border-color: var(--purple-400, #6C5CE7); box-shadow: 0 0 0 3px var(--purple-50, #EFEDFF); }
  .sp-input-row:has(.is-listening) { border-color: #E5484D; box-shadow: 0 0 0 3px rgba(229, 72, 77, .12); }
  .sp-input {
    flex: 1 1 100%; width: 100%; min-height: 50px; max-height: 40vh;
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    padding: 10px 10px 4px; font-size: 16px; line-height: 1.45; border-radius: 12px; outline: none !important;
  }
  .sp-input-row .sp-attach,
  .sp-input-row .mic-btn {
    width: 44px; height: 44px; border-radius: 12px; border: 0;
    background: var(--purple-50, #EFEDFF); color: var(--purple-600, #5145CD); font-size: 20px; align-self: center;
  }
  .sp-input-row .sp-attach.is-on { box-shadow: inset 0 0 0 1.5px var(--purple-400, #6C5CE7); }
  .sp-input-row .sp-send { margin-left: auto; width: 52px; height: 44px; border-radius: 12px; align-self: center; }
}

/* =========================================================
   PHONE CALENDAR (12 Oct 2026)
   - one compact header:  ‹  October 2026 ⌄  ›        Today  [G]
     then Month · Week · Day across the full width
   - Month: Sun–Sat grid without boxes, selected day = filled purple
     circle, today = purple ring, small dots for days with plans,
     and the chosen day's list underneath (tap a day to change it)
   ========================================================= */
@media all {   /* phones and the website */
  .cal-toolbar { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 2px; }
  .cal-toolbar .cv-nav { display: contents; }
  .cal-toolbar [data-nav="prev"] { order: 1; }
  .cal-toolbar .cv-range { order: 2; flex: 0 1 auto; width: auto !important; min-width: 0; padding: 6px 2px; justify-content: center; font-size: 19px; font-weight: 700; white-space: nowrap; }
  .cal-toolbar [data-nav="next"] { order: 3; }
  .cal-toolbar [data-nav="today"] { order: 4; margin-left: auto; height: 40px; padding: 0 12px; border-radius: 999px; font-size: 14px; flex-shrink: 0; }
  .cal-toolbar .cv-gcal { order: 5; margin-left: 4px !important; height: 40px; width: 40px; padding: 0; justify-content: center; flex-shrink: 0; }
  .cal-toolbar .cv-switch { order: 6; flex: 1 0 100%; margin: 0 !important; width: 100%; display: grid; }
  .cal-toolbar .cv-switch button { min-height: 38px; }
  .cal-toolbar .cv-arrow { flex: 0 0 36px; width: 36px; height: 40px; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
  .cal-toolbar .cv-arrow:active { background: var(--purple-50, #EFEDFF); }
  .cal-toolbar .cv-range span { overflow: hidden; text-overflow: ellipsis; }
  .cal-toolbar .cv-range i { display: none; }

  /* month grid */
  .mv.mv-phone { border: 0 !important; background: transparent !important; border-radius: 0; overflow: visible; }
  .mv-phone .mv-dow { border: 0 !important; background: transparent !important; padding: 2px 0 4px; }
  .mv-phone .mv-dow span { font-size: 12.5px; font-weight: 600; color: #6F6A88; padding: 4px 0; }
  .mv-phone .mv-grid { grid-auto-rows: 54px !important; background: transparent !important; }
  .mv-phone .mv-day {
    border: 0 !important; background: transparent !important; box-shadow: none !important;
    padding: 3px 0 0 !important; gap: 3px !important; align-items: center; justify-content: flex-start; min-width: 0;
  }
  .mv-phone .mv-num {
    width: 36px !important; height: 36px !important; margin: 0 !important; border-radius: 50% !important;
    display: flex; align-items: center; justify-content: center; align-self: center !important;
    font-size: 16px !important; font-weight: 600 !important; color: #1E1A4D !important; background: transparent !important;
  }
  .mv-phone .mv-day.is-out .mv-num { color: #B0ACC4 !important; font-weight: 500 !important; }
  .mv-phone .mv-day.is-today .mv-num { box-shadow: inset 0 0 0 2px var(--purple-400, #6C5CE7); color: var(--purple-600, #5145CD) !important; font-weight: 700 !important; }
  .mv-phone .mv-day.is-selected .mv-num { background: var(--purple-600, #5145CD) !important; color: #fff !important; box-shadow: 0 4px 10px rgba(81, 69, 205, .28); }
  .mv-phone .mv-num:focus-visible { outline: 3px solid var(--purple-200, #B4ABF5); outline-offset: 1px; }
  .mv-phone .mv-dots { justify-content: center; gap: 3px; padding: 0; min-height: 6px; flex-wrap: nowrap; }
  .mv-phone .mv-dots i, .mv-phone .mv-dots i.is-task { width: 6px !important; height: 6px !important; border-width: 1.5px !important; }
  .mv-phone .mv-dots b { font-size: 9px; line-height: 6px; }
  .mv-phone .mv-day.is-out .mv-dots { opacity: .5; }

  /* the chosen day's list */
  .ag { border-top: 1px solid var(--purple-100, #D8D3FA); margin-top: 8px; padding-top: 14px; }
  .ag-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
  .ag-h { flex: 1; min-width: 0; margin: 0; font-size: 17px; font-weight: 700; color: #1E1A4D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ag-day, .ag-add {
    height: 40px; border-radius: 12px; border: 1px solid var(--purple-100, #D8D3FA); background: #fff; color: var(--purple-600, #5145CD);
    display: inline-flex; align-items: center; justify-content: center; gap: 4px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  }
  .ag-day { width: 40px; font-size: 19px; }
  .ag-add { padding: 0 12px 0 10px; }
  .ag-add i { font-size: 18px; }
  .ag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
  .ag-item {
    display: flex; align-items: center; gap: 4px; min-height: 60px; padding: 4px 6px 4px 4px;
    background: #fff; border: 1px solid var(--purple-100, #D8D3FA); border-left: 4px solid var(--c); border-radius: 14px;
  }
  .ag-item.is-event { background: linear-gradient(90deg, var(--s) 0%, #fff 75%); }
  .ag-check, .ag-ico { flex: 0 0 44px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: none; padding: 0; font-size: 24px; color: var(--c); cursor: pointer; }
  .ag-ico { font-size: 20px; cursor: default; }
  .ag-main { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 6px 4px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
  .ag-title { font-size: 15.5px; font-weight: 600; color: #1E1A4D; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .ag-meta { font-size: 13px; color: #66617F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ag-tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--purple-600, #5145CD); background: #EFEDFF; border-radius: 6px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
  .ag-item.is-done .ag-title { text-decoration: line-through; color: #9C98B3; font-weight: 500; }
  .ag-empty { text-align: center; padding: 18px 12px 8px; color: #66617F; }
  .ag-empty p { margin: 0 0 12px; font-size: 15px; }
}
@media (max-width: 359px) {
  .cal-toolbar .cv-range { font-size: 17px; }
  .cal-toolbar .cv-arrow { flex-basis: 32px; width: 32px; }
  .cal-toolbar [data-nav="today"] { padding: 0 10px; font-size: 13.5px; }
  .cal-toolbar .cv-gcal { width: 38px; margin-left: 2px !important; }
  .cal-toolbar .cv-arrow { flex-basis: 30px; width: 30px; }
}

/* =========================================================
   PHONE DAY VIEW (12 Oct 2026): week row on top + light hour grid
   ========================================================= */
@media all {   /* phones and the website */
  .dv-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 2px 0 8px; }
  .dv-d { border: 0; background: none; padding: 2px 0; font: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
  .dv-d .dw { font-size: 12.5px; font-weight: 600; color: #6F6A88; }
  .dv-d .dn { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 600; color: #1E1A4D; }
  .dv-d i { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
  .dv-d i.on { background: #B4ABF5; }
  .dv-d.is-today .dn { box-shadow: inset 0 0 0 2px var(--purple-400, #6C5CE7); color: var(--purple-600, #5145CD); font-weight: 700; }
  .dv-d.is-selected .dn { background: var(--purple-600, #5145CD); color: #fff; box-shadow: 0 4px 10px rgba(81, 69, 205, .28); }
  .dv-d.is-selected .dw { color: var(--purple-600, #5145CD); }
  .dv-d:focus-visible .dn { outline: 3px solid var(--purple-200, #B4ABF5); outline-offset: 1px; }

  /* the grid itself: no box, faint lines, page background */
  .tg-scroll:has(.is-phone-day) { border: 0; border-top: 1px solid var(--purple-100, #D8D3FA); border-radius: 0; background: transparent; }
  .tg.is-phone-day { grid-template-columns: 50px minmax(0, 1fr); }
  .tg.is-phone-day .tg-head .tg-date { display: none; }
  .tg.is-phone-day .tg-corner, .tg.is-phone-day .tg-head { background: #F4F2FF; border-bottom: 1px solid #E6E3F2; border-left: 0; }
  .tg.is-phone-day .tg-head { padding: 6px 4px 6px 6px; }
  .tg.is-phone-day .tg-allday { margin-top: 0; }
  .tg.is-phone-day .tg-corner { align-items: center; padding: 0 6px 0 0; font-size: 11px; color: #6F6A88; }
  .tg.is-phone-day.no-anytime .tg-corner, .tg.is-phone-day.no-anytime .tg-head { display: none; }
  .tg.is-phone-day .tg-gutter { background: transparent; }
  .tg.is-phone-day .tg-gutter span { font-size: 11.5px; color: #6F6A88; right: 8px; }
  .tg.is-phone-day .tg-col, .tg.is-phone-day .tg-col.is-today {
    border-left: 0; background-color: transparent;
    background-image: repeating-linear-gradient(to bottom, #E9E6F5 0, #E9E6F5 1px, transparent 1px, transparent var(--hour));
  }
  .tg.is-phone-day .blk { border-radius: 12px; }
  .tg.is-phone-day .blk.is-task { background: #fff; border: 1px solid #D8D3FA; border-left: 4px solid var(--c); box-shadow: 0 1px 2px rgba(30, 26, 77, .06); }
  .tg.is-phone-day .blk.is-event { background: var(--s) !important; border: 1px solid transparent; border-left: 4px solid var(--c); }
  .tg.is-phone-day .blk.is-event .blk-title, .tg.is-phone-day .blk.is-event .blk-time { color: #1E1A4D !important; }
  .tg.is-phone-day .blk.is-event .blk-time { color: #4A4566 !important; }
  .tg.is-phone-day .blk.is-event .blk-title i { color: var(--c) !important; }
  .tg.is-phone-day .blk-title { font-size: 14.5px; font-weight: 600; color: #1E1A4D; }
  .tg.is-phone-day .blk-time { font-size: 12.5px; color: #66617F; }
  .tg.is-phone-day .blk.is-done { opacity: .6; }
}

/* =========================================================
   WEBSITE / TABLET MONTH (12 Oct 2026): same clean grid as phones,
   but each day keeps up to 3 items (drag them to another day);
   the chosen day's list sits beside the grid on wide screens.
   ========================================================= */
.mv-phone.mv-wide .mv-grid { grid-auto-rows: minmax(112px, auto) !important; }
.mv-phone.mv-wide .mv-day { align-items: stretch; padding: 4px 3px 6px !important; gap: 3px !important; border-top: 1px solid #ECE9F6 !important; border-radius: 0; }
.mv-phone.mv-wide .mv-day:hover { background: #FBFAFF !important; }
.mv-phone.mv-wide .mv-day.is-selected { background: #F6F4FF !important; border-radius: 12px; }
.mv-phone.mv-wide .mv-num { align-self: center !important; width: 34px !important; height: 34px !important; font-size: 15px !important; margin-bottom: 2px !important; }
.mv-phone.mv-wide .mv-day.is-out .mv-item { opacity: .55; }
.mv-phone.mv-wide .mv-dow span { font-size: 13px; }
.mv-wrap.is-wide .ag { border-top: 1px solid var(--purple-100, #D8D3FA); margin-top: 14px; padding-top: 16px; }
@media (min-width: 1100px) {
  .mv-wrap.is-wide { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
  .mv-wrap.is-wide .ag { border-top: 0; border-left: 1px solid var(--purple-100, #D8D3FA); margin-top: 0; padding: 4px 0 0 20px; position: sticky; top: 12px; }
}
@media (min-width: 700px) {
  .cal-toolbar .cv-gcal { width: auto !important; padding: 0 14px !important; gap: 7px; margin-left: 8px !important; }
  .cal-toolbar .cv-switch { flex: 0 0 auto !important; width: auto !important; order: 7 !important; margin-left: 12px !important; display: inline-grid !important; }
  .cal-toolbar .cv-switch button { padding: 7px 18px; }
}
/* first-day card: looks like an Ask Planora box, opens the Ask Planora pop-up (13 Oct 2026) */
.first-day-card { display: flex; flex-direction: column; gap: 10px; }
.first-day-card[hidden] { display: none; }
.fd-head { display: flex; align-items: center; gap: 8px; }
.fd-head i { color: var(--purple-400, #6C5CE7); font-size: 20px; }
.fd-head .card-title { margin: 0; }
.first-day-card .first-day-sub { margin: 0; }
.fd-compose { background: #fff; border: 1px solid var(--purple-100, #D8D3FA); border-radius: 18px; padding: 4px 6px 6px; display: flex; flex-direction: column; gap: 4px; }
.fd-type { border: 0; background: none; text-align: left; font: inherit; font-size: 16px; color: #8A85A3; padding: 12px 10px 14px; min-height: 50px; cursor: text; border-radius: 12px; }
.fd-type:focus-visible { outline: 3px solid var(--purple-200, #B4ABF5); }
.fd-tools { display: flex; align-items: center; gap: 6px; }
.fd-tool { width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--purple-50, #EFEDFF); color: var(--purple-600, #5145CD); font-size: 20px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fd-send { margin-left: auto; width: 52px; height: 44px; border: 0; border-radius: 12px; background: var(--purple-400, #6C5CE7); color: #fff; font-size: 18px; opacity: .45; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.fd-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.first-day-card .first-day-actions { margin-top: 0; }
/* while the Ask Planora pop-up is open it is the only thing on screen */
body.ask-open .fab, body.ask-open .install-banner, body.ask-open #pwa-install, body.ask-open .bottom-nav { visibility: hidden; }

/* Ask Planora pop-up fills almost the whole screen (13 Oct 2026) */
.ask-pop { align-items: center; padding: 3vh 16px; }
.ask-pop-panel { width: min(820px, 100%); height: 92vh; display: flex; }
.ask-pop .home-ask { flex: 1; height: 100%; max-height: none !important; display: flex; flex-direction: column; padding: 24px 24px 20px; }
.ask-pop .home-ask > .sp-root { flex: 1; min-height: 0; }
.ask-pop .sp-input { min-height: 72px; }
@media (max-width: 699px) {
  .ask-pop { align-items: flex-end; padding: 0; }
  .ask-pop-panel { width: 100%; height: calc(100dvh - 28px); }
  .ask-pop .home-ask { border-radius: 24px 24px 0 0; padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); }
}
.ask-pop .sp-head { min-height: 40px; margin-bottom: 6px; }
.ask-pop-close { top: 16px; right: 16px; }
.ask-pop { max-width: none !important; width: auto !important; margin: 0 !important; }

/* =========================================================
   SECTION COLOURS (13 Oct 2026) — each part of Home has its own colour
   purple = Planora / asking · green = your day · blue = calendar
   orange = journal · teal-green = goals
   ========================================================= */
#first-day {
  background: linear-gradient(140deg, #EEEBFF 0%, #E2DCFF 100%) !important;
  border: 1px solid #D3CBFF !important; box-shadow: 0 6px 18px rgba(81, 69, 205, .12) !important;
}
#first-day .card-title { color: #3A2FA0 !important; }
#first-day .fd-head i { color: #5145CD !important; }
#first-day .first-day-sub { color: #4A4566 !important; }
#first-day .fd-compose { border-color: #fff; box-shadow: 0 2px 8px rgba(58, 47, 160, .10); }
#first-day .fd-send { opacity: 1; background: #6C5CE7; }

#schedule-card { border-top: 3px solid #4CB894 !important; }
#schedule-card .card-title::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4CB894; margin-right: 8px; vertical-align: 2px; }
#schedule-card .day-bar { background: #EAF7F1 !important; }
#schedule-card .day-bar-btn { color: #1F8A66 !important; }

.home-links a, .home-links button { border: 0 !important; }
.home-links a[href="calendar.html"] { background: #EAF2FC !important; }
.home-links a[href="calendar.html"] i { color: #2F7FD6 !important; }
.home-links a[href^="planner.html"] { background: #E8F6F0 !important; }
.home-links a[href^="planner.html"] i { color: #1F8A66 !important; }
.home-links a[href="journal.html"] { background: #FFF2E8 !important; }
.home-links a[href="journal.html"] i { color: #E06A1F !important; }
.home-links button[data-quick-add] { background: #EFEDFF !important; }
.home-links button[data-quick-add] i { color: #5145CD !important; }

.journal-nudge { background: #FFF6EF !important; border-color: #FBDCC4 !important; }
.journal-nudge > i:first-child { color: #E06A1F !important; background: #FFE6D3 !important; }
/* lighter (13 Oct 2026, 2): first-day very light (Today's schedule stays green) */
#first-day { background: linear-gradient(140deg, #FCFBFF 0%, #F6F4FF 100%) !important; border: 1px solid #ECE8FF !important; box-shadow: 0 2px 8px rgba(81, 69, 205, .06) !important; }
#first-day .fd-compose { border: 1px solid #E6E1FF; box-shadow: none; }
/* lighter page background on phones/tablets (13 Oct 2026) */
html:not(.web-mode) body { background: linear-gradient(180deg, #F5F9FE 0%, #F8F7FF 100%) !important; }
/* first-day card a touch deeper (13 Oct 2026, 3) */
#first-day { background: linear-gradient(140deg, #F4F1FF 0%, #EAE5FF 100%) !important; border: 1px solid #DDD6FF !important; }
/* Today's schedule: blue card (15 Oct 2026) */
#schedule-card { background: linear-gradient(140deg, #F1F7FE 0%, #E7F1FD 100%) !important; border: 1px solid #D5E6FA !important; border-top: 3px solid #4A90E2 !important; }
#schedule-card .card-title::before { background: #4A90E2 !important; }
#schedule-card .day-bar { background: #FFFFFF !important; }
#schedule-card .day-bar-btn { color: #2F6FBF !important; }
/* Profile: When are you busy? (17 Oct 2026) */
.busy-card { border-top: 3px solid #E09A1A !important; }
.busy-sub { margin: -4px 0 12px; font-size: 13.5px; color: var(--pl-muted, #6B6880); line-height: 1.45; }
.busy-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.busy-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1px solid #F4E3C4; background: #FFF8EC; cursor: pointer; font: inherit; color: inherit; }
.busy-row:hover { border-color: #EBCB91; }
.busy-ico { width: 36px; height: 36px; border-radius: 10px; background: #FCEBCB; color: #B9770E; display: grid; place-items: center; font-size: 19px; flex: 0 0 auto; }
.busy-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.busy-text strong { font-size: 14.5px; font-weight: 600; }
.busy-text small { font-size: 12.5px; color: var(--pl-muted, #6B6880); }
.busy-edit { color: #B9770E; font-size: 17px; }
.busy-empty { margin: 0; padding: 12px 14px; border-radius: 14px; border: 1px dashed #EBCB91; background: #FFFBF4; font-size: 13px; color: var(--pl-muted, #6B6880); }
.busy-add { display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.busy-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.busy-chip, .busy-presets button { border: 1px solid #E4E1F5; background: #fff; color: #3F3A60; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.busy-chip.on { background: #EFEDFF; border-color: #6C5CE7; color: #4B3FC4; font-weight: 600; }
.busy-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.busy-day { height: 40px; border-radius: 12px; border: 1px solid #E4E1F5; background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: #3F3A60; cursor: pointer; }
.busy-day.on { background: #6C5CE7; border-color: #6C5CE7; color: #fff; }
.busy-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: -2px; }
.busy-presets button { font-size: 12px; padding: 4px 10px; color: #5145CD; }
.busy-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.busy-times > div { display: flex; flex-direction: column; gap: 10px; }
.busy-times input { width: 100%; }
.busy-del { color: #C53030 !important; display: inline-flex !important; align-items: center; justify-content: center; gap: 6px; }
/* Ask bar above Today's schedule — website (17 Oct 2026) */
.ask-bar { padding: 12px !important; background: linear-gradient(140deg, #F4F1FF 0%, #EAE5FF 100%) !important; border: 1px solid #DDD6FF !important; box-shadow: 0 2px 8px rgba(81, 69, 205, .06) !important; }
.ask-bar[hidden], html:not(.web-mode) .ask-bar { display: none !important; }
.ask-bar .fd-compose { border: 1px solid #E6E1FF; box-shadow: none; flex-direction: row; align-items: center; gap: 6px; padding: 6px; }
.ask-bar .fd-type { flex: 1; min-width: 0; min-height: 44px; padding: 10px 10px; display: flex; align-items: center; gap: 8px; color: #6E6890; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-bar .fd-type i { color: #6C5CE7; font-size: 19px; flex: 0 0 auto; }
.ask-bar .fd-send { margin-left: 0; opacity: 1; background: #6C5CE7; }
@media (max-width: 899px) { #ask-bar { order: 3; } }
@media (max-width: 420px) { .ask-bar .fd-tool { width: 40px; } .ask-bar .fd-send { width: 46px; } }
/* Planora time picker (17 Oct 2026) — replaces the browser's boxy list on computers */
@media (pointer: fine) {
  input[type="time"]:not(.hidden-time-input) {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236C5CE7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 3'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px !important;
  }
  input[type="time"]:not(.hidden-time-input)::-webkit-calendar-picker-indicator { display: none; }
  input[type="time"].tp-open { border-color: #6C5CE7 !important; box-shadow: 0 0 0 3px rgba(108, 92, 231, .14) !important; }
}
.tp-pop { position: fixed; z-index: 2147483000; width: 284px; padding: 14px; border-radius: 20px; background: #fff; border: 1px solid #ECE9FB;
  box-shadow: 0 18px 48px rgba(30, 26, 60, .18), 0 2px 6px rgba(30, 26, 60, .06); font-family: inherit; animation: tpIn .14s ease-out; }
@keyframes tpIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.tp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tp-now { font-size: 22px; font-weight: 700; color: #1E1A3C; letter-spacing: -.01em; }
.tp-ampm { display: flex; background: #F2F0FC; border-radius: 999px; padding: 3px; }
.tp-ampm button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: #6E6890; padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.tp-ampm button.on { background: #6C5CE7; color: #fff; box-shadow: 0 1px 3px rgba(108, 92, 231, .35); }
.tp-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #9A95B3; margin: 8px 2px 6px; }
.tp-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tp-grid.four { grid-template-columns: repeat(4, 1fr); }
.tp-grid button { height: 34px; border: 0; border-radius: 10px; background: #F7F6FD; color: #2E2A4A; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background .12s; }
.tp-grid button:hover { background: #ECE9FD; }
.tp-grid button.on { background: #6C5CE7; color: #fff; font-weight: 600; }
.tp-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.tp-foot button { border: 0; font: inherit; font-size: 13.5px; font-weight: 600; border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.tp-clear { background: none; color: #6E6890; margin-right: auto; }
.tp-done { background: #EFEDFF; color: #4B3FC4; }
.tp-done:hover { background: #E3DFFF; }
/* Home suggestions: short one-line strips on phones and tablets (17 Oct 2026) */
.rec-short { display: none; }
.rec-x-alt { display: none; }
html:not(.web-mode) .home-recs { gap: 8px; }
html:not(.web-mode) .rec-card {
  grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  padding: 8px 6px 8px 12px; border-radius: 14px; border: 1px solid #E6E2FA; border-left: 3px solid #6C5CE7;
  background: #fff; box-shadow: none;
}
html:not(.web-mode) .rec-long { display: none; }
html:not(.web-mode) .rec-short { display: inline; }
html:not(.web-mode) .rec-icon { font-size: 17px; margin: 0; color: #6C5CE7; }
html:not(.web-mode) .rec-card p { font-size: 13px; line-height: 1.35; font-weight: 500; color: #2E2A4A;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html:not(.web-mode) .rec-actions { grid-column: 3; grid-row: 1; margin: 0; gap: 2px; }
html:not(.web-mode) .rec-actions .btn-primary { padding: 6px 12px !important; font-size: 12.5px !important; border-radius: 999px !important; min-height: 0; height: 32px; white-space: nowrap; font-weight: 600; }
html:not(.web-mode) .rec-later { display: none; }
html:not(.web-mode) .rec-x-alt { display: inline-flex; }
html:not(.web-mode) .rec-x { width: 32px !important; height: 32px !important; font-size: 15px; }
/* Add a task: name, date, time, colour — the rest under "More options" (17 Oct 2026) */
.qa-main { grid-template-columns: 1fr 1fr !important; }
.qa-more { border: 1px solid #ECE9FB; border-radius: 14px; background: #FAF9FF; }
.qa-more > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; font-size: 14px; font-weight: 600; color: #3F3A60; }
.qa-more > summary::-webkit-details-marker { display: none; }
.qa-more-sum { margin-left: auto; font-size: 12.5px; font-weight: 500; color: #8A85A3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-more > summary i { color: #8A85A3; transition: transform .15s; }
.qa-more[open] > summary i { transform: rotate(180deg); }
.qa-more-body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
.sp-edit-grid.qa-main label:first-child { grid-column: auto; }
.qa-more-body .sp-edit-grid label:first-child { grid-column: auto; }
.sp-edit-grid.qa-main input { width: 100%; box-sizing: border-box; }
/* Colour: one line until you tap Change (17 Oct 2026) */
.cc-collapsed .edit-color-chips, .cc-collapsed .edit-color-dots { display: none !important; }
.color-current { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #E6E2FA; border-radius: 12px; background: #fff; font: inherit; color: #2E2A4A; cursor: pointer; text-align: left; }
.color-current:hover { border-color: #C9C1F5; }
.cc-dot { width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 2px rgba(255,255,255,.6); }
.cc-name { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-act { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: #5145CD; }
.edit-color-field:not(.cc-collapsed) .color-current { margin-bottom: 4px; }
/* Phone/tablet: today card = "Let's plan your day" + ask box + status + small actions (17 Oct 2026) */
.tb-plan { display: none; }
html .today-bar:not([hidden]) {
  display: flex !important; flex-direction: column; align-items: stretch; gap: 10px;
  padding: 16px !important; border-radius: 20px !important;
  background: linear-gradient(140deg, #F4F1FF 0%, #EAE5FF 100%) !important; border: 1px solid #DDD6FF !important;
  box-shadow: 0 2px 8px rgba(81, 69, 205, .06) !important;
}
html .tb-plan { display: flex; flex-direction: column; gap: 10px; }
html .tb-plan .card-title { color: #3A2FA0 !important; font-size: 17px; }
html .tb-plan .fd-head i { color: #5145CD; }
html .tb-compose { border: 1px solid #E6E1FF; box-shadow: none; flex-direction: row; align-items: center; gap: 6px; padding: 6px; background: #fff; }
html .tb-compose .fd-type { flex: 1; min-width: 0; min-height: 44px; padding: 10px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html .tb-compose .fd-tool { width: 40px; height: 40px; font-size: 18px; }
html .tb-compose .fd-send { margin-left: 0; width: 44px; height: 40px; opacity: 1; background: #6C5CE7; }
html .today-bar .wl { font-size: 13px; line-height: 1.4; gap: 6px; padding: 0 2px; }
html .today-bar .wl-text { color: #4A4566; }
html .today-actions { display: flex !important; flex-wrap: nowrap; gap: 6px !important; width: 100%; }
html .today-actions > button { flex: 1 1 0; min-width: 0; width: auto !important; height: 36px; padding: 0 8px !important; font-size: 13px !important; font-weight: 600;
  border-radius: 999px !important; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  background: rgba(255,255,255,.75) !important; color: #4B3FC4 !important; border: 1px solid #DCD5FF !important; box-shadow: none !important; }
html .today-actions > button[hidden] { display: none !important; }
html .today-actions > button:first-child { background: #6C5CE7 !important; color: #fff !important; border-color: #6C5CE7 !important; }
html .today-actions .lbl-long { display: none; }
html .today-actions .lbl-short { display: inline; }
html .tb-plan, html .tb-compose { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
html .tb-compose .fd-type { flex: 1 1 0; }
html .tb-compose .fd-tools { flex: 0 0 auto; gap: 6px; }
html .tb-plan .card-title { font-weight: 700; }
html .tb-compose .fd-type { font-size: 14.5px; padding: 10px 6px 10px 10px; }
html .tb-compose .fd-tool { width: 36px; height: 38px; font-size: 17px; }
html .tb-compose .fd-send { width: 42px; height: 38px; }
html .tb-compose .fd-tools { gap: 4px; }
/* Phone Home, calmer (17 Oct 2026, 2): summary under the date; one row of small actions */
.sched-summary { display: none; }
html #ai-greeting-msg { display: none; }
html .sched-summary:not([hidden]) { display: block; margin: -2px 4px 12px; font-size: 13.5px; line-height: 1.45; color: #4A4566; }
html #btn-what-now, html #btn-review { display: none !important; }
.tb-recs { display: contents; }
html .today-actions { flex-wrap: wrap !important; }
html .today-actions > button, html .tb-recs > button { flex: 1 1 auto !important; }
html .today-actions #btn-optimize { background: rgba(255,255,255,.75) !important; color: #4B3FC4 !important; border-color: #DCD5FF !important; }
html .tb-rec { height: 36px; padding: 0 12px !important; font-size: 13px !important; font-weight: 600; border-radius: 999px !important; display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
  background: #6C5CE7 !important; color: #fff !important; border: 1px solid #6C5CE7 !important; box-shadow: none !important; width: auto !important; }
html .tb-rec { background: #DED8FF !important; color: #3A2FA0 !important; border-color: #D2CAFF !important; }
/* Working… state on Home action buttons (17 Oct 2026) */
.is-busy { position: relative; pointer-events: none; opacity: .75; }
.is-busy > i.ti { visibility: hidden; }
.is-busy::before { content: ""; position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: plSpin .7s linear infinite; }
@keyframes plSpin { to { transform: rotate(360deg); } }

/* Website uses the same "Let's plan your day" card (17 Oct 2026): no separate ask bar */
html.web-mode #ask-bar { display: none !important; }
html.web-mode .today-bar:not([hidden]) { margin: 0 0 18px !important; padding: 18px 20px !important; }
html.web-mode .tb-compose .fd-type { font-size: 15px; }
html.web-mode .today-actions { width: auto; }
html.web-mode .today-actions > button, html.web-mode .tb-recs > button { flex: 0 0 auto !important; padding: 0 16px !important; }
/* =========================================================
   Today's schedule tasks look like the calendar's day list (18 Oct 2026)
   [○ check]  Title / time / label  [✎] [🗑]
   ========================================================= */
#task-list .task-item, #completed-list .task-item {
  --cc: var(--task-c, var(--c, #6C5CE7));
  display: flex; align-items: center !important; justify-content: flex-start !important; gap: 4px !important;
  min-height: 60px; padding: 4px 6px 4px 4px !important; margin-bottom: 8px !important;
  background: #fff; border: 1px solid #E3DEFA !important; border-left: 4px solid var(--cc) !important; border-radius: 14px !important;
  box-shadow: none !important;
}
#task-list .task-item.event-item { background: linear-gradient(90deg, var(--s, #EEEDFE) 0%, #fff 75%) !important; }
#task-list .task-item > .task-actions, #completed-list .task-item > .task-actions { display: contents !important; }
#task-list .task-item > div:first-child, #completed-list .task-item > div:first-child { order: 1; flex: 1; min-width: 0; padding: 6px 4px; }
#task-list .task-item .t-title, #completed-list .task-item .t-title { font-size: 15.5px !important; font-weight: 600 !important; color: #1E1A4D !important; line-height: 1.3; margin: 0 0 2px !important; }
#task-list .task-item .t-time, #completed-list .task-item .t-time { font-size: 13px !important; color: #66617F !important; margin: 0 !important; }
#task-list .task-item .t-cat, #task-list .task-item .t-goal, #completed-list .task-item .t-cat, #completed-list .task-item .t-goal { font-size: 12.5px !important; margin: 2px 0 0 !important; }
#completed-list .task-item .t-title, #task-list .task-item.completed .t-title { text-decoration: line-through; color: #9C98B3 !important; font-weight: 500 !important; }

/* round check on the left, in the task's colour */
#task-list .task-item .task-check-btn, #completed-list .task-item .task-check-btn {
  order: 0; flex: 0 0 44px; width: 44px !important; height: 44px !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: none !important; box-shadow: none !important; position: relative; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
#task-list .task-item .task-check-btn::before, #completed-list .task-item .task-check-btn::before {
  content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--cc); box-sizing: border-box; background: #fff;
}
#task-list .task-item .task-check-btn i, #completed-list .task-item .task-check-btn i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: transparent !important;
}
#task-list .task-item .task-check-btn:hover::before { background: var(--s, #EFEDFF); }
#completed-list .task-item .task-check-btn::before, #task-list .task-item.completed .task-check-btn::before { background: var(--cc); }
#completed-list .task-item .task-check-btn i, #task-list .task-item.completed .task-check-btn i { color: #fff !important; }

/* events: calendar icon on the left */
#task-list .task-item .ev-lead { order: 0; flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; color: var(--cc); }

/* edit + delete on the right, quiet */
#task-list .task-item .task-edit-btn, #task-list .task-item .task-del-btn,
#completed-list .task-item .task-edit-btn, #completed-list .task-item .task-del-btn {
  order: 2; flex: 0 0 36px; width: 36px !important; height: 36px !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; border-radius: 10px !important; background: none !important; box-shadow: none !important;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
#task-list .task-item .task-del-btn, #completed-list .task-item .task-del-btn { order: 3; }
#task-list .task-item .task-edit-btn i, #task-list .task-item .task-del-btn i,
#completed-list .task-item .task-edit-btn i, #completed-list .task-item .task-del-btn i { font-size: 18px !important; color: #8A85A3 !important; }
#task-list .task-item .task-edit-btn:hover, #completed-list .task-item .task-edit-btn:hover { background: #EFEDFF !important; }
#task-list .task-item .task-del-btn:hover, #completed-list .task-item .task-del-btn:hover { background: #FDECEC !important; }
#task-list .task-item .task-del-btn:hover i, #completed-list .task-item .task-del-btn:hover i { color: #C53030 !important; }
/* Start lives in the task's sheet now (tap the task) */
#task-list .task-item .task-start-btn, #completed-list .task-item .task-start-btn { display: none !important; }

/* calendar day list: the same edit + delete */
.ag-acts { display: inline-flex; gap: 0; flex: 0 0 auto; }
.ag-act { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.ag-act i { font-size: 18px; color: #8A85A3; }
.ag-act:hover { background: #EFEDFF; }
.ag-act.is-del:hover { background: #FDECEC; }
.ag-act.is-del:hover i { color: #C53030; }

#task-list .task-item[style*="display: none"], #completed-list .task-item[style*="display: none"] { display: none !important; }
/* Reminders sheet */
#nt-test[hidden] { display: none !important; }
.nt-status { margin: 0 0 4px; }
/* Show / hide password */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap > input { width: 100%; box-sizing: border-box; padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: none; color: #6E6890; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.pw-eye:hover { background: rgba(108, 92, 231, .08); color: #4B3FC4; }
.pw-eye:focus-visible { outline: 3px solid #B4ABF5; outline-offset: 1px; }
.pw-eye[aria-pressed="true"] { color: #4B3FC4; }
/* Break down a task: changes in words (18 Oct 2026) */
.tb-note { margin: 10px 2px 0; font-size: 13.5px; line-height: 1.45; color: #3F3A60; background: #F4F1FF; border: 1px solid #E3DEFA; border-radius: 12px; padding: 9px 12px; }
.tb-note[hidden] { display: none; }
.tb-note.is-error { color: #9B2C2C; background: #FDECEC; border-color: #F8D0D0; }
@keyframes tbFlash { 0% { box-shadow: 0 0 0 0 rgba(108, 92, 231, .45); } 100% { box-shadow: 0 0 0 14px rgba(108, 92, 231, 0); } }
.tb-flash { animation: tbFlash .9s ease-out 1; }
/* =========================================================
   Planora page colours (18 Oct 2026) — match Home
   Ask Planora = lavender (like "Let's plan your day")
   Your goals  = blue (like Today's schedule)
   Quick tools = one colour each
   ========================================================= */
.sp-planner-card {
  background: linear-gradient(140deg, #F4F1FF 0%, #EAE5FF 100%) !important;
  border: 1px solid #DDD6FF !important; box-shadow: 0 2px 8px rgba(81, 69, 205, .06) !important;
}
.sp-planner-card .sp-head h2, .sp-planner-card .sp-title { color: #3A2FA0 !important; }
.sp-planner-card .sp-compose, .sp-planner-card .sp-input-wrap { background: #fff; border-color: #E6E1FF !important; }

#goals.pl-section {
  background: linear-gradient(140deg, #F1F7FE 0%, #E7F1FD 100%);
  border: 1px solid #D5E6FA; border-top: 3px solid #4A90E2; border-radius: 20px;
  padding: 16px 16px 12px; margin-bottom: 18px;
}
#goals .pl-section-head .card-title::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #4A90E2; margin-right: 8px; vertical-align: 2px; }
#goals .pl-head-btn { color: #2F6FBF !important; }
#goals .gt-empty, #goals .pl-empty { background: rgba(255,255,255,.75); border-color: #C9DDF6 !important; }

.quick-tools .quick-tool { border: 0 !important; }
.quick-tools .quick-tool[data-tab="daily"]     { background: #EAF2FC !important; }
.quick-tools .quick-tool[data-tab="daily"] i   { color: #2F7FD6 !important; }
.quick-tools .quick-tool[data-tab="breakdown"] { background: #EFEDFF !important; }
.quick-tools .quick-tool[data-tab="breakdown"] i { color: #5145CD !important; }
.quick-tools .quick-tool[data-tab="study"]     { background: #E8F6F0 !important; }
.quick-tools .quick-tool[data-tab="study"] i   { color: #1F8A66 !important; }
.quick-tools .quick-tool:not([data-tab])       { background: #FFF2E8 !important; }
.quick-tools .quick-tool:not([data-tab]) i     { color: #E06A1F !important; }
.quick-tools .quick-tool:hover { filter: brightness(.97); }
.quick-tools .quick-tool.active, .quick-tools .quick-tool[aria-selected="true"] { box-shadow: inset 0 0 0 2px currentColor; }
.quick-tools .quick-tool[data-tab="daily"].active { box-shadow: inset 0 0 0 2px #2F7FD6; }
.quick-tools .quick-tool[data-tab="breakdown"].active { box-shadow: inset 0 0 0 2px #5145CD; }
.quick-tools .quick-tool[data-tab="study"].active { box-shadow: inset 0 0 0 2px #1F8A66; }
/* Create sheet: "Plan with AI" box (18 Oct 2026) */
.ai-quick { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; padding: 6px 6px 6px 12px; border-radius: 16px;
  background: linear-gradient(140deg, #F4F1FF 0%, #EAE5FF 100%); border: 1px solid #DDD6FF; }
.ai-quick > i { color: #5145CD; font-size: 19px; flex: 0 0 auto; }
.ai-quick input { flex: 1; min-width: 0; border: 1px solid #E6E1FF !important; background: #fff !important; border-radius: 12px !important; height: 44px; padding: 0 12px !important; font: inherit; font-size: 15px; margin: 0 !important; }
.ai-quick-go { flex: 0 0 44px; height: 44px; border: 0; border-radius: 12px; background: #6C5CE7; color: #fff; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.create-or { display: flex; align-items: center; gap: 10px; margin: 8px 0 6px; color: #8A85A3; font-size: 12.5px; }
.create-or::before, .create-or::after { content: ""; flex: 1; height: 1px; background: #E6E2FA; }
.sheet-ask { min-height: 360px; max-height: 70vh; display: flex; flex-direction: column; }
.sheet-ask > .sp-root { flex: 1; min-height: 0; }

/* ---------- First-time tour (tour.js) ---------- */
.tour-root { position: fixed; inset: 0; z-index: 2147483100; }
.tour-block { position: absolute; inset: 0; }                       /* stops taps on the page during the tour */
.tour-root.is-center .tour-block { background: rgba(30, 26, 77, .55); }
.tour-spot {
  position: fixed; pointer-events: none; border-radius: 16px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .95), 0 0 0 9999px rgba(30, 26, 77, .55);
  transition: left .25s ease, top .25s ease, width .25s ease, height .25s ease;
}
.tour-card {
  position: fixed; box-sizing: border-box; background: #fff; color: #1E1A4D; border-radius: 20px;
  padding: 16px 18px 14px; box-shadow: 0 20px 50px rgba(30, 26, 77, .28); font-family: inherit;
}
.tour-card.tour-in { animation: tourIn .22s ease; }
@keyframes tourIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tour-card::before {                                                /* little pointer towards the highlighted item */
  content: ""; position: absolute; left: calc(var(--arrow-x, 50%) - 8px); width: 16px; height: 16px; background: #fff;
  transform: rotate(45deg); border-radius: 3px; display: none;
}
.tour-card[data-side="below"]::before { display: block; top: -7px; }
.tour-card[data-side="above"]::before { display: block; bottom: -7px; }
.tour-top { display: flex; align-items: center; justify-content: space-between; min-height: 22px; margin-bottom: 4px; }
.tour-count { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--purple-600, #5145CD); }
.tour-skip { background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 13.5px; color: #6B6785; cursor: pointer; }
.tour-skip:hover { color: #1E1A4D; text-decoration: underline; }
.tour-title { margin: 2px 0 6px; font-size: 18px; line-height: 1.25; font-weight: 800; color: #1E1A4D; }
.tour-text { margin: 0; font-size: 15px; line-height: 1.5; color: #4A4566; }
.tour-text em { color: #3A2FA0; font-style: normal; font-weight: 600; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: #DDD8F7; }
.tour-dots i.on { width: 16px; border-radius: 3px; background: var(--purple-600, #5145CD); }
.tour-btns { display: flex; gap: 8px; margin-left: auto; }
.tour-back, .tour-next { font: inherit; font-size: 14.5px; font-weight: 700; border-radius: 12px; padding: 9px 16px; cursor: pointer; }
.tour-back { background: #F1EFFD; color: #3A2FA0; border: 0; }
.tour-next { background: var(--purple-600, #5145CD); color: #fff; border: 0; }
.tour-next:hover { background: #4337B8; }
.tour-back:focus-visible, .tour-next:focus-visible, .tour-skip:focus-visible { outline: 3px solid #A99BFF; outline-offset: 2px; }
.tour-root.is-center .tour-card { padding: 22px 22px 18px; text-align: left; }
.tour-root.is-center .tour-title { font-size: 21px; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } .tour-card.tour-in { animation: none; } }

/* ---------- Send feedback (Help and support) ---------- */
.auth-sheet textarea.fb-message {
  width: 100%; box-sizing: border-box; padding: 13px 14px; border-radius: 14px; border: 0.5px solid var(--purple-100);
  background: #fff; font: inherit; font-size: 14px; line-height: 1.5; color: var(--gray-900); resize: vertical; min-height: 120px; outline: none;
}
.auth-sheet textarea.fb-message:focus { border-color: var(--purple-400); box-shadow: 0 0 0 3px var(--purple-50); }
.auth-sheet textarea.fb-message::placeholder { color: var(--gray-400); }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.auth-sheet .auth-error a { color: inherit; font-weight: 600; }
.fb-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 4px 2px; }
.fb-done-icon { width: 56px; height: 56px; border-radius: 50%; background: #E3F5EC; color: #1D9E75; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.fb-done h3 { margin: 4px 0 0; font-size: 18px; }
.fb-done .btn-primary { margin-top: 6px; }

/* ---------- Voice chat: spoken replies (smart-planner.js) ---------- */
.sp-head-tools { display: inline-flex; align-items: center; gap: 6px; }
.sp-voice-toggle {
  display: inline-flex; align-items: center; gap: 5px; border: none; background: var(--purple-50); color: var(--purple-600);
  font: inherit; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer;
}
.sp-voice-toggle[hidden] { display: none; }
.sp-voice-toggle[aria-pressed="false"] { background: #F1F0F5; color: var(--gray-600); }
.sp-voice-toggle i { font-size: 15px; }
.sp-bubble .sp-stop-voice { display: none; }
.sp-bubble.is-speaking { box-shadow: 0 0 0 2px rgba(108, 92, 231, .35); }
.sp-bubble.is-speaking .sp-stop-voice {
  display: flex; width: max-content; align-items: center; gap: 4px; margin: 8px 0 0; border: none; background: #fff; color: var(--purple-600);
  font: inherit; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.sp-bubble.is-speaking::before {
  content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px;
  background: linear-gradient(var(--purple-600), var(--purple-600)) 0 50%/2px 40% no-repeat,
              linear-gradient(var(--purple-600), var(--purple-600)) 4px 50%/2px 100% no-repeat,
              linear-gradient(var(--purple-600), var(--purple-600)) 8px 50%/2px 60% no-repeat,
              linear-gradient(var(--purple-600), var(--purple-600)) 12px 50%/2px 80% no-repeat;
  animation: spEq .9s ease-in-out infinite alternate;
}
@keyframes spEq { from { opacity: .45; transform: scaleY(.7); } to { opacity: 1; transform: scaleY(1); } }
.sp-root.sp-convo .sp-input.is-listening { box-shadow: 0 0 0 3px var(--purple-50); }
@media (prefers-reduced-motion: reduce) { .sp-bubble.is-speaking::before { animation: none; } }

/* ---------- Profile → My week (wake/sleep, weekly targets) ---------- */
.week-sub { margin: 10px 2px 2px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--gray-600); }
.week-target .wt-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; margin: 0 4px 0 2px; }
.week-target .busy-text { flex: 1; min-width: 0; }
.wt-bar { display: block; height: 6px; border-radius: 6px; background: #EEECF7; margin-top: 6px; overflow: hidden; }
.wt-bar > span { display: block; height: 100%; border-radius: 6px; }
.busy-hint { font-size: 12px; color: var(--gray-600); margin: -4px 0 0; }
.auth-sheet select, .auth-sheet input[type="number"] {
  width: 100%; padding: 12px 14px; border-radius: 14px; border: 0.5px solid var(--purple-100); background: #fff;
  font: inherit; font-size: 14px; color: var(--gray-900);
}

/* ---------- Ask Planora: markdown replies (tables, lists) and remembered chat ---------- */
.sp-bubble.sp-md { white-space: normal; }
.sp-bubble.sp-md p { margin: 0 0 6px; }
.sp-bubble.sp-md p:last-child, .sp-bubble.sp-md ul:last-child, .sp-bubble.sp-md ol:last-child { margin-bottom: 0; }
.sp-bubble.sp-md ul, .sp-bubble.sp-md ol { margin: 4px 0 6px; padding-left: 18px; }
.sp-bubble.sp-md li { margin: 2px 0; }
.sp-table-wrap { overflow-x: auto; margin: 6px 0 8px; border-radius: 10px; background: #fff; border: 1px solid #E4E0F7; -webkit-overflow-scrolling: touch; }
.sp-table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.4; }
.sp-table th { text-align: left; font-weight: 700; color: var(--purple-800); background: #F6F4FF; padding: 6px 10px; white-space: nowrap; }
.sp-table td { padding: 6px 10px; border-top: 1px solid #EEECF7; vertical-align: top; }
.sp-table td:first-child { white-space: nowrap; color: var(--purple-800); font-weight: 600; font-variant-numeric: tabular-nums; }
.sp-earlier { align-self: center; margin: 2px 0; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-400); }
.sp-bubble.is-old { opacity: .78; }
.sp-bubble.ai.sp-md { max-width: 100%; }
/* replies with tables need more room in the Ask pop-up */
.ask-pop .sp-log { max-height: min(56vh, 560px); }
@media (min-width: 900px) { .ask-pop .sp-log { max-height: min(60vh, 640px); } }

/* ---------- Filter by label (Home schedule + Calendar day list) ---------- */
.sched-tools { display: inline-flex; align-items: center; gap: 2px; }
.lf-btn { position: relative; border: none; background: transparent; cursor: pointer; font: inherit; }
.icon-link.lf-btn { color: var(--purple-400); font-size: 20px; }
.ag-day.ag-filter { position: relative; }
.lf-btn.is-on { background: var(--purple-50); color: var(--purple-600); }
.ag-day.ag-filter.is-on { background: #EFEDFF; border-color: var(--purple-400, #8B7FE8); }
.lf-count {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box;
  border-radius: 9px; background: var(--purple-600, #5145CD); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center;
}
.lf-count[hidden] { display: none; }
.lf-list { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 6px; }
.lf-opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px;
  border: 1px solid var(--purple-100, #D8D3FA); background: #fff; font: inherit; font-size: 14.5px; color: #1E1A4D; cursor: pointer; text-align: left;
}
.lf-opt.on { border-color: var(--purple-400, #8B7FE8); background: #F6F4FF; }
.lf-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.lf-ico { font-size: 16px; color: var(--purple-600, #5145CD); width: 12px; display: inline-flex; justify-content: center; flex: none; }
.lf-name { flex: 1; min-width: 0; }
.lf-tick { color: var(--purple-600, #5145CD); font-size: 18px; visibility: hidden; }
.lf-opt.on .lf-tick { visibility: visible; }
.lf-actions { display: flex; gap: 8px; margin-top: 4px; }
.lf-actions > * { flex: 1; }
.completed-section.lf-hidden { display: none !important; }
.icon-link.lf-btn { padding: 4px; border-radius: 8px; }
.icon-link.lf-btn .lf-count { top: -7px; right: -8px; }

/* iPhone app (31 Oct 2026): hidden sign-in buttons stay hidden */
.oauth-btn[hidden] { display: none !important; }
