:root {
  color-scheme: light;
  --ink: #292723;
  --muted: #777169;
  --paper: #f7f2ea;
  --card: #fffdfa;
  --line: #e6dfd4;
  --shadow: 0 12px 35px rgba(71, 58, 43, 0.09);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }

.app-shell {
  width: min(100%, 600px);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px max(30px, env(safe-area-inset-bottom));
}

header, .section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 2rem; letter-spacing: -0.04em; }
h2 { margin-bottom: 0; font-size: 1.2rem; }
.eyebrow { margin-bottom: 5px; color: var(--muted); font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--muted); }

.icon-button, .text-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}
.icon-button { width: 44px; height: 44px; font-size: 1.3rem; }
.text-button { padding: 10px 0 10px 18px; font-weight: 650; }

.event-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 25px;
}

.event-button {
  min-height: 116px;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(40, 35, 28, .06);
  font-size: 1.05rem;
  font-weight: 750;
  transition: transform .08s, opacity .15s;
}
.event-button:active { transform: scale(.97); }
.event-button:disabled { opacity: .55; }
.event-icon { display: block; margin-bottom: 8px; font-size: 2rem; }

.lavender { background: #dedcf6; }
.sun { background: #f8df8e; }
.peach { background: #efd2b6; }
.blue { background: #cbe3ee; }
.mint { background: #cfe7d8; }
.rose { background: #efd1d9; }

.status { min-height: 24px; margin: 14px 0 4px; text-align: center; color: var(--muted); font-size: .9rem; }
.history { margin-top: 18px; }
.section-heading { margin-bottom: 10px; }
.event-list { margin: 0; padding: 0; list-style: none; }
.event-row {
  display: grid;
  grid-template-columns: 42px minmax(44px, 1fr) auto 34px 32px;
  align-items: center;
  gap: 8px;
  min-height: 66px;
  border-bottom: 1px solid var(--line);
}
.history-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 14px; }
.event-name { font-weight: 700; }
time { color: var(--muted); font-size: .86rem; white-space: nowrap; }
.relative-time {
  min-width: 34px;
  text-align: right;
  font-size: .88rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.delete-event {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0 0 2px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #9a746d;
  background: transparent;
  font-size: 1.45rem;
  line-height: 1;
}
.delete-event:active { background: #eaded9; }
.delete-event:disabled { opacity: .4; }
.empty-state { padding: 30px 10px; color: var(--muted); text-align: center; }

.login-card {
  margin-top: clamp(45px, 15vh, 140px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.brand-mark { margin-bottom: 18px; font-size: 2.5rem; }
label { display: block; margin: 25px 0 8px; font-size: .9rem; font-weight: 700; }
input {
  width: 100%;
  min-height: 54px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 1rem;
}
input:focus { outline: 3px solid #cbe3ee; border-color: #8bb6c8; }
.primary {
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: #34312d;
  font-weight: 750;
}
.error { min-height: 20px; margin: 12px 0 0; color: #a53838; font-size: .9rem; }

@media (min-width: 520px) {
  .event-grid { grid-template-columns: repeat(3, 1fr); }
}
