* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f4f2;
  color: #1c2a22;
}
.topbar { text-align: center; padding: 32px 20px 22px; background: #0f766e; color: #fff; }
.topbar .brand { font-size: 1.5rem; font-weight: 900; margin-bottom: 4px; }
.topbar p { margin: 0; opacity: 0.9; font-size: 0.92rem; }

.layout {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 20px 60px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  align-items: start;
}
.main-col { display: flex; flex-direction: column; gap: 20px; }

.composer {
  background: #fff;
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.row { display: flex; gap: 10px; margin-bottom: 10px; }
.row input, .composer select { flex: 1; }
.composer input, .composer select {
  padding: 10px 12px;
  border: 1px solid #d6ded9;
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
}
.composer input[name=note] { width: 100%; margin-bottom: 10px; }
.composer button {
  background: #0f766e;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.92rem;
}
.composer button:hover { background: #0c5f58; }
.error { color: #b91c1c; font-size: 0.85rem; margin: 0 0 8px; }

.day-group { margin-bottom: 4px; }
.day-header {
  font-weight: 800;
  font-size: 0.85rem;
  color: #0f766e;
  padding: 6px 0;
  position: sticky;
  top: 0;
  background: #f0f4f2;
}
.day-items { display: flex; flex-direction: column; gap: 8px; }
.checkin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.ci-emoji { font-size: 1.1rem; }
.ci-nick { font-weight: 700; }
.ci-cat { background: #e6f3f1; color: #0f766e; padding: 2px 9px; border-radius: 999px; font-size: 0.78rem; }
.ci-note { color: #4b5563; flex: 1; }
.ci-time { color: #9ca3af; font-size: 0.78rem; margin-left: auto; }

.empty { text-align: center; color: #6b7280; padding: 30px 0; }

.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }
.stat-card {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  border-radius: 14px;
  padding: 22px;
  text-align: center;
}
.stat-num { font-size: 2.2rem; font-weight: 900; }
.stat-label { font-size: 0.82rem; opacity: 0.9; margin-top: 4px; }
.stat-list { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-list-title { font-weight: 700; font-size: 0.88rem; margin-bottom: 10px; color: #374151; }
.stat-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.88rem; border-top: 1px solid #f0f1f5; }
.stat-row:first-child { border-top: none; }
.stat-count { font-weight: 700; color: #0f766e; }
.muted { color: #9ca3af; font-size: 0.85rem; }

.footer { text-align: center; color: #9ca3af; font-size: 0.8rem; padding: 10px 0 30px; }

@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
