/* apps/web/src/post-routines.css */
.routines-page {
  display: grid;
  gap: 28px;
  --routine-border:var(--line,#e4e7ed);
  --routine-muted:var(--muted,#8290a6);
}
.routine-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 28px !important;
  background:
    linear-gradient(
      115deg,
      rgba(104, 86, 239, .1),
      transparent) !important;
}
.routine-hero-icon,
.routine-card-icon {
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(113, 92, 242, .12);
  color: #8b77f7;
  width: 62px;
  height: 62px;
  flex: none;
}
.routine-hero > div:nth-child(2) {
  flex: 1;
}
.routine-hero span,
.routine-dialog header span {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: #8b77f7;
}
.routine-hero h2 {
  font-size: 23px;
  margin: 7px 0 9px;
  line-height: 1.3;
}
.routine-hero p,
.routine-section-heading p,
.routine-card > p,
.routine-run > p {
  font-size: 12px;
  color: var(--routine-muted);
  line-height: 1.6;
  margin: 0;
}
.routine-hero > .primary-button {
  white-space: nowrap;
}
.routine-default-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border: 1px dashed var(--routine-border);
  border-radius: 12px;
  padding: 17px 20px;
}
.routine-default-banner.enabled {
  background: rgba(43, 181, 133, .06);
  border-color: rgba(43, 181, 133, .25);
}
.routine-default-banner span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}
.routine-default-banner svg {
  color: #8b77f7;
  flex: none;
}
.routine-default-banner small {
  font-size: 11px;
  color: var(--routine-muted);
}
.routine-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.routine-section-heading h3 {
  font-size: 16px;
  margin: 0 0 5px;
}
.routine-section-heading > span {
  font-size: 11px;
  color: var(--routine-muted);
}
.routine-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.routine-card {
  padding: 22px !important;
  min-width: 0;
}
.routine-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.routine-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.routine-card h3 {
  font-size: 17px;
  overflow-wrap: anywhere;
  margin: 18px 0;
}
.routine-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 8px;
  font-size: 11px;
  margin-bottom: 18px;
}
.routine-details span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.routine-details svg {
  color: var(--routine-muted);
  flex: none;
}
.routine-card footer {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--routine-border);
  padding-top: 17px;
  margin-top: 17px;
}
.routine-card footer > button:first-child {
  flex: 1;
}
.routine-status {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(130, 144, 166, .1);
  color: var(--routine-muted);
  font-weight: 600;
}
.routine-status.active {
  background: rgba(43, 181, 133, .12);
  color: #23aa7a;
}
.routine-status.paused,
.routine-status.pending {
  background: rgba(233, 163, 44, .12);
  color: #cc941f;
}
.routine-status.failed {
  background: rgba(230, 80, 92, .12);
  color: #e6505c;
}
.routine-runs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.routine-run {
  padding: 20px;
  border: 1px solid var(--routine-border);
  border-radius: 14px;
  background: var(--surface,var(--card-bg,transparent));
  min-width: 0;
}
.routine-run-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.routine-run-main > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.routine-run-main b {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.routine-run-main small {
  font-size: 11px;
  color: var(--routine-muted);
  overflow-wrap: anywhere;
}
.routine-run-progress {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  margin: 20px 0 12px;
  color: var(--routine-muted);
}
.routine-run-actions {
  display: flex;
  gap: 9px;
  margin-top: 16px;
}
.routine-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 36px !important;
  text-align: center;
  color: var(--routine-muted);
  font-size: 12px;
}
.routine-empty h3 {
  margin: 0;
  color: inherit;
}
.routine-empty p {
  margin: 0;
  line-height: 1.6;
}
.routine-error {
  color: #e6505c !important;
  font-size: 12px;
  line-height: 1.6;
}
.routine-success {
  color: #23aa7a;
  font-size: 12px;
}
.routine-feedback {
  padding: 12px 16px;
  border: 1px solid currentColor;
  border-radius: 10px;
  margin: 0;
}
.routine-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 13, 26, .65);
  backdrop-filter: blur(5px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.routine-dialog {
  background: var(--panel,var(--surface,#fff));
  color: inherit;
  border: 1px solid var(--routine-border,#e4e7ed);
  border-radius: 20px;
  width: 840px;
  max-width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: 0 24px 100px rgba(0, 0, 0, .24);
  outline: none;
}
.routine-dialog > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}
.routine-dialog h2 {
  font-size: 22px;
  margin: 6px 0;
}
.routine-dialog h3 {
  font-size: 14px;
  margin: 0 0 9px;
}
.routine-dialog form {
  min-width: 0;
  display: grid;
  gap: 16px;
}
.routine-form-fields {
  padding: 0;
  margin: 0;
  border: 0;
  display: grid;
  gap: 24px;
  min-width: 0;
}
.routine-form-fields label:not(.routine-check) {
  min-width: 0;
  display: grid;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
}
.routine-form-fields input:not([type=checkbox]):not([type=radio]),
.routine-form-fields select,
.routine-form-fields textarea {
  width: 100%;
  min-width: 0;
  background: var(--input-bg,transparent);
  color: inherit;
  border: 1px solid var(--routine-border,#e4e7ed);
  border-radius: 9px;
  padding: 12px;
  font: inherit;
  font-size: 12px;
  box-sizing: border-box;
}
.routine-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.routine-search {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}
.routine-search label {
  flex: 1;
  position: relative;
}
.routine-search label svg {
  position: absolute;
  left: 12px;
  top: 13px;
  color: var(--routine-muted);
}
.routine-search label input {
  padding-left: 36px !important;
}
.routine-search select {
  max-width: 220px;
}
.routine-video-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-height: 290px;
  overflow-y: auto;
  padding: 2px;
}
.routine-video-grid > button {
  border: 1px solid var(--routine-border,#e4e7ed);
  background: transparent;
  color: inherit;
  border-radius: 10px;
  padding: 7px;
  text-align: left;
  min-width: 0;
  cursor: pointer;
}
.routine-video-grid > button.selected {
  border-color: #8b77f7;
  background: rgba(113, 92, 242, .07);
}
.routine-video-grid button > span {
  position: relative;
  display: block;
  height: 88px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(130, 144, 166, .08);
}
.routine-video-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.routine-video-grid i {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #8064ee;
  color: white;
  font-size: 10px;
  font-style: normal;
}
.routine-video-grid b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  margin: 8px 2px 3px;
}
.routine-video-grid > .routine-empty {
  grid-column: 1/-1;
}
.routine-selected ol {
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  border: 1px solid var(--routine-border,#e4e7ed);
  border-radius: 10px;
}
.routine-selected li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--routine-border,#e4e7ed);
}
.routine-selected li:last-child {
  border: 0;
}
.routine-selected li > span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.routine-selected li i {
  font-size: 10px;
  font-style: normal;
  color: #8b77f7;
}
.routine-selected li b {
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.routine-selected li > div {
  display: flex;
  gap: 6px;
  flex: none;
}
.routine-selected .secondary-button {
  padding: 6px !important;
}
.routine-check {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 12px;
  cursor: pointer;
}
.routine-form-fields input:is([type=radio], [type=checkbox]) {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: var(--purple,#8064ee);
  flex: 0 0 16px;
  align-self: flex-start;
}
.routine-check > span {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
  line-height: 1.5;
}
.routine-check small,
.routine-form-note {
  font-size: 11px;
  color: var(--routine-muted);
  line-height: 1.7;
}
.routine-caption {
  display: grid;
  gap: 18px;
}
.routine-default-option {
  padding: 18px;
  border: 1px solid rgba(113, 92, 242, .25);
  background: rgba(113, 92, 242, .06);
  border-radius: 12px;
}
.routine-form-note {
  margin: 0;
}
.routine-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--routine-border,#e4e7ed);
}
.routine-confirm {
  width: 440px;
}
.routine-confirm p {
  font-size: 13px;
  line-height: 1.7;
  margin: 20px 0;
  color: var(--routine-muted);
}
[data-theme=dark] .routine-dialog {
  background: var(--panel,#171c29);
  color: inherit;
}
@media (max-width: 760px) {
  .routine-hero {
    flex-wrap: wrap;
    padding: 20px !important;
    gap: 14px;
  }
  .routine-hero h2 {
    font-size: 19px;
  }
  .routine-hero-icon {
    width: 44px;
    height: 44px;
  }
  .routine-hero > div:nth-child(2) {
    flex-basis: calc(100% - 60px);
  }
  .routine-hero > .primary-button {
    width: 100%;
    justify-content: center;
  }
  .routine-default-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .routine-cards,
  .routine-runs {
    grid-template-columns: 1fr;
  }
  .routine-overlay {
    padding: 10px;
  }
  .routine-dialog {
    padding: 20px;
    max-height: 96vh;
    border-radius: 14px;
  }
  .routine-dialog h2 {
    font-size: 19px;
  }
  .routine-form-grid {
    grid-template-columns: 1fr;
  }
  .routine-video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .routine-search {
    flex-direction: column;
  }
  .routine-search select {
    max-width: none;
  }
  .routine-video-picker .routine-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
.routine-editor-section {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--routine-border);
  border-radius: 13px;
  min-width: 0;
}
.routine-editor-section > h3 {
  margin: 0;
  color: var(--purple);
  font-size: 15px;
}
.routine-choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.routine-choice-row > .routine-check {
  border: 1px solid var(--routine-border);
  padding: 14px;
  border-radius: 9px;
}
.routine-choice-row > .routine-check:has(input:checked) {
  border-color: var(--purple);
  background: rgba(139, 119, 247, .06);
}
.routine-source-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.routine-upload {
  padding: 22px;
  border: 1px dashed var(--purple);
  border-radius: 10px;
  background: rgba(139, 119, 247, .04);
}
.routine-upload > span {
  font-size: 11px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.routine-metadata > fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.routine-metadata legend {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}
.routine-form-fields .routine-metadata label.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--routine-border);
  border-radius: 9px;
}
.routine-metadata label.choice.active {
  border-color: var(--purple);
  background: rgba(139, 119, 247, .05);
}
.routine-metadata label > span {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 6px;
}
.routine-metadata small,
.routine-form-grid small {
  font-size: 11px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--routine-muted);
}
.routine-metadata .campaign-default-badge {
  margin-left: 8px;
}
.routine-caption > fieldset:disabled {
  opacity: .55;
}
.routine-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--purple);
}
.routine-force {
  color: #cf9629;
  font-weight: 700;
}
.routine-form-fields > section .routine-form-grid > .secondary-button {
  align-self: end;
}
.routine-video-grid .media-quality-badge {
  display: block;
  margin-top: 5px;
  font-size: 9px;
}
.routine-dialog .routine-editor-section .routine-selected {
  margin-top: 0;
}
.routine-dialog {
  width: 960px;
}
.routine-video-grid {
  max-height: 320px;
}
.routine-editor-section .routine-section-heading {
  margin-bottom: 0;
}
@media (max-width: 760px) {
  .routine-editor-section {
    padding: 14px;
  }
  .routine-choice-row {
    grid-template-columns: 1fr;
  }
  .routine-source-tabs > button {
    flex: 1;
  }
  .routine-dialog {
    padding: 14px;
  }
  .routine-dialog > header {
    align-items: flex-start;
  }
}
.routine-form-fields label :is(b, small) {
  overflow-wrap: anywhere;
}
.routine-dialog .media-order-toolbar {
  min-width: 0;
  flex-wrap: wrap;
}
.routine-dialog .media-order-toolbar > label {
  min-width: 0;
  max-width: 100%;
}
.routine-dialog .media-order-toolbar select {
  min-width: 0;
  max-width: 100%;
  font-family: inherit;
}
.routine-dialog .routine-section-heading {
  flex-wrap: wrap;
  min-width: 0;
}
.routine-dialog.routine-confirm {
  width: 440px;
}
html:has(.routine-overlay),
body:has(.routine-overlay) {
  overflow: hidden;
}
.routine-dialog {
  overscroll-behavior: contain;
}
.routine-story-times {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.routine-story-times label {
  display: grid;
  gap: 8px;
}
.routine-story-times small {
  overflow-wrap: anywhere;
  color: var(--muted,#999);
}
.routine-lane-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.routine-account-list {
  display: grid;
  gap: 10px;
  max-height: 45vh;
  overflow: auto;
  margin: 18px 0;
}

/* apps/web/src/post-routines-contrast.css */
.routines-page {
  --routine-dialog-bg: var(--surface, #030306);
  --routine-section-bg: var(--card, #07070c);
  --routine-field-bg: var(--card-2, #0a0810);
  --routine-hover-bg: color-mix(in srgb, var(--purple) 9%, var(--card));
  --routine-selected-bg: color-mix(in srgb, var(--purple) 12%, var(--card));
  --routine-border: #45374f;
  --routine-foreground: #f5f3ff;
  --routine-muted: #b9b1c5;
  --routine-accent: var(--purple);
  --routine-accent-border: var(--purple);
  --routine-button-bg:
    linear-gradient(
      135deg,
      var(--purple-2),
      var(--purple));
  --routine-scheme: dark;
  color: var(--routine-foreground);
  font-family:
    "DM Sans",
    "Segoe UI",
    system-ui,
    sans-serif;
}
html[data-theme=light] .routines-page {
  --routine-dialog-bg: #ffffff;
  --routine-section-bg: #faf7fd;
  --routine-field-bg: #ffffff;
  --routine-hover-bg: #eee4f6;
  --routine-selected-bg: #f0e4fb;
  --routine-border: #b7a5c6;
  --routine-foreground: #2a1838;
  --routine-muted: #665573;
  --routine-accent: var(--purple);
  --routine-accent-border: var(--purple);
  --routine-button-bg:
    linear-gradient(
      135deg,
      var(--purple-2),
      var(--purple));
  --routine-scheme: light;
}
html[data-theme] .routines-page .routine-dialog {
  color-scheme: var(--routine-scheme);
  background: var(--routine-dialog-bg);
  color: var(--routine-foreground);
  border-color: var(--routine-border);
  font-family:
    "DM Sans",
    "Segoe UI",
    system-ui,
    sans-serif;
  font-size: 14px !important;
  line-height: 1.55;
  scrollbar-color: var(--purple) var(--routine-dialog-bg);
}
.routine-dialog :is(button, input, select, textarea) {
  font-family: inherit;
}
.routine-dialog > header h2 {
  color: var(--routine-foreground);
  font-size: 25px;
}
.routine-dialog > header > div > span {
  color: var(--routine-accent);
  font-size: 11px;
}
.routine-dialog .routine-editor-section {
  background: var(--routine-section-bg);
  border-color: var(--routine-border);
  gap: 20px;
}
.routine-dialog .routine-editor-section > h3 {
  color: var(--routine-foreground);
  font-size: 17px;
}
.routine-dialog .routine-form-fields label:not(.routine-check),
.routine-dialog .routine-check,
.routine-dialog .routine-metadata legend {
  color: var(--routine-foreground);
  font-size: 14px;
}
.routine-dialog .routine-section-heading h3,
.routine-dialog .routine-selected h3 {
  color: var(--routine-foreground);
  font-size: 15px;
}
.routine-dialog :is(.routine-form-note, .routine-check small, .routine-form-grid small, .routine-metadata small, .routine-section-heading p, .routine-section-heading > span) {
  color: var(--routine-muted);
  font-size: 13px;
  line-height: 1.65;
}
html[data-theme] .routines-page .routine-dialog :is(input:not([type=radio]):not([type=checkbox]), select, textarea) {
  background: var(--routine-field-bg) !important;
  color: var(--routine-foreground) !important;
  border: 1px solid var(--routine-border) !important;
  border-radius: 9px;
  box-shadow: none;
  min-height: 44px;
  font-size: 14px !important;
  line-height: 1.5;
  color-scheme: var(--routine-scheme);
}
html[data-theme] .routines-page .routine-dialog :is(input, textarea)::placeholder {
  color: var(--routine-muted) !important;
  opacity: 1;
}
html[data-theme] .routines-page .routine-dialog select option {
  background: var(--routine-field-bg);
  color: var(--routine-foreground);
  font-family:
    "Segoe UI",
    system-ui,
    sans-serif;
  font-size: 14px;
}
.routine-dialog select {
  cursor: pointer;
}
.routine-dialog :is(input, select, textarea, button):focus-visible {
  outline: 2px solid var(--routine-accent-border);
  outline-offset: 3px;
}
.routine-dialog .routine-choice-row > .routine-check,
.routine-dialog .routine-metadata label.choice {
  background: var(--routine-field-bg);
  border-color: var(--routine-border);
}
.routine-dialog .routine-choice-row > .routine-check:has(input:checked),
.routine-dialog .routine-metadata label.choice.active {
  background: var(--routine-selected-bg);
  border-color: var(--routine-accent-border);
  box-shadow: inset 0 0 0 1px var(--routine-accent-border);
}
.routine-dialog .routine-form-fields input:is([type=radio], [type=checkbox]) {
  width: 18px;
  height: 18px;
  min-width: 18px;
  max-width: 18px;
  flex-basis: 18px;
  accent-color: var(--purple);
  color-scheme: var(--routine-scheme);
}
.routine-dialog .routine-default-option {
  background: var(--routine-selected-bg);
  border-color: var(--routine-accent-border);
}
.routine-dialog .routine-caption > fieldset:disabled {
  opacity: 1;
}
.routine-dialog .routine-caption > fieldset:disabled label {
  color: var(--routine-muted);
}
.routine-dialog :disabled {
  cursor: not-allowed;
}
html[data-theme] .routines-page .routine-dialog .secondary-button {
  background: var(--routine-field-bg) !important;
  color: var(--routine-foreground) !important;
  border: 1px solid var(--routine-border) !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 600;
  min-height: 38px;
}
.routines-page .routine-dialog .secondary-button:hover:not(:disabled) {
  background: var(--routine-hover-bg);
  border-color: var(--routine-accent-border);
}
html[data-theme] .routines-page .routine-dialog .primary-button {
  background: var(--routine-button-bg) !important;
  border: 1px solid var(--purple) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: 13px !important;
  min-height: 38px;
}
.routine-dialog .routine-source-tabs > button {
  padding: 9px 14px;
}
.routine-dialog .media-order-toolbar {
  background: var(--routine-field-bg);
  border-color: var(--routine-border);
  padding: 14px;
  gap: 12px;
}
.routine-dialog .media-order-toolbar > label {
  color: var(--routine-foreground);
  font-size: 13px;
}
.routine-dialog .media-order-toolbar small {
  color: var(--routine-muted);
  font-size: 12px;
}
.routine-dialog .routine-upload {
  background: var(--routine-field-bg);
  border-color: var(--routine-accent-border);
}
.routine-dialog .routine-search label svg {
  color: var(--routine-muted);
}
.routine-dialog .routine-video-grid {
  max-height: 420px;
  gap: 12px;
}
.routine-dialog .routine-video-grid > button {
  background: var(--routine-field-bg);
  color: var(--routine-foreground);
  border-color: var(--routine-border);
  padding: 8px;
}
.routine-dialog .routine-video-grid > button.selected {
  background: var(--routine-selected-bg);
  border-color: var(--routine-accent-border);
  box-shadow: inset 0 0 0 1px var(--routine-accent-border);
}
.routine-dialog .routine-video-grid > button > span {
  height: 108px;
  background: var(--routine-section-bg);
}
.routine-dialog .routine-video-grid .video-thumbnail-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--routine-muted);
  background: var(--routine-section-bg);
}
.routine-dialog .routine-video-grid .video-thumbnail-fallback svg {
  width: 26px;
  height: 26px;
}
.routine-dialog .routine-video-grid .video-thumbnail-fallback small {
  font-size: 11px;
  letter-spacing: .08em;
}
.routine-dialog .routine-video-grid b {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
  font-size: 12px;
  font-weight: 600;
  min-height: 35px;
  margin: 9px 2px 3px;
}
.routine-dialog .routine-selected li b {
  color: var(--routine-foreground);
  font-size: 13px;
}
.routine-dialog .routine-selected li i {
  color: var(--routine-accent);
}
.routine-dialog .routine-progress {
  color: var(--routine-accent);
  font-size: 14px;
}
.routines-page .routine-card > p,
.routines-page .routine-run > p {
  font-size: 13px;
}
.routines-page .routine-details {
  font-size: 12px;
}
.routines-page .routine-status {
  font-size: 11px;
}
@media (max-width: 760px) {
  .routine-dialog > header h2 {
    font-size: 21px;
  }
  .routine-dialog .routine-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .routine-dialog .routine-video-grid > button > span {
    height: 100px;
  }
  .routine-dialog .routine-editor-section {
    padding: 16px;
  }
  .routine-dialog .routine-source-tabs > button {
    min-height: 44px;
  }
}
html[data-theme] .routines-page .routine-overlay {
  padding: 24px;
}
html[data-theme] .routines-page .routine-dialog,
html[data-theme] .routines-page .routine-dialog * {
  box-sizing: border-box;
}
html[data-theme] .routines-page .routine-dialog {
  width: 980px;
  max-width: 100%;
  min-width: 0;
  padding: 26px;
  overflow-x: hidden;
}
html[data-theme] .routines-page .routine-dialog :is(form, .routine-form-fields, .routine-editor-section, .routine-caption) {
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  max-width: 100%;
}
html[data-theme] .routines-page .routine-dialog :is(.routine-form-grid, .routine-choice-row) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  max-width: 100%;
  align-items: start;
}
html[data-theme] .routines-page .routine-dialog :is(section, fieldset, header, footer, .routine-selected, ol, li, .routine-search, .routine-section-heading) {
  min-width: 0;
  max-width: 100%;
}
html[data-theme] .routines-page .routine-dialog > header {
  align-items: flex-start;
}
html[data-theme] .routines-page .routine-dialog > header > div {
  flex: 1;
  min-width: 0;
}
html[data-theme] .routines-page .routine-dialog > header > button {
  flex: 0 0 38px;
  padding: 8px;
}
html[data-theme] .routines-page .routine-dialog :is(p, small, legend) {
  overflow-wrap: anywhere;
}
html[data-theme] .routines-page .routine-dialog .routine-form-grid > label {
  align-self: start;
}
html[data-theme] .routines-page .routine-dialog :is(input:not([type=radio]):not([type=checkbox]):not([type=file]), select) {
  height: 44px !important;
  min-height: 44px !important;
  max-width: 100%;
  padding: 10px 12px;
}
html[data-theme] .routines-page .routine-dialog textarea {
  min-height: 100px;
  resize: vertical;
  max-width: 100%;
}
html[data-theme] .routines-page .routine-dialog input[type=file] {
  width: 100%;
  max-width: 100%;
  padding: 8px;
  font-size: 12px !important;
}
html[data-theme] .routines-page .routine-dialog input[type=file]::file-selector-button {
  color: var(--routine-foreground);
  background: var(--routine-section-bg);
  border: 1px solid var(--routine-border);
  border-radius: 6px;
  padding: 6px 9px;
  margin-right: 9px;
  font: inherit;
}
html[data-theme] .routines-page .routine-dialog .routine-search > label {
  flex: 1 1 0%;
  min-width: 0;
}
html[data-theme] .routines-page .routine-dialog .routine-search > select {
  flex: 0 1 220px;
  min-width: 0;
}
html[data-theme] .routines-page .routine-dialog .routine-section-heading > div {
  flex: 1 1 220px;
  min-width: 0;
}
html[data-theme] .routines-page .routine-dialog .routine-section-heading > button {
  flex: none;
}
html[data-theme] .routines-page .routine-dialog .routine-selected li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 10px 12px;
}
html[data-theme] .routines-page .routine-dialog .routine-selected li > span {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}
html[data-theme] .routines-page .routine-dialog .routine-selected li b {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.5;
}
html[data-theme] .routines-page .routine-dialog .routine-selected li > div {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
html[data-theme] .routines-page .routine-dialog .routine-selected li button {
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 6px !important;
  display: grid;
  place-items: center;
}
html[data-theme] .routines-page .routine-dialog .routine-video-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
html[data-theme] .routines-page .routine-dialog .routine-video-grid i {
  background: var(--purple-2);
}
html[data-theme] .routines-page .routine-dialog .routine-metadata .campaign-default-badge {
  color: var(--routine-accent);
}
html[data-theme] .routines-page .routine-dialog .secondary-button:hover:not(:disabled) {
  background: var(--routine-hover-bg) !important;
  border-color: var(--purple) !important;
}
html[data-theme] .routines-page .routine-dialog footer {
  flex-wrap: wrap;
}
@media (max-width: 760px) {
  html[data-theme] .routines-page .routine-overlay {
    padding: 10px;
  }
  html[data-theme] .routines-page .routine-dialog {
    padding: 16px;
  }
  html[data-theme] .routines-page .routine-dialog :is(.routine-form-grid, .routine-choice-row) {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-theme] .routines-page .routine-dialog .routine-video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html[data-theme] .routines-page .routine-dialog .routine-search > select {
    flex: auto;
    width: 100%;
  }
  html[data-theme] .routines-page .routine-dialog .routine-selected li {
    gap: 8px;
    padding: 10px 8px;
  }
}
