:root {
  --bg: #0e1117;
  --panel: #171b24;
  --panel-2: #1f2530;
  --text: #e7ebf2;
  --muted: #8b94a3;
  --accent: #6ea8fe;
  --accent-press: #4f8de0;
  --error: #ff6b6b;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 560px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(32px + env(safe-area-inset-bottom));
}

.view { display: flex; flex-direction: column; gap: 16px; }

.brand { text-align: center; margin: 12vh 0 8px; }
.brand h1 { font-size: 2.6rem; margin: 0; letter-spacing: -0.02em; }
.tagline { color: var(--muted); margin: 6px 0 0; }

.card {
  background: var(--panel);
  border: 1px solid #232a36;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label { font-size: 0.85rem; color: var(--muted); }

input, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid #2a3140;
  border-radius: 10px;
  color: var(--text);
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: none;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }

button {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
button.primary { background: var(--accent); color: #0b1020; }
button.primary:active { background: var(--accent-press); }
button.ghost { background: transparent; color: var(--muted); font-weight: 500; }
button.ghost:active { color: var(--text); }

.error { color: var(--error); text-align: center; font-size: 0.9rem; }
.muted { color: var(--muted); font-size: 0.85rem; }

.topbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.topbar h1 { margin: 0; font-size: 1.6rem; }
nav { display: flex; gap: 6px; background: var(--panel); padding: 4px; border-radius: 12px; }
.tab {
  flex: 1; background: transparent; color: var(--muted);
  padding: 9px; font-weight: 500;
}
.tab.active { background: var(--panel-2); color: var(--text); }

.row { display: flex; align-items: center; justify-content: space-between; }

.photo-drop {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1.5px dashed #38414f;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  overflow: hidden;
  cursor: pointer;
}
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }

#timeline { display: flex; flex-direction: column; gap: 14px; }
.entry {
  background: var(--panel);
  border: 1px solid #232a36;
  border-radius: var(--radius);
  overflow: hidden;
}
.entry img { width: 100%; display: block; background: var(--panel-2); }
.entry .body { padding: 12px 14px; }
.entry .date { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.entry .sentence { margin: 4px 0 0; line-height: 1.4; }
