:root {
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  color: #17211c;
  background: #f0f3ec;
  --ink: #17211c;
  --muted: #657068;
  --paper: rgba(255, 255, 252, .92);
  --accent: #176a46;
  --line: #d8ded6;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #d7e7d8, transparent 38%), #f0f3ec; }
main { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 46px 0 80px; }
header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 28px; }
h1 { margin: 2px 0 0; font: 700 clamp(40px, 8vw, 76px)/.9 ui-serif, Georgia, serif; letter-spacing: -.05em; }
h2 { margin-top: 0; }
.eyebrow { margin: 0; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.badge { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 13px; }
.card, .item { border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 14px 42px rgba(37, 54, 43, .07); }
.unlock { width: min(560px, 100%); padding: 26px; }
.unlock p { color: var(--muted); line-height: 1.55; }
label { display: grid; gap: 7px; margin: 16px 0; font-size: 13px; font-weight: 650; }
input, button { font: inherit; }
input { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.75); color: var(--ink); }
button { padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
button:hover { border-color: var(--accent); }
button.primary { border-color: var(--accent); background: var(--accent); color: white; }
.error { min-height: 1.4em; color: #a32929 !important; }
.toolbar { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.summary { color: var(--muted); font-size: 13px; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.item { overflow: hidden; }
.item .preview { min-height: 160px; display: grid; place-items: center; background: #e3e9e1; }
.item img { display: block; width: 100%; height: 230px; object-fit: contain; }
.item .text { margin: 0; min-height: 160px; padding: 18px; white-space: pre-wrap; overflow-wrap: anywhere; font: 14px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.item footer { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.item footer time { margin-right: auto; color: var(--muted); font-size: 12px; }
.empty { padding: 80px 20px; text-align: center; color: var(--muted); }
.devices { margin-top: 18px; padding: 16px; }
.devices summary { cursor: pointer; font-weight: 700; }
.device { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.device:last-child { border-bottom: 0; }
.device small { color: var(--muted); }
.device button { grid-column: 2; grid-row: 1 / 3; }
@media (max-width: 620px) {
  main { width: min(100% - 22px, 960px); padding-top: 24px; }
  header { align-items: center; }
  .toolbar { grid-template-columns: 1fr 1fr; }
  .toolbar input { grid-column: 1 / -1; }
}
@media (prefers-color-scheme: dark) {
  :root { color: #e9eee9; background: #111713; --ink: #e9eee9; --muted: #9ca79f; --paper: rgba(25,34,28,.94); --accent: #71d6a3; --line: #39443d; }
  body { background: radial-gradient(circle at top right, #173b29, transparent 38%), #111713; }
  input { background: #121914; }
  .item .preview { background: #19241d; }
}
