* { box-sizing: border-box; }
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1a2433;
  --ink-soft: #5a6678;
  --line: #e3e7ec;
  --accent: #0f4c81;
  --accent-soft: #e0ecf7;
  --danger: #c83e3e;
  --shadow: 0 1px 2px rgba(15, 29, 46, 0.05), 0 4px 12px rgba(15, 29, 46, 0.04);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #0f1d2e;
  color: #e6edf6;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { display: flex; flex-direction: column; }
.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.brand-sub {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #8da3bd;
  margin-top: 2px;
}
.user { text-align: right; }
.user-name {
  font-weight: 600;
  font-size: 14px;
}
.user-id {
  font-size: 12px;
  color: #8da3bd;
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

.hero { padding: 8px 4px 16px; }
.hero h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}
.quote-label {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 10px;
}
.quote-card blockquote {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 500;
  font-style: italic;
  color: var(--ink);
}
.quote-card cite {
  font-style: normal;
  font-size: 13px;
  color: var(--ink-soft);
}

.notes { margin-top: 28px; }
.notes-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.notes h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.notes-count {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.note-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.note-form textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: vertical;
  min-height: 60px;
  font: inherit;
  color: var(--ink);
  background: transparent;
  padding: 4px;
}
.note-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}
.note-hint {
  font-size: 12px;
  color: var(--ink-soft);
}
button {
  font: inherit;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, transform 80ms ease;
}
button:hover { background: #0c3f6c; }
button:active { transform: translateY(1px); }
button:disabled {
  background: #c8d0d9;
  cursor: not-allowed;
  transform: none;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.note-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.note-content {
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}
.note-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.note-del {
  background: transparent;
  color: var(--ink-soft);
  border: 0;
  padding: 4px 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 6px;
}
.note-del:hover { background: #f4e4e4; color: var(--danger); }

.note-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 20px 0;
}

.foot {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.banner-error {
  background: #fdecec;
  border: 1px solid #f3c4c4;
  color: #8a2727;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  margin: 12px 0;
}
