:root {
  --bg: #13171d;
  --panel: #1c222b;
  --text: #e7edf5;
  --muted: #9aa8b8;
  --accent: #3f8f73;
  --accent-2: #8c6c3f;
  --danger: #c75252;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, #25313f 0%, transparent 55%),
    radial-gradient(circle at 90% 0%, #1e3b33 0%, transparent 45%),
    var(--bg);
}
.container {
  width: min(900px, 95vw);
  margin: 2rem auto;
}
h1 {
  font-family: "Bitter", Georgia, serif;
  margin-bottom: 0.2rem;
}
.subtitle {
  color: var(--muted);
  margin-top: 0;
}
.card {
  background: var(--panel);
  border: 1px solid #2e3845;
  border-radius: 14px;
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
}
label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
input, textarea, button {
  font: inherit;
}
input, textarea {
  width: 100%;
  background: #121821;
  color: var(--text);
  border: 1px solid #33404f;
  border-radius: 9px;
  padding: 0.55rem 0.65rem;
}
button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 9px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}
button.secondary {
  background: var(--accent-2);
}
button.danger {
  background: var(--danger);
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
#app-section {
  padding-bottom: 5rem;
}
.search-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: end;
}
.entry {
  border-top: 1px solid #2f3946;
  padding: 0.8rem 0;
}
.entry:first-child {
  border-top: 0;
}
.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}
.entry-actions {
  display: flex;
  gap: 0.45rem;
}
.icon-btn {
  min-width: 2.25rem;
  padding: 0.45rem 0.6rem;
  line-height: 1;
}
.entry-date {
  font-weight: 700;
}
.error {
  color: var(--danger);
  font-weight: 700;
}
.fab {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translateX(-50%);
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 999px;
  padding: 0;
  font-size: 1.4rem;
  z-index: 10;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
#entry-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 18, 0.65);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 20;
}
#entry-editor-overlay[hidden] {
  display: none;
}
.editor-modal {
  width: min(720px, 100%);
}
.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}
@media (max-width: 640px) {
  .container { margin-top: 1rem; }
}

.entry-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
