:root {
  color: #0b0b0b;
  background: #f7f6f3;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", sans-serif;
  line-height: 1.55;
}

* { box-sizing: border-box; }

body { margin: 0; }

a { color: inherit; }

button,
input,
select {
  font: inherit;
}

button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #2a78d6;
  color: #fff;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: default; }

input,
select {
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid #d9d7d0;
  border-radius: 8px;
  background: #fff;
}

.shell { min-height: 100vh; }

.sidebar { display: none; }

.brand {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.mobile-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid #e6e4de;
}

.mobile-header .brand { width: 100%; }

.nav,
.mobile-nav {
  display: flex;
  gap: 4px;
  padding: 8px;
}

.mobile-nav {
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid #e6e4de;
}

.nav a,
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  color: #52514e;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover,
.mobile-nav a:hover { background: #f4f3f0; color: #0b0b0b; }

.content {
  padding: 20px 16px 64px;
  max-width: 980px;
}

h1, h2, h3 { font-weight: 600; }

h2 { font-size: 18px; margin: 28px 0 12px; }

h3 { font-size: 15px; margin: 0 0 8px; }

.lede { margin: 0 0 16px; color: #52514e; }

.card {
  background: #fff;
  border: 1px solid #e6e4de;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.kpi-row,
.person-grid,
.task-list {
  display: grid;
  gap: 12px;
}

.kpi-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 16px; }

.kpi {
  background: #f4f3f0;
  border-radius: 8px;
  padding: 16px;
}

.kpi p { margin: 0; }

.kpi .label { color: #52514e; font-size: 13px; }

.kpi .value,
.hours { font-size: 22px; font-weight: 600; margin-top: 4px; }

.bar-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  margin: 10px 0;
}

.bar-label { font-size: 13px; }

.track,
.stack { grid-column: 1 / -1; }

.bar-value { font-size: 13px; color: #52514e; white-space: nowrap; }

.track,
.stack {
  height: 14px;
  border-radius: 4px;
  background: #f4f3f0;
  overflow: hidden;
}

.track > span,
.stack > span { display: block; height: 100%; }

.stack { display: flex; }

.legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 16px; color: #52514e; font-size: 12px; }

.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-radius: 2px;
}

.person-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.filters { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; margin-bottom: 12px; }

.filters label { font-size: 13px; color: #52514e; }

.check { display: flex; align-items: center; gap: 8px; min-height: 44px; }

.check input { width: auto; min-height: 0; }

.task-list { grid-template-columns: 1fr; }

.task h3 { margin-bottom: 4px; }

.meta { margin: 0; color: #52514e; font-size: 13px; }

.caution {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff6e8;
  color: #6b4a12;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid .wide { grid-column: 1 / -1; }

.gate { max-width: 420px; margin: 24px auto; display: grid; gap: 12px; }

.gate h1 { font-size: 20px; margin: 0; }

.error { color: #9b2c2c; min-height: 1.2em; }

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.entry button { background: transparent; color: #52514e; border: 1px solid #d9d7d0; }

pre {
  white-space: pre-wrap;
  background: #f4f3f0;
  border-radius: 8px;
  padding: 12px;
  overflow-x: auto;
}

.links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

.links a { color: #2a78d6; }

section { scroll-margin-top: 72px; }

[hidden] { display: none !important; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 220px 1fr; }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e6e4de;
  }
  .sidebar .brand { width: 100%; }
  .sidebar .nav { flex-direction: column; }
  .mobile-header,
  .mobile-nav { display: none; }
  .content { padding: 28px 32px 80px; }
  section { scroll-margin-top: 16px; }
}
