* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f8fafc;
  color: #111111;
  line-height: 1.5;
  min-height: 100vh;
  padding: 24px 16px;
}

.container {
  max-width: 900px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e2e8f0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-pin {
  font-size: 24px;
}

.brand h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats {
  font-size: 13px;
  color: #64748b;
}

.composer-card {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.composer-card:focus-within {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.collapsed-prompt {
  padding: 14px 16px;
  color: #64748b;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
}

.collapsed-prompt:hover {
  background-color: #fcfdfe;
  color: #334155;
}

#noteForm {
  padding: 16px;
}

.form-group {
  margin-bottom: 12px;
}

textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  color: #111111;
  background-color: #ffffff;
  resize: vertical;
  min-height: 80px;
  outline: none;
}

textarea:focus {
  border-color: #94a3b8;
}

.composer-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.priority-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.priority-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}

.priority-opt input {
  display: none;
}

.priority-opt.p-urgent {
  background-color: #fff1f2;
}
.priority-opt.p-urgent:has(input:checked) {
  background-color: #ffcdd2;
  border-color: #ef9a9a;
  font-weight: 600;
}

.priority-opt.p-important {
  background-color: #fff7ed;
}
.priority-opt.p-important:has(input:checked) {
  background-color: #ffe0b2;
  border-color: #ffcc80;
  font-weight: 600;
}

.priority-opt.p-normal {
  background-color: #f0fdf4;
}
.priority-opt.p-normal:has(input:checked) {
  background-color: #c8e6c9;
  border-color: #a5d6a7;
  font-weight: 600;
}

.btn-group {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-primary {
  background-color: #111111;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #222222;
}

.btn-secondary {
  background-color: #ffffff;
  color: #475569;
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  background-color: #f1f5f9;
  color: #111111;
}

.hidden {
  display: none !important;
}

.privacy-shield {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 48px 24px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.privacy-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 12px;
}

.privacy-shield h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.privacy-shield p {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.note-card {
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 120px;
  border-width: 1px;
  border-style: solid;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.note-card.priority-1 {
  background-color: #ffcdd2;
  border-color: #ef9a9a;
}

.note-card.priority-2 {
  background-color: #ffe0b2;
  border-color: #ffcc80;
}

.note-card.priority-3 {
  background-color: #c8e6c9;
  border-color: #a5d6a7;
}

.note-body {
  font-size: 14px;
  color: #111111;
  white-space: pre-wrap;
  word-break: break-word;
  margin-bottom: 12px;
}

.note-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.note-meta {
  font-size: 11px;
  color: rgba(17, 17, 17, 0.65);
}

.note-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  background: none;
  border: none;
  font-size: 12px;
  color: #111111;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: 0.75;
}

.action-btn:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.06);
}

.action-btn.del:hover {
  color: #dc2626;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 16px;
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 600px) {
  .notes-grid {
    grid-template-columns: 1fr;
  }
  .composer-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .priority-selector {
    justify-content: space-between;
  }
  .btn-group {
    margin-left: 0;
    justify-content: flex-end;
  }
}
