/* AIto の windi.config.ts の配色に合わせる */
:root {
  --gray-100: #F4F6F7;
  --gray-200: #E8ECEE;
  --gray-300: #DCE2E5;
  --gray-400: #ADBBC2;
  --gray-600: #6D8692;
  --gray-800: #365463;
  --gray-900: #333333;
  --primary: #63BA93;
  --primary-600: #46A47A;
  --caution: #F26663;
  --caution-pale: #FFE1E0;
  --warning: #FFC531;
  --warning-pale: #FFF0C8;
  --link: #2487E2;
  --bg-primary: #EAF6F1;
  --bg-contents: #F2F5F7;
  --sidebar: #415462;
  --sidebar-active: #566d7d;
  /* FAQ公開ページ（既定テーマ） */
  --faq-main: #1f73b7;
  --faq-text: #505050;
  --faq-sub: #7f7f7f;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  color: var(--gray-900);
  background: var(--bg-contents);
  font-size: 14px;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }
[hidden] { display: none !important; }

/* ---------- モック用バー ---------- */
.mockbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 8px 16px;
  background: #1d2b33; color: #fff; font-size: 12px;
}
.mockbar__title { display: flex; align-items: center; gap: 8px; }
.mockbar__tag { background: var(--warning); color: #333; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.mockbar__tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.mocktab {
  border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff;
  padding: 6px 12px; border-radius: 999px; font-size: 12px;
}
.mocktab.is-active { background: #fff; color: #1d2b33; font-weight: 700; }
.mockbar__note { margin-left: auto; display: flex; align-items: center; gap: 6px; cursor: pointer; }

.view { display: none; }
.view.is-active { display: block; }

/* 注釈 */
.note {
  position: relative;
  margin: 12px 0; padding: 10px 12px 10px 12px;
  background: var(--warning-pale); border: 1px dashed #d9a400; border-radius: 6px;
  font-size: 12px; color: #5a4700; line-height: 1.6;
}
.note b {
  display: inline-block; margin-right: 6px; padding: 0 6px;
  background: var(--warning); color: #333; border-radius: 3px; font-size: 11px;
}
body.hide-notes [data-note] { display: none !important; }

/* ---------- 表示切替 ---------- */
.devicebar { display: flex; align-items: center; gap: 6px; padding: 10px 16px; font-size: 12px; color: var(--gray-600); }
.devbtn {
  border: 1px solid var(--gray-300); background: #fff; color: var(--gray-800);
  padding: 4px 12px; border-radius: 999px; font-size: 12px;
}
.devbtn.is-active { background: var(--gray-800); border-color: var(--gray-800); color: #fff; }

/* ---------- FAQ公開ページ ---------- */
.faqstage { position: relative; padding: 0 16px 40px; }
.faqpage {
  max-width: 1200px; margin: 0 auto; background: #fff;
  border-radius: 8px; box-shadow: 0 0 0 1px var(--gray-300); overflow: hidden;
  color: var(--faq-text);
}
.faq-header { background: var(--faq-main); color: #fff; }
.faq-header__inner { display: flex; align-items: center; gap: 24px; padding: 18px 24px; flex-wrap: wrap; }
.faq-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.faq-logo__mark {
  width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--faq-main);
  display: grid; place-items: center; font-weight: 700;
}
.faq-search {
  flex: 1; min-width: 240px; display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 999px; padding: 4px 4px 4px 14px; color: var(--faq-sub);
}
.faq-search input { flex: 1; border: 0; outline: 0; font: inherit; color: var(--faq-text); min-width: 0; padding: 6px 0; }
.faq-search__btn {
  border: 0; background: var(--faq-main); color: #fff; border-radius: 999px; padding: 6px 18px; font-weight: 700;
}

.faq-body { display: flex; align-items: flex-start; }
.tree-pane {
  width: 260px; flex: none; align-self: stretch;
  border-right: 1px solid #e6e6e6; padding: 16px 12px 24px; background: #fafbfc;
}
.tree-pane__head {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 13px; color: var(--faq-text); padding: 0 6px 10px;
  border-bottom: 1px solid #e6e6e6; margin-bottom: 8px;
}
.linkbtn { border: 0; background: none; color: var(--faq-main); font-size: 12px; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* ツリー */
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { padding-left: 14px; }
.tree-row {
  display: flex; align-items: center; gap: 4px; width: 100%;
  border: 0; background: none; text-align: left;
  padding: 6px 8px; border-radius: 6px; color: var(--faq-text); font-size: 13px;
}
.tree-row:hover { background: #eef4fa; }
.tree-row:focus-visible { outline: 2px solid var(--faq-main); outline-offset: -2px; }
.tree-row.is-selected { background: #e3eefa; color: var(--faq-main); font-weight: 700; }
.tree-row.is-ancestor { color: var(--faq-main); }
.tree-caret {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center;
  transition: transform .15s; color: var(--faq-sub);
}
.tree-caret svg { width: 12px; height: 12px; fill: currentColor; }
li.is-open > .tree-row .tree-caret { transform: rotate(90deg); }
.tree-caret--leaf { visibility: hidden; }
.tree-folder { width: 16px; height: 16px; flex: none; fill: #c9a24a; }
.tree-leaf { width: 14px; height: 14px; flex: none; fill: var(--faq-sub); }
.tree-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
li:not(.is-open) > ul { display: none; }

.faq-main { flex: 1; min-width: 0; padding: 20px 24px 32px; }
.sec-title {
  font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--faq-text);
  padding-left: 10px; border-left: 4px solid var(--faq-main);
}
.notice { background: #f7f9fb; border-radius: 6px; padding: 12px 14px; margin-bottom: 20px; }
.notice p { margin: 0; font-size: 13px; }

.crumbs {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13px;
}
.crumbs__label { color: var(--faq-sub); }
.crumb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e3eefa; color: var(--faq-main); border-radius: 999px; padding: 3px 6px 3px 12px; font-weight: 700;
}
.crumb-chip button {
  border: 0; background: rgba(31,115,183,.15); color: var(--faq-main);
  width: 20px; height: 20px; border-radius: 50%; line-height: 1; font-size: 13px;
}

.results-wrap { display: flex; gap: 20px; align-items: flex-start; }
.results { flex: 1; min-width: 0; }
.result-count { margin: -4px 0 10px; font-size: 12px; color: var(--faq-sub); }
.qa-list { list-style: none; margin: 0; padding: 0; }
.qa-item { border-bottom: 1px solid #ececec; }
.qa-q {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  border: 0; background: none; text-align: left; padding: 12px 4px; color: var(--faq-text); font-size: 14px;
}
.qa-q:hover { color: var(--faq-main); }
.qa-q__mark { color: var(--faq-main); font-weight: 700; flex: none; }
.qa-q__text { flex: 1; }
.qa-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.qa-tag { font-size: 11px; padding: 0 8px; border-radius: 999px; background: #eef4fa; color: var(--faq-main); }
.qa-tag--mix { background: #eeeeee; color: #777; }
.qa-a { display: none; padding: 0 4px 14px 28px; font-size: 13px; color: var(--faq-text); }
.qa-item.is-open .qa-a { display: block; }
.qa-empty { padding: 24px 0; color: var(--faq-sub); font-size: 13px; }

.ai-panel {
  width: 30%; min-width: 240px; flex: none;
  border: 1px solid #d7e6f4; background: #f5f9fd; border-radius: 8px; padding: 14px;
}
.ai-panel__head { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--faq-main); font-size: 13px; margin-bottom: 8px; }
.ai-panel__text { margin: 0; font-size: 13px; }
.ai-panel__foot { margin: 10px 0 0; font-size: 11px; color: var(--faq-sub); }

.sp-catbtn { display: none; }

/* ---------- スマートフォン表示 ---------- */
.faqstage.is-sp .faqpage { max-width: 390px; border-radius: 24px; box-shadow: 0 0 0 10px #1f2a30, 0 10px 30px rgba(0,0,0,.2); }
.faqstage.is-sp .faq-header__inner { padding: 14px 14px; gap: 12px; }
.faqstage.is-sp .faq-logo { font-size: 14px; }
.faqstage.is-sp .faq-search { min-width: 0; flex-basis: 100%; }
.faqstage.is-sp .tree-pane { display: none; }
.faqstage.is-sp .faq-main { padding: 14px; }
.faqstage.is-sp .results-wrap { flex-direction: column-reverse; }
.faqstage.is-sp .ai-panel { width: 100%; min-width: 0; }
.faqstage.is-sp .sp-catbtn {
  display: flex; align-items: center; gap: 6px; width: 100%;
  border: 1px solid #cfe0f0; background: #f5f9fd; color: var(--faq-main);
  border-radius: 999px; padding: 8px 14px; font-weight: 700; margin-bottom: 14px;
}

/* ボトムシート（SP） */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.sheet__panel {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(390px, 100%); max-height: 75vh; display: flex; flex-direction: column;
  background: #fff; border-radius: 16px 16px 0 0; color: var(--faq-text);
}
.sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-weight: 700; border-bottom: 1px solid #eee; }
.sheet .tree { overflow: auto; padding: 8px 10px; flex: 1; }
.sheet .tree-row { padding: 10px 8px; font-size: 14px; }
.sheet__foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #eee; }
.sheet__foot .btn { flex: 1; }
.iconbtn { border: 0; background: none; font-size: 22px; line-height: 1; color: var(--faq-sub); }

/* ---------- ボタン（AIto TheButton 準拠） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 7px 18px; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.btn .ico { width: 16px; height: 16px; }
.btn--main { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--main:hover:not(:disabled) { background: var(--primary-600); border-color: var(--primary-600); }
.btn--sub { background: #fff; border-color: var(--gray-800); color: var(--gray-800); }
.btn--sub:hover:not(:disabled) { background: var(--gray-100); }
.btn--caution { background: #fff; border-color: var(--caution); color: var(--caution); }
.btn:disabled { background: var(--gray-200); border-color: var(--gray-200); color: var(--gray-400); }
.faqstage .btn--main { background: var(--faq-main); border-color: var(--faq-main); }

/* ---------- 管理画面 ---------- */
.rolebar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--gray-300); font-size: 12px;
}
.rolebar__label { color: var(--gray-600); }
.seg { display: inline-flex; border: 1px solid var(--gray-800); border-radius: 999px; overflow: hidden; }
.seg button {
  border: 0; background: #fff; color: var(--gray-800); padding: 6px 14px; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 4px;
}
.seg button + button { border-left: 1px solid var(--gray-800); }
.seg button.is-active { background: var(--gray-800); color: #fff; }
.newdot { background: var(--caution); color: #fff; font-size: 10px; padding: 0 5px; border-radius: 999px; }

.admin { display: flex; min-height: calc(100vh - 96px); }
.sidebar { width: 180px; flex: none; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; }
.sidebar__logo { padding: 16px 16px 12px; border-bottom: 1px solid rgba(0,0,0,.08); }
.sidebar__logo img { height: 26px; filter: brightness(0) invert(1); }
.sidebar__scroll { overflow: auto; padding-bottom: 20px; }
.sb-group { padding-top: 10px; }
.sb-group__title { font-size: 11px; color: rgba(255,255,255,.6); padding: 4px 16px; letter-spacing: .04em; }
.sb-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 0; background: none; color: #fff; text-align: left;
  font-size: 12px; padding: 8px 16px 8px 22px;
}
.sb-item:hover { background: rgba(0,0,0,.15); }
.sb-item.is-active { background: var(--sidebar-active); font-weight: 700; }
.sb-item.is-dummy { opacity: .55; cursor: default; }
.sb-item.is-dummy:hover { background: none; }
.sb-badge { margin-left: auto; background: var(--caution); font-size: 9px; padding: 0 5px; border-radius: 999px; }

.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff; padding: 12px 24px; border-bottom: 1px solid var(--gray-300);
}
.admin-header h1 { margin: 0; font-size: 18px; color: var(--gray-800); }
.admin-user { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-300); display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--gray-800); }
.rolechip { background: var(--bg-primary); color: var(--primary-600); border-radius: 999px; padding: 1px 10px; font-weight: 700; }
.rolechip.is-sv { background: #fdeceb; color: var(--caution); }

.admin-content { padding: 20px 24px 100px; position: relative; }
.card { background: #fff; border-radius: 8px; box-shadow: 0 0 0 1px var(--gray-300); padding: 18px 20px; margin-bottom: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card__title { margin: 0; font-size: 15px; color: var(--gray-800); }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }

.lockbar {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: 8px;
  padding: 10px 14px; margin-bottom: 16px; font-size: 13px; color: var(--gray-800);
}
.lockbar .ico { margin-top: 2px; color: var(--gray-600); }

/* テーブル */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 700; color: var(--gray-600); font-size: 12px; background: var(--gray-100); padding: 10px 12px; border-bottom: 1px solid var(--gray-300); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--gray-200); vertical-align: middle; }
.tbl tr:hover td { background: #fafcfd; }
.tbl-wrap { overflow-x: auto; }
.num { text-align: right; }
.select {
  font: inherit; font-size: 13px; padding: 5px 28px 5px 10px; border: 1px solid var(--gray-300); border-radius: 6px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236D8692'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 6px center / 18px;
  appearance: none; color: var(--gray-900);
}
.select:disabled { background-color: var(--gray-100); color: var(--gray-400); }
.status { font-size: 12px; padding: 1px 10px; border-radius: 999px; background: var(--bg-primary); color: var(--primary-600); }
.status--wait { background: var(--warning-pale); color: #9a6f00; }

/* 権限表 */
.perm th, .perm td { text-align: center; }
.perm th:first-child, .perm td:first-child { text-align: left; }
.perm .grp td { background: var(--gray-100); font-weight: 700; color: var(--gray-800); font-size: 12px; }
.perm .col-sv { background: #fff7f6; }
.perm th.col-sv { background: #fdeceb; color: var(--caution); }
.mk { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: 12px; }
.mk--o { background: var(--bg-primary); color: var(--primary-600); }
.mk--x { background: var(--gray-200); color: var(--gray-400); }
.mk--q { background: var(--warning-pale); color: #9a6f00; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--gray-600); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* FAQ設定フォーム */
.form-row { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--gray-200); }
.form-row:last-child { border-bottom: 0; }
.form-row__label { font-weight: 700; font-size: 13px; color: var(--gray-800); padding-top: 4px; }
.newtag { display: inline-block; margin-left: 6px; font-size: 10px; background: var(--caution); color: #fff; padding: 0 6px; border-radius: 999px; vertical-align: middle; }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--gray-300); border-radius: 999px; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(18px); }
.switch input:disabled + span { opacity: .5; cursor: not-allowed; }
.radios { display: flex; gap: 12px; flex-wrap: wrap; }
.radio-card {
  width: 190px; border: 2px solid var(--gray-300); border-radius: 8px; padding: 10px; background: #fff; cursor: pointer; position: relative;
}
.radio-card input { position: absolute; opacity: 0; }
.radio-card.is-checked { border-color: var(--primary); background: #f6fbf8; }
.radio-card.is-disabled { cursor: not-allowed; opacity: .6; }
.radio-card__title { font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.thumb { height: 70px; border-radius: 4px; background: var(--gray-100); padding: 8px; display: flex; gap: 6px; }
.thumb--badge { flex-wrap: wrap; align-content: flex-start; }
.thumb--badge i { display: block; height: 12px; width: 40px; border-radius: 999px; background: #c9dcef; }
.thumb--tree .tp { width: 42%; border-right: 1px solid var(--gray-300); display: flex; flex-direction: column; gap: 5px; }
.thumb--tree .tp i { display: block; height: 7px; border-radius: 2px; background: #c9dcef; }
.thumb--tree .tp i:nth-child(2), .thumb--tree .tp i:nth-child(3) { margin-left: 8px; }
.thumb--tree .tp i:nth-child(3) { margin-left: 16px; background: #1f73b7; }
.thumb--tree .tc { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.thumb--tree .tc i { display: block; height: 7px; border-radius: 2px; background: var(--gray-300); }
.hint { font-size: 12px; color: var(--gray-600); margin-top: 6px; }
input[type=text].input { font: inherit; font-size: 13px; padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: 6px; width: 240px; max-width: 100%; }
input[type=text].input:disabled { background: var(--gray-100); color: var(--gray-400); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gray-300); margin-bottom: 16px; }
.tabs button { border: 0; background: none; padding: 10px 16px; font-size: 13px; font-weight: 700; color: var(--gray-600); border-bottom: 3px solid transparent; }
.tabs button.is-active { color: var(--gray-800); border-bottom-color: var(--primary); }

.navbar {
  position: sticky; bottom: 0; margin: 0 -24px -100px; padding: 10px; background: #fff;
  box-shadow: 0 -1px 0 var(--gray-300), 0 -4px 12px rgba(0,0,0,.04);
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.navbar__msg { width: 100%; text-align: center; font-size: 11px; color: var(--gray-600); }

.denied { text-align: center; padding: 60px 20px; color: var(--gray-600); }
.denied .ico { width: 40px; height: 40px; color: var(--gray-400); }
.denied h2 { font-size: 16px; color: var(--gray-800); margin: 10px 0 6px; }

/* モーダル */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.modal__panel { position: relative; background: #fff; border-radius: 10px; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 20px; }
.modal__panel h3 { margin: 0 0 14px; font-size: 16px; color: var(--gray-800); }
.role-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--gray-300); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.role-opt.is-checked { border-color: var(--primary); background: #f6fbf8; }
.role-opt input { margin-top: 4px; accent-color: var(--primary); }
.role-opt__name { font-weight: 700; font-size: 13px; }
.role-opt__desc { font-size: 12px; color: var(--gray-600); }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: var(--gray-800); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: .2s; z-index: 80;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 画面幅が狭いとき（実機のスマホで開いた場合） ---------- */
@media (max-width: 760px) {
  .mockbar__note { margin-left: 0; }
  .faqstage { padding: 0 0 32px; }
  .faqpage { border-radius: 0; }
  .tree-pane { display: none; }
  .sp-catbtn { display: flex !important; align-items: center; gap: 6px; width: 100%; border: 1px solid #cfe0f0; background: #f5f9fd; color: var(--faq-main); border-radius: 999px; padding: 8px 14px; font-weight: 700; margin-bottom: 14px; }
  .results-wrap { flex-direction: column-reverse; }
  .ai-panel { width: 100%; min-width: 0; }
  .faq-main { padding: 14px 16px; }
  .admin { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar__scroll { display: flex; overflow-x: auto; padding: 0 0 6px; }
  .sb-group { display: flex; align-items: center; padding-top: 0; flex: none; }
  .sb-group__title { display: none; }
  .sb-item { white-space: nowrap; padding: 8px 12px; }
  .sb-item.is-dummy { display: none; }
  .admin-header, .admin-content { padding-left: 16px; padding-right: 16px; }
  .navbar { margin: 0 -16px -100px; }
  .form-row { grid-template-columns: 1fr; }
  .rolebar .seg { flex-wrap: wrap; }
}

/* ---------- スーパーバイザーの説明 ---------- */
.rolebar__desc { width: 100%; margin: 0; font-size: 12px; color: var(--gray-800); }
.guide { background: #fff; border-bottom: 1px solid var(--gray-300); padding: 14px 16px 16px; }
.guide__head { display: flex; justify-content: space-between; align-items: center; }
.guide__head h2 { margin: 0; font-size: 15px; color: var(--gray-800); }
.guide__lead { margin: 8px 0 12px; font-size: 13px; }
.guide__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.guide__col { border: 1px solid var(--gray-300); border-radius: 8px; padding: 10px 14px; background: var(--gray-100); }
.guide__col h3 { margin: 0 0 6px; font-size: 13px; color: var(--gray-800); }
.guide__col ul { margin: 0; padding-left: 18px; font-size: 13px; }
.guide__col p { margin: 0; font-size: 12px; color: var(--gray-800); }
.guide__col--ok { background: var(--bg-primary); border-color: #bfe3d2; }
.guide__col--ok h3 { color: var(--primary-600); }
.guide__col--ng { background: #fff4f3; border-color: #f7c9c7; }
.guide__col--ng h3 { color: var(--caution); }
.guide__steps { margin-top: 12px; font-size: 12px; color: var(--gray-800); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.guide__steps ol { margin: 0; padding-left: 18px; display: flex; gap: 22px; flex-wrap: wrap; }

.access {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 8px; padding: 12px 14px; margin-bottom: 16px; font-size: 13px; border: 1px solid;
}
.access__pill { flex: none; font-size: 12px; font-weight: 700; padding: 2px 12px; border-radius: 999px; color: #fff; margin-top: 1px; }
.access__who { font-size: 11px; color: var(--gray-600); margin-bottom: 2px; }
.access--edit { background: var(--bg-primary); border-color: #bfe3d2; }
.access--edit .access__pill { background: var(--primary-600); }
.access--view { background: var(--gray-100); border-color: var(--gray-300); }
.access--view .access__pill { background: var(--gray-600); }
.access--deny { background: #fff4f3; border-color: #f7c9c7; }
.access--deny .access__pill { background: var(--caution); }

.sb-perm { margin-left: auto; font-size: 9px; font-weight: 700; padding: 0 6px; border-radius: 999px; line-height: 16px; }
.sb-perm--e { background: var(--primary); color: #fff; }
.sb-perm--v { background: rgba(255,255,255,.2); color: #fff; }
.sb-perm--q { background: var(--warning); color: #333; }

.concept__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 10px; }
.concept__k { font-size: 12px; font-weight: 700; color: var(--caution); margin-bottom: 4px; }
.concept__grid p { margin: 0; font-size: 13px; }

@media (max-width: 760px) {
  .guide__cols, .concept__grid { grid-template-columns: 1fr; }
  .guide__steps ol { flex-direction: column; gap: 2px; }
}
.sb-perm { flex: none; white-space: nowrap; }
.guide__steps { display: block; }
.guide__steps ol { display: block; margin-top: 4px; }
.guide__steps li { margin: 2px 0; }

/* ---------- FAQ側の説明・比較 ---------- */
.guide--faq { margin: 0 0 4px; }
.guide__caution {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--warning-pale); border: 1px solid #f0d78a; font-size: 12px; color: #5a4700;
}
.guide__caution b { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 3px; background: var(--warning); color: #333; font-size: 11px; }
.devicebar { flex-wrap: wrap; }
.devicebar__sep { width: 1px; height: 18px; background: var(--gray-300); margin: 0 6px; }
.modebtn {
  border: 1px solid var(--gray-300); background: #fff; color: var(--gray-800);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; display: inline-flex; align-items: center; gap: 4px;
}
.modebtn.is-active { background: var(--gray-800); border-color: var(--gray-800); color: #fff; }

.faqstage.is-badge .tree-pane { display: none; }
.faqstage.is-badge .sp-catbtn { display: none !important; }
.badge-panel { margin-bottom: 18px; padding-bottom: 6px; border-bottom: 1px solid #ececec; }
.badge-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.badge-panel__title { font-weight: 700; font-size: 14px; color: var(--faq-text); }
.btn--sm { padding: 5px 14px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.badge-row--sub { padding-left: 14px; }
.badge-row--sub2 { padding-left: 28px; }
.lbadge {
  border: 1px solid #cfe0f0; background: #fff; color: var(--faq-main);
  border-radius: 999px; padding: 4px 14px; font-size: 13px;
}
.lbadge:hover { background: #f1f7fd; }
.lbadge.is-on { background: var(--faq-main); border-color: var(--faq-main); color: #fff; font-weight: 700; }

/* ---------- 案2・案a ---------- */
.tree-count { flex: none; font-size: 11px; color: var(--faq-sub); background: #eef1f4; border-radius: 999px; padding: 0 7px; line-height: 18px; }
.tree-row.is-selected .tree-count { background: #fff; color: var(--faq-main); }
.qa-tag--pop { background: #fff1e6; color: #c25e00; font-weight: 700; }
.qa-group { list-style: none; margin-bottom: 14px; }
.qa-group__title { font-size: 13px; font-weight: 700; color: var(--faq-main); margin: 6px 0 2px; padding: 4px 0; border-bottom: 1px dashed #d7e6f4; }

/* ---------- ナレッジ管理（モックの操作） ---------- */
.linkbtn--admin { color: var(--link); font-size: 13px; text-align: left; }
.crumb-back { display: inline-block; margin-bottom: 10px; }
.tbl--qa td { vertical-align: top; }
.qa-cell { min-width: 180px; max-width: 280px; }
.qa-cell--a { color: var(--gray-600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--gray-400); font-size: 12px; }
.empty { text-align: center; color: var(--gray-600); padding: 24px 12px !important; }
.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 12px; font-weight: 700; color: var(--gray-800); margin-bottom: 4px; }
.field__label em { font-style: normal; font-size: 10px; background: var(--caution); color: #fff; border-radius: 999px; padding: 0 6px; margin-left: 4px; }
.field .input, .field .select, .field .textarea { width: 100%; }
.field-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.textarea { font: inherit; font-size: 13px; padding: 8px 10px; border: 1px solid var(--gray-300); border-radius: 6px; resize: vertical; }
.textarea:disabled, .input:disabled { background: var(--gray-100); color: var(--gray-600); }
.file { font-size: 13px; }
.form-error { color: var(--caution); font-size: 12px; margin: 4px 0 0; }
.dialog-text { font-size: 14px; margin: 0 0 8px; }
.btn--danger { background: var(--caution); border-color: var(--caution); color: #fff; }
.modal__panel { width: min(640px, 100%); }
@media (max-width: 760px) { .field-row { grid-template-columns: 1fr; } }
