:root {
  --bg: #f7f9f9;
  --card: #ffffff;
  --text: #3b3b3b;
  --muted: #6b7274;
  --accent: #0e3033;
  --accent-dark: #081d1f;
  --accent-soft: #e7eeee;
  --border: #dfe4e4;
  --danger: #d21519;
  --danger-soft: #fdeced;
  --warn: #0e3033;
  --warn-soft: #eef3f3;
  --shadow: 0 1px 2px rgba(14, 48, 51, 0.04), 0 2px 8px rgba(14, 48, 51, 0.05);
  --shadow-hover: 0 4px 14px rgba(14, 48, 51, 0.09);

  /* 文字サイズ（Apple HIG のテキストスタイルに合わせた段階） */
  --fs-title: 1.75rem;    /* 28: ページ見出し */
  --fs-headline: 1.125rem; /* 18: カード見出し・選択肢の見出し */
  --fs-body: 1rem;        /* 16: 本文・入力欄 */
  --fs-subhead: 0.9375rem; /* 15: 説明文 */
  --fs-footnote: 0.8125rem; /* 13: 補足 */

  /* 余白（4の倍数にそろえる） */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --gutter: 16px;
  --card-padding: 24px;

  /* 形とサイズ */
  --radius: 12px;
  --radius-sm: 8px;
  --control-height: 44px; /* HIG の標準タップ領域 */
}

@media (max-width: 640px) {
  :root {
    --fs-title: 1.375rem; /* 22 */
    --fs-body: 1.0625rem; /* 17: HIG の iOS 本文サイズ */
    --card-padding: 16px;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-bottom: 88px; /* 入力欄が固定の保存ボタンに隠れないようにする */
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Segoe UI", sans-serif;
  font-size: var(--fs-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
  /* 日本語の不自然な改行（行頭の小さい「っ」「ー」や、最終行の1文字だけ）を減らす */
  line-break: strict;
  text-wrap: pretty;
}

/* 見出しやボタンなど短い文は文節で折り返す（長文に使うと右側が大きく空くので使わない） */
h1, h2, label, button, .btn, .question-title, .mode-option-title, .mode-option-desc, .store-title, .qa-question {
  word-break: auto-phrase;
}

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon { flex-shrink: 0; vertical-align: -3px; }

/* --- ページの骨組み（ヘッダーと本文の左端をそろえる） --- */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xl) var(--gutter) 72px;
}
.wide { max-width: 1000px; }

header.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: var(--space-xs) 0;
}
header.site-header .header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
}
header.site-header.is-wide .header-inner { max-width: 1000px; }
header.site-header a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
}
.site-logo { display: block; height: 38px; width: auto; }

/* --- 文字 --- */
h1 {
  font-size: var(--fs-title);
  line-height: 1.3;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 var(--space-lg);
  text-wrap: balance;
}
h2 {
  font-size: var(--fs-headline);
  line-height: 1.4;
  font-weight: 700;
  margin: 0 0 var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
p { margin: 0 0 var(--space-lg); }
.muted { color: var(--muted); font-size: var(--fs-subhead); }
.small { font-size: var(--fs-footnote); }
.survey-privacy { margin: 0 0 var(--space-md); }
.survey-privacy a { color: inherit; text-decoration: underline; }
.lead { color: var(--muted); font-size: var(--fs-subhead); margin-bottom: var(--space-lg); }

/* --- カード --- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-padding);
  margin-bottom: var(--space-lg);
}
.card > :last-child { margin-bottom: 0; }

/* --- フォーム --- */
label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-subhead);
  margin-bottom: var(--space-sm);
}

.field { margin-bottom: var(--space-xl); }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.field-row:last-child { margin-bottom: 0; }
.field-row .field { flex: 1 1 260px; min-width: 0; margin-bottom: 0; }
.field-hint { display: block; margin-top: var(--space-sm); }

input[type=text], input[type=password], textarea, select {
  display: block;
  width: 100%;
  min-height: var(--control-height);
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: max(16px, var(--fs-body)); /* 16px未満だとiPhoneで入力時に画面が拡大される */
  font-family: inherit;
  line-height: 1.5;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type=text]:focus, input[type=password]:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }

textarea { min-height: 120px; resize: vertical; }

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767066' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  text-overflow: ellipsis;
}

/* --- お客様のアンケート --- */
.survey-question { margin-bottom: var(--space-2xl); }
.survey-question.has-error .question-title { color: var(--danger); }
.question-title {
  font-weight: 600;
  font-size: var(--fs-body);
  line-height: 1.5;
  margin-bottom: var(--space-md);
  display: block;
}
.question-required {
  display: inline-block;
  margin-left: var(--space-xs);
  color: var(--muted);
  font-weight: 400;
  font-size: var(--fs-footnote);
  white-space: nowrap;
}
.rating-hint { margin: calc(var(--space-sm) * -1) 0 var(--space-md); }
.question-error { color: var(--danger); font-size: var(--fs-footnote); margin: var(--space-sm) 0 0; }

/* 同じ質問の選択肢は同じ大きさにそろえる */
.choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}
.choice-group-rating { grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); }
.choice-group input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice-group label.choice-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0;
  padding: var(--space-sm);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #fff;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.choice-group input:checked + label.choice-pill {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.choice-group input:focus-visible + label.choice-pill {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- ボタン --- */
button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--control-height);
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-subhead);
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
  transition: background 0.12s, box-shadow 0.12s, opacity 0.12s;
}
button:active, .btn:active { opacity: 0.75; }
button:disabled { opacity: 0.5; cursor: default; }

.btn-secondary {
  background: #fff;
  color: var(--accent);
}
.btn-danger { background: var(--danger); border-color: var(--danger); }
.btn-danger-outline {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
  padding-left: 14px;
  padding-right: 14px;
}
/* お客様画面の主操作は横幅いっぱいにして、親指で押しやすくする */
.btn-block { width: 100%; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

/* --- 戻るリンクなど、枠のないナビゲーション --- */
.back-link, nav.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height);
  color: var(--accent);
  font-size: var(--fs-subhead);
  font-weight: 600;
  text-decoration: none;
}
.back-link {
  background: none;
  border: none;
  padding: 0;
  margin: calc(var(--space-sm) * -1) 0 var(--space-sm) -4px;
}
nav.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-xl);
  margin: calc(var(--space-sm) * -1) 0 var(--space-sm);
}
nav.admin-nav a { font-weight: 500; color: var(--muted); }
nav.admin-nav a.back { font-weight: 600; color: var(--accent); margin-left: -4px; }
nav.admin-nav .nav-end { margin-left: auto; }

/* --- お知らせ --- */
.notice, .error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
  font-size: var(--fs-subhead);
}
.notice { background: var(--warn-soft); border: 1px solid #cfdcdd; color: var(--warn); }
.notice .icon, .error .icon { margin-top: 3px; }
.error { background: var(--danger-soft); border: 1px solid #f2b3b5; color: var(--danger); }

/* --- お客様の投稿方法の選択 --- */
.mode-choice { display: grid; gap: var(--space-md); }
.mode-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
  min-height: 72px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-lg);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  font: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.mode-option-title { display: block; font-size: var(--fs-headline); line-height: 1.4; font-weight: 700; color: var(--accent-dark); }
.mode-option-desc { display: block; margin-top: var(--space-xs); color: var(--muted); font-size: var(--fs-subhead); font-weight: 400; line-height: 1.5; }
.mode-option > .icon { color: var(--muted); }

/* --- 拠点一覧 --- */
.store-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-md); }
.store-list li {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-padding);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-lg);
}
.store-name { display: flex; align-items: flex-start; gap: var(--space-md); min-width: 0; flex: 1 1 320px; }
.store-title { font-size: var(--fs-headline); line-height: 1.4; font-weight: 700; }
.store-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: var(--control-height);
  font-size: var(--fs-subhead);
  font-weight: 500;
  text-decoration: none;
}
.store-link .icon { width: 15px; height: 15px; }
.store-icon {
  width: var(--control-height);
  height: var(--control-height);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.store-list .actions { margin-top: 0; flex-wrap: nowrap; }

/* --- 質問の編集 --- */
.question-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  background: var(--bg);
}
.question-row-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xs) var(--space-md);
  margin-bottom: var(--space-md);
}
.question-row-controls { display: flex; align-items: center; gap: var(--space-md); margin-left: auto; }
.question-number { font-weight: 700; font-size: var(--fs-subhead); color: var(--accent); }

/* 長いページでも保存ボタンがいつも押せるようにする */
.question-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-md);
  margin: var(--space-lg) calc(var(--card-padding) * -1) calc(var(--card-padding) * -1);
  padding: var(--space-md) var(--card-padding);
  background: #fff;
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
}
.card > .question-actions:last-child { margin-bottom: calc(var(--card-padding) * -1); }

.toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height);
  margin: 0;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--fs-subhead);
}
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle .switch {
  width: 44px;
  height: 26px;
  background: #ccd4d5;
  border-radius: 999px;
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.toggle .switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  transition: transform 0.15s;
}
.toggle input:checked ~ .switch { background: var(--accent); }
.toggle input:checked ~ .switch::after { transform: translateX(18px); }
.toggle input:focus-visible ~ .switch { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- モーダル --- */
dialog.modal {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(14, 48, 51, 0.25);
  padding: var(--card-padding);
  color: var(--text);
}
dialog.modal-sm { width: min(420px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(14, 48, 51, 0.45); }
dialog.modal p { margin: 0 0 var(--space-sm); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--space-md); margin-top: var(--space-xl); }

/* --- 使い方ツアー --- */
.help-button { margin-left: auto; padding-left: 14px; padding-right: 14px; }
.tour-group-title {
  font-size: var(--fs-subhead);
  font-weight: 700;
  color: var(--accent);
  margin: var(--space-xl) 0 var(--space-sm);
}
.tour-option { min-height: 0; padding: var(--space-md) var(--space-lg); box-shadow: none; }
.tour-option .mode-option-title { font-size: var(--fs-body); }
.tour-option .mode-option-desc { font-size: var(--fs-footnote); }

.tour-spot {
  position: fixed;
  z-index: 1000;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 2px #fff, 0 0 0 9999px rgba(14, 48, 51, 0.55);
  pointer-events: none;
  transition: left 0.2s, top 0.2s, width 0.2s, height 0.2s;
}
.tour-card {
  position: fixed;
  z-index: 1001;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(14, 48, 51, 0.25);
  padding: var(--card-padding);
}
.tour-count { margin-bottom: var(--space-xs); }
.tour-title { font-size: var(--fs-headline); line-height: 1.4; font-weight: 700; color: var(--accent); margin-bottom: var(--space-sm); word-break: auto-phrase; }
.tour-body { font-size: var(--fs-subhead); margin-bottom: var(--space-lg); }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: var(--space-sm); }
.tour-move { display: flex; gap: var(--space-sm); margin-left: auto; }
.btn-text {
  background: none;
  border-color: transparent;
  color: var(--muted);
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}
/* ツアーで開くモーダル。暗い背景は .tour-spot が担当する */
dialog.modal.in-tour {
  position: fixed;
  inset: 0;
  z-index: 999;
  margin: auto;
  height: fit-content;
}

/* --- トースト --- */
.toast-area {
  position: fixed;
  top: calc(var(--space-lg) + env(safe-area-inset-top, 0px));
  right: var(--gutter);
  left: var(--gutter);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-sm);
  pointer-events: none;
}
.toast {
  max-width: 100%;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: var(--fs-subhead);
  font-weight: 600;
  box-shadow: var(--shadow-hover);
  animation: toast-in 0.2s ease-out;
}
.toast-error { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* --- スケルトンスクリーン --- */
.skeleton-line {
  height: 14px;
  margin-bottom: var(--space-md);
  border-radius: 4px;
  background: linear-gradient(90deg, #e7eeee 25%, #f3f6f6 50%, #e7eeee 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s linear infinite;
}
.skeleton-label { width: 30%; margin-bottom: var(--space-lg); }
.skeleton-short { width: 60%; }
.skeleton-button { width: 100%; height: var(--control-height); margin: var(--space-xl) 0 0; border-radius: var(--radius-sm); }
@keyframes skeleton-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* --- 言語切り替え --- */
.lang-switch {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-height);
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-footnote);
  padding: 0 var(--space-md);
  border-radius: 999px;
  border: 1px solid transparent;
}
.lang-switch a.active { color: var(--accent); font-weight: 700; border-color: var(--border); background: #fff; }

/* --- ログイン --- */
.login-box { max-width: 400px; margin: var(--space-2xl) auto 0; }
.login-box .lock-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}
.login-box h1 { text-align: center; }
.login-box .field { margin-bottom: var(--space-lg); }
.login-box button { width: 100%; margin-top: var(--space-sm); }

/* --- バッジ --- */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-footnote);
  font-weight: 600;
  line-height: 1.4;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge-green { background: var(--accent-soft); color: var(--accent-dark); }
.badge-gray { background: #edf0f0; color: var(--muted); }
.badge-blue { background: #e7eeee; color: #0e3033; }
.badge-red { background: var(--danger-soft); color: var(--danger); }

/* --- ユーザー管理 --- */
.user-list { display: grid; }
.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}
.user-row:first-child { border-top: none; padding-top: 0; }
.user-row:last-child { padding-bottom: 0; }
.user-name { font-weight: 600; }
.user-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs) var(--space-sm); margin-top: var(--space-xs); }
.user-password { display: flex; gap: var(--space-sm); align-items: center; margin: 0; }
.user-password input { width: 200px; }
.user-delete { margin: 0; }
.response-delete { display: flex; justify-content: flex-end; margin: var(--space-md) 0 0; }

/* --- 回答データ --- */
.response-list { display: grid; gap: var(--space-md); }
.response-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-padding);
}
.response-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}
.response-date { font-size: var(--fs-subhead); color: var(--muted); font-weight: 600; }
.response-badges { display: flex; gap: var(--space-xs); flex-wrap: wrap; }

.review-block {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-sm);
}
.review-block-label {
  font-size: var(--fs-footnote);
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: var(--space-xs);
}
.review-block-error { background: var(--danger-soft); }
.review-block-error .review-block-label { color: var(--danger); }
.review-block p { margin: 0; white-space: pre-wrap; }

details summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: var(--control-height);
  cursor: pointer;
  font-size: var(--fs-subhead);
  font-weight: 600;
  color: var(--accent);
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.15s;
  flex-shrink: 0;
}
details[open] summary::before { transform: rotate(45deg); }
details.draft-details summary { color: var(--muted); font-weight: 500; }
details.draft-details p { font-size: var(--fs-subhead); color: var(--muted); white-space: pre-wrap; margin: 0 0 var(--space-sm); }

.qa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0 var(--space-xl);
}
.qa-item { padding: var(--space-md) 0; border-top: 1px solid var(--border); }
.qa-question { display: block; color: var(--muted); font-size: var(--fs-footnote); margin-bottom: var(--space-xs); }
.qa-answer { display: block; font-size: var(--fs-subhead); }

.pagination { justify-content: space-between; }

.empty-state { text-align: center; padding: 40px var(--gutter); color: var(--muted); }
.empty-state .icon { width: 32px; height: 32px; margin-bottom: var(--space-sm); }

/* マウスのときだけホバー表現を出す（タッチでは押した後に残って見えるため） */
@media (hover: hover) {
  a:hover { color: var(--accent-dark); }
  button:hover, .btn:hover { background: var(--accent-dark); box-shadow: var(--shadow-hover); }
  .btn-secondary:hover { background: var(--accent-soft); color: var(--accent); }
  .btn-danger:hover { background: #a81014; border-color: #a81014; }
  .btn-text:hover { background: none; color: var(--accent); box-shadow: none; }
  .btn-danger-outline:hover { background: var(--danger-soft); color: var(--danger); box-shadow: none; }
  .back-link:hover { background: none; box-shadow: none; color: var(--accent-dark); text-decoration: underline; }
  nav.admin-nav a:hover { color: var(--accent); }
  .lang-switch a:hover { color: var(--accent); }
  .choice-group label.choice-pill:hover { border-color: var(--accent); }
  .mode-option:hover { background: var(--card); color: inherit; box-shadow: var(--shadow-hover); border-color: var(--accent); }
}

@media (max-width: 640px) {
  .container { padding-top: var(--space-lg); padding-bottom: 48px; }
  .actions .btn, .actions button { flex: 1 1 auto; }
  .store-list li { flex-direction: column; align-items: stretch; }
  .store-name { flex-basis: auto; }
  .store-list .actions .btn { flex: 1 1 0; padding-left: var(--space-sm); padding-right: var(--space-sm); }
  .modal-actions > * { flex: 1 1 0; }
  .form-submit { width: 100%; }
  .toast-area { align-items: center; }
  .question-actions > * { flex: 1 1 0; padding-left: var(--space-sm); padding-right: var(--space-sm); }
  .user-row { grid-template-columns: minmax(0, 1fr) auto; }
  .user-password { grid-column: 1 / -1; grid-row: 2; }
  .user-password input { flex: 1 1 0; width: auto; min-width: 0; }
  .pagination .muted { order: -1; width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .toast, .skeleton-line { animation: none; }
}
