/* ============================================
   オーダーアイテム制作依頼フォーム - スタイル
   Modern Mono + #cc0000 Accent
   ============================================ */

:root {
  --color-bg: #f4f4f4;
  --color-surface: #ffffff;
  --color-border: #d0d0d0;
  --color-border-light: #ebebeb;
  --color-accent: #cc0000;
  --color-accent-dark: #990000;
  --color-accent-light: #fff5f5;
  --color-text: #1a1a1a;
  --color-text-sub: #666666;
  --color-required: #cc0000;
  --color-success: #2e7d32;
  --color-admin-bg: #1a1a1a;
  --color-admin-sidebar: #0f0f0f;
  --radius: 6px;
  --shadow: 0 1px 6px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.14);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
}

/* ============================================
   ヘッダー
   ============================================ */
.site-header {
  background-color: var(--color-admin-bg);
  color: #ffffff;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  border-bottom: 3px solid var(--color-accent);
}

.site-header__logo {
  display: flex;
  align-items: center;
}

.site-header__logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.site-header__sub {
  font-size: 0.75rem;
  color: #aaaaaa;
  letter-spacing: 0.05em;
}

/* ============================================
   メインレイアウト
   ============================================ */
.page-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}

/* フォーム上部バナー画像（横長） */
.form-banner {
  margin-bottom: 28px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-banner__img {
  display: block;
  width: 100%;
  height: auto;
}

.page-title {
  text-align: center;
  margin-bottom: 40px;
}

.page-title h1 {
  font-size: 1.6rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  color: var(--color-text);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.page-title p {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--color-text-sub);
}

.page-intro {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.8;
  text-align: left;
}

/* ============================================
   フォームセクション
   ============================================ */
.form-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.form-section__header {
  background-color: var(--color-admin-bg);
  color: #ffffff;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-section__number {
  background: var(--color-accent);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
  flex-shrink: 0;
}

.form-section__title {
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.form-section__body {
  padding: 24px 20px;
}

/* ============================================
   セクションヒーロー（大きなサムネイル）
   ============================================ */
.section-hero {
  width: 100%;
  background: #e8e8e8;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  position: relative;
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: border-color 0.2s;
  /* 選択前は非表示。選択されたら .has-selection が付与され表示される */
  display: none;
}

.section-hero.has-selection {
  display: block;
}

.section-hero:hover {
  border-color: var(--color-accent);
}

.section-hero__img-area {
  width: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8e8e8;
  padding: 24px;
  box-sizing: border-box;
}

/* ヒーロー内コンテンツを確実に中央揃え */
.section-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  width: 100%;
}


.section-hero__placeholder-text {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #aaa;
  text-align: center;
}

.section-hero__label-bar {
  background: rgba(0,0,0,0.78);
  color: #ffffff;
  padding: 10px 16px;
  font-size: 0.95rem;
  font-weight: bold;
  text-align: center;
  letter-spacing: 0.04em;
}

.section-hero.has-selection .section-hero__img-area {
  background: #f0f0f0;
  padding: 16px;
}

/* 選択後：大きく表示される画像 */
.section-hero__selected-img {
  display: block;
  max-width: 100%;
  max-height: 360px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  margin: auto;
}

/* 選択後：画像なし時の大きなラベルテキスト */
.section-hero__selected-label {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-text);
  letter-spacing: 0.05em;
}

/* ============================================
   選択カード（画像付きラジオ）
   ============================================ */
.option-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.option-cards--wide {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.option-card {
  position: relative;
}

.option-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.option-card__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 8px;
  border: 2px solid var(--color-border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--color-bg);
  text-align: center;
}

.option-card__label:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.option-card input[type="radio"]:checked + .option-card__label {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
  box-shadow: 0 0 0 2px var(--color-accent);
}

.option-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 4px;
}

.option-card__img-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #999;
}

.option-card__text {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-text);
  line-height: 1.3;
}

.option-card__sub {
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

/* ============================================
   テキスト入力
   ============================================ */
.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-label .required {
  color: var(--color-required);
  font-size: 0.8rem;
  margin-left: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* ============================================
   家紋・ロゴ：条件表示エリア
   ============================================ */
.conditional-block {
  margin-top: 16px;
  padding: 16px;
  background: #fafafa;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  display: none;
}

.conditional-block.is-visible {
  display: block;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.upload-btn:hover {
  background: var(--color-border-light);
}

.upload-note {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--color-text-sub);
  line-height: 1.5;
}

.crest-preview-wrap {
  margin-top: 12px;
}

.crest-preview-img {
  max-width: 160px;
  max-height: 160px;
  object-fit: contain;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: block;
}

/* ============================================
   顧客情報エリア
   ============================================ */
.customer-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.customer-info__header {
  background-color: var(--color-admin-bg);
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-info__header::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--color-accent);
  border-radius: 2px;
}

.customer-info__body {
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .customer-info__body {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   選択内容サマリー
   ============================================ */
.order-summary {
  background: var(--color-surface);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  margin-bottom: 32px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.order-summary__header {
  background: var(--color-accent);
  color: #fff;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.order-summary__body {
  padding: 20px;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.summary-table tr {
  border-bottom: 1px solid var(--color-border-light);
}

.summary-table tr:last-child {
  border-bottom: none;
}

.summary-table th {
  padding: 10px 12px;
  text-align: left;
  color: var(--color-text-sub);
  font-weight: normal;
  width: 30%;
  background: var(--color-bg);
  vertical-align: middle;
}

.summary-table td {
  padding: 8px 12px;
  font-weight: bold;
  color: var(--color-text);
  vertical-align: middle;
}

.summary-table td.empty,
.summary-table .empty {
  color: var(--color-accent);
  font-weight: normal;
  font-style: italic;
}

/* サマリーセル内のサムネイル */
.summary-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-cell__thumb {
  width: 48px;
  height: 48px;
  background: #e0e0e0;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #aaa;
  overflow: hidden;
}

.summary-cell__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-cell__thumb.is-empty {
  background: #eeeeee;
}

/* ============================================
   送信ボタン
   ============================================ */
.submit-area {
  text-align: center;
  padding: 20px 0;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 60px;
  background: var(--color-accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 4px 12px rgba(204, 0, 0, 0.35);
}

.btn-submit:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: bold;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--color-border-light);
  border-color: #aaa;
}

/* ============================================
   確認ページ
   ============================================ */
.confirm-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.confirm-box h2 {
  font-size: 1.1rem;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.confirm-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* ============================================
   管理画面レイアウト
   ============================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  background: var(--color-admin-sidebar);
  color: #cccccc;
  flex-shrink: 0;
  padding: 20px 0;
}

.admin-sidebar__title {
  padding: 0 20px 20px;
  font-size: 0.9rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  color: #888888;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}

.admin-sidebar__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #aaaaaa;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.admin-sidebar__nav a:hover,
.admin-sidebar__nav a.active {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  border-left-color: var(--color-accent);
}

/* 受注一覧リンク（サイドバー上部に1つだけ） */
.sidebar-list-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  color: #aaaaaa;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.sidebar-list-link:hover,
.sidebar-list-link.active {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  border-left-color: var(--color-accent);
}

/* ============================================
   サイドバー：フォームグループ
   ============================================ */
.sidebar-group {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.sidebar-group__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 10px;
  color: #cccccc;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: bold;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-group__title:hover,
.sidebar-group__title.active {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
  border-left-color: var(--color-accent);
}

.sidebar-group__children {
  display: none;
  padding-bottom: 4px;
}

.sidebar-group--open .sidebar-group__children {
  display: block;
}

.sidebar-group__child {
  display: flex;
  align-items: center;
  padding: 7px 20px 7px 28px;
  color: #888888;
  text-decoration: none;
  font-size: 0.82rem;
  transition: background 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-group__child:hover,
.sidebar-group__child.active {
  background: rgba(255,255,255,0.05);
  color: #cccccc;
  border-left-color: rgba(204,0,0,0.5);
}

/* ＋ 新しいフォームを追加 ボタン */
.sidebar-add-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  color: #888;
  text-decoration: none;
  font-size: 0.85rem;
  border-left: 3px solid transparent;
  border-top: 1px dashed rgba(255,255,255,0.08);
  transition: all 0.2s;
  margin-top: 4px;
}

.sidebar-add-btn:hover,
.sidebar-add-btn.active {
  background: rgba(255,255,255,0.06);
  color: #cccccc;
  border-left-color: var(--color-accent);
}

/* ログアウト */
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: #888;
  text-decoration: none;
  font-size: 0.88rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: background 0.2s;
  border-left: 3px solid transparent;
  margin-top: 8px;
}

.sidebar-logout:hover {
  background: rgba(255,255,255,0.05);
  color: #cccccc;
  border-left-color: #555;
}

/* フィールドキーのバッジ */
.fs-field-key-badge {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.73rem;
  color: #999;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 1px 6px;
  font-family: monospace;
}

.admin-main {
  flex: 1;
  background: var(--color-bg);
  overflow-x: auto;
}

.admin-topbar {
  background: var(--color-surface);
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-light);
  box-shadow: var(--shadow);
}

.admin-topbar h1 {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--color-text);
}

.admin-content {
  padding: 28px;
}

/* ============================================
   管理画面：テーブル
   ============================================ */
.admin-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 24px;
}

.admin-card__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--color-bg);
}

.admin-card__header h2 {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text);
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.orders-table th {
  padding: 12px 16px;
  text-align: left;
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-weight: bold;
  border-bottom: 2px solid var(--color-border-light);
  white-space: nowrap;
}

.orders-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
}

.orders-table tr:last-child td {
  border-bottom: none;
}

.orders-table tr:hover td {
  background: #fafafa;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: bold;
}

.status-badge--new {
  background: #fef3c7;
  color: #92400e;
}

.status-badge--progress {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge--done {
  background: #d1fae5;
  color: #065f46;
}

.btn-detail {
  padding: 4px 14px;
  background: var(--color-admin-bg);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-detail:hover {
  background: #333;
}

.btn-delete-order {
  padding: 4px 10px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-delete-order:hover {
  background: var(--color-accent-dark);
}

/* インラインステータス選択ドロップダウン */
.status-select {
  appearance: none;
  -webkit-appearance: none;
  border: 2px solid transparent;
  border-radius: 20px;
  padding: 3px 28px 3px 10px;
  font-size: 0.78rem;
  font-weight: bold;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 8px;
  transition: opacity 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.status-select:hover {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.12);
  opacity: 0.9;
}

.status-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}

/* 個別カラーはPHP側のインラインstyleで設定 */

.btn-delete-form {
  padding: 6px 14px;
  background: #fff;
  color: #cc0000;
  border: 1px solid #cc0000;
  border-radius: 4px;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.btn-delete-form:hover {
  background: #cc0000;
  color: #fff;
}

/* ============================================
   管理画面：詳細グリッド
   ============================================ */
.admin-detail-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

/* ============================================
   管理画面：詳細パネル
   ============================================ */
.order-detail {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.order-detail__header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg);
}

.order-detail__header h2 {
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-text);
}

/* confirm.phpサムネイルグリッド */
.confirm-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.detail-section-title {
  font-size: 0.85rem;
  color: var(--color-text-sub);
  margin-bottom: 12px;
  font-weight: bold;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

/* 管理画面サムネイルグリッド */
.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.detail-thumb-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.detail-thumb-item__img {
  width: 100%;
  aspect-ratio: 1;
  background: #e0e0e0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #aaa;
  border: 1px solid var(--color-border);
}

.detail-thumb-item__label {
  font-size: 0.7rem;
  color: var(--color-text-sub);
  text-align: center;
  line-height: 1.3;
}

.detail-thumb-item__value {
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--color-text);
  text-align: center;
  line-height: 1.3;
}

/* 店舗用備考 */
.admin-remarks-block {
  margin-top: 20px;
  padding: 16px;
  background: #fffbf0;
  border: 1px dashed #e0c050;
  border-radius: var(--radius);
}

.admin-remarks-block__title {
  font-size: 0.85rem;
  font-weight: bold;
  color: #7a6020;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-remarks-block__title::before {
  content: '🔒';
  font-size: 0.9rem;
}

/* ============================================
   ラジオ（シンプル）
   ============================================ */
.radio-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.radio-item input[type="radio"] {
  accent-color: var(--color-accent);
  width: 16px;
  height: 16px;
}

/* ============================================
   スクロールトップボタン
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--color-admin-bg);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: background 0.2s;
  z-index: 200;
}

.back-to-top:hover {
  background: var(--color-accent);
}

/* ============================================
   ログイン画面
   ============================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}

.login-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px 48px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
}

.login-box__logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-box__logo p {
  font-size: 0.85rem;
  color: var(--color-text-sub);
  margin-top: 8px;
}

/* ============================================
   アラートメッセージ
   ============================================ */
.alert-error {
  background: #fff0f0;
  border: 1px solid #ffaaaa;
  border-radius: var(--radius);
  padding: 10px 16px;
  margin-bottom: 16px;
  font-size: 0.88rem;
  color: var(--color-accent);
}

.alert-success {
  background: #f0fff4;
  border: 1px solid #6dd09a;
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 16px;
  color: #2e7d32;
  font-size: 0.9rem;
}

/* ============================================
   フォーム設定
   ============================================ */

/* タブ */
.fs-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 16px 20px 0;
  border-bottom: 2px solid var(--color-border-light);
}

.fs-tab {
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: bold;
  color: var(--color-text-sub);
  text-decoration: none;
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.15s;
  background: var(--color-bg);
  margin-bottom: -2px;
}

.fs-tab:hover {
  color: var(--color-text);
  background: var(--color-surface);
}

.fs-tab.is-active {
  color: var(--color-accent);
  background: var(--color-surface);
  border-color: var(--color-border-light);
  border-bottom-color: var(--color-surface);
}

/* 本体 */
.fs-body {
  padding: 24px 20px;
}

.fs-field-title {
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fs-note {
  font-size: 0.78rem;
  font-weight: normal;
  color: var(--color-text-sub);
}

/* 選択肢テーブル */
.fs-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.fs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.fs-table th {
  padding: 10px 14px;
  text-align: left;
  background: var(--color-bg);
  color: var(--color-text-sub);
  font-weight: bold;
  border-bottom: 2px solid var(--color-border-light);
  white-space: nowrap;
}

.fs-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: middle;
}

.fs-table tr:last-child td {
  border-bottom: none;
}

.fs-row--inactive td {
  opacity: 0.45;
}

.fs-label-text {
  font-weight: bold;
  color: var(--color-text);
}

/* サムネイル */
.fs-thumb-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  display: block;
}

.fs-no-image {
  font-size: 0.75rem;
  color: #ccc;
}

/* 並び替えボタン列 */
.fs-sort-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

/* ボタン類 */
.fs-btn {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}

.fs-btn:hover { opacity: 0.75; }

.fs-btn--move {
  background: #e8e8e8;
  color: #444;
  padding: 2px 8px;
  font-size: 0.85rem;
}

.fs-btn--edit {
  background: var(--color-admin-bg);
  color: #fff;
}

.fs-btn--delete {
  background: var(--color-accent);
  color: #fff;
}

.fs-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* 表示/非表示トグル */
.fs-toggle-btn {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: bold;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s;
}

.fs-toggle-btn:hover { opacity: 0.75; }

.fs-toggle-btn--on {
  background: #d1fae5;
  color: #065f46;
}

.fs-toggle-btn--off {
  background: #f3f4f6;
  color: #666;
}

/* インライン編集フォーム */
.fs-edit-form {
  background: #fff8f8;
  border: 1px solid #ffcccc;
  border-radius: var(--radius);
  padding: 12px;
}

/* 新規追加フォーム */
.fs-add-form {
  border-top: 2px dashed var(--color-border-light);
  padding-top: 20px;
  margin-top: 4px;
}

.fs-add-title {
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--color-text);
  margin-bottom: 12px;
}

/* ============================================
   バリデーションエラー
   ============================================ */
.form-section.has-error {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.12), var(--shadow);
}

.form-section.has-error .section-hero__placeholder-text {
  color: var(--color-accent);
  font-weight: bold;
}

.field-error-msg {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--color-accent);
  display: none;
}

.form-section.has-error .field-error-msg,
.validate-group.has-error .field-error-msg {
  display: block;
}

.validate-group.has-error > .form-label,
.validate-group.has-error > label {
  color: var(--color-accent);
}

/* お客様情報内：全幅アイテム */
.customer-info__full {
  grid-column: 1 / -1;
}

/* ============================================
   レスポンシブ
   ============================================ */
@media (max-width: 768px) {
  .page-container {
    padding: 20px 12px 60px;
  }

  .form-section__body {
    padding: 20px 12px;
  }

  .section-hero {
    /* width: autoにすることでネガティブマージンが両側に効き全幅になる */
    width: auto;
    margin-left: -12px;
    margin-right: -12px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .section-hero__img-area {
    min-height: 260px;
  }

  .option-cards {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .option-cards--wide {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    padding: 12px 0;
  }

  .admin-sidebar__nav {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar__nav a {
    white-space: nowrap;
    padding: 10px 16px;
    border-left: none;
    border-bottom: 3px solid transparent;
  }

  .admin-sidebar__nav a:hover,
  .admin-sidebar__nav a.active {
    border-bottom-color: var(--color-accent);
    border-left-color: transparent;
  }

  .admin-topbar {
    padding: 0 14px;
    height: 48px;
  }

  .admin-topbar span {
    display: none;
  }

  .admin-content {
    padding: 14px 10px;
  }

  .admin-detail-grid {
    grid-template-columns: 1fr;
    padding: 16px 12px;
    gap: 20px;
  }

  .orders-table {
    font-size: 0.78rem;
  }

  .orders-table th,
  .orders-table td {
    padding: 8px 8px;
  }

  .admin-card__header {
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 6px;
  }

  .fs-tabs {
    padding: 12px 12px 0;
    gap: 3px;
  }

  .fs-tab {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  .fs-body {
    padding: 16px 12px;
  }

  .summary-cell__thumb {
    width: 36px;
    height: 36px;
  }
}
