@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --apple-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", system-ui, -system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-main: var(--apple-font);
  --bg-app: #fbfbfd;
  --bg-card: #ffffff;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --text-muted: #aeaeb2;
  --mc-blue: #007aff;
  --mc-blue-hover: #0062cc;
  --insta-pink: #ff0069;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.011em;
}

/* Fullscreen Planner App Container */
.planner-app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  background: #ffffff;
}

/* Header */
.page-header {
  padding: 16px 28px 12px;
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
}

.page-header-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-header-title-row h1 {
  flex-shrink: 0;
  white-space: nowrap;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.site-brand img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}

.site-brand__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.site-brand__title-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.site-brand__name {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-brand__version {
  color: #86868b;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.site-brand__tagline {
  color: #86868b;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.brand-pill {
  background-color: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 3px 12px 3px 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  font-family: var(--font-main);
}

.brand-pill:hover {
  background-color: rgba(0, 0, 0, 0.07);
  border-color: rgba(0, 0, 0, 0.1);
}

.brand-pill:active {
  transform: scale(0.98);
}

.brand-pill .v-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #d2d2d7;
}

.brand-pill .v-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-avatar-fallback {
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #424245;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.brand-pill__name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1d1d1f;
}

.account-switcher { position: relative; z-index: 40; }
.account-switcher-chevron { color: #86868b; font-size: 10px; margin-left: 2px; }
.account-menu[hidden], .account-connect-overlay[hidden] { display: none !important; }
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  padding: 6px;
  border: 0.5px solid rgba(15, 23, 42, .08);
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18), 0 2px 8px rgba(15, 23, 42, .06);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}
.account-menu-heading { padding: 10px 12px 6px; color: #86868b; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.account-menu-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.account-menu-item, .account-menu-add {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 6px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #1d1d1f;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color .15s ease;
}
.account-menu-item:hover, .account-menu-add:hover { background: rgba(118, 118, 128, .12); }
.account-menu-item.active { background: rgba(0, 122, 255, .08); }
.account-menu-item .account-menu-check { margin-left: auto; color: #007aff; font-size: 13px; }
.account-menu-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; overflow: hidden; border-radius: 50%; background: #f2f2f7; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
.account-menu-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.account-menu-avatar .account-avatar-fallback { color: #8e8e93; font-size: 15px; }
.account-menu-username { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.account-menu-empty { padding: 12px; color: #86868b; font-size: 13px; line-height: 1.5; }
.account-menu-divider { height: .5px; margin: 6px 10px; background: rgba(60, 60, 67, .18); }
.account-menu-add { color: #007aff; font-size: 15px; font-weight: 500; }
.account-menu-add i { display: inline-flex; flex: 0 0 36px; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 15px; }

.account-connect-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, .48);
  backdrop-filter: blur(4px);
}
.account-connect-dialog {
  width: min(440px, 100%);
  padding: 24px;
  border: 1px solid #e5e5ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.account-connect-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.account-connect-icon { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 13px; background: #fce7f3; color: #e1306c; font-size: 21px; }
.account-connect-close { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: transparent; color: #86868b; cursor: pointer; }
.account-connect-close:hover { background: #f5f5f7; color: #1d1d1f; }
.account-connect-dialog h2 { color: #1d1d1f; font-size: 19px; font-weight: 750; }
.account-connect-dialog > p { margin-top: 7px; color: #86868b; font-size: 13px; line-height: 1.55; }
.account-connect-dialog form { display: grid; margin-top: 20px; }
.account-connect-dialog label { margin-bottom: 7px; color: #424245; font-size: 12px; font-weight: 700; }
.account-connect-dialog input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #d2d2d7; border-radius: 9px; outline: none; color: #1d1d1f; font: inherit; font-size: 13px; }
.account-connect-dialog select { width: 100%; min-height: 44px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid #d2d2d7; border-radius: 9px; outline: none; background: #fff; color: #1d1d1f; font: inherit; font-size: 13px; }
.account-connect-dialog input:focus { border-color: #007aff; box-shadow: 0 0 0 3px rgba(2, 132, 199, .12); }
.account-connect-dialog select:focus { border-color: #007aff; box-shadow: 0 0 0 3px rgba(2, 132, 199, .12); }
.account-connect-dialog input:disabled { background: #fbfbfd; }
.account-connect-note { margin-top: 8px; color: #86868b; font-size: 11px; line-height: 1.5; }
.account-connect-error { margin-top: 10px; color: #b91c1c; font-size: 12px; line-height: 1.5; }
.account-connect-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.account-connect-cancel, .account-connect-submit { min-height: 40px; padding: 0 14px; border-radius: 9px; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.account-connect-cancel { border: 1px solid #e5e5ea; background: #fff; color: #515154; }
.account-connect-submit { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #007aff; background: #007aff; color: #fff; }
.account-connect-submit:hover:not(:disabled) { background: #0062cc; }
.account-connect-submit:disabled, .account-connect-cancel:disabled { opacity: .6; cursor: wait; }

.header-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(0, 0, 0, 0.03);
  color: #48484a;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.1);
}

.header-button:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Apple Design Post Planner & Live Preview Styles - InstaFlux
   Clean, modern, organized, fluid, lightweight & zero-lag
   ========================================================================== */

/* Planner Main Layout */
#post-planner-main-container {
  display: flex;
  flex: 1;
  width: 100%;
  min-height: calc(100vh - 65px);
  background: #ffffff;
  position: relative;
}

/* Left Column: 58% - Apple Clean Editor Canvas */
.planner-left-column {
  flex: 1 1 58%;
  max-width: 58%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.12) transparent;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.planner-left-column::-webkit-scrollbar {
  width: 6px;
}

.planner-left-column::-webkit-scrollbar-track {
  background: transparent;
}

.planner-left-column::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.12);
  border-radius: 9999px;
}

.planner-left-column::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.22);
}

/* Networks Row */
.networks-bar {
  padding: 16px 28px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  gap: 12px;
}

.network-badge-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.network-card-instagram {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px 3px 6px;
  border-radius: 9999px;
  border: 1px solid rgba(225, 48, 108, 0.22);
  background: rgba(225, 48, 108, 0.04);
  cursor: pointer;
  position: relative;
  transition: border-color 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.network-card-instagram:hover {
  border-color: rgba(225, 48, 108, 0.45);
  background: rgba(225, 48, 108, 0.08);
  transform: translateY(-0.5px);
  box-shadow: 0 2px 8px rgba(225, 48, 108, 0.12);
}

.network-card-instagram:active {
  transform: scale(0.97);
}

.network-icon-wrap {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.network-icon-wrap i {
  font-size: 24px;
  color: #e1306c;
}

.trial-reel-badge {
  position: absolute;
  right: -4px;
  bottom: -3px;
  background: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.trial-reel-badge svg {
  width: 10px;
  height: 10px;
  fill: #e1306c;
}

.network-mode-btn {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  padding: 3px 9px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.network-mode-btn:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.14);
}

.network-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.network-add-btn:hover {
  background: #f5f5f7;
  color: var(--text-primary);
  border-color: rgba(0, 0, 0, 0.14);
  transform: scale(1.05);
}

.network-add-btn:active {
  transform: scale(0.96);
}

/* Network Dropdown Menu (Apple Frosted Glass) */
.network-dropdown-menu {
  position: absolute;
  top: 56px;
  left: 28px;
  width: 310px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  z-index: 90;
  display: none;
  overflow: hidden;
  padding: 5px;
  font-family: var(--font-main);
}

.network-dropdown-menu.show {
  display: block;
}

.network-dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
  position: relative;
}

.network-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.network-dropdown-item.active {
  background: rgba(0, 113, 227, 0.08);
}

.network-dropdown-item .item-icon {
  width: 20px;
  color: var(--text-secondary);
  font-size: 16px;
  margin-top: 1px;
  display: grid;
  place-items: center;
}

.network-dropdown-item.active .item-icon {
  color: var(--mc-blue);
}

.network-dropdown-item .item-info {
  flex: 1;
}

.network-dropdown-item .item-title {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.network-dropdown-item.active .item-title {
  color: var(--mc-blue);
}

.network-dropdown-item .item-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.network-dropdown-item .item-check {
  color: var(--mc-blue);
  font-size: 13px;
  align-self: center;
}

.story-batch-options[hidden],
.story-batch-gallery[hidden],
.story-batch-preview-overlay[hidden],
.story-batch-period-menu[hidden],
.btn-datetime-picker[hidden],
.btn-schedule-dropdown[hidden] {
  display: none;
}

.story-batch-options {
  margin: 14px 16px;
  padding: 15px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #ffffff 72%);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.story-batch-options-heading strong {
  display: block;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 700;
}

.story-batch-options-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.story-batch-options-heading p {
  margin: 4px 0 0;
  color: #86868b;
  font-size: 11px;
  line-height: 1.45;
}

.story-batch-add-photos {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbdcf5;
  border-radius: 9px;
  background: #fff;
  color: #2563eb;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.story-batch-add-photos:hover,
.story-batch-add-photos:focus-visible {
  border-color: #93b4ef;
  background: #f0f7ff;
  outline: none;
}

.story-batch-add-photos:disabled {
  cursor: wait;
  opacity: 0.55;
}

.story-batch-options-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(110px, 0.7fr) minmax(270px, 2.2fr);
  gap: 9px;
  margin-top: 13px;
}

.story-batch-field {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  color: #515154;
  font-size: 11px;
  font-weight: 650;
}

.story-batch-field input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 9px;
  border: 1px solid #d2d2d7;
  border-radius: 9px;
  background: #fff;
  color: #1d1d1f;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
}

.story-batch-field input:focus {
  border-color: #4285f4;
  outline: 3px solid rgba(66, 133, 244, 0.13);
}

.story-batch-periods-field {
  position: relative;
  min-width: 0;
  margin: 0;
}

.story-batch-periods-field.is-open {
  z-index: 80;
}

.story-batch-periods-label {
  display: block;
  margin-bottom: 5px;
  color: #515154;
  font-size: 11px;
  font-weight: 650;
}

.story-batch-period-trigger {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #d2d2d7;
  border-radius: 9px;
  background: #fff;
  color: #1d1d1f;
  font-family: inherit;
  font-size: 12px;
  font-weight: 550;
  text-align: left;
  cursor: pointer;
}

.story-batch-period-trigger:hover {
  border-color: #aebed2;
}

.story-batch-period-trigger:focus-visible {
  border-color: #4285f4;
  outline: 3px solid rgba(66, 133, 244, 0.13);
}

.story-batch-period-trigger:disabled {
  cursor: wait;
  opacity: 0.6;
}

.story-batch-period-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-batch-period-trigger i {
  flex: 0 0 auto;
  color: #86868b;
  font-size: 10px;
}

.story-batch-period-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 81;
  display: grid;
  width: 100%;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  background: #fbfbfd;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.story-batch-period-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 31px;
  padding: 5px 8px;
  border-radius: 5px;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
}

.story-batch-period-option:hover,
.story-batch-period-option:focus-within {
  background: #e8eef6;
}

.story-batch-period-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.story-batch-period-marker {
  display: inline-flex;
  flex: 0 0 14px;
  align-items: center;
  justify-content: center;
  width: 14px;
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.story-batch-period-option input:checked + .story-batch-period-marker::before {
  content: '✓';
}

.story-batch-period-option input:focus-visible + .story-batch-period-marker {
  outline: 2px solid #4285f4;
  outline-offset: 2px;
  border-radius: 2px;
}

.story-batch-summary {
  margin: 11px 0 0;
  color: #2563eb;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.4;
}

.story-batch-gallery {
  margin: 12px 16px 8px;
}

.story-batch-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 9px;
  max-height: 330px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.story-batch-photo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 10px;
  background: #1d1d1f;
}

.story-batch-photo-open {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  padding: 0;
  border: 0;
  background: #1d1d1f;
  cursor: zoom-in;
}

.story-batch-photo-open img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-batch-file-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
}

.story-batch-file-remove:hover,
.story-batch-file-remove:focus-visible {
  background: #dc2626;
  outline: none;
}

.story-batch-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 10, 18, 0.78);
  backdrop-filter: blur(8px);
}

.story-batch-preview-dialog {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(100%, 470px);
  max-height: 94vh;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #111827;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
  color: #fff;
}

.story-batch-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-batch-preview-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.story-batch-preview-header p {
  margin: 3px 0 0;
  color: #d2d2d7;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.story-batch-preview-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.story-batch-preview-close:hover,
.story-batch-preview-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.story-batch-preview-image {
  display: block;
  width: 100%;
  max-height: calc(94vh - 76px);
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}

@media (max-width: 640px) {
  .story-batch-options {
    margin: 12px 0;
    padding: 13px;
  }

  .story-batch-options-heading {
    flex-direction: column;
  }

  .story-batch-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-batch-periods-field {
    grid-column: 1 / -1;
  }

  .story-batch-gallery {
    margin: 12px 0 8px;
  }
}

.bar-extra-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-pill-action {
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-pill-action:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.14);
  color: var(--text-primary);
}

.btn-pill-action:active {
  transform: scale(0.97);
}

/* Editor Section */
.editor-container {
  padding: 8px 28px 14px;
  display: flex;
  flex-direction: column;
}

.editor-box-card {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.015);
  transition: border-color 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 230px;
  position: relative;
}

.editor-box-card:focus-within {
  border-color: var(--mc-blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12), 0 4px 16px rgba(0, 113, 227, 0.06);
}

.editor-textarea {
  width: 100%;
  min-height: 135px;
  padding: 16px 18px 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: #000000;
  background: transparent;
  outline: none;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
  letter-spacing: -0.011em;
  scrollbar-width: thin;
}

.editor-textarea * {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif !important;
  font-size: inherit !important;
  font-weight: 400 !important;
  font-style: normal !important;
  color: #000000 !important;
  background: transparent !important;
  text-decoration: none !important;
}

.editor-textarea:empty:before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  cursor: text;
}

/* In-Editor Media Thumbnail */
.editor-media-preview-area {
  padding: 0 16px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.carousel-selection-hint {
  color: var(--text-secondary);
  font-size: 11.5px;
  letter-spacing: -0.01em;
}

.carousel-attachments-box {
  margin: 0 16px 12px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  background: #fbfbfd;
}

.carousel-attachments-box[hidden],
.carousel-preview-controls[hidden] {
  display: none !important;
}

.carousel-attachments-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.carousel-attachments-heading > div {
  display: grid;
  gap: 2px;
}

.carousel-attachments-heading strong {
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
}

.carousel-attachments-heading > div span {
  color: var(--text-secondary);
  font-size: 11px;
  letter-spacing: -0.005em;
}

.carousel-attachment-count {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 9999px;
  background: rgba(0, 113, 227, 0.08);
  color: var(--mc-blue);
  font-size: 11px;
  font-weight: 650;
}

.carousel-attachments-list {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 2px 2px 6px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.carousel-attachment-item {
  position: relative;
  flex: 0 0 120px;
  width: 120px;
  padding: 6px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  cursor: grab;
  transition: border-color 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.16s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-attachment-item:hover,
.carousel-attachment-item.is-drop-target {
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.12);
}

.carousel-attachment-item.is-dragging {
  opacity: 0.48;
  transform: scale(0.96);
  cursor: grabbing;
}

.carousel-attachment-preview {
  display: block;
  width: 108px;
  height: 68px;
  object-fit: cover;
  border-radius: 8px;
  background: #f2f2f7;
}

.carousel-attachment-order {
  position: absolute;
  top: 10px;
  left: 10px;
  display: grid;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 9999px;
  background: rgba(29, 29, 31, 0.85);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
}

.carousel-attachment-name {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.carousel-attachment-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 4px;
}

.carousel-attachment-cover {
  color: #7f35bd;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.carousel-attachment-actions {
  display: flex;
  gap: 2px;
}

.carousel-attachment-move,
.carousel-attachment-remove {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.carousel-attachment-move {
  background: #f5f5f7;
  color: var(--text-secondary);
}

.carousel-attachment-move:hover:not(:disabled) {
  background: rgba(0, 113, 227, 0.1);
  color: var(--mc-blue);
}

.carousel-attachment-move:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-attachment-remove {
  background: rgba(255, 59, 48, 0.08);
  color: #ff3b30;
}

.carousel-attachment-remove:hover:not(:disabled) {
  background: rgba(255, 59, 48, 0.15);
  color: #d70015;
}

.carousel-attachment-remove:disabled {
  background: #f5f5f7;
  color: var(--text-muted);
  opacity: 0.45;
  cursor: default;
}

.editor-media-thumb {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.editor-media-thumb:hover {
  transform: scale(1.02);
}

.editor-media-thumb img,
.editor-media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-thumb-dots {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  border: none;
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.editor-thumb-dots:hover {
  background: rgba(255, 59, 48, 0.85);
}

/* Editor Toolbar */
.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #ffffff;
  border-radius: 0 0 16px 16px;
}

.editor-tools-group {
  display: flex;
  align-items: center;
  gap: 3px;
}

.editor-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.editor-tool-btn:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
}

.editor-tool-btn:active {
  transform: scale(0.96);
}

.editor-tool-btn.active-tool {
  background: rgba(0, 113, 227, 0.08);
  color: var(--mc-blue);
}

.editor-tool-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.editor-tool-btn i {
  font-size: 17px;
}

.story-text-editor[hidden],
.story-text-overlay[hidden] {
  display: none !important;
}

.story-text-editor {
  display: grid;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 13px 14px 11px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 13px;
  background: #fbfbfd;
}

.story-text-editor__heading,
.story-text-editor__heading > div,
.story-text-editor__field {
  display: grid;
  gap: 5px;
}

.story-text-editor__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.story-text-editor__heading strong {
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 700;
}

.story-text-editor__heading span,
.story-text-editor__hint {
  color: #7b7b83;
  font-size: 10.5px;
  line-height: 1.4;
}

.story-text-editor__add,
.story-text-editor__mention,
.story-text-editor__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 10px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 9px;
  background: #ffffff;
  color: #3f4652;
  font: inherit;
  font-size: 10.5px;
  font-weight: 650;
  cursor: pointer;
}

.story-text-editor__add:hover,
.story-text-editor__mention:hover {
  border-color: rgba(0, 113, 227, 0.24);
  background: rgba(0, 113, 227, 0.06);
  color: #0068d1;
}

.story-text-editor__remove:hover {
  border-color: rgba(220, 38, 38, 0.22);
  background: rgba(220, 38, 38, 0.06);
  color: #b42318;
}

.story-text-editor__add:disabled,
.story-text-editor__mention:disabled,
.story-text-editor__remove:disabled,
.story-text-editor__field :disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.story-text-editor__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(155px, 0.7fr);
  gap: 10px 12px;
}

.story-text-editor__field > span,
.story-text-editor__field > label,
.story-text-editor__field--size > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #586171;
  font-size: 10.5px;
  font-weight: 650;
}

.story-text-editor__field textarea,
.story-text-editor__field select {
  box-sizing: border-box;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  border-radius: 9px;
  background: #ffffff;
  color: #22252b;
  font: inherit;
  font-size: 12px;
  outline: none;
}

.story-text-editor__field textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.4;
}

.story-text-editor__field textarea:focus,
.story-text-editor__field select:focus {
  border-color: #4384e4;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.story-text-editor__field--text {
  grid-column: 1 / -1;
}

.story-text-editor__field--size input {
  width: 100%;
  min-height: 28px;
  accent-color: #1769e0;
  cursor: pointer;
}

.story-text-editor__field--size output {
  color: #252a34;
  font-variant-numeric: tabular-nums;
}

.story-text-editor__actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 7px;
}

.story-text-editor__hint {
  margin: -2px 0 0;
}

.story-text-overlay {
  position: absolute;
  z-index: 24;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.story-text-layer {
  position: absolute;
  width: max-content;
  max-width: 84%;
  padding: 3px 7px;
  border: 2px solid transparent;
  border-radius: 7px;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: none;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  transform: translate(-50%, -50%);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.story-text-layer.is-active {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.08);
}

.story-text-layer.is-dragging {
  cursor: grabbing;
}

.story-text-layer[data-story-font="neon"] {
  text-shadow: 0 0 7px #ff58d4, 0 0 16px #ff58d4, 0 2px 8px rgba(0, 0, 0, 0.6);
}

.story-text-layer[data-story-font="strong"] {
  letter-spacing: 0.015em;
}

@media (max-width: 720px) {
  .story-text-editor__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-text-editor__field--text {
    grid-column: auto;
  }

  .story-text-editor__actions {
    justify-content: flex-start;
  }
}

.editor-tool-btn.audio-picker-selected { color: #7c3aed; background: rgba(124, 58, 237, .09); }
.audio-picker-overlay[hidden], .audio-facebook-access[hidden], .audio-picker-catalog[hidden],
.audio-picker-unsupported[hidden], .audio-picker-error[hidden], .audio-selected-panel[hidden],
#audioPreviewPlayer[hidden] { display: none !important; }
.audio-picker-overlay {
  position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 18px;
  background: rgba(15, 23, 42, .48); backdrop-filter: blur(5px);
}
.audio-picker-dialog {
  display: flex; flex-direction: column; width: min(560px, 100%); max-height: min(86vh, 780px);
  overflow: hidden; border: 1px solid rgba(226, 232, 240, .9); border-radius: 20px;
  background: #fff; color: #1d1d1f; box-shadow: 0 24px 72px rgba(15, 23, 42, .24);
}
.audio-picker-heading, .audio-search-heading, .audio-selected-track, .audio-picker-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.audio-picker-heading { padding: 20px 22px 10px; }
.audio-picker-eyebrow { color: #7c3aed; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.audio-picker-heading h2 { margin: 3px 0 0; color: #1d1d1f; font-size: 21px; font-weight: 750; }
.audio-picker-close, .audio-selected-track > button {
  display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 50%;
  background: #f5f5f7; color: #515154; cursor: pointer;
}
.audio-picker-description { margin: 0; padding: 0 22px 12px; color: #86868b; font-size: 12px; }
.audio-picker-unsupported, .audio-picker-error, .audio-facebook-access {
  margin: 0 22px 14px; padding: 12px 14px; border-radius: 12px; font-size: 12px; line-height: 1.5;
}
.audio-picker-unsupported { display: flex; gap: 10px; border: 1px solid #bfdbfe; background: #f0f7ff; color: #1e40af; }
.audio-picker-unsupported p, .audio-facebook-access p { margin: 0; }
.audio-picker-error { border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c; }
.audio-facebook-access { border: 1px solid #ddd6fe; background: #f5f3ff; color: #4c1d95; }
.audio-facebook-access strong { display: block; margin-bottom: 4px; font-size: 12px; }
.audio-facebook-access label { display: block; margin: 11px 0 5px; color: #424245; font-size: 11px; font-weight: 700; }
.audio-facebook-access input {
  box-sizing: border-box; width: 100%; padding: 9px 11px; border: 1px solid #d2d2d7;
  border-radius: 9px; background: #fff; color: #1d1d1f; font: inherit; font-size: 12px;
}
.audio-connect-submit {
  margin-top: 9px; padding: 8px 12px; border: 0; border-radius: 9px; background: #6d28d9;
  color: #fff; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700;
}
.audio-picker-catalog { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; padding: 0 22px; }
.audio-picker-tabs { display: flex; gap: 6px; padding: 2px 0 12px; }
.audio-type-tab {
  padding: 7px 11px; border: 1px solid #e5e5ea; border-radius: 999px; background: #fff;
  color: #86868b; cursor: pointer; font: inherit; font-size: 11px; font-weight: 650;
}
.audio-type-tab.active { border-color: #c4b5fd; background: #f5f3ff; color: #6d28d9; }
.audio-search-form {
  display: flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 8px 0 12px;
  border: 1px solid #e5e5ea; border-radius: 11px; color: #aeaeb2;
}
.audio-search-form input { flex: 1; min-width: 0; border: 0; outline: 0; color: #1d1d1f; font: inherit; font-size: 12px; }
.audio-search-form button {
  padding: 6px 9px; border: 0; border-radius: 8px; background: #f5f5f7; color: #424245;
  cursor: pointer; font: inherit; font-size: 10px; font-weight: 700;
}
.audio-search-heading { padding: 14px 0 7px; color: #424245; font-size: 11px; }
.audio-search-heading span { color: #aeaeb2; font-weight: 500; }
.audio-results { display: grid; gap: 5px; min-height: 72px; max-height: 250px; overflow-y: auto; padding: 1px 3px 8px 0; }
.audio-result-row { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px; border: 1px solid transparent; border-radius: 11px; }
.audio-result-row.selected { border-color: #c4b5fd; background: #faf5ff; }
.audio-result-select { display: flex; flex: 1; align-items: center; gap: 10px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.audio-result-cover, .audio-selected-track img { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; background: #f5f5f7; object-fit: cover; }
.audio-result-cover-fallback { display: grid; flex: 0 0 auto; width: 42px; height: 42px; place-items: center; border-radius: 8px; background: linear-gradient(145deg, #ede9fe, #dbeafe); color: #6d28d9; }
.audio-result-copy, .audio-selected-track > div { display: grid; gap: 3px; min-width: 0; }
.audio-result-copy strong, .audio-selected-track strong { overflow: hidden; color: #1d1d1f; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.audio-result-copy span, .audio-selected-track span { overflow: hidden; color: #86868b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.audio-result-duration { flex: 0 0 auto; color: #aeaeb2; font-size: 10px; }
.audio-preview-button { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border: 0; border-radius: 50%; background: #f5f5f7; color: #515154; cursor: pointer; }
.audio-selected-panel { display: grid; gap: 10px; padding: 11px 12px; border: 1px solid #e9d5ff; border-radius: 12px; background: #fcfaff; }
.audio-selected-track { justify-content: flex-start; gap: 9px; }
.audio-selected-track > div { flex: 1; }
.audio-volume-control { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; color: #515154; font-size: 10px; }
.audio-volume-control output { color: #6d28d9; font-variant-numeric: tabular-nums; font-weight: 700; }
.audio-volume-control input { grid-column: 1 / -1; width: 100%; accent-color: #7c3aed; }
.audio-picker-footer { gap: 8px; padding: 14px 22px 18px; border-top: 1px solid #f5f5f7; }
.audio-picker-cancel, .audio-picker-apply { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.audio-picker-cancel { background: #f5f5f7; color: #515154; }
.audio-picker-apply { background: #6d28d9; color: #fff; }
.audio-picker-apply:disabled { background: #d2d2d7; cursor: not-allowed; }
.audio-results-empty { margin: 18px 4px; color: #86868b; font-size: 11px; text-align: center; }
.schedule-audio-label { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: #7c3aed; font-size: 10px; font-weight: 650; line-height: 1.3; }
.schedule-audio-label i { flex: 0 0 auto; font-size: 9px; }

.editor-counters {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11.5px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.counter-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Accordions Section */
.accordions-section {
  padding: 0 28px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.accordion-card {
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.accordion-card:hover {
  border-color: rgba(0, 0, 0, 0.1);
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px;
  background: #ffffff;
  border: none;
  cursor: pointer;
  text-align: left;
  user-select: none;
  transition: background-color 0.14s ease;
}

.accordion-header:hover {
  background: rgba(0, 0, 0, 0.015);
}

.accordion-title-left {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.012em;
}

.accordion-title-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.badge-new {
  background-color: rgba(52, 199, 89, 0.1);
  color: #248a3d;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 7px;
  border-radius: 9999px;
}

/* Apple iOS styled Switch */
.mc-switch-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-label-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
}

.custom-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
}

.custom-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e9e9ea;
  transition: background-color 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 2px;
  bottom: 2px;
  background-color: #ffffff;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .switch-slider {
  background-color: #34c759;
}

input:checked + .switch-slider:before {
  transform: translateX(16px);
}

.accordion-body {
  padding: 12px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: #fbfbfd;
  font-size: 12.5px;
  color: var(--text-secondary);
  display: none;
}

.accordion-card.open .accordion-body {
  display: block;
}

.accordion-card.open .chevron-icon {
  transform: rotate(180deg);
}

.trial-reel-strategy-setting {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 11px 12px;
  border: 1px solid rgba(225, 48, 108, 0.14);
  border-radius: 10px;
  background: #ffffff;
}

.trial-reel-strategy-setting[hidden] {
  display: none;
}

.trial-reel-strategy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.trial-reel-strategy-heading label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.trial-reel-strategy-heading select {
  min-height: 34px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.trial-reel-strategy-heading select:focus-visible {
  outline: 2px solid rgba(225, 48, 108, 0.45);
  outline-offset: 2px;
}

.trial-reel-strategy-setting p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .trial-reel-strategy-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .trial-reel-strategy-heading select {
    width: 100%;
  }
}

.chevron-icon {
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  font-size: 11px;
}

/* Apple Warning Accordion Callout */
.warning-accordion-card {
  border: 1px solid rgba(255, 149, 0, 0.2);
  border-radius: 12px;
  background: rgba(255, 149, 0, 0.06);
  overflow: hidden;
}

.warning-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 15px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.warning-accordion-header:hover {
  background: rgba(255, 149, 0, 0.05);
}

.warning-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #9a5b00;
  letter-spacing: -0.01em;
}

.warning-title-left i {
  font-size: 14px;
  color: #ff9500;
}

.warning-accordion-body {
  padding: 12px 16px;
  border-top: 1px solid rgba(255, 149, 0, 0.12);
  background: transparent;
  font-size: 12px;
  line-height: 1.5;
  color: #7c4700;
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.warning-accordion-body a {
  color: #9a5b00;
  text-decoration: underline;
  font-weight: 550;
}

.warning-accordion-body a:hover {
  color: #ff9500;
}

/* Bottom Action Bar */
.planner-footer {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.btn-cancel {
  padding: 7px 16px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-cancel:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.12);
}

.btn-cancel:active {
  transform: scale(0.97);
}

.footer-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-datetime-picker {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-datetime-picker:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.14);
}

.btn-datetime-picker:active {
  transform: scale(0.97);
}

.btn-split-schedule {
  display: flex;
  align-items: stretch;
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.28);
  transition: box-shadow 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-split-schedule:hover {
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.35);
}

.btn-split-schedule.is-locked,
.btn-split-schedule.is-locked:hover {
  box-shadow: none;
}

.btn-split-schedule.is-locked .btn-schedule-main,
.btn-split-schedule.is-locked .btn-schedule-dropdown {
  background: #e5e7eb;
  color: #6b7280;
  opacity: 1;
  cursor: not-allowed;
}

.btn-split-schedule.is-locked .btn-schedule-dropdown {
  border-left-color: #d1d5db;
}

.btn-schedule-main {
  background: #007aff;
  color: #ffffff;
  border: none;
  padding: 7.5px 18px;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-schedule-main:hover:not(:disabled) {
  background: #0062cc;
}

.btn-schedule-main:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-schedule-main:disabled,
.btn-schedule-dropdown:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-schedule-dropdown {
  background: #0062cc;
  color: #ffffff;
  border: none;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.16s ease;
}

.btn-schedule-dropdown:hover:not(:disabled) {
  background: #0060c4;
}

/* RIGHT COLUMN: 42% - Apple Product Studio */
.planner-right-column {
  flex: 1 1 42%;
  max-width: 42%;
  display: flex;
  flex-direction: column;
  background: #fbfbfd;
  overflow: hidden;
  padding: 16px 24px;
  position: relative;
}

/* Preview Top Bar */
.preview-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.preview-network-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1d1d1f;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.preview-network-btn:hover {
  transform: scale(1.05);
}

.preview-view-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Apple Segmented Control */
.preview-view-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 9999px;
  padding: 2px;
  gap: 2px;
}

.toggle-view-btn {
  width: 32px;
  height: 26px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-view-btn:hover {
  color: var(--text-primary);
}

.toggle-view-btn.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

/* Feed Grid Toggle Button */
.btn-grid-preview {
  position: absolute;
  top: 58px;
  right: 24px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-grid-preview:hover {
  background: #f5f5f7;
  border-color: rgba(0, 0, 0, 0.14);
  transform: scale(1.04);
}

.btn-grid-preview:active {
  transform: scale(0.96);
}

/* Mockup Stage */
.preview-mockup-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 10px 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.preview-photo-format[hidden] {
  display: none !important;
}

.preview-photo-format {
  position: absolute;
  z-index: 5;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(360px, calc(100% - 24px));
  padding: 9px 12px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.9);
  color: #424245;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  pointer-events: none;
}

.preview-photo-format > i {
  flex: 0 0 auto;
  color: #86868b;
  font-size: 15px;
}

.preview-photo-format-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.preview-photo-format-copy span {
  color: #86868b;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.preview-photo-format-copy strong {
  overflow-wrap: anywhere;
  color: #1d1d1f;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.preview-mockup-stage.has-post-crop-controls {
  flex-direction: column;
  gap: 12px;
}

.post-crop-controls[hidden] {
  display: none !important;
}

/* Apple Floating Glass Bar for Crop Controls */
.post-crop-controls {
  box-sizing: border-box;
  flex: 0 0 auto;
  align-self: center;
  width: min(100%, 390px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.post-crop-controls-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.post-crop-controls-label {
  color: var(--text-primary);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.post-crop-ratio-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(56px, 1fr));
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}

.post-crop-ratio-btn {
  display: flex;
  min-height: 42px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 6px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  font-family: var(--font-main);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-crop-ratio-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.post-crop-ratio-btn.active,
.post-crop-ratio-btn[aria-pressed="true"] {
  color: var(--mc-blue);
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.15);
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.12), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.post-crop-ratio-btn:active {
  transform: scale(0.97);
}

.post-crop-ratio-btn:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

.post-crop-ratio-icon {
  display: block;
  width: 14px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.post-crop-ratio-btn[data-post-crop-ratio="portrait"] .post-crop-ratio-icon {
  width: 11px;
  height: 14px;
}

.post-crop-ratio-btn[data-post-crop-ratio="square"] .post-crop-ratio-icon {
  width: 13px;
  height: 13px;
}

.post-crop-ratio-btn[data-post-crop-ratio="original"] .post-crop-ratio-icon {
  width: 16px;
  height: 11px;
}

.post-crop-help {
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.3;
}

@media (max-width: 1180px) {
  .post-crop-controls {
    gap: 10px;
    padding: 8px 10px;
  }

  .post-crop-ratio-options {
    grid-template-columns: repeat(3, minmax(50px, 1fr));
  }
}

@media (max-width: 760px) {
  .post-crop-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .post-crop-controls-copy {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .post-crop-ratio-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Apple iPhone Mockup Frame */
.instagram-reel-phone {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9 / 16;
  max-height: 570px;
  background: #000000;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  contain: content;
}

/* Reels Top Bar */
.reels-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #ffffff;
}

.reels-top-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.carousel-preview-controls {
  position: absolute;
  z-index: 40;
  top: 50%;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-preview-arrow {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  cursor: pointer;
  pointer-events: auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.carousel-preview-arrow:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.8);
  transform: scale(1.08);
}

.carousel-preview-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-preview-position {
  min-width: 44px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 650;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Media Area */
.reels-media-layer {
  width: 100%;
  height: 100%;
  position: relative;
  background: #121214;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-empty-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.reels-active-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  display: none;
}

.reels-active-media:not(.hidden) {
  display: block;
}

.preview-media-eye-toggle {
  position: absolute;
  z-index: 35;
  top: 52px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.5);
  color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.preview-media-eye-toggle:hover {
  background: rgba(15, 23, 42, 0.8);
  transform: scale(1.08);
}

.reels-media-layer.preview-media-hidden .reels-active-media,
.reels-media-layer.preview-media-hidden .reels-video-controls-overlay {
  visibility: hidden;
}

#previewImage.post-crop-active {
  touch-action: none;
  user-select: none;
  cursor: grab;
}

#previewImage.post-crop-active.is-dragging {
  cursor: grabbing;
}

.reels-shadow-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, transparent 18%, transparent 62%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 20;
}

/* Center Video Controls Overlay */
.reels-video-controls-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 28;
  color: #ffffff;
  padding: 0 20px;
}

.reels-playback-buttons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.btn-reel-ctrl {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.7));
}

.btn-reel-ctrl:hover {
  transform: scale(1.14);
}

.btn-reel-play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 16px;
}

/* Reels Bottom & Side Overlays */
.reels-overlay-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 12px;
  gap: 10px;
}

.reels-info-column {
  flex: 1;
  overflow: hidden;
  color: #ffffff;
}

.reels-user-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.reels-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.reels-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reels-username {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.reels-caption-text {
  font-size: 11.5px;
  line-height: 1.4;
  color: #fbfbfd;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
  word-break: break-word;
}

.reels-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2.5px 8px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 9999px;
  font-size: 10px;
  color: #ffffff;
  max-width: 100%;
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  width: 120px;
}

.marquee-content {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Reels Vertical Action Bar */
.reels-actions-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
}

.reel-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}

.reel-action-btn i {
  font-size: 19px;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.7));
}

.reel-sound-disc {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1.5px solid #ffffff;
  position: relative;
  overflow: hidden;
  margin-top: 3px;
}

.reel-sound-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.disc-music-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  color: #ffffff;
}

/* Apple Disclaimer Alert Callout */
.preview-disclaimer-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(0, 113, 227, 0.05);
  border: 1px solid rgba(0, 113, 227, 0.14);
  color: #004fb0;
  font-size: 11.5px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  margin-top: auto;
}

.preview-disclaimer-alert i {
  font-size: 13px;
  color: var(--mc-blue);
  margin-top: 1px;
  flex-shrink: 0;
}

/* Hashtags Autocomplete Popover (Screenshot 2) */
.hashtags-autocomplete-card {
  position: absolute;
  width: 240px;
  max-height: 260px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  z-index: 95;
  display: none;
  overflow-y: auto;
  padding: 4px 0;
}

.hashtags-autocomplete-card.show {
  display: block;
}

.hashtag-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.hashtag-row-item:hover {
  background: #f5f5f7;
}

.hashtag-row-name {
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
}

.hashtag-row-count {
  font-size: 11.5px;
  color: #aeaeb2;
  font-weight: 400;
}

/* Slim scrollbar */
.hashtags-autocomplete-card::-webkit-scrollbar {
  width: 5px;
}
.hashtags-autocomplete-card::-webkit-scrollbar-track {
  background: #f5f5f7;
}
.hashtags-autocomplete-card::-webkit-scrollbar-thumb {
  background: #d2d2d7;
  border-radius: 4px;
}

/* Popover & Modals */
.popover-menu {
  position: absolute;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
  z-index: 85;
  display: none;
  overflow: hidden;
}

.popover-menu.show {
  display: block;
}

#emojiPickerPopover {
  width: 340px;
  max-width: 95vw;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 1000;
  box-sizing: border-box;
}

.emoji-search-box {
  position: relative;
  margin-bottom: 8px;
}

.emoji-search-input {
  width: 100%;
  height: 32px;
  box-sizing: border-box;
  padding: 0 10px 0 28px;
  border: 1px solid #e5e5ea;
  border-radius: 9px;
  background: #fbfbfd;
  font-family: inherit;
  font-size: 12px;
  color: #1d1d1f;
  outline: none;
  transition: all 0.15s ease;
}

.emoji-search-input:focus {
  background: #ffffff;
  border-color: #007aff;
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.12);
}

.emoji-search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: #aeaeb2;
  pointer-events: none;
}

.emoji-category-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f5f5f7;
  margin-bottom: 8px;
  overflow-x: auto;
}

.emoji-category-tabs::-webkit-scrollbar {
  display: none;
}

.emoji-cat-tab {
  padding: 4px 6px;
  font-size: 14px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  flex-shrink: 0;
  opacity: 0.6;
}

.emoji-cat-tab:hover {
  background: #f5f5f7;
  opacity: 1;
}

.emoji-cat-tab.active {
  background: #e0f2fe;
  opacity: 1;
}

.emoji-scroll-body {
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.emoji-scroll-body::-webkit-scrollbar {
  width: 5px;
}

.emoji-scroll-body::-webkit-scrollbar-thumb {
  background: #d2d2d7;
  border-radius: 9999px;
}

.emoji-category-block {
  margin-bottom: 10px;
}

.emoji-category-header {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #86868b;
  padding: 2px 4px 4px;
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.emoji-btn {
  font-size: 18.5px;
  height: 34px;
  width: 34px;
  background: none;
  border: none;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  cursor: pointer;
  transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.12s ease;
}

.emoji-btn:hover {
  background: #f5f5f7;
  transform: scale(1.18);
}

.emoji-btn:active {
  transform: scale(0.92);
}

.emoji-empty-search {
  padding: 24px 12px;
  text-align: center;
  font-size: 12.5px;
  color: #86868b;
  line-height: 1.4;
}

.emoji-empty-search i {
  display: block;
  font-size: 22px;
  color: #aeaeb2;
  margin-bottom: 6px;
}


/* ==========================================================================
   Apple Design Date & Time Picker Modal
   ========================================================================== */
#datePickerModal.active,
#postDetailModal.active,
#firstCommentModal.active,
#notesModal.active {
  display: flex !important;
}

/* Open dialogs without filtering the entire page behind each window. */
#datePickerModal,
#postDetailModal,
#firstCommentModal,
#notesModal,
#commentAutoOverlay,
#audioPickerModal,
#accountConnectModal,
#storyBatchPreviewModal,
#composerMessageBox {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Apple Date & Time Picker Modal (macOS / iOS Sonoma Design) */
.apple-date-picker-card {
  width: min(calc(100vw - 32px), 560px);
  max-width: 560px;
  max-height: 90vh;
  max-height: min(90vh, calc(100dvh - 32px));
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 32px 84px -16px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: clamp(12px, 2dvh, 20px) clamp(14px, 3vw, 26px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  box-sizing: border-box;
}

@keyframes appleModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.apple-date-picker-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: clamp(6px, 1.2dvh, 12px);
  gap: 12px;
}

.apple-date-picker-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 8px;
}

.apple-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 12px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.18);
  color: #007aff;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.apple-date-picker-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: #86868b;
  letter-spacing: -0.005em;
}

.apple-modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: #86868b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.14s ease;
  flex-shrink: 0;
}

.apple-modal-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #1d1d1f;
  transform: scale(1.05);
}

.apple-modal-close-btn:active {
  transform: scale(0.92);
}

/* Apple Mini-Calendar Container */
.apple-cal-container {
  background: #fbfbfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  padding: clamp(8px, 1.5dvh, 14px) clamp(10px, 1.8vw, 16px);
  margin-bottom: clamp(6px, 1.2dvh, 12px);
}

.apple-cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(4px, 1dvh, 10px);
}

.apple-cal-month-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.012em;
}

.apple-cal-nav-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  color: #48484a;
  display: grid;
  place-items: center;
  font-size: 11px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.14s ease;
}

.apple-cal-nav-btn:hover {
  background: #f5f5f7;
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.15);
  transform: scale(1.05);
}

.apple-cal-nav-btn:active {
  transform: scale(0.92);
}

.apple-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(2px, 0.5dvh, 4px);
  margin-bottom: clamp(3px, 0.7dvh, 6px);
  text-align: center;
  font-size: clamp(8px, 1.1dvh, 11px);
  font-weight: 650;
  color: #86868b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.apple-cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: clamp(2px, 0.5dvh, 4px);
}

.apple-cal-day {
  min-height: clamp(24px, 4dvh, 40px);
  padding: clamp(1px, 0.45dvh, 4px) 2px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 10px;
  background: #ffffff;
  color: #1d1d1f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.apple-cal-day:hover:not(.is-selected):not(.is-other-month) {
  background: #f2f2f7;
  border-color: rgba(0, 0, 0, 0.1);
  transform: translateY(-1.5px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.apple-cal-day:active:not(.is-other-month) {
  transform: scale(0.95);
}

.apple-cal-day.is-today:not(.is-selected) {
  border-color: rgba(0, 113, 227, 0.5);
  background: #f0f7ff;
}

.apple-cal-day.is-selected {
  background: #007aff !important;
  color: #ffffff !important;
  border-color: #007aff !important;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4) !important;
  transform: scale(1.02);
}

.apple-cal-day.is-other-month {
  color: #c7c7cc;
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.apple-cal-day-num {
  font-size: clamp(11px, 1.5dvh, 13.5px);
  font-weight: 650;
  line-height: 1.1;
  margin-top: 1px;
}

/* Day counter badge directly under day number */
.apple-cal-count-badge {
  font-size: clamp(6.5px, 1dvh, 9px);
  font-weight: 600;
  line-height: 1;
  padding: clamp(1px, 0.25dvh, 2px) clamp(2px, 0.45dvh, 4px);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  max-width: 95%;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.apple-cal-count-badge.is-zero {
  color: #8e8e93;
  background: rgba(0, 0, 0, 0.03);
}

.apple-cal-count-badge.is-warn {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid rgba(217, 119, 6, 0.25);
  font-weight: 700;
}

.apple-cal-count-badge.is-target {
  color: #15803d;
  background: #dcfce7;
  border: 1px solid rgba(34, 197, 94, 0.25);
  font-weight: 700;
}

.apple-cal-count-badge.is-full {
  color: #1e40af;
  background: #dbeafe;
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-weight: 700;
}

.apple-cal-day.is-selected .apple-cal-count-badge {
  background: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  border-color: transparent !important;
}

/* Alert Box when 1 post or Goal Status */
.apple-day-alert-card {
  border-radius: 14px;
  padding: clamp(7px, 1.3dvh, 12px) clamp(9px, 1.5dvh, 14px);
  margin-bottom: clamp(6px, 1.3dvh, 12px);
}

@keyframes appleAlertFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.apple-day-alert-card.is-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.apple-alert-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.apple-alert-icon-warn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fef3c7;
  color: #d97706;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.apple-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

.apple-alert-desc {
  font-size: 11.5px;
  color: #78350f;
  line-height: 1.4;
}

.apple-alert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.9dvh, 8px);
  margin-top: clamp(5px, 1.1dvh, 10px);
  padding-top: clamp(5px, 1dvh, 9px);
  border-top: 1px solid rgba(217, 119, 6, 0.18);
}

.apple-alert-btn {
  font-family: inherit;
  font-size: clamp(10px, 1.3dvh, 11.5px);
  font-weight: 650;
  padding: clamp(4px, 0.75dvh, 6px) clamp(7px, 1.5dvh, 12px);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.14s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.apple-alert-btn.keep-day {
  background: #ffffff;
  border: 1px solid #fcd34d;
  color: #92400e;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.apple-alert-btn.keep-day:hover {
  background: #fef3c7;
  transform: translateY(-0.5px);
}

.apple-alert-btn.switch-day {
  background: #007aff;
  border: none;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 113, 227, 0.28);
}

.apple-alert-btn.switch-day:hover {
  background: #0062cc;
  box-shadow: 0 4px 10px rgba(0, 113, 227, 0.35);
  transform: translateY(-0.5px);
}

/* Status Pills for 0 posts, target met, or full */
.apple-day-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: clamp(6px, 1dvh, 9px) clamp(9px, 1.5dvh, 13px);
  border-radius: 12px;
  font-size: clamp(10px, 1.3dvh, 12px);
  font-weight: 550;
  margin-bottom: clamp(6px, 1.3dvh, 12px);
}

.apple-day-status-pill.is-target {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.apple-day-status-pill.is-empty {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.apple-day-status-pill.is-full {
  background: #fbfbfd;
  border: 1px solid #e5e5ea;
  color: #515154;
}

/* Scheduled posts info box */
.apple-date-schedule-box {
  background: #fbfbfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: clamp(7px, 1.2dvh, 11px) clamp(9px, 1.5dvh, 14px);
  margin-bottom: clamp(6px, 1.3dvh, 12px);
}

.apple-date-schedule-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(10px, 1.3dvh, 12px);
  font-weight: 500;
  color: #86868b;
}

.apple-date-schedule-header.has-posts {
  color: #1d1d1f;
}

.apple-date-schedule-header.has-posts strong {
  color: #007aff;
}

.apple-date-schedule-header.no-posts strong {
  color: #248a3d;
}

.apple-date-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(4px, 0.7dvh, 6px);
  margin-top: clamp(4px, 0.9dvh, 8px);
}

.apple-time-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: clamp(2px, 0.4dvh, 3px) clamp(7px, 1dvh, 9px);
  border-radius: 9999px;
  background: rgba(0, 113, 227, 0.08);
  border: 1px solid rgba(0, 113, 227, 0.16);
  color: #007aff;
  font-size: clamp(10px, 1.3dvh, 11.5px);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.apple-time-chip-sep {
  opacity: 0.4;
}

.apple-time-chip-empty {
  font-size: 11.5px;
  color: #86868b;
  font-style: italic;
}

/* Time Selector Section */
.apple-time-section {
  display: flex;
  flex-direction: column;
  gap: clamp(4px, 0.9dvh, 8px);
  background: #fbfbfd;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: clamp(7px, 1.3dvh, 12px) clamp(9px, 1.5dvh, 14px);
}

.apple-time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.apple-time-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.apple-time-rule-tag {
  font-size: 10px;
  font-weight: 700;
  color: #e03e1a;
  background: #fff1ee;
  border: 1px solid rgba(224, 62, 26, 0.2);
  padding: 2px 7px;
  border-radius: 6px;
  letter-spacing: -0.01em;
}

.apple-time-hint {
  font-size: 11.5px;
  color: #86868b;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.apple-time-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.apple-time-input-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.apple-time-input {
  box-sizing: border-box;
  height: clamp(30px, 4.2dvh, 38px);
  padding: 0 10px;
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  background: #ffffff;
  color: #1d1d1f;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: all 0.15s ease;
  width: 110px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.apple-time-input:focus {
  background: #ffffff;
  border-color: #007aff;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.apple-time-input.time-input-error {
  border-color: #ef4444 !important;
  background: #fef2f2 !important;
  color: #b91c1c !important;
  animation: appleShake 0.35s ease;
}

@keyframes appleShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.apple-time-offset-note {
  font-size: 9.5px;
  color: #86868b;
  font-weight: 600;
}

.apple-time-presets {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  flex-wrap: wrap;
}

.apple-time-preset-btn {
  flex: 1;
  min-width: 65px;
  height: clamp(30px, 4.2dvh, 38px);
  border: 1px solid #d2d2d7;
  border-radius: 10px;
  background: #ffffff;
  color: #424245;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.14s ease;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}

.apple-time-preset-btn:hover:not(:disabled):not(.is-blocked) {
  background: #fbfbfd;
  color: #1d1d1f;
  border-color: #aeaeb2;
  transform: translateY(-1px);
}

.apple-time-preset-btn.is-prime:not(:disabled):not(.is-blocked) {
  border: 1px solid #aeaeb2;
  background: rgba(0, 113, 227, 0.04);
  color: #007aff;
  font-weight: 700;
}

.apple-time-preset-btn.is-prime:hover:not(:disabled):not(.is-blocked) {
  background: rgba(0, 113, 227, 0.09);
  border-color: #86868b;
}

.apple-time-preset-btn.active:not(:disabled):not(.is-blocked) {
  background: #007aff !important;
  border-color: #007aff !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 3px 10px rgba(0, 113, 227, 0.35);
  transform: scale(1.02);
}

/* Estado bloqueado / já agendado */
.apple-time-preset-btn.is-blocked,
.apple-time-preset-btn:disabled {
  background: #f5f5f7 !important;
  border: 1px solid #e5e5ea !important;
  color: #aeaeb2 !important;
  cursor: not-allowed !important;
  opacity: 0.72 !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Modal Footer Buttons */
.apple-date-picker-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: clamp(8px, 1.6dvh, 16px);
  padding-top: clamp(8px, 1.4dvh, 14px);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.apple-btn-secondary {
  padding: 8px 18px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.apple-btn-secondary:hover {
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(0, 0, 0, 0.12);
  transform: translateY(-0.5px);
}

.apple-btn-secondary:active {
  transform: scale(0.97);
}

.apple-btn-primary {
  padding: 8px 22px;
  border-radius: 9999px;
  background: #007aff;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 113, 227, 0.32);
  transition: all 0.15s ease;
}

.apple-btn-primary:hover {
  background: #0062cc;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.42);
  transform: translateY(-0.5px);
}

.apple-btn-primary:active {
  transform: scale(0.98);
}

@media (max-height: 760px) {
  .apple-date-picker-card {
    padding: 10px 16px;
    border-radius: 18px;
  }

  .apple-date-picker-header { margin-bottom: 6px; }
  .apple-cal-container { padding: 7px 10px; margin-bottom: 6px; }
  .apple-cal-header { margin-bottom: 3px; }
  .apple-cal-nav-btn { width: 26px; height: 26px; }
  .apple-cal-weekdays { margin-bottom: 3px; }
  .apple-cal-day { min-height: clamp(22px, 3.7dvh, 28px); }
  .apple-day-alert-card { padding: 7px 9px; margin-bottom: 6px; }
  .apple-day-status-pill { margin-bottom: 6px; }
  .apple-date-schedule-box { padding: 6px 9px; margin-bottom: 6px; }
  .apple-time-section { gap: 4px; padding: 6px 9px; }
  .apple-date-picker-footer { margin-top: 7px; padding-top: 7px; }
}

@media (max-height: 760px) and (min-width: 700px) {
  .apple-date-picker-card {
    width: min(calc(100vw - 32px), 960px);
    max-width: 960px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    grid-template-areas:
      "header header"
      "calendar alert"
      "calendar schedule"
      "calendar time"
      "calendar footer";
    align-content: center;
    gap: 8px 14px;
  }

  .apple-date-picker-header { grid-area: header; margin: 0; }
  .apple-cal-container { grid-area: calendar; align-self: center; margin: 0; }
  #datePickerDayAlertContainer { grid-area: alert; }
  .apple-date-schedule-box { grid-area: schedule; margin: 0; }
  .apple-time-section { grid-area: time; }
  .apple-date-picker-footer { grid-area: footer; margin: 0; }
}

@media (max-height: 560px) {
  .apple-date-picker-subtitle { font-size: 10px; margin-top: 2px; }
  .apple-date-picker-title { font-size: 14px; }
  .apple-meta-badge { font-size: 9px; padding: 2px 6px; }
  .apple-cal-day { min-height: clamp(20px, 3.6dvh, 24px); }
  .apple-cal-day-num { font-size: 11px; }
  .apple-cal-count-badge { font-size: 6.5px; }
  .apple-alert-icon-warn { width: 22px; height: 22px; font-size: 10px; }
  .apple-alert-title { font-size: 11px; }
  .apple-alert-desc { font-size: 10px; line-height: 1.2; }
  .apple-alert-actions { margin-top: 4px; padding-top: 4px; }
  .apple-alert-btn { font-size: 9px; padding: 3px 5px; }
  .apple-date-schedule-header { font-size: 9px; }
  .apple-time-section { gap: 3px; }
  .apple-time-input { height: 27px; font-size: 12px; }
  .apple-time-preset-btn { height: 27px; min-width: 58px; font-size: 10px; }
  .apple-date-picker-footer .apple-btn-primary,
  .apple-date-picker-footer .apple-btn-secondary { padding: 5px 12px; font-size: 11px; }
}

@media (max-width: 520px) {
  .apple-date-picker-card {
    width: min(calc(100vw - 32px), 560px);
    padding-left: 12px;
    padding-right: 12px;
  }

  .apple-time-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .apple-time-input-wrap { flex-direction: row; justify-content: space-between; align-items: center; }
  .apple-time-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
    width: 100%;
  }
  .apple-time-preset-btn { min-width: 0; padding: 0 3px; font-size: 10px; }
  .apple-alert-actions { gap: 5px; }
  .apple-alert-btn { padding-left: 6px; padding-right: 6px; }
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-item {
  padding: 12px 18px;
  border-radius: 8px;
  background: #1d1d1f;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
}

/* Upload progress tray: non-blocking cards stacked on the right */
.upload-tray {
  position: fixed;
  top: 76px;
  right: 16px;
  z-index: 10001;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 92px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  overflow-y: auto;
  pointer-events: none;
  scrollbar-width: none;
}

.upload-tray:empty {
  display: none;
}

.upload-card {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 12px;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
  animation: upload-card-in 180ms ease-out backwards;
  transition: opacity 220ms ease, transform 220ms ease;
}

.upload-card.is-leaving {
  opacity: 0;
  transform: translateX(14px);
}

@keyframes upload-card-in {
  from { opacity: 0; transform: translateX(14px); }
  to { opacity: 1; transform: translateX(0); }
}

.upload-card-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
}

.upload-card-ring {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.upload-card-ring-track,
.upload-card-ring-value {
  fill: none;
  stroke-width: 7;
}

.upload-card-ring-track {
  stroke: #e5e5ea;
}

.upload-card-ring-value {
  stroke: #007aff;
  stroke-linecap: round;
  stroke-dasharray: 213.63;
  stroke-dashoffset: 213.63;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 180ms linear, stroke 180ms ease;
}

.upload-card-percent {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.upload-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.upload-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.upload-card-title {
  min-width: 0;
  overflow: hidden;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-card-close {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #f5f5f7;
  color: #86868b;
  font-size: 11px;
  cursor: pointer;
}

.upload-card-close:hover {
  background: #e5e5ea;
  color: #1d1d1f;
}

.upload-card-status,
.upload-card-meta {
  margin: 0;
  color: #86868b;
  font-size: 12px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.upload-card-file {
  margin: 2px 0 0;
  overflow: hidden;
  color: #424245;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-card.is-indeterminate .upload-card-ring-value,
.upload-card.is-processing .upload-card-ring-value {
  stroke-dasharray: 60 153.63;
}

.upload-card.is-indeterminate .upload-card-ring,
.upload-card.is-processing .upload-card-ring {
  animation: upload-card-spin 1.25s linear infinite;
}

.upload-card.is-processing .upload-card-ring-value {
  stroke: #7c3aed;
}

.upload-card.is-complete .upload-card-ring-value {
  stroke: #16a34a;
}

@keyframes upload-card-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 540px) {
  .upload-tray {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: 50dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upload-card,
  .upload-card-ring,
  .upload-card-ring-value {
    animation: none;
    transition: none;
  }
}

.composer-messagebox-overlay {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.composer-messagebox-overlay[hidden] {
  display: none;
}

.composer-messagebox {
  width: min(100%, 430px);
  padding: 24px;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  outline: none;
}

.composer-messagebox-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #f0f7ff;
  color: #2563eb;
  font-size: 16px;
}

.composer-messagebox h2 {
  margin: 0;
  color: #1d1d1f;
  font-size: 17px;
  font-weight: 700;
}

.composer-messagebox p {
  margin: 8px 0 0;
  color: #515154;
  font-size: 13px;
  line-height: 1.55;
}

.composer-messagebox-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.composer-messagebox-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #dbe3ec;
  border-radius: 9px;
  background: #ffffff;
  color: #424245;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.composer-messagebox-button:hover {
  background: #fbfbfd;
  border-color: #d2d2d7;
}

.composer-messagebox-button:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

.composer-messagebox-button.is-primary {
  border-color: #007aff;
  background: #007aff;
  color: #ffffff;
}

.composer-messagebox-button.is-primary:hover {
  border-color: #0062cc;
  background: #0062cc;
}

.composer-messagebox-button.is-danger {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.composer-messagebox-button.is-danger:hover {
  border-color: #b91c1c;
  background: #b91c1c;
}

@media (max-width: 480px) {
  .upload-progress-card {
    padding: 24px 18px 20px;
  }

  .composer-messagebox {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .upload-progress-ring-value {
    transition: none;
  }

  .upload-progress-card.is-processing .upload-progress-ring-value {
    animation: none;
  }
}

@keyframes upload-progress-orbit {
  from { transform: rotate(-90deg); }
  to { transform: rotate(270deg); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Icon glyph fallbacks */
.fa-gear, .fa-cog {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-gear::before, .fa-cog::before {
  content: "\f013" !important;
}

.fa-regular.fa-circle-info, .fa-circle-info {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-regular.fa-circle-info::before, .fa-circle-info::before {
  content: "\f05a" !important;
}

.fa-regular.fa-camera, .fa-camera {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-regular.fa-camera::before, .fa-camera::before {
  content: "\f030" !important;
}

.fa-regular.fa-display, .fa-display {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-regular.fa-display::before, .fa-display::before {
  content: "\e163" !important;
}

.fa-regular.fa-circle-dot, .fa-circle-dot {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}
.fa-regular.fa-circle-dot::before, .fa-circle-dot::before {
  content: "\f192" !important;
}

/* --- Top Navigation Tabs (Apple Segmented Control) --- */
.top-nav-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: rgba(120, 120, 128, 0.09);
  padding: 3px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 9999px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.top-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #636366;
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-nav-tab:hover:not(.active) {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.55);
}

.top-nav-tab:active {
  transform: scale(0.98);
}

.top-nav-tab.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0.5px 1.5px rgba(0, 0, 0, 0.04);
}

.top-nav-tab.active > i {
  color: #007aff;
}

.tab-badge {
  background: #007aff;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1.5px 6.5px;
  border-radius: 9999px;
  margin-left: 2px;
  line-height: 1.2;
}

/* --- View Toggle Logic --- */
.app-view {
  display: none;
  width: 100%;
  flex: 1;
}

.app-view.active {
  display: flex;
}

#viewStoryConsulte.app-view.active {
  min-height: calc(100vh - 65px);
}

#storyConsulteFrame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 65px);
  flex: 1 1 auto;
  border: 0;
  background: #fbfbfd;
}

/* Preserve prepared layout between tabs in browsers that can skip rendering
   hidden subtrees. Older browsers retain the display:none fallback above. */
@supports (content-visibility: hidden) {
  .app-view {
    display: flex;
    content-visibility: hidden;
    contain-intrinsic-size: 0;
    height: 0;
    flex: 0 0 0;
    overflow: clip;
    visibility: hidden;
  }

  .app-view.active {
    content-visibility: visible;
    height: auto;
    flex: 1;
    overflow: visible;
    visibility: visible;
  }
}

/* --- Agendamentos Calendar View --- */
.agendamentos-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - 65px);
  background: #fbfbfd;
}

.agendamentos-toolbar {
  padding: 14px 28px;
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-month-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cal-nav {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid #e5e5ea;
  background: #ffffff;
  color: #515154;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cal-nav:hover {
  background: #f5f5f7;
  color: #1d1d1f;
}

.calendar-current-month {
  font-size: 16px;
  font-weight: 700;
  color: #1d1d1f;
  min-width: 140px;
  text-align: center;
}

.btn-cal-today {
  padding: 5px 12px;
  border-radius: 6px;
  border: 1px solid #d2d2d7;
  background: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  color: #424245;
  cursor: pointer;
}

.btn-cal-today:hover {
  background: #f5f5f7;
}

.calendar-filters-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-status-filter {
  position: relative;
}

.status-filter-trigger {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.calendar-status-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 190px;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.calendar-status-menu.open {
  display: grid;
  gap: 2px;
}

.calendar-status-menu label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 7px;
  color: #424245;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.calendar-status-menu label:hover {
  background: #f5f5f7;
}

.calendar-status-menu input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #007aff;
}

.filter-pill {
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid #e5e5ea;
  background: #ffffff;
  color: #86868b;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-pill:hover {
  background: #f5f5f7;
}

.filter-pill.active {
  background: #007aff;
  color: #ffffff;
  border-color: #007aff;
}

.view-mode-toggle {
  display: flex;
  background: rgba(120, 120, 128, 0.09);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 9999px;
  padding: 3px;
  gap: 2px;
}

.btn-mode-toggle {
  padding: 5px 13px;
  border-radius: 9999px;
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #636366;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-mode-toggle:hover:not(.active) {
  color: #1d1d1f;
  background: rgba(255, 255, 255, 0.55);
}

.btn-mode-toggle.active {
  background: #ffffff;
  color: #1d1d1f;
  font-weight: 600;
  box-shadow: 0 1.5px 6px rgba(0, 0, 0, 0.08), 0 0.5px 1.5px rgba(0, 0, 0, 0.04);
}

.schedule-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-limits-anchor { position: relative; }

.btn-schedule-limits,
.btn-organize-schedules {
  min-height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-schedule-limits {
  width: 36px;
  padding: 0;
  border: 1px solid #d8e1ed;
  background: #ffffff;
  color: #515154;
  font-size: 13px;
}

.btn-schedule-limits:hover,
.btn-schedule-limits[aria-expanded="true"] {
  border-color: #93c5fd;
  background: #f0f7ff;
  color: #1d4ed8;
}

.btn-organize-schedules {
  padding: 0 13px;
  border: 1px solid #d2d2d7;
  background: #ffffff;
  color: #424245;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 650;
}

.btn-organize-schedules:hover:not(:disabled) {
  border-color: #93c5fd;
  background: #f0f7ff;
  color: #1d4ed8;
}

.btn-organize-schedules:disabled { opacity: .6; cursor: wait; }

.schedule-limits-popover[hidden] { display: none; }

.schedule-limits-popover {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: min(1380px, calc(100vw - 32px));
  height: min(960px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(60, 60, 67, .14);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 30px 84px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .08);
  color: #1d1d1f;
  font-family: var(--apple-font);
  font-size: 14px;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  animation: schedule-limits-appear 120ms cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes schedule-limits-appear {
  from { opacity: 0; transform: translate(-50%, -48%) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.schedule-limits-popover-header,
.schedule-limits-popover-footer,
.schedule-limit-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-limits-popover-header,
.schedule-limits-popover-footer { flex: 0 0 auto; }

.schedule-limits-popover-header > div { display: grid; gap: 3px; }
.schedule-limits-popover-header strong { color: #1d1d1f; font-size: 21px; font-weight: 700; letter-spacing: -.035em; }
.schedule-limits-popover-header small,
.schedule-limit-field small { color: #86868b; font-size: 11px; font-weight: 500; }

.schedule-limits-close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f7;
  color: #6e6e73;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.schedule-limits-close:hover { background: #e8e8ed; color: #1d1d1f; }
.schedule-limits-close:active { transform: scale(.94); }

.schedule-limits-body { min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 3px 8px 0; scrollbar-color: #c7c7cc transparent; scrollbar-width: thin; }
.schedule-week-plan-section {
  padding: 14px;
  border: 1px solid rgba(60, 60, 67, .1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 113, 227, .07), transparent 40%),
    linear-gradient(180deg, #fbfbfd 0%, #f3f4f8 100%);
  font-family: inherit;
}
.schedule-week-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
}
.schedule-day-card {
  min-width: 0;
  container-type: inline-size;
  padding: 12px 14px 14px;
  border: 1px solid rgba(60, 60, 67, .08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 18px rgba(15, 23, 42, .05);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.schedule-day-card:hover {
  border-color: rgba(0, 113, 227, .22);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 10px 26px rgba(0, 113, 227, .08);
}
.schedule-day-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(60, 60, 67, .07);
}
.schedule-day-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.schedule-day-card-header strong {
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.schedule-day-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #eef4ff;
  color: #0064d1;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.schedule-add-slot,
.schedule-remove-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 0;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.schedule-add-slot {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  background: #007aff;
  color: #ffffff;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 113, 227, .22);
  white-space: nowrap;
}
.schedule-add-slot:hover:not(:disabled) {
  background: #006fe6;
  box-shadow: 0 4px 12px rgba(0, 113, 227, .3);
}
.schedule-add-slot:active:not(:disabled) {
  transform: scale(.96);
}
.schedule-remove-slot {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: transparent;
  color: #8e8e93;
  font-size: 11px;
}
.schedule-remove-slot:hover:not(:disabled) {
  background: rgba(255, 59, 48, .1);
  color: #ff3b30;
}
.schedule-remove-slot:active:not(:disabled) {
  transform: scale(.92);
}
.schedule-add-slot:disabled,
.schedule-remove-slot:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.schedule-day-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: dense;
  align-items: start;
  gap: 8px;
}
.schedule-day-slot {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 4px 4px 10px;
  border-radius: 14px;
  background: #f5f5f7;
  border: 1px solid transparent;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.schedule-day-slot:hover {
  background: #efeff4;
}
.schedule-day-slot:focus-within {
  background: #ffffff;
  border-color: rgba(0, 113, 227, .3);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, .1);
}
.schedule-day-slot[data-slot-type="story"] {
  grid-column: 2;
}
.schedule-day-slot:not([data-slot-type="story"]) {
  grid-column: 1;
}
.schedule-slot-format-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9);
}
.dot-story { background: #059669; }
.dot-reel { background: #d62976; }
.dot-test_reel,
.dot-test { background: #86868b; }
.dot-carousel { background: #7c3aed; }
.dot-post { background: #007aff; }
.schedule-day-slot select,
.schedule-day-slot input[type="time"] {
  box-sizing: border-box;
  min-width: 0;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background-color: #ffffff;
  color: #1d1d1f;
  font: inherit;
  font-size: 11px;
  box-shadow: inset 0 0 0 1px rgba(60, 60, 67, .12);
  transition: box-shadow .15s ease;
}
.schedule-day-slot select:focus,
.schedule-day-slot input[type="time"]:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px #007aff;
}
.schedule-day-slot select {
  flex: 1 1 90px;
  appearance: none;
  -webkit-appearance: none;
  padding: 0 26px 0 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2386868b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
}
.schedule-day-slot input[type="time"] {
  flex: 0 0 100px;
  width: 100px;
  padding: 0 6px;
  font-size: 12px;
  cursor: text;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.schedule-day-empty {
  margin: 0;
  padding: 12px 8px;
  border: 1px dashed rgba(60, 60, 67, .18);
  border-radius: 12px;
  color: #8e8e93;
  font-size: 11.5px;
  text-align: center;
  grid-column: 1 / -1;
}

.schedule-limits-popover-footer { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(60, 60, 67, .12); }
.schedule-limits-popover-footer p { flex: 1; margin: 0; color: #6e6e73; font-size: 11.5px; line-height: 1.4; }
.schedule-limits-popover-footer p[data-state="error"] { color: #b42318; }
.schedule-limits-popover-footer p[data-state="success"] { color: #15803d; }

.btn-save-schedule-limits {
  min-height: 36px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: #007aff;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn-save-schedule-limits:hover { background: #006fe6; box-shadow: 0 3px 10px rgba(0, 122, 255, .2); }
.btn-save-schedule-limits:active { transform: scale(.98); }
.schedule-limits-popover :focus-visible { outline: 3px solid rgba(0, 122, 255, .28); outline-offset: 2px; }

@container (max-width: 540px) {
  .schedule-day-slots { grid-template-columns: minmax(0, 1fr); }
  .schedule-day-slots .schedule-day-slot { grid-column: auto; }
}

@media (max-width: 760px) {
  .schedule-week-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 540px) {
  .schedule-limits-popover { width: calc(100vw - 16px); height: 96dvh; max-height: 96dvh; padding: 12px; border-radius: 18px; }
  .schedule-week-plan-section { padding: 8px; }
  .schedule-day-card { padding: 8px; }
  .schedule-day-title-group { flex-wrap: wrap; gap: 3px; }
  .schedule-day-slot select,
  .schedule-day-slot input[type="time"] { height: 44px; font-size: 16px; }
  .schedule-day-slot input[type="time"] { flex-basis: 112px; width: 112px; }
  .schedule-add-slot,
  .schedule-remove-slot { min-height: 44px; }
  .schedule-remove-slot { width: 36px; flex-basis: 36px; }
  .schedule-limits-popover-footer { align-items: flex-end; }
  .btn-save-schedule-limits { min-height: 44px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-limits-popover,
  .schedule-limits-popover * { animation-duration: .01ms !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.btn-new-schedule {
  padding: 7px 16px;
  border-radius: 9999px;
  background: #007aff;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 12.5px;
  font-weight: 550;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0, 113, 227, 0.25);
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-new-schedule:hover {
  background: #0062cc;
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.35);
  transform: translateY(-0.5px);
}

.btn-new-schedule:active {
  transform: scale(0.97);
}

/* Calendar Month Grid */
.calendar-grid-wrapper {
  padding: 20px 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.calendar-day-name {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #86868b;
  padding: 6px 0;
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  flex: 1;
}

.calendar-cell {
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  min-height: 130px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.calendar-cell:hover {
  border-color: #d2d2d7;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.calendar-cell.other-month {
  background: #fbfbfd;
  opacity: 0.55;
}

.calendar-cell.today {
  border-color: #38bdf8;
  background: #f0f9ff;
}

.cell-date-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.cell-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #1d1d1f;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calendar-cell.today .cell-day-num {
  background: #007aff;
  color: #ffffff;
}

.cell-posts-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 110px;
}

/* Scheduled Post Card inside Calendar (Mostra horário, capa, tipo) */
.schedule-card {
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  padding: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: all 0.15s ease;
  position: relative;
}

.schedule-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #007aff;
}

/* Capa / Thumbnail */
.schedule-card-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #1d1d1f;
  flex-shrink: 0;
}

.schedule-card-thumb img,
.schedule-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule-card-thumb .thumb-type-icon {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 8px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Info: Horário e Tipo */
.schedule-card-details {
  flex: 1;
  min-width: 0;
}

.schedule-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.schedule-card-time {
  font-size: 11px;
  font-weight: 700;
  color: #1d1d1f;
}

.schedule-card-network {
  font-size: 11px;
  color: #ff0069;
}

.schedule-card-type-pill {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-block;
  line-height: 1.2;
}

.type-pill-reel {
  background: #fdf2f8;
  color: #be185d;
}

.type-pill-post {
  background: #f0f7ff;
  color: #1d4ed8;
}

.type-pill-carousel {
  background: #f5f3ff;
  color: #7c3aed;
}

.type-pill-story {
  background: #ecfdf5;
  color: #047857;
}

.type-pill-test {
  background: #f3f4f6;
  color: #374151;
  border: 1px dashed #d1d5db;
}

.schedule-card-caption-preview {
  font-size: 10.5px;
  color: #86868b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* List View Table */
.schedule-table-wrap {
  background: #ffffff;
  border: 1px solid #e5e5ea;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.schedule-table th {
  background: #fbfbfd;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #515154;
  text-transform: uppercase;
  border-bottom: 1px solid #e5e5ea;
}

.schedule-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f7;
  font-size: 13.5px;
  color: #1d1d1f;
  vertical-align: middle;
}

.schedule-table td:nth-child(2),
.schedule-table td:nth-child(2) .schedule-card-type-pill {
  white-space: nowrap;
}

.schedule-table .schedule-date-divider-row td {
  padding: 8px 16px;
  border-top: 1px solid rgba(60, 60, 67, .09);
  border-bottom: 1px solid rgba(60, 60, 67, .09);
  background: #f8f8fa;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  font-size: 12px;
  letter-spacing: -.01em;
}

.schedule-date-divider-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.schedule-date-divider-content > span:first-child,
.schedule-date-divider-title {
  font-weight: 650;
  font-size: 12px;
  color: #1d1d1f;
  letter-spacing: -.015em;
  text-transform: capitalize;
}

.schedule-date-divider-count {
  color: #86868b;
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.schedule-date-divider-count::before {
  content: "·";
  margin-right: 12px;
  color: #c7c7cc;
  font-weight: 400;
}

.schedule-date-divider-gaps {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
}

.schedule-date-gaps-label {
  color: #86868b;
  font-size: 11px;
  font-weight: 500;
  margin-right: 2px;
}

.schedule-date-gap-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .02);
  transition: transform .12s ease;
}

.schedule-date-gap-pill:hover {
  transform: translateY(-0.5px);
}

.schedule-date-gap-pill.type-pill-reel {
  background: #fdf2f8;
  color: #db2777;
  border: 1px solid rgba(219, 39, 119, .22);
}

.schedule-date-gap-pill.type-pill-test {
  background: #fbfbfd;
  color: #515154;
  border: 1px dashed rgba(71, 85, 105, .35);
}

.schedule-date-gap-pill.type-pill-carousel {
  background: #fbf5ff;
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, .22);
}

.schedule-date-gap-pill.type-pill-story {
  background: #f0fdf4;
  color: #059669;
  border: 1px solid rgba(5, 150, 105, .22);
}

.schedule-date-gap-pill.type-pill-post {
  background: #f0f7ff;
  color: #007aff;
  border: 1px solid rgba(0, 113, 227, .22);
}

.schedule-date-gap-pill.schedule-date-gap-complete {
  background: rgba(52, 199, 89, .1);
  color: #248a3d;
  border: 1px solid rgba(52, 199, 89, .25);
}

.schedule-date-gap-pill.schedule-date-gap-none {
  background: #f2f2f7;
  color: #86868b;
  border: 1px solid rgba(60, 60, 67, .08);
}

.schedule-row-live-insert,
.schedule-card-live-insert {
  animation: schedule-live-insert 260ms ease-out both;
}

@keyframes schedule-live-insert {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-row-live-insert,
  .schedule-card-live-insert {
    animation: none;
  }
}

.schedule-actions-cell {
  text-align: right;
  white-space: nowrap;
}

.schedule-row-actions {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  overflow: hidden;
  padding: 2px;
  border: 1px solid #dbe3ec;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.schedule-row-action {
  min-width: 34px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #515154;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

.schedule-row-action + .schedule-row-action {
  border-left: 1px solid #e5e5ea;
}

.schedule-row-action-view {
  min-width: 42px;
  color: #2563eb;
}

.schedule-row-action-view:hover {
  background: #f0f7ff;
}

.schedule-row-action-edit:hover {
  background: #f5f5f7;
  color: #1d1d1f;
}

.schedule-row-action-delete {
  color: #dc2626;
}

.schedule-row-action-delete:hover {
  background: #fef2f2;
}

.schedule-row-action:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #007aff;
  outline-offset: -2px;
}

.schedule-table tr:hover td {
  background: #fbfbfd;
}

.table-thumb {
  display: block;
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: #000000;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.table-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.schedule-edit-type-select {
  width: 100%;
  min-width: 138px;
  border: 1px solid #d2d2d7;
  border-radius: 6px;
  background: #fff;
  color: #1d1d1f;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
}

#postDetailModal .post-detail-media-frame {
  width: min(100%, 168.75px);
  aspect-ratio: 9 / 16;
  max-height: 300px;
  margin-inline: auto;
}

/* Post Detail Modal */
#postDetailModal .modal-body {
  max-width: 540px;
}

/* ===== Apple visual refresh: tokens and shared surfaces ===== */
:root {
  --apple-separator: rgba(60, 60, 67, 0.16);
  --apple-fill: #f5f5f7;
  --apple-fill-hover: #ebebf0;
  --apple-blue: #007aff;
  --apple-blue-hover: #0062cc;
  --apple-focus-ring: rgba(0, 122, 255, 0.18);
}

body {
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.page-header {
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--apple-separator);
}

.site-brand__name {
  font-weight: 600;
  letter-spacing: -0.022em;
}

.brand-pill {
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 9999px;
  background: var(--apple-fill);
  transition: background-color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-pill:hover {
  background: var(--apple-fill-hover);
}

.accordion-card {
  border: 0.5px solid var(--apple-separator);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.accordion-header {
  font-weight: 600;
  letter-spacing: -0.012em;
}

.planner-footer {
  border-top: 0.5px solid var(--apple-separator);
}

.btn-cancel {
  border-radius: 10px;
  background: #ffffff;
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  font-weight: 500;
  color: #1d1d1f;
}

.btn-cancel:hover {
  background: var(--apple-fill);
}

.btn-schedule-main {
  background: var(--apple-blue);
  font-weight: 600;
  letter-spacing: -0.012em;
}

.btn-schedule-main:hover:not(:disabled) {
  background: var(--apple-blue-hover);
}

.editor-textarea {
  border-radius: 14px;
  transition: box-shadow 0.18s ease;
}

.editor-textarea:focus-within {
  box-shadow: 0 0 0 4px var(--apple-focus-ring);
}

.instagram-reel-phone {
  border-radius: 36px;
  box-shadow: 0 30px 60px -18px rgba(0, 0, 0, 0.32), 0 0 0 0.5px rgba(0, 0, 0, 0.1);
}

.toggle-view-btn {
  border-radius: 9999px;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.account-menu {
  border-radius: 16px;
}

/* ===== Apple refinement: date picker modal ===== */
#datePickerModal {
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}

.apple-date-picker-card {
  border-radius: 22px;
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.3), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  -webkit-font-smoothing: antialiased;
}

.apple-date-picker-title {
  color: #1d1d1f;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.022em;
}

.apple-date-picker-title i {
  color: var(--apple-blue);
}

.apple-date-picker-subtitle {
  color: #86868b;
  font-size: 13px;
  letter-spacing: -0.008em;
}

.apple-meta-badge {
  padding: 4px 10px;
  border: 0;
  border-radius: 9999px;
  background: rgba(0, 122, 255, 0.1);
  color: #0062cc;
  font-size: 11.5px;
  font-weight: 600;
}

.apple-modal-close-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 9999px;
  background: var(--apple-fill);
  color: #86868b;
}

.apple-modal-close-btn:hover {
  background: #e8e8ed;
}

.apple-cal-container {
  border: 0.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 18px;
  background: #fbfbfd;
}

.apple-cal-month-title {
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.apple-cal-nav-btn {
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 9999px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.apple-cal-weekdays span {
  color: #86868b;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.apple-cal-day {
  border: 0;
  border-radius: 12px;
  box-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
  font-variant-numeric: tabular-nums;
}

.apple-cal-day.is-selected {
  background: #007aff;
  color: #ffffff;
  box-shadow: 0 6px 14px -4px rgba(0, 122, 255, 0.45);
}

.apple-cal-count-badge {
  color: #86868b;
  font-weight: 500;
}

.apple-cal-day.is-selected .apple-cal-count-badge {
  color: rgba(255, 255, 255, 0.85);
}

.apple-time-rule-tag {
  border: 0;
  border-radius: 9999px;
  background: rgba(255, 149, 0, 0.14);
  color: #c93400;
  font-weight: 600;
}

.apple-time-hint {
  color: #86868b;
}

.apple-time-input {
  border: 0.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.apple-time-preset-btn {
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  background: #ffffff;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.apple-time-preset-btn.active:not(:disabled):not(.is-blocked) {
  border-color: rgba(0, 122, 255, 0.45);
  background: rgba(0, 122, 255, 0.1);
  color: #0062cc;
}

.apple-date-picker-footer {
  border-top: 0.5px solid rgba(60, 60, 67, 0.16);
}

.apple-btn-secondary {
  border: 0;
  background: var(--apple-fill);
  font-size: 14px;
  font-weight: 500;
}

.apple-btn-secondary:hover {
  background: var(--apple-fill-hover);
  border: 0;
}

.apple-btn-primary {
  box-shadow: 0 4px 12px -2px rgba(0, 122, 255, 0.4);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ===== Apple redesign: date picker modal, bolder layout ===== */
.apple-date-picker-card {
  width: min(calc(100vw - 32px), 600px);
  max-width: 600px;
  padding: 24px 28px 22px;
  border-radius: 28px;
}

.apple-date-picker-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.apple-date-picker-subtitle {
  margin-top: 4px;
  font-size: 14px;
}

.apple-meta-badge {
  padding: 5px 12px;
  font-size: 12px;
}

.apple-modal-close-btn {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.apple-cal-container {
  padding: 16px;
  border: 0;
  border-radius: 22px;
  background: #f5f5f7;
}

.apple-cal-month-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.apple-cal-weekdays span {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.apple-cal-day {
  min-height: 56px;
  border-radius: 14px;
  box-shadow: none;
}

.apple-cal-day-num {
  font-size: 16px;
  font-weight: 600;
}

.apple-cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px #007aff;
}

.apple-cal-day.is-selected {
  box-shadow: 0 8px 18px -6px rgba(0, 122, 255, 0.6);
}

.apple-time-section {
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}

.apple-time-label {
  font-size: 15px;
  font-weight: 600;
}

.apple-time-input {
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #f5f5f7;
  font-size: 18px;
  font-weight: 600;
}

.apple-time-presets {
  gap: 8px;
}

.apple-time-preset-btn {
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f7;
  font-size: 14px;
}

.apple-time-preset-btn.active:not(:disabled):not(.is-blocked) {
  background: #007aff;
  color: #ffffff;
}

.apple-date-picker-footer {
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 0;
  border-top: 0;
}

.apple-btn-secondary {
  padding: 12px 8px;
  border: 0;
  background: transparent;
  color: #007aff;
  font-size: 16px;
  font-weight: 500;
}

.apple-btn-secondary:hover {
  background: transparent;
  color: #0062cc;
}

.apple-btn-primary {
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
}

/* Keep the bolder modal inside shorter windows */
.apple-date-picker-card {
  padding: clamp(14px, 2.4dvh, 24px) clamp(18px, 3.4vw, 28px) clamp(14px, 2.2dvh, 22px);
}

.apple-cal-day {
  min-height: clamp(40px, 5.8dvh, 56px);
}

.apple-cal-container,
.apple-time-section {
  padding: clamp(10px, 1.6dvh, 16px);
}

.apple-date-picker-footer {
  margin-top: clamp(10px, 1.8dvh, 18px);
}

/* The header's blur creates its own stacking context; keep its dropdowns above the page content */
.page-header {
  position: relative;
  z-index: 50;
}
