/* ============================================================
   yourtime — app (calendar + data explorer)
   ============================================================ */

html, body { height: 100%; }

body.app-body {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

/* On desktop the app sits in a centred phone-width column
   over the faint grid; on mobile it is the full viewport. */
.device {
  position: relative;
  width: 100%;
  max-width: 460px;
  height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 700px) and (max-width: 1023px) {
  body.app-body { padding: 28px 0; }
  .device {
    height: calc(100dvh - 56px);
    max-height: 940px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  }
}

/* ---------------- top bar ---------------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px;
  flex: 0 0 auto;
}

.month-btn {
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}
.month-btn .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--ink);
  transition: transform 0.25s;
}
.month-btn.open .caret { transform: rotate(180deg); }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  opacity: 0.9;
}
.icon-btn svg { display: block; }

.today-chip {
  width: 34px; height: 34px;
  border: 1px solid var(--hairline-strong);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-dim);
}

/* Vimcal-style mobile topbar: month + controls grouped into rounded pills */
@media (max-width: 1023px) {
  .topbar { padding: 14px 14px 10px; }
  .month-btn {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--hairline);
    font-size: 12px;
  }
  .topbar-right {
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--hairline);
  }
  .topbar-right .icon-btn { padding: 6px; }
  .today-chip { width: 30px; height: 30px; border: none; border-radius: 8px; background: rgba(255, 255, 255, 0.1); }
  .device.light .month-btn, .device.light .topbar-right {
    background: #fff;
    border-color: #e2e5ea;
    box-shadow: 0 2px 10px rgba(30, 40, 60, 0.07);
  }
  .device.light .today-chip { background: #eef2f8; color: #4b5260; }
}

/* ---------------- day header / week strip ---------------- */

/* Vimcal-style: the tappable Mon–Sun strip is the day header on mobile */
.day-header { display: none; }

.week-strip {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  padding: 2px 12px 10px;
  flex: 0 0 auto;
}
.week-strip button {
  flex: 1 1 0;
  padding: 4px 0 6px;
  text-align: center;
}
.week-strip button .d {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--ink-dim);
  display: block;
  margin-bottom: 6px;
}
.week-strip button .n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  font-size: 13px;
}
.week-strip button.today .d { color: var(--ink); }
.week-strip button.active .d { color: var(--ink); }
.week-strip button.active .n { background: var(--ink); color: #000; }

/* mobile all-day banner lane (chips styled by the shared .ad-chip rules) */
.day-ad { margin: 0 14px 8px; }
.day-ad[hidden] { display: none; }

/* ---------------- timeline ---------------- */

.timeline-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  position: relative;
}
.timeline-scroll::-webkit-scrollbar { display: none; }

.timeline {
  position: relative;
  margin: 8px 0 120px;
}

.hour-row {
  position: absolute;
  left: 0; right: 0;
  height: 0;
  pointer-events: none;
}
.hour-row .h-label {
  position: absolute;
  left: 6px;
  top: -5px;
  font-size: 8px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  white-space: nowrap;
}

/* ---------------- time blocks ---------------- */

.block {
  position: absolute;
  left: 48px;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.55);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.55);
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  min-height: 26px;
}

.block::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.06) 40%, rgba(0,0,0,0.26)),
    radial-gradient(120% 90% at 15% 0%, var(--blk-a) 0%, transparent 60%),
    radial-gradient(130% 100% at 90% 100%, var(--blk-a) 0%, transparent 55%),
    linear-gradient(180deg, var(--blk-b) 0%, var(--blk-a) 45%, var(--blk-b) 100%);
  filter: saturate(1) brightness(1.12);
}
.block::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.block.p-life   { --blk-a: var(--life-a);   --blk-b: var(--life-b); }
.block.p-work   { --blk-a: var(--work-a);   --blk-b: var(--work-b); }
.block.p-health { --blk-a: var(--health-a); --blk-b: var(--health-b); }
.block.p-sleep  { --blk-a: var(--sleep-a);  --blk-b: var(--sleep-b); }
.block.p-sleep::before { filter: saturate(0.8) brightness(1.02); }

.block .b-range {
  position: absolute;
  top: 8px; left: 12px;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.96);
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.block .b-dur {
  position: absolute;
  top: 6px; right: 6px;
  font-size: 9px;
  letter-spacing: 0.12em;
  padding: 4px 7px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}
.block .b-title {
  position: absolute;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  padding: 0 56px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.block .b-rating {
  position: absolute;
  bottom: 7px; right: 10px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.block .b-meta {
  position: absolute;
  bottom: 8px; left: 12px;
  display: flex;
  gap: 8px;
  color: rgba(255, 255, 255, 0.8);
}
.block .b-meta svg { display: block; }

.block.compact .b-title { font-size: 11px; }
.block.compact .b-range, .block.compact .b-meta { display: none; }
.block.compact .b-rating { bottom: 50%; transform: translateY(50%); }
.block.compact .b-dur { top: 50%; transform: translateY(-50%); }

/* ---------------- floating action buttons ---------------- */

.fab-row {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px calc(20px + env(safe-area-inset-bottom));
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
  z-index: 5;
}
.fab {
  pointer-events: auto;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(24, 24, 24, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.fab.add {
  width: 60px; height: 60px;
  background: rgba(240, 238, 232, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Vimcal-style bottom-center Command Center pill (mobile only) */
.cc-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(28, 28, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-size: 14px;
  color: var(--ink);
  white-space: nowrap;
}
.cc-pill .cc-k { opacity: 0.75; font-size: 15px; }
@media (min-width: 1024px) { .cc-pill { display: none; } }
.device.light .cc-pill { background: #26282c; border-color: #26282c; color: #fff; box-shadow: 0 6px 22px rgba(30, 40, 60, 0.25); }

/* screen-time batch bar — floating pill above the fabs */
.sugg-bar {
  position: absolute;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: calc(100% - 180px);
  padding: 10px 12px 10px 20px;
  border-radius: 999px;
  background: rgba(20, 22, 21, 0.92);
  border: 1px solid rgba(94, 222, 182, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: suggBarIn 0.28s ease;
}
@keyframes suggBarIn {
  from { opacity: 0; transform: translate(-50%, 12px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.sugg-bar[hidden] { display: none; }
.sugg-bar-label {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sugg-bar-label b { color: rgb(94, 222, 182); font-weight: 700; }
.sugg-bar-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sugg-bar-actions button {
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.03em;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
}
.sugg-bar-add {
  background: rgba(94, 222, 182, 0.9);
  color: #10231d;
  font-weight: 700;
}
.sugg-bar-add:hover { background: rgb(94, 222, 182); }
.sugg-bar-dismiss {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: var(--ink-dim);
}
.sugg-bar-dismiss:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.light .sugg-bar {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(52, 168, 138, 0.5);
}
/* --ink / --ink-dim are dark-theme off-whites with no light override —
   set explicit dark text so the label + dismiss read on the white pill */
.light .sugg-bar-label { color: #2f3440; }
.light .sugg-bar-label b { color: rgb(38, 150, 120); }
.light .sugg-bar-add { background: rgb(52, 168, 138); color: #fff; }
.light .sugg-bar-dismiss { color: #565d6b; border-color: rgba(0, 0, 0, 0.15) !important; }
.light .sugg-bar-dismiss:hover { background: rgba(0, 0, 0, 0.05); color: #2f3440; }
@media (max-width: 720px) {
  .sugg-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: calc(100% - 32px);
    max-width: 360px;
    bottom: calc(96px + env(safe-area-inset-bottom));
    padding: 14px 16px;
    border-radius: 18px;
    text-align: center;
  }
  .sugg-bar-label { font-size: 12px; white-space: normal; }
  .sugg-bar-actions { justify-content: center; }
  .sugg-bar-actions button { flex: 1; padding: 9px 14px; }
}

/* ============================================================
   DATA EXPLORER sheet
   ============================================================ */

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px) brightness(0.75);
  -webkit-backdrop-filter: blur(14px) brightness(0.75);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
  z-index: 9;
}

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  top: 34px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: rgba(10, 10, 10, 0.72);
  backdrop-filter: blur(28px) saturate(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px 18px 0 0;
  transform: translateY(104%);
  transition: transform 0.45s cubic-bezier(0.32, 0.72, 0.15, 1);
}

.device.explorer-open .sheet { transform: translateY(0); }
.device.explorer-open .sheet-backdrop { opacity: 1; pointer-events: auto; }

/* the Data Explorer stays a dark "data room" even in the light theme —
   its glass is noir, so every inherited color must be re-asserted as ink
   (otherwise light mode's dark body color makes text vanish on it) */
.device.light .sheet { color: var(--ink); }
.device.light .sheet .tag { color: var(--ink); }
.device.light .sheet-tabs { background: rgba(5, 5, 5, 0.55); }
.device.light .sheet-tabs button.active .bar { background: var(--ink); }
.device.light .sheet .range-nav button { border-color: var(--hairline-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink); }

.sheet-grab {
  width: 44px; height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  margin: 10px auto 2px;
  flex: 0 0 auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px 6px;
  flex: 0 0 auto;
}
.sheet-head .tag { color: var(--ink); font-size: 11px; }
.sheet-close { font-size: 18px; line-height: 1; padding: 4px; opacity: 0.85; }

.range-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 22px 18px;
  flex: 0 0 auto;
}
.range-title {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: -0.01em;
}
.range-nav { display: flex; }
.range-nav button {
  width: 42px; height: 34px;
  border: 1px solid var(--hairline-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  background: rgba(255, 255, 255, 0.05);
}
.range-nav button + button { border-left: none; }
.range-nav button:first-child { border-radius: 6px 0 0 6px; }
.range-nav button:last-child { border-radius: 0 6px 6px 0; }

.sheet-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 22px 24px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }

.panel { display: none; }
.panel.active { display: block; }

/* -------- activities list -------- */

.act-row { padding: 14px 0 6px; }
.act-top {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 9px;
}
.act-top .pct { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.06em; min-width: 46px; }
.act-top .name { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.act-bar-row { display: flex; align-items: center; gap: 16px; }
.act-bar {
  flex: 1 1 auto;
  height: 3px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
}
.act-bar i {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--ink);
  min-width: 2px;
}
.act-dur {
  flex: 0 0 auto;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  align-self: flex-end;
  transform: translateY(9px);
}

/* -------- pillars radial chart -------- */

.pillar-chart-wrap { display: flex; justify-content: center; padding: 10px 0 6px; }
.pillar-chart-wrap svg { width: min(100%, 360px); height: auto; }

.insight-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.12;
  letter-spacing: 0.005em;
  color: #e9e4da;
  margin: 26px 0 18px;
}
.insight-copy {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 16.5px;
  line-height: 1.55;
  color: rgba(240, 237, 230, 0.82);
}
.insight-copy .dim { color: rgba(240, 237, 230, 0.45); }

/* -------- overview (blocks) panel -------- */

.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.ov-cell {
  border: 1px solid var(--hairline);
  padding: 14px;
}
.ov-cell .v { font-size: 24px; letter-spacing: 0.02em; display: block; margin-bottom: 6px; }
.ov-cell .k { font-size: 9px; letter-spacing: 0.2em; color: var(--ink-dim); text-transform: uppercase; }

.ov-day { margin-bottom: 4px; }
.ov-day-head {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 8px;
  border-bottom: 1px solid var(--hairline);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.ov-mini {
  display: flex;
  height: 22px;
  margin: 10px 0 14px;
  gap: 2px;
}
.ov-mini i { display: block; min-width: 3px; position: relative; overflow: hidden; }
.ov-mini i::after {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grain); background-size: 240px 240px;
  opacity: 0.4; mix-blend-mode: overlay;
}
.ov-mini .m-life { background: linear-gradient(180deg, var(--life-a), var(--life-b)); }
.ov-mini .m-work { background: linear-gradient(180deg, var(--work-a), var(--work-b)); }
.ov-mini .m-health { background: linear-gradient(180deg, var(--health-a), var(--health-b)); }
.ov-mini .m-sleep { background: linear-gradient(180deg, var(--sleep-a), var(--sleep-b)); opacity: 0.75; }
.ov-mini .m-na { background: rgba(255,255,255,0.06); }

/* -------- stories panel -------- */

.story {
  border-top: 1px solid var(--hairline);
  padding: 0 0 8px;
}
.story-when {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-dim);
  text-transform: uppercase;
}
.story-card {
  position: relative;
  padding: 64px 20px 24px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  isolation: isolate;
  margin-bottom: 16px;
}
.story-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 100% at 20% 10%, var(--blk-a) 0%, transparent 65%),
    linear-gradient(180deg, rgba(0,0,0,0.2), rgba(0,0,0,0.65)),
    linear-gradient(180deg, var(--blk-b), #000);
  opacity: 0.85;
}
.story-card::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain); background-size: 240px 240px;
  opacity: 0.35; mix-blend-mode: overlay;
}
.story-card.p-life   { --blk-a: var(--life-a);   --blk-b: var(--life-b); }
.story-card.p-work   { --blk-a: var(--work-a);   --blk-b: var(--work-b); }
.story-card.p-health { --blk-a: var(--health-a); --blk-b: var(--health-b); }
.story-card.p-sleep  { --blk-a: var(--sleep-a);  --blk-b: var(--sleep-b); }

.story-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 38px;
  line-height: 1.14;
  color: #ece8de;
  margin-bottom: 42px;
  max-width: 92%;
}
.story-foot { display: flex; align-items: center; gap: 12px; }
.story-foot .activity {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  flex: 1 1 auto;
}
.pill {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 12px;
}
.pill.p-life { background: rgba(163, 128, 31, 0.45); }
.pill.p-work { background: rgba(58, 68, 135, 0.55); }
.pill.p-health { background: rgba(63, 138, 99, 0.5); }
.pill.p-sleep { background: rgba(185, 180, 166, 0.3); }
.rating-orb {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.35);
}

/* -------- sheet tab bar -------- */

.sheet-tabs {
  flex: 0 0 auto;
  display: flex;
  border-top: 1px solid var(--hairline);
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(5, 5, 5, 0.55);
}
.sheet-tabs button {
  flex: 1;
  padding: 14px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  opacity: 0.45;
  position: relative;
}
.sheet-tabs button.active { opacity: 1; }
.sheet-tabs button .bar {
  width: 56px; height: 2px;
  background: transparent;
  position: absolute;
  bottom: 6px;
}
.sheet-tabs button.active .bar { background: var(--ink); }

/* ============================================================
   Add-block modal
   ============================================================ */

.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 20;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: 100%;
  background: #101010;
  border-top: 1px solid var(--hairline-strong);
  border-radius: 16px 16px 0 0;
  padding: 22px 22px calc(28px + env(safe-area-inset-bottom));
}
.modal h3 { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 20px; font-weight: 400; }
.modal label { display: block; margin-bottom: 14px; }
.modal label span { display: block; font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 7px; }
.modal input, .modal select {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  padding: 11px 12px;
  border-radius: 0;
  appearance: none;
}
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .actions { display: flex; gap: 12px; margin-top: 8px; }
.modal .actions button {
  flex: 1;
  padding: 13px 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
}
.modal .actions .primary { background: var(--ink); color: #000; border-color: var(--ink); }

/* ============================================================
   ENERGY panel
   ============================================================ */

.en-score {
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.2em;
  margin: 4px 0 14px;
}

.en-feedback {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin: 22px 0 34px;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 15px;
  color: var(--ink-dim);
}
.en-feedback button {
  font-size: 16px;
  opacity: 0.7;
  padding: 4px;
}
.en-feedback button.active { opacity: 1; color: #fff; }

.en-chart {
  position: relative;
  height: 220px;
  margin: 18px 0 40px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding-left: 26px;
  border-left: none;
}
.en-axis {
  position: absolute;
  left: 0; top: 0; bottom: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-size: 9px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.en-gridline {
  position: absolute;
  left: 26px; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
}
.en-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: calc(100% - 18px);
  position: relative;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}
.en-col:last-child { border-right: 1px solid rgba(255, 255, 255, 0.05); }
.en-bar {
  width: 72%;
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #d9d6cc 55%, #8f8c83 100%);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.en-bar::after {
  content: "";
  position: absolute; inset: 0;
  background-image: var(--grain);
  background-size: 240px 240px;
  opacity: 0.4;
  mix-blend-mode: overlay;
}
.en-bar .val {
  position: absolute;
  top: 7px; left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(0, 0, 0, 0.75);
  z-index: 1;
}
.en-bar.low .val { color: rgba(255, 255, 255, 0.8); }
.en-col .x-label {
  position: absolute;
  bottom: -18px;
  font-size: 8px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}

.en-section { margin-top: 8px; }
.en-section > .tag { display: block; margin: 26px 0 6px; }
.en-row .act-dur { letter-spacing: 0.06em; }

/* ============================================================
   Rate / Feeling / Reflection flow
   ============================================================ */

.rate-overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
}
.rate-overlay.open { display: flex; }

.rate-panel {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #07070a;
  overflow: hidden;
}

.rate-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background:
    radial-gradient(58% 42% at 50% 24%, rgba(255, 255, 255, 0.98) 0%, rgba(238, 240, 246, 0.9) 32%, rgba(170, 178, 196, 0.34) 58%, rgba(30, 32, 40, 0) 78%),
    radial-gradient(40% 26% at 32% 78%, rgba(122, 74, 32, 0.4), transparent 72%),
    radial-gradient(42% 30% at 76% 62%, rgba(58, 74, 112, 0.35), transparent 72%);
  filter: blur(6px);
  transition: opacity 0.5s;
}
.rate-overlay[data-step="reflect"] .rate-glow {
  background:
    radial-gradient(70% 45% at 50% 12%, rgba(58, 104, 78, 0.5), transparent 75%),
    radial-gradient(50% 35% at 20% 90%, rgba(20, 40, 30, 0.5), transparent 75%);
  filter: none;
}

.rate-stage {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  width: min(100%, 560px);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.rate-step-label {
  text-align: center;
  padding: 26px 0 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(30, 30, 30, 0.75);
  min-height: 20px;
}
.rate-overlay[data-step="reflect"] .rate-step-label { color: var(--ink); }

/* feeling picker */
.feeling-area { display: none; flex: 1; flex-direction: column; min-height: 0; }
.rate-overlay[data-step="feeling"] .feeling-area { display: flex; }

.feeling-pages {
  flex: 1;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.feeling-pages::-webkit-scrollbar { display: none; }
.feeling-page {
  flex: 0 0 100%;
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: 0 30px;
}
.feeling-word {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 11vw, 46px);
  color: rgba(25, 25, 30, 0.85);
  text-align: left;
  transition: color 0.2s, text-shadow 0.2s;
}
.feeling-word:nth-child(2) { align-self: flex-end; }
.feeling-word.selected {
  color: #101014;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 1px;
}

.feeling-chips {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 12px 20px 18px;
}
.feeling-chips button {
  flex: 1;
  max-width: 130px;
  padding: 13px 0;
  font-size: 13px;
  letter-spacing: 0.06em;
  background: rgba(70, 70, 75, 0.5);
  backdrop-filter: blur(6px);
  color: rgba(240, 240, 235, 0.9);
}
.feeling-chips button.selected { background: var(--ink); color: #000; }

.feeling-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-bottom: 16px;
}
.feeling-dots i {
  width: 4px; height: 4px;
  background: rgba(255, 255, 255, 0.35);
  transition: all 0.2s;
}
.feeling-dots i.active {
  width: 7px; height: 7px;
  background: #fff;
}

/* reflection */
.reflect-area {
  display: none;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: 8px 20px 20px;
}
.rate-overlay[data-step="reflect"] .reflect-area { display: flex; }
.rate-overlay[data-step="reflect"] .rate-dial-wrap,
.rate-overlay[data-step="reflect"] .rate-done { display: none; }

.reflect-prompt {
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(8px);
  padding: 14px 16px;
  border-radius: 10px;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 15.5px;
  line-height: 1.5;
  color: rgba(240, 240, 235, 0.9);
  margin-bottom: 18px;
}
.reflect-editor {
  flex: 1;
  min-height: 120px;
  outline: none;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  overflow-y: auto;
}
.reflect-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-dim);
}
.reflect-toolbar {
  display: flex;
  gap: 6px;
  padding: 10px 0 4px;
}
.reflect-toolbar button {
  flex: 1;
  padding: 11px 0;
  font-size: 14px;
  background: rgba(46, 46, 48, 0.85);
  border-radius: 6px;
  color: rgba(240, 240, 235, 0.9);
}
.reflect-toolbar button.confirm { background: rgba(240, 238, 232, 0.92); color: #000; }

/* dial + ruler */
.rate-dial-wrap {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 560px);
  padding-bottom: 6px;
}
.rate-dial {
  width: 68px; height: 68px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(4px);
  margin-bottom: 14px;
}
.rate-ruler {
  width: 100%;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  cursor: pointer;
  touch-action: none;
}
.rate-ruler i {
  width: 1.5px;
  height: 14px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transition: height 0.15s, background 0.15s;
}
.rate-ruler i.active {
  height: 44px;
  width: 2.5px;
  background: #fff;
}

.rate-done {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 14px 30px calc(22px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.9);
}

/* ============================================================
   Shared new components (hidden on mobile where noted)
   ============================================================ */

.topbar { position: relative; }
.topbar-left { display: flex; align-items: center; gap: 20px; }
.cal-nav { display: none; align-items: center; gap: 8px; }
.cal-nav button {
  height: 30px;
  min-width: 32px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cal-nav .today-btn {
  padding: 0 14px;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.1);
}
.brand-center {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  letter-spacing: 0.1em;
}

/* week view (desktop) */
.week-view { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }

.week-head {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 6px 30px 12px var(--gw, 30px);
  flex: 0 0 auto;
}
.wh-day { text-align: center; min-width: 0; } /* long all-day chips must truncate, never widen the column */
.wh-day .d {
  display: block;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--ink-dim);
  margin-bottom: 7px;
}
.wh-day .n {
  display: inline-block;
  min-width: 24px;
  padding: 4px 5px;
  font-size: 12px;
  color: rgba(242, 239, 233, 0.85);
}
.wh-day.today .n { background: var(--ink); color: #000; }

.week-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  scrollbar-width: none;
}
.week-scroll::-webkit-scrollbar { display: none; }

.week-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 7px;
  margin: 0 30px 110px var(--gw, 30px);
}
.wk-hline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.wcol { position: relative; }

/* compact week-view blocks reuse .block */
.block.wk { left: 0; right: 0; min-height: 20px; }
.block.wk .b-range { font-size: 8px; top: 6px; left: 8px; letter-spacing: 0.06em; }
.block.wk .b-dur { font-size: 8px; top: 4px; right: 4px; padding: 3px 5px; }
.block.wk .b-title { font-size: 11px; padding: 0 26px; }
.block.wk .b-rating { font-size: 9px; bottom: 5px; right: 8px; }
.block.wk .b-meta { bottom: 6px; left: 8px; gap: 6px; }
.block.wk:hover { border-color: rgba(255, 255, 255, 0.85); }

/* ---- mobile: the week view IS the calendar (Vimcal-style 7 columns) ---- */
@media (max-width: 1023px) {
  .day-header, .week-strip, .day-ad, .timeline-scroll { display: none !important; }
  .week-view { display: flex; }

  .week-head { padding: 4px 6px 6px var(--gw, 44px); }
  .wh-day .d { font-size: 8px; letter-spacing: 0.08em; margin-bottom: 4px; }
  .wh-day .n { font-size: 12px; min-width: 24px; padding: 4px 5px; border-radius: 8px; }
  .week-head .ad-chip { font-size: 8px; padding: 2px 3px; border-radius: 3px; }

  .week-grid { column-gap: 2px; margin: 0 6px 130px var(--gw, 44px); }
  /* hour labels must stay inside the slim gutter — the desktop rule gives
     them a fixed 56px column that would slide under the first day's events */
  .wk-gutter { width: var(--gw, 44px); }
  .device .week-view .g-row,
  .device.light .week-view .g-row {
    font-size: 8.5px;
    letter-spacing: 0;
    right: 4px;
    grid-template-columns: 1fr auto;
    gap: 0 4px;
  }
  .device .tzc,
  .device.light .tzc {
    font-size: 7px;
    letter-spacing: 0;
    padding: 3px 4px;
    gap: 2px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
  }
  /* base .tz-chips is declared later in the file, so these overrides need
     the extra .week-head to win the cascade */
  .week-head .tz-chips {
    width: calc(var(--gw, 44px) - 6px);
    display: flex;
    justify-content: flex-start;
    top: 20px;
    bottom: auto;
  }

  /* Vimcal-style event chips: title only, wrapped, clipped to the box */
  .block.wk { overflow: hidden; }
  .block.wk .b-range,
  .block.wk .b-dur,
  .block.wk .b-rating,
  .block.wk .b-meta,
  .block.wk .b-note,
  .block.wk .b-tdone { display: none !important; }
  .device .block.wk .b-title,
  .device.light .block.wk .b-title,
  .device .block.wk.compact .b-title,
  .device.light .block.wk.compact .b-title {
    position: absolute;
    top: 2px; left: 0; right: 0; bottom: 2px;
    transform: none;
    padding: 0 4px;
    font-size: 9px;
    line-height: 1.25;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    overflow: hidden;
    display: block;
  }
  /* keep block titles clear of nothing on mobile — the todoist circle is hidden */
  .device .block.wk:has(.b-tdone) .b-title,
  .device.light .block.wk:has(.b-tdone) .b-title { padding-left: 4px; padding-right: 4px; }

}

/* now line */
.now-line {
  position: absolute;
  left: -4px; right: 0;
  height: 1.5px;
  background: #d63a2a;
  z-index: 3;
  pointer-events: none;
}
.now-line::before {
  content: "";
  position: absolute;
  left: 0; top: -3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #d63a2a;
}

/* journal mode — reflections inline on the calendar */
.block .b-note {
  display: none;
  position: absolute;
  inset: 24px 12px 10px;
  font-family: "Archivo", "Helvetica Neue", sans-serif;
  font-weight: 300;
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(242, 240, 234, 0.95);
  overflow: hidden;
  text-align: left;
}
.device.journal .block::before { filter: saturate(0.35) brightness(0.28); }
.device.journal .block::after { opacity: 0.25; }
.device.journal .block .b-title { opacity: 0; }
.device.journal .block .b-meta { opacity: 0.55; }
.device.journal .block.has-note::before { filter: saturate(0.55) brightness(0.42); }
.device.journal .block.has-note .b-note { display: block; }

.block .b-tr-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 11px;
  line-height: 1;
  opacity: 0.85;
  pointer-events: none;
}
.block.compact .b-tr-badge { top: 4px; right: 5px; font-size: 10px; }
.block.has-transcript::after { opacity: 0.92; }
.device.light .block .b-tr-badge { opacity: 0.9; }
.device.journal .block .b-range,
.device.journal .block .b-dur,
.device.journal .block .b-rating { opacity: 0.75; }
.device.journal .block .b-dur { background: rgba(0, 0, 0, 0.4); }

/* ============================================================
   Block editor modal (desktop)
   ============================================================ */

.edit-backdrop {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}
.edit-backdrop.open { display: flex; }

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

.edit-modal {
  width: min(620px, 88vw);
  max-height: 92vh;
  overflow-y: auto;
  scrollbar-width: none;
  background: #0c0c0e;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8);
}
.edit-modal::-webkit-scrollbar { display: none; }

.edit-glow {
  flex: 0 0 auto;
  height: 190px;
  background:
    radial-gradient(75% 130% at 50% -10%, var(--eg-a, #35604a) 0%, rgba(12, 12, 14, 0) 72%),
    radial-gradient(40% 60% at 78% 20%, var(--eg-b, #1c3527) 0%, transparent 70%),
    #0c0c0e;
}

.edit-body { padding: 0 28px; position: relative; }

.edit-title {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 23px;
  letter-spacing: 0.02em;
  padding: 8px 0 14px;
  margin-top: -48px;
  position: relative;
  z-index: 1;
  outline: none;
}

.edit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 17px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  text-align: left;
}
.edit-row svg { flex: 0 0 auto; opacity: 0.8; }

.edit-generating {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-dim);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.edit-generating .spin {
  display: inline-block;
  animation: ytspin 0.9s linear infinite;
  font-size: 13px;
}
@keyframes ytspin { to { transform: rotate(360deg); } }

.edit-tags {
  display: none;
  align-items: center;
  gap: 4px;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.edit-tags::-webkit-scrollbar { display: none; }
.edit-tags-row.loaded .edit-generating { display: none; }
.edit-tags-row.loaded .edit-tags { display: flex; }
.edit-tag {
  flex: 0 0 auto;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 7px 9px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.edit-tag.selected {
  border-color: rgba(255, 255, 255, 0.75);
  color: var(--ink);
}
.edit-tag.more {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--hairline-strong);
  padding: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  margin-left: auto;
}

.edit-time-row input[type="time"] {
  background: none;
  border: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color-scheme: dark;
  width: 84px;
  outline: none;
}
.edit-time-row input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.edit-time-row .edit-date { color: var(--ink); font-size: 11.5px; }
.edit-time-row .arr { color: var(--ink-dim); }
.edit-time-row .edit-durlabel { margin-left: auto; color: var(--ink-dim); font-size: 11px; }

.edit-pillars { gap: 10px; }
.edit-pillars button {
  flex: 1;
  padding: 13px 0;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid transparent;
}
.edit-pillars button[data-pillar="life"].active { background: rgba(151, 118, 29, 0.55); }
.edit-pillars button[data-pillar="health"].active { background: rgba(88, 150, 118, 0.6); }
.edit-pillars button[data-pillar="work"].active { background: rgba(74, 86, 158, 0.6); }
.edit-pillars button[data-pillar="sleep"].active { background: rgba(163, 156, 136, 0.45); }

.edit-disclosure { justify-content: space-between; cursor: pointer; }
.edit-disclosure .chev { font-size: 17px; color: var(--ink-dim); }

.edit-inline-input {
  display: none;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  padding: 11px 12px;
  margin: 10px 0 6px;
  outline: none;
}
.edit-inline-input.open { display: block; }

.edit-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px 24px;
}
.edit-footer button {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.edit-delete { color: #e04a35; }
.edit-footer-right { display: flex; align-items: center; gap: 22px; }
.edit-cancel { color: var(--ink); }
.edit-save {
  background: var(--ink);
  color: #000;
  padding: 11px 24px;
}

.edit-rail { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.edit-rail button {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(16, 16, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.65);
}
.edit-rail button.big { width: 54px; height: 54px; border-color: rgba(255, 255, 255, 0.7); }
.edit-rail button.active, .edit-rail button:hover { color: #fff; }

/* explorer text tabs (desktop) */
.sheet-texttabs { display: none; gap: 30px; padding: 14px 48px 4px; flex: 0 0 auto; }
.sheet-texttabs button {
  flex: 1;
  text-align: left;
  padding: 12px 0 6px;
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.sheet-texttabs button.active {
  color: var(--ink);
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  padding-top: 11px;
}

/* rate zero label (desktop vertical ruler) */
.rate-zero { display: none; }

/* ============================================================
   Desktop: full week-calendar web app
   ============================================================ */

@media (min-width: 1024px) {
  body.app-body { padding: 0; }

  .device {
    max-width: none;
    height: 100dvh;
    max-height: none;
  }

  .topbar { padding: 20px 30px 14px; }
  .cal-nav { display: flex; }
  .brand-center { display: block; }
  .today-chip { display: none; }

  /* swap day view for week view */
  .day-header, .week-strip, .day-ad, .timeline-scroll { display: none !important; }
  .week-view { display: flex; }

  .fab-row { padding-left: 28px; padding-right: 28px; }

  /* explorer becomes a centered modal */
  .sheet {
    display: none;
    position: absolute;
    inset: 42px;
    top: 42px;
    margin: 0 auto;
    max-width: 1150px;
    transform: none;
    transition: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    background: rgba(12, 12, 12, 0.78);
  }
  .device.explorer-open .sheet { display: flex; transform: none; }
  .sheet-grab { display: none; }
  .sheet-head { padding: 26px 48px 4px; }
  .range-row { padding: 10px 48px 8px; }
  .range-title { font-size: 27px; }
  .sheet-texttabs { display: flex; }
  .sheet-tabs { display: none; }
  .sheet-body { padding: 10px 48px 40px; }
  .sheet-body > .panel { max-width: 900px; }

  /* rate flow becomes a centered modal with a vertical ruler */
  .rate-overlay {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
  }
  .rate-panel {
    position: relative;
    width: min(740px, 92vw);
    height: min(700px, 90vh);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 50px 140px rgba(0, 0, 0, 0.85);
  }
  .rate-glow { filter: blur(10px); }

  .rate-stage { width: 100%; padding-right: 150px; }
  .rate-overlay[data-step="reflect"] .rate-stage { padding-right: 0; max-width: 620px; margin: 0 auto; }

  /* combined rate + feeling: chips visible during rate step, pages hidden */
  .rate-overlay[data-step="rate"] .feeling-area { display: flex; }
  .feeling-pages, .feeling-dots { display: none; }
  .feeling-area { justify-content: flex-end; }
  .feeling-chips {
    flex-wrap: wrap;
    max-width: 440px;
    margin: 0 auto;
    padding-bottom: 26px;
  }
  .feeling-chips button { flex: 0 0 auto; padding: 12px 22px; max-width: none; }

  /* vertical ruler on the right */
  .rate-dial-wrap {
    position: absolute;
    top: 76px;
    bottom: 170px;
    right: 44px;
    width: 150px;
    padding: 0;
    display: block;
  }
  .rate-ruler {
    position: absolute;
    top: 0; bottom: 0; right: 0;
    width: 60px;
    height: auto;
    flex-direction: column-reverse;
    padding: 0;
    align-items: flex-end;
  }
  .rate-ruler i { width: 22px; height: 1.5px; }
  .rate-ruler i.active { width: 44px; height: 2px; }
  .rate-dial {
    position: absolute;
    left: 0;
    margin: 0;
    width: 56px; height: 56px;
    font-size: 12px;
    transition: top 0.12s;
  }
  .rate-dial::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    width: 66px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.9);
  }
  .rate-zero {
    display: block;
    position: absolute;
    right: 0;
    bottom: -26px;
    font-size: 12px;
    color: var(--ink);
  }

  .rate-done { padding-bottom: 26px; }

  /* misc modals centered */
  .modal-backdrop { align-items: center; justify-content: center; }
  .modal {
    max-width: 480px;
    border: 1px solid var(--hairline-strong);
    border-radius: 14px;
    padding-bottom: 26px;
  }

  .story-quote { font-size: 44px; }
}

/* ============================================================
   Explorer: two-column panel layouts + new visualizations
   ============================================================ */

.panel-cols { display: block; }
.pc-left { max-width: 560px; }
.pc-right { margin-top: 10px; }

@media (min-width: 1024px) {
  .panel-cols {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 56px;
    align-items: center;
    min-height: 420px;
  }
  .pc-right { margin-top: 0; }
  .sheet-body > .panel { max-width: none; }
}

/* energy orb gauge */
.en-gauge {
  position: relative;
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 1;
}
.en-gauge svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.en-blob {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  filter: blur(14px) saturate(1.05);
  opacity: 0.95;
}
.en-avg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Archivo", "Helvetica Neue", sans-serif;
  font-weight: 300;
  font-size: 64px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.en-avg .bolt { font-size: 26px; margin-top: 14px; }

/* reflection orbit chart */
.refl-orbit {
  position: relative;
  width: min(100%, 400px);
  margin: 0 auto;
  aspect-ratio: 1;
}
.refl-orbit svg { width: 100%; height: 100%; }
.refl-orbit circle.dot { cursor: pointer; transition: r 0.15s; }
.refl-orbit circle.dot:hover { r: 10; }
.refl-orbit circle.dot.dim { opacity: 0.18; }

/* reflection filter / sort controls */
.refl-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 24px;
}
.refl-controls .pf {
  padding: 11px 20px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  border: 1px solid transparent;
}
.refl-controls .pf.active { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.14); }
.refl-sort {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.refl-sort .lbl { font-size: 10px; letter-spacing: 0.18em; color: var(--ink-dim); text-transform: uppercase; }
.refl-sort button {
  padding: 11px 16px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.refl-sort button.active { background: rgba(255, 255, 255, 0.12); color: var(--ink); }

/* ============================================================
   Availability mode
   ============================================================ */

.avail-btn { font-size: 11px; font-weight: 700; }
.avail-btn.active {
  background: rgba(94, 222, 182, 0.25);
  border-color: rgba(94, 222, 182, 0.7);
  color: #9ff0d6;
}

.device.avail-mode .wcol { cursor: crosshair; }
.device.avail-mode .block { pointer-events: none; }

.avail-block {
  position: absolute;
  left: 0; right: 0;
  z-index: 4;
  background: rgba(94, 222, 182, 0.26);
  border: 1px solid rgba(94, 222, 182, 0.75);
  border-radius: 6px;
  min-height: 14px;
  cursor: grab;
}
.avail-block:active { cursor: grabbing; }
.avail-block .al {
  position: absolute;
  top: 5px; left: 8px;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: #c9f7e6;
  pointer-events: none;
}
.avail-block .ax {
  position: absolute;
  top: 2px; right: 5px;
  font-size: 10px;
  color: #c9f7e6;
  cursor: pointer;
  padding: 2px;
  z-index: 2;
}
.avail-block .av-rs {
  position: absolute;
  left: 10%; right: 10%;
  height: 8px;
  cursor: ns-resize;
  z-index: 2;
}
.avail-block .av-rs.top { top: 0; }
.avail-block .av-rs.bot { bottom: 0; }
.avail-block .av-rs::after {
  content: "";
  position: absolute;
  left: 30%; right: 30%;
  top: 50%;
  height: 2px;
  border-radius: 1px;
  background: rgba(201, 247, 230, 0.55);
  transform: translateY(-50%);
}
.avail-block.ghost {
  border-style: dashed;
  background: rgba(94, 222, 182, 0.16);
  cursor: crosshair;
}
.device.light .avail-block .av-rs::after { background: rgba(21, 122, 92, 0.45); }

.avail-panel {
  position: absolute;
  top: 72px;
  right: 26px;
  bottom: 96px;
  width: 372px;
  z-index: 18;
  display: none;
  flex-direction: column;
  background: #0e0e11;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
  padding: 22px 22px 20px;
}
@media (min-width: 1024px) {
  .device.avail-mode .avail-panel { display: flex; }
}
.ap-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.ap-head h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0;
}
.ap-head button { font-size: 15px; opacity: 0.8; }
.ap-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 14px;
}
.ap-tabs button {
  flex: 1;
  padding: 9px 0;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  border-radius: 6px;
}
.ap-tabs button.active { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
.ap-hint { font-size: 10.5px; letter-spacing: 0.06em; color: var(--ink-dim); margin-bottom: 12px; line-height: 1.5; }
.ap-message {
  flex: 1 1 auto;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 16px;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(240, 238, 232, 0.92);
  white-space: pre-wrap;
}
.ap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.ap-row select {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 10px;
  max-width: 58%;
}
.ap-tz {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(94, 160, 255, 0.45);
  background: rgba(70, 130, 230, 0.22);
  color: #9ec4ff;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.ap-tz:hover {
  background: rgba(70, 130, 230, 0.34);
  border-color: rgba(94, 160, 255, 0.7);
}
.ap-tz-plus {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  line-height: 1;
  color: #cfe0ff;
}
.ap-note {
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-dim);
  margin: 0 0 12px;
}
.ap-note b { color: var(--ink); font-weight: 500; }
.device.light .ap-note { color: #8a919e; }
.device.light .ap-note b { color: #2f3440; }
.device.light .ap-tz {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #2563eb;
}
.device.light .ap-tz:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.55);
}
.device.light .ap-tz-plus { background: rgba(37, 99, 235, 0.12); color: #2563eb; }
.ap-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 0;
  background: var(--ink);
  color: #000;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 8px;
}
.ap-copy .kbd {
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

/* ============================================================
   Hour gutter + second time zone (Time Travel)
   ============================================================ */

.wk-gutter {
  position: absolute;
  left: 0; top: 0;
  width: calc(var(--gw, 30px) - 10px);
  display: none;
  pointer-events: none;
  z-index: 2;
}
.week-view.has-gutter .wk-gutter { display: block; }
/* two tight columns: each time sits directly under its zone chip */
.g-row {
  position: absolute;
  left: 0;
  right: 10px;
  transform: translateY(-50%);
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 0 10px;
  justify-items: end;
  font-size: 10px;
  letter-spacing: 0.05em;
  color: rgba(242, 239, 233, 0.68); /* legible on noir; the light theme overrides below */
  white-space: nowrap;
}
.g-row .g1 { grid-column: 2; }
.g-row .g2 { grid-column: 1; color: rgba(140, 160, 200, 0.75); }

.tz-chips {
  position: absolute;
  left: 0;
  bottom: 8px;
  width: calc(var(--gw, 30px) - 20px);
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 0 10px;
  justify-items: end;
  z-index: 3;
}
.tzc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.tzc:not(.second) { grid-column: 2; }
.tzc.second { grid-column: 1; background: #3b82f6; border-color: #3b82f6; color: #fff; }
.tzc .tzx {
  font-size: 8.5px;
  line-height: 1;
  opacity: 0.65;
  padding: 3px;
  margin: -3px;
  cursor: pointer;
}
.tzc .tzx:hover { opacity: 1; }

/* time travel modal */
.tt-backdrop {
  position: absolute;
  inset: 0;
  z-index: 45;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 9vh;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tt-backdrop.open { display: flex; }
.tt-modal {
  width: min(660px, 92vw);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}
.tt-modal h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: 21px;
  text-align: center;
  padding: 24px 0 6px;
}
.tt-modal input {
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 18px;
  padding: 16px 28px 18px;
  outline: none;
}
.tt-modal input::placeholder { color: var(--ink-faint); }
.tt-list { flex: 1 1 auto; overflow-y: auto; scrollbar-width: thin; }
.tt-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 28px;
  text-align: left;
}
.tt-row:hover { background: rgba(255, 255, 255, 0.06); }
.tt-row .tt-name {
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 16.5px;
  color: var(--ink);
}
.tt-row .tt-tag {
  flex: 0 0 auto;
  font-family: "Archivo", sans-serif;
  font-size: 12px;
  color: rgba(240, 238, 232, 0.65);
  background: rgba(255, 255, 255, 0.09);
  border-radius: 6px;
  padding: 5px 10px;
}
.tt-row.remove .tt-name { color: #e08a7a; }
.tt-hint {
  padding: 12px 28px 16px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  text-transform: uppercase;
  border-top: 1px solid var(--hairline);
}
.tt-hint b { color: var(--ink); border: 1px solid var(--hairline-strong); border-radius: 4px; padding: 1px 5px; }

/* ============================================================
   LIGHT THEME — classic calendar look
   ============================================================ */

.device.light {
  background: #fafbfc;
  color: #2f3440;
}

.device.light .topbar,
.device.light .brand-center,
.device.light .month-btn { color: #2f3440; }
.device.light .month-btn .caret { border-top-color: #2f3440; }
.device.light .topbar-right { color: #4b5260; }
.device.light .cal-nav button {
  border-color: #e2e5ea;
  background: #fff;
  color: #4b5260;
}
.device.light .cal-nav .today-btn { background: #fff; }
.device.light .avail-btn.active {
  background: rgba(45, 190, 150, 0.15);
  border-color: rgba(45, 170, 130, 0.6);
  color: #1c8a68;
}
.device.light .today-chip { border-color: #e2e5ea; background: #fff; color: #6b7280; }

/* week header */
.device.light .wh-day .d { color: #9aa1ad; }
.device.light .wh-day .n { color: #6b7280; }
.device.light .wh-day.today .d { color: #3b82f6; }
.device.light .wh-day.today .n { background: #3b82f6; color: #fff; border-radius: 9px; }

/* grid */
.device.light .wk-hline { background: #eceef2; }
.device.light .wcol { border-left: 1px solid #eceef2; }
.device.light .wcol:last-child { border-right: 1px solid #eceef2; }
.device.light .g-row { color: #9aa1ad; font-family: "Archivo", sans-serif; font-size: 11px; }
.device.light .g-row .g2 { color: #b3bac6; }
.device.light .tzc { background: #eef1f5; border-color: #e2e5ea; color: #6b7280; }
.device.light .tzc.second { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* blocks — rounded pastel chips, left-aligned text */
.device.light .block {
  border: none;
  border-radius: 7px;
  min-height: 20px;
  box-shadow: 0 0 0 1.5px #fafbfc;
}
.device.light .block::before,
.device.light .block::after { display: none; }
.device.light .block.p-life   { background: #fdedb0; color: #6d5a17; }
.device.light .block.p-work   { background: #dde6fd; color: #3a4d92; }
.device.light .block.p-health { background: #d5f1e2; color: #23684a; }
.device.light .block.p-sleep  { background: #e9ebf2; color: #5a6273; }
.device.light .block:hover { filter: brightness(0.97); }

.device.light .block .b-title {
  position: absolute;
  top: 7px; left: 10px; right: 8px;
  transform: none;
  text-align: left;
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: 12.5px;
  letter-spacing: 0;
  color: inherit;
  text-shadow: none;
  padding: 0;
}
.device.light .block .b-range {
  top: 25px; left: 10px;
  font-family: "Archivo", sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  color: inherit;
  opacity: 0.75;
  text-shadow: none;
}
.device.light .block .b-dur { display: none; }
.device.light .block .b-rating {
  color: inherit;
  opacity: 0.85;
  text-shadow: none;
  font-size: 9.5px;
}
.device.light .block .b-meta { color: inherit; opacity: 0.7; }
.device.light .block.compact .b-title { top: 50%; transform: translateY(-50%); font-size: 11px; }
.device.light .block.compact .b-range { display: none; }

/* mobile day view in light mode */
.device.light .hour-row .h-label { color: #b3bac6; }
.device.light .week-strip button .d { color: #9aa1ad; }
.device.light .week-strip button .n { color: #4b5260; }
.device.light .week-strip button.today .d { color: #3b82f6; }
.device.light .week-strip button.active .d { color: #3b82f6; }
.device.light .week-strip button.active .n { background: #3b82f6; color: #fff; }

/* fabs */
.device.light .fab-row { background: linear-gradient(180deg, transparent, rgba(250, 251, 252, 0.9)); }
.device.light .fab { background: #fff; border-color: #e2e5ea; color: #4b5260; box-shadow: 0 6px 22px rgba(30, 40, 60, 0.12); }
.device.light .fab.add { background: #3b82f6; border-color: #3b82f6; color: #fff; }

/* journal mode in light */
.device.light.journal .block { opacity: 0.4; filter: saturate(0.35); }
.device.light.journal .block.has-note { opacity: 1; filter: none; }
.device.light .block .b-note { color: inherit; }
.device.light.journal .block .b-title { opacity: 0; }

/* time travel modal in light */
.device.light .tt-modal { background: #fff; border-color: #e6e8ee; color: #2f3440; }
.device.light .tt-modal input { color: #2f3440; border-bottom-color: #eceef2; }
.device.light .tt-modal input::placeholder { color: #aab0bc; }
.device.light .tt-row:hover { background: #f4f6f9; }
.device.light .tt-row .tt-name { color: #2f3440; }
.device.light .tt-row .tt-tag { background: #eaedf3; color: #5b6472; }
.device.light .tt-hint { color: #9aa1ad; border-top-color: #eceef2; }
.device.light .tt-hint b { color: #2f3440; border-color: #d6dae2; }

/* light availability styling */
.device.light .avail-block { background: rgba(52, 200, 156, 0.22); border-color: rgba(30, 170, 128, 0.75); }
.device.light .avail-block .al, .device.light .avail-block .ax { color: #157a5c; }

/* ============================================================
   Add-event panel (Vimcal-style side sheet)
   ============================================================ */

.modal-backdrop {
  align-items: stretch;
  justify-content: flex-end;
}

.add-panel {
  width: min(430px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #0d0d10;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.6);
}
@media (max-width: 1023px) {
  .modal-backdrop { align-items: flex-end; justify-content: center; }
  .add-panel {
    width: 100%;
    height: auto;
    max-height: 92dvh;
    border-left: none;
    border-top: 1px solid var(--hairline-strong);
    border-radius: 16px 16px 0 0;
  }
}

/* natural-language quick add */
.ac-nlrow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--hairline);
  flex: 0 0 auto;
}
.ac-nl {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
}
.ac-nl .spark { color: #9db4f5; font-size: 13px; }
.ac-nl input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
}
.ac-nl input::placeholder { color: var(--ink-faint); }
.ac-nl .mic { color: var(--ink-dim); flex: 0 0 auto; }
.ac-x { font-size: 15px; opacity: 0.8; padding: 4px; }

.ac-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 20px 18px 12px;
}
.ac-scroll::-webkit-scrollbar { display: none; }

/* title */
.ac-titlerow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  position: relative;
  padding-left: 12px;
}
.ac-titlerow .accent {
  position: absolute;
  left: 0; top: -4px; bottom: -4px;
  width: 4px;
  border-radius: 2px;
  background: var(--life-a);
}
.ac-titlerow .face { color: var(--ink-faint); font-size: 17px; }
.ac-titlerow input {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 20px;
  padding: 4px 0 12px;
}
.ac-titlerow input::placeholder { color: var(--ink-faint); }

/* cards */
.ac-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.ac-timegrid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px 16px;
  align-items: center;
}
.ac-timegrid select, .ac-timegrid input[type="time"] {
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  color-scheme: dark;
  appearance: none;
}
.ac-timegrid input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.ac-day-echo { font-size: 13.5px; color: var(--ink-dim); }
.ac-allday {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: var(--ink-dim);
  cursor: pointer;
}
.ac-allday input { display: none; }
/* the all-day "counts as time spent" row sits below the time grid */
.ac-trackrow { margin: 10px 2px 0; line-height: 1.4; }
.ac-trackrow .sw { flex: 0 0 auto; }
.ac-trackrow[hidden] { display: none; }
.ac-allday .sw {
  width: 34px; height: 19px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  position: relative;
  transition: background 0.2s;
}
.ac-allday .sw::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: #f0eee8;
  transition: left 0.2s;
}
.ac-allday input:checked + .sw { background: #3b82f6; }
.ac-allday input:checked + .sw::after { left: 17px; }

.ac-linkrow {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
}
.ac-linkrow button { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.04em; }
.ac-linkrow button:hover { color: var(--ink); }

.ac-iconrow {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 8px 0;
  color: var(--ink);
  font-size: 13px;
}
.ac-iconrow svg { color: var(--ink-dim); flex: 0 0 auto; }
.ac-iconrow input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12.5px;
}
.ac-iconrow input::placeholder { color: var(--ink-faint); }
.ac-iconrow.dim { color: var(--ink-dim); font-size: 12.5px; }
.ac-iconrow .right-x { margin-left: auto; opacity: 0.6; }
.ac-iconrow .bolt { font-size: 13px; }
.ac-iconrow .lab { font-size: 12.5px; }
.ac-iconrow .dim-lab { color: var(--ink-faint); font-size: 11px; }
.ac-num {
  width: 52px;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid var(--hairline) !important;
  padding: 6px 8px;
  text-align: center;
  margin-left: auto;
}

.ac-chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--ink);
  margin-top: 6px;
}
.ac-chip.ghosted { background: none; border: 1px solid var(--hairline-strong); }
.ac-chip.on { background: rgba(94, 222, 182, 0.22); color: #9ff0d6; }

.ac-pillars { display: flex; gap: 8px; padding-bottom: 10px; margin-bottom: 6px; border-bottom: 1px solid var(--hairline); }
.ac-pillars button {
  flex: 1;
  padding: 10px 0;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border-radius: 6px;
}
.ac-pillars button[data-pillar="life"].active { background: rgba(151, 118, 29, 0.55); }
.ac-pillars button[data-pillar="health"].active { background: rgba(88, 150, 118, 0.6); }
.ac-pillars button[data-pillar="work"].active { background: rgba(74, 86, 158, 0.6); }
.ac-pillars button[data-pillar="sleep"].active { background: rgba(121, 130, 143, 0.5); }

.ac-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 6px; }
.ac-tags .tagchip {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: var(--ink);
  margin-top: 6px;
}
.ac-tags input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  padding: 8px 10px;
  outline: none;
  margin-top: 6px;
}

.ac-footer {
  position: relative; /* anchors the delete-series mini menu */
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hairline);
}
.ac-footer .more { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.06em; }
.ac-footer .create {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--ink);
  color: #000;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 20px;
  border-radius: 9px;
}
.ac-footer .kbd {
  border: 1px solid rgba(0, 0, 0, 0.4);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

/* light mode */
.device.light .add-panel { background: #f4f5f7; border-left-color: #e2e5ea; }
.device.light .ac-nlrow { border-bottom-color: #e7e9ee; }
.device.light .ac-nl { background: #fff; border-color: #c7d2f5; }
.device.light .ac-nl input { color: #2f3440; }
.device.light .ac-nl .spark { color: #3b82f6; }
.device.light .ac-x { color: #6b7280; }
.device.light .ac-titlerow input { color: #2f3440; border-bottom-color: #d6dae2; }
.device.light .ac-titlerow input::placeholder { color: #aab0bc; }
.device.light .ac-card { background: #ebedf0; border-color: #e2e5ea; }
.device.light .ac-timegrid select, .device.light .ac-timegrid input[type="time"] { color: #2f3440; color-scheme: light; }
.device.light .ac-day-echo, .device.light .ac-allday, .device.light .ac-linkrow button, .device.light .ac-iconrow.dim { color: #6b7280; }
.device.light .ac-iconrow { color: #2f3440; }
.device.light .ac-iconrow input { color: #2f3440; }
.device.light .ac-linkrow { border-top-color: #dde0e6; }
.device.light .ac-pillars { border-bottom-color: #dde0e6; }
.device.light .ac-pillars button { background: #fff; color: #4b5260; }
.device.light .ac-chip { background: #fff; color: #4b5260; }
.device.light .ac-num { background: #fff !important; border-color: #dde0e6 !important; color: #2f3440; }
.device.light .ac-footer { border-top-color: #e7e9ee; }
.device.light .ac-footer .create { background: #3b82f6; color: #fff; }
.device.light .ac-footer .create .kbd { border-color: rgba(255, 255, 255, 0.5); }

/* ============================================================
   App menu + Data & Sync modal
   ============================================================ */

.app-menu {
  position: absolute;
  top: 58px;
  right: 22px;
  z-index: 22;
  display: none;
  flex-direction: column;
  min-width: 200px;
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: 6px;
}
.app-menu.open { display: flex; }
.app-menu button {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  border-radius: 7px;
}
.app-menu button:hover { background: rgba(255, 255, 255, 0.07); }

.sync-backdrop {
  position: absolute;
  inset: 0;
  z-index: 46;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
}
.sync-backdrop.open { display: flex; }
.sync-modal {
  width: min(520px, 92vw);
  max-height: min(88vh, 860px);
  overflow-y: auto;
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 26px 28px 22px;
}
.sync-modal::-webkit-scrollbar { width: 8px; }
.sync-modal::-webkit-scrollbar-track { background: transparent; }
.sync-modal::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
}
.sync-modal h3 {
  font-family: "Archivo", sans-serif;
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 16px;
}
.sync-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0 14px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.sync-row b { color: var(--ink); font-weight: 400; text-transform: none; letter-spacing: 0.04em; }
.sync-modal p {
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(240, 238, 232, 0.8);
  margin-bottom: 12px;
}
.sync-modal code {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.sync-close {
  margin-top: 8px;
  width: 100%;
  padding: 12px 0;
  background: var(--ink);
  color: #000;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 8px;
}

.device.light .app-menu { background: #fff; border-color: #e2e5ea; }
.device.light .app-menu button { color: #2f3440; }
.device.light .app-menu button:hover { background: #f2f4f7; }
.device.light .sync-modal { background: #fff; border-color: #e2e5ea; color: #2f3440; }
.device.light .sync-modal p { color: #4b5260; }
.device.light .sync-modal code { background: #eef0f4; }
.device.light .sync-row { border-bottom-color: #eceef2; color: #8a919e; }
.device.light .sync-row b { color: #2f3440; }
.device.light .sync-close { background: #3b82f6; color: #fff; }

/* ============================================================
   Setup wizard
   ============================================================ */

.setup-modal { max-width: 480px; }
.setup-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  margin-top: 6px;
  background: #fff;
  color: #1a1c22;
  font-family: "Archivo", sans-serif;
  font-size: 14px;
  border-radius: 9px;
}
.setup-google:disabled { opacity: 0.45; cursor: default; }
.setup-google[hidden] { display: none; }
.setup-gis { display: flex; justify-content: center; margin-top: 6px; min-height: 44px; }
.setup-gis[hidden] { display: none; }
.setup-warn {
  background: rgba(230, 190, 90, 0.12);
  border: 1px solid rgba(230, 190, 90, 0.35);
  border-radius: 8px;
  padding: 12px 14px !important;
}
.setup-status { min-height: 18px; font-size: 12px !important; color: var(--ink-dim) !important; margin-top: 12px; }
.setup-skip {
  display: block;
  margin: 8px auto 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 8px;
}
.setup-skip:hover { color: var(--ink); }

.setup-cals { max-height: 300px; overflow-y: auto; margin: 6px 0 10px; }
.cal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-size: 14px;
}
.cal-row input { accent-color: #3b82f6; width: 15px; height: 15px; }
.cal-row .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }
.cal-row em { margin-left: auto; font-style: normal; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }

.device.light .cal-row { border-bottom-color: #eceef2; }
.device.light .setup-google { border: 1px solid #dde0e6; }

.billing-modal { max-width: 460px; }
.billing-card {
  display: grid;
  gap: 4px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}
.billing-card span {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
.billing-card b {
  font-size: 20px;
  font-weight: 400;
  text-transform: capitalize;
}
.billing-card small {
  color: var(--ink-dim);
  line-height: 1.4;
}
.device.light .billing-card {
  background: #f5f7fa;
  border-color: #e7eaf0;
}
.device.light .billing-card small { color: #667085; }

/* ============================================================
   Import animation + drag interactions
   ============================================================ */

/* freshly imported events stagger onto the calendar */
@keyframes ytpop {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.block.pop-in { animation: ytpop 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* spinner works anywhere, not just the editor */
.spin { display: inline-block; animation: ytspin 0.9s linear infinite; }

/* live ghost while drawing a new event */
.drag-ghost {
  position: absolute;
  left: 0; right: 0;
  z-index: 6;
  border: 1.5px dashed rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  pointer-events: none;
  min-height: 12px;
  overflow: hidden;
}
.drag-ghost .dg-title {
  position: absolute;
  top: 6px; left: 9px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.95);
}
.drag-ghost .dg-time {
  position: absolute;
  top: 21px; left: 9px;
  font-size: 9px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
}
.device.light .drag-ghost {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}
.device.light .drag-ghost .dg-title { color: #2f4d94; }
.device.light .drag-ghost .dg-time { color: #5b74ad; }

/* a block being moved */
.block.wk.dragging {
  opacity: 0.8;
  z-index: 8;
  cursor: grabbing;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.9);
}
.device.light .block.wk.dragging { box-shadow: 0 10px 30px rgba(30, 40, 60, 0.3); }

/* drag-created block awaiting Save — Cancel discards it */
.block.pending { border: 1.5px dashed rgba(255, 255, 255, 0.7); opacity: 0.85; }
.device.light .block.pending {
  border: none;
  outline: 1.5px dashed #7d8aa8;
  outline-offset: -1.5px;
  opacity: 0.85;
}

/* ============================================================
   Left sidebar (desktop option)
   ============================================================ */

.sidebar-btn { display: none; }

.side-panel {
  display: none;
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--sbw, 292px);
  z-index: 6;
  background: #0b0b0d;
  border-right: 1px solid var(--hairline);
  padding: 20px 22px 30px;
  overflow-y: auto;
  scrollbar-width: none;
}
.side-panel::-webkit-scrollbar { display: none; }

/* drag the sidebar edge to make room for long task titles */
.sp-resize {
  display: none;
  position: absolute;
  top: 0; bottom: 0;
  left: calc(var(--sbw, 292px) - 3px);
  width: 7px;
  cursor: col-resize;
  z-index: 8;
}
.sp-resize:hover, .sp-resize.on { background: rgba(94, 222, 182, 0.3); }

@media (min-width: 1024px) {
  .sidebar-btn { display: flex; }
  .device.sidebar-open .side-panel { display: block; }
  .device.sidebar-open .sp-resize { display: block; }
  .device.sidebar-open .topbar { padding-left: calc(var(--sbw, 292px) + 24px); }
  .device.sidebar-open .week-view { margin-left: var(--sbw, 292px); }
  .device.sidebar-open .fab-row { left: var(--sbw, 292px); }
}

/* mini month calendar */
.sp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.sp-month { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.sp-nav button {
  width: 26px; height: 24px;
  font-size: 14px;
  color: var(--ink-dim);
  border: 1px solid var(--hairline);
  margin-left: 5px;
}
.sp-dows, .sp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}
.sp-dows span { font-size: 9px; letter-spacing: 0.1em; color: var(--ink-faint); padding-bottom: 8px; }
.sp-grid button {
  padding: 6px 0;
  font-size: 10.5px;
  color: var(--ink);
  border-radius: 6px;
}
.sp-grid button.dim { color: var(--ink-faint); }
.sp-grid button.inweek { background: rgba(255, 255, 255, 0.07); }
.sp-grid button.today { background: #3b82f6; color: #fff; }
.sp-grid button:hover { background: rgba(255, 255, 255, 0.14); }

/* next up card */
.sp-next {
  margin-top: 22px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}
.sp-next-in { font-size: 10px; letter-spacing: 0.12em; color: var(--ink-dim); text-transform: uppercase; }
.sp-next-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
}
.sp-next-title i { width: 3.5px; height: 18px; border-radius: 2px; background: var(--life-a); flex: 0 0 auto; }
.sp-next-title span { font-family: "Archivo", sans-serif; font-size: 14.5px; }
.sp-next-time { font-size: 10.5px; color: var(--ink-dim); letter-spacing: 0.06em; }

/* meet with / calendars */
.sp-section { margin-top: 26px; }
.sp-section > .tag { display: block; margin-bottom: 12px; }
.sp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11px;
  color: var(--ink-faint);
}
.sp-search .kbd {
  margin-left: auto;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9px;
  color: var(--ink-dim);
}
.sp-search .kbd + .kbd { margin-left: 0; }
.sp-acct { font-size: 11px; color: var(--ink-dim); padding-bottom: 10px; }
.cal-toggle {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  cursor: pointer;
  font-family: "Archivo", sans-serif;
  font-size: 13.5px;
  color: var(--ink);
}
.cal-toggle input {
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--hairline-strong);
  background: transparent;
  cursor: pointer;
  position: relative;
  flex: 0 0 auto;
}
.cal-toggle input:checked { background: var(--tg, #97761d); border-color: var(--tg, #97761d); }
.cal-toggle input:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}
.cal-toggle .off { opacity: 0.5; }

/* light theme sidebar */
.device.light .side-panel { background: #f2f4f7; border-right-color: #e2e5ea; }
.device.light .sp-month { color: #2f3440; }
.device.light .sp-nav button { border-color: #dde0e6; color: #6b7280; }
.device.light .sp-grid button { color: #3a4150; }
.device.light .sp-grid button.dim { color: #b3bac6; }
.device.light .sp-grid button.inweek { background: #e3e8f0; }
.device.light .sp-grid button.today { background: #3b82f6; color: #fff; }
.device.light .sp-next { background: #fff; border-color: #e2e5ea; }
.device.light .sp-next-title span { color: #2f3440; }
.device.light .sp-search { border-color: #dde0e6; color: #9aa1ad; background: #fff; }
.device.light .cal-toggle { color: #2f3440; }
.device.light .cal-toggle input { border-color: #c9cedb; }

/* desktop: add-event panel floats over a fully visible calendar */
@media (min-width: 1024px) {
  .modal-backdrop {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    pointer-events: none;
  }
  .add-panel {
    pointer-events: auto;
    box-shadow: -26px 0 80px rgba(0, 0, 0, 0.5);
  }
}

/* ============ screen-time suggested blocks ============ */

.block.sugg {
  border-style: dashed;
  opacity: 0.82;
  z-index: 3;
  cursor: default;
}
.block.sugg .sg-tag {
  position: absolute;
  bottom: 6px;
  left: 8px;
  font-size: 7px;
  letter-spacing: 0.16em;
  opacity: 0.65;
}
.block.sugg .sg-actions {
  position: absolute;
  bottom: 4px;
  right: 6px;
  display: flex;
  gap: 4px;
}
.block.sugg .sg-actions button {
  font: inherit;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  cursor: pointer;
}
.block.sugg .sg-actions .sg-add:hover { background: rgba(94, 222, 182, 0.4); }
.block.sugg .sg-actions .sg-x:hover { background: rgba(255, 255, 255, 0.25); }
.block.sugg.compact .sg-tag { display: none; }
.light .block.sugg .sg-actions button {
  border-color: rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.65);
  color: #222;
}
.block.sugg.compact .sg-actions { display: none; }
.block.sugg.compact:hover .sg-actions { display: flex; }

/* ============================================================
   Add panel v2 — minimal, compact, fast
   ============================================================ */

@keyframes acslide { from { transform: translateX(26px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-backdrop.open .add-panel { animation: acslide 0.18s cubic-bezier(0.2, 0.7, 0.3, 1); }
@media (max-width: 1023px) {
  @keyframes acslide { from { transform: translateY(26px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* tighter rhythm */
.ac-nlrow { padding: 12px 16px 11px; }
.ac-nl { padding: 8px 14px; }
.ac-scroll { padding: 16px 16px 10px; }
.ac-titlerow { margin-bottom: 14px; }
.ac-titlerow input { font-size: 18px; padding: 3px 0 10px; }
.ac-card { padding: 11px 14px; margin-bottom: 9px; border-radius: 10px; }
.ac-iconrow { padding: 6px 0; font-size: 12.5px; }
.ac-linkrow { margin-top: 10px; padding-top: 9px; gap: 18px; }
.ac-timegrid { gap: 8px 14px; }
.ac-footer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }

/* pillar buttons: selection = solid pillar color, instantly */
.ac-pillars button {
  padding: 11px 0;
  border-radius: 7px;
  transition: background 0.1s ease, color 0.1s ease, transform 0.05s ease;
}
.ac-pillars button:active { transform: scale(0.96); }
.ac-pillars button[data-pillar="life"].active   { background: #a8821f; color: #fff; }
.ac-pillars button[data-pillar="health"].active { background: #3f8a63; color: #fff; }
.ac-pillars button[data-pillar="work"].active   { background: #4a569e; color: #fff; }
.ac-pillars button[data-pillar="sleep"].active  { background: #6b7482; color: #fff; }
.device.light .ac-pillars button[data-pillar="life"].active   { background: #d9a921; color: #fff; }
.device.light .ac-pillars button[data-pillar="health"].active { background: #34a575; color: #fff; }
.device.light .ac-pillars button[data-pillar="work"].active   { background: #5b6ee0; color: #fff; }
.device.light .ac-pillars button[data-pillar="sleep"].active  { background: #7d8a9c; color: #fff; }

/* quality + tags share one compact row */
.ac-qrow { gap: 10px; }
.ac-qrow .ac-num { margin-left: 8px; width: 46px; padding: 5px 6px; }
.ac-qrow .ac-tags { margin-left: auto; padding-top: 0; }
.ac-qrow .ac-chip { margin-top: 0; padding: 7px 12px; font-size: 10px; }
.ac-tags .tagchip { margin-top: 0; padding: 7px 10px; }

/* collapsed extras */
.ac-more { display: none; }
.ac-more.open { display: block; animation: ytpop 0.22s ease both; }
.ac-footer .more { display: flex; align-items: center; gap: 7px; }
.ac-footer .more .chev { display: inline-block; transition: transform 0.15s; font-size: 9px; }
.ac-footer .more.open .chev { transform: rotate(180deg); }
.ac-footer .more:hover { color: var(--ink); }
.device.light .ac-footer .more:hover { color: #2f3440; }

/* pending block glides when edited from the panel (not while hand-dragging) */
.block.pending:not(.dragging) { transition: top 0.16s ease, height 0.16s ease; }

/* toast */
.toast {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%) translateY(14px);
  z-index: 60;
  background: #17171a;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 11px 18px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.device.light .toast { background: #fff; border-color: #e2e5ea; color: #2f3440; }

/* toast with actions (e.g. "apply tags to all") */
.action-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  pointer-events: auto;
  max-width: calc(100% - 32px);
}
.action-toast span { line-height: 1.35; }
.at-action {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  background: rgb(94, 222, 182);
  color: #10231d;
  font-weight: 700;
}
.at-action:hover { background: rgb(120, 230, 195); }
.at-dismiss {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-dim);
  background: transparent;
}
.at-dismiss:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.device.light .at-action { background: rgb(52, 168, 138); color: #fff; }
.device.light .at-dismiss { color: #565d6b; }
.device.light .at-dismiss:hover { background: rgba(0, 0, 0, 0.05); color: #2f3440; }

/* screen-time wizard command box */
.st-cmd {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 10px 0 12px;
}
.st-cmd code {
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
  user-select: all;
  color: #d8e6dd;
}
.light .st-cmd { background: rgba(0, 0, 0, 0.05); border-color: rgba(0, 0, 0, 0.15); }
.light .st-cmd code { color: #2a3b31; }

/* screen-time guided wizard */
.st-wizard { width: min(600px, 92vw); max-width: 600px; }
.st-dots { display: flex; justify-content: center; gap: 8px; margin-bottom: 18px; }
.st-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--hairline-strong);
  transition: background 0.2s, transform 0.2s;
}
.st-dots span.active { background: rgb(94, 222, 182); transform: scale(1.25); }
.st-dots span.done { background: rgba(94, 222, 182, 0.5); }
.st-demo {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
  padding: 14px;
  border: 1px solid rgba(94, 222, 182, 0.2);
  border-radius: 14px;
  background: radial-gradient(circle at 50% 0, rgba(94, 222, 182, 0.12), rgba(255,255,255,0.035));
}
.st-mini-title {
  display: block;
  margin-bottom: 8px;
  font-size: 8px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.st-apps, .st-cal {
  min-height: 118px;
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.st-apps i {
  display: block;
  margin: 7px 0;
  padding: 8px 9px;
  border-radius: 8px;
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(240, 238, 232, 0.86);
  background: rgba(255, 255, 255, 0.07);
  animation: stAppGlow 4.8s ease-in-out infinite;
}
.st-apps i:nth-child(3) { animation-delay: 0.35s; }
.st-apps i:nth-child(4) { animation-delay: 0.7s; }
.st-arrow {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 222, 182, 0.35);
  color: rgb(94, 222, 182);
  animation: stArrowPulse 2.4s ease-in-out infinite;
}
.st-cal {
  position: relative;
  overflow: hidden;
}
.st-cal::before {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  top: 42px;
  bottom: 12px;
  background: repeating-linear-gradient(to bottom, transparent 0 20px, rgba(255,255,255,0.08) 20px 21px);
  pointer-events: none;
}
.st-cal b {
  position: absolute;
  left: 12px;
  right: 12px;
  top: var(--p);
  padding: 8px 9px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: #d8fff2;
  border: 1px dashed rgba(94, 222, 182, 0.6);
  background: rgba(94, 222, 182, 0.12);
  animation: stBlockDraw 4.8s ease-in-out infinite both;
}
.st-cal b:nth-of-type(2) { animation-delay: 0.55s; }
.st-cal small {
  float: right;
  color: rgba(216, 255, 242, 0.55);
  font-size: 9px;
}
@keyframes stAppGlow {
  0%, 18%, 100% { box-shadow: none; border-color: transparent; }
  30%, 58% { box-shadow: 0 0 18px rgba(94, 222, 182, 0.18); border-color: rgba(94, 222, 182, 0.24); }
}
@keyframes stArrowPulse {
  0%, 100% { transform: translateX(-2px); opacity: 0.55; }
  45% { transform: translateX(2px); opacity: 1; }
}
@keyframes stBlockDraw {
  0%, 28% { opacity: 0; transform: scaleX(0.55); transform-origin: left; }
  38%, 86% { opacity: 1; transform: scaleX(1); }
  100% { opacity: 0.35; }
}
.st-facts {
  list-style: none;
  margin: 4px 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.st-facts li {
  position: relative;
  padding-left: 24px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-dim);
}
.st-facts b { color: var(--ink); font-weight: 400; }
.st-facts li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: -1px;
  color: rgb(94, 222, 182);
  font-weight: 700;
}
.st-run {
  margin: 4px 0 14px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}
.st-run li { padding-left: 4px; }
.st-run b { font-weight: 400; color: var(--ink); }
.st-run i { font-style: normal; color: var(--ink); border-bottom: 1px dotted var(--ink-faint); }
.st-install-card {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}
.st-install-card div {
  display: grid;
  grid-template-columns: 28px 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.st-install-card span {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(94, 222, 182, 0.14);
  color: rgb(94, 222, 182);
  font-family: var(--mono);
  font-size: 11px;
}
.st-install-card b {
  font-weight: 400;
  color: var(--ink);
  font-size: 12px;
}
.st-install-card small {
  color: var(--ink-dim);
  font-size: 11px;
  line-height: 1.35;
}
.st-check {
  width: 52px; height: 52px;
  margin: 4px auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #10231d;
  background: rgb(94, 222, 182);
  animation: stPop 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.2) both;
}
@keyframes stPop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
.st-iphone { margin: 12px 0 4px; border-top: 1px solid var(--hairline); padding-top: 10px; }
.st-iphone summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  list-style: none;
}
.st-iphone summary::-webkit-details-marker { display: none; }
.st-iphone summary::before { content: "＋ "; color: rgb(94, 222, 182); }
.st-iphone[open] summary::before { content: "－ "; }
.st-iphone[open] summary { color: var(--ink); margin-bottom: 6px; }

/* screen-time cross-sell inside the first-run setup wizard */
.setup-st-cta {
  margin: 18px 0 6px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(94, 222, 182, 0.3);
  background: rgba(94, 222, 182, 0.07);
}
.setup-st-cta p { margin: 0 0 12px !important; font-size: 13px !important; }
.st-cta-eyebrow {
  display: block;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgb(94, 222, 182);
  margin-bottom: 8px;
}
.setup-st-cta .setup-google { background: rgba(94, 222, 182, 0.92); color: #10231d; margin-top: 0; }
.light .setup-st-cta { border-color: rgba(52, 168, 138, 0.4); background: rgba(52, 168, 138, 0.08); }
.light .st-cta-eyebrow { color: rgb(38, 140, 112); }
.light .setup-st-cta .setup-google { background: rgb(52, 168, 138); color: #fff; border: none; }
/* --ink-dim is a dark-theme off-white; force readable contrast in light mode */
.device.light .st-facts li { color: #565d6b; }
.device.light .st-demo { border-color: rgba(52, 168, 138, 0.22); background: #f6faf8; }
.device.light .st-apps, .device.light .st-cal { background: #fff; border-color: #e2e8e5; }
.device.light .st-apps i { color: #354038; background: #f1f5f3; }
.device.light .st-cal b { color: #14624c; background: rgba(52,168,138,0.1); border-color: rgba(52,168,138,0.5); }
.device.light .st-cal small { color: rgba(20,98,76,0.55); }
.device.light .st-install-card div { background: #f5f7fa; border-color: #e7eaf0; }
.device.light .st-install-card small { color: #667085; }
.device.light .st-run { color: #3a404c; }
.device.light .st-facts li::before,
.device.light .st-dots span.active { color: rgb(38, 150, 120); }
.device.light .st-dots span.active { background: rgb(52, 168, 138); }
.device.light .st-dots span.done { background: rgba(52, 168, 138, 0.5); }
.device.light .st-iphone summary { color: #565d6b; }
.device.light .st-iphone summary::before,
.device.light .st-iphone[open] summary::before { color: rgb(38, 150, 120); }
.device.light .st-check { background: rgb(52, 168, 138); color: #fff; }

/* setup wizard permissions note */
.setup-perms {
  margin-top: 12px;
  font-family: "Archivo", sans-serif !important;
  font-weight: 300;
  font-size: 12px !important;
  line-height: 1.55;
  color: var(--ink-dim) !important;
  text-align: center;
}
.setup-perms b { font-weight: 400; color: var(--ink); }
.device.light .setup-perms { color: #6b7280 !important; }
.device.light .setup-perms b { color: #2f3440; }

/* ============================================================
   View switcher + search + month grid
   ============================================================ */

.view-switch { position: relative; display: none; }
@media (min-width: 1024px) { .view-switch { display: block; } }
.view-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink);
  border-radius: 7px;
}
.view-btn .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--ink-dim);
}
.view-menu {
  position: absolute;
  top: 38px;
  right: 0;
  z-index: 24;
  display: none;
  flex-direction: column;
  min-width: 190px;
  background: #101014;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: 6px;
}
.view-menu.open { display: flex; }
.view-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 11px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  border-radius: 7px;
  text-align: left;
}
.view-menu button:hover { background: rgba(255, 255, 255, 0.07); }
.view-menu button.active { background: rgba(255, 255, 255, 0.1); }
.view-menu .kbd {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.05);
}
.view-menu .vm-div { height: 1px; background: var(--hairline); margin: 5px 4px; }
.view-menu .tick { opacity: 0; font-size: 11px; }
.view-menu .checked .tick { opacity: 1; }

.device.light .view-btn { border-color: #e2e5ea; background: #fff; color: #4b5260; }
.device.light .view-btn .caret { border-top-color: #8a919e; }
.device.light .view-menu { background: #fff; border-color: #e2e5ea; }
.device.light .view-menu button { color: #2f3440; }
.device.light .view-menu button:hover { background: #f2f4f7; }
.device.light .view-menu button.active { background: #eef1f6; }
.device.light .view-menu .kbd { background: #f2f4f7; border-color: #dde0e6; color: #6b7280; }
.device.light .view-menu .vm-div { background: #eceef2; }

/* month grid */
.week-grid.month-grid {
  display: grid;
  column-gap: 0;
  grid-auto-rows: minmax(96px, auto);
  margin-bottom: 40px;
}
.mcell {
  position: relative;
  min-width: 0; /* long chips truncate — they must never widen the column */
  text-align: left;
  padding: 8px 8px 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
  color: var(--ink);
}
.mcell:hover { background: rgba(255, 255, 255, 0.03); }
.mcell .mnum { font-size: 10px; color: var(--ink-dim); margin-bottom: 3px; }
.mcell.dim .mnum { color: var(--ink-faint); }
.mcell.dim .mchip { opacity: 0.45; }
.mcell.today .mnum {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: #3b82f6;
  color: #fff;
  border-radius: 6px;
}
.mchip {
  font-size: 9px;
  letter-spacing: 0.02em;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}
.mchip.p-life { background: rgba(151, 118, 29, 0.75); }
.mchip.p-work { background: rgba(74, 86, 158, 0.8); }
.mchip.p-health { background: rgba(63, 138, 99, 0.8); }
.mchip.p-sleep { background: rgba(107, 116, 130, 0.7); }
.mmore { font-size: 8.5px; color: var(--ink-dim); padding-left: 2px; }
.device.light .mcell { border-color: #eceef2; }
.device.light .mcell:hover { background: #f6f8fa; }
.device.light .mcell .mnum { color: #6b7280; }
.device.light .mcell.dim .mnum { color: #c6cbd4; }
.device.light .mmore { color: #8a919e; }
.device.light .mchip.p-life { background: #f4d47c; color: #6d5a17; }
.device.light .mchip.p-work { background: #ccd7fb; color: #3a4d92; }
.device.light .mchip.p-health { background: #bfe9d4; color: #23684a; }
.device.light .mchip.p-sleep { background: #dfe2ea; color: #5a6273; }

/* search rows */
.sr-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 28px;
  text-align: left;
}
.sr-row:hover { background: rgba(255, 255, 255, 0.06); }
.sr-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.sr-dot.p-life { background: var(--life-a); }
.sr-dot.p-work { background: var(--work-a); }
.sr-dot.p-health { background: var(--health-a); }
.sr-dot.p-sleep { background: var(--sleep-a); }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sr-main b { font-family: "Archivo", sans-serif; font-weight: 400; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-main em { font-style: normal; font-size: 11px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-date { flex: 0 0 auto; font-size: 10px; letter-spacing: 0.08em; color: var(--ink-dim); }
.sr-empty { padding: 22px 28px; font-family: "Archivo", sans-serif; font-size: 14px; color: var(--ink-dim); }
.device.light .sr-row:hover { background: #f4f6f9; }
.device.light .sr-main b { color: #2f3440; }

/* jump-to-result highlight */
@keyframes ytflash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
  20%, 60% { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.85); }
}
.block.flash { animation: ytflash 2.2s ease 0.15s; z-index: 7; }

/* ============================================================
   Quality slider + pillar-aware tag suggestions
   ============================================================ */

.q-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 2px 9px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 4px;
}
.q-lab {
  flex: 0 0 auto;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.q-slider {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: pointer;
  touch-action: none;
  --qcol: var(--life-a);
}
.q-slider::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
}
.q-fill {
  position: absolute;
  left: 0; top: 50%;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 3px;
  width: 70%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--qcol) 45%, transparent), var(--qcol));
  box-shadow: 0 0 14px color-mix(in srgb, var(--qcol) 45%, transparent);
  transition: width 0.07s;
  pointer-events: none;
}
.q-thumb {
  position: absolute;
  top: 50%; left: 70%;
  transform: translate(-50%, -50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #f0eee8;
  color: #000;
  font-family: var(--mono);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45), 0 0 0 1.5px var(--qcol);
  transition: left 0.07s;
  pointer-events: none;
}
.device.light .q-row { border-bottom-color: #dde0e6; }
.device.light .q-slider::before { background: #e2e5ea; }
.device.light .q-thumb { background: #fff; box-shadow: 0 2px 8px rgba(30, 40, 60, 0.25), 0 0 0 1.5px var(--qcol); }

.sugchip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-dim);
  border: 1px solid transparent;
  transition: background 0.1s, color 0.1s, border-color 0.1s;
}
.sugchip:hover { color: var(--ink); }
.sugchip.on {
  background: rgba(255, 255, 255, 0.14);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.55);
}
.device.light .sugchip { background: #fff; color: #6b7280; border-color: #e2e5ea; }
.device.light .sugchip.on { background: #eef1f6; color: #2f3440; border-color: #8a919e; }

/* ============================================================
   Edit-in-panel + reactive rating orb
   ============================================================ */

/* edit mode: quick-add bar hides, footer gains Delete */
.add-panel.editing .ac-nl { visibility: hidden; }
.ac-delete {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e04a35;
  margin-left: 4px;
}
.ac-flow {
  display: flex;
  gap: 10px;
  padding: 6px 16px 10px;
}
.ac-flow button {
  flex: 1;
  padding: 12px 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}
.ac-flow button:hover { background: rgba(255, 255, 255, 0.1); }
.device.light .ac-flow button { background: #fff; border-color: #dde0e6; color: #2f3440; }
.device.light .ac-flow button:hover { background: #f2f4f7; }
.device.light .ac-delete { color: #d43c2a; }

/* the orb reacts to the rating: scale, brightness and temperature */
.rate-panel { --rv: 0.5; }
.rate-glow {
  position: absolute;
  inset: -10%;
  pointer-events: none;
  background: none;
  transform: scale(calc(0.6 + var(--rv) * 0.55));
  opacity: calc(0.3 + var(--rv) * 0.7);
  transition: transform 0.5s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.5s;
  filter: blur(6px);
}
.rate-glow::before {
  /* warm — high energy */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 42% at 50% 40%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 240, 208, 0.9) 30%, rgba(226, 180, 90, 0.4) 58%, transparent 78%),
    radial-gradient(35% 25% at 38% 66%, rgba(210, 130, 60, 0.35), transparent 72%);
  opacity: var(--rv);
  transition: opacity 0.5s;
}
.rate-glow::after {
  /* cool — low energy */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(48% 38% at 50% 42%, rgba(215, 228, 255, 0.9) 0%, rgba(140, 165, 215, 0.55) 40%, rgba(55, 75, 125, 0.3) 62%, transparent 80%),
    radial-gradient(30% 22% at 62% 64%, rgba(70, 95, 150, 0.35), transparent 72%);
  opacity: calc(1 - var(--rv));
  transition: opacity 0.5s;
}
.rate-overlay[data-step="reflect"] .rate-glow { transform: none; opacity: 1; }
.rate-overlay[data-step="reflect"] .rate-glow::before,
.rate-overlay[data-step="reflect"] .rate-glow::after { opacity: 0; }

/* big reactive number in the heart of the orb */
.rate-val {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-family: "Archivo", "Helvetica Neue", sans-serif;
  font-weight: 200;
  font-size: 100px;
  line-height: 1;
  color: #fff;
  mix-blend-mode: difference; /* readable over both the blazing orb and the dark void */
  pointer-events: none;
}
.rate-val .bolt { font-size: 30px; vertical-align: 58px; margin-left: 6px; }
.rate-val.pop { animation: valpop 0.35s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes valpop {
  from { transform: translate(-50%, -50%) scale(1.18); }
  to { transform: translate(-50%, -50%) scale(1); }
}
.rate-overlay[data-step="reflect"] .rate-val { display: none; }

/* step label reads over any orb state */
.rate-step-label {
  color: rgba(240, 240, 235, 0.85);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  font-size: 12px;
}

/* tidy feelings row */
.feel-label {
  display: none;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 240, 235, 0.65);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  margin-bottom: 12px;
}
@media (min-width: 1024px) {
  .rate-overlay[data-step="rate"] .feel-label { display: block; }
}
.rate-overlay[data-step="feeling"] .feel-label { display: block; }
.feeling-chips button {
  flex: 0 0 auto;
  max-width: none;
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(16, 16, 20, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  color: rgba(240, 240, 235, 0.9);
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.08s;
}
.feeling-chips button:active { transform: scale(0.95); }
.feeling-chips button.selected {
  background: #f0eee8;
  color: #000;
  border-color: #f0eee8;
}

/* ============================================================
   Feeling words drifting inside the orb + energy hint
   ============================================================ */

.rate-words {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.rate-val { z-index: 2; }
.rate-overlay[data-step="reflect"] .rate-words { display: none; }
.rw {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-weight: 300;
  color: #fff;
  mix-blend-mode: difference;
  white-space: nowrap;
  animation: rwin 0.7s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
.rw i {
  display: inline-block;
  font-style: normal;
  animation: rwdrift 8s ease-in-out infinite alternate;
}
@keyframes rwin {
  from { opacity: 0; transform: translate(-50%, -10%) scale(0.82); filter: blur(4px); }
  to   { opacity: 0.6; transform: translate(-50%, -50%) scale(1); filter: blur(0); }
}
@keyframes rwdrift {
  from { transform: translateY(-7px); }
  to   { transform: translateY(7px); }
}
@keyframes rwout {
  from { opacity: 0.6; }
  to   { opacity: 0; filter: blur(5px); }
}

/* the slider = the quick energy rating */
.q-hint {
  display: block;
  padding: 8px 2px 2px;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 11px;
  color: var(--ink-faint);
}
.device.light .q-hint { color: #9aa1ad; }

/* the ⚡ Energy label must read in light mode too */
.device.light .q-lab { color: #6b7280; }
.ac-flow[hidden] { display: none; }

/* ============================================================
   Description editor + Meet row + notify select
   ============================================================ */

.ac-meet-tr { padding: 14px 16px; }
.ac-meet-tr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.ac-meet-tr-head .q-lab { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.f-transcript-preview {
  font-family: var(--note-sans);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-height: 120px;
  overflow: hidden;
  white-space: pre-wrap;
}
.device.light .f-transcript-preview { color: #55524a; }

.desc-toolbar {
  display: flex;
  gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 8px;
}
.desc-toolbar button {
  width: 30px; height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--ink-dim);
  border-radius: 5px;
}
.desc-toolbar button:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
.desc-editor {
  min-height: 64px;
  max-height: 180px;
  overflow-y: auto;
  outline: none;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
}
.desc-editor:empty::before { content: attr(data-placeholder); color: var(--ink-faint); }
.device.light .desc-toolbar { border-bottom-color: #e2e5ea; }
.device.light .desc-toolbar button { color: #6b7280; }
.device.light .desc-toolbar button:hover { background: #eef1f6; color: #2f3440; }
.device.light .desc-editor { color: #2f3440; }
.device.light .desc-editor:empty::before { color: #aab0bc; }

.ac-meet { cursor: pointer; width: 100%; text-align: left; }
.ac-meet.on span { color: #7ee3bd; }
.ac-meet.linked span { color: #8ab4f8; text-decoration: underline; text-underline-offset: 3px; }
.device.light .ac-meet.on span { color: #1c8a68; }
.device.light .ac-meet.linked span { color: #3b6ee0; }

.ac-notify {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  padding: 7px 9px;
  border-radius: 6px;
}
.device.light .ac-notify { background: #fff; border-color: #dde0e6; color: #2f3440; }

/* the ad-hoc tag input was invisible in the light editor panel:
   it inherited the dark theme's near-white --ink on a white background */
.device.light .ac-tags input {
  background: #fff;
  border-color: #dcdfe6;
  color: #2f3440;
}
.device.light .ac-tags input::placeholder { color: #aab0bc; }

/* ============================================================
   Personal booking link modal
   ============================================================ */

.pl-modal { max-width: 640px; max-height: 88vh; overflow-y: auto; scrollbar-width: none; }
.pl-modal::-webkit-scrollbar { display: none; }
.pl-rowset {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.pl-rowset label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.pl-rowset input, .pl-rowset select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 7px;
}
.pl-meet {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.pl-meet input { accent-color: #3b82f6; width: 15px; height: 15px; }

.pl-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 6px;
  padding-left: 34px; /* stay aligned over the hour-ruler gutter */
}
.pl-dows span { font-size: 9px; letter-spacing: 0.16em; color: var(--ink-faint); }
.pl-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  column-gap: 5px;
  padding-left: 34px; /* hour ruler lives in this gutter */
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.pl-hline {
  position: absolute;
  left: 34px;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.pl-hr {
  position: absolute;
  left: 0;
  width: 28px;
  text-align: right;
  transform: translateY(-50%);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  pointer-events: none;
}
.pl-win.ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8.5px;
  letter-spacing: 0.04em;
  color: #9ff0d6;
  border-style: dashed;
}
.device.light .pl-hline { background: #eef0f4; }
.device.light .pl-hr { color: #9aa1ad; }
.device.light .pl-win.ghost { color: #157a5c; }
.pl-col { position: relative; cursor: crosshair; border-left: 1px solid rgba(255,255,255,0.05); }
.pl-win {
  position: absolute;
  left: 1px; right: 1px;
  background: rgba(94, 222, 182, 0.24);
  border: 1px solid rgba(94, 222, 182, 0.7);
  border-radius: 5px;
  min-height: 10px;
  overflow: hidden;
  cursor: grab;
  touch-action: none; /* the pointer drag owns vertical movement */
}
.pl-win:active { cursor: grabbing; }
.pl-rs {
  position: absolute;
  left: 0;
  right: 0;
  height: 7px;
  cursor: ns-resize;
}
.pl-rs.top { top: 0; }
.pl-rs.bot { bottom: 0; }
.pl-win span {
  position: absolute;
  top: 3px; left: 5px;
  font-size: 8px;
  letter-spacing: 0.03em;
  color: #c9f7e6;
  white-space: nowrap;
}
.pl-win .ax {
  position: absolute;
  top: 2px; right: 4px;
  font-style: normal;
  font-size: 9px;
  color: #c9f7e6;
  cursor: pointer;
}
.pl-win.ghost { border-style: dashed; pointer-events: none; }
.pl-copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pl-copy-row code {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 10px 12px;
}
.pl-copy-row code::-webkit-scrollbar { display: none; }
.pl-copy-row button {
  flex: 0 0 auto;
  padding: 10px 16px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--ink);
  color: #000;
  border-radius: 7px;
}
.pl-note {
  font-family: "Archivo", sans-serif;
  font-weight: 300;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(240, 238, 232, 0.8);
  margin-bottom: 10px;
}
.pl-note.dim { color: var(--ink-faint); margin-top: 10px; }
.pl-note b { font-family: var(--mono); border: 1px solid var(--hairline-strong); border-radius: 4px; padding: 1px 6px; }

.device.light .pl-rowset input, .device.light .pl-rowset select { background: #fff; border-color: #dde0e6; color: #2f3440; }
.device.light .pl-meet { color: #2f3440; }
.device.light .pl-col { border-color: #eceef2; }
.device.light .pl-grid { border-color: #e2e5ea; }
.device.light .pl-win { background: rgba(52, 200, 156, 0.2); border-color: rgba(30, 170, 128, 0.7); }
.device.light .pl-win span, .device.light .pl-win .ax { color: #157a5c; }
.device.light .pl-copy-row code { background: #f2f4f7; border-color: #dde0e6; }
.device.light .pl-copy-row button { background: #3b82f6; color: #fff; }
.device.light .pl-note { color: #4b5260; }
.device.light .pl-note.dim { color: #9aa1ad; }

/* bare booking URL row in the availability panel */
.ap-link-row { display: flex; align-items: center; gap: 8px; padding-top: 12px; }
.ap-link-row code {
  flex: 1; min-width: 0;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--ink-dim);
}
.ap-link-row code::-webkit-scrollbar { display: none; }
.ap-link-row button {
  flex: 0 0 auto;
  padding: 9px 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  border-radius: 7px;
  color: var(--ink);
}

/* ============================================================
   Availability panel: right-docked slide-in, calendar stays visible
   ============================================================ */

@keyframes apslide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.avail-panel {
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  border: none;
  border-left: 1px solid var(--hairline);
  border-radius: 0;
  box-shadow: -26px 0 80px rgba(0, 0, 0, 0.5);
  padding: 24px 22px calc(20px + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) {
  .device.avail-mode .avail-panel { animation: apslide 0.18s cubic-bezier(0.2, 0.7, 0.3, 1); }
  .device.avail-mode .week-view { margin-right: 400px; }
  .device.avail-mode .fab-row { right: 400px; }
}
.device.light .avail-panel { background: #f4f5f7; border-left-color: #e2e5ea; box-shadow: -20px 0 60px rgba(30, 40, 60, 0.12); }
.device.light .ap-head h3 { color: #2f3440; }
.device.light .ap-tabs { background: #e7e9ee; }
.device.light .ap-tabs button.active { background: #fff; color: #2f3440; }
.device.light .ap-hint { color: #8a919e; }
.device.light .ap-message { background: #fff; border-color: #e2e5ea; color: #3a4150; }
.device.light .ap-row { color: #8a919e; }
.device.light .ap-row select { background: #fff; border-color: #dde0e6; color: #2f3440; }
.device.light .ap-link-row code { background: #fff; border-color: #e2e5ea; color: #6b7280; }
.device.light .ap-link-row button { border-color: #dde0e6; color: #2f3440; }
.device.light .ap-copy { background: #3b82f6; color: #fff; }
.device.light .ap-copy .kbd { border-color: rgba(255, 255, 255, 0.5); }

/* ============================================================
   Command menu (☰ / ?) — sectioned with shortcuts
   ============================================================ */

.app-menu { min-width: 262px; }
.app-menu .am-sec {
  display: block;
  padding: 12px 12px 5px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.app-menu button { display: flex; align-items: center; gap: 16px; }
.app-menu .kbds { margin-left: auto; display: flex; gap: 4px; }
.app-menu .kbd {
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 9px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.05);
}
.app-menu .am-static { pointer-events: none; opacity: 0.75; }
.app-menu .am-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px 8px;
  margin-top: 4px;
  border-top: 1px solid var(--hairline);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
}
.device.light .app-menu .am-sec { color: #9aa1ad; }
.device.light .app-menu .kbd { background: #f2f4f7; border-color: #dde0e6; color: #6b7280; }
.device.light .app-menu .am-hint { border-top-color: #eceef2; color: #9aa1ad; }

/* header row is a mobile-only affordance */
.app-menu .am-head { display: none; }

/* ---- phone: the menu becomes a Command Center bottom sheet ---- */
@media (max-width: 1023px) {
  .app-menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: calc(10px + env(safe-area-inset-bottom));
    margin: 0 auto;
    width: min(calc(100vw - 20px), 440px);
    max-height: 78dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    padding: 14px;
    background: #131318;
    /* the giant shadow doubles as the dimmed backdrop */
    box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.55), 0 24px 70px rgba(0, 0, 0, 0.7);
    z-index: 60;
  }
  .app-menu.open { animation: amSheet 0.26s cubic-bezier(0.2, 0.8, 0.3, 1); }
  .app-menu > button {
    font-size: 13px;
    letter-spacing: 0.08em;
    padding: 15px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    margin-bottom: 8px;
  }
  .app-menu .kbds, .app-menu .am-hint, .app-menu .am-static { display: none; }
  .app-menu .am-sec { padding: 12px 8px 8px; }
  .app-menu .am-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px 12px;
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
  }
  .app-menu .am-head button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-size: 13px;
  }
  .device.light .app-menu { background: #fff; }
  .device.light .app-menu > button { background: #f4f5f8; border-color: #e8eaef; }
  .device.light .app-menu .am-head { color: #6b7280; }
  .device.light .app-menu .am-head button { background: #eceef2; color: #2f3440; }
}
@keyframes amSheet {
  from { transform: translateY(26px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* reuse-previous-slots + light-mode tab legibility */
.ap-prev {
  align-self: flex-start;
  margin-bottom: 12px;
  padding: 10px 16px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9ff0d6;
  background: rgba(94, 222, 182, 0.14);
  border: 1px solid rgba(94, 222, 182, 0.45);
  border-radius: 999px;
}
.ap-prev:hover { background: rgba(94, 222, 182, 0.24); }
.device.light .ap-prev { color: #157a5c; background: rgba(52, 200, 156, 0.14); border-color: rgba(30, 170, 128, 0.5); }
.device.light .ap-tabs button { color: #8a919e; }
.device.light .ap-tabs button.active { color: #2f3440; }

/* ============================================================
   Personal-link modal: light-mode legibility + label fit
   ============================================================ */

/* one-line labels so all four controls align */
.pl-rowset label { white-space: nowrap; font-size: 8.5px; }

/* window time label never runs under the ✕ */
.pl-win span { left: 5px; right: 16px; overflow: hidden; }

/* labels were dark-theme ink (near-white) — invisible on the light card */
.device.light .pl-modal .tag,
.device.light .pl-rowset label,
.device.light .pl-dows span { color: #8a919e; }
.device.light .pl-modal h3 { color: #2f3440; }

/* dark theme: window label keeps its teal, slightly smaller for narrow columns */
.pl-win span { font-size: 7.5px; letter-spacing: 0.02em; }

/* all-day lane — birthday/holiday chips under each day header */
.ad-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 7px 5px 0;
}
.ad-chip {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 3px 8px;
  font-family: inherit;
  font-size: 10.5px;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.ad-chip:hover { filter: brightness(1.15); }
.ad-chip.p-life { background: rgba(151, 118, 29, 0.75); }
.ad-chip.p-work { background: rgba(74, 86, 158, 0.8); }
.ad-chip.p-health { background: rgba(63, 138, 99, 0.8); }
.ad-chip.p-sleep { background: rgba(107, 116, 130, 0.7); }
.device.light .ad-chip.p-life { background: #f4d47c; color: #6d5a17; }
.device.light .ad-chip.p-work { background: #ccd7fb; color: #3a4d92; }
.device.light .ad-chip.p-health { background: #bfe9d4; color: #23684a; }
.device.light .ad-chip.p-sleep { background: #dfe2ea; color: #5a6273; }

/* repeat & buffer footer chips + their anchored menus */
.ac-linkrow { position: relative; }
.ac-linkrow button.set { color: var(--ink); }
.ac-mini {
  position: absolute;
  bottom: calc(100% + 7px);
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 170px;
  background: #16171b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  padding: 5px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
}
.ac-mini button {
  font-size: 11.5px;
  color: var(--ink-dim);
  text-align: left;
  padding: 7px 11px;
  border-radius: 6px;
}
.ac-mini button:hover { background: rgba(255, 255, 255, 0.07); color: var(--ink); }
.ac-mini button.active { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.device.light .ac-mini { background: #fff; border-color: #e4e7ec; box-shadow: 0 14px 34px rgba(30, 40, 60, 0.14); }
.device.light .ac-mini button { color: #6b7280; }
.device.light .ac-mini button:hover { background: #f3f5f8; color: #23272f; }
.device.light .ac-mini button.active { background: #eef2f8; color: #23272f; }

/* the All-day switch must read as "off", not vanish, on the light panel */
.device.light .ac-allday .sw { background: #d3d8e0; }
.device.light .ac-allday .sw::after { background: #fff; box-shadow: 0 1px 2px rgba(20, 30, 50, 0.28); }
.device.light .ac-allday input:checked + .sw { background: #3b82f6; }

/* hatched buffer zones around a block */
.buf-zone {
  position: absolute;
  left: 0;
  right: 0;
  border-radius: 4px;
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.09) 0 4px, transparent 4px 9px);
  pointer-events: none;
}
.device.light .buf-zone {
  background: repeating-linear-gradient(-45deg, rgba(90, 100, 125, 0.16) 0 4px, transparent 4px 9px);
}

/* Todoist tasks in the sidebar */
.sp-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  margin-bottom: 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.sp-tabs button {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 0;
  border-radius: 6px;
  color: var(--ink-dim);
}
.sp-tabs button.active { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.device.light .sp-tabs { border-color: #e2e5ea; }
.device.light .sp-tabs button { color: #8a919e; }
.device.light .sp-tabs button.active { background: #eef2f8; color: #23272f; }

.td-input {
  width: 100%;
  font: inherit;
  font-size: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 9px 10px;
  margin-bottom: 8px;
}
.td-btn {
  width: 100%;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 9px 0;
  border-radius: 7px;
  background: #e44332; /* todoist red */
  color: #fff;
}
.td-link { font-size: 10px; color: var(--ink-faint); margin-top: 12px; }
.td-link:hover { color: var(--ink-dim); }
.device.light .td-input { background: #fff; border-color: #dde0e6; color: #23272f; }
.device.light .td-link { color: #9aa1ad; }

.td-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  margin-bottom: 4px;
  border: 1px solid var(--hairline);
  border-radius: 7px;
  cursor: grab;
  user-select: none;
}
.td-task:active { cursor: grabbing; }
.td-task:hover { border-color: var(--hairline-strong); }
.td-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--pr, #8a919e);
}
.td-task .td-c {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.td-due { flex: 0 0 auto; font-size: 8.5px; letter-spacing: 0.06em; color: var(--ink-faint); }
.td-due.today { color: #5ac08c; }
.td-due.late { color: #e06c5d; }
.td-done {
  flex: 0 0 auto;
  font-size: 10px;
  color: var(--ink-faint);
  border: 1px solid var(--hairline);
  border-radius: 5px;
  padding: 2px 6px;
  opacity: 0;
}
.td-task:hover .td-done { opacity: 1; }
.td-done:hover { color: #5ac08c; border-color: #5ac08c; }
.device.light .td-task { border-color: #e6e9ee; background: #fff; }
.device.light .td-task .td-c { color: #23272f; }
.device.light .td-due { color: #9aa1ad; }

/* where the dragged task will land */
.td-drop-ghost {
  position: absolute;
  left: 2px;
  right: 2px;
  border: 1.5px dashed rgba(94, 222, 182, 0.8);
  border-radius: 6px;
  background: rgba(94, 222, 182, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: #9ff0d6;
  pointer-events: none;
  z-index: 5;
}
.device.light .td-drop-ghost { color: #157a5c; }

/* complete-in-Todoist circle on todoist-born blocks */
.b-tdone {
  position: absolute;
  left: 7px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.b-tdone:hover { background: #5ac08c; border-color: #5ac08c; color: #04140c; }
.b-tdone.on { background: #5ac08c; border-color: #5ac08c; color: #04140c; cursor: default; }
.b-title.struck { text-decoration: line-through; opacity: 0.8; }
.device.light .b-tdone { border-color: currentColor; background: rgba(255, 255, 255, 0.55); color: inherit; }
.device.light .b-tdone:hover, .device.light .b-tdone.on { background: #1eaa80; border-color: #1eaa80; color: #fff; }

/* secondary (token-fallback) connect button */
.td-btn.ghost {
  background: none;
  border: 1px solid var(--hairline-strong);
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 11px;
  margin: 8px 0;
}
.device.light .td-btn.ghost { border-color: #d5d9e0; color: #23272f; }

/* Todoist view picker */
.td-select {
  width: 100%;
  font: inherit;
  font-size: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 8px 10px;
  margin: 10px 0 2px;
  -webkit-appearance: none;
  appearance: none;
}
.device.light .td-select { background: #fff; border-color: #dde0e6; color: #23272f; }

/* tasks pane: readable rows + control row */
.td-controls { display: flex; gap: 6px; }
.td-controls .td-select { flex: 1 1 auto; min-width: 0; }
.td-controls .td-select.sm { flex: 0 0 96px; }
.td-task { align-items: flex-start; }
.td-task .td-c {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.td-dot { margin-top: 4px; }
.td-due { margin-top: 2px; }
.td-done { margin-top: 1px; }

/* the priority ring is the checkbox — click to complete, Todoist-style */
.td-dot {
  width: 15px;
  height: 15px;
  border-width: 1.5px;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease;
}
.td-dot:hover, .td-dot.done { background: var(--pr, #8a919e); }

/* keep block titles clear of the complete-circle on todoist blocks */
.block:has(.b-tdone) .b-title { padding-left: 32px; }
.device.light .block:has(.b-tdone) .b-title { padding-left: 30px; padding-right: 8px; }

/* AI weekly summary chrome */
.ai-setup { display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.ai-get { font-size: 11px; color: var(--ink-dim); text-decoration: underline; }
.ai-foot { font-size: 10px; color: var(--ink-faint); display: flex; gap: 12px; align-items: center; }
.ai-regen { font-size: 10px; letter-spacing: 0.06em; color: var(--ink-dim); }
.ai-regen:hover { color: var(--ink); }
.ai-thinking { color: var(--ink-dim); animation: aiPulse 1.4s ease-in-out infinite; }
@keyframes aiPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 0.9; } }
.device.light .ai-get, .device.light .ai-regen { color: #6b7280; }
.device.light .ai-thinking { color: #8a919e; }
/* …but inside the always-dark explorer sheet, stay cream */
.device.light .sheet .ai-get, .device.light .sheet .ai-regen { color: var(--ink-dim); }
.device.light .sheet .ai-regen:hover { color: var(--ink); }
.device.light .sheet .ai-thinking { color: var(--ink-dim); }

/* meeting recorder modal */
.rec-modal { width: min(640px, 92vw); max-width: 640px; }
.rec-modal .rec-points p { margin-bottom: 10px; font-size: 12.5px; line-height: 1.55; }
.rec-modal #recCmd { font-size: 10px; }
.rec-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
  margin: 16px 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(61, 131, 246, 0.2);
  background: radial-gradient(circle at 50% 0, rgba(61, 131, 246, 0.13), rgba(255,255,255,0.035));
}
.rec-flow div {
  min-height: 74px;
  border-radius: 10px;
  padding: 12px 10px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: recCardGlow 5.4s ease-in-out infinite;
}
.rec-flow div:nth-of-type(2) { animation-delay: 0.45s; }
.rec-flow div:nth-of-type(3) { animation-delay: 0.9s; }
.rec-flow span {
  display: block;
  margin-bottom: 9px;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.rec-flow b {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 400;
  color: rgba(240, 238, 232, 0.9);
}
.rec-flow i {
  align-self: center;
  color: #7fb0ff;
  font-style: normal;
  opacity: 0.65;
  animation: recArrow 2.7s ease-in-out infinite;
}
.rec-points {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 4px;
}
.rec-modal .rec-points p {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
@keyframes recCardGlow {
  0%, 24%, 100% { border-color: rgba(255,255,255,0.08); box-shadow: none; }
  40%, 68% { border-color: rgba(61,131,246,0.32); box-shadow: 0 0 20px rgba(61,131,246,0.12); }
}
@keyframes recArrow {
  0%, 100% { transform: translateX(-2px); opacity: 0.5; }
  45% { transform: translateX(2px); opacity: 1; }
}
.rec-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.rec-actions button {
  border: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 12px 10px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.rec-actions button:first-child {
  background: #3d83f6;
  border-color: #3d83f6;
  color: #fff;
}
.rec-actions button:hover { filter: brightness(1.08); }
@media (max-width: 620px) {
  .rec-flow { grid-template-columns: 1fr; }
  .rec-flow i { justify-self: center; transform: rotate(90deg); }
  .rec-points { grid-template-columns: 1fr; }
  .st-demo { grid-template-columns: 1fr; }
  .st-arrow { justify-self: center; transform: rotate(90deg); }
  .rec-actions { grid-template-columns: 1fr; }
}
.device.light .rec-flow { border-color: rgba(61,131,246,0.22); background: #f6f9ff; }
.device.light .rec-flow div,
.device.light .rec-modal .rec-points p { background: #fff; border-color: #e5e9f2; }
.device.light .rec-flow b { color: #303744; }
.device.light .rec-flow i { color: #3d83f6; }

/* Calendar / Meetings top tabs + meetings view */
.top-tabs {
  display: none;
  gap: 3px;
  padding: 3px;
  margin-left: 14px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
}
.top-tabs button {
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--ink-dim);
}
.top-tabs button.active { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.device.light .top-tabs { border-color: #e2e5ea; }
.device.light .top-tabs button { color: #8a919e; }
.device.light .top-tabs button.active { background: #eef2f8; color: #23272f; }

.meetings-view { display: none; flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 26px 40px 80px; }
@media (min-width: 1024px) {
  .top-tabs { display: flex; }
  .device.meetings-open .week-view { display: none !important; }
  .device.meetings-open .meetings-view { display: block; }
  .device.sidebar-open .meetings-view { margin-left: var(--sbw, 292px); }
}
.mt-header { display: flex; align-items: baseline; gap: 18px; margin-bottom: 22px; }
.mt-header h2 { font-family: var(--serif); font-weight: 300; font-size: 30px; }
.mt-pad { padding: 30px 0; }
.mt-empty { max-width: 520px; padding: 40px 0; }
.mt-empty h3 { font-family: var(--serif); font-weight: 300; font-size: 22px; margin-bottom: 12px; }
.mt-empty p { font-size: 12.5px; line-height: 1.6; color: var(--ink-dim); margin-bottom: 12px; }
.mt-row {
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  max-width: 760px;
}
.mt-row.live { border-color: rgba(94, 222, 182, 0.5); }
.mt-head { display: flex; align-items: baseline; gap: 14px; }
.mt-date { font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.mt-time { font-size: 10px; color: var(--ink-faint); }
.mt-title { font-size: 14px; color: var(--ink); }
.mt-live { font-size: 10px; color: #5ac08c; }
.device.light .mt-row { border-color: #e9e6dd; background: #fffefb; box-shadow: 0 1px 2px rgba(60, 55, 40, 0.04); }
.device.light .mt-title { color: #23272f; }

/* ---- recorded meetings as Granola-style note documents ----
   The note is a paper document: serif title, chip row (version toggle,
   date, time), sans-serif body with "#" headings, • / ◦ bullets, and a
   floating "Ask anything" pill. Light mode = Granola's warm cream. */
.meetings-view { --note-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; }
.mt-row.note { padding: 30px 36px 22px; background: var(--bg-panel); border-radius: 16px; }
.mt-row.mt-flash { animation: mtFlash 2.4s ease; }
@keyframes mtFlash {
  0%, 100% { box-shadow: none; }
  15%, 45% { box-shadow: 0 0 0 2px rgba(94, 222, 182, 0.55); }
}
.mt-row.note .mt-head { align-items: flex-start; gap: 10px; }
.mt-row.note .mt-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 27px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
}
.mt-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin: 12px 0 20px; }
.mt-chip, .mt-toggle {
  font-family: var(--note-sans);
  font-size: 12px;
  color: var(--ink-dim);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 4px 10px;
  background: none;
  line-height: 1.4;
}
.mt-toggle { cursor: pointer; color: var(--ink); }
.mt-toggle:hover { border-color: var(--hairline-strong); }
.mt-toggle em { font-style: normal; color: var(--life-a); margin-right: 2px; }
.mt-toggle i { font-style: normal; font-size: 9px; color: var(--ink-faint); margin-left: 3px; }
.mt-chip.live { color: #5ac08c; border-color: rgba(94, 222, 182, 0.4); }
.mt-doc { font-family: var(--note-sans); font-size: 14px; line-height: 1.6; color: var(--ink); }
.mt-doc h4 {
  font-family: var(--note-sans);
  font-weight: 600;
  font-size: 14.5px;
  margin: 20px 0 7px;
  color: var(--ink);
}
.mt-doc h4:first-child { margin-top: 0; }
.mt-doc h4 i { font-style: normal; font-weight: 400; color: var(--ink-faint); margin-right: 8px; }
.mt-doc p { margin: 0 0 9px; }
.mt-doc ul { margin: 0 0 12px; padding-left: 22px; list-style: none; }
.mt-doc li { position: relative; margin-bottom: 6px; }
.mt-doc li::before { content: "•"; position: absolute; left: -15px; color: var(--ink-dim); }
.mt-doc li.sub { margin-left: 20px; }
.mt-doc li.sub::before { content: "◦"; }
.mt-tr-view p { white-space: pre-wrap; color: var(--ink-dim); }
.mt-hint { font-family: var(--note-sans); font-size: 12px; color: var(--ink-dim); margin-top: 12px; }
.mt-hintbtn {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.mt-hintbtn:hover { color: var(--ink); }
.mt-hintbtn:disabled { cursor: default; text-decoration: none; opacity: 0.7; }
.mt-live-note { font-family: var(--note-sans); font-size: 13px; color: var(--ink-dim); }

/* light mode: Granola's warm paper */
.device.light .meetings-view { background: #f4f2ec; }
.device.light .mt-row.note {
  background: #fdfcf9;
  border-color: #e9e6dd;
  box-shadow: 0 1px 2px rgba(60, 55, 40, 0.05), 0 4px 16px rgba(60, 55, 40, 0.05);
}
.device.light .mt-row.note .mt-title { color: #1f1d18; }
.device.light .mt-doc, .device.light .mt-doc h4 { color: #33312b; }
.device.light .mt-doc li::before { color: #8d887b; }
.device.light .mt-tr-view p { color: #55524a; }
.device.light .mt-chip, .device.light .mt-toggle { border-color: #e2dfd5; color: #6d6a60; background: #fff; }
.device.light .mt-toggle { color: #33312b; }
.device.light .mt-toggle:hover { border-color: #c9c5b8; }
.device.light .mt-toggle em { color: #97761d; }
.device.light .mt-hint, .device.light .mt-live-note { color: #8d887b; }
.device.light .mt-hintbtn:hover { color: #33312b; }
.device.light .mt-chip.live { color: #1eaa80; border-color: rgba(30, 170, 128, 0.35); }

/* upcoming meetings in the Meetings tab */
.mt-sec { margin: 4px 0 12px; }
.mt-row.up { padding: 12px 18px; }
.mt-row.up + .mt-sec { margin-top: 26px; }
.mt-arm { font-size: 10px; color: rgba(94, 222, 182, 0.75); }
.mt-join {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  color: var(--ink);
}
.mt-join:hover { border-color: var(--ink); }
.device.light .mt-join { border-color: #d5d9e0; color: #23272f; }

/* conferencing dropdown + inline connect */
.ac-conf select {
  flex: 1 1 auto;
  font: inherit;
  font-size: 12px;
  color: inherit;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}
.ac-conf select option { color: #23272f; }
.conf-setup { display: flex; gap: 6px; margin: 6px 0 2px; }
.conf-setup input {
  flex: 1 1 auto;
  font: inherit;
  font-size: 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  border-radius: 7px;
  padding: 8px 10px;
}
.conf-setup button {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 14px;
  border-radius: 7px;
  background: #3b82f6;
  color: #fff;
}
.device.light .conf-setup input { background: #fff; border-color: #dde0e6; color: #23272f; }
#confHint a { text-decoration: underline; }

/* date button + time selects in the event panel */
.ac-datebtn {
  text-align: left;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--ink);
  padding: 4px 8px;
  margin-left: -8px;
  border-radius: 7px;
}
.ac-datebtn:hover { background: rgba(255, 255, 255, 0.07); }
.ac-timesel { cursor: pointer; padding: 4px 2px; border-radius: 6px; }
.ac-timesel:hover { background: rgba(255, 255, 255, 0.07); }
.ac-timesel option { color: #23272f; }
.device.light .ac-datebtn { color: #2f3440; }
.device.light .ac-datebtn:hover, .device.light .ac-timesel:hover { background: #eef1f5; }

/* the Select-date popover (Vimcal-style mini month) */
.ac-card { position: relative; }
.dp-pop {
  position: absolute;
  z-index: 40;
  top: 8px;
  left: 8px;
  width: 264px;
  background: #17181d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head b { font-size: 12.5px; font-weight: 400; color: var(--ink); font-family: "Archivo", sans-serif; }
.dp-nav { display: flex; align-items: center; gap: 8px; }
.dp-nav span { font-size: 10px; color: var(--ink-dim); letter-spacing: 0.08em; }
.dp-nav button { color: var(--ink-dim); font-size: 13px; padding: 2px 6px; border-radius: 5px; }
.dp-nav button:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.dp-dows { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 4px; }
.dp-dows span { font-size: 9px; color: var(--ink-faint); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-grid button {
  font-size: 11px;
  color: var(--ink);
  padding: 6px 0;
  border-radius: 7px;
  text-align: center;
}
.dp-grid button:hover { background: rgba(255, 255, 255, 0.1); }
.dp-grid button.dim { color: var(--ink-faint); }
.dp-grid button.today { outline: 1px solid rgba(94, 130, 246, 0.6); }
.dp-grid button.sel { background: #3b82f6; color: #fff; }
.device.light .dp-pop { background: #fff; border-color: #e2e5ea; box-shadow: 0 18px 44px rgba(30, 40, 60, 0.18); }
.device.light .dp-head b { color: #23272f; }
.device.light .dp-grid button { color: #2f3440; }
.device.light .dp-grid button.dim { color: #c3c8d1; }
.device.light .dp-grid button:hover { background: #eef1f5; }
.device.light .dp-grid button.sel { background: #3b82f6; color: #fff; }

/* editable time combo */
.tp-wrap { position: relative; }
.ac-timetxt {
  width: 92px;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 4px 2px;
  border-radius: 6px;
}
.ac-timetxt:hover, .ac-timetxt:focus { background: rgba(255, 255, 255, 0.07); }
.ac-timetxt:disabled { opacity: 0.4; }
.tp-list {
  position: absolute;
  z-index: 45;
  top: calc(100% + 6px);
  left: -6px;
  width: 116px;
  max-height: 218px;
  overflow-y: auto;
  background: #17181d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
}
.tp-list button {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  padding: 7px 0;
  border-radius: 7px;
}
.tp-list button:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.tp-list button.on { background: #3b82f6; color: #fff; }
.device.light .ac-timetxt { color: #2f3440; }
.device.light .ac-timetxt:hover, .device.light .ac-timetxt:focus { background: #eef1f5; }
.device.light .tp-list { background: #fff; border-color: #e2e5ea; box-shadow: 0 16px 38px rgba(30, 40, 60, 0.16); }
.device.light .tp-list button { color: #5a6273; }
.device.light .tp-list button:hover { background: #eef1f5; color: #23272f; }
.device.light .tp-list button.on { background: #3b82f6; color: #fff; }

/* delete a recording + legible labels in light mode */
.mt-del {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-faint);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 8px;
}
.mt-row:hover .mt-del { color: var(--ink-dim); }
.mt-del:hover { color: #e06c5d; border-color: rgba(224, 108, 93, 0.4); }
.mt-del.arm { color: #fff; background: #d1453b; border-color: #d1453b; letter-spacing: 0.06em; }
.mt-row.up .mt-del { display: none; }
.device.light .meetings-view .tag { color: #8a919e; }
.device.light .mt-date { color: #6b7280; }
.device.light .mt-time { color: #9aa1ad; }
.device.light .mt-tr summary { color: #9aa1ad; }
.device.light .mt-empty h3 { color: #23272f; }
.device.light .mt-empty p { color: #4b5260; }
.device.light .mt-header h2 { color: #23272f; }
.device.light .mt-del { color: #c3c8d1; }
.device.light .mt-row:hover .mt-del { color: #8a919e; }
.device.light .mt-del:hover { color: #d1453b; }
.device.light .mt-live, .device.light .mt-arm { color: #1eaa80; }

/* ask-anything under each recorded meeting — Granola's floating pill */
.mt-askwrap { margin-top: 20px; }
.mt-ask {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 4px 4px 4px 8px;
}
.mt-ask input {
  flex: 1 1 auto;
  font-family: var(--note-sans);
  font-size: 13px;
  color: var(--ink);
  background: none;
  border: none;
  padding: 8px 10px;
  outline: none;
}
.mt-ask:focus-within { border-color: var(--hairline-strong); }
.mt-ask button {
  font-family: var(--note-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
}
.mt-q { font-family: var(--note-sans); font-size: 13px; color: var(--ink); margin: 12px 0 4px; font-weight: 600; }
.mt-a { font-family: var(--note-sans); font-size: 13px; line-height: 1.6; color: var(--ink-dim); white-space: pre-wrap; }
.mt-a.thinking { animation: aiPulse 1.4s ease-in-out infinite; }
.device.light .mt-ask { border-color: #e2dfd5; background: #fff; box-shadow: 0 1px 3px rgba(60, 55, 40, 0.06); }
.device.light .mt-ask:focus-within { border-color: #c9c5b8; }
.device.light .mt-ask input { color: #33312b; }
.device.light .mt-ask input::placeholder { color: #a3a094; }
.device.light .mt-ask button { background: #2d2a24; color: #fdfcf9; }
.device.light .mt-q { color: #33312b; }
.device.light .mt-a { color: #55524a; }
