/* あそっぴん（フォレスタ阿蘇 公式AIコンシェルジュ） */
.fc-root {
  --fc-ink: #23331f;
  --fc-paper: #fbf8f1;
  --fc-line: #ddd5c3;
  --fc-gold: #b89a5b;
  --fc-text: #2b2b2b;
  --fc-sub: #6b6658;
  --fc-user: #e6eedf;
  position: fixed;
  right: 16px;
  bottom: calc(16px + var(--fc-lift, 0px));
  z-index: 9990;
  transition: bottom .25s ease;
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--fc-text);
}
.fc-root *, .fc-root *::before, .fc-root *::after { box-sizing: border-box; }

.fc-launcher {
  --fc-fig: 96px;                       /* キャラクターの幅 */
  position: relative;
  display: flex;
  align-items: center;
  min-height: 60px;
  padding: 9px 22px 9px calc(var(--fc-fig) + 14px);
  border: 1px solid var(--fc-gold);
  border-radius: 999px;
  background: var(--fc-ink);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: transform .2s;
}
.fc-launcher:hover { transform: scale(1.03); }
.fc-launcher-figure {
  position: absolute;
  left: 8px;
  bottom: 0;
  width: var(--fc-fig);
  height: calc(var(--fc-fig) * 1.2);
  overflow: hidden;
  border-bottom-left-radius: 30px;
  pointer-events: none;
}
.fc-launcher-icon {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3));
}
.fc-launcher-text { display: flex; flex-direction: column; text-align: left; line-height: 1.35; }
.fc-launcher-text strong { font-size: 15px; letter-spacing: .02em; }
.fc-launcher-text small { font-size: 11px; opacity: .85; }
.fc-open .fc-launcher { display: none; }

/* キャラクター：コマ（絵）を重ねて、見せるコマだけ不透明にする */
.fc-char { display: block; position: relative; transform-origin: 50% 100%; will-change: transform; animation: fc-idle 3.4s ease-in-out infinite; }
.fc-char .fc-frame { display: block; width: 100%; height: auto; }
.fc-char .fc-frame:not(.fc-frame-base) { position: absolute; left: 0; top: 0; opacity: 0; }
.fc-char:not([data-frame="base"]) .fc-frame-base { opacity: 0; }
.fc-char[data-frame="blink"] .fc-frame-blink, .fc-char[data-frame="talk"] .fc-frame-talk,
.fc-char[data-frame="wave"] .fc-frame-wave, .fc-char[data-frame="guide"] .fc-frame-guide,
.fc-char[data-frame="think"] .fc-frame-think, .fc-char[data-frame="happy"] .fc-frame-happy, .fc-char[data-frame="bow"] .fc-frame-bow { opacity: 1; }
.fc-char .fc-leaf { position: absolute; left: 0; top: 0; width: 100%; height: auto; transform-origin: 50% 30%; }
/* 7つの動き（transform だけを使う軽い動き） */
.fc-char[data-state="greet"] { animation: fc-greet .9s ease-in-out 1; }
.fc-char[data-state="talk"] { animation: fc-nod 1.3s ease-in-out infinite; }
.fc-char[data-state="think"] { animation: fc-think 1.8s ease-in-out infinite; }
.fc-char[data-state="think"] .fc-leaf { animation: fc-leaf .9s ease-in-out infinite; }
.fc-char[data-state="happy"] { animation: fc-hop .8s cubic-bezier(.3, 1.4, .5, 1) 1; }
.fc-char[data-state="guide"] { animation: fc-guide 1.6s ease-in-out infinite; }
.fc-char[data-state="bow"] { animation: fc-bow 1.1s ease-in-out 1; }
@keyframes fc-idle { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(-3px) scale(1.012, .99); } }
@keyframes fc-greet { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg); } 45% { transform: rotate(5deg); } 70% { transform: rotate(-4deg); } }
@keyframes fc-nod { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(1px) rotate(1.5deg); } 60% { transform: translateY(-1px) rotate(-1deg); } }
@keyframes fc-think { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(-9deg) translateY(-1px); } }
@keyframes fc-leaf { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(8deg); } }
@keyframes fc-hop { 0%, 100% { transform: translateY(0) scale(1, 1); } 15% { transform: translateY(0) scale(1.06, .92); } 45% { transform: translateY(-12px) scale(.97, 1.04); } 75% { transform: translateY(0) scale(1.04, .96); } }
@keyframes fc-guide { 0%, 100% { transform: translateX(0) rotate(0); } 50% { transform: translateX(3px) rotate(3deg); } }
@keyframes fc-bow { 0%, 100% { transform: rotate(0); } 40%, 65% { transform: rotate(12deg) translateY(2px); } }
@keyframes fc-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
.fc-still .fc-char, .fc-still .fc-char .fc-leaf { animation: none !important; }
.fc-paused .fc-char, .fc-paused .fc-char .fc-leaf { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .fc-char, .fc-char .fc-leaf { animation: none !important; } }
.fc-char, .fc-avatar { user-select: none; -webkit-user-drag: none; }
.fc-head-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.fc-voice-btn.fc-on { border-color: var(--fc-ink); background: var(--fc-ink); color: #fff; }

.fc-panel {
  display: flex;
  flex-direction: column;
  width: 380px;
  max-height: min(640px, calc(100vh - 120px - var(--fc-lift, 0px)));
  border: 1px solid var(--fc-line);
  border-radius: 14px;
  background: var(--fc-paper);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .25);
  overflow: hidden;
}
.fc-panel[hidden] { display: none; }

.fc-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; border-bottom: 1px solid var(--fc-line); }
.fc-head-icon { width: 60px; flex: none; }
.fc-head-text { flex: 1; display: flex; flex-direction: column; line-height: 1.4; min-width: 0; }
.fc-head-text strong { font-size: 16px; }
.fc-head-text span { font-size: 12px; color: var(--fc-sub); }
.fc-still-btn { align-self: flex-start; margin-top: 4px; padding: 1px 10px; border: 1px solid var(--fc-line); border-radius: 999px; background: #fff; color: var(--fc-sub); font-size: 11px; cursor: pointer; }
.fc-close { align-self: flex-start; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--fc-sub); font-size: 22px; line-height: 1; cursor: pointer; }
.fc-close:hover { background: rgba(0, 0, 0, .06); }

.fc-body { flex: 1; overflow-y: auto; padding: 14px 12px 6px; min-height: 160px; }
.fc-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: flex-start; }
.fc-user { justify-content: flex-end; }
.fc-avatar { width: 36px; height: 31px; object-fit: contain; flex: none; }
.fc-bubble { max-width: 82%; padding: 9px 12px; border-radius: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.fc-assistant .fc-bubble { background: #fff; border: 1px solid var(--fc-line); border-top-left-radius: 4px; }
.fc-user .fc-bubble { background: var(--fc-user); border-top-right-radius: 4px; }
.fc-bubble a { color: #2f6b3a; text-decoration: underline; }
.fc-bubble a.fc-search-btn { display: inline-block; margin: 4px 0; padding: 7px 14px; border-radius: 8px; background: var(--fc-ink); color: #fff; text-decoration: none; font-size: 14px; }
.fc-wait .fc-bubble { color: var(--fc-sub); animation: fc-blink 1s ease-in-out infinite; }
@keyframes fc-blink { 50% { opacity: .4; } }

.fc-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fc-act { padding: 3px 10px; border: 1px solid var(--fc-line); border-radius: 999px; background: var(--fc-paper); color: var(--fc-ink) !important; font-size: 12px; text-decoration: none !important; }
.fc-act:hover { border-color: var(--fc-gold); }
.fc-vac { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin-top: 8px; }
.fc-vac-field { display: flex; flex-direction: column; font-size: 12px; color: var(--fc-sub); }
.fc-vac-field:first-child, .fc-vac-field.fc-wide { grid-column: 1 / -1; }
.fc-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.fc-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.fc-check input { width: 16px; height: 16px; margin: 0; }
.fc-cards { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.fc-card { display: flex; border: 1px solid var(--fc-line); border-radius: 10px; overflow: hidden; background: #fff; }
.fc-card-img { flex: none; width: 84px; object-fit: cover; display: block; background: var(--fc-line); }
.fc-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 8px; white-space: normal; }
.fc-card-body strong { font-size: 14px; line-height: 1.4; }
.fc-card-cap { font-size: 11px; color: var(--fc-sub); }
.fc-card-points { margin: 1px 0 4px; padding-left: 1.05em; font-size: 12px; line-height: 1.5; list-style: disc outside; }
.fc-card-points li { display: list-item; list-style: inherit; margin: 0; padding: 0; }
.fc-bubble a.fc-card-btn { padding: 6px 8px; font-size: 13px; }
.fc-bubble a.fc-card-btn { display: block; text-align: center; margin: 2px 0 0; }
.fc-bubble a.fc-card-more { font-size: 12px; text-align: center; color: var(--fc-sub); }
.fc-vac input, .fc-vac select { margin-top: 2px; padding: 5px 6px; border: 1px solid var(--fc-line); border-radius: 6px; background: #fff; font: inherit; font-size: 15px; color: var(--fc-text); }
.fc-vac .fc-search-btn { grid-column: 1 / -1; border: 0; cursor: pointer; text-align: center; }
.fc-hand { float: right; display: inline-flex; gap: 4px; margin-left: 6px; }
.fc-note { display: flow-root; }
.fc-links { clear: both; }
.fc-link { display: flex; align-items: center; justify-content: center; line-height: 1.35; }
.fc-hand-btn { padding: 0 8px; border: 1px solid var(--fc-line); border-radius: 999px; background: #fff; color: var(--fc-sub); font-size: 11px; line-height: 1.8; cursor: pointer; }
.fc-hand-btn:hover { border-color: var(--fc-gold); color: var(--fc-ink); }
.fc-chips { max-height: 120px; overflow-y: auto; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.fc-chip { padding: 5px 12px; border: 1px solid var(--fc-line); border-radius: 999px; background: #fff; color: var(--fc-text); font-size: 13px; cursor: pointer; }
.fc-chip:hover { border-color: var(--fc-gold); }

.fc-form { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--fc-line); }
.fc-input { flex: 1; resize: none; padding: 8px 10px; border: 1px solid var(--fc-line); border-radius: 10px; background: #fff; font: inherit; font-size: 16px; line-height: 1.5; max-height: 96px; }
.fc-input:focus { outline: 2px solid var(--fc-gold); outline-offset: -1px; }
.fc-send { padding: 0 14px; border: 0; border-radius: 10px; background: var(--fc-ink); color: #fff; font-size: 14px; cursor: pointer; }
.fc-send:disabled { opacity: .5; cursor: default; }

.fc-foot { padding: 0 12px 12px; }
.fc-note { margin: 0 0 8px; font-size: 11px; color: var(--fc-sub); }
.fc-links { display: flex; gap: 6px; }
.fc-link { flex: 1; padding: 8px 6px; border: 1px solid var(--fc-ink); border-radius: 8px; color: var(--fc-ink); font-size: 13px; text-align: center; text-decoration: none; }
.fc-link-main { background: var(--fc-ink); color: #fff; }

@media (max-width: 600px) {
  .fc-root { right: 12px; bottom: calc(12px + var(--fc-lift, 0px)); }
  .fc-launcher { --fc-fig: 84px; min-height: 56px; padding-right: 18px; }
  .fc-launcher-figure { border-bottom-left-radius: 28px; }
  .fc-launcher-text strong { font-size: 14px; }
  .fc-root.fc-open { left: 0; right: 0; bottom: var(--fc-bar, 0px); }
  .fc-panel { width: 100%; max-height: calc(85vh - var(--fc-bar, 0px)); border-radius: 14px 14px 0 0; }
}
