@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,300;0,400;0,700;1,400&display=swap");

:root {
  --wt-primary: #2d55af;
  --wt-primary-dark: #1e3d7a;
  --wt-gray: #707070;
  --wt-light: #f3f4f5;
  --wt-border: #e8e8e8;
  --wt-black: #000;
  --wt-white: #fff;
  --wt-page-bg: #fff;
  --wt-surface: #fff;
  --wt-fg: #000;
  --wt-success: #198754;
  --wt-danger: #dc3545;
  --wt-warning: #ffc107;
  --radius: 4px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --wt-control-height: 2.75rem;
  color-scheme: light;
  font-family: "Lato", Calibri, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lato", Calibri, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--wt-fg);
  background: var(--wt-page-bg);
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

a {
  color: var(--wt-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wt-topbar {
  background: var(--wt-surface);
  border-bottom: 1px solid var(--wt-border);
  padding: 0.75rem 1.5rem;
}

.wt-topbar-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.wt-logo {
  display: block;
  height: 52px;
  width: auto;
}

.wt-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.wt-nav[hidden],
[hidden] {
  display: none !important;
}

.wt-nav a {
  color: var(--wt-fg);
  font-weight: 400;
}

.wt-nav a.active {
  color: var(--wt-primary);
  font-weight: 700;
}

.wt-theme-control {
  display: inline-flex;
  align-items: center;
}

.wt-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  background: var(--wt-surface);
  color: var(--wt-fg);
  cursor: pointer;
}

.wt-theme-toggle:hover {
  border-color: var(--wt-primary);
  color: var(--wt-primary);
}

.wt-theme-toggle:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}

.wt-theme-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
}

.nav-user {
  color: var(--wt-gray);
  font-size: 0.9rem;
}

.wt-hero {
  background: var(--wt-light);
  border-bottom: 1px solid var(--wt-border);
  padding: 1.75rem 1.5rem;
}

.wt-hero-inner {
  max-width: 1140px;
  margin: 0 auto;
}

.wt-hero h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.wt-hero p {
  margin: 0;
  color: var(--wt-gray);
}

.wt-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem;
}

.card {
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.login-box {
  max-width: 420px;
  margin: 2rem auto;
}

.meta {
  color: var(--wt-gray);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 1rem;
  min-width: 0;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  height: var(--wt-control-height);
  min-height: var(--wt-control-height);
  max-height: var(--wt-control-height);
  padding: 0 0.75rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--wt-control-height);
  background: var(--wt-white);
  color: var(--wt-fg);
  vertical-align: middle;
}

.field textarea {
  height: auto;
  min-height: 6rem;
  max-height: none;
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  resize: vertical;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23707070' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.field input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  -webkit-appearance: textfield;
}

.field input[type="number"]::-webkit-outer-spin-button,
.field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
  height: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
  align-items: start;
}

.field-row > .field {
  margin-bottom: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--wt-control-height);
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--wt-primary);
  color: var(--wt-white);
}

.btn-primary:hover {
  background: var(--wt-primary-dark);
}

.btn-secondary {
  background: var(--wt-white);
  color: var(--wt-fg);
  border-color: var(--wt-border);
}

.btn-danger {
  background: var(--wt-danger);
  color: var(--wt-white);
}

.btn-sm {
  min-height: 2.25rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error {
  background: #fde8ea;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.alert-success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.alert-info {
  background: #e7f1ff;
  color: #084298;
  border: 1px solid #b6d4fe;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--wt-border);
  vertical-align: middle;
}

.table th {
  font-weight: 700;
  color: var(--wt-gray);
  font-size: 0.9rem;
}

.mono {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
}

.thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--wt-light);
  border: 1px solid var(--wt-border);
}

.thumb-lg {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--wt-light);
  transition: filter 0.2s ease;
  border: 1px solid var(--wt-border);
}

img.is-loading-full {
  filter: blur(0.4px);
}

.library-filters {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: end;
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  background: var(--wt-light);
}

.library-filters .field {
  margin-bottom: 0;
}

.library-filters-actions {
  display: flex;
  align-items: end;
}

@media (max-width: 700px) {
  .library-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.library-bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  background: var(--wt-light);
}

.library-bulk-bar[hidden],
.library-bulk-bar.hidden {
  display: none !important;
}

.library-bulk-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.library-card-select {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--wt-gray);
  cursor: pointer;
}

.library-card-select input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--wt-primary);
}

.library-card {
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: var(--wt-surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.library-card:hover,
.library-card:focus-visible {
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 2px rgba(45, 85, 175, 0.2);
  outline: none;
}

.library-card.selected {
  border-color: var(--wt-primary);
  box-shadow: 0 0 0 2px rgba(45, 85, 175, 0.25);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 40;
}

.modal-backdrop[hidden],
.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  background: var(--wt-surface);
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}

.library-picker-card {
  width: min(920px, 100%);
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
}

.library-picker-grid {
  overflow: auto;
  max-height: min(55vh, 520px);
  padding-right: 0.25rem;
}

.app-confirm-card .app-confirm-title {
  margin: 0 0 0.5rem;
}

.app-confirm-card .app-confirm-lead {
  margin: 0 0 1rem;
  white-space: pre-line;
}

.app-confirm-warning {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid #f5c2c7;
  background: #fde8ea;
  color: #842029;
  font-size: 0.95rem;
}

.app-confirm-actions {
  margin-top: 0.25rem;
}

.app-log-card {
  width: min(720px, 100%);
}

.app-log-status--running {
  color: var(--wt-primary);
}

.app-log-status--ok {
  color: #0f5132;
}

.app-log-status--err {
  color: #842029;
}

html[data-theme="dark"] .app-log-status--ok {
  color: #75b798;
}

html[data-theme="dark"] .app-log-status--err {
  color: #f1aeb5;
}

.app-log-pre {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  max-height: min(50vh, 420px);
  overflow: auto;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  background: #1e1e1e;
  color: #e8e8e8;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

html[data-theme="dark"] .app-confirm-warning {
  background: #2a1818;
  color: #f1aeb5;
  border-color: #842029;
}

.screens-dialog-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.screens-dialog-actions #screens-dialog-delete {
  margin-left: auto;
}

.screens-dialog-preview {
  margin: 1rem 0;
}

.screens-dialog-preview img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  background: var(--wt-light);
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
}

.screens-checkboxes {
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 1rem;
  margin: 0 0 1rem;
}

.screens-checkboxes legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.screen-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  cursor: pointer;
}

.screen-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--wt-primary);
}

.library-card h3 {
  font-size: 0.95rem;
  margin: 0.5rem 0 0.25rem;
  word-break: break-word;
}

.library-card .meta {
  font-size: 0.85rem;
  margin: 0;
}

.playlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.playlist-item {
  display: grid;
  grid-template-columns: 28px 88px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--wt-border);
}

.playlist-item.dragging {
  opacity: 0.5;
}

.playlist-thumb-btn {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: var(--radius);
  line-height: 0;
}

.playlist-thumb-btn:focus-visible {
  outline: 2px solid var(--wt-primary);
  outline-offset: 2px;
}

.playlist-thumb-btn .thumb {
  display: block;
}

.playlist-preview-card {
  width: min(960px, 100%);
}

.playlist-preview-frame {
  margin-top: 1rem;
  background: var(--wt-light);
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: min(70vh, 720px);
  overflow: auto;
}

.playlist-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: min(70vh, 720px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.drag-handle {
  cursor: grab;
  color: var(--wt-gray);
  font-size: 1.25rem;
  user-select: none;
  text-align: center;
}

.duration-input {
  width: 5.5rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  font: inherit;
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--wt-light);
  color: var(--wt-gray);
  font-size: 0.8rem;
  margin: 0.1rem 0.2rem 0.1rem 0;
}

.hidden {
  display: none !important;
}

.dropzone {
  border: 2px dashed var(--wt-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--wt-light);
  color: var(--wt-gray);
}

.dropzone.dragover {
  border-color: var(--wt-primary);
  background: #eef3fb;
  color: var(--wt-primary);
}

.upload-progress {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  background: var(--wt-light);
}

.upload-progress[hidden],
.upload-progress.hidden {
  display: none !important;
}

.upload-progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.upload-progress-title {
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.upload-progress-detail {
  margin: 0;
  color: var(--wt-gray);
  font-size: 0.95rem;
  word-break: break-word;
}

.upload-progress-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr 3rem;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.upload-progress-row:last-child {
  margin-bottom: 0;
}

.upload-progress-row label {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--wt-gray);
}

.upload-progress-track {
  height: 0.7rem;
  border-radius: 999px;
  background: var(--wt-border);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: var(--wt-primary);
  transition: width 0.15s ease;
}

.upload-progress-bar.is-indeterminate {
  width: 40% !important;
  animation: upload-indeterminate 1.1s ease-in-out infinite;
}

@keyframes upload-indeterminate {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(280%);
  }
}

.upload-progress-pct {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
  color: var(--wt-gray);
}

label.btn.is-disabled,
label.btn:has(input:disabled),
.dropzone.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.copy-url {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.copy-url input {
  flex: 1;
  min-width: 0;
  min-height: 2.25rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--wt-border);
  border-radius: var(--radius);
  font: inherit;
  background: var(--wt-light);
}

.screens-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.screen-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--wt-border);
}

.screen-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.screen-row-main {
  min-width: 0;
}

.screen-row-main strong {
  display: block;
  word-break: break-word;
}

.screen-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  line-height: 1.3;
}

.screen-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--wt-muted, #888);
}

.screen-status-label {
  font-weight: 600;
}

.screen-status-detail {
  color: var(--wt-muted, #666);
  font-weight: 400;
}

.screen-status--online .screen-status-dot {
  background: #2e7d32;
}

.screen-status--online .screen-status-label {
  color: #2e7d32;
}

.screen-status--offline .screen-status-dot {
  background: #c62828;
}

.screen-status--offline .screen-status-label {
  color: #c62828;
}

.screen-status--unknown .screen-status-dot {
  background: #9e9e9e;
}

.screen-status--unknown .screen-status-label {
  color: var(--wt-muted, #666);
}

html[data-theme="dark"] .screen-status--online .screen-status-dot,
html[data-theme="dark"] .screen-status--online .screen-status-label {
  color: #81c784;
}

html[data-theme="dark"] .screen-status--online .screen-status-dot {
  background: #81c784;
}

html[data-theme="dark"] .screen-status--offline .screen-status-dot,
html[data-theme="dark"] .screen-status--offline .screen-status-label {
  color: #ef9a9a;
}

html[data-theme="dark"] .screen-status--offline .screen-status-dot {
  background: #ef9a9a;
}

@media (max-width: 700px) {
  .playlist-item {
    grid-template-columns: 24px 64px 1fr;
  }
  .playlist-actions {
    grid-column: 1 / -1;
  }

  .copy-url {
    flex-direction: column;
    align-items: stretch;
  }

  .copy-url .btn {
    width: 100%;
  }
}

/* Settings / audit / guide */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.settings-tabs .btn.active {
  background: var(--wt-primary);
  color: var(--wt-white);
  border-color: var(--wt-primary);
}

.audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.audit-filters > .field {
  margin-bottom: 0;
  min-width: 0;
}

.audit-list,
.users-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.audit-row,
.user-row {
  border-bottom: 1px solid var(--wt-border);
  padding: 0.85rem 0;
  min-width: 0;
}

.audit-row:last-child,
.user-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.audit-row time {
  display: block;
  color: var(--wt-gray);
  font-size: 0.85rem;
}

.audit-summary,
.audit-meta,
.audit-detail,
.audit-detail-summary,
.user-row-main,
.user-row-email {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.audit-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.audit-row-main {
  min-width: 0;
  flex: 1;
}

.audit-detail-body {
  margin-top: 1rem;
}

.audit-detail-summary {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.audit-detail {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--wt-gray);
}

.audit-detail-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--wt-border);
}

.audit-detail-line:last-child {
  border-bottom: 0;
}

.audit-detail-key {
  font-weight: 700;
  color: var(--wt-fg);
}

.audit-detail-key::after {
  content: ":";
}

.users-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.users-header h2 {
  margin: 0;
}

.users-list-host {
  margin-top: 1rem;
  min-width: 0;
}

.player-url-line {
  word-break: break-all;
}

.player-row .user-row-actions {
  gap: 0.35rem;
}

.user-row {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.add-user-panel {
  margin-top: 1.5rem;
  border-top: 1px solid var(--wt-border);
  padding-top: 1rem;
}

.add-user-panel .alert {
  margin-top: 1rem;
}

@media (max-width: 700px) {
  .audit-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .wt-main {
    padding: 1rem;
  }

  .card {
    padding: 1rem;
  }

  .users-header {
    flex-direction: column;
    align-items: stretch;
  }

  .users-header .btn,
  .user-row-actions .btn,
  .add-user-panel .btn-row .btn {
    width: 100%;
  }

  .audit-row-top {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-row-top .btn {
    width: 100%;
  }

  .user-row-actions {
    flex-direction: column;
  }

  .add-user-panel .btn-row {
    flex-direction: column;
    align-items: stretch;
  }
}

.guide-toc ol {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.guide-section {
  scroll-margin-top: 1rem;
}

.guide-section h2 {
  margin-top: 0;
}

.guide-tip {
  background: var(--wt-light);
  border-left: 3px solid var(--wt-primary);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.guide-table th,
.guide-table td {
  border-bottom: 1px solid var(--wt-border);
  padding: 0.65rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --wt-primary: #6b8fd4;
  --wt-primary-dark: #8aa6e0;
  --wt-gray: #a0a6b0;
  --wt-light: #1a1f27;
  --wt-border: #2a3038;
  --wt-page-bg: #0f1217;
  --wt-surface: #161a21;
  --wt-fg: #e8eaed;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .wt-logo {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] .btn-secondary {
  background: var(--wt-surface);
  color: var(--wt-fg);
  border-color: var(--wt-border);
}

html[data-theme="dark"] .meta,
html[data-theme="dark"] label {
  color: var(--wt-gray);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .copy-url input,
html[data-theme="dark"] .duration-input {
  background-color: #12151a;
  color: var(--wt-fg);
  border-color: var(--wt-border);
}

html[data-theme="dark"] .dropzone {
  background: #12151a;
}

html[data-theme="dark"] .dropzone.dragover {
  background: #1a2a3a;
}

html[data-theme="dark"] .upload-progress {
  background: #12151a;
}

html[data-theme="dark"] .library-filters,
html[data-theme="dark"] .library-bulk-bar {
  background: #12151a;
}

html[data-theme="dark"] .alert-error {
  background: #2a1818;
  color: #f1aeb5;
  border-color: #842029;
}

html[data-theme="dark"] .alert-success {
  background: #14261c;
  color: #a3cfbb;
  border-color: #0f5132;
}

html[data-theme="dark"] .alert-info {
  background: #152033;
  color: #9ec5fe;
  border-color: #084298;
}

html[data-theme="dark"] .guide-tip {
  background: #12151a;
}

html[data-theme="dark"] .library-card.selected {
  box-shadow: 0 0 0 2px rgba(107, 143, 212, 0.4);
}
