:root {
  font-family: Inter, 'Segoe UI', sans-serif;
  color: #18212f;
  background: #fff;
  font-synthesis: none;
  --canvas: #f8f9fb;
  --subtle: #f1f3f6;
  --line: #e4e8ee;
  --muted: #5e6b7a;
  --accent: #3056d3;
  --soft: #e9eeff;
  --success: #127551;
  --danger: #b63138;
  --radius: 6px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
video,
summary {
  touch-action: manipulation;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
a {
  color: inherit;
}
svg {
  width: 24px;
  height: 24px;
  flex: none;
}
button svg {
  pointer-events: none;
}
:focus-visible {
  outline: 3px solid #3056d3;
  outline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 28px;
  line-height: 36px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 20px;
  line-height: 28px;
  font-weight: 650;
}
h3 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
}
.muted {
  color: var(--muted);
}
.caption {
  font-size: 12px;
  line-height: 18px;
}
.error-text {
  color: var(--danger);
}
[hidden] {
  display: none !important;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.content-edit-links {
  display: grid;
  padding-left: 34px;
}
.content-edit-links > button {
  border: 0;
  background: none;
  text-align: left;
  min-height: 44px;
  padding: 10px 0;
  font: inherit;
  font-size: 13px;
  color: var(--muted);
}
.content-edit-links > button:hover {
  color: #18212f;
  text-decoration: underline;
}
.content-section-dialog {
  width: min(520px, calc(100vw - 32px));
}
.content-section-dialog .dialog-heading {
  margin-bottom: 20px;
}
.content-section-dialog .dialog-actions {
  margin-top: 20px;
}
.content-section-dialog #content-fields > label:not(:first-child) {
  margin-top: 16px;
}
.content-section-dialog textarea {
  width: 100%;
  font: inherit;
  resize: vertical;
  min-height: 160px;
}
.content-section-dialog .content-checklist {
  margin-top: 0;
}
.content-section-dialog .content-checklist span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.content-section-dialog .content-checklist input {
  flex: none;
}
.content-section-dialog small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.content-section-dialog #content-error:empty,
.content-section-dialog #content-status:empty {
  display: none;
}
.skip-link {
  position: fixed;
  z-index: 10;
  left: 20px;
  top: -80px;
  background: #fff;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-delete {
  margin-right: auto;
}
.button.danger {
  color: var(--danger);
}
.button.danger:not(.text) {
  background: #fff1f2;
}
.button.danger:hover {
  background: #fce4e6;
  color: #8d2027;
}
.trash-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.trash-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
}
.trash-row > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.trash-row strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}
.trash-row .button {
  flex: none;
}
.trash-row p {
  margin: 4px 0;
}
.trash-row button:disabled {
  cursor: not-allowed;
}
.trash-row > .trash-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.trash-actions .icon-button {
  margin-left: 0;
}
.icon-button.danger {
  color: var(--danger);
}
.trash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 16px;
}
.trash-footer[hidden] {
  display: none;
}
#trash-list {
  margin-top: 16px;
}
@media (max-width: 480px) {
  .trash-row {
    align-items: start;
    flex-direction: column;
  }
  .header-actions {
    gap: 4px;
  }
}
.export-options {
  margin: 4px 0 8px;
}
.export-options summary {
  font-size: 13px;
  color: var(--muted);
  gap: 8px;
}
.export-options summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-left: auto;
  margin-right: 18px;
}
.export-options[open] summary::after {
  transform: rotate(225deg);
}
.export-options select {
  margin-bottom: 8px;
}
.format-frame {
  background: #000;
  margin: 16px auto;
  max-width: 100%;
  max-height: 52vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.format-frame video {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.scene-downloads {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  margin-top: 12px;
}
.scene-downloads .button {
  justify-content: start;
}
.content-copy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.content-checklist {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.content-checklist label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin: 0;
  font-weight: 400;
}
.content-checklist input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  cursor: pointer;
}
#cover-player {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: contain;
  background: var(--canvas);
  margin: 12px 0;
}
#content-cover {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
}
#content-dialog textarea {
  width: 100%;
  font: inherit;
}
#content-clear {
  margin-right: auto;
}
.project-assets {
  margin-top: 32px;
}
.project-assets h3 {
  margin-bottom: 20px;
}
.asset-poster {
  aspect-ratio: 4/3;
  width: 100%;
  background: var(--canvas);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.asset-poster img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.asset-poster svg {
  width: 40px;
  height: 40px;
  color: var(--muted);
}
.asset-card {
  align-self: start;
}
#asset-preview {
  margin-top: 16px;
}
#asset-preview > img {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: var(--canvas);
}
#asset-preview > audio {
  width: 100%;
  margin: 16px 0;
}
#asset-title {
  overflow-wrap: anywhere;
}
#asset-delete {
  margin-right: auto;
}
#content-resources small {
  display: block;
  color: var(--muted);
  font-weight: 400;
}
#content-resources label span {
  min-width: 0;
  overflow-wrap: anywhere;
}
#content-resources input {
  flex: none;
}
#ai-dialog textarea {
  width: 100%;
  font: inherit;
  resize: vertical;
  margin-bottom: 12px;
}
#ai-result {
  margin-top: 24px;
}
#ai-history {
  margin-top: 8px;
}
.project-assets .video-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.sidebar {
  width: 216px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 32px 20px 24px;
  background: var(--canvas);
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.wordmark {
  font-size: 16px;
  font-weight: 650;
  white-space: nowrap;
}
.sidebar nav {
  display: grid;
  gap: 8px;
}
.sidebar nav a {
  min-height: 44px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.sidebar nav a[aria-current='page'] {
  background: var(--soft);
  color: #18212f;
}
.worker-state {
  margin-top: auto;
  font-size: 12px;
  color: var(--success);
}
.worker-state.unavailable {
  color: var(--danger);
}
main {
  margin-left: 216px;
  padding: 40px 48px 48px;
  min-height: 100vh;
  max-width: 1660px;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}
.page-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.page-heading > svg {
  color: var(--muted);
}
.page-header .button {
  flex: none;
}
.button {
  border: 1px solid transparent;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  background: transparent;
}
.button.primary {
  background: var(--accent);
  color: white;
}
.button.primary:hover {
  background: #2444ae;
}
.button.secondary {
  border-color: var(--line);
  background: white;
}
.button.secondary:hover {
  background: var(--canvas);
}
.button.text {
  color: var(--muted);
  padding: 10px 0;
}
.button.text:hover {
  color: #18212f;
  text-decoration: underline;
}
.icon-button {
  border: 0;
  background: transparent;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-radius: 6px;
  padding: 10px;
}
.icon-button:hover {
  background: var(--subtle);
}
.start-area {
  background: var(--canvas);
  border-radius: 10px;
  padding: 28px;
  display: grid;
  justify-items: start;
  gap: 16px;
  margin-bottom: 28px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.empty {
  padding: 44px 0;
  color: var(--muted);
  max-width: 500px;
}
.empty h2,
.empty h3 {
  color: #18212f;
  margin-bottom: 8px;
}
.empty .button {
  margin-top: 20px;
}
.recent-row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  min-height: 96px;
}
.recent-row:hover,
.project-row:hover {
  background: var(--canvas);
}
.recent-poster {
  width: 48px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--subtle);
}
.recent-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.recent-copy strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.recent-copy span {
  font-size: 12px;
  color: var(--muted);
}
.project-row {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 16px 4px;
  text-align: left;
}
.project-row svg {
  color: var(--muted);
}
.project-row strong {
  font-size: 16px;
}
.project-row .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}
.project-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 28px 24px;
  max-width: 1128px;
}
.video-card {
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
  min-width: 0;
  border-radius: 6px;
}
.video-card:hover .poster {
  box-shadow: 0 0 0 2px #3056d3;
}
.poster {
  width: 100%;
  aspect-ratio: 9/16;
  background: #18212f;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.poster-fallback {
  padding: 16px;
  text-align: center;
  font-size: 12px;
}
.poster .duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: #18212fe8;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
}
.card-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  margin-top: 12px;
  overflow-wrap: anywhere;
}
.card-status {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}
.card-status.failed {
  color: var(--danger);
}
.card-status.saved {
  color: var(--success);
}
.editor-context {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 13px;
}
.status-saved {
  color: var(--success);
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 32px;
  align-items: start;
}
.player {
  height: min(68vh, 640px);
  min-height: 280px;
  border-radius: 8px;
  background: var(--canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.player video {
  width: 100%;
  height: 100%;
  max-height: 640px;
  object-fit: contain;
  background: transparent;
}
.editor-actions {
  display: grid;
  gap: 20px;
}
.editor-actions p {
  color: var(--muted);
}
.editor-actions .button {
  width: 100%;
}
.preview-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preview-tabs button {
  min-width: 0;
}
.preview-tabs [aria-selected='true'] {
  background: var(--soft);
  border-color: var(--accent);
}
.action-copy {
  display: grid;
  gap: 8px;
}
.media-error {
  margin-top: 12px;
  max-width: 720px;
  color: var(--danger);
  font-size: 13px;
}
.media-error a {
  text-decoration: underline;
}
.job-status {
  display: grid;
  gap: 12px;
}
.job-status progress {
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
}
.output-file {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.file-location {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  user-select: all;
}
details {
  font-size: 12px;
  color: var(--muted);
}
summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
}
details p {
  padding-bottom: 12px;
}
.error-panel {
  border: 1px solid #eccbd0;
  padding: 16px;
  border-radius: 6px;
  display: grid;
  gap: 12px;
}
.error-panel h3 {
  color: var(--danger);
}
dialog {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: min(480px, calc(100vw - 32px));
  color: #18212f;
  max-height: calc(100dvh - 40px);
}
dialog::backdrop {
  background: #18212f66;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
dialog label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
}
input,
select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--canvas);
  padding: 10px 12px;
  color: #18212f;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
dialog p {
  color: var(--muted);
  margin: 16px 0;
}
dialog .error-text {
  color: var(--danger);
}
.settings-list {
  margin: 0;
}
.settings-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.settings-list dt {
  color: var(--muted);
}
.settings-list dd {
  margin: 0;
  font-weight: 600;
}
.notice {
  position: fixed;
  z-index: 5;
  bottom: 24px;
  left: calc(50% + 108px);
  transform: translateX(-50%);
  max-width: min(540px, calc(100vw - 40px));
  padding: 12px 18px;
  background: #18212f;
  color: white;
  border-radius: 6px;
  font-size: 13px;
}
.initial-loading {
  padding: 32px 0;
  color: var(--muted);
}
.import-status {
  position: fixed;
  inset: 0;
  background: #ffffffdf;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
}
.import-status > div {
  width: min(420px, calc(100vw - 48px));
  display: grid;
  gap: 16px;
}
.import-status progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}
@media (min-width: 1440px) {
  .video-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 1050px) {
  main {
    padding: 32px;
  }
  .editor-layout {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 24px;
  }
  .video-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 16px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    inset: auto 0 0;
    width: auto;
    height: 72px;
    padding: 8px 20px;
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 3;
  }
  .wordmark,
  .sidebar > .worker-state {
    display: none;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 440px;
    width: 100%;
    margin: auto;
  }
  .sidebar nav a {
    min-height: 54px;
    flex-direction: column;
    gap: 2px;
    padding: 4px 12px;
    font-size: 12px;
  }
  main {
    margin: 0;
    min-height: 100dvh;
    padding: 24px 24px 104px;
  }
  .page-header {
    gap: 12px;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 24px;
  }
  .page-heading {
    gap: 10px;
    flex: 1;
  }
  h1 {
    font-size: 22px;
    line-height: 30px;
  }
  .page-header > .button {
    width: 100%;
    order: 2;
  }
  .start-area {
    padding: 20px;
  }
  .start-area .button {
    width: 100%;
  }
  .start-area h2 {
    font-size: 18px;
  }
  .project-context {
    margin-bottom: 20px;
  }
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 12px;
  }
  .card-title {
    font-size: 14px;
    line-height: 22px;
    margin-top: 8px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .player {
    height: 52dvh;
    min-height: 280px;
    max-height: 480px;
  }
  .editor-actions {
    gap: 16px;
  }
  .editor-context {
    gap: 12px;
    margin-bottom: 16px;
  }
  .editor-context span:last-child {
    text-align: right;
  }
  .notice {
    left: 50%;
    bottom: 90px;
  }
  .recent-row {
    min-height: 96px;
  }
  .page-heading > .icon-button {
    margin-left: -10px;
  }
  .dialog-actions {
    flex-wrap: wrap;
  }
  dialog {
    padding: 24px;
  }
  .settings-list div {
    gap: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.month-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.month-controls .icon-button {
  font-size: 28px;
}
.calendar-note {
  color: var(--muted);
  margin-bottom: 24px;
}
.month-calendar {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.weekdays,
.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekdays span {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
}
.calendar-day {
  min-height: 136px;
  min-width: 0;
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.outside-month {
  background: var(--canvas);
}
.outside-month .day-number {
  color: var(--muted);
}
.day-number {
  border: 0;
  background: transparent;
  border-radius: 6px;
  min-height: 44px;
  min-width: 44px;
  color: #18212f;
  font-size: 13px;
}
.day-number:hover {
  background: var(--subtle);
}
.day-number:disabled {
  opacity: 1;
  cursor: default;
}
.day-number[aria-current='date'] {
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}
.day-events {
  display: grid;
  gap: 6px;
}
.calendar-event {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 6px;
  width: 100%;
  min-height: 48px;
  padding: 6px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 3px;
  text-align: left;
  background: var(--soft);
  color: #18212f;
  font-size: 12px;
}
.calendar-event:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}
.event-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
}
.event-platform {
  grid-column: 1/-1;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 11px;
}
.calendar-event.published {
  border-left-color: var(--success);
  background: #edf6f1;
}
.calendar-event.cancelled {
  border-left-color: var(--muted);
  background: var(--subtle);
}
.calendar-event.cancelled .event-title {
  text-decoration: line-through;
}
.calendar-event.due {
  border-left-color: #995a08;
  background: #fff5e6;
}
.calendar-empty {
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}
.date-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
#release-video {
  margin-bottom: 0;
}
.release-extras {
  margin-top: 16px;
  font-size: 13px;
}
.release-extras label {
  margin: 12px 0 8px;
}
textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  resize: vertical;
  min-height: 100px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: #18212f;
  font: inherit;
  background: var(--canvas);
}
.release-existing {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 12px;
}
.release-file-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.release-status {
  font-weight: 600;
  color: #18212f !important;
}
#release-dialog {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.release-extras summary:hover {
  color: #18212f;
}
.calendar-event:active,
.day-number:active {
  filter: brightness(0.96);
}
.sidebar nav a:hover {
  background: var(--subtle);
}
@media (max-width: 1050px) {
  .calendar-day {
    padding: 4px 3px 8px;
  }
  .calendar-event {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .event-time {
    font-size: 11px;
  }
  .event-platform {
    display: none;
  }
}
@media (min-width: 761px) {
  .calendar-day {
    min-height: clamp(88px, calc((100dvh - 310px) / 6), 136px);
  }
}
@media (max-width: 760px) {
  .sidebar nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    max-width: 480px;
  }
  .calendar-toolbar {
    align-items: center;
    gap: 8px;
  }
  .calendar-toolbar h2 {
    font-size: 18px;
    line-height: 26px;
  }
  .month-controls {
    gap: 0;
  }
  .month-controls .button {
    padding: 10px 8px;
    font-size: 12px;
  }
  .month-controls .icon-button {
    width: 36px;
    min-width: 36px;
  }
  .calendar-note {
    margin-bottom: 16px;
  }
  .calendar-day {
    min-height: 100px;
    padding: 2px 0 6px;
  }
  .day-number {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
  .weekdays span {
    padding: 10px 0;
    font-size: 11px;
  }
  .calendar-event {
    padding: 4px 2px;
    border-left-width: 2px;
    font-size: 10px;
    min-height: 44px;
  }
  .day-events {
    gap: 4px;
  }
  .event-time {
    font-size: 10px;
  }
  .event-title {
    font-size: 10px;
  }
  .date-fields {
    gap: 12px;
  }
  .date-fields > * {
    min-width: 0;
  }
  .date-fields input {
    padding: 8px 4px;
    min-width: 0;
  }
  .release-file-actions {
    flex-wrap: wrap;
  }
  .release-file-actions .button {
    padding: 10px 0;
  }
}
@media (max-width: 760px) {
  .event-time {
    font-size: 11px;
  }
  .event-title {
    font-size: 12px;
  }
}

/* Borderless calendar: spacing separates days; surface color identifies events. */
.wordmark {
  font-family: 'Segoe UI Variable Display', 'Segoe UI', sans-serif;
  font-size: 21px;
  line-height: 28px;
  font-weight: 750;
  letter-spacing: -0.65px;
  color: #18212f;
}
/* Keep the native select interaction; reserve a balanced inset for its chevron. */
select:not([multiple]):not([size]) {
  appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%23596779' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
  cursor: pointer;
}
@media (forced-colors: active) {
  select:not([multiple]):not([size]) {
    appearance: auto;
    background-image: none;
    padding-right: 12px;
  }
}
.cut-options {
  display: grid;
  gap: 10px;
}
.cut-options label {
  font-size: 13px;
  font-weight: 600;
}
.cut-options p {
  padding-bottom: 6px;
}
.cut-options select {
  min-width: 0;
}
.cut-alternative .button {
  margin-top: 20px;
}
.cut-alternative summary {
  font-size: 13px;
  color: #18212f;
}
.cut-alternative > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 12px 0 8px;
}
.cut-alternative > select {
  margin-bottom: 20px;
}
.editor-actions {
  gap: 16px;
}
.editor-section-title {
  font-size: 15px;
  line-height: 22px;
}
.result-summary {
  display: grid;
  gap: 2px;
}
.result-summary-title,
.editor-field-label,
.file-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.result-summary-title strong {
  font-size: 14px;
  line-height: 22px;
  font-weight: 600;
}
.editor-actions .result-meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
  margin: 0;
}
.help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}
.help-button svg {
  width: 18px;
  height: 18px;
}
.help-button:hover {
  background: var(--canvas);
  color: #18212f;
}
.editor-action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.editor-action-row .button {
  min-width: 0;
  border: 0;
  background: var(--canvas);
  padding: 10px 8px;
}
.editor-action-row .button:hover {
  background: var(--subtle);
}
.editor-action-row svg {
  width: 20px;
  height: 20px;
}
.editor-utilities {
  display: grid;
  gap: 0;
  padding-top: 4px;
}
.editor-disclosure {
  font-size: 13px;
  color: #18212f;
}
.editor-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0;
  list-style: none;
  font-weight: 600;
  color: var(--muted);
}
.editor-disclosure > summary::marker {
  content: '';
}
.editor-disclosure > summary::-webkit-details-marker {
  display: none;
}
.editor-disclosure > summary:hover {
  color: #18212f;
}
.editor-disclosure > summary > svg {
  width: 20px;
  height: 20px;
}
.disclosure-chevron {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.disclosure-chevron svg {
  width: 16px;
  height: 16px;
  transform: rotate(-90deg);
}
.editor-disclosure[open] > summary .disclosure-chevron svg {
  transform: rotate(90deg);
}
.disclosure-body {
  padding: 0 0 12px 30px;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.disclosure-body .file-location {
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 19px;
  overflow-wrap: anywhere;
}
.file-heading strong {
  font-size: 12px;
  font-weight: 600;
  overflow-wrap: anywhere;
  min-width: 0;
}
.cut-options {
  display: grid;
  gap: 4px;
}
.cut-options select {
  margin-bottom: 8px;
}
.editor-field-label label {
  font-size: 13px;
  font-weight: 600;
}
.version-picker {
  display: grid;
  gap: 4px;
  margin-bottom: 8px;
  min-width: 0;
}
.cut-alternative .button {
  margin-top: 8px;
}
.editor-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  line-height: 18px;
  color: var(--muted);
}
.editor-help {
  border: 0;
  width: min(380px, calc(100vw - 32px));
  padding: 24px;
}
.editor-help .dialog-heading {
  margin-bottom: 12px;
}
.editor-help h2 {
  font-size: 18px;
  line-height: 26px;
}
.editor-help p {
  margin: 0;
  font-size: 14px;
  line-height: 23px;
  color: var(--muted);
}
@media (max-width: 760px) {
  .editor-actions {
    gap: 14px;
  }
  .disclosure-body {
    padding-left: 30px;
  }
  .editor-help {
    max-height: calc(100dvh - 48px);
    overflow: auto;
  }
}
.workspace-dialog {
  width: min(580px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
}
body:has(dialog[open]) .activity-status {
  display: none;
}
.workspace-dialog label {
  margin-top: 16px;
}
.workspace-dialog .editor-field-label label {
  margin: 0;
}
.project-section {
  margin-top: 16px;
  font-size: 13px;
}
.project-section > summary {
  font-weight: 600;
  color: #18212f;
}
.project-section-body {
  display: grid;
  gap: 8px;
  padding: 4px 0 12px;
}
.project-section-body > label {
  margin-bottom: 0;
}
.project-section > summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  margin-right: 5px;
  flex: none;
}
.project-section[open] > summary::after {
  transform: rotate(225deg);
}
.source-toolbar,
.source-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.source-toolbar > .button {
  flex: 1;
}
.source-search input {
  min-width: 0;
}
.source-search .button {
  flex: none;
}
.source-row {
  display: grid;
  gap: 5px;
  width: 100%;
  text-align: left;
  border: 0;
  background: var(--canvas);
  border-radius: 6px;
  padding: 12px;
  margin-top: 8px;
  min-height: 64px;
  overflow-wrap: anywhere;
}
.source-row strong {
  font-size: 13px;
}
.source-row span {
  font-size: 11px;
  color: var(--muted);
}
.source-row p {
  font-size: 12px;
  margin: 4px 0 0;
  white-space: pre-wrap;
}
.source-row:hover {
  background: var(--subtle);
}
.source-content {
  font: inherit;
  font-size: 13px;
  line-height: 21px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin-top: 16px;
  max-width: 100%;
}
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 12px 0;
}
.job-row > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.job-row strong {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.job-row span span {
  font-size: 12px;
  color: var(--muted);
}
.job-state {
  font-size: 12px;
  flex: none;
  color: var(--muted);
}
.job-state.failed {
  color: var(--danger);
}
.job-state.completed {
  color: var(--success);
}
.job-row:hover {
  background: var(--canvas);
}
.job-title {
  margin: 16px 0 4px;
  overflow-wrap: anywhere;
}
.jobs-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0;
}
.job-facts {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}
.job-facts div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  font-size: 12px;
}
.job-facts dt {
  color: var(--muted);
}
.job-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.job-events {
  padding-left: 20px;
}
.job-events li {
  padding: 8px 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.job-events time {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.publish-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.publish-tools .caption {
  flex-basis: 100%;
}
@media (max-width: 760px) {
  .workspace-dialog {
    padding: 24px;
  }
  .jobs-actions {
    flex-wrap: wrap;
  }
  .job-facts div {
    grid-template-columns: 84px minmax(0, 1fr);
  }
}
.activity-status {
  position: fixed;
  bottom: 20px;
  left: 264px;
  right: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--subtle);
  padding: 14px 18px 18px;
  border-radius: 8px;
  color: #18212f;
  max-width: 960px;
  min-height: 76px;
}
.activity-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}
.activity-copy strong {
  font-size: 13px;
  font-weight: 600;
}
.activity-copy span {
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-status progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  accent-color: var(--accent);
}
.activity-status[data-state='error'] strong {
  color: var(--danger);
}
.activity-status .button {
  flex: none;
  white-space: nowrap;
}
.activity-status .icon-button {
  flex: none;
  width: 44px;
}
body:has(.activity-status:not([hidden])) main {
  padding-bottom: 132px;
}
body:has(.activity-status:not([hidden])) .notice {
  bottom: 112px;
}
@media (max-width: 1050px) {
  .activity-status {
    left: 248px;
    right: 32px;
  }
}
@media (max-width: 760px) {
  .activity-status {
    left: 16px;
    right: 16px;
    bottom: 84px;
    padding: 12px 12px 16px;
    gap: 8px;
  }
  .activity-status .button {
    padding: 8px;
    font-size: 12px;
  }
  .activity-copy strong {
    font-size: 12px;
  }
  .activity-copy span {
    font-size: 11px;
  }
  body:has(.activity-status:not([hidden])) main {
    padding-bottom: 192px;
  }
  body:has(.activity-status:not([hidden])) .notice {
    bottom: 180px;
  }
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  justify-content: space-between;
}
.event-meta .event-platform {
  grid-column: auto;
  min-width: 0;
}
.event-project {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}
.event-project svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.event-project span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.month-calendar {
  border: 0;
}
.weekdays {
  margin-bottom: 12px;
}
.weekdays span {
  border: 0;
  text-align: left;
  padding: 10px 16px;
}
.month-days {
  gap: 12px 8px;
}
.calendar-day {
  border: 0;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.outside-month {
  background: transparent;
}
.outside-month .day-number {
  color: var(--muted);
}
.day-number {
  align-self: flex-start;
  width: 44px;
  flex: none;
}
.day-events {
  gap: 8px;
}
.calendar-event {
  border: 0;
  box-shadow: none;
  padding: 10px;
  grid-template-columns: 1fr;
  gap: 4px;
  border-radius: 6px;
  min-height: 72px;
}
.calendar-event:hover {
  box-shadow: none;
  background: #dce5ff;
}
.calendar-event.published:hover {
  background: #dceee3;
}
.calendar-event.cancelled:hover {
  background: #e4e8ee;
}
.calendar-event.due:hover {
  background: #ffebcc;
}
.event-time {
  font-size: 12px;
  line-height: 16px;
  color: var(--muted);
}
.event-title {
  font-size: 13px;
  line-height: 18px;
}
.event-platform {
  display: block;
  font-size: 11px;
  line-height: 16px;
}
.calendar-event:focus,
.day-number:focus {
  outline: none;
}
.calendar-event:focus-visible {
  background: #dce5ff;
}
.calendar-event:focus-visible .event-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.day-number:focus-visible {
  background: var(--soft);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.day-number[aria-current='date']:focus-visible {
  background: #2444ae;
  color: #fff;
}
.month-controls .button {
  border: 0;
  background: var(--canvas);
}
@media (max-width: 1050px) {
  .calendar-event {
    padding: 8px;
  }
  .event-platform {
    display: block;
  }
}
@media (max-width: 760px) {
  .month-days {
    gap: 12px 3px;
  }
  .weekdays span {
    padding: 8px 0;
    text-align: center;
  }
  .calendar-day {
    padding: 2px;
    gap: 8px;
    min-height: 112px;
  }
  .day-number {
    width: 100%;
  }
  .calendar-event {
    padding: 6px 3px;
    min-height: 56px;
    gap: 3px;
  }
  .event-time {
    font-size: 10px;
    line-height: 14px;
  }
  .event-title {
    font-size: 11px;
    line-height: 16px;
  }
  .event-platform {
    display: none;
  }
  .event-project {
    font-size: 10px;
    gap: 0;
  }
  .event-project svg {
    display: none;
  }
}

/* ===== Responsif smartphone (9 Nov 2026) ===== */
/* Berlaku semua ukuran: isi tombol kartu tidak dipusatkan vertikal (kartu sejajar atas), thumbnail daftar tidak menyusut. */
.video-card {
  align-self: start;
}
.recent-poster {
  flex: none;
}
.section-heading {
  flex-wrap: wrap;
  row-gap: 4px;
}
.month-agenda,
.day-dot {
  display: none;
}
/* Saat popup terbuka, halaman di belakangnya tidak ikut digulir; gulir di dalam popup tidak merambat ke halaman. */
html:has(dialog[open]),
html:has(dialog[open]) body {
  overflow: hidden;
}
dialog {
  overscroll-behavior: contain;
}
.project-row .count {
  flex: none;
  white-space: nowrap;
}
.project-row svg {
  flex: none;
}
.project-row strong {
  min-width: 0;
  overflow-wrap: break-word;
}
@media (max-width: 760px) {
  main {
    padding: 20px 16px calc(104px + env(safe-area-inset-bottom));
  }
  .sidebar {
    height: calc(72px + env(safe-area-inset-bottom));
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  }
  .notice {
    bottom: calc(90px + env(safe-area-inset-bottom));
  }
  /* Judul panjang: maksimal dua baris; judul lengkap tetap bisa dilihat/diubah lewat ikon pensil. */
  .page-header {
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }
  /* Tombol aksi utama tetap di kanan judul (bukan baris penuh di bawahnya). */
  .page-header > .button {
    width: auto;
    order: 0;
    flex: none;
    padding: 10px 14px;
  }
  .page-header .header-actions {
    gap: 4px;
  }
  .page-header .header-actions .button {
    padding: 10px 14px;
  }
  .page-heading {
    gap: 8px;
    min-width: 0;
  }
  .page-heading h1 {
    font-size: 20px;
    line-height: 27px;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .page-heading > .icon-button + svg {
    display: none;
  }
  .page-heading > svg {
    flex: none;
  }
  .header-actions {
    flex: none;
  }
  /* Baris konteks editor: nama proyek satu baris, status utuh di kanan. */
  .editor-context {
    flex-wrap: nowrap;
  }
  .editor-context span:first-child {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .editor-context span:last-child {
    flex: none;
    white-space: nowrap;
  }
  /* Pemutar mengikuti rasio video: landscape tidak menyisakan ruang kosong, portrait tidak melebihi ~60% layar. */
  .player {
    height: auto;
    min-height: 180px;
    max-height: none;
  }
  .player video {
    height: auto;
    max-height: min(60svh, 560px);
  }
  /* Dialog: lebih lebar, judul lebih kecil, isi bisa digulir. */
  dialog,
  .workspace-dialog,
  .content-section-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 20px;
    overflow-y: auto;
  }
  dialog h2 {
    font-size: 18px;
    line-height: 26px;
    overflow-wrap: break-word;
  }
  .dialog-heading {
    margin-bottom: 16px;
    align-items: center;
  }
  input:not([type='checkbox']):not([type='radio']),
  select,
  textarea {
    font-size: 16px;
  }
  /* Kalender: grid ringkas dengan penanda, detail jadwal sebagai daftar di bawahnya. */
  .month-controls .icon-button {
    width: 44px;
    min-width: 44px;
  }
  .weekdays {
    margin-bottom: 4px;
  }
  .weekdays span {
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
  }
  .calendar-day {
    min-height: 0;
    padding: 2px 0;
  }
  .day-events {
    display: none;
  }
  .day-number {
    position: relative;
    font-size: 14px;
  }
  .day-dot {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--accent);
    font-size: 0;
  }
  .day-number[aria-current='date'] .day-dot {
    background: #fff;
  }
  .month-agenda {
    display: grid;
    gap: 16px;
    margin-top: 24px;
  }
  .month-agenda h2 {
    font-size: 18px;
    line-height: 26px;
  }
  .agenda-day {
    display: grid;
    gap: 8px;
  }
  .agenda-day h3 {
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
    color: var(--muted);
  }
  .month-agenda .calendar-event {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 12px 14px;
    min-height: 64px;
    font-size: 13px;
  }
  .month-agenda .event-time,
  .month-agenda .event-platform {
    font-size: 12px;
  }
  .month-agenda .event-platform {
    display: block;
  }
  .month-agenda .event-title {
    font-size: 15px;
    line-height: 22px;
    white-space: normal;
    overflow-wrap: break-word;
  }
  .month-agenda .event-project {
    font-size: 12px;
  }
}
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
/* Popup penjelasan (?): judul, ikon tutup, dan keterangan seimbang; X sejajar tengah judul dan tepi kanan. */
.editor-help {
  width: min(360px, calc(100vw - 32px));
  padding: 20px 20px 22px;
}
.editor-help .dialog-heading {
  align-items: center;
  gap: 12px;
  margin: 0 -10px 8px 0;
}
.editor-help h2 {
  font-size: 16px;
  line-height: 24px;
  font-weight: 650;
}
.editor-help .icon-button {
  width: 40px;
  height: 40px;
  min-width: 40px;
  margin: 0;
  padding: 10px;
}
.editor-help .icon-button svg {
  width: 20px;
  height: 20px;
}
.editor-help p {
  font-size: 14px;
  line-height: 22px;
  color: #3d4757;
}
/* Durasi hasil (mode pola): kolom custom ringkas + opsi buang footage jelek. */
.target-custom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.target-custom input {
  width: 132px;
  flex: none;
}
.target-custom span {
  color: var(--muted);
}
#cut-target-hint {
  margin: 6px 0 0;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 12px 0 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.check-row input {
  width: 20px;
  height: 20px;
  flex: none;
  margin: 0;
  accent-color: var(--accent);
}
.check-row span {
  min-width: 0;
}
.check-row .help-button {
  margin-left: auto;
}
/* Teks awal di editor: textarea penuh, pilihan lama tampil ringkas. */
#cut-hook-text {
  min-height: 64px;
}
.hook-seconds {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.hook-seconds label {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}
.hook-seconds select {
  width: 140px;
  flex: none;
}
.template-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}
.template-picker select {
  width: auto;
  max-width: 220px;
  min-width: 0;
  height: 44px;
}
.project-context .button {
  white-space: nowrap;
  flex: none;
}
@media (max-width: 760px) {
  .template-picker {
    flex: 1;
  }
  .template-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .template-picker select {
    width: 100%;
    max-width: none;
  }
}
.template-list {
  display: grid;
  margin-top: 8px;
}
.template-row {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  padding: 14px 4px;
  min-height: 56px;
}
.template-row:hover {
  background: var(--canvas);
}
.template-row strong {
  font-size: 14px;
}
.tpl-pattern {
  display: grid;
}
.template-actions .danger {
  margin-right: auto;
}
.editor-action-row.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Draft TikTok: tautan sekunder di bawah baris Unduh/Bagikan/Jadwalkan */
.tiktok-draft {
  margin-top: 8px;
  justify-self: start;
  align-self: flex-start;
}
#tiktok-dialog #tiktok-disconnect {
  margin-top: 12px;
}

/* Penyimpanan raw terpisah dari hasil */
.raw-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.raw-toolbar .template-picker {
  flex: none;
}
.raw-toolbar .caption {
  margin: 0;
}
.project-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.project-links .button {
  white-space: nowrap;
}
.card-status.scheduled {
  color: var(--accent);
}
.raw-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 4px 0;
  color: var(--muted);
  font-size: 13px;
}
.raw-line > a,
.raw-line > span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.raw-line > a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.raw-line > a:hover {
  color: #18212f;
}
.raw-line svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.raw-line .button {
  flex: none;
  padding-inline: 8px;
}
@media (max-width: 760px) {
  .sidebar nav a {
    padding: 4px 2px;
  }
  .raw-toolbar {
    gap: 8px;
    margin-bottom: 20px;
  }
  .raw-toolbar .template-picker {
    flex: 1 1 100%;
  }
  .project-context {
    flex-wrap: wrap;
  }
  .project-links {
    width: 100%;
    justify-content: space-between;
  }
}
.raw-line > a {
  flex: 1 1 auto;
}
.editor-actions .raw-line .button {
  width: auto;
  min-width: 0;
}

.cloud-tabs {
  display: flex;
  gap: 4px;
  flex: none;
}
.cloud-tabs .button {
  white-space: nowrap;
}
.cloud-part + .cloud-part {
  margin-top: 40px;
}
.cloud-part .section-heading h3 {
  margin: 0;
}
@media (max-width: 760px) {
  .cloud-tabs {
    flex: 1 1 100%;
  }
  .cloud-tabs .button {
    flex: 1;
    padding-left: 8px;
    padding-right: 8px;
  }
}
.cloud-target {
  margin: -12px 0 24px;
}

/* Editor ringkas: template + durasi + dua disclosure (Teks awal, Sesuaikan) sebelum tombol Proses video. */
.cut-setup {
  display: grid;
  gap: 4px;
}
.editor-field {
  display: grid;
  gap: 4px;
}
.editor-field select {
  margin-bottom: 8px;
}
.editor-field .editor-field-label {
  justify-content: flex-start;
}
.editor-field .editor-field-label .help-button {
  margin-left: auto;
}
.tuned {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}
.disclosure-value {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-weight: 500;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 18px;
}
.disclosure-value:empty {
  display: none;
}
.disclosure-value + .disclosure-chevron {
  margin-left: 0;
}
.editor-disclosure > summary > span:nth-child(2) {
  flex: none;
}
.cut-setup .editor-disclosure .disclosure-body {
  padding-bottom: 8px;
}
.cut-setup .editor-disclosure .cut-options {
  gap: 4px;
}
.cut-setup .editor-disclosure .cut-options > .button {
  justify-self: start;
  margin-top: 0;
}
.cut-setup + .button {
  margin-top: 8px;
}
.editor-disclosure[data-panel='version'] > .disclosure-body > .button {
  margin-top: 20px;
}
.editor-disclosure[data-panel='version'] > .disclosure-body > .cut-setup + .button {
  margin-top: 12px;
}
.editor-layout > section {
  min-width: 0;
}
.editor-disclosure > summary > .disclosure-value:empty + .disclosure-chevron {
  margin-left: auto;
}
.editor-actions {
  grid-template-columns: minmax(0, 1fr);
}
.editor-utilities,
.disclosure-body,
.cut-setup,
.editor-field {
  grid-template-columns: minmax(0, 1fr);
}
.cut-setup .cut-options > .button {
  width: auto;
}
