/* ===== テーマ変数（ライト） ===== */
:root {
  --bg: #eef1f6;
  --bg-2: #e6eaf2;
  --card: #ffffff;
  --line: #e5e9f0;
  --line-soft: #eef1f6;
  --ink: #0f172a;
  --ink-2: #334155;
  --sub: #64748b;
  --accent: #4f46e5;
  --accent-ink: #4338ca;
  --accent-soft: #eef0ff;
  --teal: #0d9488;
  --teal-soft: #e6f6f3;
  --teal-line: #b8e4dc;
  --warn: #b45309;
  --warn-soft: #fdf6ec;
  --warn-line: #f0e2c8;
  --warn-bar: #e2b878;
  --head-1: #312e81;
  --head-2: #3730a3;
  --head-3: #1d4ed8;
  --head-ink: #ffffff;
  --head-sub: #e0e7ff;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
  --shadow-map: 0 4px 12px rgba(79,70,229,.28);
  --sel: #eef0ff;
  --radius: 16px;
}

/* ===== テーマ変数（ダーク：OS自動追従） ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-2: #0e1626;
    --card: #161f31;
    --line: #26314a;
    --line-soft: #1b2537;
    --ink: #e8edf6;
    --ink-2: #c3cddf;
    --sub: #8794ac;
    --accent: #818cf8;
    --accent-ink: #a5b0ff;
    --accent-soft: #232a48;
    --teal: #2dd4bf;
    --teal-soft: #13322e;
    --teal-line: #1f5049;
    --warn: #e0a45c;
    --warn-soft: #2a2213;
    --warn-line: #4a3a1c;
    --warn-bar: #a9803f;
    --head-1: #1e1b4b;
    --head-2: #262254;
    --head-3: #1e3a8a;
    --head-ink: #eef1ff;
    --head-sub: #b9c2f0;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px rgba(0,0,0,.35);
    --shadow-map: 0 4px 14px rgba(129,140,248,.3);
    --sel: #202a45;
  }
}

/* ===== 手動トグル（自動より優先） ===== */
:root[data-theme="light"] {
  --bg: #eef1f6; --bg-2: #e6eaf2; --card: #ffffff; --line: #e5e9f0; --line-soft: #eef1f6;
  --ink: #0f172a; --ink-2: #334155; --sub: #64748b;
  --accent: #4f46e5; --accent-ink: #4338ca; --accent-soft: #eef0ff;
  --teal: #0d9488; --teal-soft: #e6f6f3; --teal-line: #b8e4dc;
  --warn: #b45309; --warn-soft: #fdf6ec; --warn-line: #f0e2c8; --warn-bar: #e2b878;
  --head-1: #312e81; --head-2: #3730a3; --head-3: #1d4ed8; --head-ink: #fff; --head-sub: #e0e7ff;
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 16px rgba(15,23,42,.06);
  --shadow-map: 0 4px 12px rgba(79,70,229,.28); --sel: #eef0ff;
}
:root[data-theme="dark"] {
  --bg: #0b1120; --bg-2: #0e1626; --card: #161f31; --line: #26314a; --line-soft: #1b2537;
  --ink: #e8edf6; --ink-2: #c3cddf; --sub: #8794ac;
  --accent: #818cf8; --accent-ink: #a5b0ff; --accent-soft: #232a48;
  --teal: #2dd4bf; --teal-soft: #13322e; --teal-line: #1f5049;
  --warn: #e0a45c; --warn-soft: #2a2213; --warn-line: #4a3a1c; --warn-bar: #a9803f;
  --head-1: #1e1b4b; --head-2: #262254; --head-3: #1e3a8a; --head-ink: #eef1ff; --head-sub: #b9c2f0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px rgba(0,0,0,.35);
  --shadow-map: 0 4px 14px rgba(129,140,248,.3); --sel: #202a45;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  letter-spacing: .01em;
}

/* ===== 全体レイアウト ===== */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
}
.sidebar { display: none; }   /* 狭い画面では隠す */
.main {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
}

/* ===== ヘッダー ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top) + 14px) 14px 16px;
  background: linear-gradient(135deg, var(--head-1) 0%, var(--head-2) 45%, var(--head-3) 100%);
  color: var(--head-ink);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.topbar .nav {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  font-size: 18px;
  border: none;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
  color: var(--head-ink);
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.topbar .nav:active { background: rgba(255,255,255,.3); transform: scale(.94); }
.topbar .nav:disabled { opacity: .28; }
.topbar .nav.theme { font-size: 19px; }
.daytitle { flex: 1 1 auto; text-align: center; line-height: 1.15; min-width: 0; }
.daytitle .date {
  font-size: 26px; font-weight: 800; letter-spacing: .02em; font-variant-numeric: tabular-nums;
}
.daytitle .sub {
  display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600;
  color: var(--head-sub); background: rgba(255,255,255,.14);
  padding: 3px 10px; border-radius: 999px;
}

/* ===== アクションバー ===== */
.actionbar {
  flex: 0 0 auto;
  display: flex; gap: 8px; padding: 10px 14px 6px;
  background: var(--bg); overflow-x: auto;
}
.actionbar .act {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .1s;
}
.actionbar .act:active { transform: scale(.96); }

/* ===== 本文 ===== */
.dayview {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 14px calc(env(safe-area-inset-bottom) + 16px);
}
.dayview.turn { animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.loading { text-align: center; color: var(--sub); margin-top: 48px; font-size: 14px; }

.travel-group {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px 4px; box-shadow: var(--shadow); margin-bottom: 4px;
}
.leg {
  display: flex; align-items: center; gap: 10px; font-size: 14.5px;
  color: var(--ink-2); font-weight: 600; padding: 8px 12px; font-variant-numeric: tabular-nums;
}
.leg + .leg { border-top: 1px dashed var(--line); }
.leg .ico { flex: 0 0 auto; color: var(--teal); display: inline-flex; }
.leg .ico svg { width: 18px; height: 18px; }

.sec-label {
  font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--sub);
  text-transform: uppercase; margin: 18px 4px 8px;
}

.visit {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin: 10px 0;
  box-shadow: var(--shadow); overflow: hidden;
}
.visit::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent);
}
.visit.unmatched::before { background: var(--warn-bar); }
.visit.unmatched { background: var(--warn-soft); }
.visit .row1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.visit .apo {
  flex: 0 0 auto; font-size: 14px; font-weight: 800; color: var(--accent-ink);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 999px;
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.visit .school { flex: 1 1 auto; font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--ink); min-width: 0; }
.visit .teacher { font-size: 13px; color: var(--sub); margin-top: 8px; white-space: pre-line; line-height: 1.5; }
.visit .addr {
  display: flex; align-items: flex-start; gap: 6px; font-size: 13px;
  color: var(--ink-2); margin-top: 10px; line-height: 1.5;
}
.visit .addr .ico { flex: 0 0 auto; color: var(--accent); margin-top: 1px; }
.visit .addr .ico svg { width: 15px; height: 15px; }

.badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--warn);
  background: var(--card); border: 1px solid var(--warn-bar); border-radius: 6px;
  padding: 1px 6px; margin-left: 6px; vertical-align: middle;
}

.actions { display: flex; gap: 8px; margin-top: 14px; }
.actions a, .actions button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; font-size: 13.5px; font-weight: 700; padding: 11px 10px;
  border-radius: 11px; transition: transform .1s, filter .15s; min-height: 44px;
  border: none; cursor: pointer; font-family: inherit;
}
.actions a svg, .actions button svg { width: 16px; height: 16px; }
.actions a:active, .actions button:active { transform: scale(.97); filter: brightness(.96); }
.actions .map-toggle { flex: 1 1 auto; background: var(--accent); color: #fff; box-shadow: var(--shadow-map); }
.actions .map-toggle svg:last-child { width: 14px; height: 14px; transition: transform .2s; opacity: .85; }
.actions .map-toggle.on svg:last-child { transform: rotate(180deg); }
.actions a.open { flex: 0 0 auto; background: var(--accent-soft); color: var(--accent-ink); }
.actions a.tel { flex: 0 0 auto; background: var(--teal-soft); color: var(--teal); border: 1px solid var(--teal-line); }

/* 地図プレビュー */
.map-embed { max-height: 0; overflow: hidden; border-radius: 12px; transition: max-height .28s ease; margin-top: 0; }
.map-embed.open { max-height: 260px; margin-top: 12px; }
.map-embed iframe { width: 100%; height: 240px; border: 0; border-radius: 12px; display: block; }

.memo {
  display: flex; gap: 8px; background: var(--warn-soft); border: 1px solid var(--warn-line);
  border-radius: 12px; padding: 11px 13px; font-size: 13px; color: var(--warn);
  margin-top: 14px; white-space: pre-line; line-height: 1.55;
}
.memo .ico { flex: 0 0 auto; color: var(--warn); }
.memo .ico svg { width: 16px; height: 16px; }

/* ===== フッター ===== */
.bottombar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(env(safe-area-inset-bottom) + 10px);
  background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.05);
}
.sortlabel { font-size: 12px; color: var(--sub); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.sortlabel select {
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  -webkit-appearance: none; appearance: none;
}
.counter {
  font-size: 12.5px; color: var(--sub); font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--line-soft); padding: 5px 11px; border-radius: 999px;
}

/* ===== サイドバー（iPad/PC横幅で登場） ===== */
.sidebar-head {
  padding: calc(env(safe-area-inset-top) + 18px) 16px 12px;
  border-bottom: 1px solid var(--line);
}
.sidebar-head .brand { font-size: 16px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.daylist { list-style: none; margin: 0; padding: 8px; overflow-y: auto; flex: 1 1 auto; }
.day-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 3px 0;
  border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: background .12s;
}
.day-item:hover { background: var(--bg-2); }
.day-item.active { background: var(--sel); border-color: var(--accent); }
.day-item .di-date {
  flex: 0 0 auto; width: 52px; text-align: center; font-weight: 800; font-size: 15px;
  color: var(--accent-ink); font-variant-numeric: tabular-nums; line-height: 1.1;
}
.day-item .di-date small { display: block; font-size: 10px; color: var(--sub); font-weight: 700; }
.day-item .di-body { flex: 1 1 auto; min-width: 0; }
.day-item .di-place { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.day-item .di-count { font-size: 11.5px; color: var(--sub); margin-top: 2px; }
.day-item.today .di-date { color: var(--teal); }
.day-item.today::after { content: "本日"; margin-left: auto; font-size: 10px; font-weight: 700; color: #fff; background: var(--teal); padding: 1px 6px; border-radius: 999px; }

/* ===== カレンダー ===== */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,23,42,.5); backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
}
.overlay.hidden { display: none; }
.cal-panel {
  width: 100%; max-width: 560px; max-height: 82vh;
  background: var(--bg); border-radius: 20px 20px 0 0;
  display: flex; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0,0,0,.3); animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
}
.cal-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.cal-close {
  width: 36px; height: 36px; border: none; border-radius: 10px;
  background: var(--card); color: var(--sub); font-size: 16px; cursor: pointer; box-shadow: var(--shadow);
}
.cal-body { overflow-y: auto; padding: 8px 14px calc(env(safe-area-inset-bottom) + 20px); }
.cal-month { margin: 14px 0; }
.cal-mtitle { font-size: 14px; font-weight: 800; color: var(--ink); margin: 0 4px 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 700; color: var(--sub); padding: 2px 0; }
.cal-cell {
  position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2); border-radius: 10px;
}
.cal-cell.empty { visibility: hidden; }
.cal-cell.has { background: var(--accent-soft); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.cal-cell.has:active { transform: scale(.94); }
.cal-cell.today { outline: 2px solid var(--teal); }
.cal-dot { position: absolute; bottom: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }

/* ===== トースト ===== */
#toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%) translateY(20px);
  background: #0f172a; color: #fff; font-size: 13px; font-weight: 600;
  padding: 11px 18px; border-radius: 999px; z-index: 200; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: 86vw; text-align: center;
}
#toast.show { opacity: .96; transform: translateX(-50%) translateY(0); }

/* ===== 編集モード（訪問の編集フォーム） ===== */
.actionbar .act.edit { color: var(--accent-ink); background: var(--accent-soft); border-color: transparent; }
.actionbar .act:disabled { opacity: .4; cursor: default; box-shadow: none; }

.edit-bar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--bg); padding: 4px 0 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.edit-bar .edit-note { font-size: 13px; font-weight: 800; color: var(--ink); }
.edit-actions { display: flex; gap: 8px; }
.btn-save, .btn-cancel, .btn-add {
  font-family: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer;
  border-radius: 11px; padding: 10px 16px; min-height: 44px; border: 1px solid transparent;
  transition: transform .1s, filter .15s;
}
.btn-save:active, .btn-cancel:active, .btn-add:active { transform: scale(.97); filter: brightness(.97); }
.btn-save { background: var(--accent); color: #fff; box-shadow: var(--shadow-map); }
.btn-save:disabled { opacity: .6; cursor: default; }
.btn-cancel { background: var(--card); color: var(--ink-2); border-color: var(--line); }
.edit-hint {
  font-size: 12.5px; color: var(--sub); line-height: 1.5;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin: 10px 0;
}

.edit-visits { display: flex; flex-direction: column; gap: 12px; }
.edit-visit {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.edit-visit::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  border-radius: var(--radius) 0 0 var(--radius); background: var(--accent);
}
.ev-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.ev-field:last-of-type { margin-bottom: 0; }
.ev-field label { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--sub); }
.ev-2col { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; margin-bottom: 12px; }
.ev-2col .ev-field { margin-bottom: 0; }
.edit-visit input,
.edit-visit select,
.edit-visit textarea {
  width: 100%; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; -webkit-appearance: none; appearance: none;
}
.edit-visit textarea { resize: vertical; line-height: 1.5; min-height: 44px; }
.edit-visit input:focus,
.edit-visit select:focus,
.edit-visit textarea:focus { outline: none; border-color: var(--accent); background: var(--card); }
.ev-school-free { margin-top: 8px; }
.ev-del {
  margin-top: 14px; font-family: inherit; font-size: 12.5px; font-weight: 700;
  color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-line);
  border-radius: 10px; padding: 8px 14px; cursor: pointer; min-height: 40px;
}
.ev-del:active { transform: scale(.97); }
.btn-add {
  width: 100%; margin-top: 14px; background: var(--card);
  border: 1px dashed var(--accent); color: var(--accent-ink);
}
.btn-add.small { margin-top: 10px; padding: 9px 14px; min-height: 40px; font-size: 13px; }

.edit-sec-label {
  font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--sub);
  text-transform: uppercase; margin: 22px 4px 8px;
}

/* 交通の1行 */
.edit-legs { display: flex; flex-direction: column; gap: 10px; }
.edit-leg.raw { display: flex; align-items: center; gap: 8px; }
.edit-leg .el-text {
  flex: 1 1 auto; font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; font-variant-numeric: tabular-nums;
}
.edit-leg input:focus { outline: none; border-color: var(--accent); }
.edit-leg .el-del {
  flex: 0 0 auto; width: 40px; height: 40px; font-size: 14px; cursor: pointer;
  color: var(--warn); background: var(--warn-soft);
  border: 1px solid var(--warn-line); border-radius: 10px;
}
.edit-leg .el-del:active { transform: scale(.95); }

/* 交通：構造化行（出発地/時刻 → 到着地/時刻） */
.edit-leg.structured {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
}
.leg-pt { display: flex; align-items: center; gap: 8px; }
.leg-pt .combo { flex: 1 1 auto; min-width: 0; }
.leg-pt .lg-dep, .leg-pt .lg-arr {
  flex: 0 0 auto; width: 150px; font-variant-numeric: tabular-nums;
}
.edit-leg.structured input {
  font-family: inherit; font-size: 15px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px;
}
.leg-mid { align-self: center; color: var(--sub); font-weight: 800; font-size: 13px; line-height: 1; }

/* 交通：地名の絞り込みpulldown（入力欄の直下に重ねて表示） */
.combo { position: relative; }
.combo .combo-input { width: 100%; }
.combo-menu {
  position: absolute; top: calc(100% + 6px); left: 0; width: 100%; min-width: 200px;
  z-index: 50; max-height: 300px; overflow-y: auto;
  background: var(--card); border: 1.5px solid var(--accent); border-radius: 12px;
  box-shadow: var(--shadow); padding: 4px;
}
.combo-menu.hidden { display: none; }
.combo-empty { padding: 14px; text-align: center; color: var(--sub); font-size: 14px; }
.combo-group {
  position: sticky; top: 0; z-index: 1; background: var(--card);
  font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--sub);
  padding: 9px 10px 5px; margin-top: 2px; border-bottom: 1px solid var(--line-soft);
}
.combo-group:first-child { margin-top: 0; }
.combo-item {
  padding: 10px 12px; font-size: 15px; color: var(--ink);
  border-radius: 8px; cursor: pointer;
}
.combo-item:hover, .combo-item.on { background: var(--accent-soft); color: var(--accent-ink); }

/* 備考テキストエリア */
.edit-note-area {
  width: 100%; font-family: inherit; font-size: 15px; line-height: 1.55; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; resize: vertical; min-height: 88px;
}
.edit-note-area:focus { outline: none; border-color: var(--accent); }

/* 訪問カードの「今回のメモ」表示 */
.visit .vmemo {
  display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--ink-2);
  background: var(--line-soft); border-radius: 10px; padding: 8px 10px;
  margin-top: 10px; line-height: 1.5; white-space: pre-line;
}
.visit .vmemo .ico { flex: 0 0 auto; color: var(--sub); margin-top: 1px; }
.visit .vmemo .ico svg { width: 15px; height: 15px; }

/* ===== ワイド（iPad横・PC）：2ペイン ===== */
@media (min-width: 860px) {
  #app { flex-direction: row; }
  .sidebar {
    display: flex; flex-direction: column;
    flex: 0 0 300px; width: 300px; height: 100%;
    background: var(--bg-2); border-right: 1px solid var(--line);
  }
  .main { max-width: none; flex: 1 1 auto; }
  .topbar { border-radius: 0; }
  .dayview { padding: 22px clamp(16px, 4vw, 48px) 28px; }
  /* 訪問先を2列に */
  .visits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .visits-grid .visit { margin: 0; }
  .travel-group, .sec-label, .memo { max-width: 100%; }
  .prevBtn, .nav { }
}

/* さらに広い画面：中央に寄せて読みやすく */
@media (min-width: 1280px) {
  .main > .topbar, .main > .bottombar { }
  .dayview { padding: 24px clamp(24px, 6vw, 90px) 32px; }
}
