/* Posting Center · v3 — Zain's brief:
   "See what you need, edit on click. Tabs for different concerns."
   No imitation of Achievements; designed for the workflow Zain actually does.
*/

.ps3-page { padding-bottom: 60px; }

/* ────────────────────────────────────────────────────────────────────
   Title bar — page heading + 3 entry-point buttons
   ──────────────────────────────────────────────────────────────────── */
.ps3-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ps3-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.ps3-title h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}
.ps3-today {
  font-size: 13px;
  font-weight: 500;
  color: var(--brand);
  background: rgba(232,97,58,0.10);
  border: 1px solid rgba(232,97,58,0.25);
  border-radius: 999px;
  padding: 3px 12px;
  letter-spacing: 0;
}
/* Streak pill — color escalates with streak length. */
.ps3-streak {
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 999px;
  padding: 3px 12px;
  letter-spacing: 0;
  cursor: pointer;
  transition: all 160ms ease;
  user-select: none;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}
.ps3-streak .num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ps3-streak .best { font-size: 11px; opacity: 0.65; margin-left: 4px; }
.ps3-streak.is-zero { color: var(--text-tertiary); background: rgba(255,255,255,0.04); border: 1px solid var(--border-light); }
.ps3-streak.is-on   { color: #ffb37a; background: rgba(232,97,58,0.10); border: 1px solid rgba(232,97,58,0.25); }
.ps3-streak.is-warm { color: #ffdd66; background: rgba(232,150,40,0.14); border: 1px solid rgba(232,150,40,0.35); }
.ps3-streak.is-hot  { color: #ffe066; background: linear-gradient(135deg, rgba(232,97,58,0.22), rgba(232,180,40,0.22)); border: 1px solid rgba(255,200,80,0.55); box-shadow: 0 0 18px rgba(232,150,40,0.25); }
.ps3-streak:hover { transform: translateY(-1px); filter: brightness(1.1); }

/* Streak history grid (inside the in-app modal). 30 cells = 6×5. */
.ps3-streak-grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 4px;
  max-width: 360px;
}
.ps3-streak-cell {
  aspect-ratio: 1;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text-tertiary);
}
.ps3-streak-cell.is-done   { background: rgba(120,180,120,0.30); color: #b8e0b8; border: 1px solid rgba(120,180,120,0.50); }
.ps3-streak-cell.is-today  { background: rgba(232,97,58,0.30); color: #ffc8a8; border: 1px solid var(--brand); }
.ps3-streak-cell.is-missed { background: rgba(220,80,80,0.20); color: #ffb0b0; border: 1px solid rgba(220,80,80,0.40); }
.ps3-streak-cell.is-empty  { background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.08); }
.ps3-streak-cell-key {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}
.ps3-streak-cell-key.is-done   { background: rgba(120,180,120,0.30); border: 1px solid rgba(120,180,120,0.50); }
.ps3-streak-cell-key.is-today  { background: rgba(232,97,58,0.30); border: 1px solid var(--brand); }
.ps3-streak-cell-key.is-missed { background: rgba(220,80,80,0.20); border: 1px solid rgba(220,80,80,0.40); }
.ps3-streak-cell-key.is-empty  { background: rgba(255,255,255,0.03); border: 1px dashed rgba(255,255,255,0.18); }
.ps3-title .sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
}
.ps3-title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.ps3-tbtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 160ms ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps3-tbtn:hover {
  background: rgba(232,97,58,0.07);
  border-color: rgba(232,97,58,0.45);
  color: var(--brand);
}
.ps3-tbtn svg { width: 14px; height: 14px; }
.ps3-tbtn .pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 1px 7px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ps3-tbtn:hover .pill { background: rgba(232,97,58,0.15); color: var(--brand); }

/* Reminders banner — sits above POSTING NEXT when there are FB posts
   waiting for a comment reply. Clickable; opens the Reminders tab. */
.ps3-rem-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  background: rgba(232, 165, 116, 0.10);
  border: 1px solid rgba(232, 165, 116, 0.40);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.ps3-rem-banner:hover {
  background: rgba(232, 165, 116, 0.16);
  border-color: rgba(232, 165, 116, 0.55);
}
.ps3-rem-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e3b574;
  box-shadow: 0 0 0 4px rgba(227, 181, 116, 0.18);
  flex-shrink: 0;
  animation: ps3-rem-pulse 1.6s ease-in-out infinite;
}
@keyframes ps3-rem-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
.ps3-rem-banner-body { flex: 1; min-width: 0; }
.ps3-rem-banner-title {
  font-size: var(--fs-14);
  font-weight: var(--fw-semibold);
  color: var(--text);
  line-height: 1.3;
}
.ps3-rem-banner-sub {
  margin-top: 2px;
  font-size: var(--fs-12);
  color: var(--text-secondary);
  line-height: 1.4;
}
.ps3-rem-banner .ps3-btn { flex-shrink: 0; }

@media (max-width: 640px) {
  .ps3-rem-banner { flex-wrap: wrap; padding: 12px 14px; }
  .ps3-rem-banner .ps3-btn { width: 100%; justify-content: center; }
}

/* ────────────────────────────────────────────────────────────────────
   POSTING NEXT — big focal card
   ──────────────────────────────────────────────────────────────────── */
.ps3-next {
  background: var(--card);
  border: 1px solid rgba(232,97,58,0.40);
  border-radius: var(--r-lg);
  padding: 22px 26px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ps3-next::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 96% 50%, rgba(232,97,58,0.10) 0, transparent 45%),
    linear-gradient(180deg, rgba(232,97,58,0.06), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.ps3-next-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
}
.ps3-next-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
}
.ps3-next-time-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--brand);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ps3-next-time-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 10px rgba(232,97,58,0.85);
  animation: ps3-pulse 2s ease-in-out infinite;
}
@keyframes ps3-pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.45; transform: scale(0.85); }
}
.ps3-next-time-num {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ps3-next-time-day {
  font-size: 10.5px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-weight: 600;
}

.ps3-next-body { min-width: 0; }
.ps3-next-name {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ps3-bundle-pill {
  font-size: 9.5px;
  background: rgba(232,97,58,0.15);
  color: var(--brand);
  border-radius: 7px;
  padding: 2px 8px;
  letter-spacing: 0.10em;
  font-weight: 700;
}
.ps3-next-meta {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.ps3-next-meta .arrow { color: var(--brand); margin-right: 2px; }
.ps3-next-meta .group {
  color: var(--text-secondary);
  font-weight: 500;
}
.ps3-next-meta .nogrp { color: rgba(255,180,180,0.85); font-weight: 500; }

/* Groups editor on POSTING NEXT (added 2026-05-11). Replaces the old
   read-only "→ group · group" line so Zain can add/remove groups per post. */
.ps3-next-groups {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  position: relative;
}
.ps3-next-groups-lab {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-right: 4px;
}
.ps3-grp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(232,97,58,0.10);
  border: 1px solid rgba(232,97,58,0.30);
  color: var(--text);
  border-radius: 999px;
  padding: 3px 4px 3px 12px;
  font-size: 12.5px;
  font-weight: 500;
}
.ps3-grp-chip-x {
  background: transparent; border: 0;
  color: var(--text-tertiary);
  cursor: pointer;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
  transition: all 140ms ease;
}
.ps3-grp-chip-x:hover { background: rgba(232,97,58,0.25); color: var(--brand); }
.ps3-grp-chip.is-done {
  background: rgba(120,180,120,0.10);
  border-color: rgba(120,180,120,0.30);
  color: var(--text-secondary);
  opacity: 0.75;
}
.ps3-grp-add {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent;
  border: 1px dashed var(--border-light);
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 140ms ease;
  font-family: inherit;
}
.ps3-grp-add:hover { border-color: var(--brand); color: var(--brand); }
.ps3-grp-add svg { width: 12px; height: 12px; }
/* Group picker — fixed-position floater attached to <body> so it escapes
   the focal card's overflow:hidden. JS sets top/left/width/max-height via
   _ps3PositionGroupPicker(). */
.ps3-grp-picker {
  position: fixed;
  z-index: 90;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.55), 0 2px 8px rgba(0,0,0,0.4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 240px;
}
.ps3-grp-picker .ps3-grp-picker-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: none;
}
.ps3-grp-picker-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0,0,0,0.18);
  border-bottom: 1px solid var(--border-light);
  font-size: 11.5px;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
}
.ps3-grp-picker-toggle {
  background: transparent; border: 0; color: var(--brand);
  cursor: pointer; font-size: 11px; font-weight: 600;
  font-family: inherit;
}
.ps3-grp-picker-list {
  max-height: 260px;
  overflow-y: auto;
}
.ps3-grp-picker-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: transparent; border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--text);
  transition: background 140ms ease;
}
.ps3-grp-picker-row:hover { background: rgba(255,255,255,0.04); }
.ps3-grp-picker-row.is-cd { opacity: 0.45; cursor: not-allowed; }
.ps3-grp-picker-name { font-size: 13px; font-weight: 500; }
.ps3-grp-picker-meta { font-size: 11px; color: var(--text-tertiary); }
.ps3-grp-picker-empty {
  padding: 24px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* Template picker row (POSTING NEXT) — chip-per-template switcher */
.ps3-next-tplrow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  margin-bottom: 8px;
}
.ps3-next-tplrow-lab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.ps3-tpl-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.ps3-tpl-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
  max-width: 240px;
}
.ps3-tpl-chip:hover {
  border-color: var(--brand-dim);
  color: var(--text);
}
.ps3-tpl-chip.is-sel {
  background: rgba(232,97,58,0.14);
  border-color: rgba(232,97,58,0.45);
  color: var(--brand);
}
.ps3-tpl-chip-tick {
  font-size: 11px;
  line-height: 1;
}
.ps3-tpl-chip-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.ps3-tpl-chip-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}
.ps3-tpl-chip.is-sel .ps3-tpl-chip-lang {
  background: rgba(232,97,58,0.12);
  border-color: rgba(232,97,58,0.30);
  color: var(--brand);
}
.ps3-tpl-newbtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  background: transparent;
  border: 1px dashed var(--border-light);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 140ms ease, color 140ms ease;
}
.ps3-tpl-newbtn:hover {
  border-color: var(--brand-dim);
  color: var(--brand);
}
.ps3-tpl-newbtn svg { width: 11px; height: 11px; }

.ps3-next-tplprev {
  background: rgba(0,0,0,0.22);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-family: var(--font-sans);
  max-height: 96px;
  overflow: hidden;
  position: relative;
}
.ps3-next-tplprev[dir="rtl"] {
  font-family: var(--font-arabic, "IBM Plex Sans Arabic", sans-serif);
  font-size: 13.5px;
}
.ps3-next-tplprev::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 24px;
  background: linear-gradient(180deg, transparent, var(--card));
  pointer-events: none;
}
.ps3-next-tplprev.is-empty {
  color: var(--text-tertiary);
  font-style: italic;
}
.ps3-next-tplprev a { color: var(--brand); }

.ps3-next-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: stretch;
  min-width: 170px;
}
.ps3-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-light);
  border-radius: 9px;
  padding: 9px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 160ms ease;
  font-family: inherit;
  white-space: nowrap;
}
.ps3-btn:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
}
.ps3-btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.ps3-btn-primary:hover {
  box-shadow: 0 0 0 3px rgba(232,97,58,0.25);
  border-color: #fff;
}
.ps3-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.ps3-btn-danger:hover {
  border-color: rgba(217,80,80,0.45);
  color: rgba(255,150,150,1);
  background: rgba(217,80,80,0.08);
}
.ps3-btn svg { width: 13px; height: 13px; }

/* Empty state for no current post */
.ps3-next.is-empty {
  border: 1px dashed var(--border-light);
  background: var(--card);
  padding: 26px 26px;
}
.ps3-next.is-empty::before { display: none; }
.ps3-empty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ps3-empty-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(232,97,58,0.10);
  border: 1px solid rgba(232,97,58,0.30);
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
}
.ps3-empty-icon svg { width: 20px; height: 20px; }
.ps3-empty-body { flex: 1; min-width: 200px; }
.ps3-empty-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.ps3-empty-sub { font-size: 12px; color: var(--text-tertiary); line-height: 1.5; }

/* ────────────────────────────────────────────────────────────────────
   REST OF TODAY — slim list, no actions visible
   ──────────────────────────────────────────────────────────────────── */
.ps3-rest {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  overflow: hidden;
}
.ps3-rest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0,0,0,0.10);
}
.ps3-rest-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
}
.ps3-rest-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.ps3-rest-meta .brand { color: var(--brand); font-weight: 600; }
.ps3-rest-list {}
.ps3-restrow {
  display: grid;
  grid-template-columns: 60px 16px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 9px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 140ms ease;
}
.ps3-restrow:last-child { border-bottom: none; }
.ps3-restrow:hover { background: rgba(255,255,255,0.025); }
.ps3-restrow.is-done { opacity: 0.45; }
.ps3-restrow.is-skipped { opacity: 0.30; }
.ps3-restrow-time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.ps3-restrow-status {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ps3-restrow-status.pending {
  background: rgba(232,97,58,0.18);
  border: 1px solid rgba(232,97,58,0.50);
}
.ps3-restrow-status.pending::after {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--brand);
}
.ps3-restrow-status.done {
  background: rgba(120,200,140,0.18);
  border: 1px solid rgba(120,200,140,0.45);
  color: rgb(150,220,170);
}
.ps3-restrow-status.done svg { width: 8px; height: 8px; }
.ps3-restrow-status.skipped {
  background: transparent;
  border: 1px solid var(--border-light);
}
.ps3-restrow-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps3-restrow-name .cmp {
  color: var(--text-tertiary);
  font-weight: 400;
  margin-left: 6px;
  font-size: 11.5px;
}
.ps3-restrow-grp {
  font-size: 11.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.ps3-restrow-grp .arr { color: var(--text-tertiary); margin-right: 3px; }

.ps3-rest-empty {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ────────────────────────────────────────────────────────────────────
   THIS WEEK — tabbed shell
   ──────────────────────────────────────────────────────────────────── */
.ps3-week {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.ps3-week-head {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  background: rgba(0,0,0,0.10);
  padding-right: 14px;
}
.ps3-week-tabs {
  display: flex;
  flex: 1;
  gap: 2px;
  padding: 0 14px;
}
.ps3-week-tab {
  background: transparent;
  border: none;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-tertiary);
  cursor: pointer;
  position: relative;
  transition: color 160ms ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.ps3-week-tab svg { width: 13px; height: 13px; }
.ps3-week-tab:hover { color: var(--text-secondary); }
.ps3-week-tab.is-on { color: var(--text); }
.ps3-week-tab.is-on::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
  box-shadow: 0 -3px 10px rgba(232,97,58,0.5);
}
.ps3-week-tab .badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(232,97,58,0.15);
  color: var(--brand);
  border-radius: 7px;
  padding: 1px 6px;
  font-weight: 700;
}
.ps3-week-edit {
  font-size: 11.5px;
  color: var(--text-tertiary);
  background: transparent;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  transition: all 140ms ease;
}
.ps3-week-edit:hover {
  background: rgba(232,97,58,0.10);
  color: var(--brand);
}
.ps3-week-edit svg { width: 12px; height: 12px; }
.ps3-week-body {
  padding: 18px 22px;
}

/* Daily plan tab — compact 7-day strip showing what's planned */
.ps3-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.ps3-day {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 130px;
  transition: border-color 200ms ease, background 200ms ease;
}
.ps3-day.is-today {
  border-color: rgba(232,97,58,0.50);
  background: linear-gradient(180deg, rgba(232,97,58,0.05), transparent 70%);
  box-shadow: 0 0 0 1px rgba(232,97,58,0.10), 0 6px 16px rgba(232,97,58,0.08);
}
.ps3-day-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 4px;
}
.ps3-day-name {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-secondary);
}
.ps3-day.is-today .ps3-day-name { color: var(--brand); }
.ps3-day-today-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 2px 7px;
  margin-left: 6px;
  vertical-align: middle;
}
.ps3-day-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ps3-day-cnt {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 2px;
}
.ps3-day-cnt .v { color: var(--text); font-weight: 600; }
.ps3-day-pills {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow: hidden;
}
.ps3-day-pill {
  background: rgba(232,97,58,0.10);
  border: 1px solid rgba(232,97,58,0.20);
  border-radius: 6px;
  padding: 3px 7px;
  font-size: 10.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps3-day-pill.is-bundle {
  background: rgba(232,97,58,0.18);
  font-weight: 600;
}
.ps3-day-empty {
  font-size: 10px;
  color: var(--text-tertiary);
  text-align: center;
  padding: 6px 0;
  font-style: italic;
}

/* Per-post day cell (replaces ps3-day-pills 2026-05-11). Each entry shows
   the unit/bundle name on top, then its assigned group chips below. */
.ps3-day-posts {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  overflow: hidden;
}
.ps3-day-post {
  background: rgba(232,97,58,0.08);
  border: 1px solid rgba(232,97,58,0.18);
  border-radius: 7px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ps3-day-post.is-bundle {
  background: rgba(232,97,58,0.16);
  border-color: rgba(232,97,58,0.30);
}

/* Posting progress states — make it obvious at a glance which units have
   been pushed out and which still need work. The default (orange tint)
   means "needs you"; partial = amber "in progress"; done = green "shipped". */
.ps3-day-post.is-partial {
  background: rgba(212,165,116,0.10);
  border-color: rgba(212,165,116,0.35);
}
.ps3-day-post.is-partial .ps3-day-grpct-partial {
  background: rgba(212,165,116,0.22);
  color: #e3c190;
  border: 1px solid rgba(212,165,116,0.40);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
}

.ps3-day-post.is-done {
  background: rgba(122,178,143,0.10);
  border-color: rgba(122,178,143,0.38);
  opacity: 1;
}
.ps3-day-post.is-done .ps3-day-post-name { color: #cfe6d2; }
.ps3-day-post.is-done .ps3-day-grpct {
  background: rgba(122,178,143,0.22);
  color: #b8e0b8;
  border: 1px solid rgba(122,178,143,0.40);
  border-radius: 4px;
  padding: 1px 5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ps3-day-post.is-done .ps3-day-tick {
  width: 10px;
  height: 10px;
  stroke-width: 3;
  color: #b8e0b8;
}

.ps3-day-post.is-skipped { opacity: 0.4; text-decoration: line-through; }
.ps3-day-post-name {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ps3-day-post-grps {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.ps3-day-grpct {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 9.5px;
  font-weight: 500;
  border-radius: 4px;
  padding: 1px 5px;
  cursor: help;
}
.ps3-day-nogrp {
  font-size: 9.5px;
  color: rgba(255,180,180,0.7);
  font-style: italic;
}

/* Tab pane content for cadence/reminders/settings (rendered inline by posting-cadence) */
.ps3-week-body.has-inline {
  padding: 0;
}
.ps3-week-body.has-inline > div {
  padding: 16px 20px;
}

/* ────────────────────────────────────────────────────────────────────
   Collapsible sections (Groups, Bundles)
   ──────────────────────────────────────────────────────────────────── */
.ps3-collapse {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  overflow: hidden;
}
.ps3-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 140ms ease;
}
.ps3-collapse-head:hover { background: rgba(255,255,255,0.025); }
.ps3-collapse-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ps3-collapse-title .caret {
  width: 14px; height: 14px;
  color: var(--text-tertiary);
  transition: transform 200ms ease;
}
.ps3-collapse.is-open .ps3-collapse-title .caret { transform: rotate(90deg); }
.ps3-collapse-title .pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 2px 8px;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.ps3-collapse-meta {
  font-size: 11.5px;
  color: var(--text-tertiary);
}
.ps3-collapse-body {
  display: none;
  border-top: 1px solid var(--border-light);
  padding: 0;
}
.ps3-collapse.is-open .ps3-collapse-body { display: block; }

@media (max-width: 1100px) {
  .ps3-days { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 700px) {
  .ps3-days { grid-template-columns: repeat(2, 1fr); }
  .ps3-next-inner { grid-template-columns: 1fr; }
  .ps3-next-actions { flex-direction: row; flex-wrap: wrap; }
}

/* ────────────────────────────────────────────────────────────────────
   RESPONSIVE — mobile/tablet (additive, behind media queries only)
   Posting shell: tabs/titlebar/POSTING-NEXT/REST/THIS-WEEK
   ──────────────────────────────────────────────────────────────────── */

/* Tablet & smaller (≤1024px) — relax dense headers, ease tap targets */
@media (max-width: 1024px) {
  .ps3-page { padding-bottom: 40px; }

  .ps3-titlebar { gap: 12px; margin-bottom: 14px; }
  .ps3-title h1 { font-size: 20px; gap: 10px; }

  /* Tab bar inside THIS-WEEK should scroll horizontally rather than wrap */
  .ps3-week-head { padding-right: 8px; }
  .ps3-week-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    flex-wrap: nowrap;
    padding: 0 10px;
    scrollbar-width: none;
  }
  .ps3-week-tabs::-webkit-scrollbar { display: none; }
  .ps3-week-tab { flex: 0 0 auto; }

  .ps3-week-body { padding: 14px 14px; }

  /* Days strip — keep readable as it collapses to 4-up at 1100px already */
  .ps3-day { min-height: 110px; }

  /* Buttons large enough for touch */
  .ps3-tbtn,
  .ps3-btn { min-height: 36px; }
  .ps3-week-edit { min-height: 36px; }
}

/* Phone (≤640px) */
@media (max-width: 640px) {
  .ps3-titlebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ps3-title h1 {
    font-size: 19px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .ps3-title .sub { font-size: 12px; }

  /* Action row of pill buttons scrolls horizontally so all 5 stay reachable */
  .ps3-title-actions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .ps3-title-actions::-webkit-scrollbar { display: none; }
  .ps3-tbtn { flex: 0 0 auto; }

  /* POSTING NEXT — stack everything vertically, full-width actions */
  .ps3-next { padding: 16px 16px; }
  .ps3-next-inner { grid-template-columns: 1fr; gap: 14px; }
  .ps3-next-time {
    flex-direction: row;
    align-items: baseline;
    justify-content: flex-start;
    padding: 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  .ps3-next-time-num { font-size: 30px; }
  .ps3-next-name { font-size: 17px; }
  .ps3-next-actions {
    flex-direction: column;
    min-width: 0;
    width: 100%;
  }
  .ps3-next-actions .ps3-btn { width: 100%; }
  .ps3-next-tplprev { max-height: 140px; }

  /* Empty-state row stacks */
  .ps3-empty-row { flex-direction: column; align-items: stretch; }
  .ps3-empty-body { min-width: 0; }

  /* REST OF TODAY rows — collapse grid to 2-line layout */
  .ps3-rest-head { padding: 10px 14px; }
  .ps3-restrow {
    grid-template-columns: 52px 14px 1fr;
    grid-template-areas:
      "time status name"
      ".    .      grp";
    row-gap: 2px;
    padding: 10px 14px;
  }
  .ps3-restrow-time { grid-area: time; }
  .ps3-restrow-status { grid-area: status; }
  .ps3-restrow-name {
    grid-area: name;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .ps3-restrow-grp { grid-area: grp; white-space: normal; }

  /* THIS WEEK tabs */
  .ps3-week-head { padding-right: 6px; }
  .ps3-week-tab { padding: 12px 10px; font-size: 12px; }
  .ps3-week-body { padding: 12px 12px; }

  /* 7-day strip already drops to 2-col at 700px; tighten cells more */
  .ps3-day { padding: 8px 6px 10px; min-height: 100px; }
  .ps3-day-num { font-size: 13px; }
  .ps3-day-pill,
  .ps3-day-post-name { font-size: 10.5px; }

  /* Collapsible groups/bundles head */
  .ps3-collapse-head { padding: 12px 14px; }

  /* Group chip add button — tap-friendly */
  .ps3-grp-chip,
  .ps3-grp-add { min-height: 30px; }

  /* Group picker overlay — full width on phone */
  .ps3-grp-picker { width: min(100%, 100vw - 24px); }

  /* Streak grid — fit phone */
  .ps3-streak-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Touch tap-target enforcement */
@media (hover: none) and (pointer: coarse) {
  .ps3-tbtn,
  .ps3-btn,
  .ps3-week-tab,
  .ps3-week-edit,
  .ps3-grp-add,
  .ps3-grp-chip-x,
  .ps3-tpl-chip,
  .ps3-tpl-newbtn,
  .ps3-grp-picker-row { min-height: 36px; }
  .ps3-grp-chip-x { min-width: 36px; }
  /* Pill x button is always visible on touch (hover-only by default) */
  .ps3-restrow,
  .ps3-day-post { min-height: 44px; }
}

/* ────────────────────────────────────────────────────────────────────
   Additional gap-fills — template chips, group picker width
   ──────────────────────────────────────────────────────────────────── */

/* Tablet (≤1024px) — tighten template chip preview row */
@media (max-width: 1024px) {
  .ps3-next-tplrow { gap: 8px; }
  .ps3-tpl-chip { max-width: 200px; }
  .ps3-tpl-chip-name { max-width: 140px; }

  /* Streak grid stays readable */
  .ps3-streak-grid { grid-template-columns: repeat(10, 1fr); max-width: 100%; }
}

/* Phone (≤640px) — finer tweaks */
@media (max-width: 640px) {
  /* Today / streak pills wrap freely */
  .ps3-today,
  .ps3-streak { font-size: 12px; padding: 3px 10px; }

  /* Reminder banner button stays full-width (already declared above; keep) */
  .ps3-rem-banner-title { font-size: 13.5px; }
  .ps3-rem-banner-sub { font-size: 11.5px; }

  /* Template chip preview row — let chips wrap normally */
  .ps3-next-tplrow {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .ps3-tpl-chips { gap: 5px; }
  .ps3-tpl-chip { max-width: none; }
  .ps3-tpl-chip-name { max-width: 100%; }

  /* Group picker overlay sits within the viewport, no broken calc */
  .ps3-grp-picker {
    width: calc(100vw - 24px);
    max-width: 380px;
    left: 12px !important;
  }
  .ps3-grp-picker-name { font-size: 13px; }

  /* Streak grid: 6-col is already declared; tighten cell size */
  .ps3-streak-grid { gap: 3px; max-width: 100%; }
  .ps3-streak-cell { font-size: 9.5px; }

  /* Days strip — let day labels truncate not wrap */
  .ps3-day-name { white-space: nowrap; }

  /* Week tab badge smaller */
  .ps3-week-tab .badge { font-size: 9.5px; padding: 1px 5px; }

  /* Empty state body title size */
  .ps3-empty-title { font-size: 13.5px; }
  .ps3-empty-sub { font-size: 11.5px; }
}
