.yasuragi-chatbot-root {
  --yc-forest: #255e4b;
  --yc-forest-deep: #1d4b3c;
  --yc-ink: #2d342f;
  --yc-muted: #6f786f;
  --yc-paper: #fbf8f1;
  --yc-paper-2: #f4efe4;
  --yc-line: rgba(63, 73, 64, .12);
  --yc-shadow: 0 24px 70px rgba(35, 41, 36, .18);
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

.yc-launcher-wrap {
  position: relative;
  display: inline-block;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.yc-launcher-wrap.is-hidden {
  opacity: 0;
  transform: scale(0.5) rotate(90deg);
  pointer-events: none;
}
.yc-launcher-wrap:not(.is-hidden) {
  animation: ycLauncherIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.yc-launcher-dismiss {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(45,52,47,.15);
  background: rgba(255,255,255,.95);
  color: #47554c;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  transition: background .2s ease, transform .2s ease;
}
.yc-launcher-dismiss:hover {
  background: #fff;
  transform: scale(1.1);
}
.yc-launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease;
}
.yc-launcher:hover {
  transform: translateY(-2px) scale(1.05);
}
@keyframes ycLauncherIn {
  0% { opacity: 0; transform: scale(0.5) rotate(-90deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.yc-launcher-icon {
  width: 180px;
  height: auto;
  display: block;
}

.yc-widget {
  position: absolute;
  bottom: 60px;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 24px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.82), rgba(255,255,255,0) 38%),
    linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,.72)),
    var(--yc-paper);
  border-radius: 28px;
  box-shadow: var(--yc-shadow);
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.55);
  backdrop-filter: blur(14px);
  /* Animation setup */
  display: flex;
  visibility: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0s linear 0.35s;
}
.yc-widget.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.4s cubic-bezier(0.0, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.0, 0, 0.2, 1),
              visibility 0s linear 0s;
}

.yc-header {
  position: relative;
  display:flex;
  justify-content: space-between;
  align-items:flex-start;
  gap:12px;
  padding: 18px 20px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.8), rgba(255,255,255,.45)),
    linear-gradient(135deg, #f2eee2 0%, #ede7da 55%, #f7f2e8 100%);
  border-bottom:1px solid var(--yc-line);
}
.yc-header::after {
  content: "";
  position: absolute;
  inset: auto 20px 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(37,94,75,0), rgba(37,94,75,.18), rgba(37,94,75,0));
}
.yc-title {
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--yc-ink);
}
.yc-subtitle {
  margin-top:6px;
  font-size:12px;
  line-height:1.7;
  color:#627066;
}
.yc-close {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(45,52,47,.08);
  background: rgba(255,255,255,.6);
  font-size: 24px;
  line-height: 1;
  cursor:pointer;
  color:#47554c;
  transition: background .2s ease, transform .2s ease;
}
.yc-close {
  transition: background 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.yc-close:hover { background:#fff; transform: rotate(90deg) scale(1.1); }

/* Content entrance animation */
.yc-widget.is-open .yc-header { animation: ycSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.05s both; }
.yc-widget.is-open .yc-body { animation: ycSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.12s both; }
.yc-widget.is-open .yc-footer { animation: ycSlideIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.18s both; }
@keyframes ycSlideIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

.yc-body {
  flex:1;
  overflow:auto;
  padding:18px;
  background:
    linear-gradient(180deg, rgba(251,248,241,.96), rgba(248,244,236,.96)),
    repeating-linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.12) 1px, transparent 1px, transparent 24px);
  scroll-behavior: smooth;
}
.yc-body::-webkit-scrollbar { width: 8px; }
.yc-body::-webkit-scrollbar-thumb { background: rgba(37,94,75,.18); border-radius: 999px; }

.yc-msg { display:flex; margin-bottom:14px; animation: ycFade .22s ease both; }
.yc-msg-user { justify-content:flex-end; }
.yc-bubble {
  max-width:86%;
  padding:13px 15px;
  border-radius:18px;
  font-size:14px;
  line-height:1.75;
  box-shadow: 0 8px 22px rgba(51,60,53,.06);
}
.yc-msg-bot .yc-bubble {
  background: rgba(255,255,255,.86);
  color: var(--yc-ink);
  border: 1px solid rgba(63,73,64,.08);
  border-bottom-left-radius:8px;
}
.yc-msg-user .yc-bubble {
  background: linear-gradient(180deg, #2d725c 0%, var(--yc-forest) 100%);
  color:#fff;
  border-bottom-right-radius:8px;
}

.yc-options { display:grid; gap:12px; margin-top:16px; }
.yc-option, .yc-btn, .yc-textbtn { cursor:pointer; }
.yc-option {
  width:100%;
  text-align:left;
  border:1px solid rgba(37,94,75,.14);
  background: rgba(255,255,255,.82);
  color: var(--yc-ink);
  border-radius:16px;
  padding:14px 16px;
  font-size:14px;
  line-height:1.55;
  box-shadow: 0 8px 20px rgba(51,60,53,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.yc-option:hover {
  transform: translateY(-1px);
  background:#fff;
  border-color: rgba(37,94,75,.26);
  box-shadow: 0 14px 26px rgba(51,60,53,.08);
}

.yc-card {
  position: relative;
  background: rgba(255,255,255,.88);
  border:1px solid rgba(63,73,64,.08);
  border-radius:20px;
  padding:18px;
  margin-top:14px;
  box-shadow: 0 10px 28px rgba(51,60,53,.05);
  animation: ycFade .24s ease both;
}
.yc-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37,94,75,.55), rgba(37,94,75,0));
}
.yc-kicker {
  font-size:11px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform: uppercase;
  color:#7a8179;
}
.yc-result-name, .yc-alt-title {
  font-family: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size:20px;
  font-weight:700;
  line-height:1.45;
  color: var(--yc-ink);
  margin-top:8px;
}
.yc-result-desc {
  margin:10px 0 0;
  font-size:14px;
  line-height:1.8;
  color:#415048;
}
.yc-result-price {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--yc-forest-deep);
  font-weight: 700;
}
.yc-dl {
  margin:16px 0 0;
  display:grid;
  gap:14px;
}
.yc-dl dt {
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  color:#7a8179;
}
.yc-dl dd {
  margin:5px 0 0;
  font-size:14px;
  color: var(--yc-ink);
  line-height:1.75;
}
.yc-actions { display:grid; gap:10px; margin-top:16px; }
.yc-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding:13px 14px;
  border-radius:14px;
  border:1px solid rgba(63,73,64,.12);
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  color: var(--yc-ink);
  background: rgba(255,255,255,.92);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.yc-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(51,60,53,.08);
}
.yc-btn-primary {
  background: linear-gradient(180deg, #2d725c 0%, var(--yc-forest) 100%);
  border-color: transparent;
  color:#fff;
}
.yc-note {
  margin:12px 0 0;
  font-size:12px;
  color:#6e766e;
  line-height:1.75;
}

.yc-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #526159;
  line-height: 1.7;
}
.yc-loading::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid rgba(37,94,75,.18);
  border-top-color: var(--yc-forest);
  animation: ycSpin .8s linear infinite;
}
.yc-loading::after {
  content: "";
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle, var(--yc-forest) 40%, transparent 41%) 0 50% / 8px 8px no-repeat,
    radial-gradient(circle, var(--yc-forest) 40%, transparent 41%) 10px 50% / 8px 8px no-repeat,
    radial-gradient(circle, var(--yc-forest) 40%, transparent 41%) 20px 50% / 8px 8px no-repeat;
  animation: ycDots 1.15s ease-in-out infinite;
}

.yc-availability {
  margin-top: 16px;
  padding: 15px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(245,249,246,.95), rgba(255,255,255,.94));
  border: 1px solid rgba(37,94,75,.12);
}
.yc-availability-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--yc-forest-deep);
  margin-bottom: 8px;
}
.yc-availability-hint,
.yc-availability-text,
.yc-date-label {
  font-size: 12px;
  line-height: 1.7;
}
.yc-date-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.yc-date-pick {
  border:1px solid rgba(37,94,75,.14);
  background: rgba(255,255,255,.95);
  border-radius:16px;
  padding:13px 14px;
  text-align:left;
  cursor:pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.yc-date-pick:hover {
  transform: translateY(-1px);
  border-color: rgba(37,94,75,.28);
  box-shadow: 0 12px 24px rgba(51,60,53,.08);
}
.yc-date-pick strong {
  display:block;
  font-size:15px;
  font-weight:700;
  color: var(--yc-ink);
  margin-bottom:5px;
}
.yc-date-pick span {
  font-size:12px;
  color:#68756d;
}
.yc-date-plan-wrap { margin-top:14px; }
.yc-date-fallback { margin-top:18px; padding-top:16px; border-top:1px solid var(--yc-line); text-align:center; }
.yc-date-fallback .yc-note { margin-bottom:10px; }
.yc-date-plan-card { margin-top:12px; }
.yc-chip-link { text-decoration:none; display:inline-block; }
.yc-nearby-list {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.yc-chip {
  border:1px solid rgba(37,94,75,.14);
  background: rgba(255,255,255,.92);
  color: var(--yc-forest-deep);
  border-radius:999px;
  padding:8px 12px;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition: transform .18s ease, background .18s ease;
}
.yc-chip:hover { transform: translateY(-1px); background:#fff; }

.yc-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 16px;
  background: rgba(255,255,255,.7);
  border-top:1px solid var(--yc-line);
  backdrop-filter: blur(10px);
}
.yc-textbtn {
  border:0;
  background:transparent;
  color:#51645b;
  font-size:12px;
  font-weight:700;
  letter-spacing:.04em;
}
.yc-textbtn:disabled { opacity:.4; cursor:default; }

/* PC版: 少し浮かせる */
@media (min-width: 641px) {
  .yasuragi-chatbot-root { bottom: 24px !important; }
}

/* SP版: 固定バーを避けて浮かせる */
@media (max-width: 640px) {
  .yasuragi-chatbot-root { right:5px; left:auto; bottom:5px; }
  .yc-widget {
    position: fixed;
    right: 12px;
    left: 12px;
    bottom: 10px;
    width: auto;
    height: auto;
    max-height: calc(100vh - 40px);
    border-radius: 24px;
  }
  .yc-launcher { width:auto; height:auto; }
  .yc-launcher-icon { width: 150px; }
  .yc-launcher-dismiss { top: 12px; right: 12px; }
  /* スクロールバー常時表示 */
  .yc-body { overflow-y: scroll; }
  /* iOS自動ズーム防止 */
  .yc-input { font-size: 16px; }
}

@media (max-width:480px){
  .yc-date-grid{grid-template-columns:1fr;}
  .yc-title { font-size: 18px; }
  .yc-body { padding: 15px; }
}

@keyframes ycFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ycSpin { to { transform: rotate(360deg); } }
@keyframes ycDots {
  0%, 100% { opacity: .45; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(2px); }
}

.yc-faq-form{display:grid;gap:10px;margin-top:14px}
.yc-input{width:100%;border:1px solid rgba(37,94,75,.14);background:rgba(255,255,255,.92);border-radius:16px;padding:14px 16px;font-size:14px;line-height:1.6;color:var(--yc-ink);box-sizing:border-box}
.yc-input:focus{outline:none;border-color:rgba(37,94,75,.32);box-shadow:0 0 0 3px rgba(37,94,75,.08)}
.yc-faq-suggest{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}
.yc-faq-answer{margin-top:10px;white-space:pre-wrap}
