:root {
  --bg: #f6f1e7; --fg: #1f2a24; --muted: #6b726d; --card: #fffdf8; --line: #ddd5c4;
  --accent: #2f4b3a; --accent-fg: #f3ead8; --ok: #2f6b45; --err: #a33a2a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151b17; --fg: #e9e4d8; --muted: #9aa39d; --card: #1e2620; --line: #33403a;
    --accent: #7fb08f; --accent-fg: #102016; --ok: #8fd0a2; --err: #f08a78;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: env(safe-area-inset-top) 16px 32px;
}
header { display: flex; align-items: baseline; justify-content: space-between; max-width: 560px; margin: 0 auto; }
h1 { font: 600 1.35rem Georgia, serif; margin: 16px 0; }
h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 8px; }
main { max-width: 560px; margin: 0 auto; }
form { display: grid; gap: 14px; }
.field { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.field small { font-weight: normal; }
input[type=url], input[type=text], textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.kinds { display: flex; gap: 6px; }
.kinds label { flex: 1; }
.kinds input { position: absolute; opacity: 0; }
.kinds span {
  display: block; text-align: center; padding: 8px 4px; border: 1px solid var(--line);
  border-radius: 999px; font-size: .9rem; background: var(--card); cursor: pointer;
}
.kinds input:checked + span { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.kinds input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; }
.primary {
  background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 10px;
  padding: 12px; font-weight: 600; font-size: 1rem; width: 100%;
}
.primary:disabled { opacity: .6; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 0; }
.msg { min-height: 1.4em; margin: 0; font-size: .95rem; }
.msg.ok { color: var(--ok); } .msg.err { color: var(--err); }
#recent { list-style: none; padding: 0; margin: 0; }
#recent li { padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
#recent .meta { font-size: .8rem; color: var(--muted); }
#recent .done { opacity: .55; }
.bookmarklet {
  display: inline-block; padding: 8px 14px; border-radius: 999px; background: var(--card);
  border: 1px dashed var(--accent); color: var(--fg); text-decoration: none; cursor: grab;
}
#desktop p { font-size: .9rem; color: var(--muted); }
@media (hover: none) { .desktop-only { display: none; } }
@media (display-mode: standalone) { .desktop-only { display: none; } }
