/* ===== こちら事務局 — 出欠・配車 UIプロトタイプ v0.2 =====
   Fonts : 日本語 BIZ UDPGothic / 数字 DM Sans / 欧文 Oswald
   Tone  : ミニマル。紙のようなオフホワイトに墨色、差し色は深いティール＋クレイ */
@import url('https://fonts.googleapis.com/css2?family=BIZ+UDPGothic:wght@400;700&family=DM+Sans:wght@400;500;600;700&family=Oswald:wght@400;500;600&display=swap');

:root {
  --ink: #1e1f22;
  --ink-2: #4b4d52;
  --muted: #8a8c91;
  --paper: #f6f4ef;
  --panel: #ffffff;
  --line: #dcd7cd;
  --line-strong: #b9b2a3;
  --teal: #0f7f77;
  --teal-dark: #0b5f59;
  --teal-soft: #d2ebe8;
  --clay: #e2552a;
  --clay-soft: #f9d9cc;
  --ok: #b6e6c3;   --ok-ink: #146b3a;
  --maybe: #f7de85; --maybe-ink: #7a5200;
  --ng: #f4b8ad; --ng-ink: #a82a1c;
  --ff-jp: "BIZ UDPGothic", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --ff-num: "DM Sans", system-ui, sans-serif;
  --ff-en: "Oswald", "DM Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ff-jp);
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  font-feature-settings: "palt";
}
a { color: var(--teal); }
button, input, select, textarea { font: inherit; color: inherit; }
.num, time, .count, .stat b, .pager button, .seats, .trip-date, table.list td:first-child { font-family: var(--ff-num); font-variant-numeric: tabular-nums; }
.en { font-family: var(--ff-en); letter-spacing: .06em; text-transform: uppercase; }

/* ---- ヘッダー ---- */
.app-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.app-header .brand { font-weight: 700; font-size: 14px; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.app-header .brand .ball { flex: 0 0 auto; display: block; }
.app-header .brand small { font-family: var(--ff-en); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.app-header nav a { font-size: 13px; margin-left: 16px; text-decoration: none; color: var(--ink-2); padding-bottom: 3px; }
.app-header nav a.active { color: var(--ink); border-bottom: 2px solid var(--clay); }

main.container { padding: 18px 16px 30px; max-width: 980px; margin: 0 auto; }
h1 { font-size: 22px; margin: 6px 0 14px; font-weight: 700; letter-spacing: .02em; }
h2 { font-size: 13px; margin: 26px 0 10px; font-family: var(--ff-en); font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.muted { color: var(--muted); font-size: 13px; }
.note { font-size: 13px; color: var(--ink-2); margin: 6px 0; }

/* ---- ボタン ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; border: none; line-height: 1;
  padding: 0 24px; height: 46px; font-weight: 700; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--ink); color: #fff; font-size: 15px; transition: background .15s, transform .05s;
}
.btn:hover { background: #000; }
.btn:active { transform: translateY(1px); }
.btn.block { display: flex; width: 100%; }
.btn.small { padding: 0 16px; height: 38px; font-size: 13px; }
.btn.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: #fff; }
.btn.danger { background: var(--clay); }
.btn.outline { background: #fff; color: var(--teal); border: 1px solid var(--teal); }
.link-btn { background: none; border: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px 14px; font-size: 14px; }
.actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.actions .link-btn { height: 46px; }
.actions .btn { flex: 1 1 200px; }

/* ---- カード ---- */
.card { background: var(--panel); border: 1px solid var(--line); padding: 16px; margin-bottom: 12px; }
.card.link { display: block; text-decoration: none; color: inherit; transition: border-color .15s; }
.card.link:hover { border-color: var(--ink); }
.trip-date { font-weight: 600; color: var(--ink-2); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trip-title { font-size: 17px; font-weight: 700; margin: 4px 0 2px; }
.trip-meta { font-size: 13px; color: var(--ink-2); }
.badge { display: inline-block; white-space: nowrap; font-family: var(--ff-en); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 2px 9px; background: #ecebe6; color: var(--ink-2); vertical-align: middle; }
.badge.official { background: var(--clay-soft); color: #8a3f1f; }
.badge.practice { background: var(--teal-soft); color: var(--teal-dark); }
.badge.event { background: #dcd4f2; color: #4a3390; }

/* ---- 伝助風 出欠テーブル ---- */
.scroll-hint { font-size: 12px; color: var(--muted); margin: 10px 0 6px; }
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--clay);
}
table.att { border-collapse: separate; border-spacing: 0; min-width: 100%; white-space: nowrap; }
table.att th, table.att td {
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  text-align: center; padding: 8px 6px; height: 48px; font-size: 15px;
}
table.att thead th { background: var(--panel); font-weight: 400; position: sticky; top: 0; }
table.att th.row-head {
  position: sticky; left: 0; z-index: 3; background: var(--panel); text-align: left;
  min-width: 80px; font-weight: 700; font-size: 13px; padding-left: 12px; color: var(--ink-2);
}
table.att tbody tr:nth-child(odd) td, table.att tbody tr:nth-child(odd) th.row-head { background: #faf9f6; }
table.att th.count { min-width: 44px; font-family: var(--ff-num); color: var(--muted); font-size: 13px; }
table.att td.count { font-weight: 500; color: var(--ink-2); }
table.att td.count.hl { background: #ffe680 !important; color: var(--clay); font-weight: 700; }
table.att th.name a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; padding: 4px 6px; display: inline-block; font-weight: 700; }
table.att th.name a:hover { color: var(--teal); text-decoration-color: var(--teal); }
table.att th.name .sub { display: block; font-size: 10px; color: var(--muted); }
table.att td.v { min-width: 56px; font-family: var(--ff-num); }
table.att td.v.ok { background: var(--ok) !important; color: var(--ok-ink); }
table.att td.v.maybe { background: var(--maybe) !important; color: var(--maybe-ink); }
table.att td.v.ng { background: var(--ng) !important; color: var(--ng-ink); }
table.att td.v.na { color: #d8d5cd; }
table.att td.v:not(.ok):not(.maybe):not(.ng) { color: #c9c5bc; }
.add-row { background: var(--panel); border: 1px solid var(--line); border-top: none; padding: 12px 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-row label { font-size: 13px; color: var(--ink-2); }
.add-row input { flex: 1 1 160px; padding: 11px 12px; border: 1px solid var(--line-strong); font-size: 16px; min-width: 0; background: var(--paper); }
.comments { margin-top: 18px; }
.comments h3 { font-size: 13px; margin: 6px 0; color: var(--ink-2); font-weight: 700; }
.comments ul { padding-left: 0; list-style: none; margin: 0; }
.comments li { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.comments li a { color: var(--ink); font-weight: 700; text-decoration: none; }
.comments time { color: var(--muted); margin-left: 8px; font-size: 12px; }

/* ---- 予定登録フォーム ---- */
.bulk { position: relative; display: inline-block; margin-bottom: 12px; }
.bulk > button { background: transparent; border: 1px solid var(--line-strong); padding: 6px 14px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.bulk-menu { position: absolute; top: 110%; left: 0; background: #fff; border: 1px solid var(--line); z-index: 5; display: none; min-width: 180px; box-shadow: 0 10px 30px rgba(30,31,34,.12); overflow: hidden; }
.bulk-menu.open { display: block; }
.bulk-menu button { display: block; width: 100%; text-align: left; background: none; border: none; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); font-size: 14px; }
.bulk-menu button:last-child { border-bottom: none; }
.bulk-menu button:hover { background: var(--paper); }
table.entry { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--clay); overflow: hidden; }
table.entry th, table.entry td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
table.entry tr:last-child th, table.entry tr:last-child td { border-bottom: none; }
table.entry th { width: 27%; font-weight: 700; font-size: 13px; color: var(--ink-2); border-right: 1px solid var(--line); }
table.entry tbody tr:nth-child(odd) th, table.entry tbody tr:nth-child(odd) td { background: #faf9f6; }
table.entry .name-cell { text-align: center; }
table.entry .name-cell input { width: 60%; min-width: 180px; font-size: 22px; font-weight: 700; padding: 8px; text-align: center; border: 1px solid var(--line-strong); background: var(--paper); }
.choice { display: flex; gap: 8px; }
.choice button {
  width: 52px; height: 46px; border: 1px solid var(--line-strong);
  background: #fff; font-size: 20px; cursor: pointer; color: var(--ink-2); font-family: var(--ff-num); transition: all .12s;
}
.choice button:hover { border-color: var(--ink); }
.choice button.sel-ok { background: var(--ok); border: 2px solid var(--ok-ink); color: var(--ok-ink); font-weight: 700; }
.choice button.sel-maybe { background: var(--maybe); border: 2px solid var(--maybe-ink); color: var(--maybe-ink); font-weight: 700; }
.choice button.sel-ng { background: var(--ng); border: 2px solid var(--ng-ink); color: var(--ng-ink); font-weight: 700; }
.form-row { margin: 8px 0; }
.form-row label { display: block; font-size: 12px; margin-bottom: 3px; color: var(--ink-2); font-weight: 700; letter-spacing: .04em; }
.form-row input[type=text], .form-row input[type=date], .form-row input[type=time], .form-row input[type=number],
.form-row input[type=password], .form-row select, .form-row textarea, .form-row .dp-btn {
  width: 100%; padding: 0 12px; border: 1px solid var(--line-strong); font-size: 15px; background: #fff; height: 40px; line-height: normal;
  -webkit-appearance: none; appearance: none;
}
.form-row .dp-btn { display: flex; align-items: center; line-height: 1; }
.form-row select { padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b4d52' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.form-row input[type=time]::-webkit-calendar-picker-indicator { opacity: .6; }
.form-row textarea { height: auto; line-height: 1.5; padding: 8px 12px; }
.grid2 { gap: 6px 12px; }
.fieldset { padding: 4px 12px 6px; margin: 8px 0; }
.modal h2 { margin-bottom: 8px; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus, .add-row input:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.form-row textarea { min-height: 70px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .grid2 { grid-template-columns: 1fr; } }

/* ---- 管理者 ---- */
.admin-nav { display: flex; gap: 4px; overflow-x: auto; padding: 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line); }
.admin-nav a { flex: 0 0 auto; text-decoration: none; padding: 8px 14px; color: var(--ink-2); font-size: 13px; }
.admin-nav a.active { background: var(--ink); color: #fff; font-weight: 700; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0 14px; }
.toolbar input[type=search], .toolbar select { height: 40px; padding: 0 14px; line-height: normal; border: 1px solid var(--line-strong); font-size: 14px; background: #fff; -webkit-appearance: none; appearance: none; }
.toolbar input[type=search] { flex: 1 1 160px; min-width: 0; }
.toolbar select { flex: 0 0 auto; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b4d52' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.page-head { display: flex; align-items: center; justify-content: flex-start; gap: 40px; margin-bottom: 6px; }
.page-head h1 { margin: 0; }
table.list tr.past td { color: var(--muted); }
table.list tr.past .title-link { color: var(--ink-2); }
table.list .title-link { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; white-space: nowrap; }
table.list .title-link:hover { color: var(--teal); text-decoration-color: var(--teal); }
table.list td .badge { margin-top: 2px; }
.modal.confirm { max-width: 400px; padding: 24px 20px; }
.confirm-msg { font-size: 16px; font-weight: 700; margin: 0 0 6px; }
.confirm-actions { display: flex; gap: 12px; margin-top: 18px; }
.confirm-actions .btn { flex: 1; }
table.list { width: 100%; border-collapse: collapse; background: var(--panel); font-size: 14px; }
table.list th, table.list td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
table.list th { background: #faf9f6; font-weight: 700; font-size: 11px; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }
table.list tr:last-child td { border-bottom: none; }
table.list tr:hover td { background: #fbfaf7; }
table.list td b { white-space: nowrap; }
.list-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--panel); }
.pill { display: inline-block; padding: 2px 10px; font-size: 12px; background: #eeece7; margin: 1px 2px; white-space: nowrap; color: var(--ink-2); }
.pill.coach { background: var(--teal-soft); color: var(--teal-dark); }
.pill.car { background: #ecebe6; color: var(--ink); }
.pill.ob { background: var(--clay-soft); color: #8a3f1f; }
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.pager button { min-width: 38px; height: 38px; border: 1px solid var(--line-strong); background: #fff; cursor: pointer; font-size: 14px; }
.pager button.cur { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.pager button:disabled { opacity: .35; cursor: default; }
.row-actions { white-space: nowrap; }
.row-actions button { display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line-strong); height: 38px; padding: 0 14px; line-height: 1; cursor: pointer; font-size: 13px; font-weight: 700; margin-right: 6px; color: var(--ink-2); vertical-align: middle; }
.row-actions button:hover { border-color: var(--ink); color: var(--ink); }
.row-actions button.del { color: var(--clay); border-color: #e9c8bb; }

/* モーダル */
.modal-bg { position: fixed; inset: 0; background: rgba(30,31,34,.5); display: none; z-index: 50; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
.modal-bg.open { display: flex; }
.modal { background: var(--paper); width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; padding: 20px 18px 28px; }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { } }
.modal h2 { margin-top: 0; font-family: var(--ff-jp); font-size: 18px; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--ink); }
.modal h2::after { display: none; }
.fieldset { border: 1px solid var(--line); padding: 10px 14px 4px; margin: 12px 0; background: #fff; }
.fieldset legend { font-family: var(--ff-en); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); padding: 0 6px; }
.fieldset .hint { font-size: 12px; color: var(--muted); }

/* ログイン */
.login-box { max-width: 380px; margin: 48px auto; }

/* ---- 配車調整 ---- */
.carpool-layout { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 820px) { .carpool-layout { grid-template-columns: 320px 1fr; } }
.car-card { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; margin-bottom: 10px; }
.car-card header { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 15px; }
.car-card header .seats { font-size: 13px; font-weight: 500; color: var(--muted); }
.car-card header .seats.over { color: var(--clay); font-weight: 700; }
.car-card ul { list-style: none; padding: 0; margin: 8px 0 0; }
.car-card li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.car-card li .who { display: flex; align-items: center; gap: 8px; }
.car-card li .tag { font-size: 11px; color: var(--ink-2); background: #eeece7; padding: 1px 7px; }
.car-card li .tag.note { background: var(--maybe); color: var(--maybe-ink); }
.car-card li select { font-size: 13px; padding: 4px 6px; border: 1px solid var(--line-strong); max-width: 130px; background: #fff; }
.unassigned { border-color: var(--clay); background: #fdf6f3; }
.ai-box textarea { min-height: 130px; }
.ai-result { background: var(--teal-soft); border: 1px solid #cddedb; padding: 12px 14px; font-size: 13px; white-space: pre-wrap; line-height: 1.7; color: var(--teal-dark); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 10px 0; }
.stat { background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; }
.stat b { display: block; font-size: 24px; font-weight: 600; line-height: 1.2; }
.stat span { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 20px; font-size: 14px; opacity: 0; transition: opacity .3s; pointer-events: none; z-index: 99; }
.toast.show { opacity: 1; }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
footer.proto { text-align: center; color: var(--muted); font-size: 11px; padding: 28px 16px 32px; border-top: 1px solid var(--line); margin-top: 24px; }

/* ヘッダーの折返し防止（スマホ幅） */
.app-header .brand, .app-header nav a { white-space: nowrap; }
@media (max-width: 420px) { .app-header .brand small { display: none; } .app-header nav a { margin-left: 12px; } }

/* ---- 予定詳細（コンパクト版） ---- */
.trip-detail { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--ink); padding: 12px 14px; margin-bottom: 16px; }
.trip-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.trip-head .trip-h { font-family: var(--ff-num); font-weight: 600; font-size: 14px; }
.trip-head .meet { margin-left: auto; font-size: 12px; }
.trip-head .meet b { font-size: 15px; color: var(--ink); margin-left: 2px; }
.trip-detail .trip-title { font-size: 20px; font-weight: 700; margin: 2px 0 10px; line-height: 1.3; }
.route { border-top: 1px solid var(--line); }
.leg { display: grid; grid-template-columns: 2.8em 1fr auto 1fr; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.leg-label { font-family: var(--ff-en); font-size: 11px; letter-spacing: .12em; color: #fff; background: var(--ink); text-align: center; padding: 3px 0; font-weight: 500; }
.leg:nth-child(2) .leg-label { background: var(--teal); }
.pt { display: flex; flex-direction: column; min-width: 0; }
.pt b { font-size: 18px; font-weight: 600; line-height: 1.1; }
.pt small { font-size: 11.5px; color: var(--ink-2); line-height: 1.3; }
.arrow { color: var(--clay); font-weight: 700; font-family: var(--ff-num); }
.cond { padding-top: 8px; font-size: 13px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.cond-label { display: inline-block; font-size: 11px; color: var(--muted); font-weight: 700; margin-right: 8px; min-width: 2.2em; }
.cond b { font-size: 15px; margin-right: 4px; }
.cond-note { display: block; color: var(--clay); font-size: 12px; padding-left: 2.2em; margin-left: 8px; }

/* ---- 乗車必要／配車可能 ---- */
.capacity { display: grid; grid-template-columns: 1fr 1fr; margin: 12px 0 4px; background: var(--panel); border: 1px solid var(--line); }
.cap { padding: 10px 12px; border-right: 1px solid var(--line); }
.cap:nth-child(2) { border-right: none; }
.cap-label { display: block; font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.cap b { font-size: 26px; font-weight: 600; line-height: 1.1; }
.cap .unit { font-size: 13px; margin-left: 2px; color: var(--ink-2); }
.cap-sub { display: block; font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.cap.short b { color: var(--clay); }
.cap-msg { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 7px 12px; font-size: 13px; background: #faf9f6; color: var(--ink-2); }
.cap-msg b { color: var(--ink); }

/* ---- 出欠登録の補助 ---- */
.trip-mini { border-left: 3px solid var(--ink); padding: 4px 12px; margin-bottom: 16px; }
.trip-mini .trip-date { font-size: 15px; color: var(--ink); font-weight: 700; }
.name-label { display: inline-block; font-size: 22px; font-weight: 700; padding: 6px 18px; border-bottom: 2px solid var(--ink); }

/* ---- 配車調整：コメント分析 ---- */
.analysis { margin: 6px 0 10px; }
.chips { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 6px; }
.chip { width: 100%; text-align: left; background: #fff; border: 1px solid var(--line-strong); padding: 8px 10px; font-size: 13px; cursor: pointer; line-height: 1.45; display: flex; gap: 8px; align-items: flex-start; }
.chip:hover { border-color: var(--ink); }
.chip.used { opacity: .5; }
.chip .tag { flex: 0 0 auto; font-size: 11px; background: var(--teal-soft); color: var(--teal-dark); padding: 1px 7px; font-weight: 700; margin-top: 2px; }
.car-card.spare { border-style: dashed; background: #fbfaf7; }
.car-card header .tag.note { font-size: 11px; margin-left: 8px; }
.stat b small { font-size: 13px; color: var(--muted); margin-left: 4px; font-weight: 500; }

/* ---- 日付ピッカー ---- */
.datepick { position: relative; }
.dp-btn { text-align: left; cursor: pointer; color: var(--ink); position: relative; }
.dp-btn::after { content: ""; position: absolute; right: 12px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b4d52' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") center/contain no-repeat; }
.dp-btn .ph { color: var(--muted); }
.dp { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; width: 280px; background: #fff; border: 1px solid var(--ink); box-shadow: 0 10px 30px rgba(30,31,34,.18); padding: 10px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-title { font-weight: 600; font-size: 15px; }
.dp-nav { width: 36px; height: 36px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.dp-nav:hover { border-color: var(--ink); }
.dp-week, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-week span { text-align: center; font-size: 11px; color: var(--muted); padding: 4px 0; }
.dp-week .sun, .dp-day.sun { color: var(--clay); }
.dp-week .sat, .dp-day.sat { color: var(--teal); }
.dp-day { height: 34px; border: none; background: transparent; cursor: pointer; font-family: var(--ff-num); font-size: 14px; color: var(--ink); }
.dp-day:hover { background: var(--paper); }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.dp-day.sel { background: var(--ink); color: #fff !important; font-weight: 700; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.dp-link { background: none; border: none; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 13px; padding: 6px 4px; }

/* ---- 管理画面内の予定調整：戻るリンクと「調整リンクをコピー」を同じ行に ---- */
.page-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.page-nav a { font-size: 15px; }
.page-nav .btn { white-space: nowrap; }
