:root {
  color-scheme: dark;
  --bg: #0E1310;
  --surface: #171E19;
  --surface-2: #1F2822;
  --raised: #2F3B33;
  --line: #2B362E;
  --line-soft: #242E27;
  --ink: #E9EEEA;
  --muted: #A3ADA6;
  --green: #7FD394;
  --green-text: #8FDBA2;
  --green-soft: #1C3324;
  --green-soft-ink: #A6E5B5;
  --hero: #1D2E23;
  --hero-line: #2D4A36;
  --hero-sub: #B9C8BD;
  --blue: #7DB8E6;
  --blue-text: #93C8EF;
  --blue-soft: #15283A;
  --blue-line: #22405A;
  --orange: #F08A62;
  --orange-text: #FF9E7A;
  --orange-soft: #3A2018;
  --orange-line: #5A2E20;
  --amber: #F6C99A;
  --radius: 20px;
  --tabbar-h: 68px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-text); }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.screen {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 8px 4px 0; }
.kicker { font-size: 13px; font-weight: 600; color: var(--muted); }
.title { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.back { align-self: flex-start; min-height: 44px; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 700; }

.label { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.section { display: flex; flex-direction: column; gap: 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.meta { font-size: 12px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.big { font-size: 30px; font-weight: 800; line-height: 1.1; }
.huge { font-size: 52px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.strong { font-weight: 800; }
.green { color: var(--green-text); }
.blue { color: var(--blue-text); }
.orange { color: var(--orange-text); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.hero { background: var(--hero); border-color: var(--hero-line); }
.card.blue { background: var(--blue-soft); border-color: var(--blue-line); }
.card.tight { padding: 0 16px; gap: 0; }
.card h2 { font-size: 17px; font-weight: 800; }
.soft { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.callout { background: var(--green-soft); color: var(--green-soft-ink); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }

.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); min-height: 56px; }
.list-row:last-child { border-bottom: 0; }
.list-row .t { font-size: 15px; font-weight: 700; }
.list-row .s { font-size: 12px; color: var(--muted); }

.seg { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; }
.seg button { flex: 1; min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 700; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); }

.btn { min-height: 48px; border: 0; border-radius: 14px; background: var(--green); color: var(--bg); font-size: 16px; font-weight: 800; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn.blue { background: var(--blue); }
.btn.orange { background: var(--orange); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.btn.quiet { background: var(--raised); color: var(--ink); }
.btn.sm { min-height: 44px; font-size: 14px; border-radius: 12px; padding: 0 14px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: default; }
.link-btn { background: none; border: 0; color: var(--green-text); font-weight: 700; font-size: 14px; min-height: 44px; padding: 0 8px; }
.dashed { border: 1px dashed #3A5444; border-radius: 12px; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; }
.icon-btn.round { border-radius: 22px; background: transparent; }

.pill { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.07em; padding: 3px 8px; border-radius: 6px; }
.pill.green { background: var(--green-soft); color: var(--green-soft-ink); }
.pill.blue { background: var(--blue-soft); color: var(--blue-text); }
.pill.orange { background: var(--orange-soft); color: var(--orange-text); }
.pill.gray { background: var(--surface-2); color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink); min-height: 48px; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=password], select {
  min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  padding: 0 12px; font-size: 16px; font-weight: 600; width: 100%;
}
input.num { width: 84px; text-align: right; }
input[type=time] { width: 150px; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--green); flex: none; }

.stat { border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-size: 26px; font-weight: 800; }
.stat .l { font-size: 12px; font-weight: 700; }
.stat.orange { background: var(--orange-soft); color: var(--orange-text); }
.stat.plain { background: var(--surface); border: 1px solid var(--line); }
.stat.plain .l { color: var(--muted); }
.stat.green { background: var(--green-soft); color: var(--green-soft-ink); }

.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.steps4 > div { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 700; color: var(--muted); }
.steps4 > div > span { height: 6px; border-radius: 3px; background: var(--line); }

.task { display: flex; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.task.late { border-color: var(--orange-line); }
.task .check { flex: none; width: 44px; height: 44px; border-radius: 22px; border: 2px solid var(--green); background: transparent; padding: 0; }
.task .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.task .ttl { font-size: 16px; font-weight: 700; line-height: 1.3; }
.task .det { font-size: 13px; line-height: 1.45; color: var(--muted); }
.task .acts { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: flex-end; }
.done-row { display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border-radius: 14px; background: #141A16; }
.done-row span { flex: 1; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: line-through; }

.datechip { width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; }
.datechip .d { font-size: 11px; font-weight: 800; }
.datechip .n { font-size: 18px; font-weight: 800; }

.gantt-days { display: grid; font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; }
.gantt-track { flex: 1; position: relative; height: 26px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.gantt-track > span { position: absolute; top: 0; bottom: 0; border-right: 2px solid var(--surface); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: #131915; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar nav { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); height: var(--tabbar-h); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--green-text); }

.banner { position: fixed; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 20; background: var(--raised); color: var(--ink); border-radius: 12px; padding: 8px 14px; font-size: 13px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.center { min-height: 80vh; display: flex; align-items: center; justify-content: center; }
