* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fb;
  color: #0f172a;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  background: #111827;
  padding: 14px 0;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand,
.nav-links a {
  color: #f8fafc;
  text-decoration: none;
}

.brand {
  font-weight: 700;
  font-size: 18px;
}

.nav-links {
  display: flex;
  gap: 16px;
}

.page {
  padding: 26px 0 40px;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.card {
  background: #ffffff;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  margin-bottom: 16px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.grid.six {
  grid-template-columns: repeat(6, 1fr);
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.metric {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

pre {
  white-space: pre-wrap;
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

input,
textarea,
select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

textarea {
  min-height: 90px;
}

.full {
  grid-column: 1 / -1;
}

.btn {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
}

.btn.secondary {
  background: #64748b;
}

.heatmap {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.heat-item {
  display: flex;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
}

.empty {
  color: #64748b;
  text-align: center;
}

.thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.gallery .item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
}

.gallery .meta {
  margin-top: 6px;
  font-size: 14px;
}

.card-link {
  display: block;
  text-decoration: none;
}

.muted {
  color: #64748b;
}

.detail-photo {
  width: min(100%, 540px);
  max-height: 420px;
  object-fit: cover;
  border-radius: 10px;
  margin: 8px 0 16px;
}

.blog-content {
  white-space: pre-wrap;
  line-height: 1.7;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.step-item.done span {
  text-decoration: line-through;
  color: #64748b;
}

.step-item.dragging {
  opacity: 0.5;
}

.priority {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.priority.high {
  background: #fee2e2;
  color: #b91c1c;
}

.priority.medium {
  background: #fef3c7;
  color: #92400e;
}

.priority.low {
  background: #dcfce7;
  color: #166534;
}

.danger {
  color: #dc2626;
  font-weight: 700;
}

.overdue {
  border: 1px solid #fca5a5;
}

.archive {
  opacity: 0.82;
}

.note-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.note-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.note-time {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
}

.note-content {
  white-space: pre-wrap;
  line-height: 1.6;
}

.note-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.note-filters .btn.active {
  background: #2563eb;
}

.period-switch {
  display: flex;
  gap: 8px;
}

.period-btn.active {
  background: #2563eb;
}

.github-heatmap-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
}

.github-months {
  display: grid;
  gap: 3px;
  margin-left: 42px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #64748b;
}

.github-heatmap-body {
  display: flex;
  gap: 8px;
}

.weekday-labels {
  width: 34px;
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
  font-size: 12px;
  color: #64748b;
}

.weekday-labels span:nth-child(1) {
  grid-row: 1;
}

.weekday-labels span:nth-child(2) {
  grid-row: 3;
}

.weekday-labels span:nth-child(3) {
  grid-row: 5;
}

.github-heatmap-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
}

.heat-cell {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: #ebedf0;
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
  justify-content: flex-end;
}

.heatmap-legend span {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

.lv0 { background: #ebedf0; }
.lv1 { background: #c6e48b; }
.lv2 { background: #7bc96f; }
.lv3 { background: #239a3b; }
.lv4 { background: #196127; }

@media (max-width: 900px) {
  .grid.four,
  .grid.five,
  .grid.six,
  .grid.two,
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  background: #111827;
  padding: 16px 0;
  margin-top: 20px;
}

.footer-wrap {
  text-align: center;
}

.footer-wrap a {
  color: #f8fafc;
  text-decoration: none;
  font-size: 14px;
}

.footer-wrap a:hover {
  text-decoration: underline;
}

.footer-wrap .separator {
  color: #64748b;
  margin: 0 12px;
}

