:root {
  /* Brand: green primary (TasteBud leaf) + soft orange accent (Indian-flag feel). */
  --orange: #2f9e44;        /* primary brand — green */
  --orange-dark: #237a37;   /* primary dark green */
  --accent: #f59e0b;        /* warm orange accent (softened) */
  --accent-dark: #d97f0b;
  --cream: #f6f8f4;         /* soft neutral background (less harsh) */
  --card: #ffffff;
  --ink: #25302a;           /* dark slate-green text */
  --muted: #6f7d72;
  --line: #e4ece4;
  --green: #16a34a;
  --blue: #2563eb;
  --red: #dc2626;
  --amber: #d97706;
  --shadow: 0 6px 20px rgba(34, 70, 45, 0.10);
  --radius: 18px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

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

/* Centered inner column for the full-bleed app bar & tab bar. */
.bar-inner { max-width: 640px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 10px; }

/* Keyboard focus — visible only for keyboard users, never on mouse click. */
:focus-visible { outline: 3px solid rgba(47, 158, 68, .5); outline-offset: 2px; border-radius: 8px; }
button:focus:not(:focus-visible) { outline: none; }

::selection { background: rgba(47, 158, 68, .22); }

/* Tasteful scrollbar (desktop) */
* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfe4d2; border-radius: 999px; }

/* ---------- Header ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, #43b55a, var(--orange-dark));
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 3px solid var(--accent);  /* orange stripe, nods to the logo */
  box-shadow: 0 4px 16px rgba(34, 70, 45, .22);
}
.appbar .logo { font-size: 26px; }
.appbar .title { font-weight: 800; font-size: 18px; line-height: 1.05; letter-spacing: .2px; }
.appbar .sub { font-size: 12px; opacity: .92; }
.appbar .spacer { flex: 1; }
.iconbtn {
  background: rgba(255,255,255,.18); border: none; color: #fff;
  width: 38px; height: 38px; border-radius: 12px; font-size: 19px;
  transition: background .15s ease, transform .1s ease;
}
.iconbtn:hover { background: rgba(255,255,255,.3); }
.iconbtn:active { transform: scale(.92); }
.avatar.sm {
  width: 34px; height: 34px; font-size: 15px; flex: 0 0 auto;
  background: rgba(255,255,255,.95); color: var(--orange-dark);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.6);
}
.badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.22); color: #fff; letter-spacing: .3px;
}

/* ---------- Layout ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 14px; }
.center-screen {
  min-height: 80vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 14px;
  padding: 24px;
}
.big-emoji { font-size: 64px; }
.muted { color: var(--muted); }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 12px;
  border: 1px solid var(--line);
}
.task-card { cursor: pointer; transition: transform .1s ease, box-shadow .15s ease; }
.task-card:hover { box-shadow: 0 8px 24px rgba(34,122,55,.16); transform: translateY(-1px); }
.task-card:active { transform: scale(.99); }
.task-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.task-no { font-size: 12px; font-weight: 700; color: var(--orange-dark); }
.raiser { font-size: 11px; font-weight: 600; color: var(--muted); margin-left: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-title { font-weight: 600; font-size: 15px; margin: 2px 0; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.thumbs { display: flex; gap: 6px; margin-top: 10px; }
.thumbs img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }

/* ---------- Pills ---------- */
.pill {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px;
  background: #f4f4f5; color: #52525b; display: inline-flex; align-items: center; gap: 4px;
}
.pill.OPEN { background:#e0f2fe; color:#0369a1; }
.pill.IN_PROGRESS { background:#fef3c7; color:#b45309; }
.pill.DONE { background:#dcfce7; color:#15803d; }
.pill.CANCELLED { background:#fee2e2; color:#b91c1c; }
.pill.LOW { background:#f1f5f9; color:#475569; }
.pill.NORMAL { background:#f4f4f5; color:#71717a; }  /* quiet — let URGENT/LOW stand out */
.pill.URGENT { background:#fee2e2; color:#b91c1c; }
.pill.PUBLIC { background:#dcfce7; color:#15803d; }
.pill.MANAGEMENT { background:#dbeafe; color:#1d4ed8; }
.pill.OWNER { background:#fae8ff; color:#a21caf; }
.pill.PENDING { background:#fef3c7; color:#b45309; }
.pill.APPROVED { background:#dcfce7; color:#15803d; }
.pill.REJECTED { background:#fee2e2; color:#b91c1c; }
.pill.DISABLED { background:#e5e7eb; color:#374151; }

/* ---------- Filter chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.chip:active { transform: scale(.95); }
.chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* PNG status icons */
.sicon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 3px; object-fit: contain; }
.cicon { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; object-fit: contain; }
.chip { display: inline-flex; align-items: center; }

/* Icon-only (no text): bigger icons */
.sbig { width: 30px; height: 30px; object-fit: contain; display: block; }
.cbig { width: 30px; height: 30px; object-fit: contain; display: block; }
.icon-chip { padding: 6px; border-radius: 14px; }

/* ---------- Buttons ---------- */
.btn {
  border: none; border-radius: 12px; padding: 11px 16px; font-weight: 700; font-size: 14px;
  background: var(--orange); color: #fff;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.btn:hover { box-shadow: 0 4px 14px rgba(34,122,55,.26); }
.btn:active { background: var(--orange-dark); transform: scale(.98); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--orange-dark); border: 1px solid var(--line); }
.btn.danger { background: var(--red); }
.btn.green { background: var(--green); }
.btn.gray { background: #6b7280; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- FAB ---------- */
.fab {
  position: fixed; z-index: 30;
  /* Hug the right edge of the centered 640px column on wide screens. */
  right: max(18px, calc(50% - 320px + 14px));
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--orange); color: #fff; font-size: 30px; line-height: 1;
  box-shadow: 0 8px 22px rgba(34,122,55,.4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.fab:hover { box-shadow: 0 10px 28px rgba(34,122,55,.5); }
.fab:active { transform: scale(.9); }

/* ---------- Bottom nav ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
}
.tabbar .bar-inner { justify-content: space-around; gap: 2px; }
.tabbar button {
  background: none; border: none; color: var(--muted); font-size: 10px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1;
  padding: 6px 2px; border-radius: 12px; transition: color .15s ease, background .15s ease;
}
.tabbar button .ic { font-size: 19px; transition: transform .15s ease; }
.tabbar button.active { color: var(--orange-dark); background: #eef7f0; }
.tabbar button.active .ic { transform: translateY(-1px) scale(1.08); }
.tabbar button:active .ic { transform: scale(.9); }

/* ---------- Forms ---------- */
label.fld { display: block; margin: 10px 0; font-size: 13px; font-weight: 600; color: var(--ink); }
label.fld span { display: block; margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; background: #fffaf5; color: var(--ink); font-family: inherit;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }

/* Polished form layout */
.form-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 6px 14px 12px; margin-bottom: 12px; box-shadow: var(--shadow);
}
.form-card .fld:first-child { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn.big { padding: 15px; font-size: 16px; border-radius: 16px; margin-bottom: 6px; }

/* Due-date quick picks */
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.date-chip {
  border: 1px solid var(--line); background: #fffaf5; color: var(--orange-dark);
  font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 999px;
}
.date-chip.active { background: var(--orange); color: #fff; border-color: var(--orange); }
.date-chip.clear { color: var(--muted); }

/* Photo picker tiles */
.photo-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.photo-grid .ph {
  position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #fffaf5;
}
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .ph-x {
  position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid #fff; background: var(--red); color: #fff; font-size: 12px; line-height: 1; padding: 0;
}
.photo-grid .ph-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 76px; height: 76px; border: 2px dashed var(--orange); border-radius: 14px;
  color: var(--orange-dark); font-size: 22px; cursor: pointer; background: #fff8f1;
}
.photo-grid .ph-add span { font-size: 11px; font-weight: 700; }

/* ---------- Modal / sheet ---------- */
.scrim {
  position: fixed; inset: 0; background: rgba(67,20,7,.45); z-index: 40;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: var(--cream); width: 100%; max-width: 640px;
  border-radius: 22px 22px 0 0; padding: 16px 16px 28px;
  max-height: 92vh; overflow-y: auto;
  animation: slideup .2s ease;
}
@keyframes slideup { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet h2 { margin: 4px 0 12px; font-size: 18px; padding-right: 34px; }
.sheet-grip { width: 42px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: var(--line); color: var(--ink); font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s, transform .1s;
}
.sheet-close:hover { background: #cfe4d2; }
.sheet-close:active { transform: scale(.9); }
.sheet { position: relative; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px;
  font-size: 14px; z-index: 60; box-shadow: var(--shadow); max-width: 90%;
}
.toast.err { background: var(--red); }

/* ---------- Reminders banner ---------- */
.reminder-card {
  background: #fff7ec; border: 1px solid var(--line); border-left: 5px solid var(--accent);
  border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow);
}
.reminder-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.reminder-head b { font-size: 14px; }
.reminder-head .btn.sm { margin-left: auto; }
.reminder-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 2px; cursor: pointer;
  border-top: 1px dashed var(--line);
}
.reminder-row .re-emoji { font-size: 20px; }
.reminder-row .grow { flex: 1; min-width: 0; font-size: 14px; }

/* ---------- Calendar ---------- */
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 8px 10px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.cal-title { font-weight: 700; font-size: 17px; }
.iconbtn.dark { background: var(--cream); color: var(--orange-dark); font-size: 22px; font-weight: 700; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px; box-shadow: var(--shadow); margin-bottom: 14px;
}
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding-bottom: 2px; }
.cal-cell {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: 4px 0; gap: 2px; color: var(--ink); position: relative;
}
.cal-cell.empty-cell { background: transparent; }
.cal-cell .cal-num { font-size: 13px; font-weight: 600; }
.cal-cell.has-ev { background: #eef7f0; }
.cal-cell.today { background: var(--orange); color: #fff; }
.cal-cell.today .cal-num { color: #fff; }
.cal-dots { display: flex; gap: 1px; font-size: 11px; line-height: 1; flex-wrap: wrap; justify-content: center; }
.cal-dot { font-size: 11px; }

/* Emoji picker (event form) */
.emoji-picks { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.emoji-pick {
  width: 38px; height: 38px; border: 1px solid var(--line); background: #fffaf5;
  border-radius: 10px; font-size: 19px; line-height: 1;
}
.emoji-pick:active { background: var(--orange); }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 20px; height: 20px; flex: 0 0 auto; }
.checkbox-row span { margin: 0; }

/* ---------- Duty summary & leave balance ---------- */
.summary-card { padding: 14px; }
.sum-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 10px; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 7px; text-align: center; }
.sum-grid > div {
  background: #f4f8f3; border: 1px solid var(--line); border-radius: 12px; padding: 9px 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px;
}
.sum-grid b { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1; }
.sum-grid span { font-size: 10px; color: var(--muted); white-space: nowrap; }
.leave-bal { margin-top: 12px; }
.leave-bal .row-between { font-size: 13px; margin-bottom: 6px; flex-wrap: wrap; gap: 2px 8px; }
.leave-bal b.low { color: var(--red); }
.leave-bal .bar { height: 8px; background: #e6efe6; border-radius: 999px; overflow: hidden; }
.leave-bal .bar-fill { height: 100%; background: var(--green); border-radius: 999px; transition: width .3s ease; }
.leave-bal .bar-fill.low { background: var(--red); }

/* ---------- Duty roster ---------- */
.duty-staff { margin-bottom: 12px; }
.pill.duty-SHIFT { background: #dcfce7; color: #15803d; }
.pill.duty-ANNUAL { background: #fef3c7; color: #b45309; }
.pill.duty-SICK { background: #fae8ff; color: #a21caf; }
.pill.duty-WEEKLY { background: #e5e7eb; color: #374151; }
.dim-pill { background: #f4f4f5; color: #a1a1aa; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: var(--orange);
  color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.duty-holiday {
  background: #fae8ff; color: #a21caf; border-radius: 12px; padding: 8px 12px;
  margin-bottom: 10px; font-size: 14px;
}
.duty-week-row { display: flex; align-items: center; gap: 12px; }
.duty-week-row.today-row { border: 2px solid var(--orange); }
.dw-date { width: 42px; text-align: center; flex: 0 0 auto; }
.dw-date b { display: block; font-size: 12px; color: var(--muted); }
.dw-date span { font-size: 20px; font-weight: 700; }

/* Month duty cells */
.duty-cell .duty-mark {
  font-size: 11px; font-weight: 800; line-height: 1; padding: 1px 5px; border-radius: 6px; margin-top: 1px;
}
.duty-cell.duty-SHIFT .duty-mark { background: #16a34a; color: #fff; }
.duty-cell.duty-ANNUAL .duty-mark { background: #d97706; color: #fff; }
.duty-cell.duty-SICK .duty-mark { background: #a21caf; color: #fff; }
.duty-cell.duty-WEEKLY .duty-mark { background: #9ca3af; color: #fff; }
.duty-cell.duty-SHIFT { background: #ecfdf3; }
.duty-cell.duty-ANNUAL { background: #fffbeb; }
.duty-cell.duty-SICK { background: #fdf4ff; }
.duty-cell.duty-WEEKLY { background: #f3f4f6; }
.hol-dot { position: absolute; top: 3px; right: 6px; color: #a21caf; font-size: 14px; line-height: 1; }
.duty-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 4px; font-size: 12px; color: var(--muted); }
.duty-legend span { display: inline-flex; align-items: center; gap: 5px; }
.duty-legend .lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.duty-legend .lg.duty-SHIFT { background: #16a34a; }
.duty-legend .lg.duty-ANNUAL { background: #d97706; }
.duty-legend .lg.duty-SICK { background: #a21caf; }
.duty-legend .lg.duty-WEEKLY { background: #9ca3af; }
.duty-legend .lg.hol { background: #c026d3; }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap .seg-btn { flex: 1 1 40%; }

/* Slot coverage card */
.coverage-card { padding: 14px; }
.cov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cov {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: #ecfdf3; border: 1px solid #bbf7d0; border-radius: 12px; padding: 9px 4px;
}
.cov .cov-name { font-size: 11px; font-weight: 600; color: #15803d; text-align: center; }
.cov b { font-size: 20px; color: #15803d; }
.cov.gap { background: #fef2f2; border-color: #fecaca; }
.cov.gap .cov-name { color: #b91c1c; }
.cov.gap b { color: var(--red); }
.cov-warn { margin-top: 10px; font-size: 13px; color: #b91c1c; background: #fef2f2; border-radius: 10px; padding: 8px 10px; }
.cov-ok { margin-top: 10px; font-size: 13px; color: #15803d; }

/* Slot picker (up to 3 per day) */
.slot-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px;
  border: 1.5px solid var(--line); background: #fffaf5; border-radius: 14px; padding: 10px 12px;
  text-align: left; transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.slot-btn:active { transform: scale(.97); }
.slot-btn .slot-emoji { font-size: 20px; }
.slot-btn .slot-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.slot-btn .slot-time { font-size: 11px; color: var(--muted); }
.slot-btn.active { border-color: var(--green); background: #ecfdf3; }
.slot-btn.active .slot-name { color: #15803d; }

/* Segmented control (duty type) */
.seg { display: flex; gap: 6px; }
.seg-btn {
  flex: 1; border: 1px solid var(--line); background: #fffaf5; color: var(--ink);
  padding: 10px; border-radius: 12px; font-weight: 700; font-size: 13px;
}
.seg-btn.active { background: var(--orange); color: #fff; border-color: var(--orange); }

/* ---------- Announcements ---------- */
.ann-card.pinned { border-left: 5px solid var(--orange); background: #fff8f1; }
.ann-title { font-weight: 700; font-size: 15px; }
.ann-body { margin: 8px 0 6px; font-size: 14px; line-height: 1.5; color: #5b4636; }

/* PWA install button */
.install-btn {
  position: fixed; left: 14px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30;
  border: none; background: var(--accent-dark); color: #fff; font-weight: 700; font-size: 13px;
  padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow);
}

/* Mine filter + activity history */
.mine-chip { margin: 0 0 10px; }
.activity-row { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.activity-row:first-child { border-top: none; }
.act-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); margin-top: 5px; flex: 0 0 auto; }

/* ---------- Misc ---------- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.section-title { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 18px 4px 8px; }
.empty { text-align: center; color: var(--muted); padding: 40px 12px; }
.empty .big-emoji { display: block; margin-bottom: 8px; }
.list-item { display: flex; align-items: center; gap: 10px; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .name { font-weight: 600; }
.spin { width: 34px; height: 34px; border: 4px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.dim { opacity: .55; }
.kv { font-size: 13px; color: var(--muted); margin: 3px 0; }
.kv b { color: var(--ink); font-weight: 600; }

/* ---------- Custom tooltip ---------- */
.tooltip {
  position: fixed; z-index: 9999; left: 0; top: 0; max-width: 260px;
  background: #3a1c0c; color: #fff; padding: 7px 10px; border-radius: 9px;
  font-size: 12px; font-weight: 600; line-height: 1.35; white-space: normal;
  box-shadow: 0 8px 22px rgba(67, 20, 7, .35);
  opacity: 0; transform: translateY(3px) scale(.98); pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.tooltip.show { opacity: 1; transform: none; }
.tooltip::after {
  content: ""; position: absolute; left: var(--arrow-x, 50%); transform: translateX(-50%);
  border: 6px solid transparent;
}
.tooltip[data-place="top"]::after { top: 100%; border-top-color: #3a1c0c; }
.tooltip[data-place="bottom"]::after { bottom: 100%; border-bottom-color: #3a1c0c; }
@media (prefers-reduced-motion: reduce) { .tooltip { transition: opacity .01ms; } }

/* First view element shouldn't crowd the app bar / reminders. */
#view > .chips:first-child,
#view > .cal-head:first-child { margin-top: 4px; }

/* Respect users who prefer less motion. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .sheet { animation: none; }
}

/* Larger screens: the app reads as a calm centered column. */
@media (min-width: 700px) {
  .task-card, .card { border-radius: 20px; }
}
