:root {
  --bg: #0b0d10;
  --card: #161a20;
  --border: #262b33;
  --text: #e8eaed;
  --muted: #8a919c;
  --accent: #5b9dff;
  --danger: #ff6b6b;
  --good: #4caf7d;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

#clock { margin: 0; font-size: 1.4rem; font-weight: 600; }

.status-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 0.8rem; color: var(--muted); }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 4px; }
.status-dot.up { background: var(--good); }
.status-dot.down { background: var(--danger); }

.grid {
  display: grid;
  gap: 14px;
  padding: 14px;
  grid-template-columns: 1fr;
}

/* Wide/landscape (mobile browsers, desktop testing) */
@media (min-width: 700px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

/* Tall portrait kiosk display */
@media (min-width: 700px) and (min-aspect-ratio: 3/4) and (max-aspect-ratio: 4/3) {
  .grid { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  min-height: 120px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scroll { max-height: 40vh; overflow-y: auto; }

.event, .chore, .note {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.event:last-child, .chore:last-child, .note:last-child { border-bottom: none; }
.event .time, .chore .due { color: var(--muted); font-size: 0.85rem; }

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.task-item:last-child { border-bottom: none; }
.task-item .title { flex: 1; }
.task-item.done .title { text-decoration: line-through; color: var(--muted); }

.task-item button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 1.1rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.task-item button:active { background: var(--border); }
.task-item .check { border-color: var(--good); }
.task-item .deprioritize { color: var(--muted); }

#ask-form { display: flex; gap: 8px; margin-bottom: 10px; }
#ask-input {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
}
#ask-form button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #06121f;
  font-weight: 600;
  cursor: pointer;
}
#ask-answer { white-space: pre-wrap; font-size: 0.95rem; }
.muted { color: var(--muted); }
