/* =========================================================
   グループウェア 共通スタイル
   スマホ基準（下部タブ）→ 960px以上でサイドバーに切り替え
   ========================================================= */

:root {
  color-scheme: light;
  /* ブランドカラー：atsys.co.jp（メイン #0068aa／水色 #45abd6／濃紺 #003d7c） */
  --brand: #0068aa;
  --brand-light: #45abd6;
  --brand-deep: #003d7c;
  --bg: #f2f6fa;
  --surface: #ffffff;
  --ink: #1e2a36;
  --muted: #5d6b7a;
  --line: #d9e2ec;
  --accent: #0068aa;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0f9;
  --warn: #8a5800;
  --warn-soft: #fbf0da;
  --danger: #b42318;
  --danger-soft: #fde7e4;
  --info: #003d7c;
  --info-soft: #e3eaf5;
  --radius-s: 6px;
  --radius-m: 10px;
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", Meiryo, sans-serif;
  --tab-h: 64px;
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1520;
    --surface: #15202e;
    --ink: #e5edf5;
    --muted: #93a3b5;
    --line: #253548;
    --accent: #45abd6;
    --accent-ink: #04203a;
    --accent-soft: #123049;
    --warn: #e2b25a;
    --warn-soft: #3a2f17;
    --danger: #f08a7f;
    --danger-soft: #3d1f1c;
    --info: #8fb8f0;
    --info-soft: #1a2b45;
  } }
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1520;
    --surface: #15202e;
    --ink: #e5edf5;
    --muted: #93a3b5;
    --line: #253548;
    --accent: #45abd6;
    --accent-ink: #04203a;
    --accent-soft: #123049;
    --warn: #e2b25a;
    --warn-soft: #3a2f17;
    --danger: #f08a7f;
    --danger-soft: #3d1f1c;
    --info: #8fb8f0;
    --info-soft: #1a2b45;
  }

*, *::before, *::after { box-sizing: border-box; }

/* hidden 属性は、ほかの display 指定より常に優先する */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
}

a { color: var(--accent); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- 骨組み ---------- */

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.app-header h1 { margin: 0; font-size: 18px; font-weight: 700; }

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
}

.app-main {
  width: 100%;
  margin: 0;
  padding: 16px 16px calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 24px);
}

/* 下部タブ（スマホ） */
.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: var(--tab-h);
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
}

.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }

/* サイドバー（PC） */
.sidebar { display: none; }

@media (min-width: 960px) {
  body.has-nav { display: grid; grid-template-columns: 232px 1fr; }
  .tabbar { display: none; }
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px 12px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    overflow-y: auto;
  }
  .sidebar .brand { padding: 0 12px 16px; font-weight: 700; font-size: 17px; }
  .sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-s);
    color: var(--ink);
    text-decoration: none;
    font-size: 15px;
  }
  .sidebar a svg { width: 20px; height: 20px; color: var(--muted); }
  .sidebar a:hover { background: var(--bg); }
  .sidebar a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
  .sidebar a[aria-current="page"] svg { color: var(--accent); }
  .sidebar .group-label { margin: 16px 12px 4px; color: var(--muted); font-size: 12px; }
  .app-main { padding: 28px 32px 48px; }
  .app-header .header-title-mobile { display: none; }
}

/* ---------- 部品 ---------- */

.page-title { margin: 4px 0 16px; font-size: 22px; line-height: 1.4; }
.lead { margin: -8px 0 20px; color: var(--muted); font-size: 14px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 16px;
  margin-bottom: 16px;
}

.panel > h2 { margin: 0 0 12px; font-size: 16px; }

.stack > * + * { margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-danger { color: var(--danger); }
.btn-block { width: 100%; }
.btn-small { min-height: 36px; padding: 0 12px; font-size: 14px; }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.flash {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 14px;
}
.flash-error { background: var(--danger-soft); }
.flash ul { margin: 0; padding-left: 1.2em; }

/* フォーム */
.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
.hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.input, select.input, textarea.input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* iOSのズーム防止 */
}

.check { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* 一覧（スマホでは行をカード状に） */
.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.list > li:last-child { border-bottom: 0; }
.list .meta { color: var(--muted); font-size: 13px; }

.table-wrap { position: relative; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-weight: 700; font-size: 13px; white-space: nowrap; }
.table td.center, .table th.center { text-align: center; }
.table .sub { display: block; color: var(--muted); font-size: 12px; }

/* スマホでは1件ずつ縦に並べる表 */
@media (max-width: 639px) {
  .table.stack thead { display: none; }
  .table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .table.stack tr:last-child { border-bottom: 0; }
  .table.stack td { display: flex; gap: 12px; padding: 2px 0; border: 0; text-align: left; }
  .table.stack td[data-label]::before { content: attr(data-label); flex: 0 0 5.5em; color: var(--muted); font-size: 13px; }
  .table.stack td.primary { font-weight: 700; font-size: 15px; }
  .table.stack td.primary .sub { font-weight: 400; }
  .table.stack td.actions { margin-top: 8px; }
}

/* ---------- ホーム：打刻パネル ---------- */

.punch-panel {
  padding: 20px 16px 16px;
  border-radius: var(--radius-m);
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 60%, var(--brand-light) 130%);
  color: #ffffff;
  margin-bottom: 16px;
}

.punch-date { margin: 0; font-size: 14px; opacity: .85; }

.punch-clock {
  margin: 2px 0 10px;
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.punch-plan { margin: 0 0 16px; font-size: 15px; }

.punch-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.punch-actions .btn {
  min-height: 56px;
  border: 0;
  background: #ffffff;
  color: var(--brand);
  font-size: 17px;
}
.punch-actions .btn.secondary { background: transparent; color: #ffffff; border: 1px solid currentColor; }

.punch-log { margin: 12px 0 0; padding: 0; list-style: none; font-size: 13px; opacity: .9; }

.today-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.today-grid .panel { margin-bottom: 0; }
@media (min-width: 640px) { .today-grid { grid-template-columns: repeat(3, 1fr); } }

.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 15px; }
.people .dept { color: var(--muted); font-size: 13px; }
.count { color: var(--muted); font-weight: 400; font-size: 14px; }

.empty { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------- ログイン ---------- */

.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.auth-card h1 { margin: 0 0 4px; font-size: 24px; }
.auth-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }

.btn-google { width: 100%; min-height: 52px; font-size: 16px; }
.btn-google svg { width: 20px; height: 20px; }

.auth-foot { margin-top: 24px; text-align: center; font-size: 13px; }
.auth-foot a { color: var(--muted); }

/* ---------- 準備中 ---------- */

.soon { padding: 40px 16px; text-align: center; }
.soon p { color: var(--muted); }

/* 管理メニュー（スマホのプロフィール画面用） */
.menu-list a { display: flex; justify-content: space-between; padding: 12px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.menu-list a:last-child { border-bottom: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =========================================================
   フェーズ2：出欠
   ========================================================= */

.badge-info { background: var(--info-soft); color: var(--info); }
.muted { color: var(--muted); }
small { font-size: 12px; }

.notice {
  display: block;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  background: var(--warn-soft);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

/* 打刻パネル */
.punch-actions.single { grid-template-columns: 1fr; }
.punch-actions .btn:disabled { opacity: .6; }
.punch-status { min-height: 1.5em; margin: 10px 0 0; font-size: 14px; }
.punch-done { margin: 0; font-size: 15px; }
.link-button { margin-left: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }
.punch-judge { margin-left: 6px; opacity: .8; }

/* 理由入力シート */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 20, 22, .45); }
.sheet[hidden] { display: none; }
.sheet-body {
  width: 100%;
  max-width: 520px;
  padding: 20px 16px calc(env(safe-area-inset-bottom, 0px) + 20px);
  border-radius: 16px 16px 0 0;
  background: var(--surface);
}
.sheet-body h2 { margin: 0 0 4px; font-size: 18px; }
@media (min-width: 640px) { .sheet { align-items: center; } .sheet-body { border-radius: 16px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* 月の切り替え・絞り込み */
.month-nav, .filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.month-nav strong { min-width: 7em; text-align: center; font-size: 17px; }
.filter-bar .input { width: auto; }

/* 月の合計 */
.totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.totals div { padding: 10px 8px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--line); text-align: center; }
.totals span { display: block; color: var(--muted); font-size: 12px; }
.totals strong { font-size: 17px; font-variant-numeric: tabular-nums; }

/* 日の一覧 */
.days, .plan-days { list-style: none; margin: 0; padding: 0; }
.days li { border-bottom: 1px solid var(--line); }
.days li:last-child, .plan-days li:last-child { border-bottom: 0; }
.days a { display: grid; grid-template-columns: 3em 1fr 1.3fr; gap: 8px; align-items: center; padding: 10px 0; color: var(--ink); text-decoration: none; font-size: 14px; }
.day-date { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.day-date small { margin-left: 2px; font-weight: 400; color: var(--muted); }
.day-plan small, .day-actual small { display: block; color: var(--muted); }
.day-actual { font-variant-numeric: tabular-nums; }
.wd-0 .day-date { color: var(--danger); }
.wd-6 .day-date { color: var(--info); }
.is-today { background: var(--accent-soft); }
.days .is-today a, .plan-days .is-today { padding-left: 6px; padding-right: 6px; }

/* 出勤予定の入力 */
.plan-days li { display: grid; grid-template-columns: 3em 1fr; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.plan-fields { display: grid; gap: 6px; }
.plan-times { display: flex; align-items: center; gap: 6px; }
.plan-times[hidden] { display: none; }
.plan-times .input { min-width: 0; }
.plan-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
@media (min-width: 640px) {
  .plan-fields { grid-template-columns: 9em auto 1fr; align-items: center; }
}
.weekday-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; cursor: pointer; }
.pick input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
details.panel > summary { cursor: pointer; }
.save-bar {
  position: sticky;
  bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px));
  z-index: 10;
  padding: 10px 0;
  background: linear-gradient(transparent, var(--bg) 30%);
}
@media (min-width: 960px) { .save-bar { bottom: 0; } }

/* 打刻の詳細 */
.punches { list-style: none; margin: 0; padding: 0; }
.punches > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.punches > li:last-child { border-bottom: 0; }
.punch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.punches .meta, .request .meta { color: var(--muted); font-size: 13px; }
details.edit summary { margin-top: 6px; color: var(--accent); font-size: 14px; cursor: pointer; }
.edit-form { margin-top: 10px; padding: 12px; border-radius: var(--radius-s); background: var(--bg); }
.request { padding: 12px 0; border-bottom: 1px solid var(--line); }
.request:last-child { border-bottom: 0; }

/* 地図 */
.map { height: 300px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); overflow: hidden; }
.map-small { height: 200px; margin: 8px 0; }
.map-fallback { display: grid; place-items: center; height: 100%; padding: 16px; color: var(--muted); font-size: 13px; text-align: center; }
.leaflet-container { font-family: var(--font); }

/* 出勤予定：狭い画面で入力欄が枠からはみ出さないようにする */
.plan-days li > *, .plan-fields > * { min-width: 0; }
.plan-times .input { flex: 1 1 0; min-width: 0; }

/* =========================================================
   フェーズ3：スケジュール
   ========================================================= */

.cal-toolbar { display: grid; gap: 10px; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { margin: 0 4px; font-size: 18px; white-space: nowrap; }
.cal-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cal-filter .input { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; }
.small-check { min-height: 36px; font-size: 13px; }
.small-check input { width: 18px; height: 18px; }
.seg-links { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg-links a { padding: 6px 14px; color: var(--ink); text-decoration: none; font-size: 14px; background: var(--surface); }
.seg-links a + a { border-left: 1px solid var(--line); }
.seg-links a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
@media (min-width: 960px) { .cal-toolbar { grid-template-columns: auto 1fr; align-items: center; } .cal-controls { justify-content: flex-end; } }

/* 月表示 */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--surface); }
.cal-wd { padding: 6px 0; text-align: center; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg); }
.cal-wd.wd-0 { color: var(--danger); } .cal-wd.wd-6 { color: var(--info); }
.cal-cell { display: flex; flex-direction: column; gap: 2px; min-height: 76px; padding: 4px 3px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-out { background: var(--bg); }
.cal-cell.is-out .cal-day { color: var(--muted); opacity: .6; }
.cal-day { align-self: flex-start; min-width: 24px; padding: 0 4px; border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; line-height: 22px; text-align: center; }
.cal-cell.wd-0 .cal-day { color: var(--danger); } .cal-cell.wd-6 .cal-day { color: var(--info); }
.cal-cell.is-today .cal-day { background: var(--accent); color: var(--accent-ink); }
.cal-att { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.chip-event { display: block; padding: 1px 4px; border-radius: 4px; background: var(--accent-soft); color: var(--ink); text-decoration: none; font-size: 11px; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-event.is-allday { background: var(--accent); color: var(--accent-ink); }
.chip-event .t { margin-right: 3px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip-event.is-allday .t { color: inherit; }
.cal-more { font-size: 11px; color: var(--muted); text-decoration: none; padding-left: 4px; }
.show-sm { display: none; }
@media (max-width: 639px) {
  .cal-cell { min-height: 64px; padding: 3px 2px; }
  .chip-event { padding: 0 3px; font-size: 10px; }
  .chip-event .t { display: none; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .cal-more.show-sm { display: block; }
}
@media (min-width: 960px) { .cal-cell { min-height: 104px; padding: 6px; } }

/* 週表示・日表示 */
.cal-week, .cal-dayview { display: grid; gap: 8px; }
@media (min-width: 960px) { .cal-week { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--surface); } }
.cal-col { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); min-width: 0; }
@media (min-width: 960px) { .cal-week .cal-col { min-height: 320px; padding: 8px; border: 0; border-right: 1px solid var(--line); border-radius: 0; } .cal-week .cal-col:last-child { border-right: 0; } }
.cal-col.is-today { box-shadow: inset 3px 0 0 var(--accent); }
.cal-col-head { color: var(--ink); text-decoration: none; }
.cal-att-list { display: grid; gap: 2px; font-size: 12px; color: var(--muted); }
.cal-att-list b { color: var(--ink); font-weight: 700; margin-right: 2px; }
.agenda-item { display: grid; gap: 1px; padding: 6px 8px; border-left: 3px solid var(--accent); border-radius: 4px; background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.agenda-item.is-allday { border-left-color: var(--ink); }
.agenda-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.agenda-title { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.agenda-meta { font-size: 12px; color: var(--muted); }
.agenda-empty { color: var(--muted); font-size: 12px; }
.cal-dayview .cal-col { padding: 14px; }
.cal-dayview .agenda-item { padding: 10px 12px; }

/* 予定の入力 */
.when { display: grid; gap: 0 12px; }
@media (min-width: 640px) { .when { grid-template-columns: 1fr 1fr; } }
.when-row { display: flex; gap: 8px; }
.when-row .input { min-width: 0; flex: 1 1 0; }
.when-row .input[type="time"] { flex: 0 1 8.5em; }
[data-time][hidden], .repeat-detail[hidden] { display: none; }
.fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.fieldset legend { padding: 0; margin-bottom: 4px; font-weight: 700; font-size: 14px; }
.people-group { margin-bottom: 10px; }
.people-group-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: 13px; cursor: pointer; }
.pick-people { display: flex; flex-wrap: wrap; gap: 6px; }
.person input { position: absolute; opacity: 0; }
.person span { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; }
.person input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.person input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ホームの今日の予定 */
.today-events { list-style: none; margin: 0; padding: 0; }
.today-events a { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; }
.today-events li:last-child a { border-bottom: 0; }

/* =========================================================
   フェーズ4：申し送り
   ========================================================= */

.tabbar a, .sidebar a { position: relative; }
.tab-icon { position: relative; display: inline-flex; }
.nav-badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
}
.tabbar .nav-badge { position: absolute; top: -6px; right: -12px; }
.sidebar .nav-badge { margin-left: auto; }
.nav-badge.inline { margin-left: 6px; }

.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.title-row .page-title { margin: 0; }
.box-tabs { margin-bottom: 12px; }
.box-tabs a { display: inline-flex; align-items: center; }
.search-panel summary { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.search-form { margin-top: 12px; }

.handover-list { list-style: none; margin: 0; padding: 0; }
.handover-list li { border-bottom: 1px solid var(--line); }
.handover-list li:last-child { border-bottom: 0; }
.handover-list a { display: grid; gap: 4px; padding: 12px 0; color: var(--ink); text-decoration: none; }
.handover-list .h-top { display: flex; align-items: center; gap: 8px; }
.handover-list .h-title { font-size: 15px; overflow-wrap: anywhere; }
.handover-list .is-unread .h-title { font-weight: 700; }
.handover-list .is-done { opacity: .65; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.h-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.h-meta { color: var(--muted); font-size: 12px; }
.status-open { background: var(--warn-soft); color: var(--warn); }
.status-in_progress { background: var(--info-soft); color: var(--info); }
.status-done { background: var(--accent-soft); color: var(--accent); }

.handover-mini { list-style: none; margin: 0; padding: 0; }
.handover-mini a { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.handover-mini li:last-child a { border-bottom: 0; }
.handover-mini .title { grid-column: 1 / -1; font-weight: 700; font-size: 15px; }
.handover-mini .badge + .title { grid-column: 2; }
.handover-mini .meta { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }

.handover-article .h-badges { margin-bottom: 6px; }
.handover-title { margin: 0 0 6px; font-size: 20px; line-height: 1.5; overflow-wrap: anywhere; }
.handover-article .h-meta { margin: 0 0 14px; font-size: 13px; }
.handover-body { font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.attachments { list-style: none; margin: 16px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.attachments li { display: grid; gap: 2px; }
.attachments img { max-width: 100%; max-height: 280px; border-radius: var(--radius-s); border: 1px solid var(--line); object-fit: contain; background: var(--bg); }
.file-link { overflow-wrap: anywhere; font-size: 14px; }

.status-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.status-form .label { font-weight: 700; font-size: 14px; }
.seg-radio { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg-radio label { position: relative; }
.seg-radio input { position: absolute; opacity: 0; }
.seg-radio span { display: inline-block; padding: 8px 14px; font-size: 14px; cursor: pointer; background: var(--surface); }
.seg-radio label + label span { border-left: 1px solid var(--line); }
.seg-radio input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.seg-radio input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: -3px; }

.read-status { margin-top: 10px; font-size: 14px; }
.read-status .label { margin: 8px 0 2px; color: var(--muted); font-size: 12px; font-weight: 700; }
.read-status p { margin: 0; }

.comments { list-style: none; margin: 0 0 12px; padding: 0; }
.comments li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comments li.is-system { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; color: var(--muted); font-size: 12px; }
.c-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.c-head form { margin-left: auto; }
.c-body { margin-top: 2px; font-size: 14px; overflow-wrap: anywhere; }
.comment-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }

.files { list-style: none; margin: 6px 0; padding: 0; font-size: 13px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.sub-option { margin: 0 0 8px 30px; }
.sub-option .check { min-height: 32px; font-size: 14px; }

/* =========================================================
   フェーズ5：プロジェクト管理
   ========================================================= */

.progress { display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); }
.progress.wide { height: 8px; margin: 8px 0 4px; max-width: 480px; }
.progress-inline { display: inline-flex; align-items: center; gap: 8px; }
.progress-inline .progress { width: 100px; }
.text-danger { color: var(--danger); }

.due { display: inline-block; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-soon { color: var(--warn); font-weight: 700; }
.due-today { color: var(--warn); font-weight: 700; }
.due-overdue { color: var(--danger); font-weight: 700; }

.pstatus-planning { background: var(--bg); color: var(--muted); }
.pstatus-active { background: var(--accent-soft); color: var(--accent); }
.pstatus-on_hold { background: var(--warn-soft); color: var(--warn); }
.pstatus-done { background: var(--bg); color: var(--muted); }
.tstatus-todo { background: var(--bg); color: var(--muted); }
.tstatus-doing { background: var(--info-soft); color: var(--info); }
.tstatus-done { background: var(--accent-soft); color: var(--accent); }

.project-grid { display: grid; gap: 12px; }
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.project-card { display: grid; gap: 6px; margin: 0; color: var(--ink); text-decoration: none; }
.project-card:hover { border-color: var(--accent); }
.project-card-head { display: flex; flex-wrap: wrap; gap: 4px; }
.project-card-name { font-size: 17px; overflow-wrap: anywhere; }
.project-card .meta, .project-head .meta { color: var(--muted); font-size: 12px; }
.project-head { margin-bottom: 12px; }
.project-head .meta { margin: 0; }
.project-desc summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.danger-zone summary { cursor: pointer; color: var(--danger); }

/* カンバン：スマホは横スワイプで列を切り替え、PCは3列 */
.board {
  display: grid; grid-auto-flow: column; grid-auto-columns: 86%; gap: 10px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px;
}
@media (min-width: 960px) { .board { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; } }
.board-col { scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; min-height: 240px; padding: 10px; border-radius: var(--radius-m); background: var(--surface); border: 1px solid var(--line); }
.board-col.is-over { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.board-col-head { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.col-todo .board-col-head::before, .col-doing .board-col-head::before, .col-done .board-col-head::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.col-todo .board-col-head::before { background: var(--muted); }
.col-doing .board-col-head::before { background: var(--info); }
.col-done .board-col-head::before { background: var(--accent); }
.board-list { display: grid; gap: 8px; min-height: 40px; }
.board-empty { margin: 0; color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.board-empty[hidden] { display: none; }
.board-hint { margin-top: 8px; }
.quick-add { display: flex; gap: 6px; }
.quick-add .input { min-height: 36px; padding: 4px 10px; font-size: 14px; }

.task-card { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--radius-s); background: var(--surface); cursor: grab; }
.task-card.prio-high { border-left-color: var(--danger); }
.task-card.is-dragging { opacity: .45; }
.task-card-link { display: grid; gap: 6px; padding: 10px 10px 6px; color: var(--ink); text-decoration: none; }
.task-card-title { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; line-height: 1.5; }
.task-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.who { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar.xs { width: 20px; height: 20px; font-size: 11px; }
.task-card-counts { font-size: 11px; color: var(--muted); }
.col-done .task-card-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); }
.task-card-actions { display: flex; justify-content: flex-end; gap: 4px; padding: 0 6px 6px; }
.mini-btn { min-height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); color: var(--ink); font: inherit; font-size: 12px; cursor: pointer; }
.mini-btn.primary { border-color: var(--accent); color: var(--accent); font-weight: 700; }

.task-mini { list-style: none; margin: 0; padding: 0; }
.task-mini a { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.task-mini li:last-child a { border-bottom: 0; }
.task-mini .title { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.task-mini .meta { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.quick-add .btn { flex: none; white-space: nowrap; }

/* =========================================================
   v0.5.1：ホームの2列レイアウト（広い画面）と月カレンダー
   ========================================================= */
.home-layout { display: grid; gap: 0 16px; }
.home-layout > * { min-width: 0; }
.home-cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.home-cal-head h2 { margin: 0 4px; font-size: 17px; }
.home-cal-head .spacer { flex: 1; }
@media (min-width: 1100px) {
  .home-layout {
    grid-template-columns: minmax(340px, 400px) minmax(0, 1fr);
    grid-template-areas: "punch cal" "people cal" "events cal" "handovers cal" "tasks cal" "rest cal";
    align-items: start;
  }
  .a-punch { grid-area: punch; } .a-people { grid-area: people; } .a-events { grid-area: events; }
  .a-handovers { grid-area: handovers; } .a-tasks { grid-area: tasks; } .a-cal { grid-area: cal; }
  .a-people .today-grid { grid-template-columns: 1fr; gap: 0; }
  .a-people .today-grid .panel { margin-bottom: 16px; }
  .a-cal .cal-cell { min-height: 118px; }
}
@media (min-width: 1500px) { .a-cal .cal-cell { min-height: 132px; } }

/* v0.5.3：ヘッダーのログアウトボタン */
.header-actions { display: flex; align-items: center; gap: 8px; }
.logout-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 40px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--muted);
  font: inherit; font-size: 13px; cursor: pointer;
}
.logout-btn svg { width: 18px; height: 18px; }
.logout-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 639px) {
  .logout-btn { padding: 0; }
  .logout-label { display: none; }
  .header-user-name { max-width: 7em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* v0.6.0：アプリ（PWA）登録の案内 */
.install-banner {
  margin-bottom: 16px; padding: 14px;
  border: 1px solid var(--accent); border-radius: var(--radius-m);
  background: var(--accent-soft); color: var(--ink);
}
.install-banner[hidden] { display: none; }
.install-head { display: flex; gap: 12px; align-items: center; }
.install-head img { flex: none; border-radius: 10px; }
.install-title { margin: 0; font-weight: 700; font-size: 15px; }
.install-lead { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.install-steps { margin: 10px 0 0; padding-left: 1.4em; font-size: 14px; line-height: 1.9; }
.install-steps[hidden], .install-note[hidden] { display: none; }
.install-note { margin: 10px 0 0; font-size: 13px; }
.share-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); color: var(--info); vertical-align: middle; }
.share-icon svg { width: 16px; height: 16px; }
.install-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.auth-install { width: 100%; max-width: 400px; margin-top: 12px; }
.auth { align-content: center; }
/* アプリとして起動しているときは、ブラウザ用の余白を詰める */
@media (display-mode: standalone) { .app-header { padding-top: calc(env(safe-area-inset-top, 0px) + 8px); } }

/* =========================================================
   v0.6.1：広い画面（1280px以上）では横に並べて、スクロールを減らす
   ========================================================= */
@media (min-width: 1280px) {
  /* パネルを2列に並べる（設定・プロフィール・マイタスクなど） */
  .page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  .page-grid > * { margin: 0 !important; }
  .page-grid > .span-all { grid-column: 1 / -1; }
  .page-grid .col { display: grid; gap: 16px; align-content: start; min-width: 0; }
  .page-grid .col > * { margin: 0 !important; }

  /* 本文（左）＋ 補足（右）：詳細画面・一覧＋フォーム */
  .page-split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr); gap: 16px; align-items: start; }
  .page-split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .page-split > .main-col, .page-split > .side-col { display: grid; gap: 16px; align-content: start; min-width: 0; }
  .page-split > .main-col > *, .page-split > .side-col > * { margin: 0 !important; }
  .side-col.sticky { position: sticky; top: 72px; }

  /* 入力フォーム：左に主な項目、右に選択欄（.form-side） */
  .form-2col { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: 32px; align-items: start; }
  .form-2col > * { grid-column: 1; min-width: 0; }
  .form-2col > .form-side { grid-column: 2; grid-row: 1 / span 40; }

  /* 縦に長い日付の一覧は2列に折り返す */
  .days.two-col { columns: 2; column-gap: 32px; column-rule: 1px solid var(--line); }
  .days.two-col li { break-inside: avoid; }

  .map.tall { height: 420px; }
  .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1500px) {
  .plan-days.two-col { columns: 2; column-gap: 32px; column-rule: 1px solid var(--line); }
  .plan-days.two-col li { break-inside: avoid; }
}
@media (min-width: 1700px) {
  .project-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .page-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .search-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); column-gap: 16px; align-items: end; }
  .search-form > .check, .search-form > .form-actions { grid-column: 1 / -1; }
}
@media (min-width: 1280px) {
  /* プロフィール：管理メニューとメール通知を2列に */
  .menu-list:has(> h2) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .menu-list > h2 { grid-column: 1 / -1; }
  .notify-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; grid-auto-flow: row dense; }
  .notify-grid > h2, .notify-grid > .sub-option { grid-column: 1 / -1; }
  .notify-grid > .sub-option { display: flex; flex-wrap: wrap; gap: 0 16px; margin: 0 0 6px 30px; }
  .notify-grid > .sub-option .hint { flex-basis: 100%; }

  /* 拠点：種類を横並び、地図は画面の高さに合わせる */
  [data-type-field] .check { display: inline-flex; margin-right: 20px; }
  .map.tall { height: clamp(280px, 38vh, 420px); }

  /* 出勤予定：入力欄を少し詰める */
  .plan-days li { padding: 5px 0; }
  .plan-days .input { min-height: 36px; padding: 4px 8px; font-size: 14px; }
}
@media (min-width: 1700px) {
  .days.two-col { columns: 3; }
}
@media (min-width: 1280px) {
  .hide-wide { display: none; }
  .pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .map.tall { height: clamp(240px, 30vh, 380px); }
}

/* =========================================================
   v0.7.0：ヘルプ
   ========================================================= */
.help-layout { display: flex; flex-direction: column; }
.help-layout > .side-col { order: -1; }
.help-search { margin-bottom: 16px; }
.help-section { margin-bottom: 24px; scroll-margin-top: 72px; }
.help-section > h2 { margin: 0 0 8px; font-size: 18px; padding-left: 10px; border-left: 4px solid var(--accent); }
.help-topic { margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); scroll-margin-top: 72px; }
.help-topic > summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; font-weight: 700; font-size: 15px; cursor: pointer; list-style: none; }
.help-topic > summary::-webkit-details-marker { display: none; }
.help-topic > summary::after { content: "＋"; flex: none; color: var(--accent); font-weight: 700; }
.help-topic[open] > summary::after { content: "－"; }
.help-topic[open] > summary { border-bottom: 1px solid var(--line); }
.help-topic.is-hit { border-color: var(--accent); }
.help-body { padding: 10px 16px 14px; font-size: 14px; line-height: 1.85; }
.help-body p { margin: 0 0 8px; }
.help-body ul, .help-body ol { margin: 0 0 8px; padding-left: 1.4em; }
.help-body li + li { margin-top: 2px; }
.help-body .table { margin: 6px 0 10px; font-size: 13px; }
.help-body .table th { width: 32%; white-space: normal; color: var(--ink); vertical-align: top; }
.kbd { display: inline-block; min-width: 1.6em; padding: 0 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font-size: 12px; text-align: center; }
.help-toc { margin-bottom: 12px; }
.help-toc h2 { margin: 0 0 6px; font-size: 14px; color: var(--muted); }
.help-toc ul { display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 0; list-style: none; overflow-x: auto; }
.help-toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap; background: var(--surface); }
.help-toc a.is-current { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; }
@media (min-width: 1280px) {
  .help-layout { display: grid; }
  .help-layout > .side-col { order: 0; }
  .help-toc ul { display: grid; gap: 2px; overflow: visible; }
  .help-toc a { display: block; border: 0; border-radius: var(--radius-s); padding: 6px 10px; }
  .help-toc a:hover { background: var(--bg); }
  .help-layout.page-split { grid-template-columns: minmax(0, 1100px) 240px; justify-content: start; }
}

/* =========================================================
   v0.7.1：上部バーは濃紺、左メニューは黒（文字は白）でコンテンツと区別する
   ========================================================= */
:root { --header-bg: #003d7c; --sidebar-bg: #16181c; }

.app-header { background: var(--header-bg); border-bottom: 0; color: #ffffff; box-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.app-header h1 { color: #ffffff; }
.header-user { color: rgba(255, 255, 255, .9); }
.header-user .avatar { background: #ffffff; color: var(--header-bg); }
.app-header .logout-btn { background: transparent; border-color: rgba(255, 255, 255, .4); color: #ffffff; text-decoration: none; }
.app-header .logout-btn:hover { background: rgba(255, 255, 255, .14); border-color: #ffffff; color: #ffffff; }
.app-header .btn { background: #ffffff; border-color: #ffffff; color: var(--header-bg); }
.app-header :focus-visible { outline-color: #ffffff; }

@media (min-width: 960px) {
  .sidebar { background: var(--sidebar-bg); border-right: 0; }
  .sidebar .brand { color: #ffffff; }
  .sidebar a { color: rgba(255, 255, 255, .88); }
  .sidebar a svg { color: rgba(255, 255, 255, .6); }
  .sidebar a:hover { background: rgba(255, 255, 255, .08); color: #ffffff; }
  .sidebar a[aria-current="page"] { background: rgba(69, 171, 214, .18); color: #ffffff; font-weight: 700; box-shadow: inset 3px 0 0 #45abd6; }
  .sidebar a[aria-current="page"] svg { color: #45abd6; }
  .sidebar .group-label { color: rgba(255, 255, 255, .5); }
  .sidebar :focus-visible { outline-color: #ffffff; }
}

/* =========================================================
   v0.7.2：左メニューはブランドの濃紺 #003d7c、上部バーはブランドの水色 #45abd6
   上部バーの文字は、読みやすさ（コントラスト比5.5:1）のため濃紺 #002a57
   ========================================================= */
:root { --header-bg: #45abd6; --header-ink: #002a57; --sidebar-bg: #003d7c; }

.app-header { background: var(--header-bg); color: var(--header-ink); box-shadow: 0 1px 0 rgba(0, 42, 87, .2); }
.app-header h1 { color: var(--header-ink); }
.header-user { color: var(--header-ink); font-weight: 700; }
.header-user .avatar { background: #ffffff; color: #003d7c; }
.app-header .logout-btn { background: rgba(255, 255, 255, .25); border-color: rgba(0, 42, 87, .35); color: var(--header-ink); }
.app-header .logout-btn:hover { background: rgba(255, 255, 255, .5); border-color: var(--header-ink); color: var(--header-ink); }
.app-header .btn { background: #ffffff; border-color: #ffffff; color: #003d7c; }
.app-header :focus-visible { outline-color: var(--header-ink); }

@media (min-width: 960px) {
  .sidebar { background: var(--sidebar-bg); }
  .sidebar a { color: rgba(255, 255, 255, .9); }
  .sidebar a svg { color: rgba(255, 255, 255, .7); }
  .sidebar a:hover { background: rgba(255, 255, 255, .1); }
  .sidebar a[aria-current="page"] { background: rgba(255, 255, 255, .16); color: #ffffff; box-shadow: inset 3px 0 0 #45abd6; }
  .sidebar a[aria-current="page"] svg { color: #ffffff; }
  .sidebar .group-label { color: rgba(255, 255, 255, .6); }
}

/* =========================================================
   v0.7.3：青系で全体の色をそろえる
   軸の3色：濃紺 #003d7c（左メニュー）／水色 #45abd6（上部バー）／青 #0068aa（ボタン・リンク）
   注意を表す赤・黄色だけは意味が伝わるよう残す
   ========================================================= */
:root {
  --bg: #edf3f9;
  --surface: #ffffff;
  --ink: #142a40;
  --muted: #557089;
  --line: #d3e0ec;
  --accent: #0068aa;
  --accent-strong: #00578f;
  --accent-ink: #ffffff;
  --accent-soft: #e0eef8;
  --info: #003d7c;
  --info-soft: #e1ebf6;
  --title: #003d7c;
  --shadow: 0 1px 2px rgba(0, 61, 124, .06), 0 2px 8px rgba(0, 61, 124, .04);
  --header-bg: #45abd6;
  --header-ink: #002a57;
  --sidebar-bg: #003d7c;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --bg: #0b1622;
    --surface: #12202f;
    --ink: #e3edf6;
    --muted: #8fa6bb;
    --line: #223a52;
    --accent: #45abd6;
    --accent-strong: #6cc0e3;
    --accent-ink: #04203a;
    --accent-soft: #11324a;
    --info: #8fc0ea;
    --info-soft: #16304a;
    --title: #9fd0ec;
    --shadow: none;
    --header-bg: #135c86;
    --header-ink: #ffffff;
    --sidebar-bg: #0a2a4d;
  } }
:root[data-theme="dark"] {
    --bg: #0b1622;
    --surface: #12202f;
    --ink: #e3edf6;
    --muted: #8fa6bb;
    --line: #223a52;
    --accent: #45abd6;
    --accent-strong: #6cc0e3;
    --accent-ink: #04203a;
    --accent-soft: #11324a;
    --info: #8fc0ea;
    --info-soft: #16304a;
    --title: #9fd0ec;
    --shadow: none;
    --header-bg: #135c86;
    --header-ink: #ffffff;
    --sidebar-bg: #0a2a4d;
  }

/* 見出し・パネル */
.page-title { color: var(--title); }
.panel, .help-topic, .board-col, .cal-month, .totals div, .project-card { box-shadow: var(--shadow); }
.panel > h2, .board-col-head { color: var(--title); }

/* ボタン・入力欄 */
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:not(.btn-primary):hover { border-color: var(--accent); color: var(--accent); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.badge { background: var(--info-soft); color: var(--muted); }

/* カレンダー：土曜は青、今日は淡い青 */
.cal-wd.wd-6, .cal-cell.wd-6 .cal-day, .wd-6 .day-date { color: var(--accent); }
.cal-wd { background: var(--accent-soft); color: var(--title); font-weight: 700; }
.cal-cell.is-today { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }

/* スマホの下部タブ */
.tabbar { border-top-color: var(--line); box-shadow: 0 -1px 6px rgba(0, 61, 124, .06); }
.tabbar a[aria-current="page"] { color: var(--accent); }

/* ログイン画面：上部に濃紺→青の帯 */
.auth { background: linear-gradient(180deg, #003d7c 0, #0068aa 260px, var(--bg) 260px); }
.auth-card { box-shadow: 0 8px 24px rgba(0, 61, 124, .15); border-color: transparent; }
.auth-card h1 { color: var(--title); }

/* ダークモードでは上部バーの文字を白に、ボタンも合わせる */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .app-header .logout-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); } :root:not([data-theme="light"]) .app-header .logout-btn:hover { background: rgba(255, 255, 255, .2); border-color: #ffffff; } :root:not([data-theme="light"]) .header-user .avatar { background: #ffffff; color: #0a2a4d; } :root:not([data-theme="light"]) .auth { background: linear-gradient(180deg, #0a2a4d 0, #135c86 260px, var(--bg) 260px); } }
:root[data-theme="dark"] .app-header .logout-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .35); } :root[data-theme="dark"] .app-header .logout-btn:hover { background: rgba(255, 255, 255, .2); border-color: #ffffff; } :root[data-theme="dark"] .header-user .avatar { background: #ffffff; color: #0a2a4d; } :root[data-theme="dark"] .auth { background: linear-gradient(180deg, #0a2a4d 0, #135c86 260px, var(--bg) 260px); }
.cal-cell.is-today .cal-day { color: var(--accent-ink) !important; background: var(--accent); }

/* =========================================================
   v0.8.0：配色テーマ（上部バーと左メニュー）
   body の theme-○○ クラスで切り替える。値はシステム設定で選ぶ
   ========================================================= */
body {
  --header-line: transparent;
  --header-btn-bg: rgba(255, 255, 255, .12);
  --header-btn-border: rgba(255, 255, 255, .4);
  --header-btn-hover: rgba(255, 255, 255, .22);
  --avatar-bg: #ffffff;
  --avatar-ink: #003d7c;
  --sidebar-ink: rgba(255, 255, 255, .9);
  --sidebar-icon: rgba(255, 255, 255, .7);
  --sidebar-hover: rgba(255, 255, 255, .1);
  --sidebar-active-bg: rgba(255, 255, 255, .16);
  --sidebar-active-ink: #ffffff;
  --sidebar-active-bar: #45abd6;
  --sidebar-label: rgba(255, 255, 255, .6);
  --sidebar-border: transparent;
  --sidebar-brand: #ffffff;
}
/* ブルー（おすすめ）：濃紺のメニュー → 青のバー → 水色の差し色 */
body.theme-blue { --header-bg: #0068aa; --header-ink: #ffffff; --header-line: #45abd6; --sidebar-bg: #003d7c; }
/* ネイビー：バーとメニューを濃紺でそろえて枠にする */
body.theme-navy { --header-bg: #003d7c; --header-ink: #ffffff; --header-line: #45abd6; --sidebar-bg: #003d7c; --sidebar-border: rgba(255, 255, 255, .08); }
/* ライト：濃紺のバー＋白いメニュー */
body.theme-light {
  --header-bg: #003d7c; --header-ink: #ffffff; --header-line: #45abd6;
  --sidebar-bg: #ffffff; --sidebar-ink: #142a40; --sidebar-icon: #557089; --sidebar-hover: #edf3f9;
  --sidebar-active-bg: #e0eef8; --sidebar-active-ink: #003d7c; --sidebar-active-bar: #0068aa;
  --sidebar-label: #557089; --sidebar-border: #d3e0ec; --sidebar-brand: #003d7c;
}
/* スカイ：水色のバー（文字は濃紺）＋濃紺のメニュー */
body.theme-sky {
  --header-bg: #45abd6; --header-ink: #002a57;
  --header-btn-bg: rgba(255, 255, 255, .25); --header-btn-border: rgba(0, 42, 87, .35); --header-btn-hover: rgba(255, 255, 255, .5);
  --sidebar-bg: #003d7c;
}
/* ダークモードでは、どの配色でもまぶしくならない暗い青にする */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body[class*="theme-"] {
    --header-bg: #135c86; --header-ink: #ffffff; --header-line: #2b7fae;
    --header-btn-bg: rgba(255, 255, 255, .1); --header-btn-border: rgba(255, 255, 255, .35); --header-btn-hover: rgba(255, 255, 255, .2);
    --sidebar-bg: #0a2a4d; --sidebar-ink: rgba(255, 255, 255, .9); --sidebar-icon: rgba(255, 255, 255, .7);
    --sidebar-hover: rgba(255, 255, 255, .08); --sidebar-active-bg: rgba(255, 255, 255, .14); --sidebar-active-ink: #ffffff;
    --sidebar-active-bar: #45abd6; --sidebar-label: rgba(255, 255, 255, .55); --sidebar-border: transparent; --sidebar-brand: #ffffff;
    --avatar-ink: #0a2a4d;
  } }
:root[data-theme="dark"] body[class*="theme-"] {
    --header-bg: #135c86; --header-ink: #ffffff; --header-line: #2b7fae;
    --header-btn-bg: rgba(255, 255, 255, .1); --header-btn-border: rgba(255, 255, 255, .35); --header-btn-hover: rgba(255, 255, 255, .2);
    --sidebar-bg: #0a2a4d; --sidebar-ink: rgba(255, 255, 255, .9); --sidebar-icon: rgba(255, 255, 255, .7);
    --sidebar-hover: rgba(255, 255, 255, .08); --sidebar-active-bg: rgba(255, 255, 255, .14); --sidebar-active-ink: #ffffff;
    --sidebar-active-bar: #45abd6; --sidebar-label: rgba(255, 255, 255, .55); --sidebar-border: transparent; --sidebar-brand: #ffffff;
    --avatar-ink: #0a2a4d;
  }

.app-header { background: var(--header-bg); color: var(--header-ink); box-shadow: inset 0 -3px 0 var(--header-line); }
.app-header h1, .header-user { color: var(--header-ink); }
.header-user .avatar { background: var(--avatar-bg); color: var(--avatar-ink); }
.app-header .logout-btn { background: var(--header-btn-bg); border-color: var(--header-btn-border); color: var(--header-ink); }
.app-header .logout-btn:hover { background: var(--header-btn-hover); border-color: var(--header-ink); color: var(--header-ink); }
.app-header :focus-visible { outline-color: var(--header-ink); }
.app-header .btn { background: #ffffff; border-color: #ffffff; color: #003d7c; }

@media (min-width: 960px) {
  .sidebar { background: var(--sidebar-bg); border-right: 1px solid var(--sidebar-border); }
  .sidebar .brand { color: var(--sidebar-brand); }
  .sidebar a { color: var(--sidebar-ink); }
  .sidebar a svg { color: var(--sidebar-icon); }
  .sidebar a:hover { background: var(--sidebar-hover); color: var(--sidebar-ink); }
  .sidebar a[aria-current="page"] { background: var(--sidebar-active-bg); color: var(--sidebar-active-ink); box-shadow: inset 3px 0 0 var(--sidebar-active-bar); }
  .sidebar a[aria-current="page"] svg { color: var(--sidebar-active-ink); }
  .sidebar .group-label { color: var(--sidebar-label); }
  .sidebar :focus-visible { outline-color: var(--sidebar-active-bar); }
}

/* システム設定：配色の選択 */
.theme-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.theme-option { position: relative; display: grid; gap: 8px; padding: 10px; border: 2px solid var(--line); border-radius: var(--radius-m); cursor: pointer; background: var(--surface); }
.theme-option input { position: absolute; opacity: 0; }
.theme-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.theme-option:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.theme-sample { display: grid; grid-template-columns: 26% 1fr; grid-template-rows: 14px 52px; height: 66px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #edf3f9; }
.theme-sample .s-side { grid-row: 1 / 3; }
.theme-sample .s-head { border-bottom: 2px solid transparent; }
.theme-sample .s-body { display: grid; gap: 4px; padding: 6px; align-content: start; }
.theme-sample .s-body i { display: block; height: 6px; border-radius: 3px; background: #d3e0ec; }
.theme-sample .s-body i:first-child { width: 50%; background: #0068aa; }
.theme-option strong { font-size: 14px; }
.theme-option small { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* =========================================================
   v0.9.0：デザイン案3（コーポレート型）
   濃紺の2段ヘッダー＋アイコン付きメニュー／英字の小見出し／ひし形と罫線の見出し
   ========================================================= */
:root { --radius-s: 4px; --radius-m: 4px; --hd: #003d7c; --hd-accent: #45abd6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --hd: #0a2a4d; } }
:root[data-theme="dark"] { --hd: #0a2a4d; }

/* 画面の枠：左メニューは使わない */
body { display: block; }
.sidebar { display: none !important; }

/* ヘッダー（上段：ロゴと操作、下段：メニュー） */
body .app-header {
  display: block; position: sticky; top: 0; z-index: 30;
  padding: env(safe-area-inset-top, 0px) 0 0;
  background: var(--hd); color: #ffffff; border: 0; box-shadow: 0 2px 8px rgba(0, 30, 60, .12);
}
.hd-top { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 24px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.logo { color: #ffffff; font-weight: 700; font-size: 16px; letter-spacing: .06em; text-decoration: none; white-space: nowrap; }
.logo small { margin-left: 8px; font-weight: 400; font-size: 10px; letter-spacing: .22em; color: var(--hd-accent); }
.header-title-mobile { display: none; }
.app-header .header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.hd-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, .3); border-radius: 4px; background: transparent;
  color: #ffffff; font: inherit; font-size: 12px; text-decoration: none; cursor: pointer;
}
.hd-btn svg { width: 16px; height: 16px; }
.hd-btn:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .6); }
body .header-user { color: rgba(255, 255, 255, .92); font-weight: 400; font-size: 13px; }
body .header-user .avatar { width: 30px; height: 30px; background: var(--hd-accent); color: #ffffff; }
.app-header :focus-visible { outline-color: #ffffff; }

.gnav { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0 2px; padding: 0 16px; }
.gnav > a, .gnav summary {
  position: relative; display: flex; align-items: center; gap: 7px; height: 46px; padding: 0 14px;
  color: rgba(255, 255, 255, .76); font-size: 13px; text-decoration: none; white-space: nowrap; cursor: pointer; list-style: none;
}
.gnav summary::-webkit-details-marker { display: none; }
.gnav svg { width: 18px; height: 18px; }
.gnav > a:hover, .gnav summary:hover { color: #ffffff; background: rgba(255, 255, 255, .06); }
.gnav [aria-current="page"] { color: #ffffff; font-weight: 700; }
.gnav [aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--hd-accent); }
.gnav .nav-badge { margin-left: 2px; background: var(--hd-accent); color: #002a57; }
.gnav-end { margin-left: auto; }
.gnav-menu { position: relative; }
.caret { font-size: 10px; opacity: .7; }
.gnav-drop {
  position: absolute; top: 100%; left: 0; z-index: 50; display: grid; min-width: 210px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 10px 28px rgba(0, 30, 60, .2);
}
.gnav-drop a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 4px; color: var(--ink); text-decoration: none; font-size: 14px; }
.gnav-drop a svg { width: 18px; height: 18px; color: #0068aa; }
.gnav-drop a:hover { background: var(--bg); }
.gnav-drop a[aria-current="page"] { background: var(--accent-soft); color: var(--title); font-weight: 700; }

/* 本文 */
body .app-main { max-width: 1600px; margin: 0 auto; }
@media (min-width: 960px) { body .app-main { padding: 22px 28px 48px; } }
.page-kicker { margin: 0 0 2px; font-size: 10px; font-weight: 700; letter-spacing: .24em; color: var(--hd-accent); }
.page-title, .title-row .page-title { color: var(--title); letter-spacing: .04em; }

/* パネルと見出し：ひし形の印＋罫線 */
.panel { border-color: var(--line); box-shadow: none; }
.panel > h2, .help-section > h2 { display: flex; align-items: center; gap: 10px; color: var(--title); }
.panel > h2::before, .help-section > h2::before, .sh::before {
  content: ""; flex: none; width: 6px; height: 6px; transform: rotate(45deg); background: var(--title);
}
.panel > h2::after, .help-section > h2::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.help-section > h2 { padding-left: 0; border-left: 0; }

/* セクション見出し（英字の小見出し＋日本語＋罫線＋リンク） */
.sh { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.sh .kick { font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--hd-accent); }
.sh h2 { margin: 0; font-size: 17px; color: var(--title); white-space: nowrap; }
.sh h2 .count { margin-left: 6px; }
.sh .rule { flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.sh a { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.sh a svg { width: 14px; height: 14px; }

/* ボタン・バッジ */
.btn { border-radius: 4px; }
.btn-primary { background: #003d7c; border-color: #003d7c; color: #ffffff; }
.btn-primary:hover { background: #0068aa; border-color: #0068aa; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: #45abd6; border-color: #45abd6; color: #04203a; } }
:root[data-theme="dark"] .btn-primary { background: #45abd6; border-color: #45abd6; color: #04203a; }
.badge { border-radius: 3px; border: 1px solid color-mix(in srgb, currentColor 30%, transparent); }

/* スマホの下部タブ：選んでいる項目の上に水色の線 */
.tabbar a { position: relative; }
.tabbar a[aria-current="page"] { color: var(--title); font-weight: 700; }
.tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 50%; width: 28px; height: 3px; transform: translateX(-50%); background: var(--hd-accent); }

/* 2色アイコン（数字の要約などで使う） */
.duo { display: inline-grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: #e3f3fa; color: #003d7c; }
.duo svg { width: 22px; height: 22px; fill: rgba(69, 171, 214, .3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .duo { background: #13334d; color: #9fd0ec; } }
:root[data-theme="dark"] .duo { background: #13334d; color: #9fd0ec; }

@media (max-width: 959px) {
  .gnav { display: none; }
  .hd-top { height: 52px; padding: 0 14px; }
  .logo small { display: none; }
}
@media (max-width: 639px) {
  .hd-label, .header-user-name { display: none; }
  .hd-btn { width: 34px; padding: 0; justify-content: center; }
}

/* ---------- ホーム（案3） ---------- */
.home-title { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; margin-bottom: 18px; }
.home-title .page-title { margin: 0; }
.home-title .muted { margin-bottom: 3px; font-size: 13px; }
.home-title-actions { margin-left: auto; display: flex; gap: 8px; }
.home-title-actions .btn svg { width: 16px; height: 16px; }
.home-row1 { display: grid; gap: 16px; margin-bottom: 24px; }
.home-row2, .home-row3 { display: grid; gap: 24px; margin-bottom: 24px; }
@media (min-width: 960px) {
  .home-row1 { grid-template-columns: 340px minmax(0, 1fr); }
  .home-row2, .home-row3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .home-row3 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
}
.timecard { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid #003d7c; }
.tc-kick { margin: 0; font-size: 10px; font-weight: 700; letter-spacing: .22em; color: var(--hd-accent); }
.tc-time { margin: 0; font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--title); font-variant-numeric: tabular-nums; }
.tc-state { margin: 4px 0 12px; color: var(--muted); font-size: 13px; }
.tc-badge { display: inline-block; margin-right: 6px; padding: 1px 8px; font-size: 11px; font-weight: 700; background: #e3f3fa; color: #0a6e96; }
.tc-badge.tc-off { background: #fff1dc; color: #a45f00; } .tc-badge.tc-on_break { background: #ece9fb; color: #4a3fb0; } .tc-badge.tc-done { background: var(--bg); color: var(--muted); }
.tc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tc-actions.single { grid-template-columns: 1fr; }
.tc-btn { min-height: 46px; border-radius: 4px; border: 1px solid #003d7c; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.tc-btn.main { background: #003d7c; color: #ffffff; } .tc-btn.sub { background: var(--surface); color: #003d7c; }
.tc-btn:disabled { opacity: .55; }
.tc-done { margin: 0; font-size: 14px; }
.tc-log { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.timecard .punch-status { color: var(--ink); margin-top: 8px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .timecard { border-left-color: #45abd6; } :root:not([data-theme="light"]) .tc-btn { border-color: #45abd6; } :root:not([data-theme="light"]) .tc-btn.main { background: #45abd6; color: #04203a; } :root:not([data-theme="light"]) .tc-btn.sub { color: #9fd0ec; } :root:not([data-theme="light"]) .tc-badge { background: #13334d; color: #9fd0ec; } }
:root[data-theme="dark"] .timecard { border-left-color: #45abd6; } :root[data-theme="dark"] .tc-btn { border-color: #45abd6; } :root[data-theme="dark"] .tc-btn.main { background: #45abd6; color: #04203a; } :root[data-theme="dark"] .tc-btn.sub { color: #9fd0ec; } :root[data-theme="dark"] .tc-badge { background: #13334d; color: #9fd0ec; }

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 960px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--ink); text-decoration: none; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: -1px 0 0 -1px; }
.kpi:hover { background: var(--bg); }
.kpi small { display: block; color: var(--muted); font-size: 12px; }
.kpi b { display: block; font-size: 30px; line-height: 1.2; color: var(--title); white-space: nowrap; font-variant-numeric: tabular-nums; }
.kpi b em { margin-left: 4px; font-style: normal; font-weight: 400; font-size: 12px; color: var(--muted); }
@media (max-width: 639px) { .kpi { padding: 12px; gap: 10px; } .kpi b { font-size: 22px; } .kpi .duo { width: 36px; height: 36px; } }

.box { background: var(--surface); border: 1px solid var(--line); }
.box-empty { margin: 0; padding: 18px 16px; color: var(--muted); font-size: 14px; }
.htable { width: 100%; border-collapse: collapse; }
.htable td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.htable tr:last-child td { border-bottom: 0; }
.htable tr { cursor: pointer; } .htable tr:hover td { background: var(--bg); }
.h-time { width: 128px; font-weight: 700; color: var(--title); font-variant-numeric: tabular-nums; white-space: nowrap; }
.h-title { color: var(--ink); text-decoration: none; font-weight: 700; }
.h-title .cbar { display: inline-block; width: 4px; height: 14px; margin-right: 10px; border-radius: 2px; background: #0068aa; vertical-align: -2px; }
.h-sub { display: block; color: var(--muted); font-size: 12px; }
.h-place { color: var(--muted); font-size: 12px; white-space: nowrap; } .h-place svg { width: 12px; height: 12px; vertical-align: -1px; margin-right: 2px; }
.h-people { text-align: right; white-space: nowrap; }
.h-people .av, .att-bars .av { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-left: -6px; border-radius: 50%; border: 2px solid var(--surface); background: #d7e8f5; color: #003d7c; font-size: 10px; font-weight: 700; }
.h-due { width: 110px; white-space: nowrap; } .h-prog { width: 170px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pbar { display: inline-block; width: 100px; height: 6px; margin-right: 8px; background: var(--line); vertical-align: 1px; }
.pbar span { display: block; height: 100%; background: var(--hd-accent); }
.hnews { list-style: none; margin: 0; padding: 0; }
.hnews a { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hnews li:last-child a { border-bottom: 0; } .hnews a:hover { background: var(--bg); }
.h-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.h-body b { display: block; font-size: 14px; } .h-body small { color: var(--muted); font-size: 12px; }
.imp { margin-right: 6px; padding: 0 5px; border: 1px solid #e5484d; color: #e5484d; font-style: normal; font-size: 10px; font-weight: 700; vertical-align: 1px; }
.att-bars { padding: 4px 16px 8px; }
.ab { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ab:last-child { border-bottom: 0; } .ab > span { color: var(--muted); font-size: 13px; }
.ab b { font-size: 18px; color: var(--title); } .ab b small { margin-left: 2px; font-size: 11px; font-weight: 400; }
.ab i { grid-column: 1 / -1; height: 4px; }
.ab-names { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
.home-cal { margin-bottom: 8px; }
.cal-arrows { display: inline-flex; gap: 4px; }
@media (max-width: 639px) {
  .home-title-actions { display: none; }
  .h-place, .h-people, .h-prog .pbar { display: none; }
  .h-time { width: 92px; font-size: 12px; } .h-prog { width: auto; }
}

.home-side { display: grid; gap: 24px; align-content: start; }
.home-cal .cal-cell { min-height: 96px; }
.sh { flex-wrap: wrap; row-gap: 4px; }
.sh .rule { min-width: 24px; }
@media (max-width: 639px) { .home-cal .cal-cell { min-height: 64px; } .sh .rule { display: none; } .sh a { margin-left: auto; } }

/* v0.9.1：フッター（コピーライト） */
.app-footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px;
  max-width: 1600px; margin: 0 auto; padding: 14px 28px 18px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: 12px;
}
.app-footer small { font-size: 12px; }
.app-footer .copyright { letter-spacing: .02em; }
.app-footer .footer-meta { color: color-mix(in srgb, var(--muted) 75%, transparent); }
@media (min-width: 960px) { body .app-main { padding-bottom: 32px; } }
@media (max-width: 959px) {
  body .app-main { padding-bottom: 20px; }
  .app-footer { justify-content: center; text-align: center; padding: 12px 16px calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 14px); }
  .app-footer .footer-meta { display: none; }
}
.auth { grid-template-rows: auto auto auto; }
.auth-copyright { width: 100%; max-width: 400px; margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
/* 内容が短いページでも、フッターを画面の一番下に置く */
body.theme-blue, body.theme-navy, body.theme-light, body.theme-sky, body[class*="theme-"] { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body[class*="theme-"] > .app-main { flex: 1 0 auto; width: 100%; }
body[class*="theme-"] > .auth { flex: 1 0 auto; }
body[class*="theme-"] > .app-footer { width: 100%; }

/* =========================================================
   v0.10.0：取引先
   ========================================================= */
.client-alerts { margin-bottom: 16px; }
.contract-list { list-style: none; margin: 0; padding: 0; }
.contract-list a { display: grid; grid-template-columns: 7.5em 1fr auto; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.contract-list li:last-child a { border-bottom: 0; }
.contract-list a:hover { background: var(--bg); }
.contract-list .k { font-size: 11px; color: var(--muted); }
.contract-list .n b { display: block; font-size: 14px; overflow-wrap: anywhere; } .contract-list .n small { color: var(--muted); font-size: 12px; }
.exp { white-space: nowrap; font-variant-numeric: tabular-nums; font-size: 13px; }
.exp small { margin-left: 6px; font-size: 11px; font-weight: 700; }
.exp-overdue { color: var(--danger); font-weight: 700; } .exp-soon { color: var(--warn); font-weight: 700; } .exp-near { color: var(--info); }
.client-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.client-filter .input { width: auto; flex: 1 1 240px; min-height: 38px; }
.client-filter select.input { flex: 0 1 160px; }
.cat-website { background: #e3f3fa; color: #0a6e96; } .cat-system { background: #ece9fb; color: #4a3fb0; } .cat-other { background: var(--bg); color: var(--muted); }
.cstatus-active { background: var(--accent-soft); color: var(--accent); } .cstatus-paused { background: var(--warn-soft); color: var(--warn); } .cstatus-ended { background: var(--bg); color: var(--muted); }
.client-table .sub .exp { font-size: 12px; }
.contract-rows { display: grid; gap: 10px; margin-bottom: 8px; }
.contract-row { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg); }
.contract-row .field { margin-bottom: 8px; }
.contract-row .row3 { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 8px; }
.contract-row .row3 .field { margin-bottom: 0; }
.contract-row label { font-size: 12px; }
.row-remove { margin-top: 6px; color: var(--danger); font-size: 12px; }
@media (max-width: 639px) { .contract-row .row3 { grid-template-columns: 1fr 1fr; } .contract-list a { grid-template-columns: 1fr auto; } .contract-list .k { grid-column: 1 / -1; } }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); column-gap: 12px; }
/* ホーム：参加中のプロジェクト */
.hprojects { list-style: none; margin: 0; padding: 0; }
.hprojects a { display: grid; gap: 4px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.hprojects li:last-child a { border-bottom: 0; } .hprojects a:hover { background: var(--bg); }
.hp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .hp-top b { font-size: 14px; overflow-wrap: anywhere; }
.hp-bar { display: flex; align-items: center; font-size: 12px; color: var(--muted); } .hp-bar .pbar { flex: 1; max-width: none; width: auto; }
.hp-meta { color: var(--muted); font-size: 12px; } .hp-meta b { color: var(--ink); }

/* =========================================================
   v0.10.1：カレンダーの土曜・日曜の背景色
   土曜はブランドの青系、日曜は日付の赤と同系のローズ（どちらも予定が読める淡さ）
   ========================================================= */
:root {
  --sat-bg: #eef6fc;  --sat-head: #dcecf8;  --sat-ink: #0068aa;
  --sun-bg: #fdf2f2;  --sun-head: #f9e1e1;  --sun-ink: #c2352b;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
    --sat-bg: #102538; --sat-head: #15324b; --sat-ink: #7cc3e8;
    --sun-bg: #261821; --sun-head: #36202a; --sun-ink: #f08a7f;
  } }
:root[data-theme="dark"] {
    --sat-bg: #102538; --sat-head: #15324b; --sat-ink: #7cc3e8;
    --sun-bg: #261821; --sun-head: #36202a; --sun-ink: #f08a7f;
  }

/* 月表示（予定・ホーム共通）：曜日の見出しとマス */
.cal-wd.wd-6 { background: var(--sat-head); color: var(--sat-ink); }
.cal-wd.wd-0 { background: var(--sun-head); color: var(--sun-ink); }
.cal-cell.wd-6 { background: var(--sat-bg); }
.cal-cell.wd-0 { background: var(--sun-bg); }
.cal-cell.wd-6 .cal-day { color: var(--sat-ink); }
.cal-cell.wd-0 .cal-day { color: var(--sun-ink); }
/* 前後の月の日付は、土日の色を薄めてグレー寄りに */
.cal-cell.is-out.wd-6 { background: color-mix(in srgb, var(--sat-bg) 45%, var(--bg)); }
.cal-cell.is-out.wd-0 { background: color-mix(in srgb, var(--sun-bg) 45%, var(--bg)); }
/* 今日の強調は土日より優先 */
.cal-cell.is-today, .cal-cell.is-today.wd-0, .cal-cell.is-today.wd-6 { background: color-mix(in srgb, var(--accent-soft) 70%, var(--surface)); }
.cal-cell.is-today .cal-day { color: var(--accent-ink) !important; background: var(--accent); }

/* 週表示・日表示 */
.cal-col.wd-6 { background: var(--sat-bg); }
.cal-col.wd-0 { background: var(--sun-bg); }
.cal-col.wd-6 .day-date { color: var(--sat-ink); }
.cal-col.wd-0 .day-date { color: var(--sun-ink); }
@media (min-width: 960px) {
  .cal-week .cal-col.wd-6 .cal-col-head { background: var(--sat-head); margin: -8px -8px 0; padding: 6px 8px; }
  .cal-week .cal-col.wd-0 .cal-col-head { background: var(--sun-head); margin: -8px -8px 0; padding: 6px 8px; }
}

/* 出欠の月一覧・出勤予定の入力：同じ色をさらに淡く */
.days li.wd-6, .plan-days li.wd-6 { background: color-mix(in srgb, var(--sat-bg) 70%, var(--surface)); }
.days li.wd-0, .plan-days li.wd-0 { background: color-mix(in srgb, var(--sun-bg) 70%, var(--surface)); }
.days li.wd-6 .day-date, .plan-days li.wd-6 .day-date { color: var(--sat-ink); }
.days li.wd-0 .day-date, .plan-days li.wd-0 .day-date { color: var(--sun-ink); }
.days li.wd-0 a, .days li.wd-6 a, .plan-days li.wd-0, .plan-days li.wd-6 { padding-left: 6px; padding-right: 6px; }

/* =========================================================
   v0.11.0：表示モードの切り替えボタン（月＝ダークへ／太陽＝ライトへ）
   ========================================================= */
.theme-toggle .ti-sun { display: none; }
.theme-toggle .ti-moon, .theme-toggle .ti-sun { display: inline-grid; place-items: center; }
.theme-toggle .ti-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .ti-moon { display: none; } :root:not([data-theme="light"]) .theme-toggle .ti-sun { display: inline-grid; } }
:root[data-theme="dark"] .theme-toggle .ti-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ti-sun { display: inline-grid; }
.app-header .theme-toggle { width: 34px; padding: 0; justify-content: center; }
.auth-theme-toggle {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 12px); right: 12px; z-index: 5;
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .12); color: #ffffff; cursor: pointer;
}
.auth-theme-toggle svg { width: 18px; height: 18px; }
/* 手動でダークにしたとき、フォームなどの部品もダークにする */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

/* =========================================================
   v0.12.0：名刺から読み取る
   ========================================================= */
.card-scan { grid-column: 1 / -1; margin-bottom: 16px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--accent) 50%, var(--line)); border-radius: var(--radius-m); background: color-mix(in srgb, var(--accent-soft) 50%, var(--surface)); }
.cs-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.cs-text { flex: 1 1 260px; } .cs-text b { display: block; font-size: 15px; color: var(--title); } .cs-text small { color: var(--muted); font-size: 12px; }
.cs-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cs-buttons .btn { cursor: pointer; } .cs-buttons .btn svg { width: 18px; height: 18px; }
.cs-result { display: flex; gap: 14px; align-items: flex-start; margin-top: 12px; }
.cs-result img { width: 180px; max-width: 40%; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); }
.cs-status { margin: 0 0 6px; font-size: 14px; }
.cs-status.is-busy::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 8px; vertical-align: -2px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.cs-status.is-error { color: var(--danger); } .cs-status.is-ok { color: var(--accent); font-weight: 700; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cs-status.is-busy::before { animation: none; } }
.is-filled { background: color-mix(in srgb, #fff3c4 55%, var(--surface)) !important; transition: background 1.5s; }
.card-images { display: grid; gap: 8px; }
.card-images img { width: 100%; border-radius: 4px; border: 1px solid var(--line); }
@media (max-width: 639px) { .cs-result { flex-direction: column; } .cs-result img { width: 100%; max-width: none; } .cs-buttons { width: 100%; } .cs-buttons .btn { flex: 1; } }
/* 名刺の欄はフォームの一番上（横幅いっぱい）に置き、右側の列はその下から始める */
@media (min-width: 1280px) {
  .form-2col > .card-scan { grid-column: 1 / -1; grid-row: 1; }
  .form-2col:has(> .card-scan) > .form-side { grid-row: 2 / span 40; }
}
/* 取引先の詳細：名刺はページの最後。写真は大きくなりすぎないよう幅を抑えて並べる */
.client-cards, .client-delete { margin-top: 16px; }
.client-cards .card-images { grid-template-columns: repeat(auto-fill, minmax(240px, 420px)); }

/* =========================================================
   v0.13.0：スマホのスピードダイアル（下部タブに入りきらないメニュー）
   ========================================================= */
.speed-dial { display: none; }
@media (max-width: 959px) {
  .speed-dial { display: block; }
  .sd-fab {
    position: fixed; right: 16px; z-index: 46;
    bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 16px);
    display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%;
    background: #003d7c; color: #ffffff; cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 30, 60, .3), 0 0 0 3px rgba(69, 171, 214, .35);
  }
  .sd-fab svg { width: 24px; height: 24px; }
  .sd-fab .sd-fab-close { display: none; }
  .speed-dial.is-open .sd-fab .sd-fab-open { display: none; }
  .speed-dial.is-open .sd-fab .sd-fab-close { display: grid; }
  .sd-fab:focus-visible { outline: 3px solid var(--hd-accent); outline-offset: 3px; }
  .sd-backdrop { position: fixed; inset: 0; z-index: 44; background: rgba(5, 20, 40, .45); }
  .sd-menu { position: fixed; right: 16px; z-index: 45; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 84px); max-height: calc(100dvh - var(--tab-h) - 150px); overflow-y: auto; }
  .sd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-items: end; }
  .sd-item {
    display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; font: inherit;
    color: inherit; text-decoration: none; cursor: pointer;
    animation: sd-in .16s ease-out both;
  }
  .sd-label { padding: 6px 12px; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 700; box-shadow: 0 2px 8px rgba(0, 30, 60, .2); white-space: nowrap; }
  .sd-icon { display: grid; place-items: center; width: 46px; height: 46px; margin-right: 5px; border-radius: 50%; background: var(--surface); color: #003d7c; box-shadow: 0 2px 8px rgba(0, 30, 60, .25); }
  .sd-icon svg { width: 22px; height: 22px; }
  .sd-item[aria-current="page"] .sd-icon { background: #003d7c; color: #ffffff; }
  .sd-item[aria-current="page"] .sd-label { color: var(--title); box-shadow: inset 3px 0 0 var(--hd-accent), 0 2px 8px rgba(0, 30, 60, .2); }
  .sd-back .sd-icon { background: var(--bg); }
  .sd-item:focus-visible .sd-icon { outline: 3px solid var(--hd-accent); outline-offset: 2px; }
  .sd-list li:nth-last-child(1) .sd-item { animation-delay: 0s; }
  .sd-list li:nth-last-child(2) .sd-item { animation-delay: .02s; }
  .sd-list li:nth-last-child(3) .sd-item { animation-delay: .04s; }
  .sd-list li:nth-last-child(4) .sd-item { animation-delay: .06s; }
  .sd-list li:nth-last-child(n+5) .sd-item { animation-delay: .08s; }
  /* 下に保存ボタンが固定される画面では、重ならないよう上げる */
  body:has(.save-bar) .sd-fab { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 80px); }
  body:has(.save-bar) .sd-menu { bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 148px); }
  /* ページの最後の内容がボタンに隠れないよう、フッターに余白を足す */
  .app-footer { padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 84px); }
}
@keyframes sd-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sd-item { animation: none; } }
:root[data-theme="dark"] .sd-fab { background: #45abd6; color: #04203a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sd-fab { background: #45abd6; color: #04203a; } }
:root[data-theme="dark"] .sd-item[aria-current="page"] .sd-icon { background: #45abd6; color: #04203a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sd-item[aria-current="page"] .sd-icon { background: #45abd6; color: #04203a; } :root:not([data-theme="light"]) .sd-icon { color: #9fd0ec; } }
:root[data-theme="dark"] .sd-icon { color: #9fd0ec; }

/* =========================================================
   v0.13.1：スマホのメニューをアーク型（扇形）に
   位置は JavaScript がボタンの位置から計算する
   ========================================================= */
@media (max-width: 959px) {
  .sd-menu { position: fixed; inset: 0; z-index: 45; max-height: none; overflow: visible; pointer-events: none; }
  .sd-disc {
    position: fixed; border-radius: 50%; clip-path: inset(0 50% 50% 0);
    background: radial-gradient(circle, color-mix(in srgb, var(--surface) 97%, transparent) 0 30%, color-mix(in srgb, var(--bg) 95%, transparent) 31% 100%);
    box-shadow: 0 0 0 1px rgba(0, 61, 124, .12), 0 10px 40px rgba(0, 30, 60, .35);
    opacity: 0; transform: scale(.6); transform-origin: 100% 100%; transition: opacity .18s ease, transform .22s ease;
  }
  .speed-dial.is-shown .sd-disc { opacity: 1; transform: none; }
  .sd-list { display: block; }
  .sd-list > li { position: fixed; width: 0; height: 0; pointer-events: auto; }
  .sd-menu .sd-item {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.4); opacity: 0;
    display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; width: 84px;
    animation: none; transition: transform .2s cubic-bezier(.2, .9, .3, 1.2), opacity .15s ease;
    transition-delay: inherit;
  }
  .speed-dial.is-shown .sd-menu .sd-item { transform: translate(-50%, -50%); opacity: 1; }
  .sd-menu .sd-icon { margin: 0; }
  .sd-menu .sd-label {
    padding: 1px 7px; border-radius: 9px; font-size: 11px; line-height: 1.35;
    background: color-mix(in srgb, var(--surface) 90%, transparent); box-shadow: none;
  }
  .sd-menu .sd-item[aria-current="page"] .sd-label { box-shadow: none; color: var(--title); }
}
@media (prefers-reduced-motion: reduce) {
  .sd-disc, .sd-menu .sd-item { transition: none !important; }
}
/* v0.13.2：扇形の背景はなくし、項目名は白い札で読みやすく */
.sd-disc { display: none !important; }
@media (max-width: 959px) {
  .sd-menu .sd-label { background: var(--surface); box-shadow: 0 1px 4px rgba(0, 30, 60, .25); }
}
/* ダークモード：アイコンと項目名が暗い背景に溶け込まないよう、明るめの青と縁取り */
:root[data-theme="dark"] .sd-menu .sd-icon { background: #1b3a57; border: 1px solid rgba(159, 208, 236, .45); }
:root[data-theme="dark"] .sd-menu .sd-label { background: #1b3a57; color: #e3edf6; border: 1px solid rgba(159, 208, 236, .35); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .sd-menu .sd-icon { background: #1b3a57; border: 1px solid rgba(159, 208, 236, .45); }
  :root:not([data-theme="light"]) .sd-menu .sd-label { background: #1b3a57; color: #e3edf6; border: 1px solid rgba(159, 208, 236, .35); }
}
/* v0.13.3：Googleログインの設定状態 */
.google-state { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-s); font-size: 13px; }
.google-state small { display: block; margin-top: 2px; color: var(--muted); }
.google-state.is-ok { background: var(--accent-soft); color: var(--title); }
.google-state.is-ng { background: var(--danger-soft); color: var(--danger); }
.notice-danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
/* v0.13.4：コピーできる値 */
.copy-row { display: flex; gap: 8px; align-items: stretch; }
.copy-code { flex: 1; display: block; padding: 8px 10px; border-radius: 6px; background: var(--bg); font-size: 13px; word-break: break-all; user-select: all; }
