/* HB Creatives: black and gold. Light theme by default, dark via the switch or the device setting. */
:root {
  color-scheme: light;
  --bg: #f2f2f1;
  --surface: #ffffff;
  --surface-2: #f6f6f4;
  --hover: #fafaf8;
  --ink: #111111;
  --ink-2: #47443e;
  --ink-3: #7a766d;
  --ink-4: #b7b2a8;
  --line: #e2e0da;
  --line-strong: rgba(0, 0, 0, .28);
  --gold: #c9a13b;
  --gold-hover: #d8b24f;
  --gold-ink: #6e5414;
  --gold-soft: #f6eed6;
  --on-gold: #0b0b0b;
  --primary-bg: #111111;  --primary-fg: #e6c15a;  --primary-hover: #262626;
  --bar: #0b0b0b;         --bar-ink: #f3efe4;      --bar-muted: #a9a395;
  --draft: #8d8a83;      --draft-bg: #efeeeb;      --draft-ink: #47443e;
  --review: #d08a00;     --review-bg: #fff2d4;     --review-ink: #845800;
  --changes: #cf4438;    --changes-bg: #fde4e1;    --changes-ink: #9f2f26;
  --approved: #1f9d55;   --approved-bg: #dcf3e4;   --approved-ink: #126b3b;
  --client-bg: #f8f1dd;  --client-line: #e7d6a6;
  --out-stripe: #ebeae7;
  --thumb-bg: rgba(255, 255, 255, .7);
  --toast-bg: #111111;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .10);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0b0b0b; --surface: #151515; --surface-2: #1c1c1c; --hover: #191919;
    --ink: #f1eee6; --ink-2: #c8c3b7; --ink-3: #8f8a7f; --ink-4: #57534c;
    --line: #2a2a2a; --line-strong: rgba(255, 255, 255, .3);
    --gold: #d9b24c; --gold-hover: #e8c464; --gold-ink: #f0d68e; --gold-soft: #2a2312; --on-gold: #0b0b0b;
    --primary-bg: #d9b24c; --primary-fg: #0b0b0b; --primary-hover: #e8c464;
    --bar: #000000; --bar-ink: #f3efe4; --bar-muted: #9a9486;
    --draft: #7d7a74; --draft-bg: #222222; --draft-ink: #c8c3b7;
    --review: #e2a52a; --review-bg: #33270c; --review-ink: #f4cb6c;
    --changes: #e5574c; --changes-bg: #391715; --changes-ink: #f59c94;
    --approved: #2fb36a; --approved-bg: #0f2f1d; --approved-ink: #82dca8;
    --client-bg: #231e10; --client-line: #4a3d1a;
    --out-stripe: #121212; --thumb-bg: rgba(0, 0, 0, .35); --toast-bg: #262626;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b0b0b; --surface: #151515; --surface-2: #1c1c1c; --hover: #191919;
  --ink: #f1eee6; --ink-2: #c8c3b7; --ink-3: #8f8a7f; --ink-4: #57534c;
  --line: #2a2a2a; --line-strong: rgba(255, 255, 255, .3);
  --gold: #d9b24c; --gold-hover: #e8c464; --gold-ink: #f0d68e; --gold-soft: #2a2312; --on-gold: #0b0b0b;
  --primary-bg: #d9b24c; --primary-fg: #0b0b0b; --primary-hover: #e8c464;
  --bar: #000000; --bar-ink: #f3efe4; --bar-muted: #9a9486;
  --draft: #7d7a74; --draft-bg: #222222; --draft-ink: #c8c3b7;
  --review: #e2a52a; --review-bg: #33270c; --review-ink: #f4cb6c;
  --changes: #e5574c; --changes-bg: #391715; --changes-ink: #f59c94;
  --approved: #2fb36a; --approved-bg: #0f2f1d; --approved-ink: #82dca8;
  --client-bg: #231e10; --client-line: #4a3d1a;
  --out-stripe: #121212; --thumb-bg: rgba(0, 0, 0, .35); --toast-bg: #262626;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 24px; background: var(--bar); color: var(--bar-ink); border-bottom: 1px solid rgba(217, 178, 76, .35);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px;
  background: linear-gradient(135deg, #e8c766, #b88a24); color: #0b0b0b; font-size: 13px; letter-spacing: -.02em;
}
.topbar nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.topbar nav a { text-decoration: none; padding: 6px 12px; border-radius: var(--radius-sm); color: var(--bar-muted); }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: #e6c15a; background: rgba(255,255,255,.07); }
.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(217, 178, 76, .45);
  background: transparent; color: #e6c15a; cursor: pointer; padding: 0; margin-left: 6px;
}
.theme-toggle:hover { background: rgba(217, 178, 76, .14); }
.theme-toggle svg { width: 17px; height: 17px; }
.review-head .theme-toggle { margin-left: auto; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 6px; }
.crumbs a { text-decoration: none; color: var(--ink-2); }
.crumbs a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- buttons & fields ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn-gold:hover { background: var(--gold-hover); border-color: var(--gold-hover); }
.btn-approve { background: var(--approved); border-color: var(--approved); color: #fff; }
.btn-approve:hover { background: #188547; }
.btn-danger { color: var(--changes); }
.btn-danger:hover { border-color: var(--changes); background: var(--changes-bg); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
textarea.input { resize: vertical; min-height: 90px; line-height: 1.45; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 20px; }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-2); }
.empty h2 { margin-bottom: 6px; }
.empty p { margin: 0 0 18px; }

/* ---------- status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--draft-bg); color: var(--draft-ink);
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--draft); }
.pill.review { background: var(--review-bg); color: var(--review-ink); } .pill.review::before { background: var(--review); }
.pill.changes { background: var(--changes-bg); color: var(--changes-ink); } .pill.changes::before { background: var(--changes); }
.pill.approved { background: var(--approved-bg); color: var(--approved-ink); } .pill.approved::before { background: var(--approved); }
.pill.hiatus { background: var(--gold-soft); color: var(--gold-ink); } .pill.hiatus::before { background: var(--gold); }
.pill.plain::before { display: none; }

/* ---------- home ---------- */
.home-hero { padding: 36px 0 26px; }
.home-hero h1 { font-size: 40px; max-width: 18ch; }
.home-hero p { color: var(--ink-2); max-width: 52ch; margin: 10px 0 0; font-size: 16px; }
.home-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.home-card {
  display: grid; gap: 6px; padding: 26px; text-align: left; cursor: pointer; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, transform .15s;
}
.home-card:hover { border-color: var(--gold); transform: translateY(-1px); }
.home-card .icon { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); margin-bottom: 8px; }
.home-card .icon svg { width: 22px; height: 22px; }
.home-card strong { font-family: var(--font-display); font-size: 20px; }
.home-card span { color: var(--ink-2); }

/* ---------- client list ---------- */
.client-table { width: 100%; border-collapse: collapse; }
.client-table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.client-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.client-table tr:last-child td { border-bottom: 0; }
.client-table tbody tr { cursor: pointer; }
.client-table tbody tr:hover td { background: var(--surface-2); }
.client-name { font-weight: 650; }
.stat-line { display: flex; gap: 6px; flex-wrap: wrap; }

/* home: active clients as a scrolling list */
.clist { display: grid; gap: 8px; }
.crow {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; gap: 14px; align-items: center;
  padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s;
}
.crow:hover { border-color: var(--gold); background: var(--hover); }
.crow.hiatus { border-left-color: var(--ink-4); }
.c-avatar { width: 44px; height: 44px; border-radius: 50%; background: #0b0b0b; color: #e6c15a; border: 1px solid rgba(217,178,76,.5); display: grid; place-items: center; font-weight: 700; font-size: 14px; font-family: var(--font-display); }
.crow.hiatus .c-avatar { color: var(--bar-muted); border-color: var(--line); }
.c-name { font-family: var(--font-display); font-weight: 650; font-size: 17px; margin-bottom: 5px; }
.c-actions { display: flex; gap: 6px; }
@media (max-width: 720px) {
  .crow { grid-template-columns: 40px minmax(0, 1fr); gap: 10px 12px; padding: 12px; }
  .c-avatar { width: 40px; height: 40px; }
  .c-meta { display: none; }
  .c-actions { grid-column: 1 / -1; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { .crow { transition: none; } }

/* ---------- client page: calendars ---------- */
.cal-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.cal-card {
  display: grid; gap: 10px; padding: 18px; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.cal-card:hover { border-color: var(--gold); }
.cal-card .dates { color: var(--ink-3); font-size: 13px; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar .a { background: var(--approved); } .bar .r { background: var(--review); } .bar .c { background: var(--changes); } .bar .d { background: var(--draft); }

.link-box { display: flex; gap: 8px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 22px; flex-wrap: wrap; }
.link-box code { flex: 1; min-width: 200px; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }

/* ---------- calendar grid (the centerpiece) ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.legend { display: flex; gap: 6px; flex-wrap: wrap; }
.grid-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.month-label { padding: 14px 16px 10px; font-family: var(--font-display); font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); background: var(--surface); }
.month-label:first-child { border-top: 0; }
.weekdays, .week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays div { padding: 8px 10px; font-size: 12px; font-weight: 650; color: var(--ink-3); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.day {
  position: relative; min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 5px; background: var(--surface);
}
.week .day:nth-child(7) { border-right: 0; }
.day.out { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--out-stripe) 6px 12px); }
.day.out .num { color: var(--ink-4); }
.day .num { font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 1px 4px; align-self: flex-start; border-radius: 5px; }
.day.today .num { background: var(--gold); color: var(--on-gold); }
.day.can-add { cursor: pointer; }
.day.can-add:hover { background: var(--hover); }
.day .add {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 6px; border: 1px dashed var(--ink-3);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s;
  font-size: 16px; line-height: 1; padding: 0;
}
.day.can-add:hover .add, .day .add:focus-visible { opacity: 1; }

.tile {
  display: grid; grid-template-columns: 34px 1fr; gap: 7px; align-items: center; text-align: left; width: 100%;
  padding: 5px; border-radius: 7px; border: 1px solid transparent; cursor: pointer;
  background: var(--draft-bg); border-left: 4px solid var(--draft);
}
.tile.review { background: var(--review-bg); border-left-color: var(--review); }
.tile.changes { background: var(--changes-bg); border-left-color: var(--changes); }
.tile.approved { background: var(--approved-bg); border-left-color: var(--approved); }
.tile:hover { border-color: var(--line-strong); border-left-color: inherit; }
.tile .thumb {
  width: 34px; height: 34px; border-radius: 5px; background: var(--thumb-bg) center/cover no-repeat;
  display: grid; place-items: center; color: var(--ink-3); overflow: hidden;
}
.tile .thumb svg { width: 16px; height: 16px; }
.tile .t-title { font-size: 12.5px; font-weight: 650; line-height: 1.2; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tile .t-meta { font-size: 11px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.tile .t-flag { color: var(--changes); font-weight: 700; }

/* drag to move, delete from the grid */
.tile-wrap { position: relative; }
.tile-wrap[draggable="true"] .tile { cursor: grab; }
.tile-wrap.dragging { opacity: .4; }
.tile-del {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--changes); font-size: 14px; line-height: 18px; padding: 0; cursor: pointer;
  opacity: 0; transition: opacity .12s; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 2;
}
.tile-wrap:hover .tile-del, .tile-del:focus-visible { opacity: 1; }
.tile-del:hover { background: var(--changes); color: #fff; border-color: var(--changes); }
@media (hover: none) { .tile-del { opacity: 1; } }
.is-dragging .day:not(.out) { background: var(--hover); }
.day.drop-here { background: var(--gold-soft) !important; box-shadow: inset 0 0 0 2px var(--gold); }

/* comments tied to one file */
.ftag { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 1px 7px 1px 2px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 650; }
.ftag-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3) center/cover no-repeat; }
.strip .s .ccount { position: absolute; right: 2px; bottom: 2px; background: var(--changes); color: #fff; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 4px; line-height: 16px; }

/* client review: tabs and per-file comment boxes */
.mtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.mtab { border: 0; background: none; padding: 8px 12px; font-weight: 650; font-size: 14px; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mtab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.mtab .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-left: 6px; vertical-align: middle; }
.fc { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.fc:first-of-type { border-top: 0; }
.fc-thumb { width: 64px; height: 64px; border-radius: 7px; border: 0; padding: 0; background: #10161f center/cover no-repeat; cursor: zoom-in; color: #c3cad4; font-size: 11px; position: relative; }
.fc-thumb .num { position: absolute; left: 3px; top: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: rgba(255,255,255,.92); color: #111; font-size: 11px; font-weight: 700; line-height: 17px; }
.fc h4 { margin: 0 0 4px; font-size: 13px; }
.fc .comments { margin: 0 0 6px; gap: 6px; }
.fc .comment { padding: 6px 9px; font-size: 13px; }
.fc textarea.input { min-height: 40px; font-size: 14px; }
.fc-row { display: flex; gap: 6px; align-items: flex-start; }
.fc-row .btn { flex: none; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 20px; z-index: 50;
  animation: fade .15s ease-out;
}
.modal {
  width: min(1040px, 100%); max-height: calc(100vh - 40px); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; animation: rise .18s ease-out;
}
.modal.narrow { width: min(460px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; font-size: 18px; }
.modal-body { overflow: auto; padding: 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .modal-back, .modal { animation: none; } .home-card { transition: none; } }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; }
.media-main {
  background: #10161f; border-radius: var(--radius); aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; position: relative;
}
.media-main img, .media-main video { width: 100%; height: 100%; object-fit: contain; display: block; }
.media-main .none { color: #8f9bab; text-align: center; padding: 20px; }
.media-main .nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.88); cursor: pointer; display: grid; place-items: center; font-size: 18px;
}
.media-main .nav-btn.prev { left: 10px; } .media-main .nav-btn.next { right: 10px; }
.media-main .count { position: absolute; bottom: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 99px; }
.strip { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.strip .s {
  position: relative; width: 62px; height: 62px; border-radius: 7px; border: 2px solid transparent; background: var(--surface-2) center/cover no-repeat;
  cursor: pointer; padding: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 11px; overflow: hidden;
}
.strip .s.on { border-color: var(--gold); }
.strip .s .x {
  position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: rgba(20,28,40,.75); color: #fff;
  font-size: 12px; line-height: 18px; cursor: pointer; padding: 0;
}
.drop {
  width: 62px; height: 62px; border-radius: 7px; border: 1.5px dashed var(--ink-3); display: grid; place-items: center; cursor: pointer;
  color: var(--ink-2); font-size: 22px; background: var(--surface);
}
.drop.over { border-color: var(--gold); background: var(--gold-soft); }
.upload-status { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.progress { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 4px; }
.progress i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .1s; }

.caption-view { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.55; background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; max-height: 320px; overflow: auto; }
.note-box { background: var(--gold-soft); color: var(--gold-ink); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; white-space: pre-wrap; }

.comments { display: grid; gap: 10px; margin: 10px 0 12px; }
.comment { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 14px; }
.comment.client { background: var(--client-bg); }
.comment .who { font-size: 12px; font-weight: 650; color: var(--ink-3); margin-bottom: 2px; display: flex; gap: 6px; align-items: center; }
.comment .body { white-space: pre-wrap; word-break: break-word; }
.new-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--changes); display: inline-block; }

.section-title { font-size: 13px; font-weight: 650; color: var(--ink-3); margin: 18px 0 6px; }
.section-title:first-child { margin-top: 0; }

/* ---------- feed-style post preview ---------- */
.pv { display: grid; justify-items: center; }
.pv-label { font-size: 13px; font-weight: 650; color: var(--ink-3); margin-bottom: 8px; }
.pv-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pv-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px 8px; }
.pv-head strong { display: block; font-size: 14px; line-height: 1.2; }
.pv-sub { display: block; font-size: 12px; color: var(--ink-3); }
.pv-avatar { flex: none; width: 38px; height: 38px; border-radius: 50%; background: #0b0b0b; color: #e6c15a; border: 1px solid rgba(217,178,76,.5); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.pv-avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.pv-caption { margin: 0 14px 10px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.pv-caption.clamp { max-height: calc(1.45em * 4); overflow: hidden; }
.pv-seemore { border: 0; background: none; padding: 0 14px 10px; margin-top: -6px; color: var(--ink-3); font-weight: 650; font-size: 13px; cursor: pointer; }
.pv-grid { display: grid; gap: 2px; background: var(--surface); aspect-ratio: 1 / 1; }
.pv-grid.n0 { aspect-ratio: 4 / 3; background: var(--surface-2); }
.pv-grid.n1 { aspect-ratio: auto; }
.pv-grid.n1 .pv-cell { max-height: 550px; }
.pv-grid.n1 .pv-cell img, .pv-grid.n1 .pv-cell video { height: auto; max-height: 550px; }
.pv-grid.n2 { grid-template-columns: 1fr 1fr; }
.pv-grid.n3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-grid.n3 .pv-cell:first-child { grid-column: span 2; }
.pv-grid.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.pv-grid.n5 { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1fr 1fr; }
.pv-grid.n5 .pv-cell:nth-child(-n+2) { grid-column: span 3; }
.pv-grid.n5 .pv-cell:nth-child(n+3) { grid-column: span 2; }
.pv-cell { position: relative; border: 0; padding: 0; margin: 0; background: #10161f; cursor: zoom-in; overflow: hidden; min-height: 0; min-width: 0; display: block; }
.pv-cell img, .pv-cell video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-cell .play { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 16px; }
.pv-plus { position: absolute; inset: 0; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-size: 30px; font-weight: 700; }
.file-cell { display: grid; place-items: center; gap: 6px; height: 100%; color: #c3cad4; font-size: 12px; padding: 8px; }
.file-cell svg { width: 26px; height: 26px; }
.pv-empty { display: grid; place-items: center; height: 100%; min-height: 160px; color: var(--ink-3); font-size: 14px; }
.pv-phone { position: relative; width: 100%; max-width: 300px; aspect-ratio: 9 / 16; background: #10161f; border-radius: 18px; overflow: hidden; border: 6px solid #000; box-shadow: 0 0 0 1px rgba(217,178,76,.35); }
.pv-phone img, .pv-phone video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-phone img { cursor: zoom-in; }
.pv-phone .pv-empty { color: #8f9bab; }
.pv-overlay { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: 13px; text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.pv-reel-cap { position: absolute; left: 12px; right: 12px; bottom: 88px; color: #fff; font-size: 13px; line-height: 1.35; text-shadow: 0 1px 3px rgba(0,0,0,.8); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; pointer-events: none; }
.pv-more { margin-top: 8px; }
.pv-more { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.modal.viewer { width: min(900px, 100%); }
.modal.viewer .media-main { aspect-ratio: auto; height: min(70vh, 720px); }

.strip .s .ord { position: absolute; left: 3px; top: 3px; min-width: 17px; height: 17px; border-radius: 9px; background: rgba(255,255,255,.92); color: #111; font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; }
.strip .s .mv { position: absolute; left: 2px; bottom: 2px; width: 20px; height: 18px; border-radius: 4px; border: 0; background: rgba(20,28,40,.75); color: #fff; font-size: 13px; line-height: 18px; cursor: pointer; padding: 0; }
.strip .s { cursor: default; }

.edit-banner { background: var(--client-bg); border: 1px solid var(--client-line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 14px; margin-bottom: 8px; }
.edit-banner .btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.edit-banner details { margin-top: 6px; font-size: 13px; }
.edit-banner details div { white-space: pre-wrap; background: var(--surface); border-radius: 5px; padding: 8px; margin-top: 4px; max-height: 160px; overflow: auto; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--toast-bg); color: #fff; padding: 10px 16px; border-left: 3px solid var(--gold);
  border-radius: 8px; font-size: 14px; box-shadow: var(--shadow); z-index: 80; max-width: calc(100vw - 32px);
}
.toast.error { background: var(--changes); }

/* ---------- review page ---------- */
.review-head { background: var(--bar); color: var(--bar-ink); padding: 26px 0 22px; border-bottom: 1px solid rgba(217, 178, 76, .35); }
.review-head .inner { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 720px) { .review-head .inner { padding: 0 16px; } }
.review-head .from { color: var(--bar-muted); font-size: 14px; display: flex; align-items: center; gap: 6px; }
.review-head h1 { font-size: 32px; margin-top: 4px; color: #e6c15a; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.tab[aria-selected="true"] { background: var(--primary-bg); color: var(--primary-fg); border-color: var(--primary-bg); }
.how { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); margin: 0 0 16px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .entry-layout { grid-template-columns: 1fr; }
  .media-main { aspect-ratio: 1 / 1; }
}
@media (max-width: 720px) {
  .wrap { padding: 20px 16px 48px; }
  .topbar { padding: 12px 16px; }
  .home-hero h1 { font-size: 30px; }
  .home-actions { grid-template-columns: 1fr; }
  .client-table .hide-sm { display: none; }
  /* calendar becomes an agenda list: only days that are in range */
  .weekdays { display: none; }
  .week { display: block; }
  .day { min-height: 0; border-right: 0; flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .day.out { display: none; }
  .day .num { width: 70px; flex: none; }
  .day .num::after { content: attr(data-dow); display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
  .day .tile-wrap { flex: 1 1 200px; }
  .day .add { opacity: 1; position: static; margin-left: auto; order: 3; }
  .day:not(.can-add):not(:has(.tile)) { display: none; } /* client view on phone: only days with posts */
  .modal-back { padding: 0; }
  .modal { max-height: 100vh; height: 100%; border-radius: 0; }
  .row { flex-direction: column; gap: 0; }
}
