  .ol-tmdb-button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--hope-colors-primary9, #1677ff);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition:
      background-color 0.15s ease,
      color 0.15s ease,
      transform 0.15s ease;
  }

  .ol-tmdb-button-wrap {
    position: relative;
    display: inline-flex;
  }

  .ol-tmdb-tip {
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--hope-colors-neutral12, #1f1f1f);
    color: var(--hope-colors-neutral1, #fff);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
  }

  .ol-tmdb-tip::after {
    content: "";
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--hope-colors-neutral12, #1f1f1f);
  }

  .ol-tmdb-button-wrap:hover .ol-tmdb-tip {
    opacity: 1;
  }

  .ol-tmdb-button:hover {
    background: var(--hope-colors-primary9, #1677ff);
    color: #fff;
  }

  .ol-tmdb-button:active {
    transform: scale(0.94);
  }

  .ol-tmdb-toolbar-warning {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: min(520px, calc(100vw - 32px));
    border: 1px solid var(--hope-colors-warning7, #d89614);
    border-radius: 8px;
    padding: 9px 10px;
    background: var(--hope-colors-neutral1, #fff);
    color: var(--hope-colors-neutral12, #1f1f1f);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    font-size: 12px;
  }

  .ol-tmdb-toolbar-warning span {
    min-width: 0;
  }

  .ol-tmdb-toolbar-warning button {
    flex: 0 0 auto;
    border: 0;
    padding: 2px 4px;
    background: transparent;
    color: var(--hope-colors-primary9, #1677ff);
    cursor: pointer;
    font: inherit;
  }

  .ol-tmdb-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .ol-tmdb-mask[data-open="true"] {
    display: flex;
  }

  .ol-tmdb-modal {
    width: min(1120px, 100%);
    max-height: min(760px, calc(100vh - 40px));
    overflow: hidden;
    background: var(--hope-colors-neutral1, #fff);
    color: var(--hope-colors-neutral12, #1f1f1f);
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
    display: grid;
    grid-template-rows: auto 1fr auto;
  }

  .ol-tmdb-header,
  .ol-tmdb-footer {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--hope-colors-neutral5, #e8e8e8);
  }

  .ol-tmdb-footer {
    border-top: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-bottom: 0;
  }

  .ol-tmdb-footer-info {
    min-width: 0;
    display: grid;
    gap: 3px;
  }

  .ol-tmdb-execution-report {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    font-size: 11px;
    color: var(--hope-colors-neutral10, #777);
  }

  .ol-tmdb-execution-report:empty {
    display: none;
  }

  .ol-tmdb-report-copy,
  .ol-tmdb-report-retry {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--hope-colors-primary9, #1677ff);
    cursor: pointer;
    font: inherit;
  }

  .ol-tmdb-title {
    margin: 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 650;
  }

  .ol-tmdb-body {
    overflow: auto;
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .ol-tmdb-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .ol-tmdb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .ol-tmdb-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .ol-tmdb-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--hope-colors-neutral11, #555);
  }

  .ol-tmdb-input,
  .ol-tmdb-select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--hope-colors-neutral6, #d9d9d9);
    border-radius: 6px;
    background: var(--hope-colors-neutral1, #fff);
    color: inherit;
    padding: 7px 10px;
    font: inherit;
  }

  .ol-tmdb-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    user-select: none;
  }

  .ol-tmdb-operation-options {
    flex-wrap: wrap;
  }

  .ol-tmdb-image-size-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--hope-colors-neutral11, #555);
  }

  .ol-tmdb-image-size-field .ol-tmdb-select {
    width: auto;
    min-height: 30px;
    padding-block: 4px;
  }

  .ol-tmdb-operation-quick {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
  }

  .ol-tmdb-operation-quick .ol-tmdb-action {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 12px;
  }

  .ol-tmdb-overwrite-check {
    color: var(--hope-colors-warning10, #874d00);
  }

  .ol-tmdb-modal[data-mode="movie"] .ol-tmdb-tv-only,
  .ol-tmdb-modal[data-mode="tv"] .ol-tmdb-movie-only,
  .ol-tmdb-mode-fields[data-mode="movie"] .ol-tmdb-tv-only,
  .ol-tmdb-mode-fields[data-mode="tv"] .ol-tmdb-movie-only {
    display: none;
  }

  .ol-tmdb-list {
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 8px;
    overflow: hidden;
  }

  .ol-tmdb-list-head,
  .ol-tmdb-file,
  .ol-tmdb-result {
    display: grid;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border-bottom: 1px solid var(--hope-colors-neutral5, #e8e8e8);
  }

  .ol-tmdb-list-head {
    grid-template-columns: 30px 1fr 92px;
    font-size: 12px;
    font-weight: 650;
    color: var(--hope-colors-neutral11, #555);
    background: var(--hope-colors-neutral2, #fafafa);
  }

  .ol-tmdb-file {
    grid-template-columns: 30px 1fr 92px;
  }

  .ol-tmdb-result {
    grid-template-columns: 68px 1fr auto;
    cursor: pointer;
  }

  .ol-tmdb-file:last-child,
  .ol-tmdb-result:last-child {
    border-bottom: 0;
  }

  .ol-tmdb-file[data-selected="true"],
  .ol-tmdb-result[data-selected="true"] {
    background: color-mix(in srgb, var(--hope-colors-primary9, #1677ff) 11%, transparent);
  }

  .ol-tmdb-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
  }

  .ol-tmdb-meta {
    color: var(--hope-colors-neutral10, #777);
    font-size: 12px;
  }

  .ol-tmdb-poster {
    width: 54px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: var(--hope-colors-neutral4, #eee);
  }

  .ol-tmdb-preview {
    min-height: 94px;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 8px;
    padding: 10px;
    background: var(--hope-colors-neutral2, #fafafa);
    font-size: 13px;
    display: grid;
    gap: 8px;
  }

  .ol-tmdb-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    word-break: break-all;
  }

  .ol-tmdb-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .ol-tmdb-preview-head > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .ol-tmdb-plan-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    padding: 8px 10px;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
    background: var(--hope-colors-neutral1, #fff);
    font-size: 12px;
  }

  .ol-tmdb-plan-summary[data-kind="warn"] {
    border-color: var(--hope-colors-warning7, #d89614);
  }

  .ol-tmdb-plan-summary[data-kind="error"] {
    border-color: var(--hope-colors-danger8, #cf1322);
  }

  .ol-tmdb-plan {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 5px;
  }

  .ol-tmdb-plan-global {
    margin-top: 0;
  }

  .ol-tmdb-plan-step {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    padding: 2px 7px;
    background: var(--hope-colors-neutral4, #eee);
    color: var(--hope-colors-neutral11, #555);
    font-size: 11px;
    line-height: 1.5;
  }

  .ol-tmdb-plan-step[data-kind="ok"] {
    background: color-mix(in srgb, var(--hope-colors-success9, #237804) 12%, transparent);
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-plan-step[data-kind="warn"] {
    background: color-mix(in srgb, var(--hope-colors-warning9, #ad6800) 14%, transparent);
    color: var(--hope-colors-warning10, #874d00);
  }

  .ol-tmdb-plan-step[data-kind="error"] {
    background: color-mix(in srgb, var(--hope-colors-danger9, #d4380d) 12%, transparent);
    color: var(--hope-colors-danger9, #d4380d);
  }

  .ol-tmdb-batch-actions {
    flex-wrap: wrap;
  }

  .ol-tmdb-cleanup {
    display: grid;
    gap: 8px;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 8px;
    padding: 10px;
  }

  .ol-tmdb-cleanup-head,
  .ol-tmdb-cleanup-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
  }

  .ol-tmdb-cleanup-head > div {
    display: grid;
    gap: 2px;
  }

  .ol-tmdb-cleanup-rules {
    flex-wrap: wrap;
  }

  .ol-tmdb-cleanup-preview {
    display: grid;
    gap: 8px;
  }

  .ol-tmdb-cleanup-empty {
    color: var(--hope-colors-neutral10, #777);
    font-size: 12px;
  }

  .ol-tmdb-cleanup-table {
    overflow-x: auto;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
  }

  .ol-tmdb-cleanup-row {
    min-width: 900px;
    display: grid;
    grid-template-columns: 24px minmax(220px, 1fr) 20px minmax(220px, 1fr) 130px 130px;
    gap: 8px;
    align-items: center;
    padding: 8px 9px;
    border-bottom: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    font-size: 12px;
  }

  .ol-tmdb-cleanup-row:last-child {
    border-bottom: 0;
  }

  .ol-tmdb-cleanup-arrow {
    color: var(--hope-colors-neutral9, #999);
    text-align: center;
  }

  .ol-tmdb-cleanup-row[data-kind="error"] .ol-tmdb-cleanup-status {
    color: var(--hope-colors-danger9, #d4380d);
  }

  .ol-tmdb-cleanup-row[data-kind="ok"] .ol-tmdb-cleanup-status {
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-batch-overview {
    display: grid;
    gap: 8px;
    border: 1px solid var(--hope-colors-warning7, #d89614);
    border-radius: 6px;
    padding: 9px 10px;
    background: color-mix(in srgb, var(--hope-colors-warning7, #d89614) 7%, transparent);
  }

  .ol-tmdb-batch-confirmation {
    display: grid;
    gap: 2px;
    font-size: 12px;
  }

  .ol-tmdb-batch-summary,
  .ol-tmdb-batch-fill {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    font-size: 12px;
  }

  .ol-tmdb-batch-summary span {
    color: var(--hope-colors-neutral11, #555);
  }

  .ol-tmdb-batch-suspicion {
    color: var(--hope-colors-warning10, #874d00);
    font-size: 12px;
    word-break: break-all;
  }

  .ol-tmdb-batch-fill label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }

  .ol-tmdb-batch-fill .ol-tmdb-input {
    width: 58px;
    min-height: 30px;
    padding: 5px 7px;
    text-align: center;
  }

  .ol-tmdb-batch-select-hint {
    padding: 8px 0;
    color: var(--hope-colors-neutral10, #777);
    font-size: 12px;
  }

  .ol-tmdb-batch-table {
    overflow-x: auto;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
    background: var(--hope-colors-neutral1, #fff);
  }

  .ol-tmdb-batch-head,
  .ol-tmdb-batch-row {
    min-width: 820px;
    display: grid;
    grid-template-columns: minmax(190px, 1.4fr) 54px 54px minmax(110px, 0.8fr) minmax(220px, 1.4fr) minmax(110px, 0.8fr);
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hope-colors-neutral5, #e8e8e8);
  }

  .ol-tmdb-batch-head {
    font-size: 12px;
    font-weight: 650;
    color: var(--hope-colors-neutral11, #555);
    background: var(--hope-colors-neutral2, #fafafa);
  }

  .ol-tmdb-batch-row:last-child {
    border-bottom: 0;
  }

  .ol-tmdb-batch-input {
    min-height: 30px;
    padding: 5px 7px;
    text-align: center;
  }

  .ol-tmdb-batch-target,
  .ol-tmdb-batch-status {
    word-break: break-all;
  }

  .ol-tmdb-batch-row[data-kind="error"] .ol-tmdb-batch-status {
    color: var(--hope-colors-danger9, #d4380d);
  }

  .ol-tmdb-batch-row[data-kind="ok"] .ol-tmdb-batch-status {
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-batch-row[data-kind="warn"] .ol-tmdb-batch-status {
    color: var(--hope-colors-warning10, #874d00);
  }

  .ol-tmdb-audit {
    display: grid;
    gap: 8px;
  }

  .ol-tmdb-duplicates {
    display: grid;
    gap: 8px;
  }

  .ol-tmdb-duplicates:empty {
    display: none;
  }

  .ol-tmdb-duplicate-head,
  .ol-tmdb-duplicate-title,
  .ol-tmdb-duplicate-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .ol-tmdb-duplicate-head {
    border: 1px solid var(--hope-colors-warning7, #d89614);
    border-radius: 6px;
    padding: 9px 10px;
    background: color-mix(in srgb, var(--hope-colors-warning7, #d89614) 7%, transparent);
  }

  .ol-tmdb-duplicate-head > div,
  .ol-tmdb-duplicate-groups {
    display: grid;
    gap: 6px;
  }

  .ol-tmdb-duplicate-group {
    display: grid;
    gap: 5px;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
    padding: 8px 9px;
  }

  .ol-tmdb-duplicate-title {
    font-size: 12px;
  }

  .ol-tmdb-duplicate-group[data-size-kind="close"] .ol-tmdb-duplicate-title span {
    color: var(--hope-colors-warning10, #874d00);
  }

  .ol-tmdb-duplicate-title span,
  .ol-tmdb-duplicate-file span:last-child {
    flex: 0 0 auto;
    color: var(--hope-colors-neutral10, #777);
    font-size: 11px;
  }

  .ol-tmdb-duplicate-file .ol-tmdb-code {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ol-tmdb-compatibility {
    display: grid;
    gap: 3px;
    border: 1px solid var(--hope-colors-warning7, #d89614);
    border-radius: 6px;
    padding: 8px 10px;
    background: color-mix(in srgb, var(--hope-colors-warning7, #d89614) 8%, transparent);
    color: var(--hope-colors-warning11, #613400);
    font-size: 12px;
  }

  .ol-tmdb-compatibility:empty {
    display: none;
  }

  .ol-tmdb-permissions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
    padding: 8px 10px;
    background: var(--hope-colors-neutral2, #fafafa);
    font-size: 12px;
  }

  .ol-tmdb-permissions strong,
  .ol-tmdb-permissions small {
    flex-basis: 100%;
  }

  .ol-tmdb-permissions span[data-allowed="true"] {
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-permissions span[data-allowed="false"],
  .ol-tmdb-permissions[data-kind="readonly"] strong {
    color: var(--hope-colors-warning10, #874d00);
  }

  .ol-tmdb-permissions small {
    color: var(--hope-colors-neutral10, #777);
  }

  .ol-tmdb-check[data-permission-disabled="true"] {
    opacity: 0.58;
    cursor: not-allowed;
  }

  .ol-tmdb-audit:empty {
    display: none;
  }

  .ol-tmdb-audit-empty,
  .ol-tmdb-audit-head,
  .ol-tmdb-audit-summary,
  .ol-tmdb-audit-table {
    border: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    border-radius: 6px;
    background: var(--hope-colors-neutral1, #fff);
  }

  .ol-tmdb-audit-empty,
  .ol-tmdb-audit-head,
  .ol-tmdb-audit-summary {
    padding: 9px 10px;
  }

  .ol-tmdb-audit-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .ol-tmdb-audit-head > div {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .ol-tmdb-audit-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--hope-colors-neutral11, #555);
  }

  .ol-tmdb-audit-table {
    overflow: hidden;
  }

  .ol-tmdb-audit-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.15fr) minmax(140px, 0.85fr);
    gap: 10px;
    align-items: start;
    padding: 8px 10px;
    border-bottom: 1px solid var(--hope-colors-neutral5, #e8e8e8);
    font-size: 12px;
  }

  .ol-tmdb-audit-row:last-child {
    border-bottom: 0;
  }

  .ol-tmdb-audit-row[data-kind="warn"] {
    color: var(--hope-colors-danger9, #d4380d);
  }

  .ol-tmdb-audit-row[data-kind="ok"] {
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-status {
    min-height: 20px;
    font-size: 13px;
    color: var(--hope-colors-neutral11, #555);
  }

  .ol-tmdb-status[data-kind="error"] {
    color: var(--hope-colors-danger9, #d4380d);
  }

  .ol-tmdb-status[data-kind="ok"] {
    color: var(--hope-colors-success9, #237804);
  }

  .ol-tmdb-action {
    border: 1px solid var(--hope-colors-neutral6, #d9d9d9);
    border-radius: 6px;
    background: var(--hope-colors-neutral1, #fff);
    color: inherit;
    min-height: 34px;
    padding: 6px 12px;
    cursor: pointer;
    font: inherit;
  }

  .ol-tmdb-action[data-primary="true"] {
    border-color: var(--hope-colors-primary9, #1677ff);
    background: var(--hope-colors-primary9, #1677ff);
    color: #fff;
  }

  .ol-tmdb-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
  }

  @media (max-width: 760px) {
    .ol-tmdb-body {
      grid-template-columns: 1fr;
    }
  }
