/* ─── リセット・ベース ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, sans-serif;
  background: #f0f4f8;
  color: #333333;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
}

/* ─── スマホフレーム ──────────────────────────── */
.phone-frame {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  overflow: hidden;
}

/* ─── アプリヘッダー ──────────────────────────── */
.app-header {
  background: linear-gradient(135deg, #0077b6, #023e8a);
  padding: 28px 24px 24px;
  text-align: center;
  color: #ffffff;
}
.clinic-name-header {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.app-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* ─── カード（患者向け共通） ─────────────────── */
.card {
  background: #ffffff;
  padding: 40px 28px 48px;
  text-align: center;
}

/* ─── P-01 星評価 ─────────────────────────────── */
.question { text-align: center; margin-bottom: 36px; }
.subtitle { font-size: 13px; color: #888; margin-bottom: 10px; }

.main-text {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
  color: #1a1a2e;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.star {
  font-size: 52px;
  color: #dddddd;
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.star:hover,
.star.hovered,
.star.selected {
  color: #f4a100;
  transform: scale(1.15);
}

.star-label {
  text-align: center;
  font-size: 14px;
  color: #888;
  height: 20px;
  margin-bottom: 32px;
}

.note {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  line-height: 1.6;
}

/* ローディングオーバーレイ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.75);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.overlay.active { display: flex; }
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e0e0e0;
  border-top-color: #0077b6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── P-02G Google口コミ誘導中間画面（現在フロー外） */
.google-bridge-card { text-align: center; }
.emoji-big {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
  line-height: 1;
}
.bridge-title {
  font-size: 22px;
  color: #1a1a2e;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.5;
}
.bridge-text {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 36px;
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #fff;
  border: 2px solid #4285f4;
  color: #4285f4;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 24px;
  border-radius: 12px;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 16px;
  text-decoration: none;
}
.btn-google:hover { background: #4285f4; color: #fff; }
.google-icon { font-size: 22px; }
.btn-skip {
  background: none;
  border: none;
  color: #aaa;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  display: block;
  margin: 0 auto;
}

/* ─── P-02 フィードバック ─────────────────────── */
.back-link {
  display: inline-block;
  font-size: 13px;
  color: #0077b6;
  text-decoration: none;
  margin-bottom: 24px;
}
.back-link:hover { text-decoration: underline; }

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: left;
  color: #1a1a2e;
  line-height: 1.5;
}
.section-sub {
  font-size: 13px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.7;
  text-align: left;
}

/* カテゴリ選択ボタン */
.category-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 10px;
  text-align: left;
}
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.cat-btn {
  background: #f0f4f8;
  border: 1.5px solid #dde3ea;
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 13px;
  color: #444;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.cat-btn.selected,
.cat-btn:hover {
  background: #0077b6;
  border-color: #0077b6;
  color: #fff;
}
.feedback-label {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
  text-align: left;
}

.rated-stars-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  font-size: 28px;
}
.rated-star-filled { color: #f4a100; }
.rated-star-empty  { color: #dddddd; }

.feedback-area {
  width: 100%;
  border: 1.5px solid #dde3ea;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  line-height: 1.6;
  color: #333;
  transition: border-color 0.2s;
}
.feedback-area:focus {
  outline: none;
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}

.char-count {
  text-align: right;
  font-size: 12px;
  color: #aaaaaa;
  margin-top: 6px;
  margin-bottom: 20px;
}
.char-count.over { color: #D32F2F; }

/* ─── ボタン ─────────────────────────────────── */
.btn {
  display: block;
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #0077b6, #023e8a);
  color: #ffffff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-primary:disabled {
  background: #cccccc;
  pointer-events: none;
  cursor: not-allowed;
}

/* ─── P-03 完了画面 ───────────────────────────── */
.complete-card {
  text-align: center;
  padding-top: 60px;
}
.check-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #0077b6, #023e8a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 36px;
  color: white;
}
.thanks-title {
  font-size: 22px;
  color: #1a1a2e;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.5;
}
.thanks-text {
  font-size: 14px;
  color: #666;
  line-height: 1.9;
}

/* ─── エラーページ ────────────────────────────── */
.error-card { text-align: center; }
.error-code {
  font-size: 48px;
  font-weight: bold;
  color: #cccccc;
  margin-bottom: 8px;
}
.error-message {
  font-size: 15px;
  color: #666666;
  line-height: 1.8;
}

/* ─── レスポンシブ ────────────────────────────── */
@media (max-width: 520px) {
  body { padding: 0; background: #ffffff; }
  .phone-frame { border-radius: 0; box-shadow: none; min-height: 100vh; }
  .app-header { border-radius: 0; }
}

/* ================================================================
   管理画面
   ================================================================ */

/* ─── 管理画面 共通 ──────────────────────────── */
.admin-body {
  background: #f0f4f8;
  display: block;
  padding: 0;
}

/* ─── 管理画面ヘッダー ──────────────────────── */
.admin-header {
  background: linear-gradient(135deg, #0077b6, #023e8a);
  color: #fff;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #fff;
  text-decoration: none;
}
.admin-header-title:hover {
  opacity: 0.85;
}
.admin-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.admin-header-user { opacity: 0.85; }
.admin-header-link,
.admin-header-link:visited,
.admin-header-link:active {
  color: #fff !important;
  text-decoration: none;
  font-size: 13px;
}
.admin-header-link:hover { color: #fff !important; text-decoration: underline; }
.admin-header-logout {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.admin-header-logout:hover { background: rgba(255,255,255,0.25); }

/* ─── 管理画面 ナビ ─────────────────────────── */
.admin-nav {
  background: #fff;
  border-bottom: 1px solid #e0e6ed;
  padding: 0 24px;
  display: flex;
  gap: 0;
}
.admin-nav a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.admin-nav a:hover { color: #0077b6; }
.admin-nav a.active {
  color: #0077b6;
  border-bottom-color: #0077b6;
  font-weight: 600;
}

/* ─── ハンバーガーメニュー ──────────────────── */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu-divider { display: none; }
.mobile-only-link { display: none !important; }
.mobile-logout-form { display: none !important; }

/* ─── 管理画面 コンテンツ ───────────────────── */
.admin-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px 24px;
}
.admin-page-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 24px;
}
.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-page-header .admin-page-title { margin-bottom: 0; }

/* ─── ログイン画面 ───────────────────────────── */
.admin-login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  padding: 40px 32px;
}
.admin-login-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  color: #1a1a2e;
  margin-bottom: 32px;
}
.admin-login-btn {
  margin-top: 8px;
}

/* ─── フォーム部品 ───────────────────────────── */
.admin-form-group { margin-bottom: 20px; }
.admin-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}
.admin-input {
  width: 100%;
  height: 44px;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  transition: border-color 0.2s;
}
.admin-input:focus {
  outline: none;
  border-color: #0077b6;
  box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}
.admin-input:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}
.admin-input-help {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.admin-select {
  width: 100%;
  height: 44px;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: #333;
  background: #fff;
}
.admin-radio-group {
  display: flex;
  gap: 20px;
  margin-top: 4px;
}
.admin-radio-group label {
  font-size: 14px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ─── アラート ───────────────────────────────── */
.admin-alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.admin-alert-error {
  background: #fef2f2;
  color: #D32F2F;
  border: 1px solid #fecaca;
}
.admin-alert-success {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}

/* ─── ダッシュボード カード ──────────────────── */
.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.admin-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 24px;
  text-align: center;
}
.admin-card-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}
.admin-card-value {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a2e;
}
.admin-card-unit {
  font-size: 14px;
  color: #888;
  margin-left: 2px;
}

/* ─── クイックリンク ─────────────────────────── */
.admin-quick-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-quick-link {
  display: inline-block;
  padding: 10px 20px;
  background: #fff;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #0077b6;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.admin-quick-link:hover {
  background: #f0f8ff;
  border-color: #0077b6;
}

/* ─── テーブル ───────────────────────────────── */
.admin-table-wrap {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #444;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 2px solid #e0e6ed;
  white-space: nowrap;
}
.sort-link {
  color: #444;
  text-decoration: none;
  cursor: pointer;
}
.sort-link:hover {
  color: #2196F3;
}
.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #f8fafc; }

/* ─── バッジ ─────────────────────────────────── */
.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.admin-badge-active {
  background: #dcfce7;
  color: #16a34a;
}
.admin-badge-inactive {
  background: #f3f4f6;
  color: #9ca3af;
}

/* ─── テーブル操作リンク ─────────────────────── */
.admin-actions {
  display: flex;
  gap: 12px;
  white-space: nowrap;
}
.admin-actions a,
.admin-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  height: 32px;
  padding: 0 14px;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.admin-actions a {
  color: #fff;
  background: linear-gradient(135deg, #0077b6, #005f8f);
  border: none;
}
.admin-actions a:hover { background: linear-gradient(135deg, #005f8f, #004a6f); box-shadow: 0 2px 6px rgba(0,119,182,0.3); }
.admin-actions button {
  color: #fff;
  background: linear-gradient(135deg, #0077b6, #005f8f);
  border: none;
}
.admin-actions button:hover { background: linear-gradient(135deg, #005f8f, #004a6f); box-shadow: 0 2px 6px rgba(0,119,182,0.3); }
.admin-actions .danger {
  color: #fff;
  background: linear-gradient(135deg, #e53e3e, #c53030);
  border: none;
}
.admin-actions .danger:hover { background: linear-gradient(135deg, #c53030, #9b2c2c); box-shadow: 0 2px 6px rgba(229,62,62,0.3); }

/* ─── ボタン（管理画面追加） ─────────────────── */
.btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-outline {
  background: #fff;
  color: #0077b6;
  border: 1.5px solid #0077b6;
}
.btn-outline:hover { background: #f0f8ff; }
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  background: #fff;
  color: #0077b6;
  border: 1.5px solid #0077b6;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  width: auto;
}
.btn-export:hover { background: #f0f8ff; }

/* ─── フィルター（回答一覧） ─────────────────── */
.admin-filters {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}
.admin-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-filter-group label {
  font-size: 12px;
  font-weight: 600;
  color: #888;
}
.admin-filter-group input,
.admin-filter-group select {
  height: 36px;
  border: 1.5px solid #dde3ea;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: #333;
}

/* ─── ページネーション ───────────────────────── */
.admin-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 20px;
  font-size: 14px;
  color: #666;
}
.admin-pagination a {
  color: #0077b6;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #dde3ea;
}
.admin-pagination a:hover { background: #f0f8ff; }

/* ─── 星表示（テーブル内） ───────────────────── */
.admin-stars { color: #f4a100; letter-spacing: 1px; }
.admin-star-empty { color: #ddd; }

/* ─── 患者向けURL表示 ────────────────────────── */
.admin-patient-url {
  font-size: 13px;
  color: #0077b6;
  background: #f0f8ff;
  padding: 2px 6px;
  border-radius: 4px;
  text-decoration: none;
  word-break: break-all;
}
.admin-patient-url:hover {
  text-decoration: underline;
}
.admin-url-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-url-card {
  background: #f0f8ff;
  border: 1px solid #bde0fe;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
}
.admin-url-card-label {
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}
.admin-url-card-body {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-url-info {
  background: #f0f8ff;
  border: 1px solid #bde0fe;
  border-radius: 8px;
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-url-info-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.admin-url-info-value {
  font-size: 14px;
  color: #0077b6;
  word-break: break-all;
  user-select: all;
  text-decoration: none;
}
.admin-url-info-value:hover {
  text-decoration: underline;
}
.admin-url-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── コピーボタン ────────────────────────────── */
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0;
  color: #94a3b8;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-copy::before {
  content: "";
  display: block;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") no-repeat center/contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E") no-repeat center/contain;
}
.btn-copy:hover {
  background: #f0f4f8;
  color: #0077b6;
}
.btn-copy.copied {
  color: #16a34a;
  background: #f0fdf4;
}

/* ─── カテゴリバッジ（回答一覧テーブル用）──── */
.admin-cat-badge {
  display: inline-block;
  background: #eef4ff;
  color: #3b6abf;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin: 1px 2px;
  white-space: nowrap;
}

/* ─── 詳細ボタン ──────────────────────────── */
.btn-detail {
  background: none;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  color: #555;
  cursor: pointer;
}
.btn-detail:hover { background: #f5f5f5; }

/* ─── 回答詳細モーダル ─────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-content {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid #f0f0f0;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #333;
}
.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: #333; }
.modal-body {
  padding: 20px 24px;
}
.modal-field {
  margin-bottom: 16px;
}
.modal-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.modal-value {
  font-size: 15px;
  color: #333;
}
.modal-star-filled { color: #FFB300; font-size: 20px; }
.modal-star-empty { color: #ddd; font-size: 20px; }
.modal-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.modal-cat-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  border: 1.5px solid #ddd;
  color: #aaa;
  background: #fafafa;
  cursor: default;
}
.modal-cat-btn.selected {
  border-color: #0077b6;
  background: #e8f4fd;
  color: #0077b6;
  font-weight: 600;
}
.modal-feedback {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: #333;
  min-height: 60px;
  white-space: pre-wrap;
  word-break: break-word;
}
.modal-footer {
  padding: 14px 24px 18px;
  border-top: 1px solid #f0f0f0;
  text-align: right;
}

/* ─── 管理画面 モーダル風フォーム ─────────────── */
.admin-form-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 28px 24px;
  margin-bottom: 24px;
}
.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.admin-form-actions .btn {
  width: auto;
  height: 40px;
  padding: 0 28px;
  font-size: 14px;
}

/* ─── 管理画面レスポンシブ ───────────────────── */
@media (max-width: 768px) {
  .admin-content { padding: 16px; }
  .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .admin-filters {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
  }
  .admin-filter-group {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .admin-filter-group select,
  .admin-filter-group input {
    width: 100%;
  }
  .admin-nav { overflow-x: auto; }
  .admin-page-header { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .admin-url-cell { flex-direction: column; align-items: flex-start; gap: 4px; }
  .admin-url-info-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (max-width: 600px) {
  .admin-header-right { display: none; }
  .hamburger-btn { display: flex; }
  .admin-nav {
    display: none;
    flex-direction: column;
    padding: 0;
    border-bottom: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 100;
  }
  .admin-nav.mobile-open { display: flex; }
  .admin-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid #f0f4f8;
    border-left: none;
  }
  .admin-nav a.active { border-bottom-color: #f0f4f8; border-left: 3px solid #0077b6; }
  .mobile-menu-divider { display: block; height: 1px; background: #e0e6ed; margin: 4px 0; }
  .mobile-only-link { display: block !important; }
  .mobile-logout-form { display: block !important; margin: 0; }
  .mobile-logout-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 14px 24px;
    font-size: 14px;
    color: #e63946;
    cursor: pointer;
    font-family: inherit;
    border-top: 1px solid #f0f4f8;
  }
}
