/* ============================================================
   LINE予約の画面（LINEの中で開く予約画面のイメージ）
   tokens.css / base.css の後に読み込む
   ============================================================ */

/* 色は tokens.css の --line-green / --line-green-ink / --line-chat-bg を使う
   （緑の帯の地色は LINE らしさのため残し、帯の上の文字は 7:1 以上の濃い色） */

[hidden] { display: none !important; }

.line-body { background: var(--c-surface-2); }

/* ---- 縦長の枠（PCでは中央に置く） ---- */
.phone {
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  position: relative;
}
@media (min-width: 600px) {
  .phone {
    margin: var(--sp-5) auto;
    min-height: calc(100dvh - 40px);
    border: 1px solid var(--c-line-strong);
    border-radius: 28px;
    box-shadow: var(--shadow-2);
    overflow: clip;
  }
}

/* ---- 上部の緑の帯 ---- */
.line-top {
  background: var(--line-green);
  color: var(--line-green-ink);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
}
.line-top-text { min-width: 0; flex: 1; }
.line-top .t { font-size: var(--fs-md); font-weight: 700; line-height: 1.35; }
.line-top .s { font-size: var(--fs-xs); font-weight: 600; }
.line-avatar {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-band-text);
  color: var(--c-band);
  font-weight: 700;
  font-size: var(--fs-lg);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--line-green-ink);
}
.line-avatar.sm { width: 34px; height: 34px; font-size: var(--fs-md); background: var(--line-green); color: var(--line-green-ink); border: none; }

.line-frame-note {
  font-size: var(--fs-xs);
  text-align: center;
  color: var(--c-text-sub);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  padding: var(--sp-1) var(--sp-3);
}

.line-main { flex: 1; padding: var(--sp-4); padding-bottom: var(--sp-6); }
.line-main .card { padding: var(--sp-4); }
.lead { margin-bottom: var(--sp-4); }
.empty { color: var(--c-text-sub); padding: var(--sp-3) 0; }

/* ---- 下部の切替 ---- */
.line-tabs {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--c-surface);
  border-top: 1px solid var(--c-line-strong);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.line-tab {
  position: relative;
  min-height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-text-sub);
  background: transparent;
  border: none;
  border-top: 4px solid transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.line-tab .ico { font-size: 1.375rem; line-height: 1.2; }
/* 選択中の切替: 太い枠（3px）＋✓の印＋主の淡い地 */
.line-tab[aria-current="page"] {
  color: var(--c-text);
  border: 3px solid var(--c-primary);
  background: var(--c-primary-soft);
}
.line-tab[aria-current="page"]::before {
  content: "✓";
  position: absolute;
  top: 2px; left: 8px;
  font-size: var(--fs-md);
  font-weight: 800;
  color: var(--c-primary);
}
.tab-count {
  position: absolute;
  top: 6px;
  left: calc(50% + 12px);
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--c-danger);
  color: var(--c-text-on-sem);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

/* ---- 運行日 ---- */
.day-card {
  background: var(--c-primary);
  color: var(--c-text-on-primary);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  text-align: center;
}
.day-main { font-size: var(--fs-xl); font-weight: 700; line-height: 1.4; }
.day-sub { font-size: var(--fs-md); margin-top: 2px; }
.day-mode {
  margin-top: var(--sp-2);
  font-size: var(--fs-sm);
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
}

.again-btn { margin-bottom: var(--sp-4); font-size: var(--fs-md); text-align: left; justify-content: flex-start; }

/* ---- フォーム ---- */
.field > label .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  margin-right: var(--sp-2);
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-text-on-primary);
  font-size: var(--fs-sm);
}
.seg label span { overflow-wrap: anywhere; }
.btn.sm.add-rider-btn { margin-top: var(--sp-2); min-height: 44px; }
.add-rider { display: flex; gap: var(--sp-2); margin-top: var(--sp-2); }
.add-rider input { flex: 1; min-width: 0; }
.add-rider .btn { flex: none; padding-inline: var(--sp-4); }

.dest-grid label.dest { min-height: 92px; padding: var(--sp-2); }
/* 行き先の大ボタン: ✓は左上に置く（絵と名前の並びを崩さない） */
.dest-grid label.dest:has(input:checked)::before {
  position: absolute;
  top: 2px; left: 8px;
  margin: 0;
  font-size: var(--fs-lg);
}
.dest-inner { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dest-ico { font-size: 2rem; line-height: 1.2; }
.dest-name { font-size: var(--fs-md); line-height: 1.35; }

.stepper { display: flex; align-items: center; gap: var(--sp-3); }
.step-btn { width: 56px; min-height: 52px; padding: 0; font-size: var(--fs-2xl); flex: none; }
.step-num { flex: 1; text-align: center; font-size: var(--fs-2xl); font-weight: 700; }
.step-num .unit { font-size: var(--fs-md); margin-left: 2px; font-weight: 600; }

.check-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 56px;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-lg);
  font-weight: 700;
  background: var(--c-surface);
  border: 2px solid var(--c-line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
}
.check-row input { width: 26px; height: 26px; flex: none; accent-color: var(--c-primary); }
.check-row:has(input:checked) { border-color: var(--c-primary); border-width: 3px; background: var(--c-primary-soft); }
.ret-hint { margin: var(--sp-3) 0 var(--sp-2); font-weight: 700; color: var(--c-text-sub); font-size: var(--fs-md); }

.error-text {
  margin-top: var(--sp-3);
  color: var(--c-danger);
  font-weight: 700;
  font-size: var(--fs-md);
}
.back-btn { margin-top: var(--sp-3); }

/* ---- 確認・確定 ---- */
.check-day { font-size: var(--fs-xl); font-weight: 700; }
.check-who { color: var(--c-text-sub); margin-bottom: var(--sp-3); }
.trip {
  border: 2px solid var(--c-line-strong);
  border-left: 8px solid var(--c-primary);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
  background: var(--c-surface);
}
/* 帰りの便は「帰り」の言葉で示す。金色は情報の区別に使わない */
.trip.ret { border-left-color: var(--c-accent-ink); border-left-style: double; }
.trip-tag {
  display: inline-block;
  font-size: var(--fs-lg);
  font-weight: 700;
  padding: 0 var(--sp-3);
  border-radius: var(--r-full);
  background: var(--c-primary-soft);
  color: var(--c-text);
}
.trip-time { font-size: var(--fs-2xl); font-weight: 700; line-height: 1.4; margin-top: var(--sp-1); }
.trip-route { font-size: var(--fs-lg); font-weight: 700; }
.trip-sub { font-size: var(--fs-sm); color: var(--c-text-sub); }
.ret-full { margin-bottom: var(--sp-3); }
.alt-wrap { margin-top: var(--sp-2); }

.fare {
  background: var(--c-surface-2);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-3);
}
.fare-main { font-size: var(--fs-xl); font-weight: 700; }
.fare-sub { font-size: var(--fs-sm); color: var(--c-text-sub); }

.alt-btn { justify-content: space-between; margin-bottom: var(--sp-2); font-size: var(--fs-lg); }
.alt-time { font-size: var(--fs-md); font-weight: 600; }
.blocked-reason { font-size: var(--fs-lg); margin-bottom: var(--sp-4); }
.call-btn { margin-top: var(--sp-3); background: var(--c-info); color: var(--c-text-on-sem); }
.call-btn:hover { background: var(--c-info); filter: brightness(0.92); }

.done-card { text-align: left; }
.done-mark {
  width: 64px; height: 64px;
  margin: 0 auto var(--sp-2);
  border-radius: 50%;
  background: var(--c-ok-soft);
  color: var(--c-ok);
  font-size: 2.25rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.done-card > h2 { text-align: center; }

/* ---- 吹き出し ---- */
.chat {
  background: var(--line-chat-bg);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.msg { display: flex; gap: var(--sp-2); align-items: flex-start; }
.msg-col { min-width: 0; flex: 1; }
.msg-from { font-size: var(--fs-xs); color: var(--c-text-sub); margin-bottom: 2px; overflow-wrap: anywhere; }
.bubble {
  background: var(--c-surface);
  color: var(--c-text);
  border-radius: 4px 18px 18px 18px;
  padding: var(--sp-3) var(--sp-4);
  box-shadow: var(--shadow-1);
  max-width: 100%;
}
.bubble.alert { border: 2px solid var(--c-danger); background: var(--c-danger-soft); }
.bubble-title { font-weight: 700; font-size: var(--fs-md); margin-bottom: 2px; }
.bubble-body { white-space: pre-line; font-size: var(--fs-md); overflow-wrap: anywhere; }
.msg-time { font-size: var(--fs-xs); color: var(--c-text-sub); margin-top: 2px; }

/* ---- 予約の確認 ---- */
.mine-list > li { align-items: flex-start; }
.mine-main { flex: 1; min-width: 0; }
.mine-top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); }
.mine-time { font-size: var(--fs-xl); font-weight: 700; }
.mine-route { font-size: var(--fs-md); font-weight: 700; }
.is-cancelled .mine-time, .is-cancelled .mine-route { text-decoration: line-through; color: var(--c-text-faint); }
.sus-badge { font-size: var(--fs-sm); padding: 4px 12px; border: 1.5px solid var(--c-danger); }
.cancel-btn { flex: none; min-height: 44px; }
.sus-banner { font-size: var(--fs-md); }
#profileBody p { margin-bottom: var(--sp-1); }
#profileBody { margin-bottom: var(--sp-3); }
