﻿/* Q&A pages and board editor. */
/* Q&A site */
.qa-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px;
}

.qa-sidebar,
.qa-list-panel,
.qa-detail-panel,
.qa-dialog {
  border: 1px solid rgba(68, 88, 100, 0.18);
  border-radius: 8px;
  background: #fffdfa;
  box-shadow: 0 12px 28px rgba(61, 75, 86, 0.08);
}

.qa-sidebar {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
}

.qa-sidebar label,
.qa-dialog label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.qa-sidebar input,
.qa-sidebar select,
.qa-dialog input,
.qa-dialog select,
.qa-dialog textarea,
.qa-answer-form textarea {
  width: 100%;
  border: 1px solid #cbd7e2;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.qa-main,
.qa-question-list,
.qa-answer-list,
.qa-answer-form,
.qa-board-editor {
  display: grid;
  gap: 10px;
}

.qa-list-panel,
.qa-detail-panel {
  padding: 14px;
}

.qa-section-header {
  justify-content: space-between;
  margin-bottom: 10px;
}

.qa-status-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #eef3f6;
}

.qa-status-tabs button {
  min-height: 36px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.qa-status-tabs button.active {
  border-color: #c6d7e5;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(31, 41, 51, 0.04);
}

.qa-question-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #f8fbfd;
  cursor: pointer;
}

.qa-question-row:hover {
  border-color: #9bb7d3;
  background: #f2f8fc;
}

.qa-question-row h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.qa-tags,
.qa-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qa-tags span,
.qa-tag-list button {
  border: 1px solid #d7e3dc;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f2f8f0;
  color: #274d37;
  font-size: 12px;
  font-weight: 850;
}

.qa-tag-list button.active {
  border-color: var(--accent);
  background: #eef6ff;
  color: var(--accent-dark);
}

.qa-answerer-profile-panel {
  display: grid;
  gap: 10px;
  padding-top: 2px;
}

.qa-answerer-profile-panel h2 {
  margin: 0;
  font-size: 15px;
}

.qa-profile-list {
  display: grid;
  gap: 8px;
}

.qa-profile-card {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #f8fbfd;
}

.qa-profile-head,
.qa-answer-author {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.qa-profile-head strong,
.qa-answer-author strong {
  color: var(--ink);
  font-size: 14px;
}

.qa-rank-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(54, 92, 69, 0.28);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(219, 239, 224, 0.72)),
    #e8f4eb;
  color: #274d37;
  font-size: 11px;
  font-weight: 950;
}

.qa-profile-stats,
.qa-profile-meta,
.qa-answer-profile {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: #506172;
  font-size: 12px;
  font-weight: 850;
}

.qa-profile-stats span,
.qa-profile-meta span,
.qa-answer-profile span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef3f6;
}

.qa-profile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.qa-profile-categories span {
  padding: 3px 7px;
  border-radius: 999px;
  background: #fffdfa;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.qa-profile-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.qa-question-detail-card,
.qa-answer-form,
.qa-answer-card,
.qa-admin-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #f8fbfd;
}

.qa-question-detail-card header,
.qa-answer-card header,
.qa-dialog header,
.qa-dialog footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.qa-detail-body,
.qa-answer-card p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.7;
}

.qa-answer-card.best {
  border-color: #b9cfbf;
  background: #f2f8f0;
}

.qa-attached-image {
  max-width: 320px;
  border-radius: 8px;
  border: 1px solid #d8e3ee;
}

.qa-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.46);
}

.qa-dialog {
  width: min(900px, 100%);
  max-height: 92vh;
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.qa-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.qa-board-toolbar {
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid #d8e3ee;
  border-radius: 8px;
  background: #f7fafc;
}

.qa-board-toolbar select,
.qa-board-toolbar button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
}

.qa-board-toolbar button.active {
  border-color: var(--accent);
  background: #eef6ff;
  color: var(--accent-dark);
}

.qa-board {
  --qa-board-size: 19;
  --qa-cell-size: calc(100% / var(--qa-board-size));
  box-sizing: content-box;
  width: min(100%, 440px);
  max-width: 100%;
  aspect-ratio: 1;
  display: grid;
  /* 座標文字やbuttonの既定最小幅で交点が広がらないよう、盤面幅を厳密に均等分割する。 */
  grid-template-columns: repeat(var(--qa-board-size), minmax(0, 1fr));
  grid-template-rows: repeat(var(--qa-board-size), minmax(0, 1fr));
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--board-wood-bg);
  box-shadow:
    inset 0 0 0 999px rgba(255, 255, 255, 0.04),
    0 12px 24px rgba(49, 38, 20, 0.12);
}

.qa-board.thumbnail {
  width: 72px;
  border-width: 0;
  border-radius: 5px;
  box-shadow: none;
}

/* =====================================================================
   Logged-in portal home and AI character browser v20260810
   ===================================================================== */
.portal-page {
  --portal-bg: #fffaf7;
  --portal-surface: rgba(255, 255, 255, 0.96);
  --portal-text: #4a2a22;
  --portal-muted: #7f6f69;
  --portal-line: #efdcd4;
  --portal-pink: #ef6675;
  --portal-pink-soft: #fff0f2;
  --portal-blue: #55a7df;
  --portal-blue-soft: #eef8ff;
  --portal-green: #83b85f;
  --portal-green-soft: #f0f8eb;
  --portal-yellow: #efb33b;
  --portal-purple: #9972d2;
  min-height: 100dvh;
  margin: 0;
  color: var(--portal-text);
  background:
    radial-gradient(circle at 9% 13%, rgba(255, 201, 211, 0.34), transparent 24%),
    radial-gradient(circle at 91% 18%, rgba(187, 228, 249, 0.38), transparent 27%),
    linear-gradient(180deg, #fffdfb 0%, var(--portal-bg) 52%, #f6fbf1 100%);
  font-family: "Noto Sans JP", sans-serif;
}

.portal-page::before,
.portal-page::after {
  position: fixed;
  z-index: -1;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  opacity: 0.24;
  filter: blur(2px);
  pointer-events: none;
  content: "";
}

.portal-page::before {
  top: 92px;
  left: -130px;
  background: radial-gradient(circle, #ffd9e0, transparent 68%);
}

.portal-page::after {
  right: -120px;
  bottom: -100px;
  background: radial-gradient(circle, #dcefcf, transparent 68%);
}

.portal-shell {
  width: min(1500px, calc(100% - 42px));
  margin: 0 auto;
  padding: 22px 0 38px;
  transition: opacity 0.18s ease;
}

.portal-eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: #d05d68;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.portal-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 270px) minmax(240px, 0.75fr) minmax(550px, 1.65fr);
  gap: 24px;
  min-height: 274px;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid #f2d9d2;
  border-radius: 24px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.46) 39%, rgba(255,255,255,0.14) 72%, rgba(255,255,255,0.28) 100%),
    image-set(url("/assets/portal-spring-landscape-v1.avif") type("image/avif"), url("/assets/portal-spring-landscape-v1.webp") type("image/webp"), url("/assets/portal-spring-landscape-v1.png") type("image/png")) center 61% / 100% auto no-repeat,
    #dff4ff;
  box-shadow: 0 16px 42px rgba(108, 70, 54, 0.11);
}

.portal-hero::after {
  position: absolute;
  right: -4%;
  bottom: -80px;
  left: 0;
  height: 130px;
  background: radial-gradient(ellipse at center, rgba(196, 230, 168, 0.42), transparent 70%);
  pointer-events: none;
  content: "";
}

.portal-hero-character,
.portal-profile-avatar,
.portal-character-art,
.portal-detail-portrait,
.ai-game-character-preset-art {
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.portal-hero-character {
  position: relative;
  z-index: 1;
  align-self: end;
  width: min(100%, 260px);
  aspect-ratio: 1;
  border-radius: 48% 48% 18px 18px;
  box-shadow: 0 12px 28px rgba(104, 67, 58, 0.13);
}

.portal-hero-copy {
  position: relative;
  z-index: 1;
  align-self: center;
  padding: 12px 0;
}

.portal-hero-copy h1 {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(26px, 2.25vw, 38px);
  line-height: 1.42;
  letter-spacing: 0.035em;
}

.portal-hero-copy p {
  margin: 16px 0 0;
  color: var(--portal-muted);
  font-size: 16px;
  font-weight: 600;
}

.portal-hero-actions {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-self: center;
}

.portal-action-card {
  display: flex;
  min-height: 176px;
  padding: 17px 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 2px solid currentColor;
  border-radius: 20px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.46), 0 9px 18px rgba(81, 60, 52, 0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.portal-action-card:hover {
  transform: translateY(-4px);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.58), 0 14px 24px rgba(81, 60, 52, 0.16);
}

.portal-action-card--pink { background: linear-gradient(145deg, #fa8993, #ed6675); }
.portal-action-card--green { background: linear-gradient(145deg, #9bc876, #78ae57); }
.portal-action-card--blue { background: linear-gradient(145deg, #6bb9e9, #439bd8); }

.portal-action-card strong { font-size: 19px; }
.portal-action-card small { color: rgba(255,255,255,0.9); font-size: 11px; }

.portal-action-icon {
  position: relative;
  display: grid;
  width: 64px;
  height: 54px;
  margin-bottom: 5px;
  place-items: center;
  border-radius: 15px;
  background: rgba(255,255,255,0.82);
  color: currentColor;
  font-size: 32px;
}

.portal-action-icon--board::before,
.portal-action-icon--review::before {
  width: 38px;
  height: 38px;
  border: 2px solid #aa7342;
  background:
    linear-gradient(90deg, transparent 31%, #b7814d 32%, #b7814d 35%, transparent 36%, transparent 64%, #b7814d 65%, #b7814d 68%, transparent 69%),
    linear-gradient(transparent 31%, #b7814d 32%, #b7814d 35%, transparent 36%, transparent 64%, #b7814d 65%, #b7814d 68%, transparent 69%),
    #edc780;
  content: "";
}

.portal-action-icon--review::after {
  position: absolute;
  right: 8px;
  bottom: 6px;
  width: 17px;
  height: 17px;
  border: 3px solid #725846;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  content: "";
}

.portal-action-icon--question {
  border-radius: 50%;
  color: #4c9ed5;
  font-weight: 800;
}

.portal-hero-secondary {
  position: absolute;
  right: 24px;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.portal-hero-secondary a {
  padding: 7px 12px;
  border: 1px solid #eadbd4;
  border-radius: 999px;
  background: rgba(255,255,255,0.86);
  color: #60453c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.portal-section,
.portal-card {
  border: 1px solid var(--portal-line);
  border-radius: 20px;
  background: var(--portal-surface);
  box-shadow: 0 10px 28px rgba(99, 68, 55, 0.075);
}

.portal-section { margin-top: 18px; padding: 18px; }

.portal-section-heading,
.portal-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.portal-section-heading h2,
.portal-card-heading h2 {
  margin: 0;
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
}

.portal-section-heading > a,
.portal-card-heading > a {
  color: #357aa8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.portal-character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.portal-character-grid--home {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 14px;
}

.portal-character-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--character-line, #f0d3d7);
  border-radius: 17px;
  background: var(--character-soft, #fff5f6);
  box-shadow: 0 7px 18px rgba(87, 61, 53, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.portal-character-card:hover,
.portal-character-card.selected {
  transform: translateY(-3px);
  border-color: var(--character, #ec6977);
  box-shadow: 0 13px 24px rgba(87, 61, 53, 0.13);
}

.portal-character-card--pink { --character:#ef6877; --character-soft:#fff2f4; --character-line:#f3c7ce; }
.portal-character-card--blue { --character:#50a4df; --character-soft:#eff8ff; --character-line:#c9e3f3; }
.portal-character-card--green { --character:#78aa54; --character-soft:#f2f8ed; --character-line:#d1e5c2; }
.portal-character-card--purple { --character:#946cce; --character-soft:#f7f1ff; --character-line:#ddcdf0; }
.portal-character-card--yellow { --character:#e5a82f; --character-soft:#fff8e8; --character-line:#efdbac; }
.portal-character-card--red { --character:#bf3f49; --character-soft:#fff1f2; --character-line:#ecc4c7; }

.portal-character-picture {
  display: block;
}

.portal-character-select {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.portal-character-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  background-color: var(--character-soft);
}

.portal-character-body { padding: 12px; }

.portal-character-body header {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
}

.portal-character-body h3 {
  margin: 0;
  color: var(--character);
  font-size: 20px;
}

.portal-character-body header span {
  overflow: hidden;
  color: #7a6862;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-character-meta {
  min-height: 34px;
  margin: 6px 0 0;
  color: #58433c;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.portal-character-description {
  display: -webkit-box;
  min-height: 36px;
  margin: 5px 0 10px;
  overflow: hidden;
  color: var(--portal-muted);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.portal-character-body > a,
.portal-character-actions a {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--character);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.portal-character-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; }

.portal-character-actions button {
  padding: 0 11px;
  border: 1px solid var(--character);
  border-radius: 9px;
  background: #fff;
  color: var(--character);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.portal-home-columns {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr 0.8fr;
  gap: 16px;
  margin-top: 16px;
}

.portal-card { padding: 16px; }

.portal-qa-list { margin-top: 10px; }

.portal-qa-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border-top: 1px solid #f1e7e2;
  color: var(--portal-text);
  text-decoration: none;
}

.portal-qa-row:first-child { border-top: 0; }

.portal-qa-category {
  padding: 4px 6px;
  border-radius: 7px;
  background: #fff0e9;
  color: #a56147;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

.portal-qa-copy { min-width: 0; }
.portal-qa-copy strong,
.portal-qa-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-qa-copy strong { font-size: 12px; }
.portal-qa-copy small { margin-top: 3px; color: var(--portal-muted); font-size: 9px; }
.portal-qa-stats { text-align: right; }
.portal-qa-stats b,
.portal-qa-stats small { display: block; color: var(--portal-muted); font-size: 9px; white-space: nowrap; }

.portal-learning-card > a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 10px;
  align-items: center;
  min-height: 60px;
  border-top: 1px solid #f1e7e2;
  color: var(--portal-text);
  text-decoration: none;
}

.portal-learning-card > a:first-of-type { margin-top: 10px; border-top: 0; }
.portal-learning-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #fff4db; font-size: 20px; }
.portal-learning-card strong,
.portal-learning-card small { display: block; }
.portal-learning-card strong { font-size: 12px; }
.portal-learning-card small { margin-top: 2px; color: var(--portal-muted); font-size: 9px; line-height: 1.4; }
.portal-learning-card b { color: #a18e85; }

.portal-profile-summary { display: flex; gap: 11px; align-items: center; margin: 12px 0; }
.portal-profile-avatar { width: 58px; height: 58px; flex: 0 0 auto; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 3px 12px rgba(92,59,50,0.14); }
.portal-profile-summary strong,
.portal-profile-summary small { display: block; }
.portal-profile-summary strong { font-size: 14px; }
.portal-profile-summary small { margin-top: 3px; color: #e46570; font-size: 11px; font-weight: 800; }
.portal-mypage-card nav a { display:flex; justify-content:space-between; padding:10px 2px; border-top:1px solid #f1e7e2; color:var(--portal-text); font-size:11px; text-decoration:none; }
.portal-mypage-card nav b { color:#da7380; }
.portal-outline-button,
.portal-primary-button,
.portal-text-button { display:flex; align-items:center; justify-content:center; text-decoration:none; }
.portal-outline-button { min-height:34px; margin-top:10px; border:1px solid #e7b9ae; border-radius:9px; color:#9b554b; font-size:11px; font-weight:800; }
.portal-loading,
.portal-empty { color: var(--portal-muted); font-size: 11px; }

.portal-page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin: 8px 0 18px;
}

.portal-page-heading h1 { margin:0; font-family:"Noto Serif JP",serif; font-size:32px; }
.portal-page-heading p { margin:7px 0 0; color:var(--portal-muted); font-size:13px; }
.portal-character-search { display:flex; width:min(320px,100%); min-height:44px; align-items:center; gap:8px; padding:0 14px; border:1px solid #e7d8d1; border-radius:13px; background:#fff; }
.portal-character-search span { color:#9a8d87; font-size:22px; }
.portal-character-search input { width:100%; border:0; outline:0; background:transparent; color:var(--portal-text); font:inherit; }

.portal-character-layout { display:grid; grid-template-columns:minmax(0,1fr) 370px; gap:20px; align-items:start; }
.portal-character-browser { min-width:0; }
.portal-character-filters { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.portal-character-filters button { min-height:36px; padding:0 18px; border:1px solid #eadbd4; border-radius:999px; background:#fff; color:#65524a; font-size:11px; font-weight:700; cursor:pointer; }
.portal-character-filters button.active { border-color:#f07a84; background:#fff1f3; color:#d85462; }

.portal-character-detail {
  position: sticky;
  top: 76px;
  padding: 18px;
  border: 1px solid #f0d4d1;
  border-radius: 20px;
  background: rgba(255,255,255,0.97);
  box-shadow: 0 14px 32px rgba(95,60,52,0.1);
  text-align: center;
}

.portal-detail-label { display:block; margin-bottom:10px; color:#d95a66; font-size:11px; font-weight:800; text-align:left; }
.portal-detail-portrait { width:min(220px,78%); margin:0 auto; aspect-ratio:1; border:4px solid #fff; border-radius:18px; box-shadow:0 8px 20px rgba(87,55,48,0.13); }
.portal-character-detail h2 { margin:12px 0 0; color:#d75561; font-family:"Noto Serif JP",serif; font-size:28px; }
.portal-detail-title { margin:2px 0 8px; color:#7d6b64; font-size:12px; font-weight:700; }
.portal-detail-badges { display:flex; justify-content:center; flex-wrap:wrap; gap:6px; }
.portal-detail-badges span { padding:5px 10px; border:1px solid #f0cbc9; border-radius:999px; background:#fff5f5; color:#965851; font-size:10px; font-weight:700; }
.portal-character-detail > p:not(.portal-detail-title):not(.portal-character-recommendation) { color:var(--portal-muted); font-size:11px; line-height:1.7; }
.portal-character-setting-summary { margin:14px 0; border:1px solid #f1e3de; border-radius:13px; overflow:hidden; text-align:left; }
.portal-character-setting-summary div { display:flex; justify-content:space-between; gap:10px; padding:10px 12px; border-top:1px solid #f1e3de; }
.portal-character-setting-summary div:first-child { border-top:0; }
.portal-character-setting-summary dt { color:var(--portal-muted); font-size:10px; }
.portal-character-setting-summary dd { margin:0; font-size:11px; font-weight:800; }
.portal-character-recommendation { padding:10px; border-radius:12px; background:#fff9ea; color:#705f47; font-size:10px; line-height:1.6; text-align:left; }
.portal-primary-button { min-height:46px; border-radius:11px; background:linear-gradient(135deg,#f37782,#dc4e5d); color:#fff; font-size:13px; font-weight:800; box-shadow:0 8px 16px rgba(216,72,87,0.22); }
.portal-text-button { min-height:38px; margin-top:7px; color:#786861; font-size:10px; font-weight:700; }

.portal-coming-soon { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:16px; }
.portal-coming-soon article { display:grid; min-height:132px; place-items:center; align-content:center; gap:4px; border:1px dashed #d8cfca; border-radius:17px; background:rgba(255,255,255,0.56); color:#8b807a; text-align:center; }
.portal-coming-soon article > span { display:grid; width:42px; height:42px; place-items:center; border-radius:50%; background:#e9e4e1; font-size:20px; font-weight:800; }
.portal-coming-soon strong { font-size:13px; }
.portal-coming-soon small { font-size:9px; }
.portal-character-empty { padding:30px; border:1px dashed #dfd4cf; border-radius:16px; color:var(--portal-muted); text-align:center; }

.portal-error { width:min(560px,calc(100% - 32px)); margin:80px auto; padding:24px; border:1px solid #efc8c8; border-radius:16px; background:#fff; color:#7d3434; text-align:center; box-shadow:0 12px 28px rgba(80,40,40,0.1); }
.portal-error a { color:#2d789f; font-weight:700; }

.ai-game-character-preset {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 10px;
  border: 1px solid #f0cfd0;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff4f5, #fff);
}

.ai-game-character-preset[hidden] { display:none; }
.ai-game-character-preset-art { width:82px; height:82px; border-radius:13px; box-shadow:0 4px 12px rgba(91,58,50,0.13); }
.ai-game-character-preset span { color:#c95762; font-size:9px; font-weight:800; }
.ai-game-character-preset h2 { margin:2px 0; color:#6b3434; font-size:20px; }
.ai-game-character-preset p { margin:0; color:#6f625d; font-size:10px; font-weight:700; }
.ai-game-character-preset a { display:inline-block; margin-top:5px; color:#367ba3; font-size:9px; font-weight:700; }

@media (max-width: 1180px) {
  .portal-hero { grid-template-columns:200px 0.7fr 1.55fr; gap:16px; }
  .portal-character-grid--home { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .portal-home-columns { grid-template-columns:1fr 1fr; }
  .portal-mypage-card { grid-column:1 / -1; }
  .portal-character-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .portal-shell { width:min(100% - 24px,760px); padding-top:14px; }
  .portal-hero { grid-template-columns:170px 1fr; min-height:0; }
  .portal-hero-actions { grid-column:1 / -1; }
  .portal-hero-secondary { position:static; grid-column:1 / -1; justify-content:flex-end; }
  .portal-character-layout { grid-template-columns:1fr; }
  .portal-character-detail { position:static; }
}

@media (max-width: 700px) {
  .portal-shell { width:calc(100% - 16px); padding:8px 0 22px; }
  .portal-hero { display:block; padding:14px; border-radius:18px; }
  .portal-hero-character { float:left; width:112px; margin:0 12px 8px 0; }
  .portal-hero-copy { min-height:118px; padding:5px 0; }
  .portal-hero-copy h1 { font-size:21px; }
  .portal-hero-copy p { margin-top:8px; font-size:12px; }
  .portal-hero-actions { display:grid; clear:both; grid-template-columns:1fr; gap:8px; }
  .portal-action-card { min-height:76px; padding:10px; flex-direction:row; justify-content:flex-start; text-align:left; }
  .portal-action-icon { width:48px; height:48px; flex:0 0 auto; margin:0; }
  .portal-action-card small { margin-left:auto; }
  .portal-hero-secondary { display:grid; grid-template-columns:1fr 1fr; margin-top:9px; }
  .portal-hero-secondary a { text-align:center; }
  .portal-section { padding:13px; border-radius:16px; }
  .portal-character-grid--home,
  .portal-character-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .portal-character-body { padding:9px; }
  .portal-character-body h3 { font-size:16px; }
  .portal-character-body header span { display:none; }
  .portal-character-meta { min-height:42px; font-size:9px; }
  .portal-character-description { display:none; }
  .portal-home-columns { grid-template-columns:1fr; gap:10px; }
  .portal-mypage-card { grid-column:auto; }
  .portal-page-heading { display:block; margin:4px 2px 14px; }
  .portal-page-heading h1 { font-size:24px; }
  .portal-character-search { width:auto; margin-top:12px; }
  .portal-character-filters { flex-wrap:nowrap; overflow-x:auto; padding-bottom:4px; }
  .portal-character-filters button { flex:0 0 auto; padding:0 13px; }
  .portal-character-detail { padding:14px; }
  .portal-coming-soon { gap:9px; }
}

@media (max-width: 390px) {
  .portal-qa-row { grid-template-columns:48px minmax(0,1fr); }
  .portal-qa-stats { display:none; }
  .portal-action-card small { display:none; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-action-card,
  .portal-character-card { transition:none; }
  .portal-action-card:hover,
  .portal-character-card:hover { transform:none; }
}

.qa-board.qa-board-coordinates-active {
  margin-top: var(--qa-coordinate-gutter, 18px);
  margin-left: var(--qa-coordinate-gutter, 18px);
  overflow: visible;
}

.qa-board.qa-board-coordinates-compact {
  --qa-coordinate-label-offset: 2px;
}

.qa-board-coordinate {
  position: absolute;
  z-index: 4;
  color: #5f5547;
  font-size: var(--qa-coordinate-font-size, 10px);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.qa-board-coordinate-col {
  top: calc(-1 * var(--qa-coordinate-label-offset, 5px));
  transform: translate(-50%, -100%);
}

.qa-board-coordinate-row {
  left: calc(-1 * var(--qa-coordinate-label-offset, 5px));
  transform: translate(-100%, -50%);
}

:root[data-board-coordinates="off"] .qa-board-coordinate {
  display: none;
}

:root[data-board-coordinates="off"] .qa-page-body .qa-board-coordinate {
  display: block;
}

.qa-board-canvas {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.qa-point {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
  font: inherit;
  line-height: 1;
  outline: 0;
  transform: none;
  transition: none;
  appearance: none;
  -webkit-appearance: none;
}

.qa-point:hover:not(:disabled),
.qa-point:focus,
.qa-point:active:not(:disabled) {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: 0;
  transform: none !important;
}

.qa-point.star::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 10%;
  height: 10%;
  max-width: 5px;
  max-height: 5px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(66, 43, 17, 0.86);
}

.qa-point:disabled {
  cursor: default;
  opacity: 1;
}

.qa-point-static {
  pointer-events: none;
}

.qa-stone {
  position: absolute;
  z-index: 3;
  width: 97%;
  height: 97%;
  max-width: 44px;
  max-height: 44px;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.qa-stone.black {
  background: url("./assets/go-stones/black-stone.svg") center / contain no-repeat;
  box-shadow: none;
}

.qa-stone.white {
  border: 0;
  background: url("./assets/go-stones/white-stone.svg") center / contain no-repeat;
  box-shadow: none;
}

.qa-point .ghost-stone {
  position: absolute;
  z-index: 2;
  width: 97%;
  height: 97%;
  max-width: 44px;
  max-height: 44px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background-color: transparent !important;
  pointer-events: none;
  opacity: 0.48;
}

.qa-point .ghost-stone.black {
  background: transparent url("./assets/go-stones/black-stone.svg") center / contain no-repeat !important;
  box-shadow: none;
}

.qa-point .ghost-stone.white {
  background: transparent url("./assets/go-stones/white-stone.svg") center / contain no-repeat !important;
  box-shadow: none;
}

.qa-mark {
  position: absolute;
  z-index: 4;
  inset: auto;
  left: 50%;
  top: 50%;
  width: 64%;
  height: 64%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  color: #1976d2;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.qa-board-editor {
  justify-items: start;
  padding: 10px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.qa-dialog .qa-board-editor {
  margin-top: 2px;
}

.qa-board.thumbnail .qa-mark {
  display: none;
}

/* 空点に置いたABCラベル: 石がないので円形フレームで視認性確保 */
.qa-mark.label.qa-mark-empty {
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  border: 1.5px solid #475569;
  text-shadow: none;
}

/* Final typography reset: keep titles serif without forcing heavy weight. */
.auth-brand-text strong,
.auth-feature-band strong,
h1,
h2,
h3,
.auth-hero h1,
.auth-question-card h2,
.auth-best-answer strong,
.qa-section-header strong,
.qa-question-row h3,
.qa-answerer-profile-panel h2,
.topbar h1 {
  font-weight: 500;
}

@media (max-width: 860px) {
}


/* Mock closer landing preview copy/layout */
.auth-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: -3px;
  color: #66717a;
  font-size: 12px;
  font-weight: 700;
}

.auth-ai-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 11px;
  border-top: 1px solid rgba(31, 45, 55, 0.12);
  color: #1d2a33;
  font-size: 13px;
}

.auth-ai-header strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body-font);
  font-weight: 800;
}

.auth-ai-header strong span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  background: #3b97e7;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.auth-ai-header em {
  color: #66717a;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.auth-question-card .auth-ai-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

.auth-question-card .auth-ai-chips span {
  min-width: 0;
  min-height: 74px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 3px;
  padding: 10px 9px;
  border: 1px solid rgba(68, 88, 100, 0.16);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  color: #17231d;
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 700;
}

.auth-question-card .auth-ai-chips span:first-child {
  border-color: rgba(54, 133, 204, 0.24);
  background: #f4f9fd;
}

.auth-question-card .auth-ai-chips strong {
  color: #17231d;
  font-family: var(--body-font);
  font-size: 13px;
  font-weight: 800;
}

.auth-question-card .auth-ai-chips em {
  color: #2f86d5;
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
}

.auth-question-card .auth-ai-chips b {
  color: #17231d;
  font-size: 16px;
  font-weight: 500;
}

.auth-ranking-preview li:nth-child(n+4) {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.auth-ranking-preview .rank-number {
  color: #1d2a33;
  font-size: 18px;
  font-weight: 700;
}

.auth-login-pill {
  white-space: nowrap;
}

.auth-kicker,
.auth-hero-metrics {
  display: none;
}

/* Cleaner board shadow: crisp and low-blur. */
.auth-mini-board,
.goban,
.qa-board-grid,
.qa-board-preview,
.reference-board {
  box-shadow: inset 0 0 0 999px rgba(255, 255, 255, 0.035), 0 2px 0 rgba(86, 63, 38, 0.16), 0 3px 6px rgba(49, 38, 20, 0.08) !important;
}

/* Keep the preview text column away from the board. */
.auth-preview-body {
  column-gap: 26px;
}

.auth-preview-body .auth-question-card {
  justify-self: end;
  width: min(100%, 430px);
}

/* Give the preview question card a little more width. */
.auth-preview-body .auth-question-card {
  width: min(100%, 470px);
}

/* Vertically center the board and coordinates in the preview card. */
.auth-preview-body {
  align-items: center;
}

.auth-preview-body .auth-board-frame {
  align-self: center;
}

/* Q&A reference layout v3 */
.qa-reference-body {
  background: #f7f4ed;
}

.qa-reference-shell {
  max-width: none;
  padding: 0 36px 28px;
}

.qa-reference-nav {
  height: 86px;
  display: grid;
  grid-template-columns: 250px minmax(360px, 1fr) auto;
  align-items: center;
  gap: 28px;
  margin: 0 -36px;
  padding: 0 36px;
  border-bottom: 1px solid rgba(68, 88, 100, 0.18);
  background: rgba(255, 253, 248, 0.92);
}

.qa-reference-logo img {
  width: 204px;
  max-height: 64px;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.qa-reference-nav nav {
  display: flex;
  align-items: center;
  gap: 42px;
}

.qa-reference-nav nav a {
  height: 86px;
  display: inline-flex;
  align-items: center;
  border-bottom: 4px solid transparent;
  color: #161f1a;
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.qa-reference-nav nav a.active {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
}

.qa-reference-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qa-reference-search {
  width: 320px;
  min-height: 44px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(68, 88, 100, 0.22);
  border-radius: 8px;
  background: #fffdfa;
}

.qa-reference-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
  font-size: 15px;
}

.qa-bell {
  position: relative;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.qa-bell::before {
  content: "♢";
  color: #17231d;
  font-size: 26px;
}

.qa-bell span {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand-green);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.qa-reference-user {
  max-width: 140px;
  color: #17231d;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.qa-reference-actions > #qaNewQuestionBtn {
  display: none;
}

.qa-reference-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 36px;
  padding-top: 28px;
}

.qa-reference-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.qa-attention-section h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: #171f1a;
  font-size: 30px;
  font-weight: 600;
}

.qa-attention-section h1 span {
  color: #c99431;
  font-family: var(--body-font);
}

.qa-attention-card {
  display: grid;
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  padding: 26px 26px 24px;
  border: 1px solid rgba(68, 88, 100, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 3px 0 rgba(22, 34, 42, 0.14), 0 7px 14px rgba(31, 45, 55, 0.1);
}

.qa-attention-board .auth-board-frame {
  width: 420px;
}

.qa-attention-board .auth-mini-board {
  min-height: 388px;
}

.qa-attention-content {
  display: grid;
  align-content: center;
  gap: 16px;
  min-width: 0;
}

.qa-attention-content h2 {
  margin: 0;
  color: #121916;
  font-size: clamp(25px, 2.35vw, 38px);
  font-weight: 600;
  line-height: 1.28;
}

.qa-attention-tags,
.qa-attention-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.qa-attention-tags span {
  padding: 6px 12px;
  border: 1px solid rgba(68, 88, 100, 0.18);
  border-radius: 6px;
  background: #fffdfa;
  color: #34424a;
  font-size: 13px;
  font-weight: 800;
}

.qa-attention-stats {
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(68, 88, 100, 0.14);
}

.qa-attention-stats span {
  color: #17231d;
  font-size: 15px;
  font-weight: 800;
}

.qa-ai-reference {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.qa-ai-reference header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.qa-ai-reference header strong {
  color: #17231d;
  font-family: var(--body-font);
  font-size: 16px;
  font-weight: 900;
}

.qa-ai-reference header em {
  color: #66717a;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.qa-ai-reference > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.qa-ai-reference > div span {
  min-height: 92px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(68, 88, 100, 0.16);
  border-radius: 7px;
  background: #fff;
}

.qa-ai-reference > div span:first-child {
  border-color: rgba(54, 133, 204, 0.28);
  background: #f4f9fd;
}

.qa-ai-reference b,
.qa-ai-reference strong {
  color: #111814;
  font-size: 17px;
  font-weight: 700;
}

.qa-ai-reference em {
  color: #2f86d5;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.qa-ai-more {
  justify-self: end;
  color: var(--brand-green);
  font-weight: 900;
  text-decoration: none;
}

.qa-reference-list-panel {
  padding: 0;
  overflow: hidden;
}

.qa-reference-tabs {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 58px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(68, 88, 100, 0.16);
}

.qa-reference-tabs button {
  min-height: 58px;
  padding: 0 18px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #25313b;
  font-size: 15px;
  font-weight: 800;
}

.qa-reference-tabs button.active {
  color: var(--brand-green);
  border-bottom-color: var(--brand-green);
  background: transparent;
  box-shadow: none;
}

.qa-reference-tabs #qaListStatus {
  justify-self: end;
  color: #66717a;
  font-size: 13px;
  font-weight: 800;
}

.qa-reference-list-panel .qa-question-list {
  gap: 0;
}

.qa-reference-list-panel .qa-question-row {
  min-height: 130px;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid rgba(68, 88, 100, 0.14);
  border-radius: 0;
  background: #fffdfa;
}

.qa-reference-list-panel .qa-question-row:last-child {
  border-bottom: 0;
}

.qa-reference-list-panel .qa-board.thumbnail {
  width: 118px;
  border-radius: 0;
}

.qa-reference-list-panel .qa-question-row h3 {
  font-size: 20px;
  font-weight: 600;
}

.qa-reference-sidebar {
  display: grid;
  gap: 20px;
  align-content: start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.qa-reference-question-button {
  min-height: 82px;
  border-color: #0f6842;
  border-radius: 8px;
  background: #0f6842;
  color: #fff;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgba(22, 34, 42, 0.16), 0 9px 16px rgba(15, 104, 66, 0.22);
}

.qa-reference-card,
.qa-reference-sidebar .qa-admin-panel {
  padding: 20px;
  border: 1px solid rgba(68, 88, 100, 0.18);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.96);
  box-shadow: 0 3px 0 rgba(22, 34, 42, 0.12), 0 7px 14px rgba(31, 45, 55, 0.08);
}

.qa-reference-card h2,
.qa-answerer-profile-panel h2 {
  margin: 0 0 14px;
  color: #17231d;
  font-size: 22px;
  font-weight: 600;
}

.qa-reference-card p {
  margin: 0;
  color: #53616b;
  font-size: 13px;
  line-height: 1.75;
}

.qa-photo-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 18px 0 12px;
}

.qa-photo-flow div {
  aspect-ratio: 1.18;
  border: 1px solid rgba(68, 88, 100, 0.18);
  border-radius: 5px;
  background: var(--board-wood-bg);
}

.qa-photo-flow span {
  color: var(--brand-green);
  font-size: 26px;
  font-weight: 900;
}

.qa-photo-card a {
  justify-self: end;
  display: block;
  color: var(--brand-green);
  font-weight: 900;
  text-align: right;
  text-decoration: none;
}

.qa-answerer-profile-panel .qa-profile-list {
  display: grid;
  gap: 0;
}

.qa-answerer-profile-panel .qa-profile-card {
  padding: 11px 0;
  border-bottom: 1px solid rgba(68, 88, 100, 0.14);
}

.qa-answerer-profile-panel .qa-profile-card:last-child {
  border-bottom: 0;
}

.qa-reference-card.qa-filter-card {
  display: grid;
  gap: 8px;
  color: #17231d;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .qa-reference-nav,
  .qa-reference-layout,
  .qa-attention-card {
    grid-template-columns: 1fr;
  }

  .qa-reference-nav {
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .qa-reference-nav nav,
  .qa-reference-actions {
    flex-wrap: wrap;
  }

  .qa-attention-board .auth-board-frame {
    width: min(100%, 420px);
  }
}

/* ================================================================
   Q&A ホームページ リニューアル v2 (2026-06-26)
   ================================================================ */

/* ── ページ基本 ── */
.qa-page-body {
  background-color: #f7f4ee;
  background-image:
    linear-gradient(rgba(140,110,55,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,110,55,0.055) 1px, transparent 1px);
  background-size: 40px 40px;
  color: #1a2530;
  font-family: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  min-height: 100vh;
}

/* ── 固定装飾碁石 ── */
.qa-bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.qa-bg-stone {
  position: absolute;
  border-radius: 50%;
  display: block;
}

.qa-bg-stone-b1 {
  width: 130px;
  height: 130px;
  bottom: 10%;
  left: 3%;
  background: radial-gradient(circle at 36% 32%, #666, #111 65%);
  box-shadow: 3px 5px 16px rgba(0,0,0,0.28);
  opacity: 0.07;
}

.qa-bg-stone-w1 {
  width: 88px;
  height: 88px;
  top: 22%;
  right: 4%;
  background: radial-gradient(circle at 36% 32%, #fff, #d8d4cc 75%);
  border: 1px solid rgba(190,185,178,0.4);
  box-shadow: 2px 3px 10px rgba(0,0,0,0.14);
  opacity: 0.14;
}

.qa-bg-stone-b2 {
  width: 56px;
  height: 56px;
  top: 58%;
  right: 7%;
  background: radial-gradient(circle at 36% 32%, #555, #111 65%);
  opacity: 0.05;
}

.qa-page-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  position: relative;
  z-index: 1;
}

/* ── トップナビ ── */
.qa-topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #e0d9ce;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: 56px;
}

.qa-topnav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.qa-topnav-logo img {
  height: 36px;
  width: auto;
}

.qa-topnav-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.qa-topnav-nav a {
  padding: 6px 12px;
  border-radius: 6px;
  color: #4a5568;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

.qa-topnav-nav a:hover {
  background: #f0ece4 !important;
  color: #1a2530 !important;
}
.qa-topnav-nav a.active { color: #1a6b3c; font-weight: 700; }

.qa-topnav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.qa-topnav-search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f5f0e8;
  border: 1px solid #d8d1c4;
  border-radius: 20px;
  padding: 5px 14px;
  cursor: text;
}

.qa-topnav-search svg { width: 16px; height: 16px; flex-shrink: 0; }

.qa-topnav-search input {
  border: none;
  background: transparent;
  font-size: 13px;
  width: 180px;
  outline: none;
  color: #1a2530;
}

.qa-topnav-search input::placeholder { color: #9aa5b0; }

.qa-topnav-ask-btn {
  padding: 7px 16px;
  background: #1a6b3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.qa-topnav-ask-btn:hover {
  background: #155730 !important;
  color: #fff !important;
}

.qa-topnav-user { font-size: 13px; color: #4a5568; }
.qa-topnav-chevron { font-size: 10px; color: #9aa5b0; margin-left: 2px; }

.qa-account-menu {
  position: relative;
}

.qa-account-menu-button {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #e0d9ce;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  color: #4a5568;
  white-space: nowrap;
}

.qa-account-menu-button:hover { background: #f5f0e8; }

.qa-account-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
}

.qa-account-menu-summary {
  padding: 12px 16px;
  border-bottom: 1px solid #f0ece4;
}

.qa-account-menu-summary strong {
  display: block;
  font-size: 14px;
  color: #1a2530;
}

.qa-account-menu-summary span {
  font-size: 12px;
  color: #66717a;
}

.qa-account-menu-summary em {
  display: block;
  font-size: 11px;
  color: #66717a;
  font-style: normal;
  margin-top: 2px;
}

.qa-account-menu-panel a,
.qa-account-menu-panel button[role="menuitem"] {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 14px;
  color: #1a2530;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.qa-account-menu-panel a:hover,
.qa-account-menu-panel button[role="menuitem"]:hover {
  background: #f5f0e8;
}

/* ── ヒーロー（カード枠なし・ページ背景直置き） ── */
.qa-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  padding: 56px 0 48px;
  text-align: center;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 装飾: 左側の石 */
.qa-hero-deco-left {
  position: absolute;
  left: 0;
  top: 0;
  width: 28%;
  height: 100%;
  pointer-events: none;
}

.qa-deco-stone {
  position: absolute;
  width: var(--s, 40px);
  height: var(--s, 40px);
  top: var(--t, 50%);
  left: var(--l, 50%);
  border-radius: 50%;
  display: block;
}

.qa-deco-stone-b {
  background: radial-gradient(circle at 38% 35%, #555, #1a1a1a 60%);
  box-shadow: 2px 3px 8px rgba(0,0,0,0.35);
}

.qa-deco-stone-w {
  background: radial-gradient(circle at 38% 35%, #fff, #d8d4cc 70%);
  border: 1px solid #c8c4bc;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.18);
}

/* 装飾: 右側の碁盤画像 */
.qa-hero-deco-right {
  position: absolute;
  right: 0;
  top: 0;
  width: 28%;
  height: 100%;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.qa-hero-board-img {
  height: 100%;
  max-height: 280px;
  object-fit: contain;
  object-position: right center;
  opacity: 0.9;
}

/* 中央コンテンツ */
.qa-hero-center {
  position: relative;
  z-index: 1;
  width: min(540px, 60%);
}

.qa-hero-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  color: #1a2530;
  line-height: 1.4;
  margin: 0 0 10px;
  text-align: center;
}

.qa-hero-desc {
  font-size: 14px;
  color: #66717a;
  margin: 0 0 20px;
  line-height: 1.7;
  text-align: center;
}

.qa-hero-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f9f6f0;
  border: 1.5px solid #d0c8bc;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: text;
  margin-bottom: 16px;
}

.qa-hero-search-bar svg { width: 20px; height: 20px; flex-shrink: 0; }

.qa-hero-search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: #1a2530;
}

.qa-hero-search-bar input::placeholder { color: #a0aab4; }

.qa-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.qa-btn-primary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: #1a6b3c !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.qa-btn-primary:hover {
  background: #155730 !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.qa-btn-primary svg { width: 18px; height: 18px; }

.qa-btn-outline {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  background: #fff;
  color: #1a6b3c;
  border: 1.5px solid #1a6b3c;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.qa-btn-outline:hover { background: #f0f9f3; }
.qa-btn-outline svg { width: 18px; height: 18px; }

/* ── 統計カード (ヒーロー下・別セクション) ── */
.qa-stats-card {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  margin-top: 16px;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 0;
}

.qa-stats-item {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  padding: 0 24px;
}

.qa-stats-item:first-child { padding-left: 0; }
.qa-stats-item:last-child { padding-right: 0; }

.qa-stats-icon {
  width: 44px;
  height: 44px;
  background: #e8f5ed;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.qa-stats-icon svg { width: 22px; height: 22px; }

.qa-stats-text { display: flex; flex-direction: column; gap: 2px; }

.qa-stats-num {
  font-size: 26px;
  font-weight: 800;
  color: #1a6b3c;
  line-height: 1;
}

.qa-stats-label {
  font-size: 12px;
  color: #66717a;
  font-weight: 500;
}

.qa-stats-divider {
  width: 1px;
  height: 44px;
  background: #e0d9ce;
  flex-shrink: 0;
}

/* ── ページリード（見出し＋検索） ── */
.qa-lead {
  padding: 20px 0 4px;
}

.qa-lead-title {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 700;
  color: #1a2530;
  margin: 0 0 8px;
  line-height: 1.4;
}

.qa-lead-sub {
  font-size: 13px;
  color: #66717a;
  margin: 0 0 16px;
  line-height: 1.7;
}

.qa-lead-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #d0c8bc;
  border-radius: 10px;
  padding: 9px 14px;
  cursor: text;
  max-width: 460px;
  transition: border-color 0.15s;
}

.qa-lead-search:focus-within { border-color: #1a6b3c; }
.qa-lead-search svg { width: 18px; height: 18px; flex-shrink: 0; }

.qa-lead-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: #1a2530;
}

.qa-lead-search input::placeholder { color: #a0aab4; }

/* ── カテゴリセクション ── */
.qa-categories-section {
  margin-top: 0;
}

.qa-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a2530;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.qa-section-title--bar {
  border-left: 3px solid #1a6b3c;
  padding-left: 10px;
}

.qa-category-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 10px;
}

.qa-category-item {
  background: #fff;
  border: 1.5px solid #e8e1d6;
  border-radius: 12px;
  padding: 16px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.qa-category-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.qa-category-item.active { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* ── カテゴリ別: ホバー ── */
.qa-category-item[data-category="布石"]:hover     { background: #f0fdf4; border-color: #86efac; }
.qa-category-item[data-category="定石"]:hover     { background: #fffbeb; border-color: #fcd34d; }
.qa-category-item[data-category="中盤"]:hover     { background: #ecfdf5; border-color: #6ee7b7; }
.qa-category-item[data-category="死活"]:hover     { background: #fef2f2; border-color: #fca5a5; }
.qa-category-item[data-category="攻め合い"]:hover { background: #eef2ff; border-color: #a5b4fc; }
.qa-category-item[data-category="ヨセ"]:hover     { background: #f5f3ff; border-color: #c4b5fd; }
.qa-category-item[data-category="手筋"]:hover     { background: #eff6ff; border-color: #93c5fd; }
.qa-category-item[data-category="ルール"]:hover   { background: #fff7ed; border-color: #fdba74; }

/* ── カテゴリ別: アクティブ ── */
.qa-category-item[data-category="布石"].active     { background: #f0fdf4; border-color: #16a34a; }
.qa-category-item[data-category="定石"].active     { background: #fffbeb; border-color: #d97706; }
.qa-category-item[data-category="中盤"].active     { background: #ecfdf5; border-color: #059669; }
.qa-category-item[data-category="死活"].active     { background: #fef2f2; border-color: #dc2626; }
.qa-category-item[data-category="攻め合い"].active { background: #eef2ff; border-color: #4338ca; }
.qa-category-item[data-category="ヨセ"].active     { background: #f5f3ff; border-color: #7c3aed; }
.qa-category-item[data-category="手筋"].active     { background: #eff6ff; border-color: #2563eb; }
.qa-category-item[data-category="ルール"].active   { background: #fff7ed; border-color: #c2410c; }

/* アクティブ時: ラベルをカテゴリ色に */
.qa-category-item[data-category="布石"].active     .qa-cat-label { color: #16a34a; }
.qa-category-item[data-category="定石"].active     .qa-cat-label { color: #d97706; }
.qa-category-item[data-category="中盤"].active     .qa-cat-label { color: #059669; }
.qa-category-item[data-category="死活"].active     .qa-cat-label { color: #dc2626; }
.qa-category-item[data-category="攻め合い"].active .qa-cat-label { color: #4338ca; }
.qa-category-item[data-category="ヨセ"].active     .qa-cat-label { color: #7c3aed; }
.qa-category-item[data-category="手筋"].active     .qa-cat-label { color: #2563eb; }
.qa-category-item[data-category="ルール"].active   .qa-cat-label { color: #c2410c; }

/* ── アイコン本体 ── */
.qa-cat-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}

/* カテゴリ別アイコン背景・色 */
.qa-cat-fuseki   { background: #dcfce7; color: #16a34a; }
.qa-cat-joseki   { background: #fef3c7; color: #d97706; }
.qa-cat-chiban   { background: #d1fae5; color: #059669; }
.qa-cat-shikatsu { background: #fee2e2; color: #dc2626; }
.qa-cat-semeai   { background: #e0e7ff; color: #4338ca; }
.qa-cat-yose     { background: #ede9fe; color: #7c3aed; }
.qa-cat-tesuji   { background: #dbeafe; color: #2563eb; }
.qa-cat-rules    { background: #ffedd5; color: #c2410c; }

/* SVGはcurrentColorで統一 */
.qa-cat-icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; }

.qa-cat-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  text-align: center;
  line-height: 1.3;
}

.qa-cat-count {
  font-size: 10px;
  color: #9aa5b0;
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
  margin-top: -2px;
}

/* ── ホームページ 2カラム ── */
.qa-home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  margin-top: 0;
  align-items: start;
}

/* 左カラム */
.qa-home-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.qa-home-section {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  padding: 20px;
}

.qa-home-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

/* 右サイドバー */
.qa-home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 72px;
}

.qa-sidebar-box {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  padding: 16px;
}

.qa-sidebar-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.qa-sidebar-box-head h3 {
  font-size: 14px;
  font-weight: 700;
  color: #1a2530;
  margin: 0;
}

.qa-sidebar-more {
  font-size: 12px;
  color: #1a6b3c;
  text-decoration: none;
  white-space: nowrap;
}

.qa-sidebar-more:hover { text-decoration: underline; }

.qa-sidebar-more-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px;
  background: #f5f0e8;
  border: 1px solid #e0d9ce;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  text-align: center;
}

.qa-sidebar-more-btn:hover { background: #ede8de; }

/* ── セクション見出し説明 ── */
.qa-section-head-text { display: flex; flex-direction: column; gap: 2px; }

.qa-section-desc {
  font-size: 12px;
  color: #9aa5b0;
  margin: 0;
  line-height: 1.5;
}

/* ── 新着の質問リスト ── */
.qa-new-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qa-new-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 6px;
  border-bottom: 1px solid #f0ece4;
  transition: background 0.12s;
  border-radius: 4px;
  position: relative;
}

.qa-new-row:last-child { border-bottom: none; }
.qa-new-row:hover { background: #faf7f3; }

/* ── カテゴリバッジ (左) ── */
.qa-cat-badge {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.03em;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
  word-break: break-all;
  padding: 4px;
  user-select: none;
}

.qa-new-body {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

/* ── 右カラム ── */
.qa-new-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  width: 190px;
  position: relative;
}

.qa-new-right-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qa-new-stat {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: #66717a;
  white-space: nowrap;
}

/* AI要点 */
.qa-ai-point {
  font-size: 11px;
  color: #1a6b3c;
  background: #f0faf4;
  border: 1px solid #c0e0d0;
  border-radius: 6px;
  padding: 5px 8px;
  line-height: 1.5;
  width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-ai-point-icon {
  color: #0f6842;
  font-size: 10px;
  margin-right: 3px;
}

/* summary行 (中央カラム用) */
.qa-summary-line {
  font-size: 12px;
  color: #6a5e4a;
  line-height: 1.55;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qa-summary-spark,
.qa-summary-label {
  color: #1a6b3c;
  font-weight: 800;
}

/* テーマ図あり chip */
.qa-board-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  background: #e8f4ee;
  color: #0f6842;
  border: 1px solid #c0e0d0;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.qa-board-chip:hover { background: #d4eee0; }

/* PCでは行のホバープレビューがあるため、盤面ボタンはタッチ端末だけに表示する。 */
@media (min-width: 701px) and (hover: hover) and (pointer: fine) {
  .qa-board-chip { display: none; }
}

/* Board hover preview popup */
.qa-board-preview-popup {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid #d4c8b4;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
  padding: 6px;
  min-width: 184px;
  min-height: 184px;
  pointer-events: none;
}
.qa-board-preview-popup .qa-board {
  margin: 0 auto;
  width: auto;
}

.qa-board-preview-popup .qa-board.qa-board-coordinates-active {
  margin-top: var(--qa-coordinate-gutter, 12px);
  margin-right: auto;
  margin-bottom: 0;
  margin-left: var(--qa-coordinate-gutter, 12px);
}
.qa-board-preview-popup.is-visible { display: block; pointer-events: auto; }

body.qa-board-preview-sheet-open { overflow: hidden; }

.qa-board-preview-sheet {
  position: fixed;
  z-index: 420;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.qa-board-preview-sheet[aria-hidden="false"] { visibility: visible; }
.qa-board-preview-sheet.is-open { pointer-events: auto; }

.qa-board-preview-sheet-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(23, 31, 26, 0.46);
  opacity: 0;
  cursor: default;
  transition: opacity 0.2s ease;
}

.qa-board-preview-sheet.is-open .qa-board-preview-sheet-backdrop { opacity: 1; }

.qa-board-preview-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 20px), 460px);
  max-height: min(88dvh, 720px);
  overflow: auto;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  border: 1px solid #d9e1d7;
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
  background: #fbfcf9;
  box-shadow: 0 -18px 44px rgba(21, 39, 28, 0.2);
  transform: translateY(100%);
  transition: transform 0.24s ease;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.qa-board-preview-sheet.is-open .qa-board-preview-sheet-panel { transform: translateY(0); }

.qa-board-preview-sheet-handle {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: #c5cec5;
}

.qa-board-preview-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qa-board-preview-sheet-head > div > span {
  display: block;
  color: #829087;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.qa-board-preview-sheet-head h2 {
  margin: 2px 0 0;
  color: #22372a;
  font-size: 17px;
}

.qa-board-preview-sheet-close {
  display: inline-grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  padding: 0;
  border: 1px solid #dce4db;
  border-radius: 50%;
  background: #fff;
  color: #53645a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.qa-board-preview-sheet-question {
  margin: 9px 0 10px;
  color: #4c5e52;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

.qa-board-preview-sheet-board {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 8px;
  border: 1px solid #e0e6dc;
  border-radius: 12px;
  background: #f4f6f1;
  overflow: hidden;
}

.qa-board-preview-sheet-board .qa-board {
  max-width: 100%;
  margin: 0 auto;
}

.qa-board-preview-sheet-board .qa-board.qa-board-coordinates-active {
  margin-top: var(--qa-coordinate-gutter, 18px);
  margin-right: auto;
  margin-bottom: 0;
  margin-left: var(--qa-coordinate-gutter, 18px);
}

.qa-board-preview-sheet-actions { margin-top: 12px; }

.qa-board-preview-sheet-open {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #1d6843;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

@media (max-width: 700px) {
  .qa-board-preview-sheet-panel {
    width: 100%;
    max-height: 92dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qa-board-preview-sheet-backdrop,
  .qa-board-preview-sheet-panel { transition: none; }
}

/* PC: show on row hover */
@media (hover: hover) {
  .qa-new-row:hover .qa-board-preview-popup,
  .qa-open-card:hover .qa-board-preview-popup { display: block; }
}

/* popular list body column */
.qa-pop-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qa-pop-summary {
  font-size: 11px;
  color: #6a5e4a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

/* AI assist button in qa modal */
.qm-ai-assist-row {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 8px;
}
.qm-ai-assist-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 600;
  color: #0f6842;
  background: #f0faf4;
  border: 1px solid #c0e0d0;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.qm-ai-assist-btn:hover { background: #ddf2e8; }
.qm-ai-assist-btn:disabled { opacity: 0.55; cursor: default; }

.qa-bookmark-btn {
  display: inline-grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  flex-shrink: 0;
  place-items: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #bbb;
  border-radius: 4px;
  transition: color 0.15s;
  margin-top: 2px;
}

.qa-bookmark-btn:hover { color: #1a6b3c; }
.qa-bookmark-btn svg { width: 18px; height: 18px; display: block; }
.qa-bookmark-btn.active { color: #1a6b3c; }
.qa-bookmark-btn.active svg { fill: #1a6b3c; stroke: #1a6b3c; }

.qa-new-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a2530;
  margin: 0 0 8px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.qa-new-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.qa-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.qa-chip-cat { background: #e8f0fe; color: #2c5fcc; }
.qa-chip-size { background: #f0ece4; color: #66717a; }
.qa-chip-turn { background: #f5f0e8; color: #5a4e3c; }

.qa-new-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #66717a;
  flex-wrap: wrap;
}

.qa-meta-icon { font-size: 13px; }
.qa-new-time { color: #9aa5b0; }

.qa-solved-badge {
  background: #e8f5ed;
  color: #1a6b3c;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
}

/* もっと見るボタン */
.qa-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 14px;
  padding: 8px;
  background: #f9f6f0;
  border: 1px solid #e0d9ce;
  border-radius: 8px;
  font-size: 13px;
  color: #4a5568;
  font-weight: 600;
  cursor: pointer;
}

.qa-more-btn:hover { background: #f0ece4; }
.qa-more-btn[hidden] { display: none; }

/* ── 人気の質問 ── */
.qa-popular-title { }
.qa-popular-crown { font-size: 20px; }

.qa-popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qa-popular-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  border-bottom: 1px solid #f0ece4;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 4px;
}

.qa-popular-row:last-child { border-bottom: none; }
.qa-popular-row:hover { background: #faf7f3; }

.qa-pop-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  background: #e8e4dc;
  color: #4a5568;
  flex-shrink: 0;
}

.qa-pop-num--top1 { background: #f5c518; color: #7a5a00; }
.qa-pop-num--top2 { background: #adb5bd; color: #2c3e50; }
.qa-pop-num--top3 { background: #cd7f32; color: #fff; }

.qa-pop-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a2530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.qa-pop-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.qa-pop-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #66717a;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── サイドバー: サイトの利用状況 ── */
.qa-side-stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qa-side-stat-item {
  display: flex;
  align-items: center;
  padding: 9px 10px;
  background: #f9f6f0;
  border-radius: 7px;
  gap: 8px;
}

.qa-side-stat-label {
  font-size: 12px;
  color: #66717a;
  font-weight: 500;
  flex: 1;
}

.qa-side-stat-right {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.qa-side-stat-num {
  font-size: 20px;
  font-weight: 800;
  color: #1a6b3c;
  line-height: 1;
  min-width: 24px;
  text-align: right;
}

.qa-side-stat-diff {
  font-size: 10px;
  color: #9aa5b0;
  white-space: nowrap;
}

.qa-side-stat-diff.positive { color: #1a6b3c; }
.qa-side-stat-diff.negative { color: #b91c1c; }

/* ── サイドバー: 回答募集中 ── */
.qa-open-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-open-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
  position: relative;
}

.qa-open-card:hover { background: #faf8f4; }

.qa-open-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #c8a86e;
  border: 1px solid #b8985e;
}

.qa-open-thumb .qa-board { width: 56px !important; height: 56px; }

.qa-open-body { flex: 1; min-width: 0; }

.qa-open-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a2530;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.qa-open-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.qa-open-chips { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }

.qa-open-ans-badge {
  font-size: 11px;
  font-weight: 700;
  background: #fde8e8;
  color: #c53030;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── サイドバー: 回答者ランキング ── */
.qa-ranking-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.qa-rank-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ece4;
}

.qa-rank-row:last-child { border-bottom: none; }

.qa-rank-medal {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  background: #e8e4dc;
  color: #66717a;
  flex-shrink: 0;
}

.qa-rank-medal--1 { background: #f5c518; color: #7a5a00; }
.qa-rank-medal--2 { background: #adb5bd; color: #2c3e50; }
.qa-rank-medal--3 { background: #cd7f32; color: #fff; }
.qa-rank-medal--plain { background: #ede8e0; color: #66717a; }

.qa-rank-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.qa-rank-avatar svg { width: 30px; height: 30px; }

.qa-rank-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qa-rank-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a2530;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-rank-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #1a6b3c;
  background: #e8f5ed;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.5;
  white-space: nowrap;
}

.qa-rank-count {
  font-size: 11px;
  color: #66717a;
  white-space: nowrap;
  flex-shrink: 0;
}

.qa-rank-count b { color: #1a2530; font-weight: 700; }

/* ── サイドバー: 最近の回答 ── */
.qa-recent-card {
  display: flex;
  gap: 10px;
  cursor: pointer;
  border-radius: 6px;
  padding: 4px;
}

.qa-recent-card:hover { background: #faf8f4; }

.qa-recent-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 5px;
  overflow: hidden;
  background: #c8a86e;
  border: 1px solid #b8985e;
}

.qa-recent-thumb .qa-board {
  width: var(--qa-rendered-board-size, 52px) !important;
  height: var(--qa-rendered-board-size, 52px);
}

.qa-recent-body { flex: 1; min-width: 0; }

.qa-recent-title {
  font-size: 12px;
  font-weight: 600;
  color: #1a2530;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.qa-recent-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #66717a;
}

.qa-recent-answerer {
  font-weight: 600;
  color: #1a6b3c;
  white-space: nowrap;
}

.qa-recent-time { color: #9aa5b0; }

/* ── サイドバー: 最近の回答リスト ── */
.qa-recent-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ── 詳細オーバーレイ ── */
.qa-detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #f5f0e8;
  overflow-y: auto;
}

.qa-detail-overlay.hidden { display: none; }

.qa-detail-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.qa-detail-back {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #1a6b3c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 20px;
}

.qa-detail-back svg { width: 18px; height: 18px; }
.qa-detail-back:hover { text-decoration: underline; }

/* ── 空状態 ── */
.qa-home-empty {
  font-size: 13px;
  color: #9aa5b0;
  text-align: center;
  padding: 16px 0;
  margin: 0;
}

/* ── フッター ── */
.qa-footer {
  margin-top: 48px;
  padding: 28px 0 20px;
  border-top: 1px solid #ddd5c8;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.qa-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
}

.qa-footer-links a {
  font-size: 13px;
  color: #66717a;
  text-decoration: none;
}

.qa-footer-links a:hover { color: #1a6b3c; text-decoration: underline; }

.qa-footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.qa-footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e0d9ce;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a5568;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.qa-footer-social a svg { width: 16px; height: 16px; }
.qa-footer-social a:hover { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }

.qa-footer-copy {
  font-size: 12px;
  color: #a0aab4;
  margin: 0;
}

/* ── レスポンシブ ── */
@media (max-width: 960px) {
  .qa-home-layout {
    grid-template-columns: 1fr;
  }

  .qa-home-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: static;
  }

  .qa-category-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .qa-bg-stone-w1 { display: none; }
  .qa-bg-stone-b2 { display: none; }
}

@media (max-width: 600px) {
  .qa-topnav-nav { display: none; }
  .qa-category-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .qa-home-sidebar { grid-template-columns: 1fr; }
  .qa-lead-title { font-size: 18px; }
  .qa-bg-deco { display: none; }

  /* 新着リスト: スマホでは右カラムを下に回す */
  .qa-new-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .qa-new-right {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .qa-new-right-top {
    flex: 1;
  }
  .qa-ai-point {
    width: 100%;
    -webkit-line-clamp: 2;
  }
  .qa-cat-badge {
    width: 44px;
    height: 44px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .qa-category-grid { grid-template-columns: repeat(4, 1fr); }
  .qa-cat-icon { width: 36px; height: 36px; padding: 4px; }
  .qa-cat-icon svg { width: 26px; height: 26px; }
}

/* ================================================================
   マイページ (mypage.html)
   ================================================================ */

/* ── ローディング/エラー ── */
.mp-loading-screen, .mp-error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 14px;
  color: #66717a;
  font-size: 14px;
}

.mp-loading-spinner {
  width: 36px; height: 36px;
  border: 3px solid #e0d9ce;
  border-top-color: #1a6b3c;
  border-radius: 50%;
  animation: mp-spin 0.8s linear infinite;
}

@keyframes mp-spin { to { transform: rotate(360deg); } }

.mp-error-screen a { color: #1a6b3c; text-decoration: underline; }

/* ── マイページ本体レイアウト ── */
.mp-body { display: block; }

.mp-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  max-width: 1080px;
  margin: 24px auto;
  padding: 0 16px 64px;
  align-items: start;
}

/* ── サイドバー ── */
.mp-sidebar { display: flex; flex-direction: column; gap: 12px; }

.mp-side-ticket-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 14px 16px;
  border: 1px solid #e8d5a7;
  border-radius: 12px;
  background: linear-gradient(135deg, #fffaf0, #fff);
  color: #4a3b20;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(127, 86, 20, .05);
}
.mp-side-ticket-card:hover { border-color: #d9b866; transform: translateY(-1px); }
.mp-side-ticket-card strong { grid-row: span 2; align-self: center; color: #9a6700; font-size: 22px; }
.mp-side-ticket-card > span:last-child { color: #806b45; font-size: 10px; line-height: 1.45; }
.mp-side-ticket-label { color: #6d5323; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.mp-side-point-card { border-color: #efd2c4; background: linear-gradient(135deg, #fff4ef, #fff); color: #68351f; }
.mp-side-point-card:hover { border-color: #df9d80; }
.mp-side-point-card strong { color: #b85d32; }
.mp-side-point-card > span:last-child { color: #8c634e; }

.mp-profile-card {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.mp-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
  user-select: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.mp-avatar-lg { width: 72px; height: 72px; font-size: 28px; }

.mp-avatar-trigger {
  position: relative;
  appearance: none;
  padding: 0;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #ded6ca, 0 3px 10px rgba(72, 53, 35, .12);
  cursor: pointer;
}

.mp-avatar-trigger::after {
  content: '変更';
  position: absolute;
  right: -10px;
  bottom: -5px;
  min-width: 32px;
  padding: 2px 5px;
  border: 1px solid #e4c7c3;
  border-radius: 10px;
  background: #fff;
  color: #b94051;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.mp-avatar-trigger:hover,
.mp-avatar-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(234, 86, 112, .2), 0 4px 12px rgba(72, 53, 35, .14);
  outline: none;
}

.mp-display-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a2530;
  margin: 4px 0 0;
}

.mp-username-label { font-size: 12px; color: #9aa5b0; margin: 0; }
.mp-rank-label { font-size: 13px; color: #1a6b3c; font-weight: 600; margin: 0; }

.mp-bio {
  font-size: 13px;
  color: #66717a;
  line-height: 1.6;
  margin: 4px 0 0;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

.mp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.mp-stat-item {
  background: #f9f6f0;
  border-radius: 8px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.mp-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: #1a6b3c;
  line-height: 1;
}

.mp-stat-lbl { font-size: 11px; color: #66717a; }

.mp-categories { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 6px; }
.mp-categories-edit { justify-content: flex-start; }

.mp-category-chip {
  display: inline-block;
  padding: 2px 8px;
  background: #e8f5ed;
  color: #1a6b3c;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.mp-empty-hint { font-size: 12px; color: #a0aab4; }

/* ── サイドナビ ── */
.mp-nav {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mp-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #4a5568;
  text-decoration: none;
  border-bottom: 1px solid #f0ece4;
  transition: background 0.12s;
  position: relative;
}

.mp-nav-item:last-child { border-bottom: none; }
.mp-nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.mp-nav-item:hover { background: #f9f6f0; color: #1a2530; }
.mp-nav-item.active { background: #e8f5ed; color: #1a6b3c; font-weight: 700; }
.mp-nav-item.active svg { stroke: #1a6b3c; }

.mp-nav-count {
  margin-left: auto;
  font-size: 11px;
  color: #9aa5b0;
  font-weight: 600;
  background: #f0ece4;
  border-radius: 8px;
  padding: 1px 6px;
}

.mp-nav-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: #e53e3e;
  color: #fff;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  min-width: 16px;
  text-align: center;
  line-height: 16px;
}

/* ── モバイル表示 ── */
.mp-mobile-profile {
  display: none;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #fff;
  border-bottom: 1px solid #e8e1d6;
}

.mp-mobile-profile-info { min-width: 0; }
.mp-mobile-ticket { margin: 4px 0 0; color: #9a6700; font-size: 11px; font-weight: 700; }

.mp-mobile-tabs {
  display: none;
  overflow-x: auto;
  white-space: nowrap;
  background: #fff;
  border-bottom: 1px solid #e8e1d6;
  padding: 0 12px;
  gap: 0;
  -webkit-overflow-scrolling: touch;
}

.mp-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 14px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  font-weight: 600;
  color: #66717a;
  cursor: pointer;
  white-space: nowrap;
}

.mp-tab-btn.active { color: #1a6b3c; border-bottom-color: #1a6b3c; }

.mp-tab-badge {
  background: #e53e3e;
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  min-width: 14px;
  text-align: center;
  line-height: 14px;
}

/* ── メインコンテンツ ── */
.mp-main { display: flex; flex-direction: column; gap: 0; min-width: 0; }

.mp-tab-panel { display: block; }
.mp-tab-panel[hidden] { display: none; }

.mp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.mp-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a2530;
  margin: 0;
  border-left: 3px solid #1a6b3c;
  padding-left: 10px;
}
.mp-section-description { margin: 7px 0 0 13px; color: #66717a; font-size: 12px; line-height: 1.5; }

/* ── フィルタ ── */
.mp-filter-row { display: flex; gap: 6px; flex-wrap: wrap; }

.mp-filter-btn {
  padding: 5px 12px;
  background: #f5f0e8;
  border: 1px solid #e0d9ce;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
}

.mp-filter-btn.active { background: #1a6b3c; color: #fff; border-color: #1a6b3c; }
.mp-filter-btn:hover:not(.active) { background: #ede8de; }

/* ── 一覧ロウ ── */
.mp-list-row {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.mp-list-row:hover { border-color: #a8d4b8; box-shadow: 0 2px 8px rgba(26,107,60,0.08); }
.mp-list-row-sm { padding: 10px 14px; margin-bottom: 6px; }

.mp-list-row-main { flex: 1; min-width: 0; }

.mp-list-row-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.mp-list-row-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a2530;
  flex: 1;
  min-width: 0;
}

.mp-list-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #66717a;
  flex-wrap: wrap;
}

.mp-list-time { color: #9aa5b0; }

.mp-answer-preview {
  font-size: 13px;
  color: #4a5568;
  margin: 4px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mp-list-row-actions { display: flex; gap: 6px; align-items: flex-start; }

.mp-row-btn {
  padding: 4px 10px;
  background: #f5f0e8;
  border: 1px solid #e0d9ce;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  white-space: nowrap;
}

.mp-row-btn:hover { background: #ede8de; }
.mp-row-btn--remove { background: #fff5f5; border-color: #feb2b2; color: #c53030; }
.mp-row-btn--remove:hover { background: #fed7d7; }

/* ── バッジ ── */
.mp-badge-solved { display: inline-block; padding: 2px 7px; background: #e8f5ed; color: #1a6b3c; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mp-badge-open { display: inline-block; padding: 2px 7px; background: #fff8e0; color: #b45309; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mp-badge-best { display: inline-block; padding: 2px 7px; background: #fef3c7; color: #d97706; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* ── 通知 ── */
.mp-notif-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0ece4;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
}

.mp-notif-row:last-child { border-bottom: none; }
.mp-notif-row:hover { background: #faf7f3; }
.mp-notif-unread { background: #f0f9f4; }
.mp-notif-unread:hover { background: #e8f5ed; }

.mp-notif-icon { font-size: 20px; flex-shrink: 0; line-height: 1.4; }
.mp-notif-body { flex: 1; min-width: 0; }
.mp-notif-title { font-size: 14px; font-weight: 600; color: #1a2530; margin: 0 0 3px; }
.mp-notif-sub { font-size: 12px; color: #66717a; margin: 0 0 4px; }
.mp-notif-time { font-size: 11px; color: #9aa5b0; }

.mp-notif-dot {
  width: 8px; height: 8px;
  background: #e53e3e;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── プロフィールタブ ── */
.mp-profile-sections { display: flex; flex-direction: column; gap: 16px; }

.mp-profile-detail-card {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  padding: 18px 20px;
}

.mp-sub-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a2530;
  margin: 0 0 12px;
}

.mp-view-all {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: #1a6b3c;
  text-decoration: none;
  cursor: pointer;
}

.mp-view-all:hover { text-decoration: underline; }
.mp-empty { font-size: 13px; color: #9aa5b0; margin: 8px 0 0; }
.mp-inline-link { color: #1a6b3c; text-decoration: underline; }

/* ── 設定フォーム ── */
.mp-settings-form { display: flex; flex-direction: column; gap: 0; }

.mp-settings-section {
  background: #fff;
  border: 1px solid #e8e1d6;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.mp-settings-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a2530;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0ece4;
}

.mp-form-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 14px;
}

.mp-form-input, .mp-form-textarea {
  padding: 8px 12px;
  border: 1.5px solid #e0d9ce;
  border-radius: 8px;
  font-size: 14px;
  background: #faf8f4;
  color: #1a2530;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.mp-form-input:focus, .mp-form-textarea:focus { border-color: #1a6b3c; background: #fff; }
.mp-form-textarea { min-height: 80px; resize: vertical; }

.mp-form-fieldset {
  border: 1.5px solid #e0d9ce;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 0 0 14px;
}

.mp-form-legend { font-size: 13px; font-weight: 600; color: #4a5568; padding: 0 4px; }

.mp-cat-checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

.mp-cat-check-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #4a5568;
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid #e0d9ce;
  border-radius: 20px;
  transition: background 0.12s, border-color 0.12s;
}

.mp-cat-check-label:has(input:checked) { background: #e8f5ed; border-color: #1a6b3c; color: #1a6b3c; font-weight: 600; }
.mp-cat-check-label input { display: none; }

.mp-settings-note { font-size: 13px; color: #9aa5b0; margin: 0; }

.mp-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mp-settings-msg { font-size: 13px; color: #66717a; margin: 0; }
.mp-settings-msg--ok { color: #1a6b3c; font-weight: 600; }
.mp-settings-msg--err { color: #c53030; }
.mp-shop-action-message { margin: 0 10px 12px; padding: 12px; border: 1px solid #da8994; border-radius: 8px; background: #fff2f3; color: #92253a; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
html[data-site-theme="dark"] .mp-shop-action-message { background: #39242c; color: #ffd0d8; border-color: #ad6678; }

/* ── ボタン ── */
.mp-btn-primary {
  padding: 10px 24px;
  background: #1a6b3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}

.mp-btn-primary:hover { background: #155730; }

.mp-action-btn {
  padding: 6px 14px;
  background: #f5f0e8;
  border: 1px solid #e0d9ce;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
}

.mp-action-btn:hover { background: #ede8de; }

/* ── ログアウト確認ダイアログ ── */
.mp-confirm-dialog {
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 360px;
  width: 100%;
  text-align: center;
}

.mp-confirm-dialog h2 { font-size: 18px; font-weight: 700; color: #1a2530; margin: 0 0 10px; }
.mp-confirm-dialog p { font-size: 14px; color: #66717a; margin: 0 0 24px; }

.mp-confirm-btns { display: flex; gap: 10px; justify-content: center; }

.mp-btn-secondary {
  padding: 9px 20px;
  background: #f5f0e8;
  border: 1px solid #e0d9ce;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
}

.mp-btn-secondary:hover { background: #ede8de; }

.mp-btn-danger {
  padding: 9px 20px;
  background: #e53e3e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.mp-btn-danger:hover { background: #c53030; }

/* ── ユーザーメニュー拡張 ── */
.qa-account-menu-items {
  padding: 6px 0;
  border-bottom: 1px solid #f0ece4;
}

.qa-account-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  font-size: 13px;
  color: #1a2530;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.1s;
}

.qa-account-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; stroke: #66717a; }
.qa-account-menu-item:hover { background: #f5f0e8; }
.qa-account-menu-item.active { color: #1a6b3c; font-weight: 700; }
.qa-account-menu-item.active svg { stroke: #1a6b3c; }

.qa-account-menu-footer { padding: 6px 0; }

.qa-account-menu-logout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 16px;
  width: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #c53030;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.1s;
}

.qa-account-menu-logout:hover { background: #fff5f5; }

.qa-menu-badge {
  display: inline-block;
  background: #e53e3e;
  color: #fff;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  padding: 0 4px;
  min-width: 14px;
  text-align: center;
  line-height: 14px;
  margin-left: 2px;
}

/* ── 共通グローバルヘッダー（Q&A / AI検討 / 棋譜エディタ / AI対局場 / マイページ） ── */
.site-header.qa-topnav {
  width: 100%;
  min-height: 56px;
  padding: 0;
  z-index: 90;
}

.site-header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1380px;
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
}

.site-header .qa-topnav-nav {
  min-width: 0;
}

.site-header .qa-topnav-nav a[aria-current="page"] {
  background: #f3f7f1;
}

.site-header .qa-topnav-logo img {
  display: block;
}

.site-header .qa-topnav-right {
  flex-shrink: 0;
}

.site-header .qa-topnav-ask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  text-decoration: none;
}

.site-header[data-site-context="guest"] .guest-login-link {
  min-width: 78px;
  justify-content: center;
}

.site-header .qa-bell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: 8px;
  color: #4a5568;
  cursor: pointer;
  text-decoration: none;
}

.site-header .qa-bell:hover {
  background: #f5f0e8;
  color: #1a2530;
}

.site-header .qa-bell::before {
  display: none;
  content: none;
}

.site-header .qa-bell svg {
  width: 21px;
  height: 21px;
}

.site-header .qa-bell span {
  top: 1px;
  right: 1px;
}

.site-header .qa-bell span[hidden],
.site-header .qa-menu-badge[hidden] {
  display: none;
}

.site-header-points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 40px;
  padding: 5px 10px 5px 7px;
  border: 1px solid #edd8bd;
  border-radius: 11px;
  background: linear-gradient(135deg, #fffdf8, #fff5df);
  color: #9a5e22;
  box-shadow: 0 2px 8px rgba(110, 69, 31, 0.06);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.site-header-points:hover {
  border-color: #dcbb89;
  background: linear-gradient(135deg, #fffefb, #ffedc7);
  color: #7c451b;
  transform: translateY(-1px);
}

.site-header-points-icon {
  display: grid;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  place-items: center;
}

.site-header-points-icon svg {
  display: block;
  width: 25px;
  height: 25px;
}

.site-header-points strong {
  color: #77431f;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.site-header-points small {
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.site-header .qa-account-menu-button > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.site-header .qa-account-menu-panel {
  width: 250px;
  max-height: calc(100vh - 70px);
  overflow-x: hidden;
  overflow-y: auto;
}

.site-header-page-actions {
  padding: 6px 0;
  border-bottom: 1px solid #f0ece4;
}

.site-header-menu-button {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #e0d9ce;
  border-radius: 8px;
  background: #fff;
  color: #4a5568;
  cursor: pointer;
}

.site-header-menu-button span {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-header.is-menu-open .site-header-menu-button span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header.is-menu-open .site-header-menu-button span:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .site-header-menu-button span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
  .site-header .qa-topnav-user {
    display: none;
  }

  .site-header .qa-account-menu-button {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 6px 8px;
  }

  .site-header .qa-topnav-chevron {
    display: none;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    gap: 8px;
    padding: 0 12px;
  }

  .site-header-menu-button {
    display: flex;
  }

  .site-header .qa-topnav-nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 12px;
    right: 12px;
    z-index: 210;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border: 1px solid #e0d9ce;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.13);
  }

  .site-header.is-menu-open .qa-topnav-nav {
    display: flex;
  }

  .site-header .qa-topnav-nav a {
    padding: 10px 12px;
  }

  .site-header .qa-topnav-right {
    gap: 4px;
  }

  .site-header-points {
    gap: 3px;
    min-height: 36px;
    padding: 4px 7px 4px 5px;
  }

  .site-header-points-icon,
  .site-header-points-icon svg {
    width: 21px;
    height: 21px;
  }

  .site-header-points-icon {
    flex-basis: 21px;
  }

  .site-header-points strong {
    font-size: 11px;
  }

  .site-header-points small {
    display: none;
  }

  .site-header .qa-topnav-ask-btn {
    display: none;
  }

  .site-header[data-site-context="guest"] .guest-login-link {
    display: inline-flex;
  }
}

@media (max-width: 460px) {
  .site-header .qa-topnav-logo img {
    height: 31px;
  }

  .site-header .qa-bell,
  .site-header .qa-account-menu-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

/* ── レスポンシブ ── */
@media (max-width: 720px) {
  .mp-layout { grid-template-columns: 1fr; }
  .mp-sidebar { display: none; }
  .mp-mobile-profile { display: flex; }
  .mp-mobile-tabs { display: flex; }
  .mp-layout { margin-top: 0; padding-top: 16px; }
}

@media (max-width: 480px) {
  .mp-confirm-dialog { padding: 24px 20px; }
  .mp-section-head { flex-direction: column; align-items: flex-start; }
}

/* ── 活動ダッシュボード (概要タブ) ── */
.mp-dashboard { display: flex; flex-direction: column; gap: 16px; }
.mp-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #cfe7d8;
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.85), transparent 38%),
    linear-gradient(135deg, #e8f5ed 0%, #f8fbf8 64%, #fffaf0 100%);
  box-shadow: 0 8px 24px rgba(26, 107, 60, .07);
}
.mp-dashboard-eyebrow { color: #1a6b3c; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.mp-dashboard-hero h3 { margin: 5px 0 6px; color: #18251f; font-size: 23px; line-height: 1.45; }
.mp-dashboard-hero-copy > p { margin: 0; color: #5c6c63; font-size: 13px; }
.mp-dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mp-dashboard-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid #b9d9c5;
  border-radius: 9px;
  background: rgba(255,255,255,.86);
  color: #24583a;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.mp-dashboard-action:hover { border-color: #1a6b3c; background: #fff; }
.mp-dashboard-action--primary { border-color: #1a6b3c; background: #1a6b3c; color: #fff; }
.mp-dashboard-action--primary:hover { background: #155730; color: #fff; }
.mp-profile-progress {
  align-self: stretch;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}
.mp-profile-progress-head { display: flex; align-items: center; justify-content: space-between; color: #54645b; font-size: 11px; }
.mp-profile-progress-head strong { color: #1a6b3c; font-size: 14px; }
.mp-profile-progress-track { height: 7px; margin: 10px 0; overflow: hidden; border-radius: 999px; background: #dce9e0; }
.mp-profile-progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1a6b3c, #5ea879); }
.mp-profile-progress button,
.mp-card-title-row button,
.mp-card-title-row a {
  padding: 0;
  border: 0;
  background: none;
  color: #1a6b3c;
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mp-profile-progress button:hover,
.mp-card-title-row button:hover,
.mp-card-title-row a:hover { text-decoration: underline; }
.mp-dashboard-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.mp-dashboard-metric {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 122px;
  padding: 15px;
  border: 1px solid #e4e9e6;
  border-radius: 12px;
  background: #fff;
  color: #243129;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 40, 28, .035);
}
.mp-dashboard-metric:hover { border-color: #9ec9ad; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(26,107,60,.07); }
.mp-dashboard-metric > span { color: #66717a; font-size: 11px; font-weight: 700; }
.mp-dashboard-metric strong { margin: 8px 0 4px; color: #1a6b3c; font-size: 28px; line-height: 1; }
.mp-dashboard-metric strong small { margin-left: 3px; font-size: 11px; font-weight: 700; }
.mp-dashboard-metric em { margin-top: auto; overflow: hidden; color: #87938c; font-size: 10px; font-style: normal; line-height: 1.4; }
.mp-dashboard-metric--ticket { border-color: #ecd8a7; background: linear-gradient(145deg, #fff9e9, #fff); }
.mp-dashboard-metric--ticket strong { color: #9a6700; }
.mp-dashboard-metric--pvp { border-color: #d9d1b8; background: linear-gradient(145deg, #fffaf0, #fff); }
.mp-dashboard-metric--pvp strong { color: #8a6422; }
.mp-pvp-history { display: grid; gap: 8px; }
.mp-pvp-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid #e7ebe8; border-radius: 10px; padding: 10px 12px; color: #34443b; text-decoration: none; background: #fbfcfb; }
.mp-pvp-history-row > span { display: grid; gap: 2px; min-width: 0; }
.mp-pvp-history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.mp-pvp-history-row small { color: #7d8982; font-size: 10px; }
.mp-pvp-history-row b { color: #5f7067; font-size: 12px; }
.mp-pvp-history-row b[data-tone="up"] { color: #258146; }
.mp-pvp-history-row b[data-tone="down"] { color: #ad4646; }
.mp-pvp-card { grid-column: 1 / -1; }
.mp-dashboard-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mp-card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mp-card-title-row .mp-sub-title { margin: 0; }
.mp-empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 18px; border: 1px dashed #d7dfda; border-radius: 10px; background: #fafcfb; }
.mp-empty-state strong { color: #33423a; font-size: 13px; }
.mp-empty-state span { color: #7b8880; font-size: 11px; }
.mp-empty-state a { margin-top: 5px; color: #1a6b3c; font-size: 12px; font-weight: 700; }
.mp-dashboard :focus-visible { outline: 3px solid rgba(26,107,60,.24); outline-offset: 2px; }

/* ── アバターショップ ── */
.mp-shop-wallet { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 28px; margin-bottom: 18px; padding: 20px 24px; border: 1px solid #ecd0c2; border-radius: 16px; background: linear-gradient(135deg, #fff4ed, #fffaf6 55%, #fff); box-shadow: 0 7px 24px rgba(117,55,28,.06); }
.mp-shop-wallet > div { display: grid; gap: 4px; min-width: 170px; }
.mp-shop-wallet span { color: #8e614b; font-size: 11px; font-weight: 700; }
.mp-shop-wallet strong { color: #ad5028; font: 800 34px/1 "Noto Sans JP", sans-serif; }
.mp-shop-wallet strong small { margin-left: 4px; font-size: 13px; }
.mp-shop-wallet p { margin: 0; color: #755f55; font-size: 12px; line-height: 1.8; }
.mp-shop-section { padding: 20px; border: 1px solid #e8e1dc; border-radius: 15px; background: #fff; }
.mp-shop-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.mp-shop-heading h3 { margin: 0; color: #3f2b22; font: 700 18px/1.4 "Noto Serif JP", serif; }
.mp-shop-heading p { margin: 4px 0 0; color: #88766d; font-size: 11px; }
.mp-shop-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.mp-shop-item { display: grid; align-content: start; overflow: hidden; border: 1px solid #eadfda; border-radius: 13px; background: #fffdfc; }
.mp-shop-item.selected { border-color: #dc8e74; box-shadow: 0 0 0 2px rgba(220,142,116,.14); }
.mp-shop-image { display: grid; aspect-ratio: 1 / 1; place-items: center; overflow: hidden; background: linear-gradient(#fff9f4, #f9eee7); }
.mp-shop-image img { width: 112%; height: 112%; object-fit: contain; transform: translateY(4%); }
.mp-shop-item-copy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 6px; padding: 10px 10px 7px; }
.mp-shop-item-copy h4 { margin: 0; overflow: hidden; color: #463029; font: 700 14px/1.4 "Noto Serif JP", serif; text-overflow: ellipsis; white-space: nowrap; }
.mp-shop-item-copy span { color: #a15433; font-size: 10px; font-weight: 800; white-space: nowrap; }
.mp-shop-item > button { min-height: 36px; margin: 0 9px 10px; border: 1px solid #d98c70; border-radius: 8px; color: #a44324; font-size: 11px; font-weight: 800; background: #fff6f1; cursor: pointer; }
.mp-shop-item > button:hover:not(:disabled) { color: #fff; background: #b95632; }
.mp-shop-item > button:disabled { border-color: #e3ddd9; color: #8d817b; background: #f3f1ef; cursor: default; }
.mp-shop-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.mp-mission-list, .mp-point-history { display: grid; gap: 8px; }
.mp-mission-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid #ece6e2; border-radius: 10px; background: #fffdfb; }
.mp-mission-row > span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: #aa6b45; font-size: 11px; background: #f8eadf; }
.mp-mission-row > div { display: grid; gap: 2px; }
.mp-mission-row strong { color: #4b3b34; font-size: 12px; }
.mp-mission-row small { color: #998b84; font-size: 9px; }
.mp-mission-row b { color: #aa572f; font-size: 12px; }
.mp-mission-row.complete > span { color: #fff; background: #35905a; }
.mp-daily-missions { margin-bottom: 16px; background: linear-gradient(150deg, #fff, #fffbf5); }
.mp-mission-reset { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #ead8c8; border-radius: 999px; color: #93694e; font-size: 10px; font-weight: 800; background: #fff9f1; }
.mp-daily-mission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mp-mission-card { display: grid; grid-template-rows: auto auto 36px; gap: 10px; min-width: 0; padding: 13px; border: 1px solid #eadfd8; border-radius: 12px; background: #fff; }
.mp-mission-card.complete { border-color: #b8ddc5; background: #f7fcf8; }
.mp-mission-card.claimed { border-color: #d8e7dd; background: #f5f8f6; }
.mp-mission-card.bonus { border-color: #e2c583; background: linear-gradient(145deg, #fffdf5, #fff5d9); }
.mp-mission-card-title { display: grid; grid-template-columns: 24px minmax(0, 1fr); align-items: center; gap: 7px; }
.mp-mission-card-title > span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: #a56541; font-size: 10px; font-weight: 900; background: #f8e9df; }
.mp-mission-card.complete .mp-mission-card-title > span,
.mp-mission-card.claimed .mp-mission-card-title > span { color: #fff; background: #3c9660; }
.mp-mission-card.bonus .mp-mission-card-title > span { color: #8a5916; background: #f6d77e; }
.mp-mission-card-title strong { min-width: 0; color: #49362d; font-size: 11px; line-height: 1.45; }
.mp-mission-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.mp-mission-progress progress { width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 999px; background: #eee8e4; }
.mp-mission-progress progress::-webkit-progress-bar { border-radius: 999px; background: #eee8e4; }
.mp-mission-progress progress::-webkit-progress-value { border-radius: 999px; background: #d48962; }
.mp-mission-card.complete .mp-mission-progress progress::-webkit-progress-value,
.mp-mission-card.claimed .mp-mission-progress progress::-webkit-progress-value { background: #4aa66c; }
.mp-mission-progress progress::-moz-progress-bar { border-radius: 999px; background: #d48962; }
.mp-mission-progress small { color: #887870; font-size: 9px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mp-mission-card > button { min-height: 36px; padding: 5px 8px; border: 1px solid #d98c70; border-radius: 8px; color: #a44324; font-size: 10px; font-weight: 800; background: #fff6f1; cursor: pointer; }
.mp-mission-card > button:hover:not(:disabled) { color: #fff; background: #b95632; }
.mp-mission-card > button:disabled { border-color: #e6dfdb; color: #9b8e87; background: #f5f2f0; cursor: default; }
.mp-mission-card.complete > button:not(:disabled) { border-color: #4b9f69; color: #fff; background: #3c9660; box-shadow: 0 5px 12px rgba(60, 150, 96, .17); }
.mp-mission-card.bonus.complete > button:not(:disabled) { border-color: #bc8125; background: #b9781d; box-shadow: 0 5px 12px rgba(185, 120, 29, .17); }
.mp-point-history-section { margin-top: 16px; }
.mp-point-history > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid #eee8e4; }
.mp-point-history > div > span { display: grid; gap: 2px; min-width: 0; }
.mp-point-history strong { overflow: hidden; color: #4b3b34; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mp-point-history small { color: #9a8d86; font-size: 9px; }
.mp-point-history b { font-size: 12px; }
.mp-point-history b.plus { color: #27834b; }
.mp-point-history b.minus { color: #b6543a; }

/* 旧プロフィール概要カード */
.mp-profile-summary-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.mp-profile-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.mp-avatar-edit-btn {
  font-size: 11px;
  color: #1a6b3c;
  background: none;
  border: 1px solid #c8e6d4;
  border-radius: 12px;
  padding: 2px 8px;
  cursor: pointer;
  font-family: inherit;
}
.mp-avatar-edit-btn:hover { background: #e8f5ed; }

.mp-avatar-xl { width: 80px; height: 80px; font-size: 32px; }

.mp-profile-info { flex: 1; min-width: 0; }

.mp-profile-name-row,
.mp-profile-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.mp-display-name-lg {
  font-size: 20px;
  font-weight: 800;
  color: #1a2530;
}

.mp-rank-chip {
  display: inline-block;
  padding: 3px 10px;
  background: #e8f5ed;
  color: #1a6b3c;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
}

.mp-inline-edit-btn {
  font-size: 12px;
  color: #1a6b3c;
  background: none;
  border: 1px solid #c8e6d4;
  border-radius: 12px;
  padding: 2px 10px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.mp-inline-edit-btn:hover { background: #e8f5ed; }

.mp-bio-text {
  font-size: 13px;
  color: #66717a;
  line-height: 1.6;
  margin: 0 0 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mp-view-all-btn {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: #1a6b3c;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.mp-view-all-btn:hover { text-decoration: underline; }

/* ── 設定フォーム (拡張) ── */
.mp-settings-container { display: flex; flex-direction: column; gap: 16px; }

.mp-profile-image-setting {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 4px 0 18px;
  border-bottom: 1px solid #f0ece4;
}

.mp-profile-image-setting .mp-avatar-xl {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px #ded6ca, 0 4px 14px rgba(72, 53, 35, .12);
}

.mp-profile-image-setting-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.mp-profile-image-setting-copy > strong { color: #29372f; font-size: 14px; }
.mp-profile-image-setting-copy > p { margin: 0; color: #78847d; font-size: 12px; line-height: 1.6; }
.mp-profile-image-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; }
.mp-profile-image-actions button:disabled { opacity: .48; cursor: not-allowed; }
.mp-profile-image-remove { color: #a75a62; border-color: #ead4d6; }

.mp-settings-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-bottom: 1px solid #f0ece4;
}
.mp-settings-field-row:last-of-type { border-bottom: none; }

.mp-settings-label {
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  min-width: 80px;
}

.mp-settings-value {
  flex: 1;
  font-size: 14px;
  color: #1a2530;
}

.mp-settings-subform { margin-top: 12px; }

.mp-settings-field-save {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  justify-content: flex-end;
}

.mp-btn-sm { padding: 6px 16px; font-size: 13px; }

/* トグルスイッチ */
.mp-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.mp-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.mp-toggle-track {
  position: absolute;
  inset: 0;
  background: #cbd5e0;
  border-radius: 12px;
  transition: background 0.2s;
}

.mp-toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.mp-toggle input:checked + .mp-toggle-track { background: #1a6b3c; }
.mp-toggle input:checked + .mp-toggle-track::after { transform: translateX(18px); }

.mp-settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0ece4;
}
.mp-settings-toggle-row:last-of-type { border-bottom: none; }

.mp-settings-toggle-label { font-size: 14px; font-weight: 600; color: #1a2530; }
.mp-settings-toggle-desc  { font-size: 12px; color: #66717a; margin: 2px 0 0; }

/* 危険ゾーン */
.mp-settings-danger-zone { border-color: #fed7d7; }
.mp-danger-title { color: #c53030; }

/* モーダル拡張 */
.mp-confirm-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 8px;
  line-height: 1;
}

.mp-confirm-body {
  font-size: 15px;
  font-weight: 600;
  color: #1a2530;
  margin: 0 0 6px;
  word-break: break-all;
}

.mp-confirm-sub {
  font-size: 13px;
  color: #66717a;
  margin: 0 0 20px;
}

.mp-form-dialog { text-align: left; }
.mp-form-dialog h2 { text-align: left; margin-bottom: 16px; }

/* バッジ: 公開/非公開 */
.mp-badge-private { display: inline-block; padding: 2px 7px; background: #f0ece4; color: #66717a; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.mp-badge-public  { display: inline-block; padding: 2px 7px; background: #e8f5ed; color: #1a6b3c; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* 解決ボタン */
.mp-row-btn--solve  { background: #e8f5ed; border-color: #c8e6d4; color: #1a6b3c; }
.mp-row-btn--solve:hover { background: #d0eddb; }
.mp-row-btn--toggle { background: #f5f0e8; border-color: #e0d9ce; color: #4a5568; }
.mp-row-btn--toggle:hover { background: #ede8de; }

/* プロフィール要素レスポンシブ */
@media (max-width: 1000px) {
  .mp-shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mp-daily-mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .mp-dashboard-hero { grid-template-columns: 1fr; padding: 18px; }
  .mp-dashboard-hero h3 { font-size: 19px; }
  .mp-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-dashboard-columns { grid-template-columns: 1fr; }
  .mp-dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .mp-dashboard-action--primary { grid-column: 1 / -1; }
  .mp-profile-summary-card { flex-direction: column; align-items: center; text-align: center; }
  .mp-profile-name-row,
  .mp-profile-rank-row { justify-content: center; }
  .mp-shop-wallet { grid-template-columns: 1fr; padding: 17px; }
  .mp-shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .mp-shop-section { padding: 14px; }
  .mp-shop-columns { grid-template-columns: 1fr; }
  .mp-daily-mission-grid { grid-template-columns: 1fr; }
  .mp-mission-reset { align-self: flex-start; }
}

/* ================================================================
   質問投稿モーダル (.qm-*)
   ================================================================ */

/* ── ダイアログ本体 ── */
.qm-dialog {
  background: #fff;
  border-radius: 16px;
  width: min(640px, 100%);
  max-height: min(90vh, 800px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(10, 20, 40, 0.22);
  overflow: hidden;
}

/* ── ヘッダー ── */
.qm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 24px 18px;
  border-bottom: 1px solid #f0ece4;
  flex-shrink: 0;
}

.qm-header-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.qm-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #e8f5ed;
  border-radius: 10px;
  flex-shrink: 0;
}

.qm-header-icon svg {
  width: 22px;
  height: 22px;
  stroke: #1a6b3c;
}

.qm-title {
  font-size: 20px;
  font-weight: 800;
  color: #1a2530;
  margin: 0 0 4px;
  line-height: 1.2;
}

.qm-subtitle {
  font-size: 13px;
  color: #66717a;
  margin: 0;
  line-height: 1.5;
}

.qm-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #66717a;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}

.qm-close-btn:hover { background: #f5f0e8; color: #1a2530; }
.qm-close-btn svg { width: 20px; height: 20px; }

/* ── スクロール領域 ── */
.qm-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── フィールド共通 ── */
.qm-field { display: flex; flex-direction: column; gap: 8px; }

.qm-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a2530;
}

.qm-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e0d9ce;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1a2530;
  background: #faf8f4;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.qm-input:focus {
  border-color: #1a6b3c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.10);
}

.qm-input::placeholder { color: #b0bec5; }

.qm-hint {
  font-size: 12px;
  color: #9aa5b0;
  margin: 0;
}

/* ── カテゴリボタングループ ── */
.qm-cat-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.qm-cat-btn {
  padding: 7px 16px;
  border: 1.5px solid #e0d9ce;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  line-height: 1;
}

.qm-cat-btn:hover { border-color: #1a6b3c; color: #1a6b3c; background: #f0faf5; }

.qm-cat-btn.active {
  border-color: #1a6b3c;
  background: #fff;
  color: #1a6b3c;
  box-shadow: inset 0 0 0 1px #1a6b3c;
}

/* ── 本文テキストエリア ── */
.qm-textarea-wrap { position: relative; }

.qm-textarea {
  width: 100%;
  padding: 11px 14px 28px;
  border: 1.5px solid #e0d9ce;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #1a2530;
  background: #faf8f4;
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  line-height: 1.6;
}

.qm-textarea:focus {
  border-color: #1a6b3c;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.10);
}

.qm-textarea::placeholder { color: #b0bec5; }

.qm-char-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  font-size: 11px;
  color: #9aa5b0;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

/* ── 公開設定 ── */
.qm-visibility-group {
  display: flex;
  gap: 0;
}

.qm-vis-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border: 1.5px solid #e0d9ce;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  line-height: 1;
}

.qm-vis-btn:first-child { border-radius: 10px 0 0 10px; }
.qm-vis-btn:last-child  { border-radius: 0 10px 10px 0; margin-left: -1px; }

.qm-vis-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.qm-vis-btn:hover { background: #f0faf5; color: #1a6b3c; border-color: #1a6b3c; z-index: 1; }

.qm-vis-btn.active {
  border-color: #1a6b3c;
  background: #f0faf5;
  color: #1a6b3c;
  z-index: 1;
}

/* ── 棋譜相談誘導カード ── */
.qm-kifu-promo {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid #d0eddb;
  border-radius: 12px;
  background: #f5fbf7;
}

.qm-kifu-promo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #e8f5ed;
  border-radius: 8px;
  flex-shrink: 0;
}

.qm-kifu-promo-icon svg {
  width: 20px;
  height: 20px;
  stroke: #1a6b3c;
}

.qm-kifu-promo-body { flex: 1; min-width: 0; }

.qm-kifu-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  color: #1a6b3c;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  margin-bottom: 4px;
}

.qm-kifu-promo-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.qm-kifu-promo-link:hover { text-decoration: underline; }

.qm-kifu-promo-desc {
  font-size: 12px;
  color: #4a7c59;
  margin: 0;
  line-height: 1.5;
}

/* ── フッター ── */
.qm-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #f0ece4;
  flex-shrink: 0;
  background: #fff;
}

.qm-message {
  flex: 1;
  font-size: 13px;
  color: #c53030;
  margin: 0;
  min-width: 0;
}

.qm-footer-btns {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.qm-btn-cancel {
  padding: 11px 24px;
  background: #fff;
  border: 1.5px solid #e0d9ce;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}

.qm-btn-cancel:hover { background: #f5f0e8; border-color: #c8bfb2; }

.qm-btn-submit {
  padding: 11px 28px;
  background: #1a6b3c;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.qm-btn-submit:hover   { background: #155730; }
.qm-btn-submit:active  { background: #124828; }
.qm-btn-submit:disabled { background: #a0c4b0; cursor: not-allowed; }

/* ── レスポンシブ ── */
@media (max-width: 640px) {
  .qm-header  { padding: 18px 16px 14px; }
  .qm-body    { padding: 16px; gap: 16px; }
  .qm-footer  { padding: 14px 16px; }
  .qm-cat-btn { padding: 6px 12px; font-size: 12px; }
  .qm-btn-cancel, .qm-btn-submit { padding: 10px 18px; font-size: 13px; }
}

@media (max-width: 400px) {
  .qm-header-icon { display: none; }
  .qm-vis-btn { padding: 8px 14px; }
  .qm-footer  { flex-wrap: wrap; }
  .qm-message { width: 100%; }
}

/* ================================================================
   棋譜相談ページ (.qk-*)  テーマ図ワークフロー v2
   ================================================================ */

/* ── シェル (2カラム) ── */
.qk-shell {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  min-height: calc(100vh - 60px);
  min-height: calc(100dvh - 60px);
  max-width: 1160px;
  margin: 0 auto;
}

@media (max-width: 380px) {
  .mp-dashboard-metrics { grid-template-columns: 1fr; }
  .mp-dashboard-actions { grid-template-columns: 1fr; }
  .mp-dashboard-action--primary { grid-column: auto; }
}

/* ── 左: フォームパネル ── */
.qk-form-panel {
  padding: 28px 24px 40px;
  border-right: 1px solid #e8e2d6;
  background: #faf8f4;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
  position: sticky;
  top: 60px;
}

.qk-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.qk-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #1a6b3c;
  border-radius: 11px;
  flex-shrink: 0;
}
.qk-header-icon svg { width: 24px; height: 24px; stroke: #fff; }

.qk-page-title {
  font-size: 24px;
  font-weight: 900;
  color: #1a2530;
  margin: 0 0 3px;
  font-family: 'Noto Serif JP', serif;
}
.qk-page-subtitle { font-size: 12px; color: #66717a; margin: 0; }

/* ── フィールド ── */
.qk-field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.qk-label { font-size: 13px; font-weight: 700; color: #1a2530; }
.qk-input {
  padding: 10px 13px;
  border: 1.5px solid #e0d9ce;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1a2530;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.qk-input:focus { border-color: #1a6b3c; box-shadow: 0 0 0 3px rgba(26,107,60,0.10); }
.qk-input::placeholder { color: #b0bec5; }

.qk-textarea-wrap { position: relative; }
.qk-textarea {
  width: 100%;
  padding: 10px 13px 26px;
  border: 1.5px solid #e0d9ce;
  border-radius: 9px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: #1a2530;
  resize: vertical;
  min-height: 110px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  line-height: 1.6;
}
.qk-textarea:focus { border-color: #1a6b3c; box-shadow: 0 0 0 3px rgba(26,107,60,0.10); }
.qk-textarea::placeholder { color: #b0bec5; }

/* カテゴリ */
.qk-cat-group { display: flex; flex-wrap: wrap; gap: 7px; }

/* 公開設定カード */
.qk-vis-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.qk-vis-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e0d9ce;
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.qk-vis-card:hover { border-color: #1a6b3c; background: #f5fbf7; }
.qk-vis-card.active { border-color: #1a6b3c; background: #edf7f2; }
.qk-vis-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #e8f5ed;
  border-radius: 7px;
  flex-shrink: 0;
}
.qk-vis-card.active .qk-vis-card-icon { background: #c8e6d4; }
.qk-vis-card-icon svg { width: 16px; height: 16px; stroke: #1a6b3c; }
.qk-vis-card-text { display: flex; flex-direction: column; gap: 2px; }
.qk-vis-card-text strong { font-size: 12px; font-weight: 700; color: #1a2530; }
.qk-vis-card-text span  { font-size: 11px; color: #66717a; }

/* フッターボタン */
.qk-form-footer { display: flex; gap: 10px; margin-top: 4px; margin-bottom: 18px; }
.qk-btn-submit {
  flex: 1;
  padding: 13px 20px;
  background: #1a56db;
  border: none;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.qk-btn-submit:hover    { background: #1648c0; }
.qk-btn-submit:disabled { background: #9ab0e4; cursor: not-allowed; }
.qk-btn-cancel {
  padding: 13px 20px;
  background: #fff;
  border: 1.5px solid #e0d9ce;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.qk-btn-cancel:hover { background: #f5f0e8; }

.qk-message { font-size: 12px; margin: 0 0 6px; min-height: 16px; }
.qk-message--error { color: #c53030; }

/* 普通の質問リンク */
.qk-plain-link { text-align: center; }
.qk-plain-link-a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #1a6b3c;
  text-decoration: none;
}
.qk-plain-link-a:hover { text-decoration: underline; }
.qk-plain-link-a svg { width: 14px; height: 14px; }

/* ── qa-new.html: フィールドヒント ── */
.qk-field-hint {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

/* ── qa-new.html: 盤面任意説明文 ── */
.qk-board-optional-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #166534;
  line-height: 1.6;
}
.qk-board-optional-note p { margin: 0; }

/* ── 右: ボードパネル ── */
.qk-board-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 20px 32px;
  background: #fff;
  min-height: 0;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── セクション共通 ── */
.qk-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #66717a;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ── テーマ図の作成方法 ── */
.qk-method-section { margin-bottom: 14px; }

.qk-method-tabs {
  display: flex;
  gap: 0;
  border: 1.5px solid #e0d9ce;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 8px;
}

.qk-method-tab {
  flex: 1;
  padding: 9px 8px;
  background: #fff;
  border: none;
  border-right: 1px solid #e0d9ce;
  font-size: 12px;
  font-weight: 600;
  color: #66717a;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.qk-method-tab:last-child { border-right: none; }
.qk-method-tab:hover { background: #f5fbf7; color: #1a6b3c; }
.qk-method-tab.active { background: #1a6b3c; color: #fff; }
.qk-method-tab[disabled] { opacity: 0.6; cursor: default; }
.qk-method-tab[disabled]:hover { background: #fff; color: #66717a; }

.qk-soon-tag {
  display: inline-block;
  padding: 1px 5px;
  background: rgba(255,255,255,0.25);
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.qk-method-tab:not(.active) .qk-soon-tag { background: #e8e2d6; color: #66717a; }

/* ── SGFセクション ── */
.qk-sgf-source-section {
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qk-sgf-drop {
  border: 2px dashed #c8d5cc;
  border-radius: 10px;
  background: #f5fbf7;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.qk-sgf-drop:hover,
.qk-sgf-drop--over { border-color: #1a6b3c; background: #edf7f2; outline: none; }
.qk-sgf-drop--loaded { border-style: solid; border-color: #1a6b3c; }

.qk-sgf-file-icon svg { width: 32px; height: 38px; flex-shrink: 0; }

.qk-sgf-drop-text { flex: 1; }
.qk-sgf-drop-text p { margin: 0; font-size: 13px; color: #4a5568; }
.qk-sgf-or { font-size: 11px; color: #9aa5b0; margin-top: 3px !important; }
.qk-sgf-select-btn {
  margin-top: 6px;
  padding: 6px 16px;
  border: 1.5px solid #1a6b3c;
  border-radius: 7px;
  background: #fff;
  color: #1a6b3c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
  display: block;
}
.qk-sgf-select-btn:hover { background: #e8f5ed; }

.qk-file-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: #f0faf5;
  border: 1px solid #c0e4cc;
  border-radius: 7px;
  font-size: 12px;
  color: #2d5a3d;
}
.qk-file-row svg { width: 14px; height: 14px; flex-shrink: 0; }
.qk-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qk-file-size { color: #66717a; flex-shrink: 0; }

/* SGFナビ */
.qk-sgf-nav-area { display: flex; flex-direction: column; gap: 8px; }

.qk-sgf-nav-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #4a5568;
}
.qk-sgf-total { color: #9aa5b0; }

.qk-set-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 11px;
  background: #fff;
  border: 2px solid #1a6b3c;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #1a6b3c;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.qk-set-theme-btn:hover { background: #edf7f2; }
.qk-set-theme-btn svg { width: 14px; height: 14px; }

/* ── カメラ (準備中) ── */
.qk-camera-section { margin-bottom: 14px; }
.qk-camera-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px 20px;
  background: #f5f5f5;
  border: 1.5px dashed #d0d0d0;
  border-radius: 10px;
  text-align: center;
}
.qk-camera-placeholder svg { width: 40px; height: 40px; }
.qk-camera-title { font-size: 14px; font-weight: 700; color: #66717a; margin: 0; }
.qk-camera-desc  { font-size: 12px; color: #9aa5b0; margin: 0; }

/* ── テーマ図セクション ── */
.qk-theme-section {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qk-theme-header { display: flex; flex-direction: column; gap: 6px; }
.qk-theme-title-row { display: flex; align-items: center; gap: 10px; }

.qk-board-status-badge {
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  background: #e8f5ed;
  color: #1a6b3c;
}
.qk-board-status-badge[data-mode="browse"] { background: #fff3e0; color: #b45309; }
.qk-board-status-badge[data-mode="input"]  { background: #e3f2fd; color: #1565c0; }
.qk-board-status-badge[data-mode="cont"]   { background: #f3e5f5; color: #6a1b9a; }

/* 路数・リセット */
.qk-size-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.qk-size-btn {
  padding: 5px 12px;
  border: 1.5px solid #e0d9ce;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.qk-size-btn:hover { border-color: #1a6b3c; color: #1a6b3c; }
.qk-size-btn.active { border-color: #1a6b3c; background: #edf7f2; color: #1a6b3c; }
.qk-reset-btn {
  margin-left: auto;
  padding: 5px 12px;
  border: 1.5px solid #e0d9ce;
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #66717a;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.qk-reset-btn:hover { background: #f5f0e8; }

/* ボードラッパー */
.qk-board-wrap {
  display: flex;
  justify-content: center;
  background: #f5f0e4;
  border-radius: 9px;
  padding: 10px;
}

/* ── 編集ツール ── */
.qk-edit-tools { display: flex; flex-direction: column; gap: 8px; }

.qk-tool-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qk-tool-sublabel { font-size: 11px; font-weight: 600; color: #9aa5b0; flex-shrink: 0; min-width: 50px; }

.qk-tool-group { display: flex; flex-wrap: wrap; gap: 5px; }

.qk-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1.5px solid #e0d9ce;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
  min-width: 36px;
  justify-content: center;
}
.qk-tool-btn:hover  { border-color: #1a6b3c; background: #f0faf5; color: #1a6b3c; }
.qk-tool-btn.active { border-color: #1a6b3c; background: #edf7f2; color: #1a6b3c; }
.qk-tool-btn:disabled {
  cursor: default;
  opacity: 0.45;
  background: #f8f5ef;
  color: #9aa5b0;
}
.qk-tool-btn--done  { border-color: #1a6b3c; background: #1a6b3c; color: #fff; }
.qk-tool-btn--done:hover { background: #155730; border-color: #155730; color: #fff; }

/* 小石チップ */
.qk-sc {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.qk-sc.black { background: url('/assets/go-stones/black-stone.svg') center / contain no-repeat; }
.qk-sc.white { background: url('/assets/go-stones/white-stone.svg') center / contain no-repeat; border: 1px solid #ccc; }

/* 手順追加ボタン */
.qk-add-moves-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  background: #fff;
  border: 1.5px dashed #1a6b3c;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  color: #1a6b3c;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.qk-add-moves-btn:hover { background: #f0faf5; }
.qk-add-moves-btn svg { width: 14px; height: 14px; }

/* ── 手順セクション ── */
.qk-cont-section {
  border-top: 1px solid #e8e2d6;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qk-cont-header { display: flex; align-items: center; justify-content: space-between; }
.qk-cont-count  { font-size: 12px; color: #9aa5b0; font-weight: 600; }

/* 手順チップ */
.qk-move-chips-scroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  padding: 3px 2px;
  scrollbar-width: thin;
  align-items: center;
  min-height: 32px;
}

.qk-move-chips-scroll.qk-cont-tree {
  position: relative;
  display: block;
  min-height: 82px;
  max-height: 238px;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(90deg, rgba(231, 238, 245, 0.72) 1px, transparent 1px) 0 0 / 24px 100%,
    #fffdfa;
  border: 1px solid #dbe6ef;
  border-radius: 8px;
}

.qk-cont-tree-canvas {
  position: relative;
  min-width: 100%;
}

.qk-cont-tree .qk-cont-theme-node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.qk-move-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border: 1.5px solid #e0d9ce;
  border-radius: 14px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
  transition: border-color 0.1s, background 0.1s;
}
.qk-move-chip:hover { border-color: #1a6b3c; background: #f0faf5; }
.qk-move-chip.active { border-color: #1a6b3c; background: #1a6b3c; color: #fff; }
.qk-move-chip--theme { background: #f5f0e8; border-color: #c8bfb2; color: #4a3520; }
.qk-move-chip--theme.active { background: #1a6b3c; border-color: #1a6b3c; color: #fff; }
.qk-move-ellipsis { font-size: 11px; color: #9aa5b0; padding: 3px 5px; cursor: default; border: none; background: none; }

.qk-cont-tree .tree-node {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.qk-cont-tree .black-node {
  border: 1px solid #050607;
  background: radial-gradient(circle at 35% 28%, #5d6470 0 10%, #15191f 42%, #050607 100%);
  color: #fff;
}

.qk-cont-tree .white-node {
  border: 1px solid #9ca3af;
  background: radial-gradient(circle at 35% 28%, #fff 0 18%, #f3f4f6 55%, #cbd5e1 100%);
  color: #111827;
}

.qk-cont-tree .tree-node.current,
.qk-cont-tree .tree-node.selected-branch {
  outline: 3px solid #1a6b3c;
  outline-offset: 2px;
}

.qk-cont-tree .manual-branch-node {
  box-shadow: 0 0 0 2px rgba(31, 79, 122, 0.16);
}

.game-tree-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.tree-line {
  fill: none;
  stroke: #b7c4d1;
  stroke-width: 2;
}

.branch-line {
  stroke-dasharray: 3 3;
}

.qk-cont-move-menu {
  position: fixed;
  z-index: 1200;
  display: grid;
  min-width: 150px;
  padding: 6px;
  border: 1px solid #d8d0c2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.qk-cont-move-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1a2530;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.qk-cont-move-menu button:hover { background: #f5f0e8; }
.qk-cont-move-menu button:disabled { color: #a0a8b0; cursor: default; }
.qk-cont-move-menu button:disabled:hover { background: transparent; }

/* ナビ */
.qk-move-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}
.qk-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 32px;
  padding: 0;
  border: 1.5px solid #cad7e3;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  color: #26323d;
  flex-shrink: 0;
  transition: border-color 0.12s, background 0.12s;
}
.qk-nav-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  color: inherit;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.qk-nav-btn svg path,
.qk-nav-btn svg line,
.qk-nav-btn svg polyline {
  stroke: currentColor;
}
.qk-nav-btn:hover { border-color: #94b7d8; background: #eff6ff; color: #1f4f7a; }
.qk-nav-btn:active { background: #dbeafe; }
.qk-nav-btn:disabled {
  background: #fff;
  border-color: #d7e0e8;
  color: #8a9aaa;
  cursor: default;
  opacity: 1;
}
.qk-move-slider { flex: 1; accent-color: #1a6b3c; height: 4px; cursor: pointer; }

/* 管理ボタン */
.qk-cont-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.qk-cont-btn {
  padding: 6px 13px;
  border: 1.5px solid #e0d9ce;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, border-color 0.12s;
}
.qk-cont-btn:hover     { background: #f5f0e8; border-color: #c8bfb2; }
.qk-cont-btn--add      { border-color: #1a6b3c; color: #1a6b3c; }
.qk-cont-btn--add:hover { background: #edf7f2; }
.qk-cont-btn--danger   { border-color: #e53e3e; color: #e53e3e; }
.qk-cont-btn--danger:hover { background: #fff5f5; }

/* 手順入力モード */
.qk-cont-input-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #e8f4ff;
  border: 1.5px solid #93c5fd;
  border-radius: 9px;
}
.qk-next-turn-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #1a2530;
}
.qk-cont-ctrl-btns { display: flex; gap: 7px; }
.qk-turn-selector {
  display: flex;
  gap: 6px;
  margin: 2px 0;
}
.qk-turn-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1.5px solid #e0d9ce;
  border-radius: 7px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.qk-turn-btn:hover  { border-color: #1a6b3c; background: #f0faf5; }
.qk-turn-btn.active { border-color: #1a6b3c; background: #edf7f2; color: #1a6b3c; }

/* 最終手マーカー */
.qa-mark--last {
  color: rgba(255,255,255,0.75);
  font-size: 10px;
}

.qa-move-number {
  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  font-family: var(--title-font), "Noto Serif JP", "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", serif;
  font-size: var(--qa-move-number-font-size, clamp(6px, 1.25vw, 10px));
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.qa-move-number.on-black {
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.82);
}

.qa-move-number.on-white {
  color: #111;
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* ── レスポンシブ ── */
@media (max-width: 860px) {
  .qk-shell { grid-template-columns: 1fr; min-height: auto; }
  .qk-form-panel { position: static; max-height: none; border-right: none; border-bottom: 1px solid #e8e2d6; }
  .qk-board-panel { height: auto; max-height: none; overflow-y: visible; }
  .qk-vis-cards { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .qk-form-panel  { padding: 18px 14px 28px; }
  .qk-board-panel { padding: 14px 14px 24px; }
  .qk-btn-submit, .qk-btn-cancel { font-size: 13px; padding: 11px 14px; }
  .qk-method-tab  { font-size: 11px; padding: 7px 5px; }
  .qk-tool-btn    { padding: 5px 8px; font-size: 11px; }
  .qk-sgf-drop    { flex-direction: column; text-align: center; padding: 16px; }
}

/* ── 相談する手番セレクター（通常質問 .qm-turn-* / 棋譜相談 .qk-ask-turn-*） ── */

.qm-turn-group,
.qk-ask-turn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.qm-turn-btn,
.qk-ask-turn-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  background: #f5f0e8;
  border: 1.5px solid transparent;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.qm-turn-btn:hover:not(.active),
.qk-ask-turn-btn:hover:not(.active) {
  background: #ede8df;
}
.qm-turn-btn.active[data-turn="B"],
.qk-ask-turn-btn.active[data-ask-turn="B"] {
  color: #1a1a1a;
  background: rgba(26, 26, 26, 0.08);
  border-color: rgba(26, 26, 26, 0.30);
}
.qm-turn-btn.active[data-turn="W"],
.qk-ask-turn-btn.active[data-ask-turn="W"] {
  color: #5a4e3c;
  background: rgba(240, 235, 220, 0.9);
  border-color: rgba(90, 78, 60, 0.35);
}
.qm-turn-btn.active[data-turn=""],
.qk-ask-turn-btn.active[data-ask-turn=""] {
  color: #5a4e3c;
  background: #e9e3d8;
  border-color: rgba(90, 78, 60, 0.25);
}

/* ── AI補助パネル内タグ ── */
.qk-ai-assist-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.qk-ai-tag {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  color: #0f6842;
  background: rgba(15, 104, 66, 0.08);
  border: 1px solid rgba(15, 104, 66, 0.22);
  border-radius: 12px;
}

/* ── AI補助ボタン & 結果パネル ─────────────────────────────────────────── */

.qk-ai-assist-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}

.qk-ai-assist-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #0f6842;
  background: rgba(15, 104, 66, 0.06);
  border: 1.5px solid rgba(15, 104, 66, 0.28);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.qk-ai-assist-btn:hover:not(:disabled) {
  background: rgba(15, 104, 66, 0.12);
  border-color: rgba(15, 104, 66, 0.50);
}
.qk-ai-assist-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.qk-ai-assist-panel {
  margin-bottom: 18px;
  border: 1.5px solid rgba(15, 104, 66, 0.28);
  border-radius: 9px;
  background: #f6fcf9;
  overflow: hidden;
}
.qk-ai-assist-panel.hidden { display: none; }

.qk-ai-assist-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(15, 104, 66, 0.07);
  border-bottom: 1px solid rgba(15, 104, 66, 0.15);
}
.qk-ai-assist-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f6842;
}
.qk-ai-assist-close {
  padding: 2px 6px;
  font-size: 13px;
  color: #6b7280;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  line-height: 1;
}
.qk-ai-assist-close:hover { background: rgba(0,0,0,0.07); }

.qk-ai-assist-section {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(15, 104, 66, 0.10);
}
.qk-ai-assist-section:last-of-type { border-bottom: none; }

.qk-ai-assist-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #7a8e80;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 5px;
}

.qk-ai-assist-preview-text {
  font-size: 13.5px;
  color: #2c3a2e;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.qk-ai-assist-body-text {
  max-height: 140px;
  overflow-y: auto;
}

.qk-ai-assist-footer {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(15, 104, 66, 0.04);
  border-top: 1px solid rgba(15, 104, 66, 0.12);
}
.qk-ai-assist-apply-btn {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #0f6842;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.qk-ai-assist-apply-btn:hover { background: #0d5c39; }

.qk-ai-assist-cancel-btn {
  padding: 7px 14px;
  font-size: 13px;
  color: #5a4e3c;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
}
.qk-ai-assist-cancel-btn:hover { background: #f5f0e8; }

/* ── ステップ式UI ─────────────────────────────────────── */

/* ステップバー */
.qk-step-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 8px;
  border-bottom: 1px solid #e8e2d6;
  background: #faf7f2;
  flex-shrink: 0;
}
.qk-step-badge {
  font-size: 12px;
  font-weight: 600;
  color: #9a9080;
  padding: 3px 10px;
  border-radius: 12px;
  transition: color 0.2s, background 0.2s;
}
.qk-step-badge--active {
  color: #0f6842;
  background: rgba(15,104,66,0.1);
}
.qk-step-sep {
  color: #c8bfaf;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

/* スライドビューポート */
.qk-step-viewport {
  overflow-x: hidden;
  overflow-y: visible;
  /* 幅いっぱいに広げる */
  width: 100%;
}
.qk-step-slider {
  display: flex;
  width: 200%;
  transition: transform 0.28s ease-out;
  will-change: transform;
  align-items: flex-start;
}
.qk-step-slider.is-step2 {
  transform: translateX(-50%);
}
.qk-step-pane {
  width: 50%;
  min-width: 0;
  overflow-y: visible;
}

/* ステップ1アクション */
.qk-step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e8e2d6;
  background: #faf7f2;
  flex-wrap: wrap;
}
.qk-step-done-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #5a4e3c;
  background: #fff;
  border: 1px solid #c8bfaf;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.qk-step-done-btn:hover { background: #f5f0e8; }
.qk-step-next-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #0f6842;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.qk-step-next-btn:hover { background: #0d5c39; }
.qk-step-next-btn svg {
  width: 14px;
  height: 9px;
  flex-shrink: 0;
}
.qk-step-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #5a4e3c;
  background: #fff;
  border: 1px solid #c8bfaf;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.qk-step-back-btn:hover { background: #f5f0e8; }
.qk-step-back-btn svg {
  width: 14px;
  height: 9px;
  flex-shrink: 0;
}

/* ステップ2ヘッダー */
.qk-cont-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 6px;
}

/* ═══════════════════════════════════════════════
   回答盤面エディタ（2ステップ式）
════════════════════════════════════════════════ */

.qa-answer-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
  padding: 18px;
  border: 1.5px solid #245c3f;
  border-radius: 10px;
  background: #e8f1ec;
  box-shadow: 0 10px 24px rgba(31, 62, 46, 0.12);
}

.qa-answer-compose-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
  gap: 18px;
  align-items: start;
}

.qa-answer-text-column,
.qa-answer-board-column {
  min-width: 0;
}

.qa-answer-text-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qa-answer-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}

.qa-answer-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.qa-answer-summary-input,
.qa-answer-tags-input {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #cbd7e2;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.qa-answer-summary-input:focus,
.qa-answer-tags-input:focus {
  outline: none;
  border-color: #1a6b3c;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.1);
}

.qa-answer-board-column .qa-ans-board-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-answer-form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -18px 2px;
  padding: 12px 16px;
  border-radius: 9px 9px 0 0;
  background: #245c3f;
  color: #fff;
}

.qa-answer-form-head h2 {
  margin: 0;
  color: #fff;
}

.qa-answer-close-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.qa-answer-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.qa-answer-form--closed {
  display: none !important;
}

.qa-answer-textarea {
  width: 100%;
  min-height: 260px;
  padding: 10px 12px;
  border: 1px solid #cbd7e2;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.6;
}
.qa-answer-textarea:focus {
  outline: none;
  border-color: #1a6b3c;
  box-shadow: 0 0 0 3px rgba(26, 107, 60, 0.1);
}

@media (max-width: 980px) {
  .qa-answer-compose-grid {
    grid-template-columns: 1fr;
  }

  .qa-answer-textarea {
    min-height: 180px;
  }
}

/* 盤面トグルボタン */
.qa-ans-board-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #f0faf5;
  border: 1px solid #a7d4b8;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #1a6b3c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.qa-ans-board-toggle-btn:hover {
  background: #e0f5ea;
  border-color: #1a6b3c;
}

.qa-answer-board-column .qa-ans-board-toggle-btn {
  display: none;
}

/* 盤面コンテナ */
.qa-ans-board-container {
  border: 1px solid #e0d9ce;
  border-radius: 10px;
  padding: 20px 20px 24px;
  background: #fff;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qa-ans-board-container .qk-board-wrap {
  padding: 10px;
}

.qa-ans-board-container .qa-board {
  width: min(100%, 500px);
}

/* ステップペイン（表示切替） */
.qa-ans-step-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 添付解除行 */
.qa-ans-detach-row {
  display: flex;
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid #e8ede9;
}

.qa-ans-detach-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  background: none;
  border: 1px solid #cbd7e2;
  border-radius: 6px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.qa-ans-detach-btn:hover {
  color: #b91c1c;
  border-color: #f87171;
  background: #fef2f2;
}

/* 回答詳細画面 — 手順ナビ */
.qa-ans-move-display-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 2px;
  flex-wrap: wrap;
}

.qa-ans-move-display-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: #4a5568;
  font-weight: 500;
}

/* qa-mark--last（最終手マーカー） */
.qa-mark--last {
  position: absolute;
  z-index: 5;
  inset: auto;
  left: 50%;
  top: 50%;
  display: block;
  width: clamp(3px, 42%, 12px);
  height: clamp(3px, 42%, 12px);
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #e3303f;
  box-shadow:
    0 0 0 1px rgba(48, 20, 18, 0.68),
    0 0 4px rgba(227, 48, 63, 0.48);
  color: transparent;
  font-size: 0;
  line-height: 0;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.qa-mark--last.on-black {
  background: #ff5148;
}

.qa-mark--last.on-white {
  background: #d91f35;
}

.qa-board.thumbnail .qa-mark--last {
  display: block;
}


/* ── 質問詳細個別ページ (/qa/question/:id) ── */
.qa-question-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 12px 56px;
}

.qa-question-page-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #1a6b3c;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 0;
  margin-bottom: 20px;
}
.qa-question-page-back:hover { text-decoration: underline; }

.qa-detail-loading,
.qa-detail-error {
  padding: 24px 0;
  color: #64748b;
  font-size: 14px;
}

/* ══════════════════════════════════════════════════════
   質問詳細ページ (qd-*) — /qa/question/:id
══════════════════════════════════════════════════════ */

/* レイアウト */
.qd-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 820px) {
  .qd-layout { grid-template-columns: 1fr; }
  .qd-sidebar { order: 2; }
}
.qd-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* パンくず */
.qd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 4px;
}
.qd-breadcrumb a { color: #1a6b3c; text-decoration: none; }
.qd-breadcrumb a:hover { text-decoration: underline; }
.qd-breadcrumb-current {
  color: #374151;
  font-weight: 500;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 質問カード */
.qd-question-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.qd-question-inner { display: flex; gap: 16px; align-items: flex-start; }
.qd-question-content { flex: 1; min-width: 0; }
.qd-question-top-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.qd-cat-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.qd-solved-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #dcfce7;
  color: #166534;
  font-size: 11px;
  font-weight: 700;
}
.qd-open-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #fef9c3;
  color: #854d0e;
  font-size: 11px;
  font-weight: 700;
}
.qd-question-edit-btn {
  margin-left: auto;
  padding: 4px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.qd-question-edit-btn:hover { border-color: #15803d; color: #166534; background: #f0fdf4; }
.qd-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a202c;
  line-height: 1.4;
  margin-bottom: 10px;
}
.qd-meta-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.qd-meta-item { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: #64748b; }
.qd-tag-list { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.qd-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
}
.qd-tag--size { background: #e0f2fe; color: #0369a1; }
.qd-tag--turn { background: #f0f0f0; color: #1a202c; font-weight: 600; }
.qd-question-body { font-size: 14px; color: #374151; line-height: 1.75; }
.qd-ai-summary {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin-top: 12px;
  padding: 8px 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 6px;
  font-size: 13px;
  color: #166534;
}
.qd-ai-icon { flex-shrink: 0; color: #16a34a; }
.qd-ai-label { font-weight: 700; flex-shrink: 0; }
.qd-question-image { max-width: 100%; border-radius: 8px; margin-top: 12px; display: block; }

/* 質問の盤面列 */
.qd-question-board-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 230px;
}
.qd-board-col-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  align-self: flex-start;
}
.qd-q-board-slot { width: 100%; }
@media (max-width: 600px) {
  .qd-question-inner { flex-direction: column; }
  .qd-question-board-col { width: 100%; align-items: flex-start; }
}

/* チケットで生成し、全員に共有するAI解説 */
.qd-ai-explanation-card {
  overflow: hidden;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.qd-ai-explanation-card.is-stale { border-color: #fed7aa; }
.qd-ai-explanation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ecfdf5, #f8fafc);
  border-bottom: 1px solid #dcfce7;
}
.qd-ai-explanation-card.is-stale .qd-ai-explanation-head {
  background: linear-gradient(135deg, #fff7ed, #f8fafc);
  border-bottom-color: #ffedd5;
}
.qd-ai-explanation-kicker {
  display: block;
  margin-bottom: 2px;
  color: #15803d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.qd-ai-explanation-head h2 { margin: 0; color: #172033; font-size: 16px; }
.qd-ai-explanation-test-badge {
  flex-shrink: 0;
  padding: 3px 8px;
  border: 1px solid #86efac;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 10px;
  font-weight: 800;
}
.qd-ai-explanation-generate { padding: 16px; background: #fbfefc; }
.qd-ai-explanation-generate p { margin: 0 0 12px; color: #475569; font-size: 13px; line-height: 1.65; }
.qd-ai-explanation-generate-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.qd-ai-explanation-generate-btn {
  padding: 9px 14px;
  border: 1px solid #15803d;
  border-radius: 8px;
  background: #15803d;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.qd-ai-explanation-generate-btn:hover:not(:disabled) { background: #166534; }
.qd-ai-explanation-generate-btn:disabled { cursor: wait; opacity: .6; }
.qd-ai-ticket-balance { color: #64748b; font-size: 12px; font-weight: 700; }
.qd-ai-explanation-content { padding: 16px; }
.qd-ai-explanation-content.is-stale { background: #fffbeb; }
.qd-ai-explanation-stale-label {
  display: inline-block;
  margin-bottom: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 11px;
  font-weight: 800;
}
.qd-ai-explanation-summary { margin: 0 0 10px; color: #166534; font-size: 14px; font-weight: 800; }
.qd-ai-explanation-body { color: #334155; font-size: 14px; line-height: 1.75; }
.qd-ai-explanation-disclaimer {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #f59e0b;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
}
.qd-ai-explanation-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 12px;
  color: #64748b;
  font-size: 11px;
}
.qd-ai-explanation-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qd-ai-rating-btn,
.qd-ai-report-btn {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.qd-ai-rating-btn:hover,
.qd-ai-rating-btn.is-selected { border-color: #16a34a; background: #f0fdf4; color: #166534; }
.qd-ai-report-btn { margin-left: auto; color: #b45309; }
.qd-ai-report-btn:hover { border-color: #f59e0b; background: #fffbeb; }
.qd-ai-explanation-note {
  margin: 0;
  padding: 10px 16px;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
}
.qd-ai-explanation-message { min-height: 0; margin: 0; padding: 0 16px; color: #166534; font-size: 12px; font-weight: 700; }
.qd-ai-explanation-message:not(:empty) { padding-top: 9px; padding-bottom: 9px; }
.qd-ai-explanation-message.is-error { color: #b91c1c; }
@media (max-width: 600px) {
  .qd-ai-explanation-head,
  .qd-ai-explanation-content,
  .qd-ai-explanation-generate { padding-left: 13px; padding-right: 13px; }
  .qd-ai-explanation-generate-btn { width: 100%; }
  .qd-ai-report-btn { margin-left: 0; }
}

/* 回答セクション */
.qd-answers-section { display: flex; flex-direction: column; gap: 10px; }
.qd-answers-heading {
  font-size: 15px;
  font-weight: 700;
  color: #1a202c;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}
.qd-answer-list { display: flex; flex-direction: column; gap: 12px; }
.qd-no-answers { color: #64748b; font-size: 14px; padding: 20px 0; }

/* 回答カード */
.qd-answer-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.qd-answer-card--best { border-color: #86efac; background: #f0fdf4; }
.qd-best-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #16a34a;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}
.qd-answer-top { margin-bottom: 10px; }
.qd-answer-author { display: flex; align-items: center; gap: 10px; }
.qd-author-avatar { width: 36px; height: 36px; flex-shrink: 0; }
.qd-author-info { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center; }
.qd-author-name { font-size: 14px; font-weight: 700; color: #1a202c; }
.qd-author-rank { font-size: 11px; color: #fff; background: #64748b; padding: 1px 6px; border-radius: 3px; }
.qd-answer-time { font-size: 12px; color: #94a3b8; }
.qd-answer-summary {
  margin: 2px 0 8px;
  padding: 8px 10px;
  border-left: 3px solid #1a6b3c;
  background: #f0faf5;
  color: #1f3a2b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}
.qd-answer-body { font-size: 14px; color: #374151; line-height: 1.75; margin-bottom: 10px; }
.qd-answer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: -2px 0 10px;
}
.qd-answer-tags span {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}
.qd-answer-image { max-width: 100%; border-radius: 8px; margin-top: 8px; display: block; }

/* ボードチップ行 */
.qd-board-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  padding: 6px 0;
  border-top: 1px solid #f0f4f8;
}
.qd-board-chips { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; }
.qd-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 500;
}
.qd-show-board-btn {
  flex-shrink: 0;
  padding: 4px 12px;
  border: 1px solid #1a6b3c;
  border-radius: 6px;
  background: #fff;
  color: #1a6b3c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.qd-show-board-btn:hover,
.qd-show-board-btn--open { background: #f0fdf4; }

/* 展開ボードエリア */
.qd-answer-board-area {
  margin: 4px 0 10px;
  background: #f8fafb;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qd-answer-board-area[hidden] { display: none; }
.qd-board-area-label { font-size: 13px; font-weight: 700; color: #1a6b3c; align-self: flex-start; }
.qd-close-board-btn {
  padding: 4px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.qd-close-board-btn:hover { background: #f1f5f9; }

/* 回答フッター */
.qd-answer-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f4f8;
}
.qd-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: none;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.qd-like-btn:hover { background: #f8fafc; color: #1a202c; }
.qd-best-btn {
  padding: 4px 12px;
  border: 1px solid #16a34a;
  border-radius: 6px;
  background: none;
  color: #16a34a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.qd-best-btn:hover { background: #f0fdf4; }

/* サイドバー */
.qd-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 70px;
}
.qd-sidebar-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.03);
}
.qd-sidebar-box-head {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.qd-sidebar-more {
  font-weight: 500;
  color: #1a6b3c;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
.qd-sidebar-more:hover { text-decoration: underline; }
.qd-status-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 8px;
}
.qd-status-inner--open { background: #fffbeb; color: #b45309; }
.qd-status-inner--solved { background: #f0fdf4; color: #16a34a; }
.qd-status-note { font-size: 12px; color: #64748b; line-height: 1.6; margin-bottom: 10px; }
.qd-reply-btn {
  display: block;
  text-align: center;
  padding: 8px;
  background: #fff;
  color: #16a34a;
  border: 1.5px solid #16a34a;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.qd-reply-btn:hover { background: #f0fdf4; }
.qd-asker-row { display: flex; align-items: center; gap: 10px; }
.qd-asker-avatar { width: 40px; height: 40px; flex-shrink: 0; }
.qd-asker-info { display: flex; flex-direction: column; gap: 2px; }
.qd-asker-name { font-size: 14px; font-weight: 700; color: #1a202c; }
.qd-asker-rank { font-size: 11px; color: #64748b; }
.qd-asker-stats { font-size: 11px; color: #64748b; margin-top: 6px; }
.qd-asker-link {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: #1a6b3c;
  text-decoration: none;
  font-weight: 600;
}
.qd-asker-link:hover { text-decoration: underline; }
.qd-related-list { display: flex; flex-direction: column; }
.qd-related-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  padding: 8px 4px;
  border-bottom: 1px solid #f0f4f8;
  border-radius: 4px;
}
.qd-related-item:last-child { border-bottom: none; }
.qd-related-item:hover { background: #f8fafb; }
.qd-related-cat {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: max-content;
}
.qd-related-title { font-size: 12px; color: #1a202c; font-weight: 500; line-height: 1.4; }
.qd-related-item:hover .qd-related-title { color: #1a6b3c; }
.qd-related-meta { font-size: 11px; color: #94a3b8; }
.qd-related-loading { font-size: 12px; color: #94a3b8; padding: 4px 0; }

/* 質問盤面ナビ */
.qd-q-board-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
}
.qd-q-board-nav-label {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  min-width: 56px;
}
.qd-q-branch-panel {
  margin-top: 6px;
  width: 100%;
  border: 1px solid #d8e1ea;
  border-radius: 6px;
  background: #f8fafc;
  padding: 6px;
}
.qd-q-branch-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  width: 100%;
  margin-top: 6px;
  font-size: 11px;
}
.qd-q-branch-summary-label {
  color: #64748b;
  font-weight: 700;
}
.qd-q-branch-jump {
  border: 1px solid #cbd7e3;
  border-radius: 999px;
  background: #fff;
  color: #1f4f7a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  cursor: pointer;
}
.qd-q-branch-jump:hover {
  background: #eff6ff;
  border-color: #94b7d8;
}
.qd-q-branch-jump.is-current {
  border-color: #1a6b3c;
  background: #e8f5ed;
  color: #155c32;
}
.qd-q-branch-head {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}
.qd-q-branch-toggle,
.qd-q-branch-main,
.qd-q-branch-choice {
  border: 1px solid #cbd7e3;
  border-radius: 6px;
  background: #fff;
  color: #26323d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.qd-q-branch-toggle { padding: 6px 8px; color: #1f4f7a; }
.qd-q-branch-main { padding: 6px 8px; color: #6b3f12; }
.qd-q-branch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.qd-q-branch-choice { padding: 5px 7px; }
.qd-q-branch-choice.is-active {
  border-color: #1a6b3c;
  background: #e8f5ed;
  color: #155c32;
}
.qd-q-branch-toggle:hover,
.qd-q-branch-main:hover,
.qd-q-branch-choice:hover {
  background: #eff6ff;
  border-color: #94b7d8;
}
.qd-q-board-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  width: 100%;
}
.qd-q-board-action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.qd-q-board-action-btn:hover:not(:disabled) { background: #f8fafc; }
.qd-q-board-action-btn--play { color: #1a6b3c; border-color: #1a6b3c; }
.qd-q-board-action-btn--play:hover:not(:disabled) { background: #f0fdf4; }
.qd-q-board-action-btn:disabled { opacity: 0.4; cursor: default; }

/* チップ色バリエーション */
.qd-chip--moves { background: #dcfce7; color: #166534; }
.qd-chip--variation { background: #fef3c7; color: #92400e; }

/* 盤面拡大モーダル */
.qd-expand-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.qd-expand-modal-inner {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.qd-expand-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.qd-expand-modal-title { font-size: 14px; font-weight: 700; color: #1a202c; }
.qd-expand-modal-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qd-expand-modal-close:hover { background: #e2e8f0; }
.qd-expand-modal-board { width: 100%; }
.qa-detail-error { color: #b91c1c; }

/* ================================================================
   Q&A ホームページ再設計 (2026-07-22)
   ================================================================ */
.qa-page-body {
  background: #f4f6f1;
  background-image:
    radial-gradient(circle at 8% 12%, rgba(191, 155, 88, 0.09), transparent 24%),
    radial-gradient(circle at 92% 36%, rgba(45, 105, 72, 0.08), transparent 28%);
}

.qa-bg-deco { display: none; }

.qa-page-content {
  max-width: 1320px;
  padding: 28px 24px 72px;
}

.qa-section-kicker,
.qa-sidebar-kicker {
  margin: 0;
  color: #2c6a48;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.qa-entry-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: 30px;
  overflow: hidden;
  padding: 26px 28px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dfe5dc;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(39, 63, 47, 0.055);
}

.qa-entry-panel::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(#285f42, #8bab77);
}

.qa-entry-intro {
  padding: 2px 30px 2px 4px;
  border-right: 1px solid #e5eae3;
}

.qa-entry-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 8px;
  color: #315f44;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.qa-entry-stones {
  position: relative;
  display: inline-block;
  width: 27px;
  height: 17px;
}

.qa-entry-stones i {
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  box-sizing: border-box;
}

.qa-entry-stones i:first-child {
  left: 0;
  top: 1px;
  background: radial-gradient(circle at 34% 28%, #595959, #151515 68%);
}

.qa-entry-stones i:last-child {
  right: 0;
  top: 0;
  background: radial-gradient(circle at 34% 28%, #fff, #dfddd7 72%);
  border: 1px solid #c9c9c5;
}

.qa-entry-intro h1 {
  margin: 0 0 7px;
  color: #1d3325;
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(21px, 2.2vw, 29px);
  font-weight: 800;
  line-height: 1.45;
}

.qa-entry-intro > p:last-child {
  max-width: 410px;
  margin: 0;
  color: #68756d;
  font-size: 11px;
  line-height: 1.75;
}

.qa-entry-tools {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 11px;
}

.qa-entry-search {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  box-sizing: border-box;
  padding: 0 16px;
  background: #f6f8f4;
  border: 1.5px solid #d7dfd5;
  border-radius: 12px;
  color: #78847c;
  cursor: text;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.qa-entry-search:focus-within {
  background: #fff;
  border-color: #34704e;
  box-shadow: 0 0 0 3px rgba(52, 112, 78, 0.1);
}

.qa-entry-search svg { width: 20px; height: 20px; flex: 0 0 20px; }

.qa-entry-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  outline: 0;
  color: #1f3125;
  font: inherit;
  font-size: 14px;
}

.qa-entry-search input::placeholder { color: #99a29c; }

.qa-entry-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.qa-entry-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 64px;
  padding: 10px 12px;
  border-radius: 11px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.qa-entry-action--ask {
  background: #285f42;
  border: 1px solid #285f42;
  color: #fff;
}

.qa-entry-action--answer {
  background: #fff;
  border: 1px solid #cedacf;
  color: #244e36;
}

.qa-entry-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 16px rgba(34, 69, 46, 0.12);
}

.qa-entry-action--ask:hover { background: #1f5137; }
.qa-entry-action--answer:hover { background: #f2f7f1; border-color: #91ae98; }

.qa-entry-action-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.qa-entry-action--ask .qa-entry-action-icon { background: rgba(255, 255, 255, 0.13); }
.qa-entry-action--answer .qa-entry-action-icon { background: #e9f1e8; }
.qa-entry-action-icon svg { width: 19px; height: 19px; }

.qa-entry-action > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.qa-entry-action strong { font-size: 12px; font-weight: 800; }
.qa-entry-action small { opacity: 0.68; font-size: 9px; white-space: nowrap; }
.qa-entry-action > i { font-style: normal; font-size: 14px; }

.qa-home-layout {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  margin-top: 28px;
}

.qa-home-main { gap: 24px; }

.qa-categories-section,
.qa-home-section,
.qa-sidebar-box {
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #dfe5dc;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(39, 63, 47, 0.045);
}

.qa-categories-section { padding: 22px; }

.qa-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.qa-section-heading > p {
  margin: 0 0 1px;
  color: #758078;
  font-size: 11px;
}

.qa-section-kicker { margin-bottom: 4px; }

.qa-section-title {
  margin: 0;
  color: #20382a;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.qa-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.qa-category-item {
  min-width: 0;
  flex-direction: row;
  justify-content: flex-start;
  gap: 10px;
  padding: 11px;
  border-width: 1px;
  border-color: #e5e9e2;
  border-radius: 11px;
  text-align: left;
}

.qa-category-item:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(34, 57, 42, 0.08); }

.qa-cat-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(72, 82, 74, 0.08);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.qa-cat-icon svg { width: 28px; height: 28px; }

/* 8カテゴリ共通の意味アイコン */
.qa-cat-icon .qa-category-symbol {
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qa-cat-fuseki   { background: #e9f3eb; color: #2f6948; }
.qa-cat-joseki   { background: #f7f0df; color: #956a25; }
.qa-cat-chiban   { background: #e6f2ef; color: #2f7167; }
.qa-cat-shikatsu { background: #f7eaea; color: #a44e4e; }
.qa-cat-semeai   { background: #ececf6; color: #595b98; }
.qa-cat-yose     { background: #f0ebf6; color: #725799; }
.qa-cat-tesuji   { background: #e9f0f7; color: #416b96; }
.qa-cat-rules    { background: #f7eee5; color: #986034; }

.qa-cat-copy {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.qa-cat-label { text-align: left; font-size: 12px; font-weight: 800; }
.qa-cat-help { color: #89928c; font-size: 9px; white-space: nowrap; }

.qa-cat-count {
  min-width: 28px;
  margin: 0;
  padding-left: 7px;
  border-left: 1px solid #edf0eb;
  font-size: 9px;
  white-space: nowrap;
}

.qa-home-section { padding: 0 22px 18px; }

.qa-home-section-head {
  align-items: flex-end;
  gap: 18px;
  margin: 0 -22px 0;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #e7ebe5;
}

.qa-result-count {
  margin: 4px 0 0;
  color: #7c8880;
  font-size: 10px;
}

.qa-home-status-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: #eef2ec;
  border-radius: 10px;
}

.qa-home-status-tabs button {
  min-height: 32px;
  padding: 6px 11px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: #68756d;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.qa-home-status-tabs button:hover { color: #224f36; }
.qa-home-status-tabs button.active { background: #fff; color: #225b3b; box-shadow: 0 2px 8px rgba(34, 77, 52, 0.1); }

.qa-new-row {
  gap: 14px;
  padding: 18px 4px;
  border-color: #edf0eb;
  border-radius: 0;
}

.qa-new-row:hover { background: #f8faf6; }

.qa-cat-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: inset 0 -8px 14px rgba(0, 0, 0, 0.08);
}

.qa-new-title { margin-bottom: 7px; color: #1d3024; font-size: 14px; font-weight: 700; }
.qa-new-right { width: 176px; }

.qa-more-btn {
  margin-top: 12px;
  padding: 10px;
  background: #f4f7f2;
  border-color: #dfe6dc;
  color: #42604d;
}

.qa-more-btn:hover { background: #eaf1e7; }

.qa-home-sidebar {
  gap: 18px;
  top: 76px;
}

.qa-sidebar-box { padding: 20px; }

.qa-sidebar-answer-card {
  overflow: hidden;
  padding: 0;
  background: #fff;
  border-color: #d8e2d8;
  color: #24382b;
  box-shadow: 0 10px 26px rgba(39, 63, 47, 0.07);
}

.qa-answer-card-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 17px 17px 15px;
  background: linear-gradient(135deg, #f3f8f1, #fbfcf9);
  border-bottom: 1px solid #e3e9e1;
}

.qa-answer-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #e2eee3;
  border-radius: 11px;
  color: #2b6545;
}

.qa-answer-card-icon svg { width: 22px; height: 22px; }

.qa-answer-card-copy { min-width: 0; }

.qa-answer-card-copy h2 {
  margin: 0;
  color: #21372a;
  font-size: 13px;
  font-weight: 800;
}

.qa-answer-card-copy p {
  margin: 4px 0 0;
  color: #768078;
  font-size: 9px;
  line-height: 1.55;
}

.qa-answer-card-count {
  display: flex;
  min-width: 42px;
  flex-direction: column;
  align-items: center;
  padding: 6px 7px;
  background: #fff;
  border: 1px solid #d9e3d8;
  border-radius: 10px;
}

.qa-answer-card-count strong {
  color: #286043;
  font-size: 19px;
  line-height: 1.1;
}

.qa-answer-card-count span { margin-top: 2px; color: #7d8980; font-size: 8px; font-weight: 700; }

.qa-answer-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 17px 7px;
}

.qa-answer-list-head h3 { margin: 0; color: #2a3d31; font-size: 11px; font-weight: 800; }

.qa-answer-list-head > span {
  padding: 3px 7px;
  background: #f2f5f1;
  border-radius: 999px;
  color: #7b867f;
  font-size: 8px;
  font-weight: 700;
}

.qa-sidebar-answer-btn {
  width: calc(100% - 32px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 16px 16px;
  padding: 10px 12px;
  background: #edf4ec;
  border: 1px solid #d4e0d3;
  border-radius: 9px;
  color: #285d40;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.qa-sidebar-answer-btn svg { width: 17px; height: 17px; }
.qa-sidebar-answer-btn:hover { background: #dfeede; border-color: #adc5b1; }

.qa-sidebar-divider {
  height: 1px;
  margin: 18px 0;
  background: #e8ece7;
}


.qa-sidebar-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.qa-sidebar-list-head h2,
.qa-sidebar-list-head h3 {
  margin: 0;
  color: #24382b;
  font-size: 13px;
  font-weight: 800;
}

.qa-sidebar-list-head > span {
  color: #87928a;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.qa-open-list {
  gap: 8px;
  margin: 0;
  padding: 0 16px;
}

.qa-open-card {
  padding: 11px;
  background: #fafbf9;
  border: 1px solid #e3e8e1;
  border-radius: 10px;
  outline: none;
}

.qa-open-card:hover { background: #f3f8f2; border-color: #b9cfbb; }
.qa-open-card:focus-visible { box-shadow: 0 0 0 3px rgba(45, 104, 71, 0.14); border-color: #6e9a79; }

.qa-open-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.qa-open-category {
  padding: 3px 7px;
  background: #e7f0e5;
  border-radius: 999px;
  color: #346348;
  font-size: 8px;
  font-weight: 800;
}

.qa-open-time { color: #929b95; font-size: 8px; }

.qa-sidebar-answer-card .qa-open-title {
  margin: 0;
  color: #26382d;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
}

.qa-open-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.qa-open-board-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b958f;
  font-size: 8px;
  font-weight: 600;
}

.qa-open-board-status svg { width: 12px; height: 12px; opacity: 0.78; }
.qa-open-board-status.has-board { color: #58715f; }

button.qa-open-board-status.has-board {
  padding: 4px 7px;
  border: 1px solid #c9ddd0;
  border-radius: 999px;
  background: #eef7f0;
  color: #2f6847;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.qa-open-answer-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2d6a49;
  font-size: 9px;
  font-weight: 800;
}

.qa-open-answer-link svg { width: 13px; height: 13px; }

.qa-sidebar-ticket-card {
  background: linear-gradient(145deg, #fffdf5, #fff7dd);
  border-color: #eadcae;
}

.qa-ticket-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qa-ticket-head h2 {
  margin: 5px 0 0;
  color: #473d24;
  font-size: 15px;
}

.qa-ticket-head .qa-sidebar-kicker { color: #a27122; font-size: 8px; }

.qa-ticket-balance {
  flex-shrink: 0;
  padding: 6px 9px;
  background: #fff;
  border: 1px solid #eadcae;
  border-radius: 999px;
  color: #80651f;
  font-size: 9px;
}

.qa-ticket-balance strong { color: #b56c15; font-size: 15px; }

.qa-ticket-copy {
  margin: 13px 0;
  color: #746848;
  font-size: 10px;
  line-height: 1.75;
}

.qa-ticket-rules { margin: 0; }

.qa-ticket-rules > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(180, 145, 63, 0.17);
}

.qa-ticket-rules dt { color: #8a7c57; font-size: 9px; }
.qa-ticket-rules dd { margin: 0; color: #51472f; font-size: 10px; font-weight: 700; }
.qa-ticket-rules dd strong { color: #b56c15; font-size: 14px; }

.qa-home-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.qa-home-tag-list button {
  padding: 6px 9px;
  background: #f3f6f1;
  border: 1px solid #dfe6dc;
  border-radius: 999px;
  color: #53665a;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.qa-home-tag-list button:hover,
.qa-home-tag-list button.active {
  background: #e4f0e6;
  border-color: #8fb69b;
  color: #235b3b;
}

.qa-side-stats-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 13px;
}

.qa-side-stat-item {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 10px 8px;
  background: #f5f7f3;
  border: 1px solid #e6ebe4;
  border-radius: 9px;
}

.qa-side-stat-label { font-size: 9px; }

.qa-side-stat-right {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.qa-side-stat-num { min-width: 0; color: #285f42; font-size: 18px; text-align: left; }
.qa-side-stat-diff { max-width: 100%; overflow: hidden; font-size: 7px; text-overflow: ellipsis; }

@media (max-width: 1080px) {
  .qa-entry-panel { grid-template-columns: minmax(260px, 0.72fr) minmax(480px, 1.28fr); gap: 22px; }
  .qa-entry-intro { padding-right: 22px; }
  .qa-home-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
  .qa-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .qa-entry-panel { grid-template-columns: 1fr; gap: 20px; }
  .qa-entry-intro { padding: 0 0 18px 4px; border-right: 0; border-bottom: 1px solid #e5eae3; }
  .qa-entry-intro > p:last-child { max-width: none; }
  .qa-home-layout { grid-template-columns: 1fr; }
  .qa-home-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
  .qa-sidebar-answer-card { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .qa-page-content { padding: 16px 12px 56px; }
  .qa-entry-panel { gap: 16px; padding: 21px 15px 16px 18px; border-radius: 14px; }
  .qa-entry-intro { padding: 0 0 15px; }
  .qa-entry-intro h1 { font-size: 21px; }
  .qa-entry-search { min-height: 50px; padding: 0 13px; }
  .qa-entry-actions { grid-template-columns: 1fr; }
  .qa-entry-action { min-height: 58px; }
  .qa-home-layout { margin-top: 18px; }
  .qa-categories-section { padding: 18px 14px; }
  .qa-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .qa-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .qa-category-item { padding: 9px; }
  .qa-cat-icon { width: 34px; height: 34px; flex-basis: 34px; padding: 6px; }
  .qa-cat-icon svg { width: 22px; height: 22px; }
  .qa-cat-help, .qa-cat-count { display: none; }
  .qa-home-section { padding: 0 14px 14px; }
  .qa-home-section-head { align-items: stretch; flex-direction: column; margin: 0 -14px; padding: 18px 14px 14px; }
  .qa-home-status-tabs { width: 100%; box-sizing: border-box; }
  .qa-home-status-tabs button { flex: 1; }
  .qa-new-right { width: 100%; }
  .qa-home-sidebar { grid-template-columns: 1fr; }
  .qa-sidebar-answer-card { grid-column: auto; }
}

/* ══════════════════════════════════════════════════════
   質問閲覧ページ再設計 — /qa/question/:id (2026-07-22)
══════════════════════════════════════════════════════ */

.qa-question-page {
  max-width: 1240px;
  padding: 18px 0 72px;
}

.qa-question-page-back {
  gap: 7px;
  margin-bottom: 16px;
  padding: 7px 11px 7px 8px;
  border: 1px solid #dce4dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: #536158;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.qa-question-page-back:hover {
  border-color: #afc1b2;
  background: #fff;
  color: #245c3f;
  text-decoration: none;
}

.qd-layout {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
}

.qd-main { gap: 22px; }

/* 質問: タイトルを全幅に置き、本文とテーマ図を下段で分ける */
.qd-question-card {
  overflow: hidden;
  padding: 0;
  border-color: #dfe5de;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(35, 52, 40, 0.06);
}

.qd-question-header {
  padding: 23px 26px 20px;
  border-bottom: 1px solid #e7ece6;
  background: linear-gradient(145deg, #fff 58%, #fbfcfa);
}

.qd-question-top-row {
  gap: 7px;
  margin-bottom: 12px;
}

.qd-cat-badge {
  padding: 4px 10px;
  border: 1px solid color-mix(in srgb, var(--qd-category-color) 34%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--qd-category-color) 10%, white);
  color: var(--qd-category-color);
  font-size: 11px;
  line-height: 1.4;
}

.qd-solved-tag,
.qd-open-tag {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.4;
}

.qd-open-tag {
  background: #fff8e7;
  color: #966213;
}

.qd-solved-tag {
  background: #eaf5ec;
  color: #2d6947;
}

.qd-question-edit-btn {
  padding: 5px 10px;
  border-color: #d9e0d9;
  border-radius: 999px;
  color: #667169;
}

.qd-title {
  max-width: 850px;
  margin: 0 0 14px;
  color: #1d2c22;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(22px, 2.15vw, 30px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

.qd-question-meta-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.qd-meta-row,
.qd-tag-list {
  margin: 0;
}

.qd-meta-row { gap: 7px 16px; }

.qd-meta-item {
  gap: 5px;
  color: #7a857e;
  font-size: 11px;
}

.qd-tag-list { justify-content: flex-end; }

.qd-tag {
  padding: 4px 8px;
  border: 1px solid #e1e6e0;
  border-radius: 999px;
  background: #f7f8f6;
  color: #647068;
  font-size: 10px;
}

.qd-tag--size {
  border-color: #dce7ef;
  background: #f2f7fa;
  color: #426781;
}

.qd-tag--turn {
  border-color: #dedede;
  background: #f4f4f4;
  color: #39413c;
}

.qd-question-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.qd-question-detail-grid.has-board {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
}

.qd-question-copy {
  min-width: 0;
  padding: 24px 26px 27px;
}

.qd-content-label,
.qd-section-kicker {
  display: block;
  color: #65736a;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.qd-content-label { margin-bottom: 13px; }

.qd-question-body {
  color: #2d3730;
  font-size: 15px;
  line-height: 1.95;
}

.qd-ai-summary {
  gap: 9px;
  margin-top: 20px;
  padding: 12px 14px;
  border-color: #d9e8db;
  border-radius: 10px;
  background: #f4f8f3;
  color: #405b49;
  font-size: 12px;
  line-height: 1.7;
}

.qd-ai-icon { color: #4d7c5a; }

.qd-ai-label {
  display: block;
  margin-bottom: 2px;
  color: #2e5f41;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.qd-question-board-col {
  width: auto;
  align-items: stretch;
  padding: 20px;
  border-left: 1px solid #e1e7df;
  background: #f5f7f3;
  box-sizing: border-box;
}

.qd-board-col-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.qd-board-col-label {
  color: #324b3a;
  font-size: 12px;
  letter-spacing: 0.06em;
}

.qd-board-col-note {
  color: #879188;
  font-size: 9px;
}

/* 共有AI解説: 質問カードと同じ本文・盤面レイアウト */
.qd-ai-explanation-card {
  overflow: hidden;
  padding: 0;
  border-color: #dfe2ea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(43, 47, 75, 0.06);
}

.qd-ai-explanation-head {
  padding: 23px 26px 20px;
  border-bottom-color: #e2e4ee;
  background: linear-gradient(145deg, #f5f6fb 58%, #fcfcfe);
}

.qd-ai-explanation-kicker { color: #59639a; }
.qd-ai-explanation-head h2 {
  margin: 0;
  color: #2c324f;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 700;
  line-height: 1.5;
}

.qd-ai-explanation-test-badge {
  border-color: #d4d7e7;
  background: #fff;
  color: #656c91;
}

.qd-ai-explanation-generate,
.qd-ai-explanation-content { padding: 24px 26px; }

.qd-ai-explanation-generate { background: #fcfcfe; }
.qd-ai-explanation-login-required .qd-ai-explanation-generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
}

.qa-is-guest .qa-ticket-balance { display: none; }
.qd-like-btn--readonly {
  cursor: default;
  pointer-events: none;
}
.qd-ai-explanation-detail-grid.has-board {
  grid-template-columns: minmax(0, 1fr) minmax(270px, 320px);
}

.qd-ai-explanation-copy {
  min-width: 0;
  padding: 24px 26px 27px;
}

.qd-ai-explanation-detail-grid.is-stale { background: #fffbeb; }

.qd-ai-explanation-body {
  color: #303542;
  font-size: 15px;
  line-height: 1.95;
}

.qd-ai-explanation-summary {
  margin: 20px 0 0;
  color: #4b5375;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
}

.qd-ai-explanation-summary .qd-ai-icon { color: #6671a3; }
.qd-ai-explanation-summary .qd-ai-label { color: #4d587f; }

.qd-ai-katago-evidence {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cfe4d7;
  border-radius: 12px;
  background: #f3faf5;
  color: #28553a;
  font-size: 11px;
}

.qd-ai-katago-evidence.is-unavailable {
  border-color: #ead8bd;
  background: #fff9ef;
  color: #76572d;
}

.qd-ai-katago-evidence-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 12px;
}

.qd-ai-katago-evidence-head strong { font-size: 12px; }
.qd-ai-katago-moves { display: flex; flex-wrap: wrap; gap: 6px; }
.qd-ai-katago-move {
  padding: 4px 8px;
  border: 1px solid #d3e7da;
  border-radius: 999px;
  background: #fff;
}

.qd-ai-katago-move b { color: #176b3a; }

.qd-ai-explanation-board-col {
  width: auto;
  align-items: stretch;
  padding: 20px;
  border-left-color: #e2e4ee;
  background: #f6f7fa;
  box-sizing: border-box;
}

.qd-ai-explanation-board-col .qd-board-col-label { color: #404967; }
.qd-ai-answer-board-slot { width: 100%; }
.qd-ai-explanation-board-col .qd-ai-reference-board,
.qd-ai-explanation-board-col .qd-ai-theme-board {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.qd-ai-validation-tabs {
  display: flex;
  gap: 7px;
  margin-top: 10px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.qd-ai-validation-tab {
  display: grid;
  flex: 0 0 auto;
  gap: 1px;
  min-width: 78px;
  padding: 7px 10px;
  border: 1px solid #d7dce7;
  border-radius: 10px;
  background: #fff;
  color: #596078;
  text-align: left;
  cursor: pointer;
}

.qd-ai-validation-tab:hover,
.qd-ai-validation-tab.is-selected {
  border-color: #4a7e60;
  background: #eef7f1;
  color: #215e3b;
}

.qd-ai-validation-tab b {
  font-size: 13px;
  line-height: 1.35;
}

.qd-ai-validation-tab span {
  font-size: 9px;
  line-height: 1.35;
  white-space: nowrap;
}

.qd-ai-reference-title {
  margin-top: 10px;
  color: #303853;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.qd-ai-validation-result {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.qd-ai-validation-result span {
  padding: 4px 7px;
  border: 1px solid #d5e4d9;
  border-radius: 999px;
  background: #f3faf5;
  color: #2c6642;
  font-size: 9px;
  font-weight: 700;
}

.qd-ai-reference-diagram {
  margin: 20px 0 4px;
  padding: 16px;
  border: 1px solid #d9ddec;
  border-radius: 13px;
  background: #f7f8fc;
}

.qd-ai-reference-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.qd-ai-reference-kicker {
  display: block;
  margin-bottom: 3px;
  color: #68729d;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.qd-ai-reference-head figcaption {
  color: #303853;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.5;
}

.qd-ai-reference-source {
  flex-shrink: 0;
  padding: 4px 8px;
  border: 1px solid #d5d9e8;
  border-radius: 999px;
  background: #fff;
  color: #6a7293;
  font-size: 10px;
  font-weight: 700;
}

.qd-ai-reference-board {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e1e3ee;
  border-radius: 10px;
  background: #fff;
}

.qd-ai-reference-caption {
  margin: 11px 2px 0;
  color: #626a80;
  font-size: 12px;
  line-height: 1.7;
}

.qd-ai-explanation-regenerate {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 26px;
  border-top: 1px solid #e6e7ee;
  background: #fafafe;
}

.qd-ai-explanation-regenerate strong {
  display: block;
  margin-bottom: 4px;
  color: #343b5d;
  font-size: 13px;
}

.qd-ai-explanation-regenerate p {
  margin: 0;
  color: #72788d;
  font-size: 11px;
  line-height: 1.6;
}

.qd-ai-explanation-regenerate-controls {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  flex-shrink: 0;
}

.qd-ai-explanation-regenerate-controls label {
  display: grid;
  gap: 4px;
  color: #646b84;
  font-size: 10px;
  font-weight: 700;
}

.qd-ai-explanation-regenerate-controls select {
  min-width: 164px;
  min-height: 38px;
  padding: 7px 30px 7px 10px;
  border: 1px solid #d7dae6;
  border-radius: 9px;
  background: #fff;
  color: #343b5d;
  font: inherit;
  font-size: 12px;
}

.qd-ai-comparison-history {
  border-top: 1px solid #e6e7ee;
  background: #fff;
}

.qd-ai-comparison-history > summary {
  padding: 16px 26px;
  color: #4e587f;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}

.qd-ai-comparison-history[open] > summary { border-bottom: 1px solid #ececf2; }

.qd-ai-comparison-history-list {
  display: grid;
  gap: 14px;
  padding: 18px 26px 24px;
  background: #f8f8fb;
}

.qd-ai-comparison-history-item {
  padding: 18px;
  border: 1px solid #dddfea;
  border-radius: 12px;
  background: #fff;
}

.qd-ai-comparison-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
  color: #777d90;
  font-size: 11px;
}

.qd-ai-comparison-history-head strong { color: #404866; }
.qd-ai-comparison-summary { margin: 0 0 15px; }
.qd-ai-comparison-body {
  color: #3b4053;
  font-size: 13px;
  line-height: 1.9;
}

@media (max-width: 600px) {
  .qd-ai-reference-diagram { padding: 12px; }
  .qd-ai-reference-head { flex-direction: column; }
  .qd-ai-reference-board { padding: 9px; }
  .qd-ai-explanation-copy { padding: 19px 18px; }
  .qd-ai-explanation-board-col {
    padding: 18px;
    border-top: 1px solid #e2e4ee;
    border-left: 0;
  }
  .qd-ai-explanation-regenerate {
    align-items: stretch;
    flex-direction: column;
    padding: 16px 18px;
  }
  .qd-ai-explanation-regenerate-controls {
    align-items: stretch;
    flex-direction: column;
  }
  .qd-ai-explanation-regenerate-controls select { width: 100%; }
  .qd-ai-comparison-history > summary { padding: 15px 18px; }
  .qd-ai-comparison-history-list { padding: 14px 18px 18px; }
  .qd-ai-comparison-history-head { flex-direction: column; }
}

.qd-ai-explanation-generate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #4e587f;
  border-radius: 9px;
  background: #4e587f;
}

.qd-ai-explanation-generate-btn:hover:not(:disabled) { background: #3e476b; }

.qd-ai-explanation-card.is-generating {
  border-color: #cdd2e6;
  box-shadow: 0 12px 34px rgba(67, 76, 126, 0.12);
}

.qd-ai-explanation-card.is-generating .qd-ai-explanation-head {
  background: linear-gradient(110deg, #f5f6fb 20%, #fff 42%, #f5f6fb 64%);
  background-size: 240% 100%;
  animation: qd-ai-explanation-shimmer 2.2s ease-in-out infinite;
}

.qd-ai-explanation-button-spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: qd-ai-explanation-spin 0.8s linear infinite;
  box-sizing: border-box;
}

.qd-ai-explanation-progress {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 26px 22px;
  padding: 15px 17px;
  border: 1px solid #d9dcec;
  border-radius: 13px;
  background: linear-gradient(135deg, #f8f8fc, #fff);
  color: #3f476d;
}

.qd-ai-explanation-progress-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 2px solid #d8dbe9;
  border-top-color: #59639a;
  border-radius: 50%;
  animation: qd-ai-explanation-spin 1.15s linear infinite;
  box-sizing: border-box;
}

.qd-ai-explanation-progress-mark i {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff 0 8%, #67709d 12%, #3e466c 72%, #292e49 100%);
  box-shadow: 0 2px 5px rgba(42, 48, 77, 0.24);
}

.qd-ai-explanation-progress-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.qd-ai-explanation-progress-copy strong {
  font-size: 13px;
  line-height: 1.5;
}

.qd-ai-explanation-progress-copy > span {
  color: #747a91;
  font-size: 11px;
  line-height: 1.55;
}

.qd-ai-explanation-progress-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  padding: 0 3px;
}

.qd-ai-explanation-progress-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #737ca7;
  animation: qd-ai-explanation-dot 1.15s ease-in-out infinite;
}

.qd-ai-explanation-progress-dots i:nth-child(2) { animation-delay: 0.16s; }
.qd-ai-explanation-progress-dots i:nth-child(3) { animation-delay: 0.32s; }

@keyframes qd-ai-explanation-spin {
  to { transform: rotate(360deg); }
}

@keyframes qd-ai-explanation-shimmer {
  0%, 100% { background-position: 100% 0; }
  50% { background-position: 0 0; }
}

@keyframes qd-ai-explanation-dot {
  0%, 60%, 100% { opacity: 0.35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

@media (max-width: 600px) {
  .qd-ai-explanation-progress {
    margin: 0 18px 18px;
    padding: 13px 14px;
  }
  .qd-ai-explanation-progress-dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .qd-ai-explanation-card.is-generating .qd-ai-explanation-head,
  .qd-ai-explanation-button-spinner,
  .qd-ai-explanation-progress-mark,
  .qd-ai-explanation-progress-dots i { animation: none; }
}

.qd-ai-rating-btn:hover,
.qd-ai-rating-btn.is-selected {
  border-color: #7d86ad;
  background: #f3f4fa;
  color: #48517c;
}

.qd-ai-explanation-note {
  border-top-color: #e6e7ee;
  background: #f8f8fb;
}

/* 回答の入口と一覧 */
.qd-answers-section { gap: 14px; }

.qd-answers-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 4px 2px 14px;
  border-bottom: 1px solid #dce3dc;
}

.qd-section-kicker {
  margin-bottom: 5px;
  color: #487157;
}

.qd-answers-heading {
  margin: 0;
  padding: 0;
  border: 0;
  color: #223229;
  font-family: "Noto Serif JP", serif;
  font-size: 21px;
  font-weight: 700;
}

.qd-answers-heading strong {
  margin: 0 3px 0 5px;
  color: #2b6c47;
  font-size: 27px;
}

.qd-answers-header p {
  margin: 5px 0 0;
  color: #7d8780;
  font-size: 11px;
}

.qd-reply-btn--inline {
  display: inline-flex;
  width: auto;
  min-width: 112px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-color: #2f6948;
  border-radius: 999px;
  background: #2f6948;
  color: #fff;
}

.qd-reply-btn--inline:hover {
  background: #25573b;
  color: #fff;
}

.qd-answer-list { gap: 14px; }

.qd-no-answers {
  margin: 0;
  padding: 28px 22px;
  border: 1px dashed #cad5cb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  color: #69746d;
  text-align: center;
}

.qd-answer-card {
  position: relative;
  padding: 20px 21px 17px;
  border-color: #dfe5df;
  border-radius: 15px;
  box-shadow: 0 7px 22px rgba(35, 52, 40, 0.045);
}

.qd-answer-card::before {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d8e3da;
  content: "";
}

.qd-answer-card--best {
  border-color: #a8c8ae;
  background: #fff;
  box-shadow: 0 8px 26px rgba(44, 100, 62, 0.08);
}

.qd-answer-card--best::before { background: #3e7b52; }

.qd-best-badge {
  margin: -7px 0 13px;
  padding: 4px 9px;
  border-radius: 999px;
  background: #e8f4ea;
  color: #28643e;
  font-size: 10px;
}

.qd-answer-top { margin-bottom: 13px; }
.qd-author-avatar { width: 38px; height: 38px; }
.qd-author-name { color: #25342b; }

.qd-author-rank {
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2ee;
  color: #617067;
  font-size: 10px;
}

.qd-answer-summary {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border-left-color: #4d7c5a;
  border-radius: 0 8px 8px 0;
  background: #f4f8f3;
  color: #294432;
}

.qd-answer-body {
  color: #333d37;
  font-size: 14px;
  line-height: 1.9;
}

.qd-board-row {
  margin: 12px 0 9px;
  padding: 10px 0 0;
  border-top-color: #e8ece8;
}

.qd-show-board-btn {
  padding: 6px 11px;
  border-color: #b4c8b8;
  border-radius: 999px;
  color: #356345;
}

.qd-answer-board-area {
  margin-top: 10px;
  padding: 15px;
  border-color: #dce4dc;
  border-radius: 12px;
  background: #f6f8f5;
}

.qd-answer-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top-color: #edf0ed;
}

.qd-like-btn,
.qd-best-btn {
  padding: 6px 11px;
  border-radius: 999px;
}

/* サイドバー */
.qd-sidebar {
  gap: 16px;
  top: 82px;
}

.qd-sidebar-box {
  padding: 17px;
  border-color: #dfe5de;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(35, 52, 40, 0.045);
}

.qd-sidebar-action-card {
  border-color: #bdd2c1;
  background: linear-gradient(145deg, #f2f7f2, #fff);
}

.qd-sidebar-action-title {
  margin: 7px 0 7px;
  color: #254332;
  font-size: 16px;
  line-height: 1.55;
}

.qd-status-inner {
  display: inline-flex;
  width: auto;
  margin-bottom: 7px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
}

.qd-status-note {
  margin: 0 0 13px;
  color: #69746d;
  font-size: 11px;
}

.qd-sidebar-action-card .qd-reply-btn {
  padding: 10px 12px;
  border-color: #2f6948;
  border-radius: 9px;
  background: #2f6948;
  color: #fff;
}

.qd-sidebar-action-card .qd-reply-btn:hover {
  background: #25573b;
  color: #fff;
}

.qd-sidebar-anchor-link {
  display: inline-flex;
  align-items: center;
  color: #2f6948;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.qd-sidebar-anchor-link::after {
  margin-left: 6px;
  content: "↓";
}

.qd-sidebar-box-head {
  margin-bottom: 13px;
  color: #5f6c64;
  font-size: 10px;
}

.qd-asker-avatar { width: 44px; height: 44px; }
.qd-asker-name { color: #24352b; }
.qd-asker-stats { color: #78837b; }

.qd-asker-link {
  padding-top: 9px;
  border-top: 1px solid #edf0ed;
}

.qd-related-item {
  gap: 5px;
  margin: 0 -5px;
  padding: 10px 5px;
  border-bottom-color: #edf0ed;
}

.qd-related-cat {
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--qd-related-color, #64748b) 28%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--qd-related-color, #64748b) 9%, white) !important;
  color: var(--qd-related-color, #64748b) !important;
  font-size: 9px;
}

.qd-related-title {
  color: #2d3931;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
}

/* 回答フォーム: 質問閲覧の流れから自然に続く投稿面 */
.qa-question-page .qa-answer-form {
  gap: 18px;
  margin-top: 24px;
  padding: 21px;
  border: 1px solid #cbd9cd;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(35, 52, 40, 0.08);
}

.qa-question-page .qa-answer-form-head {
  margin: -21px -21px 2px;
  padding: 15px 18px;
  border-bottom: 1px solid #d8e5da;
  border-radius: 16px 16px 0 0;
  background: #edf5ee;
  color: #254332;
}

.qa-question-page .qa-answer-form-head h2 {
  color: #254332;
  font-family: "Noto Serif JP", serif;
  font-size: 19px;
}

.qa-question-page .qa-answer-close-btn {
  border-color: #c5d4c7;
  background: #fff;
  color: #4c6555;
}

.qa-question-page .qa-answer-close-btn:hover {
  border-color: #9fb5a3;
  background: #f8fbf8;
  color: #254332;
}

.qa-question-page .qa-answer-summary-input,
.qa-question-page .qa-answer-tags-input,
.qa-question-page .qa-answer-textarea {
  border-color: #ccd7ce;
  border-radius: 9px;
  background: #fcfdfc;
}

.qa-question-page #qaAnswerSubmitBtn {
  align-self: flex-end;
  min-width: 150px;
  padding: 11px 22px;
  border: 1px solid #2f6948;
  border-radius: 999px;
  background: #2f6948;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.qa-question-page #qaAnswerSubmitBtn:hover { background: #25573b; }

@media (max-width: 980px) {
  .qa-question-page { max-width: 900px; }

  .qd-layout { grid-template-columns: 1fr; }

  .qd-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qd-sidebar-action-card { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .qa-question-page { padding: 14px 0 54px; }

  .qa-question-page-back { margin-left: 2px; }

  .qd-question-header,
  .qd-question-copy { padding: 19px 18px; }

  .qd-title { font-size: 22px; }

  .qd-question-meta-block {
    align-items: flex-start;
    flex-direction: column;
  }

  .qd-tag-list { justify-content: flex-start; }

  .qd-question-detail-grid.has-board { grid-template-columns: 1fr; }

  .qd-question-board-col {
    padding: 18px;
    border-top: 1px solid #e1e7df;
    border-left: 0;
  }

  .qd-answers-header { align-items: stretch; }

  .qd-answer-card { padding: 18px 17px 15px; }

  .qa-question-page .qa-answer-form { padding: 17px; }

  .qa-question-page .qa-answer-form-head {
    margin: -17px -17px 2px;
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 560px) {
  .qd-main { gap: 18px; }

  .qd-question-card,
  .qd-ai-explanation-card,
  .qd-answer-card,
  .qd-sidebar-box,
  .qa-question-page .qa-answer-form { border-radius: 13px; }

  .qd-question-top-row { flex-wrap: wrap; }
  .qd-question-edit-btn { margin-left: 0; }

  .qd-question-body { font-size: 14px; line-height: 1.85; }

  .qd-board-col-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .qd-answers-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .qd-reply-btn--inline { width: 100%; box-sizing: border-box; }

  .qd-ai-explanation-head { align-items: flex-start; }

  .qd-sidebar { grid-template-columns: 1fr; }
  .qd-sidebar-action-card { grid-column: auto; }

  .qd-ai-report-btn { margin-left: 0; }

  .qa-question-page #qaAnswerSubmitBtn {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ── マイページ: フレンド・グループ ───────────────────── */
.mp-community-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #e1e7e2;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(24, 75, 49, 0.04);
}

.mp-community-card > h3,
.mp-community-detail-head h3 {
  margin: 0 0 13px;
  color: #24342b;
  font-size: 15px;
}

.mp-community-card > h3 > span {
  margin-left: 5px;
  color: #7c8a82;
  font-size: 12px;
  font-weight: 600;
}

.mp-community-form {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mp-community-form--stack {
  align-items: stretch;
  flex-direction: column;
}

.mp-community-form input,
.mp-community-form textarea,
.mp-community-actions select {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid #ccd8d0;
  border-radius: 8px;
  background: #fff;
  color: #24342b;
  font: inherit;
  font-size: 13px;
}

.mp-community-form input { flex: 1; }
.mp-community-form textarea { resize: vertical; }

.mp-community-form input:focus,
.mp-community-form textarea:focus,
.mp-community-actions select:focus {
  border-color: #33845a;
  outline: 3px solid rgba(51, 132, 90, 0.12);
}

.mp-community-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: #a13b31;
  font-size: 12px;
}

.mp-community-search-results:empty { display: none; }

.mp-community-list {
  display: grid;
  gap: 8px;
}

.mp-community-search-results:not(:empty) { margin-top: 10px; }

.mp-community-user,
.mp-community-group-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  border: 1px solid #e4eae6;
  border-radius: 10px;
  background: #fbfcfb;
}

.mp-community-avatar {
  display: inline-flex;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
}

.mp-community-avatar img { width: 100%; height: 100%; object-fit: cover; }

.mp-community-user-copy,
.mp-community-group-row > span:first-child {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.mp-community-user-copy strong,
.mp-community-group-row strong {
  overflow: hidden;
  color: #2d3b33;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-community-user-copy small,
.mp-community-group-row small,
.mp-community-pending small {
  color: #7b8880;
  font-size: 11px;
}

.mp-community-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.mp-community-actions select { padding: 6px 8px; }

.mp-community-status,
.mp-community-role {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e7f3eb;
  color: #1a6b3c;
  font-size: 11px;
  font-weight: 700;
}

.mp-community-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mp-community-group-card {
  display: flex;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dce5df;
  border-radius: 11px;
  background: #fbfcfb;
  color: #2a3931;
  cursor: pointer;
  font: inherit;
  text-align: left;
  flex-direction: column;
  gap: 5px;
}

.mp-community-group-card:hover,
.mp-community-group-card.is-selected {
  border-color: #60a27a;
  background: #f1f8f3;
}

.mp-community-group-card strong { font-size: 14px; }
.mp-community-group-card span { color: #1a6b3c; font-size: 11px; font-weight: 700; }
.mp-community-group-card small { overflow: hidden; color: #7b8880; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.mp-community-group-detail { margin-top: 16px; }

.mp-community-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mp-community-detail-head h3 { margin-bottom: 4px; }
.mp-community-detail-head p { margin: 0; color: #66746c; font-size: 12px; line-height: 1.7; }

.mp-community-subhead {
  margin: 16px 0 8px;
  color: #516159;
  font-size: 12px;
  font-weight: 800;
}

.mp-community-pending {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mp-community-pending > span {
  padding: 5px 8px;
  border-radius: 7px;
  background: #f1f4f2;
  color: #4b5b52;
  font-size: 11px;
}

.mp-community-group-detail > .mp-btn-danger { margin-top: 16px; }

@media (max-width: 720px) {
  .mp-community-card { padding: 14px; border-radius: 12px; }
  .mp-community-group-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .mp-community-form:not(.mp-community-form--stack) { align-items: stretch; flex-direction: column; }
  .mp-community-form .mp-btn-primary { width: 100%; }
  .mp-community-user,
  .mp-community-group-row { align-items: flex-start; flex-wrap: wrap; }
  .mp-community-actions { width: 100%; justify-content: flex-end; }
  .mp-community-user .mp-community-actions { padding-left: 49px; }
  .mp-community-actions select { flex: 1; }
}
.mp-salon-empty {
  display: grid; justify-items: center; gap: 10px; padding: 54px 24px; border: 1px dashed #dccdc8; border-radius: 18px;
  text-align: center; background: linear-gradient(145deg, #fff, #fff8f8);
}
.mp-salon-empty > span { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #fff; font-size: 24px; background: #c72849; }
.mp-salon-empty h3 { margin: 4px 0 0; font-family: "Noto Serif JP", serif; font-size: 22px; }
.mp-salon-empty p { margin: 0 0 8px; color: #76645e; }
.mp-salon-manage-card { display: grid; grid-template-columns: 290px minmax(0, 1fr); overflow: hidden; border: 1px solid #e8dcd8; border-radius: 18px; background: #fff; box-shadow: 0 10px 32px rgba(66,35,28,.06); }
.mp-salon-manage-card > img { width: 100%; height: 100%; min-height: 330px; object-fit: cover; }
.mp-salon-manage-main { min-width: 0; padding: 25px 27px; }
.mp-salon-manage-main > header { display: flex; align-items: center; gap: 9px; }
.mp-salon-manage-main > header span { padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.mp-salon-manage-main > header span[data-tone="active"] { color: #117443; background: #e6f6ed; }
.mp-salon-manage-main > header span[data-tone="paused"] { color: #7a665f; background: #eee8e5; }
.mp-salon-manage-main > header span[data-tone="locked"] { color: #9a5b20; background: #fff0da; }
.mp-salon-manage-main > header small { color: #8b7770; }
.mp-salon-manage-main h3 { margin: 9px 0 7px; font: 700 25px/1.4 "Noto Serif JP", serif; }
.mp-salon-manage-main > p { margin: 0; color: #6c5c56; line-height: 1.75; }
.mp-salon-manage-main dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0; }
.mp-salon-manage-main dl div { padding: 10px; border-radius: 10px; background: #faf7f6; }
.mp-salon-manage-main dt { color: #8e7b74; font-size: 10px; }
.mp-salon-manage-main dd { margin: 4px 0 0; font-size: 12px; font-weight: 700; }
.mp-salon-test-notice, .mp-salon-plan-notice { padding: 11px 13px; border-radius: 10px; font-size: 12px; }
.mp-salon-test-notice { color: #7b4d2c !important; background: #fff2de; }
.mp-salon-plan-notice { color: #8c3f29 !important; background: #ffebe5; }
.mp-salon-invite { display: flex; align-items: flex-end; gap: 8px; margin-top: 13px; }
.mp-salon-invite label { display: grid; flex: 1; gap: 5px; color: #725f59; font-size: 11px; font-weight: 700; }
.mp-salon-invite input { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #d9cbc7; border-radius: 9px; color: #5d4c47; background: #fbf9f8; }
.mp-salon-invite button { min-height: 40px; padding: 0 13px; border: 1px solid #c72849; border-radius: 9px; color: #c72849; font-weight: 700; background: #fff; cursor: pointer; }
.mp-salon-manage-main footer { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mp-salon-manage-main footer .mp-row-btn { display: inline-flex; min-height: 39px; align-items: center; text-decoration: none; }

@media (max-width: 760px) {
  .mp-salon-manage-card { grid-template-columns: 1fr; }
  .mp-salon-manage-card > img { height: 210px; min-height: 0; }
  .mp-salon-manage-main { padding: 20px 17px; }
  .mp-salon-manage-main dl { grid-template-columns: 1fr; }
  .mp-salon-invite { align-items: stretch; flex-direction: column; }
  .mp-salon-manage-main footer { display: grid; }
  .mp-salon-manage-main footer .mp-row-btn { justify-content: center; }
}
