:root {
  --bg: #f6f5f2;
  --card: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6a66;
  --line: #e2e0da;
  --accent: #0a6cc2;
  --accent-text: #ffffff;
  --danger: #b3261e;
  --ok: #1e7b34;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --card: #222220;
    --text: #ecebe7;
    --muted: #a3a29c;
    --line: #3a3936;
    --accent: #4aa3ff;
    --accent-text: #0b1520;
    --danger: #ff8a80;
    --ok: #7bd88f;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 34rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
h1 { font-size: 1.6rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.sub { color: var(--muted); margin: 0 0 1.25rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

label { display: block; font-weight: 600; margin: .5rem 0 .3rem; }
input[type=password], input#title {
  width: 100%;
  padding: .6rem .7rem;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
}
button {
  font: inherit;
  font-weight: 600;
  margin-top: .75rem;
  padding: .6rem 1.1rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
button.link { background: none; color: var(--muted); padding: 0; text-decoration: underline; }

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1.4rem 1rem;
  border: 2px dashed var(--line);
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  cursor: pointer;
}
.drop.over { border-color: var(--accent); }
.drop small { color: var(--muted); font-weight: 400; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.now-title { font-size: 1.15rem; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.meta { color: var(--muted); margin: .25rem 0 0; font-size: .95rem; }
.empty { color: var(--muted); margin: 0; }

progress { width: 100%; height: 10px; margin-top: .9rem; accent-color: var(--accent); }
.msg { min-height: 1.5em; margin: .6rem 0 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

details summary { cursor: pointer; font-weight: 600; }
details ol { padding-left: 1.2rem; margin: .75rem 0 0; }
details li { margin-bottom: .4rem; }
.foot { text-align: center; }
