/* SkyDash: light and dark themes from the ТЗ palette. */
:root {
  --bg: #F2F2F7;
  --card: #FFFFFF;
  --text: #17171A;
  --muted: #6E6E73;
  --accent: #007AFF;
  --danger: #FF3B30;
  --radius: 18px;
  --hit: 48px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1C1C1E;
    --text: #F2F2F7;
    --muted: #8E8E93;
  }
}

* { box-sizing: border-box; }
body { margin: 0; padding: 20px; max-width: 760px; margin-inline: auto; }
h1 { font-size: 32px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
.muted { color: var(--muted); margin: 4px 0 12px; }
.top { margin-bottom: 20px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.grow { flex: 1; }

button, input, .drop {
  min-height: var(--hit);
  font: inherit;
  border-radius: 12px;
  border: 1px solid rgba(127, 127, 127, 0.3);
  padding: 0 16px;
  background: transparent;
  color: var(--text);
}
button { cursor: pointer; }
button:disabled { opacity: 0.45; cursor: default; }
button.primary { background: var(--accent); color: #fff; border-color: transparent; }
button.danger { color: var(--danger); }
input { flex: 1; min-width: 180px; }
input[type="file"] { border: 0; padding: 0; }

.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  border-style: dashed;
  padding: 16px;
  text-align: center;
  cursor: pointer;
}
.drop input { display: none; }

.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
}
.list li:last-child { border-bottom: 0; }

.dot { width: 10px; height: 10px; border-radius: 50%; background: #8E8E93; }
.dot.on { background: #34C759; }

dialog {
  border: 0;
  border-radius: 22px;
  padding: 20px;
  background: var(--card);
  color: var(--text);
  width: min(92vw, 480px);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.4); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 12px 18px;
  border-radius: 14px;
  max-width: 90vw;
}

@media (max-width: 520px) {
  body { padding: 14px; }
  .row button { flex: 1 1 auto; }
}
