:root {
  --bg: #0f1729;
  --surface: #1a2540;
  --surface-2: #22304f;
  --accent: #f4a6bd;
  --accent-soft: #f4a6bd33;
  --text: #e8ecf5;
  --muted: #7a89a8;
  --danger: #e57373;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 -apple-system, "SF Pro Text", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; }

/* login */
#login-screen {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-box {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-box h1 {
  text-align: center;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 2px;
  margin-bottom: 12px;
}

input, textarea {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  outline: none;
  width: 100%;
}
input:focus, textarea:focus { border-color: var(--accent); }

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text);
}

.pill {
  background: var(--accent);
  color: var(--bg);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 14px;
}
#login-btn {
  background: var(--accent);
  color: var(--bg);
  border-radius: 12px;
  padding: 12px;
  font-weight: 600;
}
.ghost { color: var(--muted); font-size: 14px; }
.ghost.danger { color: var(--danger); }

/* app */
#app {
  min-height: 100dvh;
  padding-bottom: 76px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--surface-2);
}
#greeting { color: var(--accent); font-weight: 500; }

.tab { padding: 20px; }
h2 { font-size: 20px; font-weight: 600; }

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

/* lists */
.list-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
}
.list-card:active { background: var(--surface-2); }
.list-card .emoji { font-size: 22px; }
.list-card .title { flex: 1; }
.list-card .counter { color: var(--accent); font-size: 14px; }

/* items */
.add-row { display: flex; gap: 8px; margin-bottom: 16px; }
.add-row input { flex: 1; }

.item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--surface-2);
}
.item .check { font-size: 20px; }
.item-body { flex: 1; display: flex; flex-direction: column; }
.item.done .item-text { color: var(--muted); text-decoration: line-through; }
.item .del { opacity: .4; }

/* notes */
#notes-area {
  min-height: 50vh;
  resize: vertical;
  margin-bottom: 12px;
  line-height: 1.6;
}

/* photos */
#photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 6px;
}
#photos-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  background: var(--surface);
}
#upload-status { color: var(--accent); font-size: 14px; margin-bottom: 10px; }

/* nav */
nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--surface-2);
  padding-bottom: env(safe-area-inset-bottom);
}
nav button {
  flex: 1;
  padding: 16px 0;
  color: var(--muted);
  font-size: 14px;
}
nav button.active { color: var(--accent); font-weight: 600; }

/* lightbox */
#lightbox {
  position: fixed;
  inset: 0;
  background: #000000ee;
  display: flex;
  flex-direction: column;
  z-index: 100;
}
#lb-close { align-self: flex-end; padding: 20px; font-size: 20px; }
#lb-img {
  flex: 1;
  min-height: 0;
  object-fit: contain;
  width: 100%;
}
#lb-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}
#lb-caption { flex: 1; font-size: 14px; }
#lb-download { text-decoration: none; }
