:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #0f766e;
  --accent-soft: #99f6e4;
  --error: #b91c1c;
  --ok: #166534;
  --line: #d1d5db;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef2ff, #f8fafc);
  color: var(--text);
}

.mobile-wrap { max-width: 720px; margin: 0 auto; padding: 12px; }
.admin-wrap { max-width: 480px; margin: 48px auto; }
.topbar, .admin-topbar {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
}
.admin-topbar nav a { margin-right: 8px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin: 10px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  padding: 0 10px;
}

label { display: block; margin-bottom: 10px; font-size: 14px; }
input, select, textarea, button {
  width: 100%;
  margin-top: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}
button {
  background: var(--accent);
  color: white;
  border: none;
  cursor: pointer;
}
button.ghost, a.ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 6px 10px;
  border-radius: 8px;
  text-decoration: none;
  width: auto;
}
.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  align-items: end;
}

.error { color: var(--error); }
.ok { color: var(--ok); }
.muted { color: var(--muted); font-size: 12px; }

.profile-section {
  margin: 18px 0;
  padding: 14px 12px 4px;
  border: 2px solid var(--line);
  border-radius: 10px;
}
.profile-section legend {
  padding: 0 8px;
  font-weight: 700;
}
.request-shift-note {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.list { list-style: none; padding: 0; margin: 0; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #edf2f7;
}
.availability-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.availability-list li {
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 14px;
  line-height: 1.5;
}
.availability-list li.day-sun {
  background: #fff1f1;
}
.availability-list li.day-sat {
  background: #eff6ff;
}
.text-aki {
  color: #1d4ed8;
  font-weight: 600;
}
.availability-list li.day-sun-text {
  color: #b91c1c;
}
.availability-list li.day-sat-text {
  color: #1d4ed8;
}
.availability-table tr.day-sun td {
  background: #fff1f1;
}
.availability-table tr.day-sat td {
  background: #eff6ff;
}
.utilization-table td {
  min-width: 120px;
}
.util-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 4px;
}
.util-fill {
  height: 100%;
  background: #0f766e;
}
.util-fill.total {
  background: #0369a1;
}
.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}
.blog-post {
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
  margin-top: 12px;
}
.blog-post:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.blog-body {
  line-height: 1.7;
  margin: 10px 0;
}
.blog-comments {
  margin-top: 12px;
}
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}
.comment-list li {
  border-bottom: 1px solid #edf2f7;
  padding: 8px 0;
  line-height: 1.6;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
}
.badge.done { background: #d1fae5; color: #065f46; }

.progress-wrap { display: flex; gap: 12px; align-items: center; }
.pie { width: 120px; height: 120px; }
.pie .bg { fill: none; stroke: #e5e7eb; stroke-width: 2.5; }
.pie .meter {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.8;
  stroke-linecap: round;
}
.pie .percent { font-size: 0.45rem; text-anchor: middle; fill: #0f172a; }

.attach-image { width: 100%; border-radius: 8px; margin-top: 8px; }
.rte {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  border: 1px solid var(--line);
  padding: 6px;
  text-align: left;
}

.code-sample {
  white-space: pre-wrap;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
}

@media (max-width: 640px) {
  table, thead, tbody, tr, td, th { display: block; }
  tr { margin-bottom: 8px; border: 1px solid var(--line); }
}
