:root {
  --bg: #0b0a09;
  --panel: #141210;
  --ink: #f3eee4;
  --muted: #9b9287;
  --line: rgba(243, 238, 228, 0.12);
  --accent: #c9a36a;
  --accent-2: #ead9b2;
  --user: #2a2620;
  --danger: #c45a4a;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", sans-serif;
  --serif: "Didot", "Bodoni 72", "Hiragino Mincho ProN", "Yu Mincho", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.chat-page {
  --bg: #ffffff;
  --panel: #f3f3f3;
  --ink: #333333;
  --muted: #666666;
  --line: #dddddd;
  --accent: #ce1e23;
  --accent-2: #a51317;
  --user: #ececec;
  --danger: #d50000;
  --sans: Verdana, "游ゴシック", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}
.stage {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 22px 20px 18px;
}
.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -22px -20px 0;
  padding: 14px 20px;
  background: linear-gradient(to bottom, #313131, #202020);
  color: #fff;
  border-bottom: 3px solid #ce1e23;
}
.wordmark { display: flex; flex-direction: column; gap: 2px; }
.wm-name {
  font-family: Verdana, sans-serif;
  font-size: 22px;
  letter-spacing: 0.08em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}
.wm-sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff5252;
  margin-top: 5px;
}
.mast-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mast-hours { margin: 0; font-size: 11px; color: #ccc; letter-spacing: 0.04em; white-space: nowrap; }
.lang-switch { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch button {
  background: none;
  border: 0;
  padding: 0;
  color: #aaa;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.lang-switch button.on { color: #ff5252; }
.lang-switch button:hover { color: #fff; }
.faq-panel { flex: 1; min-height: 0; overflow: auto; padding: 22px 0 8px; }
.cat-grid { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 18px; }
.cat-btn, .choice {
  width: 100%;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  padding: 14px 16px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.04em;
}
.cat-btn:hover, .choice:hover { border-color: var(--accent); }
.choice { margin: 0 0 4px; }
.choice-note { margin: 0 4px 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.back {
  background: none;
  border: 0;
  color: #0048B4;
  font: inherit;
  font-size: 13px;
  padding: 0 0 12px;
  cursor: pointer;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 11px 4px;
  font-size: 14px;
  line-height: 1.5;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p {
  margin: 0 4px 12px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}
.human-btn {
  width: 100%;
  margin: 18px 0 8px;
  padding: 12px;
  border: 1px solid #a51317;
  background: linear-gradient(to bottom, #ce1e23, #a51317);
  color: #fff;
  font: inherit;
  letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 4px;
}
.human-btn:hover { background: linear-gradient(to bottom, #e0242a, #b4161b); }
.thread { flex: 1; min-height: 180px; display: flex; flex-direction: column; }
.log {
  flex: 1;
  overflow: auto;
  padding: 22px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.row { display: flex; }
.row.user { justify-content: flex-end; }
.bubble { max-width: 86%; }
.who {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 4px 4px;
}
.row.user .who { text-align: right; color: var(--accent-2); }
.msg {
  padding: 13px 16px;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  border-radius: 14px 14px 14px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
}
.row.user .msg {
  background: var(--user);
  border-radius: 14px 14px 4px 14px;
  border-color: transparent;
}
.welcome { padding: 28px 0 8px; }
.hello {
  font-size: 22px;
  letter-spacing: 0.04em;
  margin: 18px 0 10px;
  color: #222;
}
.local-preview {
  margin: 0 0 14px; font-size: 13px; color: var(--muted);
}
.local-preview a { color: var(--muted); margin-right: 12px; }
.local-preview a.on { color: #ff5252; }
.lede { margin: 0 0 22px; color: var(--muted); line-height: 1.75; font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 12.5px;
  letter-spacing: 0.02em;
  cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent-2); }
.bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  margin-top: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.bar textarea {
  resize: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.5;
  min-height: 44px;
  max-height: 160px;
  outline: none;
}
.bar button {
  align-self: end;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: linear-gradient(to bottom, #ce1e23, #a51317);
  color: #fff;
  font: inherit;
  font-weight: 650;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.site-back {
  display: block;
  margin: 16px 0 4px;
  text-align: center;
  color: #0048B4;
  font-size: 13px;
  text-decoration: none;
}
.site-back:hover { text-decoration: underline; }
.hidden { display: none !important; }
.typing { color: var(--muted); font-size: 13px; letter-spacing: 0.08em; }

body.admin-page {
  --bg: #ffffff;
  --panel: #f3f3f3;
  --ink: #333333;
  --muted: #666666;
  --line: #dddddd;
  --accent: #ce1e23;
  --accent-2: #a51317;
  --sans: Verdana, "游ゴシック", YuGothic, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100%;
}
body.admin-page .mast { margin: 0; }
body.admin-page .mast-link { color: #ff5252; margin: 0; }
.admin { max-width: 1100px; margin: 0 auto; padding: 22px 20px 40px; }
.tabs { display: flex; gap: 4px; margin: 0 0 18px; border-bottom: 1px solid var(--line); }
.tab {
  background: none; border: 0; border-bottom: 3px solid transparent;
  padding: 10px 16px; font: inherit; cursor: pointer; color: var(--muted);
}
.tab.on { color: var(--ink); border-bottom-color: #ce1e23; }
.card { background: var(--panel); border: 1px solid var(--line); padding: 16px; border-radius: 8px; }
.card h2 { margin: 0 0 12px; font-size: 16px; color: #222; }
.step-label { margin: 12px 0 6px; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.banner {
  background: #fff8f8; border: 1px solid #f0d0d0; color: #333;
  padding: 12px 14px; border-radius: 8px; margin: 0 0 16px; font-size: 13px; line-height: 1.6;
}
.banner strong { color: #a51317; }
.live-pill {
  display: inline-block; margin-left: 8px; padding: 2px 8px;
  border: 1px solid #ff5252; color: #ff5252; border-radius: 999px;
  font-size: 11px; letter-spacing: 0.04em;
}
.tabs { flex-wrap: wrap; }
.filter { display: flex; gap: 8px; margin: 0 0 14px; flex-wrap: wrap; }
.filter button {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 8px 14px; font: inherit; cursor: pointer; border-radius: 999px;
}
.filter button.on { border-color: #ce1e23; color: #ce1e23; }
.table-wrap { overflow-x: auto; }
.faq-block { margin-top: 18px; }
.faq-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.faq-title { margin: 0 0 4px; font-weight: 600; }
.faq-excerpt {
  margin: 0; color: var(--muted); font-size: 12.5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.faq-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 0 0 auto; }
.langs { font-size: 11px; color: var(--muted); }
.cat-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.cat-chip {
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  padding: 8px 12px; font: inherit; cursor: pointer; border-radius: 999px;
}
.cat-chip.on { border-color: #ce1e23; color: #ce1e23; }
.admin-page input, .admin-page select, .admin-page textarea.field {
  width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line);
  padding: 10px; margin: 0 0 8px; font: inherit; border-radius: 4px;
}
.btn {
  background: linear-gradient(to bottom, #ce1e23, #a51317);
  color: #fff; border: 0; padding: 10px 16px;
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 4px;
}
.btn.ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
}
.row-actions { display: flex; gap: 8px; margin: 8px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
.cell-body { max-width: 420px; white-space: pre-wrap; color: var(--muted); font-size: 12.5px; }
.cat-head { margin: 18px 0 8px; font-size: 14px; }
.cat-head small { color: var(--muted); font-weight: 400; }
.linkish {
  background: none; border: 0; color: #0048B4; font: inherit; cursor: pointer; padding: 0 8px 0 0;
}
.linkish.danger { color: #ce1e23; }
.suggest { border-top: 1px solid var(--line); padding: 12px 0; }
.suggest-cat { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.suggest-q { margin: 0 0 6px; font-weight: 600; }
.suggest-ex { margin: 0 0 6px; color: var(--muted); white-space: pre-wrap; font-size: 13px; }
.note { color: var(--muted); font-size: 12px; }
a { color: #0048B4; }
@media (max-width: 720px) {
  .mast { flex-direction: column; align-items: flex-start; gap: 10px; }
  .mast-right { align-items: flex-start; }
  .wm-name { font-size: 24px; letter-spacing: 0.16em; }
  .hello { font-size: 24px; }
  .faq-row { flex-direction: column; }
  .faq-side { align-items: flex-start; }
}
