/* =========================================================
   Video Combinator — Premium UI
   See design.md for principles, tokens, and component specs.
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  color-scheme: dark;

  /* surfaces */
  --bg: #0a0b0d;
  --surface: #111316;
  --surface-2: #16191d;
  --surface-3: #1c2025;

  /* borders */
  --line: #21252b;
  --line-2: #2d3239;

  /* text */
  --ink: #ecedef;
  --ink-2: #c6c9ce;
  --muted: #8a8f96;
  --muted-2: #5b6068;

  /* accent */
  --accent: #7ef0b3;
  --accent-hover: #92f4c0;
  --accent-ink: #052817;
  --accent-dim: rgba(126, 240, 179, 0.12);

  /* semantic */
  --danger: #ff8a80;
  --danger-dim: rgba(255, 138, 128, 0.1);
  --amber: #f1c27b;

  /* focus */
  --focus: rgba(126, 240, 179, 0.35);

  /* motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --t-fast: 120ms;
  --t-med: 160ms;
  --t-slow: 240ms;

  /* radius */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1100px 600px at 50% -10%, rgba(126, 240, 179, 0.04), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11", "tnum";
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }

::selection { background: var(--accent-dim); color: var(--ink); }

/* focus rings */
:where(button, input, a, [tabindex]):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--focus);
  border-color: var(--accent) !important;
}

/* ---------------- layout ---------------- */
.app {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  display: grid;
  gap: 22px;
}
.workspace-section {
  display: grid;
  gap: 10px;
}

/* ---------------- top bar ---------------- */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.bar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.bar-title strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
  color: var(--ink);
}
.bar-title > div > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0;
}
.logo {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(160deg, rgba(126, 240, 179, 0.18), rgba(126, 240, 179, 0.04));
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(126, 240, 179, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}
.bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* status indicator */
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.status .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(241, 194, 123, 0.15);
  transition: background var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease);
}
.status.is-ok .dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.status.is-error .dot {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-dim);
}
.status.is-error { border-color: rgba(255, 138, 128, 0.25); }

/* quiet link buttons */
.link {
  background: none;
  border: 0;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
  transition: color var(--t-fast) var(--ease);
}
.link:hover { color: var(--ink); }
.inline-action {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------------- section title (used inline above panels if needed) ---------------- */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin: 0 2px;
}
.section-title span:last-child {
  color: var(--muted-2);
  letter-spacing: 0.04em;
}
.variation-counter {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color: var(--accent) !important;
  font-variant-numeric: tabular-nums;
}

/* ---------------- drop zones ---------------- */
.drops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.drop {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 140px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--t-med) var(--ease),
              background var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
}
.drop:hover {
  border-color: var(--muted-2);
  background: var(--surface-2);
}
.drop.is-dragover {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent-dim);
}
.drop.has-files {
  border-style: solid;
  border-color: var(--line);
  background: var(--surface-2);
}
.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.drop .file-name-input {
  position: static;
  width: 100%;
  height: 30px;
  opacity: 1;
  pointer-events: auto;
  padding: 0 9px;
  font-size: 11px;
}
.drop .file-name-input:focus {
  background: var(--surface);
}
.drop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drop-label {
  font-weight: 500;
  font-size: 13px;
  color: var(--ink);
  letter-spacing: 0;
}
.drop-count {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-3);
  min-width: 24px;
  text-align: center;
  transition: color var(--t-med) var(--ease), background var(--t-med) var(--ease);
}
.drop.has-files .drop-count {
  color: var(--accent);
  background: var(--accent-dim);
}
.drop-files {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
}
.drop-files .file {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-2);
}
.drop-files .more { color: var(--muted-2); }
.drop-empty {
  color: var(--muted-2);
  font-size: 12px;
  font-style: italic;
}
.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px 30px;
  gap: 6px;
  align-items: center;
}
.icon-button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.icon-button:hover {
  color: var(--ink);
  border-color: var(--muted-2);
  background: var(--surface-3);
}
.icon-button.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 138, 128, 0.32);
  background: var(--danger-dim);
}

/* ---------------- naming panel ---------------- */
.naming {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.naming-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.naming-output {
  display: grid;
  gap: 10px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field.flex { flex: 1; min-width: 220px; }
.field.w-24 { width: 100px; }
.field > span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="text"],
input[type="number"],
input[type="password"] {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--ink);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  outline: none;
  width: 100%;
  transition: border-color var(--t-med) var(--ease),
              background var(--t-med) var(--ease);
}
input[type="text"]:hover,
input[type="number"]:hover,
input[type="password"]:hover {
  border-color: var(--muted-2);
}
input[type="text"]:focus,
input[type="number"]:focus,
input[type="password"]:focus {
  border-color: var(--accent);
  background: var(--surface);
}
.drop .file-name-input {
  height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

/* token chips */
.tokens {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.tokens::-webkit-scrollbar { height: 4px; }
.tokens::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 999px;
}
.tokens button {
  flex: 0 0 auto;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.tokens button:hover {
  color: var(--ink);
  border-color: var(--muted-2);
  background: var(--surface-3);
}

.preview {
  display: block;
  width: 100%;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--accent);
  overflow-wrap: anywhere;
  text-align: left;
  min-width: 0;
  padding-top: 2px;
}

/* ---------------- combos preview ---------------- */
.combos {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}
.combos header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.combos header span:last-child {
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted-2);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
.combos ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.combos ul::-webkit-scrollbar { width: 6px; }
.combos ul::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 3px;
}
.combos li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 6px 16px;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  align-items: center;
  transition: background var(--t-fast) var(--ease);
}
.combos li:hover { background: var(--surface-2); }
.combos li .num {
  color: var(--muted-2);
  font-variant-numeric: tabular-nums;
}
.combos li .name {
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- action bar ---------------- */
.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px;
}
.count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.primary {
  height: 38px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
  transition: background var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-med) var(--ease);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset,
              0 6px 18px -8px rgba(126, 240, 179, 0.4);
}
.primary:hover:not(:disabled) { background: var(--accent-hover); }
.primary:active:not(:disabled) { transform: translateY(1px); }
.primary:disabled {
  background: var(--surface-3);
  color: var(--muted-2);
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------------- progress ---------------- */
.progress {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
}
.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}
.progress-label {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0;
}
.progress-meta {
  color: var(--muted);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 11px;
}
.progress-bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 180ms linear;
  border-radius: 999px;
}
.progress.is-render .progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.72; }
}

/* ---------------- run status ---------------- */
.run-status {
  position: relative;
  padding: 12px 16px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 12px;
  color: var(--ink-2);
}
.run-status::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.run-status.is-error { color: var(--danger); background: var(--danger-dim); border-color: rgba(255, 138, 128, 0.25); }
.run-status.is-error::before { background: var(--danger); }

/* ---------------- toasts ---------------- */
.toast-viewport {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: rgba(17, 19, 22, 0.96);
  color: var(--ink-2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 42px -22px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: auto;
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
  backdrop-filter: blur(14px);
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.toast-message {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.4;
}
.toast-close {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.toast-close:hover {
  color: var(--ink);
  background: var(--surface-3);
}
.toast.is-error {
  color: var(--danger);
  border-color: rgba(255, 138, 128, 0.25);
  background: rgba(39, 20, 21, 0.96);
}
.toast.is-error .toast-icon {
  background: var(--danger-dim);
  color: var(--danger);
}

/* ---------------- exports ---------------- */
.exports {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  overflow: hidden;
}
.exports:empty { display: none; }
.export-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  transition: background var(--t-fast) var(--ease);
}
.export-item:last-child { border-bottom: 0; }
.export-item:hover { background: var(--surface-2); }
.export-file {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.export-item strong {
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.export-file > span {
  flex-shrink: 0;
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: var(--muted-2);
}
.export-item p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--danger);
  font-family: "JetBrains Mono", ui-monospace, Menlo, monospace;
}
.export-item a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: color var(--t-fast) var(--ease);
}
.export-item a:hover { color: var(--accent); }
.export-item.is-failed strong { color: var(--danger); }
.export-item.is-failed span { color: var(--danger); font-size: 11px; }
.export-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.export-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.export-button svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.export-button-icon {
  width: 32px;
  padding: 0;
}
.export-button:hover {
  color: var(--accent);
  border-color: rgba(126, 240, 179, 0.34);
  background: var(--accent-dim);
}
.export-button.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 138, 128, 0.32);
  background: var(--danger-dim);
}

/* ---------------- video preview modal ---------------- */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}
.video-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}
.video-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 24px 80px -32px rgba(0, 0, 0, 0.9);
}
.video-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.video-modal-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}
.video-modal video {
  width: 100%;
  max-height: calc(100vh - 140px);
  border-radius: var(--r-md);
  background: #000;
  display: block;
}

/* ---------------- login screen ---------------- */
.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(800px 500px at 50% 30%, rgba(126, 240, 179, 0.07), transparent 60%),
    var(--bg);
}
.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 28px;
  display: grid;
  gap: 18px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 20px 60px -20px rgba(0, 0, 0, 0.6);
}
.login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
}
.login-head strong {
  display: block;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0;
}
.login-head > div > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
.login-field {
  display: grid;
  gap: 6px;
}
.login-field label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.password-control {
  position: relative;
}
.password-control input[type="password"],
.password-control input[type="text"] {
  padding-right: 44px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.password-toggle:hover {
  color: var(--ink);
  background: var(--surface-3);
}
.password-toggle .eye {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .eye-closed {
  display: none;
}
.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}
.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}
.login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.login-remember input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  transition: all var(--t-fast) var(--ease);
}
.login-remember input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.login-remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--accent-ink);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
}
.login-submit {
  background: var(--accent);
  color: var(--accent-ink);
  border: none;
  border-radius: var(--r-md);
  padding: 12px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0;
  margin-top: 4px;
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset,
              0 6px 18px -8px rgba(126, 240, 179, 0.4);
}
.login-submit:hover { background: var(--accent-hover); }
.login-submit:active { transform: translateY(1px); }
.login-error {
  font-size: 12px;
  color: var(--danger);
  background: var(--danger-dim);
  border: 1px solid rgba(255, 138, 128, 0.22);
  border-radius: var(--r-md);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-error[hidden] {
  display: none;
}
.login-error::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--danger);
  flex-shrink: 0;
}
/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .app { padding: 20px 16px 60px; gap: 18px; }
  .drops { grid-template-columns: 1fr; }
  .preview { text-align: left; width: 100%; }
  .bar { flex-wrap: wrap; }
  .naming { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
