:root {
  --bg: #f3f6f6;
  --card: #ffffff;
  --border: #e2e8f0;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2ba3aa;
  --primary-dark: #1f8088;
  --accent: #ef6e8c;
  --done-bg: #effbfb;
  --done-border: #b6e7e8;
  --kubun-haisetsu: #ef6e8c;
  --kubun-chushoku: #c79a5c;
  --kubun-taiou: #2ba3aa;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 64px;
}

/* App bar */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.appbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 16px;
}
.appbar-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.brand-logo {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%; background: #fff; padding: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.appbar-head { min-width: 0; }
.clock { font-size: 13px; font-weight: 600; opacity: .95; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.appbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
.progress { display: flex; align-items: center; gap: 10px; }
.progress-bar {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,.3);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: #4ade80;
  border-radius: 999px;
  transition: width .25s ease;
}
.progress-text { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tabs */
.tabs {
  display: flex;
  gap: 6px;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 16px 0;
  background: var(--bg);
}
.tab {
  flex: 1;
  border: 1px solid var(--border);
  border-bottom: none;
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
  padding: 9px 4px;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
}
.tab.active {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: inset 0 -3px 0 var(--primary);
  background: var(--card);
}

/* Day bar */
.days {
  display: flex;
  gap: 6px;
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px 0;
  background: var(--bg);
}
.day {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 0;
  border-radius: 8px;
  cursor: pointer;
}
.day.active { color: #fff; background: var(--primary); border-color: var(--primary); }

/* Toolbar */
.toolbar {
  position: sticky;
  top: 64px;
  z-index: 15;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.toolbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hide-done { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.btn-ghost, .btn-reset {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}
.btn-reset { color: #dc2626; border-color: #fecaca; }
.btn-reset:hover { background: #fef2f2; }
.btn-ghost:hover { background: var(--bg); }

/* Content */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

.phase { margin-bottom: 16px; }
.phase-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.phase-head h2 { margin: 0; font-size: 16px; flex: 1; }
.phase-count {
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
}
.phase-head.complete { background: var(--done-bg); border-color: var(--done-border); }
.caret { transition: transform .2s; color: var(--muted); }
.phase.collapsed .caret { transform: rotate(-90deg); }
.phase.collapsed .phase-body { display: none; }

.phase-body { margin-top: 8px; }
.section-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 12px 4px 6px;
}

/* Item card */
.item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.item.done { background: var(--done-bg); border-color: var(--done-border); }
.item.done .action { text-decoration: line-through; color: var(--muted); }
.item .check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: 2px solid var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  margin-top: 1px;
}
.item.done .check { background: #22c55e; border-color: #22c55e; }
.item .check svg { width: 16px; height: 16px; stroke: #fff; opacity: 0; }
.item.done .check svg { opacity: 1; }

.item-body { flex: 1; min-width: 0; }
.item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.no { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
}
.badge.taiou { background: #2ba3aa; }
.badge.haisetsu { background: #ef6e8c; }
.badge.chushoku { background: #c79a5c; }
.badge.shimo { background: #3ab0a6; }
.badge.souji { background: #5b8a93; }
.badge.care { background: #e8849f; }
.badge.kusuri { background: #8f6f9e; }
.badge.shokuji { background: #d9925e; }
.badge.junkai { background: #2a8f97; }
.badge.kyukei { background: #98a6ad; }
.badge.dei { background: #5aa39a; }
.badge.gaishutsu { background: #e07a86; }
.who { font-size: 18px; font-weight: 700; color: var(--text); }
.who .room { font-weight: 700; color: var(--primary); margin-right: 2px; }
.action { font-size: 15px; font-weight: 500; }
.note {
  margin-top: 4px;
  font-size: 13px;
  color: #b45309;
  background: #fffbeb;
  border-left: 3px solid #fbbf24;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
}

/* 責任者連絡先 */
.contact {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 900px;
  margin: 12px auto 0;
  padding: 12px 16px;
  background: #fff;
  border: 2px solid var(--primary);
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.contact-icon {
  flex-shrink: 0;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  border-radius: 50%;
  font-size: 22px;
}
.contact-text { display: flex; flex-direction: column; line-height: 1.2; }
.contact-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.contact-num {
  font-size: 26px; font-weight: 800; color: var(--primary-dark);
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
}

/* サイン欄 */
.sign {
  max-width: 900px;
  margin: 8px auto 0;
  padding: 0 16px;
}
.sign-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.sign-label { font-size: 15px; font-weight: 700; }
.sign-meta { font-size: 12px; color: var(--muted); text-align: right; }
.sign-pad {
  width: 100%;
  height: 180px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  touch-action: none;
  display: block;
  cursor: crosshair;
}
.sign-actions { margin-top: 8px; }

.foot {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px 24px;
  color: var(--muted);
  font-size: 12px;
}
.foot p { margin: 4px 0; }

.hide-completed .item.done { display: none; }

/* 情報フェーズ（チェック不要の参照） */
.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.info-text { font-size: 15px; font-weight: 500; line-height: 1.5; }
.info-card .note { margin-top: 6px; }

/* 店舗動画 */
.video-card { margin-bottom: 16px; }
.video-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.store-video {
  width: 100%;
  border-radius: 12px;
  background: #000;
  box-shadow: var(--shadow);
  display: block;
}

/* フロア見取り図 */
.floor-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: block;
}

/* ---- 送迎表 ---- */
.schedule {
  margin: 0 0 16px;
}
.schedule-title {
  font-size: 17px;
  font-weight: 700;
  margin: 4px 0 8px;
}
.schedule-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.sched-table {
  border-collapse: collapse;
  width: 100%;
  min-width: 560px;
  font-size: 12px;
  color: var(--text);
}
.sched-table th, .sched-table td {
  border: 1px solid var(--border);
  padding: 5px 6px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
.sched-table thead th {
  background: #f8fafc;
  font-weight: 700;
}
.sched-table .grp { font-size: 13px; }
.sched-table .grp-ds { background: #f6edd4; }
.sched-table .grp-kasuri { background: #f6dedd; }
.sched-table .grp-tobi { background: #dde6f2; }
.sched-table .grp-venus { background: #f6edd4; }
.sched-table .t-time {
  background: #f1f5f9;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sched-table td.on {
  font-weight: 600;
  line-height: 1.35;
}
/* 行き先（デイサービス）別の色分け */
.sched-table td.ds-venus { background: #f6edd4; }   /* ビーナス */
.sched-table td.ds-kasuri { background: #f6dedd; }  /* 柏里 */
.sched-table td.ds-tobi { background: #dde6f2; }    /* とびっきり */
.sched-table td.on span {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sched-table .sec-row td {
  background: #eef2ff;
  font-weight: 700;
  text-align: left;
  padding-left: 12px;
}
.sched-table .total-row th,
.sched-table .total-row td {
  background: #f8fafc;
  font-weight: 700;
}
.schedule-note {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 2px 0;
}
