:root {
  --bg: #f6f5f1; --panel: #ffffff; --ink: #1c2530; --muted: #6b7480;
  --line: #e2e0d8; --accent: #2a7f8f; --accent-ink: #ffffff; --bad: #b3261e;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #12171c; --panel: #1b2229; --ink: #e8eaed; --muted: #9aa3ad;
          --line: #2c353e; --accent: #5fafbf; --accent-ink: #0d1418; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
       background: var(--bg); color: var(--ink);
       padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom); }
[hidden] { display: none !important; }
header, main { max-width: 760px; margin: 0 auto; }
header { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 8px; }
h1 { font-size: 22px; margin: 0; }
.card { display: block; background: var(--panel); border: 1px solid var(--line);
        border-radius: 14px; padding: 20px; }
.narrow { max-width: 360px; margin: 18vh auto 0; display: grid; gap: 10px; }
label { font-size: 14px; color: var(--muted); }
input[type=password] { font: inherit; padding: 12px; border-radius: 10px;
                       border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
#drop { text-align: center; padding: 32px 16px; cursor: pointer; border-style: dashed; border-width: 2px; }
#drop strong { display: block; font-size: 17px; margin-bottom: 4px; color: var(--ink); }
#drop input { display: block; margin: 14px auto 0; max-width: 100%; color: var(--muted); }
.msg { min-height: 24px; color: var(--muted); margin: 12px 0; }
.msg.bad { color: var(--bad); }
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink);
       padding: 10px 16px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 15px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0 12px; }
.bar h2 { font-size: 15px; margin: 0 auto 0 0; word-break: break-all; }
#out p { margin: 0 0 12px; }
#out .ts { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 12px;
           font-weight: 600; margin-right: 8px; }
.label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
         color: var(--muted); margin: 28px 0 8px; }
#list { list-style: none; margin: 0 0 40px; padding: 0; }
#list button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between;
               gap: 12px; width: 100%; padding: 12px; border-bottom: 1px solid var(--line);
               cursor: pointer; font-size: 15px; }
#list button span:last-child { color: var(--muted); font-size: 13px; white-space: nowrap; }
#list button:hover, #list button:focus-visible { background: var(--panel); }
