:root {
  color-scheme: light dark;
  --accent: #a6533f;
  --accent-strong: #82402f;
  --accent-soft: #f6e9e4;
  --canvas: #f7f8fa;
  --surface: #ffffff;
  --surface-muted: #f1f2f4;
  --text: #272321;
  --text-muted: #746b67;
  --border: #ded9d6;
  --danger: #b33c3c;
  --shadow: 0 10px 28px rgba(45, 36, 32, .08);
  font-family: "Segoe UI", "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--text); font-size: 16px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell { width: min(100%, 680px); min-height: 100dvh; margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 13px; object-fit: cover; }
.brand p, .eyebrow { margin: 0 0 3px; color: var(--text-muted); font-size: 13px; font-weight: 600; }
h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
h2 { margin: 0; font-size: 18px; }
.card { padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.auth-card { margin-top: 10vh; }
form { display: grid; gap: 10px; }
label { margin-top: 4px; font-size: 14px; font-weight: 700; }
label span { color: var(--text-muted); font-weight: 500; }
input, textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); outline: none; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, textarea:focus, button:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); outline: none; }
.primary-button, .secondary-button, .text-button, .icon-button { min-height: 48px; border-radius: 12px; font-weight: 700; }
.primary-button { border: 1px solid var(--accent); background: var(--accent); color: white; }
.primary-button:hover { background: var(--accent-strong); }
.secondary-button { border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.text-button { padding: 0 12px; border: 0; background: transparent; color: var(--text-muted); }
.auth-card .secondary-button { width: 100%; margin-top: 10px; }
.help { margin: 14px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.capture-card label:first-of-type { font-size: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.form-actions button { min-width: 96px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 2px 12px; }
.icon-button { display: grid; width: 48px; padding: 0; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.icon-button svg { width: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.offline-notice { padding: 12px 14px; border-radius: 12px; background: #fff3cd; color: #6b5311; font-size: 13px; line-height: 1.5; }
.capture-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.capture-item { padding: 16px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.capture-item h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.capture-item p { margin: 8px 0 0; color: var(--text-muted); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.capture-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.capture-meta time { color: var(--text-muted); font-size: 13px; }
.item-actions { display: flex; gap: 4px; }
.item-actions button { min-width: 48px; min-height: 44px; border: 0; border-radius: 10px; background: var(--surface-muted); color: var(--text); font-size: 13px; }
.item-actions .delete { color: var(--danger); }
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-muted); }
.empty-state p { margin: 0 0 6px; color: var(--text); font-weight: 700; }
.status-message { position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); left: 16px; z-index: 10; max-width: 648px; margin: auto; padding: 12px 16px; border-radius: 12px; background: #292624; color: white; box-shadow: var(--shadow); text-align: center; transform: translateY(140%); transition: transform .2s ease; }
.status-message.visible { transform: translateY(0); }
@media (prefers-color-scheme: dark) {
  :root { --canvas: #17191d; --surface: #22252b; --surface-muted: #2c3037; --text: #f4f1ef; --text-muted: #aaa29e; --border: #3a3f47; --accent-soft: #4a302a; --shadow: 0 10px 28px rgba(0,0,0,.25); }
  .offline-notice { background: #4d421f; color: #f6df98; }
}
@media (min-width: 560px) { .app-shell { padding-inline: 24px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
