:root {
  --bg: #f6f1e7;
  --card: #ffffff;
  --ink: #1d2a30;
  --muted: #6b7a80;
  --accent: #1f4e5f;
  --accent-ink: #ffffff;
  --error: #b3261e;
  --line: #e4ddd0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10181b;
    --card: #1a2529;
    --ink: #eef2f3;
    --muted: #9aaab0;
    --accent: #5fa3b8;
    --accent-ink: #0b1316;
    --error: #ff8a80;
    --line: #2a383d;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
[hidden] { display: none !important; }
.screen { min-height: 100%; }
.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.logo { width: 96px; height: 96px; border-radius: 22px; margin-bottom: 12px; }
h1 { margin: 0 0 4px; font-size: 32px; }
h2 { margin: 0 0 8px; font-size: 20px; }
.muted { color: var(--muted); margin: 0; }
.error { color: var(--error); max-width: 420px; }
.button {
  display: inline-block; margin-top: 20px; padding: 14px 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600;
}
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.topbar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: 24px 28px 12px; border-bottom: 1px solid var(--line);
}
.clock { font-size: clamp(40px, 7vw, 72px); font-weight: 700; line-height: 1; letter-spacing: -1px; }
.date { font-size: clamp(18px, 2.4vw, 26px); color: var(--muted); margin-top: 6px; }
.who { display: flex; gap: 14px; align-items: center; color: var(--muted); }
.who form { margin: 0; }
.grid {
  display: grid; gap: 16px; padding: 20px 28px 28px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-height: 180px; }
@media (max-width: 600px) {
  .topbar { padding: 16px; flex-direction: column; align-items: flex-start; }
  .grid { padding: 16px; }
}
