:root {
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px; font-synthesis: none; color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .55; cursor: wait; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 14px; font-weight: 600; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 600; }
p { line-height: 1.6; }
svg { width: 18px; height: 18px; flex-shrink: 0; vertical-align: middle; }
.muted, .small { color: var(--muted); }
.small { font-size: 11px; line-height: 1.6; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.primary, .secondary, .quiet, .icon-button, .text-button, .publish-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 32px; padding: 7px 12px; border: 0; border-radius: 6px; font-weight: 500;
}
.primary { background: var(--brand); color: #fff; }
.primary:hover { filter: brightness(1.1); }
.secondary { background: var(--button); color: var(--ink); }
.secondary:hover, .icon-button:hover, .quiet:hover { background: var(--hover); }
.quiet, .icon-button { background: transparent; color: var(--muted); }
.icon-button { min-width: 32px; padding: 4px; font-size: 22px; }
.text-button { background: transparent; color: var(--brand); }
.publish-button { color: #fff; background: #209e54; }
.publish-button:hover { background: #188b47; }
.danger, .error { color: var(--red); }
label { display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea, select {
  width: 100%; min-width: 0; min-height: 34px; padding: 8px 10px;
  color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 5px;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
textarea { resize: vertical; line-height: 1.6; }
.workspace {
  display: grid; grid-template-columns: 54px 196px minmax(0, 1fr) 255px;
  grid-template-rows: 56px minmax(0, 1fr); height: 100dvh; overflow: hidden;
}
.project-rail { grid-column: 1; grid-row: 1 / 3; display: flex; align-items: center; flex-direction: column; gap: 15px; padding: 12px 7px; background: var(--paper); border-right: 1px solid var(--line); z-index: 5; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 7px; color: #fff; background: var(--brand); font-size: 26px; font-weight: 750; padding-bottom: 4px; text-decoration: none; }
.project-avatar, .user-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #f4c5d2; color: #754759; font-size: 11px; font-weight: 600; }
.project-rail > .project-avatar { outline: 2px solid var(--brand); outline-offset: 3px; }
.project-rail .theme-toggle { margin-top: auto; padding: 4px; width: 32px; }
.user-avatar { background: #f3d4df; margin-left: 8px; }
.sidebar { grid-column: 2; grid-row: 1 / 3; background: var(--paper); display: flex; flex-direction: column; min-width: 0; overflow-y: auto; border-right: 1px solid var(--line); }
.workspace-label { display: flex; gap: 10px; align-items: center; min-height: 56px; padding: 12px 13px; }
.workspace-label small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
nav { padding: 10px 10px; }
.nav-item { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 40px; padding: 8px 10px; text-align: left; border: 0; border-radius: 7px; background: transparent; color: var(--ink); }
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--nav-active); }
.content-subnav { padding: 3px 0 9px 10px; }
.sub-item { padding-left: 10px; font-size: 10.5px; min-height: 28px; }
.count { margin-left: auto; color: var(--muted); font-size: 10px; }
.nav-divider { display: block; height: 1px; background: var(--line); margin: 10px; }
.sidebar-bottom { margin-top: auto; padding: 16px 15px; color: var(--muted); }
.sidebar-bottom p { font-size: 10px; margin: 7px 0 14px; }
.sidebar-bottom button { padding: 5px 0; font-size: 11px; }
.health { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.health i, .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); display: inline-block; flex-shrink: 0; }
.health.ok i { background: var(--green); }
.health.off i { background: var(--red); }
.page-header { grid-column: 3 / 5; grid-row: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--paper); min-width: 0; }
.date-navigation, .header-actions, .header-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
.date-navigation { gap: 2px; }
.date-navigation h1 { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions, .header-right { flex-shrink: 0; }
#view-mode { width: auto; min-width: 76px; background: transparent; border: 0; }
#calendar-toggle { display: none; }
main { grid-column: 3; grid-row: 2; min-width: 0; overflow: auto; display: flex; flex-direction: column; background: var(--bg); }
#content { min-width: 0; flex: 1; }
.main-footer { display: flex; justify-content: space-between; gap: 10px; padding: 20px; font-size: 9px; color: var(--muted); }
.notice { padding: 13px 16px; background: var(--raised); border-radius: 5px; line-height: 1.7; color: var(--muted); }
.notice.warning { margin: 16px 20px 0; background: var(--warning-bg); color: var(--amber); font-size: 11px; }
.calendar-panel { grid-column: 4; grid-row: 2; background: var(--paper); border-left: 1px solid var(--line); padding: 8px 20px; overflow-y: auto; }
.calendar-panel-heading { display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 0 0 16px; }
.calendar-panel-heading button { margin-left: auto; }
.calendar-panel-footer { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; text-align: center; }
.mini-heading { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-bottom: 8px; }
.mini-heading strong { order: 1; padding: 8px 12px; border-radius: 7px; background: var(--raised); font-size: 12px; font-weight: 400; text-transform: capitalize; }
.mini-heading button:last-child { order: 2; }
.mini-heading .icon-button { min-width: 25px; }
.mini-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 2px; }
.mini-weekday { text-align: center; padding: 7px 0; color: var(--muted); font-size: 10px; }
.mini-day { position: relative; border: 1px solid transparent; border-radius: 4px; height: 30px; padding: 0; background: var(--raised); font-size: 11px; }
.mini-day:hover { background: var(--hover); }
.mini-day.outside { opacity: .35; }
.mini-day.today { background: var(--brand); color: #fff; }
.mini-day.selected { border-color: var(--brand); }
.mini-dots { position: absolute; bottom: 2px; left: 0; right: 0; display: flex; gap: 2px; justify-content: center; }
.mini-dots i { width: 3px; height: 3px; border-radius: 50%; background: var(--amber); }
.mini-dots .published, .status-dot.published { background: var(--green); }
.mini-dots .failed { background: var(--red); }
.status-dot.draft { background: var(--muted); }
.filter-bar { display: flex; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.filter-bar > * { flex: 1; }
.empty { text-align: center; padding: calc(10.5 * var(--ui)) var(--ui) var(--ui); color: var(--muted); }
.empty > svg { width: calc(2.625 * var(--ui)); height: calc(2.625 * var(--ui)); margin-bottom: calc(.75 * var(--ui)); color: #97a3af; }
.empty h3 { color: var(--ink); font-size: calc(1.125 * var(--ui)); font-weight: 700; margin-bottom: calc(.5 * var(--ui)); }
.empty p { max-width: 420px; margin: 8px auto; }
.empty .text-button { padding: 3px 8px; }
.calendar { width: 100%; }
.weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
.weekdays { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.weekdays > div { padding: 14px 12px; }
.day { min-width: 0; min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px; }
.day:nth-child(7n) { border-right: 0; }
.day.muted-day .day-number { opacity: .4; }
.day-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.day-number, .day-add { border: 0; padding: 0; width: 26px; height: 26px; border-radius: 4px; background: transparent; font-size: 11px; }
.day-add { color: var(--muted); font-size: 18px; opacity: 0; }
.day:hover .day-add, .day:focus-within .day-add { opacity: 1; }
.day-add:hover { background: var(--hover); }
.today .day-number { background: var(--brand); color: #fff; }
.week-view .day { min-height: calc(100dvh - 170px); }
.post-card { display: block; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 6px; text-align: left; background: var(--raised); overflow: hidden; margin-bottom: 12px; }
.post-card:hover { border-color: var(--brand); }
.post-card-head, .post-card-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; color: var(--muted); }
.post-card-head { margin-bottom: 12px; }
.post-networks { display: flex; gap: 3px; }
.post-card .network-mark { width: 22px; height: 22px; font-size: 8px; }
.post-card strong { display: block; font-size: 13px; margin-bottom: 6px; }
.post-card-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.post-card-foot { margin-top: 14px; font-size: 10px; flex-wrap: wrap; }
.post-card-media img { display: block; width: 100%; max-height: 260px; object-fit: cover; margin-top: 12px; border-radius: 4px; }
.post-card.compact { padding: 7px; font-size: 10px; }
.compact .post-card-head { margin-bottom: 5px; }
.compact .post-card-text { -webkit-line-clamp: 3; }
.compact .post-card-foot { margin-top: 8px; }
.compact .post-card-foot small, .compact .post-networks { display: none; }
.compact strong { font-size: 11px; }
.post-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); gap: 16px; padding: 24px; align-items: start; }
.day-posts { max-width: 660px; padding: 24px; margin: auto; }
.board { display: flex; align-items: flex-start; gap: 24px; padding: 20px 24px; overflow-x: auto; min-height: 100%; }
.board-column { flex: 1; min-width: 240px; max-width: 420px; }
.board-column h2 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; margin: 0 0 18px; }
.board-column h2 span { margin-left: auto; color: var(--muted); font-size: 10px; }
.badge { display: inline-block; font-size: 10px; padding: 3px 6px; border-radius: 4px; color: var(--muted); background: var(--button); }
.badge.scheduled, .badge.queued, .badge.retry, .badge.sending { color: var(--amber); background: var(--warning-bg); }
.badge.published { color: var(--green); background: var(--green-soft); }
.badge.failed, .badge.uncertain, .badge.partial { color: var(--red); background: var(--red-soft); }
.network-mark { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; font-size: 10px; font-weight: 700; color: white; background: #647082; }
.network-mark.vk { background: #0077ff; }
.network-mark.telegram, .network-mark.telegram_chat { background: #229ed9; }
.network-mark.discord { background: #5865f2; }
.accounts-page { padding: 32px; max-width: 1000px; }
.accounts-page > p { margin: 12px 0 22px; }
.account-list { margin-top: 24px; }
.account-row { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 17px 0; }
.account-info { min-width: 0; flex: 1; }
.account-info h3 { font-size: 13px; margin-bottom: 4px; }
.account-info p { font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; cursor: pointer; padding: 10px; }
.account-menu > div { position: absolute; z-index: 2; right: 0; width: 170px; padding: 6px; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px #0002; }
.account-menu button { width: 100%; justify-content: flex-start; }
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin: 32px; }
.stat { padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; }
.stat span { color: var(--muted); }
.stat strong { display: block; font-size: 25px; margin-top: 12px; }
.home-intro { padding: 0 32px 32px; }
.home-intro p { margin: 12px 0 20px; color: var(--muted); }
.home-intro button { margin-right: 10px; }
.help-section { padding: 32px; max-width: 900px; }
.help-section h3 { margin: 22px 0 10px; font-size: 14px; }
.help-section h3:first-child { margin-top: 0; }
.help-section p, .help-section li { color: var(--muted); line-height: 1.8; }
.help-section ul { padding-left: 18px; }
.workspace[data-view=home] main, .workspace[data-view=accounts] main, .workspace[data-view=help] main { grid-column: 3 / 5; }
.workspace[data-view=home] .calendar-panel, .workspace[data-view=accounts] .calendar-panel, .workspace[data-view=help] .calendar-panel { display: none; }
.workspace.collapsed-menu { grid-template-columns: 54px 0 minmax(0,1fr) 255px; }
.collapsed-menu .sidebar { visibility: hidden; }
dialog { padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--ink); max-height: 92dvh; max-width: calc(100vw - 24px); box-shadow: 0 12px 50px #0004; }
dialog::backdrop { background: #0007; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { font-size: 16px; }
.dialog-footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--paper); }
.editor-dialog, .provider-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.editor-dialog > form { min-height: 100%; }
.editor-dialog .dialog-header, .provider-dialog .dialog-header { height: 56px; padding: 10px 20px; background: var(--paper); }
.editor-identity { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.editor-identity h2 { font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.editor-grid { display: grid; grid-template-columns: minmax(0,3fr) minmax(0,2fr); min-height: calc(100dvh - 56px); }
.editor-fields { padding: 24px; min-width: 0; }
.composer-card { background: var(--raised); border-radius: 6px; padding: 12px; }
.post-type { display: inline-flex; align-items: center; gap: 4px; background: var(--brand); color: #fff; border-radius: 4px; padding: 3px 8px; font-size: 11px; margin-bottom: 14px; }
.post-type svg { width: 13px; height: 13px; }
fieldset { border: 0; padding: 0; margin: 0; }
.account-picker { display: inline-flex; flex-wrap: wrap; gap: 7px; }
.account-picker > p { padding: 0 0 10px; font-size: 11px; }
.account-choice { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; background: var(--button); border: 1px solid transparent; font-size: 10px; cursor: pointer; }
.account-choice:has(input:checked) { border-color: var(--brand); }
.account-choice .network-mark { width: 20px; height: 20px; font-size: 7px; }
.account-choice input { width: 11px; height: 11px; margin: 0; }
.select-all { display: inline-flex; flex-direction: row; align-items: center; gap: 5px; font-size: 10px; margin: 10px; }
#post-text { display: block; background: transparent; border: 0; min-height: 130px; margin: 8px 0; padding: 8px 0; font-size: 13px; resize: vertical; }
#post-text:focus-visible { outline-offset: 6px; }
.composer-tools { display: flex; justify-content: space-between; align-items: center; color: var(--muted); padding-top: 6px; }
.upload-label { position: relative; display: inline-flex; flex-direction: row; align-items: center; cursor: pointer; font-size: 10px; font-weight: 400; min-height: 28px; }
.upload-label input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-label:focus-within { outline: 2px solid var(--brand); outline-offset: 3px; }
#char-count { font-size: 10px; }
.editor-fields > details { margin: 18px 0; }
.editor-fields summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.editor-fields details label { margin-top: 14px; }
.editor-fields details p { margin-top: 12px; }
.editor-actions { display: flex; align-items: center; gap: 8px; margin-top: 24px; flex-wrap: wrap; }
.action-spacer { flex: 1; }
#scheduled-summary { margin-top: 12px; }
.media-list { display: flex; flex-wrap: wrap; gap: 8px; }
.media-item { position: relative; width: 90px; height: 80px; overflow: hidden; border-radius: 5px; }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item button { position: absolute; top: 2px; right: 2px; width: 25px; height: 25px; border-radius: 50%; border: 0; background: var(--paper); font-size: 18px; }
.preview-pane { background: var(--paper); border-left: 1px solid var(--line); padding: 24px; min-width: 0; }
.network-preview { max-width: 480px; margin: 0 auto 24px; }
.preview-network { display: inline-block; color: #fff; background: var(--brand); border-radius: 4px; padding: 4px 8px; margin-bottom: 10px; font-size: 10px; }
.post-preview { border: 1px solid var(--line); background: var(--raised); border-radius: 6px; overflow: hidden; }
.preview-author { display: flex; align-items: center; gap: 10px; padding: 15px; }
.preview-author strong { font-size: 12px; }
.preview-author small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.preview-text { padding: 0 15px 16px; min-height: 60px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-text:empty::after { content: "Здесь появится текст публикации"; color: var(--muted); }
.preview-media img, .preview-media video { display: block; max-height: 360px; width: 100%; object-fit: contain; }
.preview-disclaimer { text-align: center; }
.preview-hidden .preview-pane { display: none; }
.preview-hidden .editor-grid { grid-template-columns: minmax(0,1fr); }
.preview-hidden .editor-fields { width: 100%; max-width: 900px; margin: auto; }
.planning-dialog { width: 590px; }
.planning-grid { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 28px; padding: 24px; }
.planning-grid .mini-day { height: 33px; }
.radio-label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-top: 18px; font-weight: 400; }
.provider-list { max-width: 640px; padding: 40px 24px; margin: 0 auto; }
.provider-list h2 { margin-bottom: 28px; }
.provider-option { display: flex; align-items: center; gap: 14px; padding: 12px 16px; width: 100%; margin-bottom: 12px; border: 1px solid transparent; border-radius: 6px; background: var(--raised); }
.provider-option:hover { border-color: var(--brand); }
.provider-option span:last-child { color: var(--brand); margin-left: auto; }
.connection-dialog { width: 520px; }
.connection-fields, #details-body { padding: 24px; }
.connection-fields label { margin-bottom: 18px; }
.connection-fields .notice { font-size: 11px; }
.error { font-size: 12px; line-height: 1.6; margin-top: 12px; }
.error:empty { display: none; }
.details-dialog { width: 700px; }
.detail-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 20px 0; line-height: 1.8; font-size: 13px; }
.delivery { padding: 16px 0; border-top: 1px solid var(--line); }
.delivery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.delivery p { color: var(--muted); margin-top: 8px; font-size: 11px; }
.delivery .error { color: var(--red); }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.attempt { padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.8; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: 420px; padding: 14px 20px; background: var(--ink); color: var(--bg); border-radius: 6px; box-shadow: 0 4px 20px #0003; z-index: 20; }
.login-screen { position: relative; min-height: 100dvh; display: grid; grid-template-columns: 1fr 1fr; }
.login-intro { display: flex; flex-direction: column; justify-content: space-between; background: var(--paper); padding: 50px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 22px; color: var(--ink); }
.login-intro h1 { font-size: clamp(32px,4vw,60px); line-height: 1.2; margin: 20px 0 24px; }
.login-intro p { color: var(--muted); font-size: 14px; }
.login-form { width: 360px; max-width: calc(100% - 48px); align-self: center; justify-self: center; }
.login-form > .brand-mark { margin-bottom: 24px; }
.login-form h2 { font-size: 25px; margin-bottom: 12px; }
.login-form label { margin-top: 24px; }
.login-form .primary { width: 100%; margin: 20px 0; }
.login-form .small { text-align: center; }
@media (max-width: 1100px) {
  .page-header { padding: 0 12px; }
  .date-navigation h1 { font-size: 12px; }
  .header-actions { gap: 5px; }
  .user-avatar { display: none; }
  .day { min-height: 86px; padding: 5px; }
  .compact .badge { font-size: 8px; padding: 2px; }
}
@media (max-width: 900px) {
  .workspace, .workspace.collapsed-menu { grid-template-columns: 54px 0 minmax(0,1fr) 0; }
  .sidebar { display: none; }
  .mobile-menu .sidebar { display: flex; visibility: visible; position: fixed; top: 0; bottom: 0; left: 54px; width: 196px; z-index: 4; box-shadow: 8px 0 25px #0003; }
  .calendar-panel { display: none; }
  #calendar-toggle { display: inline-flex; }
  .show-calendar .calendar-panel { display: block; position: fixed; top: 56px; right: 0; width: 255px; bottom: 0; z-index: 3; box-shadow: -8px 0 25px #0003; }
  .editor-grid { grid-template-columns: minmax(0,3fr) minmax(0,2fr); }
  .editor-fields, .preview-pane { padding: 18px; }
  .editor-actions { gap: 6px; }
  .editor-actions button { font-size: 11px; }
}
@media (max-width: 600px) {
  .workspace, .workspace.collapsed-menu { grid-template-columns: 44px 0 minmax(0,1fr) 0; }
  .project-rail { padding: 10px 5px; gap: 16px; }
  .brand-mark { width: 30px; height: 30px; }
  .project-rail .project-avatar { width: 28px; height: 28px; }
  .mobile-menu .sidebar { left: 44px; }
  .page-header { flex-wrap: wrap; align-content: center; gap: 2px; padding: 4px 7px; }
  .date-navigation { width: 100%; }
  .date-navigation h1 { font-size: 11px; margin-left: 3px; }
  .date-navigation .icon-button { min-width: 23px; min-height: 24px; }
  .header-actions { flex: 1 1 auto; justify-content: flex-end; gap: 4px; }
  .header-right { gap: 4px; }
  :is(.header-actions, .header-right) button, #view-mode { min-height: 26px; padding: 4px 7px; font-size: 10px; }
  .header-actions #filter-toggle span:last-child { display: none; }
  .header-actions #view-mode { margin-right: auto; min-width: 70px; }
  :is(.header-actions, .header-right) svg { width: 15px; height: 15px; }
  .workspace { grid-template-rows: 76px minmax(0,1fr); }
  .show-calendar .calendar-panel { top: 76px; }
  .day-add { opacity: 1; }
  .weekdays > div { padding: 10px 5px; font-size: 10px; }
  .day { min-height: 70px; padding: 3px; }
  .day-head { flex-wrap: wrap; }
  .day-number, .day-add { width: 24px; height: 28px; }
  .calendar-grid:has(.compact) { min-width: 560px; }
  .calendar:has(.compact) { overflow-x: auto; }
  .calendar:has(.compact) .weekdays { min-width: 560px; }
  .compact .post-card-text { -webkit-line-clamp: 2; }
  .post-list { grid-template-columns: minmax(0,1fr); padding: 16px; }
  .day-posts { padding: 16px; }
  .board { padding: 16px; gap: 16px; }
  .board-column { min-width: 230px; }
  .filter-bar { flex-direction: column; padding: 12px; }
  .accounts-page, .help-section { padding: 22px 16px; }
  .stats { grid-template-columns: 1fr 1fr; margin: 20px 16px; gap: 10px; }
  .stat { padding: 15px; }
  .home-intro { padding: 0 16px 24px; }
  .home-intro button { margin-bottom: 8px; }
  .notice.warning { margin: 12px; }
  .main-footer { padding: 16px 12px; font-size: 8px; }
  .editor-grid { display: block; }
  .editor-resizer { display: none; }
  .editor-fields, .preview-pane { padding: 16px; }
  .preview-pane { border-left: 0; border-top: 1px solid var(--line); }
  .editor-dialog .dialog-header { padding: 10px 16px; }
  .editor-actions button { min-height: 40px; }
  .action-spacer { display: none; }
  #post-text { min-height: 170px; }
  .planning-grid { grid-template-columns: 1fr; padding: 20px; gap: 20px; }
  .planning-dialog { max-height: 96dvh; }
  .provider-list { padding: 28px 20px; }
  .provider-option { padding: 12px; gap: 10px; }
  .connection-fields, #details-body { padding: 20px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .login-screen { display: flex; justify-content: center; padding: 80px 0 40px; }
  .login-intro { display: none; }
  .login-form { align-self: center; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
