:root {
  --bg: #0f1115;
  --accent: #c9a25e;
  --accent-2: #e7d3a8;
  --chat-user: #c9a25e;
  --chat-bot: #1d2027;
  --text: #e9eaee;
  --muted: #9aa0ab;
  --panel: #14161c;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* ===== サンプルサイト ===== */
.site { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 6vw; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: 3px; color: var(--accent-2); }
.site-nav { display: flex; gap: 26px; font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.site-nav span { cursor: default; }

.hero {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 8vh 6vw; max-width: 880px;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(201, 162, 94, 0.18), transparent 60%);
}
.hero-sub { letter-spacing: 4px; font-size: 12px; color: var(--accent); margin: 0 0 14px; }
.hero-title { font-size: clamp(28px, 5vw, 52px); line-height: 1.25; margin: 0 0 22px; }
.hero-lead { color: var(--muted); line-height: 1.9; font-size: 15px; max-width: 640px; }
.hero-lead strong { color: var(--accent-2); }
.hero-tags { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero-tags span {
  font-size: 12px; color: var(--accent-2);
  border: 1px solid rgba(201, 162, 94, 0.4); border-radius: 999px; padding: 6px 14px;
}

.site-footer {
  padding: 22px 6vw; font-size: 12px; color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.site-footer a { color: var(--accent); text-decoration: none; }

/* ===== ランチャーボタン ===== */
.chat-launcher {
  position: fixed; right: 26px; bottom: 26px; z-index: 50;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--accent), #b07f3e); color: #1a1305;
  box-shadow: var(--shadow); display: grid; place-items: center;
  transition: transform 0.15s ease;
}
.chat-launcher:hover { transform: scale(1.06); }

/* ===== チャットパネル ===== */
.chat-panel {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 380px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 48px);
  background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(0.98); opacity: 0; } }

.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; background: linear-gradient(135deg, #1b1e26, #14161c);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chat-title { font-weight: 700; font-size: 15px; }
.chat-status { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 8px #3ddc84; }
.chat-close { background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }

.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }

.msg { max-width: 82%; padding: 11px 14px; border-radius: 14px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.msg.bot { background: var(--chat-bot); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--chat-user); color: #1a1305; align-self: flex-end; border-bottom-right-radius: 4px; }

.typing { display: inline-flex; gap: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

.chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.chat-suggestions button {
  font-size: 12px; color: var(--accent-2); background: transparent; cursor: pointer;
  border: 1px solid rgba(201, 162, 94, 0.4); border-radius: 999px; padding: 7px 12px;
  transition: background 0.15s;
}
.chat-suggestions button:hover { background: rgba(201, 162, 94, 0.12); }

.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.chat-input input {
  flex: 1; background: #0f1115; border: 1px solid rgba(255, 255, 255, 0.1); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font-size: 14px; outline: none;
}
.chat-input input:focus { border-color: var(--accent); }
.chat-input button {
  border: none; cursor: pointer; border-radius: 10px; width: 44px;
  background: linear-gradient(135deg, var(--accent), #b07f3e); color: #1a1305; display: grid; place-items: center;
}
.chat-input button:disabled { opacity: 0.5; cursor: default; }

.chat-foot { text-align: center; font-size: 10px; color: var(--muted); padding: 0 0 10px; }

/* スマホ等で開いたときに背景を薄暗くする幕（PCでは出さない） */
.chat-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 55; display: none; animation: fadein 0.2s ease; }
@keyframes fadein { from { opacity: 0; } }

@media (max-width: 600px) {
  .site-nav { display: none; }
  /* 狭い画面は「下から出るシート」。上にサイトが見えるので“覆われた”感じが出ない */
  .chat-panel {
    right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%;
    height: 86vh; max-height: 86vh; border-radius: 18px 18px 0 0;
  }
  .chat-backdrop:not([hidden]) { display: block; }
}
