/* ==========================================================================
   LVC Dashboard
   モバイルファースト。カードで囲まず、余白と罫線で区切る。
   数字（時刻・距離）は Manrope、本文は Noto Sans JP。
   ========================================================================== */

:root {
  --bg: #ffffff;
  --sunken: #f3f4f1;
  --sunken-2: #eaece8;
  --ink: #17201c;
  --ink-2: #3f4843;
  --muted: #6a736e;
  --faint: #9ca39e;
  --line: #e3e6e1;
  --line-strong: #cbd0ca;

  --pine: #1d5143;
  --pine-hover: #153e33;
  --pine-soft: #e4ede9;
  --live: #1f8a5a;
  --live-soft: #e3f2ea;
  --amber: #8a5a0f;
  --amber-soft: #faf1dc;
  --danger: #ad352b;
  --danger-soft: #fbe9e6;

  --font-sans: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", system-ui, sans-serif;
  --font-num: "Manrope", "SF Pro Display", system-ui, sans-serif;

  --r-lg: 14px;
  --r: 10px;
  --r-sm: 7px;
  --gutter: 20px;
  --content: 680px;
  --tabbar-h: 62px;
  --dock-h: 80px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; border-radius: 4px; }

.icon { width: 20px; height: 20px; flex: none; }
.num { font-family: var(--font-num); letter-spacing: 0; }
.muted { color: var(--muted); }
.fine-print { margin-top: 16px; text-align: center; font-size: 12px; color: var(--faint); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: var(--r-sm); }

/* ==========================================================================
   Shell / Navigation
   ========================================================================== */

.shell { min-height: 100dvh; }
.main {
  max-width: var(--content);
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 20px) var(--gutter)
           calc(var(--tabbar-h) + var(--safe-b) + 40px);
}
.has-dock .main { padding-bottom: calc(var(--tabbar-h) + var(--dock-h) + var(--safe-b) + 32px); }

.env-strip {
  padding: 6px var(--gutter);
  padding-top: calc(env(safe-area-inset-top, 0px) + 6px);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.env-strip + .main { padding-top: 20px; }

/* スマートフォン：下部タブバー */
.nav {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.nav-brand { display: none; }
.nav-list { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tabbar-h); }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
}
.nav-item .icon { width: 22px; height: 22px; stroke-width: 1.8; }
.nav-item.is-active { color: var(--pine); }
.nav-item.is-active .icon { stroke-width: 2.2; }

.brand-mark {
  font-family: var(--font-num);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--pine);
}
.brand-name { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }

/* PC：左サイドナビ */
@media (min-width: 960px) {
  .nav {
    inset: 0 auto 0 0;
    width: 232px;
    padding: 28px 16px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: var(--sunken);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-brand { display: flex; align-items: baseline; gap: 8px; padding: 0 12px 28px; }
  .nav-list { display: flex; flex-direction: column; gap: 2px; height: auto; }
  .nav-item {
    flex-direction: row; justify-content: flex-start; gap: 12px;
    height: 42px; padding: 0 12px;
    border-radius: var(--r-sm);
    color: var(--ink-2);
    font-size: 14px;
    letter-spacing: .02em;
  }
  .nav-item .icon { width: 18px; height: 18px; }
  .nav-item:hover { background: var(--sunken-2); }
  .nav-item.is-active { background: var(--bg); color: var(--pine); box-shadow: 0 0 0 1px var(--line); }

  .shell { margin-left: 232px; }
  .main { padding: 48px 40px 80px; }
  .has-dock .main { padding-bottom: 80px; }
  .env-strip { padding-top: 6px; }
}

/* ==========================================================================
   Typography blocks
   ========================================================================== */

.page-head { margin-bottom: 24px; }
.back-link {
  display: inline-flex; align-items: center; gap: 2px;
  margin: 0 0 10px -6px; padding: 6px 8px 6px 2px;
  color: var(--muted); font-size: 14px;
}
.back-link .icon { width: 18px; height: 18px; }
.page-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-title { font-size: 22px; font-weight: 700; line-height: 1.4; letter-spacing: .03em; font-feature-settings: "palt"; }
.page-actions { display: flex; gap: 8px; flex: none; }
.page-lead { margin-top: 6px; color: var(--muted); font-size: 14px; }

.section { padding: 24px 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; padding-top: 4px; }
.page-head + .section, .today-head + .section, .flash + .section { border-top: 0; padding-top: 4px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: .08em;
  margin-bottom: 12px;
}
.section-head .section-title { margin-bottom: 0; }
.section-link { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--pine); font-weight: 500; }
.section-link .icon { width: 16px; height: 16px; }

.empty { color: var(--faint); font-size: 14px; }
.note { padding: 12px 14px; border-radius: var(--r); background: var(--sunken); font-size: 13px; color: var(--ink-2); margin-bottom: 20px; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), opacity .15s;
  white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn:disabled, .btn.is-busy { opacity: .55; cursor: default; }
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-hover); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-quiet { border-color: var(--line-strong); color: var(--ink); background: var(--bg); }
.btn-quiet:hover { background: var(--sunken); }
.btn-ghost { color: var(--pine); padding: 0 10px; }
.btn-ghost:hover { background: var(--pine-soft); }
.btn-danger { color: var(--danger); border-color: var(--line-strong); background: var(--bg); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 12px; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-block { display: flex; width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }

.add-line {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 4px;
  border: 0;
  border-top: 1px dashed var(--line-strong);
  background: none;
  color: var(--pine);
  font-weight: 500;
  cursor: pointer;
}
.add-line .icon { width: 18px; height: 18px; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form { max-width: 560px; }
.field { margin-bottom: 22px; }
.label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.optional { margin-left: 6px; font-size: 12px; font-weight: 400; color: var(--faint); }
.help { margin-top: 6px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.field-error { margin-top: 6px; font-size: 13px; color: var(--danger); }

.input, .select, .textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--bg);
  font-size: 16px; /* iOS でフォーカス時に拡大されない最小サイズ */
  line-height: 1.5;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  appearance: none;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236a736e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--pine);
  box-shadow: 0 0 0 3px var(--pine-soft);
}
.input[type="time"], .input[type="date"], .input[type="month"] { font-family: var(--font-num); }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 48px; }
.input-suffix > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }

.check { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 24px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--pine); flex: none; }

.fieldset { margin: 32px 0 8px; padding-top: 24px; border-top: 1px solid var(--line); }
.legend { float: left; width: 100%; margin-bottom: 6px; font-size: 15px; font-weight: 700; }
.legend + * { clear: both; }
.fieldset > .help { margin: 0 0 20px; }

.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 32px; }

/* 活動区分などの選択チップ（ラジオボタン） */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: inline-flex; align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-2);
  background: var(--bg);
  transition: background-color .12s, color .12s, border-color .12s;
}
.choice input:checked + span { background: var(--pine); border-color: var(--pine); color: #fff; }
.choice input:focus-visible + span { outline: 2px solid var(--pine); outline-offset: 2px; }

/* ==========================================================================
   Rows（一覧）
   ========================================================================== */

.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 12px 0; }
.row-link { margin: 0 -8px; padding: 12px 8px; border-radius: var(--r-sm); }
.row-link:hover { background: var(--sunken); }
.row-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--sunken); color: var(--ink-2); flex: none; }
.row-icon .icon { width: 18px; height: 18px; }
.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 500; }
.row-sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { flex: none; font-size: 13px; color: var(--muted); text-align: right; }
.row-chevron { width: 18px; height: 18px; color: var(--faint); }

/* 月切り替え・集計 */
.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.month-nav-label { font-size: 17px; font-weight: 700; letter-spacing: .04em; }
.btn.is-disabled { opacity: .3; pointer-events: none; }
.summary { display: flex; gap: 32px; margin: 0 0 20px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary dt { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.summary dd { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.3; }
.summary dd .num { font-size: 22px; margin-right: 2px; }

/* 日付チップ（一覧の左端） */
.date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 40px; flex: none; line-height: 1.1; }
.date-chip-day { font-size: 20px; font-weight: 500; }
.date-chip-week { font-size: 11px; color: var(--muted); margin-top: 2px; }

.help-block { margin: -8px 0 22px; }
.danger-zone { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); }
.section + .danger-zone { margin-top: 0; }

.status-list { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-bottom: 12px; }
.status-list dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; letter-spacing: .06em; }
.status-list dd { margin: 0; }
.badge .icon { width: 12px; height: 12px; }
.section-spaced { margin-top: 40px; }

/* 通知履歴 */
.log-list > li + li { border-top: 1px solid var(--line); }
.log { padding: 4px 0; }
.log-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; cursor: pointer; list-style: none; }
.log-summary::-webkit-details-marker { display: none; }
.log-main { display: flex; flex-direction: column; min-width: 0; }
.log-title { font-weight: 500; }
.log-room { font-size: 12.5px; color: var(--muted); }
.log-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.log-time { font-size: 12px; color: var(--faint); }
.log-body { padding: 0 0 12px; }
.log-message {
  margin: 0 0 8px; padding: 12px 14px;
  border-radius: var(--r); background: var(--sunken);
  font-family: var(--font-sans); font-size: 13.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.log-retry { margin: 0 0 12px; }
.pager { display: flex; justify-content: space-between; margin-top: 20px; }

/* ==========================================================================
   Flash / Badge
   ========================================================================== */

.flash {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: var(--r);
  font-size: 14px;
  line-height: 1.6;
}
.flash-icon { width: 18px; height: 18px; margin-top: 2px; }
.flash-text { flex: 1; }
.flash-action { flex: none; margin: -3px -4px -3px 0; }
.flash-success { background: var(--live-soft); color: #14563a; }
.flash-info { background: var(--sunken); color: var(--ink-2); }
.flash-warning { background: var(--amber-soft); color: var(--amber); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash .btn-quiet { background: rgba(255, 255, 255, .7); border-color: transparent; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 500; letter-spacing: .04em;
  white-space: nowrap;
  background: var(--sunken); color: var(--muted);
}
.badge-live { background: var(--live-soft); color: var(--live); }
.badge-warn { background: var(--amber-soft); color: var(--amber); }
.badge-error { background: var(--danger-soft); color: var(--danger); }
.badge-pine { background: var(--pine-soft); color: var(--pine); }

/* ==========================================================================
   Dashboard
   ========================================================================== */

.today-head { margin: 4px 0 20px; }
.today-year { font-family: var(--font-num); font-size: 13px; color: var(--faint); letter-spacing: .1em; line-height: 1; margin-bottom: 8px; }
.today-date {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 30px; font-weight: 700; line-height: 1.2;
  letter-spacing: .02em;
  font-feature-settings: "palt";
}
.today-week { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: .06em; }

/* 稼働状態 */
.work { padding: 4px 0 28px; }
.work-status { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.work-working .work-status { color: var(--live); }
.work-working .status-dot { background: var(--live); box-shadow: 0 0 0 4px var(--live-soft); }
.work-done .status-dot { background: var(--pine); }
.work-stale .work-status { color: var(--amber); }
.work-stale .status-dot { background: var(--amber); }
.work-clock { margin: 10px 0 0; font-size: 60px; font-weight: 400; line-height: 1.1; letter-spacing: -.02em; }
.work-clock.is-idle { color: var(--line-strong); }
.work-sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.work-stale { margin: 12px 0 16px; color: var(--ink-2); font-size: 15px; }
.work-history-link { margin-top: 14px; }

/* 1日の目盛り：6〜22時の帯に稼働時間を描く */
.dayline { margin-top: 24px; }
.dayline-track {
  --hours: 16;
  position: relative;
  height: 12px;
  border-radius: 3px;
  background-color: var(--sunken);
  /* 1時間ごとの細い目盛り */
  background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(100% / var(--hours) - 1px), var(--bg) calc(100% / var(--hours) - 1px), var(--bg) calc(100% / var(--hours)));
}
.dayline-bar { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--pine); }
.dayline-bar.is-open { background: var(--live); }
.dayline-now { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); }
.dayline-scale {
  position: relative;
  display: flex; justify-content: space-between;
  height: 18px; margin-top: 6px;
  font-family: var(--font-num); font-size: 11px; color: var(--faint);
}
.dayline-scale.is-positioned { display: block; }
.dayline-scale.is-positioned span { position: absolute; top: 0; transform: translateX(-50%); }

.flash-link { text-decoration: none; }

/* ホームの日報・移動の要約 */
.brief-item { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; }
.brief-tag { flex: none; min-width: 4.5em; font-size: 12.5px; font-weight: 700; color: var(--pine); letter-spacing: .04em; }
.brief-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.add-line-solo { border-top: 0; padding: 0; min-height: 44px; text-decoration: none; }
.inline-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding: 8px 8px 8px 12px;
  border-radius: var(--r); background: var(--amber-soft); color: var(--amber); font-size: 13.5px;
}
.inline-alert span { display: inline-flex; align-items: center; gap: 6px; }
.inline-alert .icon { width: 16px; height: 16px; }

/* 主操作の固定ドック（スマートフォン） */
.dock {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 25;
  padding: 12px var(--gutter);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--line);
}
.dock-inner { max-width: var(--content); margin: 0 auto; }
@media (min-width: 960px) {
  .dock { position: static; padding: 0; border: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; margin-top: 20px; }
  .dock-inner { max-width: 320px; margin: 0; }
}

/* ==========================================================================
   日報フォーム
   ========================================================================== */

.report-date { max-width: 220px; }
.activity-list { counter-reset: none; }
.activity { padding: 18px 0 22px; border-top: 1px solid var(--line); }
.activity:first-child { border-top: 0; padding-top: 4px; }
.activity-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.activity-no {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--sunken);
  color: var(--muted);
  font-size: 13px;
}
.activity-tools { display: flex; gap: 2px; margin-right: -8px; }
.activity-tools .btn-icon { width: 36px; min-height: 36px; color: var(--muted); }
.activity-tools .btn-icon:disabled { opacity: .25; }
.activity-tools .icon { width: 18px; height: 18px; }
.activity-remove:hover { color: var(--danger); background: var(--danger-soft); }
.activity .choices { margin-bottom: 12px; }
.activity-content { min-height: 76px; }
.activity:has(.field-error) .activity-content, .field:has(.field-error) .input { border-color: var(--danger); }

.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.suggest-label { width: 100%; font-size: 11.5px; color: var(--faint); letter-spacing: .06em; }
.suggest-chip {
  max-width: 100%;
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--sunken);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
  cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggest-chip:hover { background: var(--pine-soft); color: var(--pine); }

.share-url {
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--sunken);
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 12px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.status-line { margin: 0 0 12px; }
.btn-row form { display: contents; }
.row-top { align-items: flex-start; }
.row-top .date-chip { padding-top: 2px; }
.row-top .row-meta, .row-top .row-chevron { margin-top: 4px; }
.list-foot { margin-top: 20px; }

/* ==========================================================================
   移動記録
   ========================================================================== */

.field-narrow { max-width: 220px; }
.route { position: relative; }
.route-point { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 10px 0; }
/* 地点同士を縦線でつなぐ */
.route-point + .route-point::before {
  content: "";
  position: absolute;
  left: 13px; top: -14px; height: 26px;
  border-left: 2px dotted var(--line-strong);
}
.route-marker {
  position: relative; z-index: 1;
  display: grid; place-items: center;
  width: 28px; height: 28px; flex: none;
  border-radius: 50%;
  border: 2px solid var(--pine);
  background: var(--bg);
  color: var(--pine);
  font-size: 13px; font-weight: 500;
}
.route-marker.is-start, .route-marker.is-end { background: var(--pine); color: #fff; }
.route-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding-top: 2px; }
.route-name { font-weight: 500; line-height: 1.5; }
.route-address { font-size: 12.5px; color: var(--muted); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-leg { font-size: 12px; color: var(--pine); margin-top: 2px; }
.route-tools { display: flex; gap: 0; margin-right: -8px; }
.route-tools .btn-icon { width: 34px; min-height: 34px; color: var(--muted); }
.route-tools .btn-icon:disabled { opacity: .25; }
.route-tools .icon { width: 17px; height: 17px; }
.route-empty { padding: 8px 0; }

.picker { margin: 4px 0 28px; padding: 16px; border-radius: var(--r-lg); background: var(--sunken); }
.picker-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.chip .icon { width: 16px; height: 16px; color: var(--pine); }
.chip:active { background: var(--pine-soft); }
.picker-help { margin: 0 0 12px; }
.text-link { color: var(--pine); text-decoration: underline; text-underline-offset: 3px; }
.search-row { display: flex; gap: 8px; }
.search-row .input { flex: 1; }
.search-row .btn { flex: none; width: 52px; min-height: 48px; padding: 0; }
.search-results { margin-top: 8px; }
.search-results:empty { display: none; }
.search-result {
  display: flex; flex-direction: column; align-items: flex-start;
  width: 100%; padding: 10px 12px;
  border: 0; border-radius: var(--r-sm);
  background: none; text-align: left; cursor: pointer;
}
.search-result:hover, .search-result:focus-visible { background: var(--bg); }
.search-result-name { font-weight: 500; }
.search-result-address { font-size: 12.5px; color: var(--muted); }
.search-message { padding: 10px 12px; font-size: 13.5px; color: var(--muted); }
.search-message.is-error { color: var(--danger); }
.attribution { margin-top: 6px; text-align: right; font-size: 11px; color: var(--faint); }

.distance { margin-bottom: 24px; padding: 4px 0 20px; border-bottom: 1px solid var(--line); }
.distance-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.distance-value { font-size: 40px; line-height: 1.2; margin-top: 4px; }

.selected-place { display: flex; gap: 10px; margin-top: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--pine-soft); color: var(--pine); }
.selected-place .icon { margin-top: 3px; }
.selected-place-name { font-weight: 500; color: var(--ink); }
.selected-place-address { font-size: 12.5px; color: var(--ink-2); }

.route-line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta .badge { display: flex; margin-top: 4px; }
.section-meta { font-size: 14px; color: var(--ink-2); }
.brief-link { justify-content: space-between; }
.brief-num { flex: none; font-size: 14px; color: var(--ink-2); }

/* ==========================================================================
   月報
   ========================================================================== */

.summary { flex-wrap: wrap; }
.monthly-actions { margin-bottom: 12px; }
.missing-days { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
.monthly { margin-top: 12px; }
.monthly-day { padding: 22px 0; border-top: 1px solid var(--line); }
.monthly-day-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.monthly-date { font-size: 17px; font-weight: 700; letter-spacing: .02em; }
.monthly-week { font-size: 14px; font-weight: 500; color: var(--muted); }
.monthly-category { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-top: 6px; }
.monthly-content { line-height: 1.8; }
.monthly-meta { display: flex; gap: 16px; margin-top: 10px; font-size: 12.5px; color: var(--faint); }

.var-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.var { padding: 3px 8px; border-radius: 6px; background: var(--sunken); font-family: var(--font-num); font-size: 12.5px; color: var(--ink-2); }
.section-spaced-sm { margin-top: 16px; }
.input-file { padding: 10px; min-height: auto; font-size: 14px; }

/* ==========================================================================
   職員向け共有ページ
   ========================================================================== */

.share-body { background: var(--bg); }
.share { max-width: 640px; margin: 0 auto; padding: 48px var(--gutter) 64px; }
.share-head { padding-bottom: 24px; margin-bottom: 8px; border-bottom: 2px solid var(--ink); }
.share-kicker { font-size: 12.5px; font-weight: 700; color: var(--pine); letter-spacing: .1em; margin-bottom: 10px; }
.share-date { font-size: 26px; font-weight: 700; line-height: 1.35; letter-spacing: .02em; font-feature-settings: "palt"; }
.share-week { font-size: 17px; font-weight: 500; color: var(--muted); }
.share-author { margin-top: 6px; color: var(--muted); font-size: 14px; }
.share-item { padding: 22px 0; border-bottom: 1px solid var(--line); }
.share-category {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 10px;
  border-radius: var(--r-sm);
  background: var(--pine-soft);
  color: var(--pine);
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
}
.share-content { font-size: 16px; line-height: 1.85; }
.share-foot { margin-top: 28px; font-size: 12px; color: var(--faint); }

@media print {
  .share { padding: 0; }
}

/* ==========================================================================
   Auth / Plain
   ========================================================================== */

.auth-body { background: var(--sunken); }
.auth {
  max-width: 400px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 12vh) var(--gutter) 48px;
}
.auth-brand { display: flex; align-items: baseline; gap: 8px; margin-bottom: 36px; }
.auth-brand .brand-mark { font-size: 20px; }
.auth-brand .brand-name { font-size: 17px; }
.auth-title { font-size: 20px; font-weight: 700; margin-bottom: 24px; letter-spacing: .04em; }
.auth-form .muted { font-size: 14px; margin: -12px 0 20px; }
.auth-form .input { background: var(--bg); }

.plain-body { background: var(--bg); }
.plain { max-width: 480px; margin: 0 auto; padding: 18vh var(--gutter) 48px; }
.plain-code { font-family: var(--font-num); font-size: 13px; color: var(--faint); letter-spacing: .12em; margin-bottom: 12px; }
.plain-title { font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.plain-message { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

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