:root {
  color-scheme: light;
  --paper: #f7f2e9;
  --surface: #fffdf8;
  --ink: #31251c;
  --muted: #706052;
  --line: #e9dfd1;
  --gold: #89602f;
  --gold-dark: #69471f;
  --gold-light: #f3e7d4;
  --sidebar: #2b211b;
  --sidebar-text: #e4d3b9;
  --radius: 13px;
  --shadow: 0 12px 32px #43321c0a;
  --display: Georgia, "Times New Roman", serif;
  --nav-width: 220px;
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(ellipse at 84% 0, #fffaf0 0, transparent 38rem), var(--paper);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, .button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 2px solid #a67739; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
.screen-reader { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--nav-width);
  padding: 32px 20px 22px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(150deg, #36281f, var(--sidebar) 60%);
  color: var(--sidebar-text);
}
.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 11px;
  line-height: 1;
  font: 39px/.92 var(--display);
  letter-spacing: -.05em;
}
.sidebar .brand { margin: 0 8px; color: #fff2dc; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid #a9814d;
  border-radius: 8px 8px 15px 15px;
  color: #b08045;
  font: 23px/1 var(--display);
}
.sidebar .brand-icon { color: #e0b982; border-color: #987145; }
.workspace-name {
  margin: 37px 9px 12px;
  color: #ceae84;
  font: italic 19px/1.15 var(--display);
}
nav { display: grid; gap: 5px; }
nav a {
  display: flex;
  align-items: center;
  padding: 10px 11px;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 13px;
  font-weight: 600;
}
nav a:hover,
nav a[aria-current="page"] {
  background: #ffffff10;
  border-color: #95724e5e;
  color: #fff2dc;
}
nav span { inline-size: 20px; text-align: center; color: #d9b27e; font-size: 17px; line-height: 1; }
.sidebar-bottom { margin-top: auto; padding: 14px 9px 0; border-top: 1px solid #f1d4a930; display: grid; gap: 16px; font-size: 12px; }
.zone { display: grid; gap: 3px; }
.zone span { color: #c6a985; font-size: 11px; }
.zone strong { font-weight: 550; }
.quiet { border: 0; background: transparent; color: inherit; padding: 4px 0; width: max-content; }
.quiet:hover { text-decoration: underline; }

.workspace { margin-left: var(--nav-width); padding: 36px clamp(22px, 3.1vw, 48px) 54px; max-width: 1700px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.top h1 { font: clamp(34px, 4vw, 60px)/1.04 var(--display); letter-spacing: -.048em; text-wrap: balance; }
.top p { margin-top: 10px; color: var(--muted); font-size: 14px; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #e3d6c3;
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.button:hover { background: #f5ebdb; }
.button.primary { border-color: var(--gold-dark); background: var(--gold-dark); color: #fff8ee; }
.button.primary:hover { background: #54381a; }
.top .button { min-height: 45px; padding: 9px 15px; font-size: 13px; }
.top .button span { font-size: 17px; }
.button.square { width: 34px; padding: 0; font-size: 22px; font-weight: 400; }
.card {
  margin-bottom: 17px;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-heading { padding: 17px 19px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-heading h2, .connections h2 { font: 25px/1.1 var(--display); letter-spacing: -.025em; }
#month-label::first-letter { text-transform: uppercase; }
.group { display: flex; align-items: center; gap: 6px; }

.planner-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 23px;
}
.summary-item {
  display: flex;
  gap: 6px;
  flex-direction: column-reverse;
  align-items: flex-start;
  min-width: 0;
  min-height: 97px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffaf2;
  color: var(--ink);
  text-align: left;
}
.summary-item span { color: var(--muted); font-size: 12px; line-height: 1.2; }
.summary-item strong { color: var(--gold-dark); font: 37px/.95 var(--display); font-variant-numeric: lining-nums; }
.summary-item:hover, .summary-item[aria-pressed="true"] { background: var(--gold-light); border-color: #c8ac84; }
.planner-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; row-gap: 10px; margin-bottom: 13px; }
.filter-group { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.filter-group button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 4px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.filter-group button:hover,
.filter-group button[aria-pressed="true"] { background: var(--gold-light); border-color: #dfcaae; color: #5e3e1c; }
.view-filters { background: #f1e8db; border-radius: 7px; padding: 2px; }
.view-filters button[aria-pressed="true"] { background: var(--surface); }
.planner-layout { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(280px, .95fr); gap: 15px; align-items: start; }
.planner-layout.list-only { grid-template-columns: minmax(0, 1fr); }
.month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.weekday {
  padding: 9px 10px;
  border-block: 1px solid var(--line);
  background: #f8f0e4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.day {
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
  min-height: 79px;
  padding: 5px 6px 7px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.day:hover, .day.selected { background: #f6e9d4; }
.day:focus-visible { outline-offset: -3px; }
.day:nth-child(7n) { border-right: 0; }
.day:nth-last-child(-n+7) { border-bottom: 0; }
.day.other { color: #827463; background: #f8f3ea; }
.day.other:hover { background: #f6e9d4; }
.day-num { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 4px; font-size: 12px; font-weight: 650; border-radius: 50%; }
.day.is-today .day-num { background: var(--gold-dark); color: white; }
.day-event {
  display: flex;
  gap: 3px;
  max-width: 100%;
  margin-top: 3px;
  padding: 4px 5px;
  border-radius: 4px;
  background: #f1e7d5;
  color: #654620;
  font-size: 10px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
}
.day-event.instagram { background: #f4e2e3; color: #773c51; }
.day-event.facebook { background: #e4ebf3; color: #375c80; }
.day-event.pinterest { background: #f7e6df; color: #874639; }
.day-event span { overflow: hidden; text-overflow: ellipsis; }
.day-event time { font-weight: 700; }

.queue-card .card-heading { padding-inline: 15px; }
.queue-card .card-heading h2 { overflow-wrap: anywhere; }
.row { display: grid; gap: 6px; align-items: start; padding: 14px 15px; border-top: 1px solid var(--line); font-size: 13px; }
.row h3 { font: 20px/1.17 var(--display); overflow-wrap: anywhere; }
.row .when { color: var(--muted); font-size: 12px; font-weight: 650; }
.row .group { flex-wrap: wrap; margin-top: 4px; }
.row .button { min-height: 30px; padding: 4px 8px; font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.chip { border-radius: 20px; padding: 3px 7px; background: #eee9e3; color: #504644; font-size: 10px; font-weight: 650; }
.chip.published { background: #e3ece0; color: #365b38; }
.chip.scheduled { background: #f4e8d4; color: #65451e; }
.chip.failed, .chip.unknown { background: #fae7e0; color: #873621; }
.chip.processing, .chip.running, .chip.trial { background: #f6ebd0; color: #694f17; }
.row .error-text { margin-top: 7px; color: #873621; overflow-wrap: anywhere; }
.empty, .card-note { padding: 0 19px 17px; color: var(--muted); font-size: 13px; }
.queue-card .empty { padding: 14px 15px 20px; border-top: 1px solid var(--line); }
.list-only .row { grid-template-columns: minmax(100px, .25fr) minmax(140px, 1fr) minmax(0, auto); gap: 15px; }
.list-only .row .group { margin-top: 0; }

.media-toolbar { display: flex; gap: 8px; margin: 0 19px 15px; }
.media-toolbar input { max-width: 320px; }
.media-toolbar select { width: auto; }
.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 13px; padding: 0 19px 19px; }
.asset { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.asset img, .asset video { width: 100%; aspect-ratio: 1.35; object-fit: cover; background: #302720; display: block; }
.asset-name { display: block; padding: 9px 9px 2px; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-name:hover { text-decoration: underline; }
.asset-meta { padding: 0 9px 7px; color: var(--muted); font-size: 11px; }
.asset-actions { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 9px 9px; }
.asset-actions .button { min-height: 29px; padding: 3px 6px; font-size: 11px; }
.media-empty { padding: 3px 0; grid-column: 1 / -1; }
.more-media { margin: 0 19px 19px; }
.connections { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 15px; }
.connections .card { margin: 0; padding: 20px; }
.connections h2 { margin-bottom: 10px; }
.connections p { color: var(--muted); font-size: 14px; margin-bottom: 13px; overflow-wrap: anywhere; }
.connections .group { flex-wrap: wrap; }
.connections input { font-size: 13px; }

.notice { margin: -5px 0 16px; padding: 10px 13px; background: #e6eee0; border-radius: 8px; color: #335536; font-size: 14px; }
.notice.error, .inline-error { background: #fae7e0; color: #873621; padding: 9px 10px; border-radius: 7px; }
.inline-note { color: #694f17; background: #f6ebd0; padding: 9px 10px; border-radius: 7px; font-size: 13px; }
dialog {
  max-height: calc(100dvh - 28px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  width: min(560px, calc(100% - 22px));
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 95px #251a1760;
}
dialog::backdrop { background: #2c1f18a6; }
#composer { width: min(910px, calc(100% - 22px)); }
.dialog-heading, .dialog-footer { padding: 14px 19px; display: flex; align-items: center; gap: 8px; }
.dialog-heading { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-heading h2 { font: 29px/1.1 var(--display); letter-spacing: -.025em; }
.dialog-body, .composer-fields { display: grid; gap: 13px; }
.dialog-body { padding: 16px 19px; }
.dialog-footer { border-top: 1px solid var(--line); justify-content: flex-end; flex-wrap: wrap; }
.composer-layout { grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: start; }
.composer-preview { position: sticky; top: 12px; padding: 14px; border-radius: 9px; background: #f7efe2; }
.composer-preview h3 { font: 22px/1.1 var(--display); }
.preview-networks { margin: 8px 0; }
.preview-networks:empty { display: none; }
.preview-networks button { min-height: 28px; font-size: 11px; }
.preview-card { margin-top: 10px; border: 1px solid #e4d7c5; border-radius: 9px; overflow: hidden; background: var(--surface); }
.preview-identity { padding: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; overflow-wrap: anywhere; }
.preview-identity small { display: block; color: var(--muted); }
#preview-avatar { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold-dark); color: #fff8ee; font: 18px/1 var(--display); }
.preview-media {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 120px;
  background: #eee1ce;
  color: #6b5437;
  font-size: 12px;
  overflow: hidden;
  text-align: center;
}
.preview-media img, .preview-media video { width: 100%; height: 100%; object-fit: contain; background: #2b211b; }
.preview-text { display: grid; gap: 3px; padding: 10px; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.preview-text strong:empty { display: none; }
.preview-text p.placeholder { color: var(--muted); }
label { display: grid; gap: 5px; font-weight: 650; font-size: 13px; min-width: 0; }
input:not([type="checkbox"]), textarea, select {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid #dfd1bd;
  border-radius: 7px;
  background: #fffdfa;
  color: var(--ink);
}
.media-toolbar select { width: auto; }
textarea { min-height: 70px; resize: vertical; }
.hint { color: var(--muted); font-size: 11px; font-weight: 450; }
.file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px; }
fieldset { margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
legend { font-size: 13px; font-weight: 650; }
.target { padding: 6px 5px; }
.target + .target { border-top: 1px solid var(--line); }
.target-toggle { display: flex; align-items: center; gap: 7px; }
.target-toggle input { accent-color: var(--gold-dark); }
.target-fields { display: grid; gap: 8px; margin: 7px 0 4px; }
.caption-count { text-align: end; color: var(--muted); font-size: 11px; font-weight: 500; }
.caption-count.over-limit { color: #873621; font-weight: 650; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: radial-gradient(ellipse at 30% 0%, #fff9ee, #e9d9c3); }
.auth-card { display: grid; gap: 19px; width: min(100%, 455px); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card h1 { font: 34px/1.08 var(--display); letter-spacing: -.035em; }
.auth-card p { color: var(--muted); }
.auth-card form { display: grid; gap: 13px; }

@media (max-width: 1180px) {
  .planner-layout { grid-template-columns: minmax(0, 1fr); }
  .row { grid-template-columns: minmax(100px, .23fr) minmax(135px, 1fr) auto; gap: 13px; }
}
@media (max-width: 820px) {
  .sidebar { position: static; width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; padding: 14px 17px; }
  .sidebar .brand { margin: 0; font-size: 34px; }
  .brand-icon { width: 31px; height: 31px; }
  .workspace-name { display: none; }
  nav { grid-row: 2; grid-column: 1 / -1; display: flex; flex-wrap: wrap; }
  nav a { padding: 6px 9px; }
  .sidebar-bottom { display: flex; margin: 0; padding: 0; border: 0; }
  .zone { display: none; }
  .workspace { margin: 0; padding: 26px 17px 38px; }
}
@media (max-width: 560px) {
  .top { align-items: flex-start; gap: 10px; margin-bottom: 20px; }
  .top h1 { font-size: 35px; }
  .top p { font-size: 12px; }
  .top .button { max-width: 121px; min-height: 36px; padding: 6px 9px; white-space: normal; font-size: 12px; }
  .planner-summary { grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 15px; }
  .summary-item { min-height: 69px; padding: 9px 10px; }
  .summary-item strong { font-size: 28px; }
  .card-heading { padding: 12px; }
  .card-heading h2 { font-size: 21px; }
  .weekday, .day { padding: 4px; }
  .day { min-height: 57px; }
  .day-event { padding: 3px; }
  .day-event span { display: none; }
  .row, .list-only .row { grid-template-columns: 1fr; gap: 5px; padding: 12px; }
  .composer-layout { grid-template-columns: minmax(0, 1fr); }
  .composer-preview { position: static; }
  .file-row { grid-template-columns: minmax(0, 1fr); }
}
