/* Day2Day — dark, high-contrast, one-thumb. Tokens lifted from GymApp. */
:root {
  --bg: #0d0f12;
  --card: #16191f;
  --card-2: #1d2129;
  --text: #eef1f5;
  --muted: #8b93a1;
  --accent: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior: none;
}

body {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 4px 2px 14px;
}
header h1 { font-size: 18px; font-weight: 800; margin: 0; letter-spacing: 0.02em; }
header .date { color: var(--muted); font-size: 13px; }

h2 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 22px 4px 10px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 12px;
}

.q-time { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.q-text { font-size: 21px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.q-note { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 6px; }

button {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-top: 10px;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--card-2);
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
button:active { transform: scale(0.97); }

button.other {
  background: transparent;
  border: 1px dashed var(--muted);
  color: var(--muted);
  min-height: 48px;
}

.free-row { display: flex; gap: 8px; margin-top: 10px; }
.free-row input {
  flex: 1;
  min-height: 52px;
  padding: 8px 14px;
  border: 1px solid var(--card-2);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}
.free-row input:focus { outline: 1px solid var(--accent); }
.free-row button {
  width: auto;
  margin: 0;
  padding: 0 20px;
  background: var(--accent);
  color: #08240f;
  font-weight: 800;
}

.caught-up {
  text-align: center;
  padding: 36px 18px;
  color: var(--muted);
}
.caught-up .big { font-size: 34px; margin-bottom: 8px; }

.log-item {
  display: flex;
  gap: 12px;
  align-items: baseline;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 15px;
}
.log-item .t { color: var(--muted); font-size: 13px; white-space: nowrap; }
.log-item .a { font-weight: 600; }
.log-item.missed .a { color: var(--muted); font-weight: 400; font-style: italic; }
.log-item .mark { margin-left: auto; font-size: 13px; }
.log-item .mark.ok { color: var(--accent); }
.log-item .mark.miss { color: var(--warn); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--accent);
  color: #08240f;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 999px;
  animation: pop 0.18s ease-out;
  z-index: 10;
}
@keyframes pop { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }

.offline {
  background: var(--warn);
  color: #241a02;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 12px;
}
.hidden { display: none; }
