:root {
  color-scheme: light;
  --bg: #f4efe8;
  --ink: #241c18;
  --muted: #6d625b;
  --card: #fffdf9;
  --line: #e4d9cf;
  --accent: #b5523a;
  --accent-ink: #fff8f4;
  --end: #1d6b56;
  --live: #f3d7cf;
  --shadow: 0 8px 24px rgba(60, 36, 24, 0.08);
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}

#app {
  width: min(100%, 32rem);
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem max(1.5rem, env(safe-area-inset-bottom));
}

h1, h2, p { margin: 0; }

h1 {
  font-size: 1.7rem;
  line-height: 1.2;
  font-weight: 700;
}

h2 {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.eyebrow, .hint, .card-meta, .live-label, .empty {
  color: var(--muted);
}

.eyebrow {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.top { margin-bottom: 1rem; }

.session-top h1 { margin-top: 0.75rem; }

.primary, .back, .text-button, .card-open, .icon-button {
  font: inherit;
  cursor: pointer;
}

.primary {
  width: 100%;
  min-height: 4.5rem;
  border: 0;
  border-radius: 1rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.primary:active { transform: scale(0.99); }

.primary-end { background: var(--end); }

.back, .text-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0.4rem 0;
  font-size: 1rem;
}

.text-button {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  min-height: 2.75rem;
}

.timer {
  margin: 1rem 0 1.5rem;
  padding: 1rem;
  border-radius: 1.25rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.timer-live { background: var(--live); }

.live-label { font-size: 0.95rem; }

.live-time {
  margin: 0.25rem 0 0.9rem;
  font-size: 3.2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.list { display: grid; gap: 0.75rem; margin-top: 1rem; }

.card {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-live { outline: 2px solid var(--accent); }

.card-open {
  flex: 1;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 1rem;
  color: inherit;
}

.card-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 650;
}

.card-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.92rem;
}

.icon-button {
  width: 3rem;
  min-height: 3rem;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
}

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 0.75rem 0.55rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

th {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td:last-child, th:last-child { text-align: right; width: 3rem; }

tr:last-child td { border-bottom: 0; }

.hint, .empty { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.4; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .timer-live { animation: pulse 1.6s ease-in-out infinite; }
}

@keyframes pulse {
  50% { background: #f8e4de; }
}
