*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #16a34a;
  --green-hover: #15803d;
  --red: #dc2626;
  --red-hover: #b91c1c;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --radius: 1rem;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
}

.app-header {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
}

.app-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stamp-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 0 1.5rem;
  gap: 0.75rem;
}

.stamp-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  transition: transform 0.1s, box-shadow 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.stamp-btn:active {
  transform: scale(0.94);
  box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.btn-in  { background: var(--green); }
.btn-in:hover  { background: var(--green-hover); }
.btn-out { background: var(--red); }
.btn-out:hover { background: var(--red-hover); }

.next-label {
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.history { display: flex; flex-direction: column; gap: 1rem; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 2rem 0;
}

.day-block {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}

.day-date {
  font-weight: 600;
  font-size: 0.9rem;
}

.day-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--green);
}

.pair-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}

.pair-row:last-child { border-bottom: none; }

.pair-row.pair-open {
  background: #fffbeb;
}

.pair-times {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.time-in  { color: var(--green); font-weight: 600; }
.time-out { color: var(--red);   font-weight: 600; }
.time-arrow { color: var(--muted); }
.time-open { color: #d97706; font-style: italic; font-size: 0.85rem; }

.pair-duration {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  white-space: nowrap;
}

.text-muted { color: var(--muted); }
