/* YSM 予約エンジン 共通スタイル */
.ysm-bk-modal { position: fixed; inset: 0; z-index: 10000; display: none; }
.ysm-bk-modal.open { display: block; }
.ysm-bk-back { position: absolute; inset: 0; background: rgba(20,35,61,.45); }
.ysm-bk-panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 22px 22px 0 0; animation: ysmBkUp .3s cubic-bezier(.2,.9,.3,1);
}
@keyframes ysmBkUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
@media (min-width: 700px) {
  .ysm-bk-panel { bottom: auto; top: 50%; transform: translate(-50%, -50%); border-radius: 22px; max-height: 86vh; animation: ysmBkPop .3s cubic-bezier(.2,1.2,.4,1); }
  @keyframes ysmBkPop { from { transform: translate(-50%, -46%); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
}
.ysm-bk-head { position: relative; padding: 22px 18px; color: #fff; }
.ysm-bk-title { font-size: 19px; font-weight: 900; }
.ysm-bk-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: none; border-radius: 50%; background: rgba(255,255,255,.92); font-size: 18px; cursor: pointer; }
.ysm-bk-body { padding: 18px; }
.ysm-bk-l { display: block; font-size: 12px; font-weight: 700; color: #6b5d42; margin: 14px 0 6px; }
.ysm-bk-i { width: 100%; padding: 12px 13px; border: 1.5px solid #e6ddcd; border-radius: 11px; font-family: inherit; font-size: 14px; outline: none; box-sizing: border-box; background: #fff; }
.ysm-bk-i:focus { border-color: #845ef7; }
.ysm-bk-ta { min-height: 78px; resize: vertical; }
.ysm-bk-note { font-size: 12px; color: #8a7a5c; line-height: 1.7; margin: 14px 0; }
.ysm-bk-submit { width: 100%; margin-top: 14px; padding: 14px; border: none; border-radius: 100px; color: #fff; font-family: inherit; font-weight: 900; font-size: 15px; cursor: pointer; }
.ysm-bk-done { text-align: center; padding: 20px 0; }
.ysm-bk-done-ic { width: 56px; height: 56px; border-radius: 50%; color: #fff; font-size: 30px; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.ysm-bk-done-h { font-size: 18px; font-weight: 900; color: #14233d; }
.ysm-bk-done-p { font-size: 13px; color: #6b5d42; line-height: 1.7; margin: 8px 0 18px; }
/* マイ予約一覧 */
.ysm-bk-empty { text-align: center; font-size: 13px; color: #8a7a5c; padding: 30px 16px; }
.ysm-bk-card { position: relative; background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(20,35,61,.07); }
.ysm-bk-card-cat { font-size: 12px; font-weight: 900; }
.ysm-bk-card-detail { font-size: 14px; color: #14233d; margin-top: 4px; padding-right: 80px; }
.ysm-bk-status { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 900; color: #fff; padding: 3px 10px; border-radius: 100px; }

/* 決済画面 */
.ysm-pay { padding: 4px 0; }
.ysm-pay-h { font-size: 17px; font-weight: 900; color: #14233d; margin-bottom: 14px; }
.ysm-pay-sum { background: #faf7f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.ysm-pay-row { display: flex; justify-content: space-between; font-size: 15px; font-weight: 700; color: #14233d; }
.ysm-pay-soon { background: #fff6e6; border: 1px solid #ffe0a3; border-radius: 12px; padding: 16px; font-size: 13px; color: #8a6d3b; line-height: 1.8; text-align: center; margin-bottom: 14px; }

/* AIツアー旅程表示 */
.ai-plan { margin-top: 16px; }
.ai-plan-note { font-size: 13px; color: #6845e0; font-weight: 700; background: #f3eeff; padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; }
.ai-day { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed #e6ddcd; }
.ai-day-n { flex-shrink: 0; width: 48px; font-weight: 900; color: #6845e0; font-size: 14px; }
.ai-day-s { font-size: 13px; color: #14233d; line-height: 1.7; }

/* メッセージ／チャット */
.ysm-msg-list { padding: 16px; max-height: 50vh; overflow-y: auto; background: #f4f1ea; }
.ysm-msg { display: flex; margin-bottom: 10px; }
.ysm-msg.mine { justify-content: flex-end; }
.ysm-msg.staff { justify-content: flex-start; }
.ysm-msg-bubble { max-width: 78%; padding: 10px 13px; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.ysm-msg.mine .ysm-msg-bubble { background: #845ef7; color: #fff; border-bottom-right-radius: 4px; }
.ysm-msg.staff .ysm-msg-bubble { background: #fff; color: #14233d; border: 1px solid #e6ddcd; border-bottom-left-radius: 4px; }
.ysm-msg-empty { text-align: center; color: #999; font-size: 12px; padding: 20px; }
.ysm-msg-input { display: flex; gap: 8px; padding: 12px 14px; background: #fff; border-top: 1px solid #eee; }
.ysm-msg-input input { flex: 1; padding: 11px 13px; border: 1.5px solid #e6ddcd; border-radius: 100px; font-family: inherit; font-size: 14px; outline: none; }
.ysm-msg-input button { padding: 11px 18px; border: none; border-radius: 100px; background: #845ef7; color: #fff; font-weight: 900; font-family: inherit; cursor: pointer; }

/* ===== 全画面チャット（LINE風） ===== */
.ysm-chat-screen {
  position: fixed; inset: 0; z-index: 100000; background: #e9e4d8;
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1);
}
.ysm-chat-screen.open { transform: translateX(0); }
.ysm-chat-head {
  flex-shrink: 0; display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; padding-top: calc(14px + env(safe-area-inset-top));
  color: #fff;
}
.ysm-chat-back { background: rgba(255,255,255,.2); border: none; color: #fff; width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.ysm-chat-title { font-size: 17px; font-weight: 900; }
.ysm-chat-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }
.ysm-cmsg { display: flex; margin-bottom: 12px; }
.ysm-cmsg.mine { justify-content: flex-end; }
.ysm-cmsg.staff { justify-content: flex-start; }
.ysm-cbubble { max-width: 76%; padding: 11px 14px; border-radius: 16px; font-size: 14px; line-height: 1.65; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.ysm-cmsg.mine .ysm-cbubble { background: #8de055; color: #14233d; border-bottom-right-radius: 5px; }
.ysm-cmsg.staff .ysm-cbubble { background: #fff; color: #14233d; border-bottom-left-radius: 5px; }
.ysm-typing .ysm-cbubble { color: #999; letter-spacing: 2px; }
.ysm-chat-input {
  flex-shrink: 0; display: flex; gap: 8px; padding: 12px 14px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: #f7f4ec; border-top: 1px solid #ddd;
}
.ysm-chat-input input { flex: 1; padding: 12px 16px; border: 1.5px solid #d8cfbf; border-radius: 100px; font-family: inherit; font-size: 15px; outline: none; background: #fff; }
.ysm-chat-input input:focus { border-color: #845ef7; }
.ysm-chat-input button { padding: 12px 20px; border: none; border-radius: 100px; background: #845ef7; color: #fff; font-weight: 900; font-family: inherit; font-size: 15px; cursor: pointer; }
@media (min-width: 700px) {
  .ysm-chat-screen { left: 50%; transform: translate(-50%, 100%); width: 440px; max-width: 100%; box-shadow: 0 0 50px rgba(0,0,0,.3); }
  .ysm-chat-screen.open { transform: translate(-50%, 0); }
}
