@font-face {
  font-family: LocalSystem;
  src: local("SF Pro Display");
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f7f7f2;
  color: #233c36;
  font:
    15px/1.5 LocalSystem,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #d39262;
  outline-offset: 4px;
}
a {
  color: inherit;
}
button {
  border: 0;
  background: none;
  color: inherit;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -1.8px;
  font-weight: 600;
  margin-bottom: 12px;
}
h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.6px;
  margin-bottom: 0;
}
h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 242px;
  background: #edf0e8;
  padding: 36px 23px;
  border-right: 1px solid #dfe4db;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 24px;
  font-weight: 650;
  gap: 11px;
  letter-spacing: -0.7px;
}
.brand small {
  display: block;
  letter-spacing: 1px;
  font-size: 7px;
  margin-top: 5px;
}
.brand-mark {
  font-family: Georgia, serif;
  font-size: 36px;
  font-style: italic;
  background: #355b48;
  color: #f2f3e8;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  text-align: center;
  line-height: 40px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 57px;
}
.nav {
  text-align: left;
  padding: 14px 17px;
  border-radius: 10px;
  font-size: 15px;
  display: flex;
  gap: 15px;
  align-items: center;
  color: #67796d;
}
.nav svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav.active {
  background: #dce5d7;
  color: #264b36;
  font-weight: 600;
}
.sidebar-foot {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: auto;
  font-size: 13px;
}
.sidebar-foot small {
  display: block;
  font-size: 10px;
  color: #7b867c;
}
.avatar {
  border: 1px solid #ced7c6;
  background: #e3e7dc;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
}
main {
  margin-left: 242px;
  padding: 32px 46px 20px;
  max-width: 1700px;
}
.topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: #859082;
}
.timezone {
  letter-spacing: 0;
  font-size: 12px;
}
.page-header {
  margin-top: 45px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.page-header p {
  color: #859082;
  margin-bottom: 0;
}
.primary {
  background: #315740;
  color: white;
  border-radius: 9px;
  padding: 12px 19px;
  font-weight: 550;
  white-space: nowrap;
  box-shadow: 0 2px 3px #2032250a;
}
.primary:hover {
  background: #21472f;
}
.secondary {
  padding: 10px 14px;
  background: #f2f4ed;
  border: 1px solid #d9dfd3;
  border-radius: 8px;
  font-size: 13px;
}
.quiet {
  padding: 9px 15px;
  border: 1px solid #d8dfd2;
  border-radius: 7px;
}
.environment {
  font-size: 12px;
  color: #73806c;
  background: #eef0e7;
  padding: 11px 15px;
  border: 1px solid #e1e6d7;
  border-radius: 8px;
  margin-top: 28px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 25px 0 14px;
}
.stats > div {
  border: 1px solid #e0e3d7;
  border-radius: 12px;
  background: #fffffa;
  padding: 20px 23px;
  display: flex;
  flex-direction: column;
  min-height: 152px;
}
.stats small {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #7e8877;
  line-height: 15px;
  min-height: 30px;
}
.stats strong {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -1px;
  margin: 8px 0 2px;
}
.stats span {
  font-size: 12px;
  color: #8b9283;
  border-top: 1px solid #e5e9df;
  margin-top: auto;
  padding-top: 9px;
  min-height: 36px;
}
.stats .next-date {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin-top: 17px;
  margin-bottom: 11px;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 21px;
}
.filters {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}
.filters button {
  font-size: 12px;
  padding: 8px 11px;
  border-radius: 6px;
  color: #7c8779;
}
.filters .selected {
  color: #345641;
  background: #e4eadc;
}
.search input {
  background: transparent;
  font-size: 12px;
  max-width: 190px;
}
.post-list {
  display: grid;
  gap: 13px;
}
.post-card {
  background: #fffffc;
  border: 1px solid #dfe3d8;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 19px;
  padding: 23px;
  align-items: start;
  transition: box-shadow 0.2s;
}
.post-card:hover {
  box-shadow: 0 3px 18px #253d2c08;
}
.post-icon {
  width: 49px;
  height: 55px;
  background: #edf0e4;
  color: #79916b;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.post-icon svg {
  width: 24px;
  height: 24px;
}
.post-card h3 {
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.2px;
  margin: 8px 0;
}
.excerpt {
  font-size: 13px;
  color: #8a9084;
  margin: 0 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.post-content {
  min-width: 0;
}
.meta {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #899080;
}
.post-author {
  color: #4d6754;
  font-weight: 600;
}
.editor-author {
  margin: 6px 0 0;
  color: #617464;
  font-size: 12px;
}
.badge {
  display: inline-block;
  font-size: 10px;
  line-height: 1.6;
  padding: 3px 8px;
  border-radius: 5px;
  font-weight: 550;
  letter-spacing: 0.1px;
}
.badge.active {
  background: #e8efdd;
  color: #527444;
}
.badge.completed {
  color: #526657;
  background: #e8eee9;
}
.badge.draft {
  background: #f0eee7;
  color: #938b73;
}
.badge.paused {
  background: #f8eadd;
  color: #a07850;
}
.card-actions {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.card-actions button {
  font-size: 12px;
  padding: 8px 10px;
  background: #f4f5ef;
  border-radius: 6px;
}
.card-actions .edit {
  background: #e7eddf;
  color: #345a3f;
}
.card-actions .danger-text {
  color: #995d4e;
  background: #f7eee9;
}
#delete-choices {
  border: 1px solid #d5ddcd;
  border-radius: 8px;
  margin: 16px 0;
  min-width: 0;
}
#post-action-dialog {
  height: fit-content;
}
#delete-choices label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}
#delete-choices input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
#delete-choices label:has(input:disabled) {
  opacity: 0.48;
}
.empty {
  padding: 55px 25px;
  border: 1px dashed #d5ddcd;
  border-radius: 12px;
  text-align: center;
  color: #8b9585;
}
.empty strong {
  display: block;
  color: #4f6856;
  font-size: 21px;
  margin-bottom: 10px;
}
.empty button {
  margin-top: 15px;
}
.section-note {
  color: #7a8777;
}
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 25px 0;
}
.calendar-controls h2 {
  font-size: 22px;
  text-transform: capitalize;
}
.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekdays span {
  text-align: center;
  color: #82907b;
  font-size: 10px;
  padding-bottom: 15px;
}
.calendar-grid {
  border-top: 1px solid #dce2d6;
  border-left: 1px solid #dce2d6;
  background: #fffffa;
}
.day {
  min-height: 100px;
  border-right: 1px solid #dce2d6;
  border-bottom: 1px solid #dce2d6;
  text-align: left;
  padding: 11px;
  overflow: hidden;
}
.day.outside {
  color: #bcc5b6;
  background: #f4f5ef;
}
.day.today {
  background: #edf2e5;
}
.day .day-count {
  display: block;
  font-size: 10px;
  background: #e2ead7;
  color: #567346;
  padding: 4px 5px;
  border-radius: 4px;
  margin-top: 10px;
}
.day.selected {
  box-shadow: inset 0 0 0 2px #6c8c56;
}
#day-detail {
  margin-top: 20px;
}
.history-row {
  padding: 20px;
  background: #fffffb;
  border: 1px solid #dfe3d7;
  border-radius: 10px;
  margin: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.history-row p {
  margin: 6px 0;
  color: #88917e;
  font-size: 12px;
}
.cleanup-heading {
  font-size: 18px;
  margin: 20px 0 8px;
}
.cleanup-report {
  border-color: #e9cfbd;
  background: #fffaf5;
}
.cleanup-report ul {
  padding-left: 18px;
  margin-bottom: 0;
  font-size: 12px;
  line-height: 1.7;
}
.cleanup-report li + li {
  margin-top: 6px;
}
.history-text {
  white-space: pre-wrap;
  font-size: 13px;
  max-height: 200px;
  overflow: auto;
}
footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  color: #a2aa99;
  font-size: 10px;
  margin: 45px 0 10px;
}
dialog {
  border: 1px solid #dfe4d9;
  border-radius: 17px;
  padding: 0;
  color: #263d31;
  background: #fafbf6;
  width: min(1150px, 96vw);
  max-height: 93dvh;
  box-shadow: 0 20px 90px #13261930;
}
dialog::backdrop {
  background: #1a2a2466;
  backdrop-filter: blur(3px);
}
.editor-heading {
  padding: 24px 28px;
  border-bottom: 1px solid #e4e8de;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fafbf6;
  position: sticky;
  top: 0;
  z-index: 3;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: #8b967f;
  display: block;
  margin-bottom: 7px;
}
.icon-button {
  font-size: 19px;
  padding: 8px;
  line-height: 1;
}
.editor-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
}
#post-form {
  padding: 27px;
  border-right: 1px solid #e4e8de;
}
label {
  display: block;
  font-size: 12px;
  color: #52634d;
  font-weight: 550;
}
input,
textarea,
select {
  border: 1px solid #dbe1d4;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fffffc;
  color: #304632;
  width: 100%;
  outline: none;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #8ba075;
  box-shadow: 0 0 0 3px #72924a10;
}
label > input {
  margin-top: 7px;
}
textarea {
  resize: vertical;
  line-height: 1.6;
  font-size: 14px;
}
input::placeholder,
textarea::placeholder {
  color: #a2ab99;
}
.field-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 23px 0 9px;
}
.mode-label select {
  font-size: 11px;
  padding: 5px 9px;
}
.hint {
  font-size: 10px;
  color: #8b9680;
  margin: 7px 0;
  line-height: 1.6;
}
.upload-zone {
  border: 1px dashed #bfcdb2;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  background: #f3f6ed;
  cursor: pointer;
  color: #6e8562;
}
.upload-zone input {
  display: none;
}
.media-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.media-chip {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 11px;
  background: #e9efdf;
  padding: 5px 9px;
  border-radius: 5px;
}
.media-chip button {
  padding: 2px 4px;
}
details {
  border-top: 1px solid #e0e6d7;
  border-bottom: 1px solid #e0e6d7;
  margin: 22px 0;
  padding: 13px 0;
}
summary {
  font-size: 12px;
  cursor: pointer;
  color: #64765b;
}
summary span {
  color: #a0aa95;
  margin-left: 7px;
  font-size: 10px;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 13px 0;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 28px 0 13px;
}
.section-title h3 {
  margin: 0;
}
.section-title p {
  font-size: 10px;
  color: #88967b;
  margin: 5px 0 0;
}
.rule {
  border: 1px solid #dce4d1;
  border-radius: 9px;
  padding: 14px;
  margin-bottom: 12px;
  background: #f5f7ef;
}
.rule-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #6b805b;
}
.rule input {
  font-size: 11px;
  padding: 8px;
}
.rule .two-cols {
  margin-bottom: 10px;
}
.rule-days {
  display: flex;
  gap: 4px;
  margin: 10px 0;
  flex-wrap: wrap;
}
.rule-days label {
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 3px;
  background: #edf1e4;
  padding: 4px 6px;
  border-radius: 5px;
}
.rule-days input {
  width: 12px;
  height: 12px;
  margin: 0;
  accent-color: #53733d;
}
.preview-column {
  padding: 29px 24px;
  background: #f0f3e9;
  min-width: 0;
}
.preview-label {
  font-size: 9px;
  letter-spacing: 1px;
  color: #849777;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.telegram-stage {
  background: #e1e9d7;
  padding: 20px 14px;
  border-radius: 12px;
  margin-top: 15px;
  min-height: 220px;
  background-image: radial-gradient(#bccbad55 0.7px, transparent 0.7px);
  background-size: 12px 12px;
}
.telegram-bubble {
  background: #fffffa;
  border-radius: 10px 10px 10px 3px;
  padding: 16px 17px;
  box-shadow: 0 2px 5px #294a1910;
  overflow-wrap: anywhere;
}
.channel-name {
  font-size: 12px;
  color: #6e9357;
  font-weight: 600;
  margin-bottom: 9px;
}
.formatted {
  font-size: 13px;
  white-space: pre-wrap;
  color: #314033;
  min-height: 60px;
}
.formatted a {
  color: #57875e;
}
.formatted pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #edf1e7;
  padding: 10px;
  border-radius: 6px;
}
.formatted blockquote {
  margin: 7px 0;
  border-left: 3px solid #8eac73;
  padding-left: 10px;
  color: #697f5d;
}
.formatted tg-spoiler {
  background: #e3e8dc;
  color: transparent;
  border-radius: 2px;
  cursor: pointer;
}
.formatted tg-spoiler:hover {
  color: inherit;
}
.message-time {
  display: block;
  text-align: right;
  color: #b0b9a8;
  font-size: 9px;
  margin-top: 9px;
}
.preview-button {
  display: block;
  text-align: center;
  padding: 9px;
  margin-top: 6px;
  background: #fafff0aa;
  border-radius: 6px;
  color: #64864d;
  font-size: 12px;
  text-decoration: none;
}
#preview-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
#preview-media img,
#preview-media video {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 5px;
}
.dates-panel {
  border-top: 1px solid #dce4d2;
  margin-top: 25px;
  padding-top: 21px;
}
.dates-panel h3 {
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.dates-panel h3 span {
  font-size: 11px;
  background: #dfe8d2;
  padding: 0 7px;
  border-radius: 4px;
}
.date-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e0e7d7;
  font-size: 11px;
  color: #6e835e;
}
.editor-actions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fffffaf2;
  backdrop-filter: blur(8px);
  border-top: 1px solid #dfe5d6;
  padding: 18px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.editor-actions > div {
  display: flex;
  gap: 8px;
}
.editor-actions span {
  font-size: 10px;
  color: #8c9881;
}
.error {
  padding: 12px 14px;
  background: #f9ebe3;
  color: #955c44;
  border: 1px solid #ead5c7;
  border-radius: 7px;
  font-size: 12px;
  margin: 15px 0;
  white-space: pre-wrap;
}
.muted {
  color: #95a188;
  font-size: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
[hidden] {
  display: none !important;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #304f38;
  color: #f5faef;
  box-shadow: 0 4px 20px #20381e22;
  border-radius: 9px;
  padding: 13px 22px;
  font-size: 13px;
  z-index: 10;
  max-width: 90vw;
}
@media (min-width: 1500px) {
  main {
    padding-left: 65px;
    padding-right: 65px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 195px;
    padding: 30px 15px;
  }
  .brand {
    font-size: 21px;
  }
  .brand small {
    font-size: 6px;
  }
  main {
    margin-left: 195px;
    padding: 28px;
  }
  .post-card {
    grid-template-columns: 43px 1fr;
  }
  .post-icon {
    width: 43px;
  }
  .card-actions {
    grid-column: 2;
    margin-top: 0;
    justify-content: flex-start;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .search,
  .search input {
    width: 100%;
    max-width: none;
  }
  .editor-grid {
    grid-template-columns: 1.2fr 1fr;
  }
  .stats > div {
    padding: 18px 15px;
  }
  .stats .next-date {
    font-size: 17px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 17px 20px;
    border-right: 0;
    border-bottom: 1px solid #dfe4db;
    gap: 17px;
  }
  .brand {
    font-size: 22px;
  }
  .brand-mark {
    width: 39px;
    height: 39px;
    font-size: 31px;
    line-height: 34px;
  }
  .brand small {
    font-size: 6px;
  }
  .sidebar nav {
    margin-top: 0;
    display: flex;
    gap: 5px;
  }
  .nav {
    padding: 8px 12px;
    font-size: 12px;
    flex: 1;
    justify-content: center;
    gap: 8px;
  }
  .nav svg {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }
  .sidebar-foot {
    display: none;
  }
  main {
    margin-left: 0;
    padding: 22px 19px;
  }
  .topline {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .timezone {
    font-size: 10px;
  }
  .page-header {
    margin-top: 26px;
    align-items: flex-start;
    flex-direction: column;
    gap: 19px;
  }
  h1 {
    font-size: 35px;
  }
  .page-header p {
    font-size: 12px;
  }
  .primary {
    font-size: 12px;
    padding: 11px 15px;
  }
  .environment {
    font-size: 10px;
    margin-top: 21px;
  }
  .stats {
    gap: 8px;
    margin: 18px 0 23px;
    grid-template-columns: 1fr 1fr;
  }
  .stats > div {
    padding: 13px 15px;
  }
  .stats .next-date {
    margin: 0;
    font-size: 16px;
    text-align: right;
  }
  .stats small {
    font-size: 8px;
  }
  .stats strong {
    font-size: 28px;
    margin: 3px 0;
  }
  .stats span {
    font-size: 10px;
  }
  .filters {
    gap: 1px;
  }
  .filters button {
    font-size: 11px;
    padding: 7px 9px;
  }
  .post-card {
    padding: 16px;
    gap: 12px;
    grid-template-columns: 36px 1fr;
  }
  .post-icon {
    width: 36px;
    height: 45px;
    font-size: 22px;
  }
  .post-card h3 {
    font-size: 15px;
  }
  .excerpt {
    font-size: 11px;
  }
  .meta {
    font-size: 10px;
    gap: 9px;
  }
  .card-actions button {
    font-size: 11px;
  }
  .badge {
    font-size: 9px;
  }
  .day {
    padding: 7px;
    min-height: 70px;
    font-size: 11px;
  }
  .day .day-count {
    font-size: 8px;
    padding: 2px 3px;
  }
  .calendar-controls h2 {
    font-size: 19px;
  }
  .history-row {
    flex-direction: column;
  }
  dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    margin: 0;
  }
  .editor-heading {
    padding: 19px;
  }
  .editor-grid {
    display: flex;
    flex-direction: column;
  }
  #post-form {
    padding: 20px;
    border: 0;
  }
  .preview-column {
    padding: 20px;
  }
  .editor-actions {
    padding: 13px;
    flex-direction: column;
    align-items: stretch;
  }
  .editor-actions > div {
    justify-content: space-between;
  }
  .editor-actions > div button {
    flex: 1;
    font-size: 11px;
    padding: 10px 9px;
  }
  .editor-actions span {
    font-size: 9px;
  }
  footer {
    font-size: 8px;
    gap: 5px;
  }
  .section-title .secondary {
    font-size: 11px;
    white-space: nowrap;
    padding: 9px;
  }
  .telegram-stage {
    min-height: 160px;
  }
}
@media (min-width: 761px) {
  .preview-column {
    position: sticky;
    top: 101px;
    align-self: start;
    max-height: calc(93dvh - 188px);
    overflow-y: auto;
    min-height: 400px;
  }
  .editor-grid {
    background: linear-gradient(to right, #fafbf6 56.5%, #f0f3e9 56.5%);
  }
}
@media (max-width: 760px) {
  .preview-column {
    position: static;
    max-height: none;
  }
}

.upload-zone.drag-over {
  border-color: var(--green, #35664b);
  background: #e5f0e7;
  box-shadow: 0 0 0 3px #35664b25;
}
.upload-zone[aria-disabled="true"] {
  opacity: 0.55;
  cursor: wait;
}
.upload-zone:focus-visible {
  outline: 3px solid #35664b;
  outline-offset: 3px;
}
.text-counter {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.text-counter.over-limit {
  color: #a52e2e;
  font-weight: 600;
}
dialog.confirmation {
  width: min(540px, calc(100% - 32px));
  padding: 28px;
  border: 0;
  border-radius: 20px;
  color: inherit;
}
.confirmation p {
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  justify-content: flex-end;
}
.user-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  align-items: end;
  gap: 12px;
}
@media (max-width: 900px) {
  .user-form {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 540px) {
  .user-form {
    grid-template-columns: 1fr;
  }
}

/* Comfortable touch controls, including tablets used with a keyboard. */
button,
.upload-zone,
summary {
  touch-action: manipulation;
}
.post-card h3,
.history-row,
.user-form {
  overflow-wrap: anywhere;
}
.editor-tabs {
  display: none;
}
#editor {
  overscroll-behavior: contain;
}
body:has(#editor[open]) {
  overflow: hidden;
}
dialog.confirmation {
  height: auto;
  margin: auto;
  max-height: calc(100dvh - 32px);
}
@media (max-width: 900px) {
  .editor-tabs {
    display: flex;
    gap: 8px;
    padding: 8px 20px;
    position: sticky;
    top: 99px;
    z-index: 3;
    background: #fafbf6;
    border-bottom: 1px solid #dfe4d9;
  }
  .editor-tabs button {
    flex: 1;
    min-height: 44px;
    border-radius: 8px;
    font-size: 14px;
  }
  .editor-tabs button[aria-selected="true"] {
    background: #dce5d7;
    color: #264b36;
    font-weight: 600;
  }
  .editor-grid {
    display: block;
    background: #fafbf6;
  }
  #post-form {
    border-right: 0;
  }
  #editor:not(.show-preview) .preview-column,
  #editor.show-preview #post-form {
    display: none;
  }
  .preview-column {
    position: static;
    max-height: none;
    min-height: 0;
  }
  input,
  textarea,
  select,
  .search input,
  .rule input,
  .mode-label select {
    font-size: 16px;
  }
  input,
  select {
    min-height: 44px;
  }
  .icon-button,
  .media-chip button,
  .rule-title button,
  .primary,
  .secondary,
  .quiet,
  .filters button,
  .card-actions button,
  summary {
    min-height: 44px;
  }
  .icon-button,
  .media-chip button,
  .rule-title button {
    min-width: 44px;
  }
  .rule-days label {
    min-height: 44px;
    min-width: 44px;
    justify-content: center;
    font-size: 12px;
  }
  .rule-days input {
    min-height: 0;
    width: 16px;
    height: 16px;
  }
  .hint,
  .section-title p,
  .muted,
  .editor-actions span {
    font-size: 12px;
  }
  .hint,
  .muted,
  .editor-actions span {
    color: #65755c;
  }
  .editor-actions {
    gap: 8px;
  }
  .editor-actions > div button {
    min-height: 48px;
    font-size: 13px;
    white-space: normal;
  }
  .editor-heading {
    padding: 16px 20px;
    min-height: 99px;
  }
}
@media (max-width: 760px) {
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }
  .nav {
    flex-direction: column;
    font-size: 11px;
    gap: 2px;
    padding: 8px 2px;
    min-height: 54px;
  }
  .sidebar {
    padding-inline: max(16px, env(safe-area-inset-left));
  }
  .page-header > .primary {
    width: 100%;
    min-height: 48px;
    font-size: 15px;
  }
  #editor {
    height: 100dvh;
    scroll-padding-top: 165px;
    scroll-padding-bottom: 125px;
  }
  .editor-heading {
    padding-top: max(16px, env(safe-area-inset-top));
  }
  .editor-actions {
    padding-bottom: max(13px, env(safe-area-inset-bottom));
  }
  .editor-actions > div {
    gap: 8px;
  }
  .section-title {
    align-items: flex-start;
  }
  .rule .two-cols {
    grid-template-columns: 1fr;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .field-heading {
    flex-wrap: wrap;
  }
  .post-card h3 {
    font-size: 16px;
  }
  .excerpt,
  .meta,
  .history-row p,
  .environment {
    font-size: 12px;
  }
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    gap: 4px;
  }
  .filters button {
    font-size: 12px;
  }
}
@media (max-height: 540px) and (max-width: 900px) {
  .editor-heading {
    min-height: 64px;
    padding-block: 10px;
  }
  .editor-heading .eyebrow {
    display: none;
  }
  .editor-tabs {
    top: 64px;
    padding-block: 3px;
  }
  .editor-actions span {
    display: none;
  }
}
@media (max-width: 760px) {
  #editor {
    position: fixed;
    inset: 0;
  }
}

.next-publication {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
  margin: 0 0 28px;
  color: #708069;
  font-size: 13px;
}
.next-publication strong {
  color: #395640;
  font-weight: 550;
}
.stats > div {
  min-width: 0;
}
.stats small {
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .stats {
    margin-bottom: 12px;
  }
  .stats small {
    font-size: 9px;
    letter-spacing: 0.7px;
    min-height: 30px;
  }
  .stats span {
    font-size: 11px;
  }
  .next-publication {
    font-size: 12px;
  }
}

.next-publications {
  margin: 18px 0 28px;
}
.next-publications h2 {
  font-size: 14px;
  letter-spacing: 0;
  margin: 0 0 10px;
  font-weight: 550;
}
.next-publications h2 span {
  font-size: 11px;
  font-weight: 400;
  color: #738169;
  margin-left: 6px;
}
#upcoming-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
#upcoming-list li {
  border-left: 2px solid #c4d3b7;
  background: #f0f3e9;
  border-radius: 0 7px 7px 0;
  min-width: 0;
}
.upcoming-post {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 14px;
  width: 100%;
  min-height: 44px;
  min-width: 0;
  text-align: left;
  border-radius: inherit;
}
.upcoming-post:hover,
.upcoming-post:focus-visible {
  background: #e5ecdc;
}
#upcoming-list time {
  font-size: 13px;
  color: #395640;
  font-weight: 550;
}
#upcoming-list .upcoming-post > span {
  font-size: 12px;
  color: #65755c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#upcoming-list .upcoming-empty {
  padding: 12px 14px;
  grid-column: 1/-1;
  color: #738169;
  font-size: 13px;
}
@media (max-width: 760px) {
  #upcoming-list {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  #upcoming-list .upcoming-post {
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
  }
  #upcoming-list time {
    flex: 0 0 auto;
  }
}

/* Each day has separate controls for inspecting and creating publications. */
.day {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.day-select {
  text-align: left;
  width: 100%;
  flex: 1;
  padding: 10px;
  min-height: 56px;
}
.day-add {
  width: 100%;
  min-height: 36px;
  color: #66815c;
  border-top: 1px solid #e6ebdf;
  font-size: 18px;
}
.day-add:hover,
.day-add:focus-visible {
  background: #e2ead7;
  color: #315740;
}
.day-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.day-detail-heading h3 {
  margin: 0;
}
@media (max-width: 900px) {
  .day-add {
    min-height: 44px;
  }
}
@media (max-width: 760px) {
  .day-select {
    padding: 6px;
  }
  .day .day-count {
    font-size: 8px;
    margin-top: 5px;
    padding: 2px;
  }
}

.editor-tabs {
  top: var(--editor-heading-height, 99px);
}
@media (max-width: 900px) {
  #editor {
    scroll-padding-top: calc(var(--editor-heading-height, 99px) + 65px);
  }
}

.document-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #edf1e7;
  border-radius: 8px;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.document-preview > span {
  color: #65755c;
  font-size: 12px;
}
.media-chip {
  max-width: 100%;
}
.media-chip > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.media-chip > button {
  flex-shrink: 0;
}
/* A contextual action replaces the repeated second row of calendar buttons. */
.day {
  position: relative;
  min-height: 112px;
  display: block;
}
.day-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 12px;
  min-height: 112px;
  height: 100%;
}
.day .day-count {
  width: fit-content;
  margin-top: 8px;
}
.day-add {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #cfdbc4;
  border-radius: 50%;
  background: #edf3e7;
  color: #44663c;
  font-size: 20px;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s,
    background 0.15s;
}
.day:hover .day-add,
.day:focus-within .day-add {
  opacity: 1;
  pointer-events: auto;
}
.day-add:hover,
.day-add:focus-visible {
  background: #dce9d1;
}
@media (max-width: 760px) {
  .day,
  .day-select {
    min-height: 96px;
  }
  .day-select {
    padding: 7px;
  }
  .day .day-count {
    font-size: 9px;
    padding: 2px 3px;
    margin-top: 5px;
  }
  .day-add {
    right: 2px;
    bottom: 3px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    max-width: calc(100% - 4px);
  }
  .day.selected .day-add {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (hover: none) {
  .day:not(.selected) .day-add {
    opacity: 0;
    pointer-events: none;
  }
  .day.selected .day-add {
    opacity: 1;
    pointer-events: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .day-add {
    transition: none;
  }
}

.storage-note {
  padding: 12px 14px;
  border-left: 3px solid #c4d4b7;
  background: #f0f3e9;
}
.media-chip small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
  font-weight: 400;
}
.media-chip small button {
  font-size: 13px;
  padding: 4px 0;
  text-decoration: underline;
}
.attachment-preview {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}
.attachment-preview img,
.attachment-preview video {
  max-width: 100%;
  border-radius: 10px;
}
.attachment-preview a {
  color: #365c49;
  font-size: 14px;
  overflow-wrap: anywhere;
}
