:root {
  --main: #2563eb;
  --main-dark: #1d4ed8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f3f4f6;
}

* { box-sizing: border-box; }

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

.container { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--main); font: inherit; font-size: 0.9rem; font-weight: bold;
  text-decoration: none; text-align: center; cursor: pointer; line-height: 1.5;
}
.btn-primary { background: var(--main); color: #fff; }
.btn-primary:hover { background: var(--main-dark); }
.btn-outline { background: #fff; color: var(--main); }
.btn-outline:hover { background: #eff6ff; }
.btn-lg { padding: 12px 32px; font-size: 1rem; }
.btn-block { display: block; width: 100%; padding: 12px; font-size: 1rem; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid var(--border);
}
.header-inner { position: relative; display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { display: block; width: auto; height: 38px; }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav > a { color: var(--text); text-decoration: none; }
.site-nav > a:hover { color: var(--main); }
.nav-auth { display: flex; align-items: center; gap: 12px; }
.nav-auth form { margin: 0; }
.nav-user { color: var(--text); text-decoration: none; font-weight: bold; }
.nav-user:hover { color: var(--main); }

/* ハンバーガーボタン(PC では非表示) */
.menu-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  border: none; background: none; cursor: pointer;
}
.menu-toggle span {
  display: block; height: 2px; margin: 5px 0; background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- スマートフォン(768px 以下) ---------- */
@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute; top: 64px; left: -16px; right: -16px;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 20px; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  }
  .site-nav.is-open { display: flex; }
  .site-nav > a { padding: 14px 4px; border-bottom: 1px solid var(--border); }

  .nav-auth { flex-direction: column; align-items: stretch; gap: 10px; margin-top: 16px; }
  .nav-auth .btn { display: block; width: 100%; padding: 12px; font-size: 1rem; }
  .nav-user { padding: 4px; }
}

/* ---------- お知らせ ---------- */
.flashes { padding-top: 16px; }
.flash { margin: 0 0 8px; padding: 12px 16px; border-radius: 8px; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }

/* ---------- メインビジュアル ---------- */
.hero { padding: 96px 0; text-align: center; background: linear-gradient(135deg, #eff6ff, #e0e7ff); }
.hero h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); margin: 0 0 16px; line-height: 1.4; }
.lead { color: var(--muted); margin-bottom: 32px; }

/* ---------- 特徴 ---------- */
.features, .status { padding: 72px 0; }
h2 { text-align: center; margin: 0 0 40px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { padding: 24px; border-radius: 12px; background: var(--bg-soft); }
.card h3 { margin-top: 0; color: var(--main); }

/* ---------- 稼働状況 ---------- */
.status { background: var(--bg-soft); text-align: center; }
.badge { display: inline-block; padding: 8px 20px; border-radius: 999px; background: #fff; }
.badge.ok { color: #16a34a; }
.badge.ng { color: #dc2626; }

/* ---------- ログイン・登録フォーム ---------- */
.auth { padding: 56px 16px; }
.auth-card {
  max-width: 420px; margin: 0 auto; padding: 32px 24px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.auth-card h1 { margin: 0 0 24px; font-size: 1.5rem; text-align: center; }
.auth-card label { display: block; margin: 16px 0 6px; font-size: 0.9rem; font-weight: bold; }
.auth-card input[type="text"],
.auth-card input[type="password"] {
  width: 100%; padding: 12px; font: inherit; font-size: 16px; /* iPhone で自動ズームしない */
  border: 1px solid var(--border); border-radius: 8px;
}
.auth-card input:focus { outline: 2px solid var(--main); outline-offset: 1px; border-color: transparent; }
.auth-card .btn-block { margin-top: 24px; }
.auth-switch { margin: 20px 0 0; text-align: center; font-size: 0.9rem; color: var(--muted); }
.auth-switch a { color: var(--main); }

.profile { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; margin: 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; font-weight: bold; }

/* ---------- フッター ---------- */
.site-footer { padding: 24px 0; text-align: center; color: var(--muted); font-size: 0.875rem; }

/* =========================================================
   予約・管理画面
   ========================================================= */
.muted { color: var(--muted); }
.btn-sm { padding: 6px 14px; font-size: 0.85rem; }
.btn-danger { background: #fff; color: #dc2626; border-color: #fca5a5; }
.btn-danger:hover { background: #fef2f2; }
.btn:disabled, .btn.is-disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.btn-block + .btn-block { margin-top: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.page { padding: 32px 0 72px; }
.narrow { max-width: 820px; }
.page-title { font-size: 1.5rem; margin: 0 0 20px; }
.sub-title { font-size: 1.1rem; margin: 32px 0 12px; }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); background: var(--bg-soft); border-radius: 12px; }
.empty a { color: var(--main); }
.next-reservation { padding: 12px 16px; background: #eff6ff; border-radius: 8px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: bold; white-space: nowrap; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-gray { background: #e5e7eb; color: #4b5563; }
.nowrap { white-space: nowrap; }

/* ---------- ステップ表示 ---------- */
.steps { display: flex; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: step; }
.steps li { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 0.8rem; }
.steps li + li::before {
  content: ""; position: absolute; top: 14px; right: 50%; width: 100%; height: 2px; background: var(--border); z-index: -1;
}
.steps li.is-done + li::before, .steps li.is-current::before { background: var(--main); }
.step-num {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border); font-weight: bold;
}
.steps .is-current { color: var(--main); font-weight: bold; }
.steps .is-current .step-num { background: var(--main); border-color: var(--main); color: #fff; }
.steps .is-done .step-num { border-color: var(--main); color: var(--main); }

/* ---------- 選択中の内容 ---------- */
.summary { margin-bottom: 24px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.summary-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.summary-row + .summary-row { border-top: 1px solid var(--border); }
.summary-label { flex: 0 0 72px; color: var(--muted); font-size: 0.85rem; }
.summary-value { flex: 1; font-weight: bold; }
.summary-value small { display: block; font-weight: normal; color: var(--muted); }
.summary-change { color: var(--main); font-size: 0.85rem; white-space: nowrap; }

/* ---------- メニュー一覧 ---------- */
.menu-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff;
}
.menu-item:hover { border-color: var(--main); }
.menu-name { margin: 0 0 4px; font-size: 1.1rem; }
.menu-desc { margin: 0 0 8px; color: var(--muted); font-size: 0.9rem; }
.menu-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; }
.price { font-size: 1.2rem; font-weight: bold; color: #db2777; }
.price small { margin-left: 8px; font-size: 0.75rem; font-weight: normal; color: var(--muted); }
.duration { color: var(--muted); font-size: 0.85rem; }
.menu-item .btn { flex-shrink: 0; }

/* ---------- スタッフ一覧 ---------- */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.staff-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  color: var(--text); text-decoration: none; text-align: center;
}
.staff-card:hover { border-color: var(--main); box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1); }
.staff-any { background: var(--bg-soft); }
.avatar {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #dbeafe, #fce7f3); font-size: 1.75rem; font-weight: bold; color: var(--main);
}
.staff-name { font-weight: bold; font-size: 1.05rem; }
.staff-title { font-size: 0.8rem; color: #db2777; }
.staff-profile { flex: 1; font-size: 0.85rem; color: var(--muted); }
.staff-card .btn { margin-top: 8px; }

/* ---------- 日時選択の表 ---------- */
.week-nav, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.week-range { font-weight: bold; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 12px; font-size: 0.85rem; color: var(--muted); }
.slot-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; -webkit-overflow-scrolling: touch; }
.slot-table { width: 100%; min-width: 520px; border-collapse: collapse; text-align: center; }
.slot-table th, .slot-table td { padding: 0; border-bottom: 1px solid var(--border); border-left: 1px solid var(--border); }
.slot-table thead th { padding: 8px 4px; background: var(--bg-soft); font-size: 0.85rem; line-height: 1.3; }
.slot-table thead th small { color: var(--muted); }
.slot-table th.sat, .slot-table th.sat small { color: #2563eb; }
.slot-table th.sun, .slot-table th.sun small { color: #dc2626; }
.slot-table .time-col {
  position: sticky; left: 0; z-index: 1; width: 64px; padding: 0 8px;
  background: var(--bg-soft); border-left: none; font-size: 0.85rem; font-weight: normal;
}
.slot-table tbody tr:last-child > * { border-bottom: none; }
.slot { display: block; padding: 8px 0; font-weight: bold; line-height: 1.5; text-decoration: none; }
.legend .slot { display: inline; padding: 0; }
.slot.open { color: #db2777; }
a.slot.open:hover { background: #fdf2f8; }
.slot.full { color: #9ca3af; }
.slot.closed { color: #d1d5db; font-weight: normal; }

/* ---------- 確認画面 ---------- */
.confirm-card { padding: 24px; border: 1px solid var(--border); border-radius: 12px; }
.confirm-list { display: grid; grid-template-columns: 96px 1fr; gap: 14px 16px; margin: 0 0 24px; }
.confirm-list dt { color: var(--muted); }
.confirm-list dd { margin: 0; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- フォーム共通 ---------- */
.field { margin: 0 0 16px; padding: 0; border: none; min-width: 0; }
.field label, .field legend { display: block; margin-bottom: 6px; padding: 0; font-size: 0.9rem; font-weight: bold; }
.field input[type="text"], .field input[type="number"], .field input[type="date"],
.field input[type="time"], .field select, .field textarea, .date-form input {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 16px; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--main); outline-offset: 1px; border-color: transparent; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span {
  display: inline-block; min-width: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px;
  text-align: center; font-size: 0.9rem; font-weight: normal; background: #fff;
}
.chip input:checked + span { background: var(--main); border-color: var(--main); color: #fff; font-weight: bold; }
.chip input:focus-visible + span { outline: 2px solid var(--main); outline-offset: 2px; }
.chip-sat span { color: #2563eb; }
.chip-sun span { color: #dc2626; }

/* ---------- 予約確認 ---------- */
.reservation-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.reservation-card { padding: 16px 20px; border: 1px solid var(--border); border-left: 4px solid #db2777; border-radius: 12px; }
.reservation-card.is-past { border-left-color: var(--border); color: var(--muted); }
.reservation-card p { margin: 0 0 6px; }
.reservation-date { font-weight: bold; font-size: 1.05rem; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; color: var(--text); }
.reservation-note { font-size: 0.85rem; color: var(--muted); }
.reservation-card form { margin-top: 10px; }

/* ---------- 管理画面 ---------- */
.admin-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.admin-tabs a {
  padding: 10px 16px; color: var(--muted); text-decoration: none; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.admin-tabs a:hover { color: var(--main); }
.admin-tabs a.is-active { color: var(--main); font-weight: bold; border-bottom-color: var(--main); }
.panel { margin-bottom: 24px; padding: 24px; border: 1px solid var(--border); border-radius: 12px; }
.panel-title { margin: 0 0 8px; font-size: 1.15rem; text-align: left; }
.panel .form { margin-top: 16px; }
.date-form { margin: 0; }
.date-form input { width: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px; border-radius: 12px; background: var(--bg-soft); }
.stat-label { display: block; font-size: 0.85rem; color: var(--muted); }
.stat-value { font-size: 1.5rem; font-weight: bold; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.data-table th { background: var(--bg-soft); font-weight: bold; white-space: nowrap; }
.data-table form { margin: 0; }
.data-table tr.is-cancelled td { color: #9ca3af; }

/* ---------- スマートフォン ---------- */
@media (max-width: 640px) {
  .page-title { font-size: 1.3rem; }
  .menu-item { flex-direction: column; align-items: stretch; }
  .menu-item .btn { width: 100%; padding: 12px; }
  .staff-grid { grid-template-columns: 1fr; }
  .staff-card { flex-direction: row; flex-wrap: wrap; text-align: left; gap: 4px 12px; }
  .staff-card .avatar { width: 56px; height: 56px; font-size: 1.4rem; }
  .staff-card .staff-name { flex: 1; }
  .staff-card .staff-title, .staff-card .staff-profile { flex-basis: 100%; }
  .staff-card .btn { width: 100%; margin-top: 4px; }
  .week-range { font-size: 0.9rem; }
  .confirm-card, .panel { padding: 16px; }
  .confirm-list { grid-template-columns: 80px 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
}

/* =========================================================
   ブログ
   ========================================================= */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head .page-title { margin: 0; }
.page-head-actions { display: flex; gap: 8px; }

.post-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.post-card { padding: 20px 24px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.post-card:hover { border-color: var(--main); }
.post-card-compact { padding: 16px 20px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 6px; font-size: 0.85rem; color: var(--muted); }
.post-card-title { margin: 0 0 8px; font-size: 1.2rem; line-height: 1.5; text-align: left; }
.post-card-title a { color: var(--text); text-decoration: none; }
.post-card-title a:hover { color: var(--main); }
.post-excerpt { margin: 0 0 8px; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.read-more { color: var(--main); font-size: 0.9rem; text-decoration: none; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }

.post { padding: 8px 0; }
.post-header { margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.post-header p { margin: 0 0 8px; }
.post-title { margin: 0 0 12px; font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.4; }
.post-updated { font-size: 0.8rem; }
.post-body { font-size: 1.05rem; line-height: 1.9; overflow-wrap: anywhere; }
.post-body p { margin: 0 0 1.4em; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.post-actions form { margin: 0; }
.post > .post-actions { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.back-link { margin-top: 32px; }
.back-link a { color: var(--main); text-decoration: none; }
.post-form .field textarea { min-height: 320px; line-height: 1.8; }

@media (max-width: 640px) {
  .post-card { padding: 16px; }
  .post-body { font-size: 1rem; }
}

/* =========================================================
   ブログの画像
   ========================================================= */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.field-label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: bold; }

.post-figure { margin: 0 0 1.4em; }
.post-figure img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }

.post-card.has-thumb { display: flex; gap: 20px; align-items: flex-start; }
.post-card-body { flex: 1; min-width: 0; }
.post-thumb { flex: 0 0 180px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--bg-soft); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 640px) {
  .post-card.has-thumb { flex-direction: column; }
  .post-thumb { flex-basis: auto; width: 100%; aspect-ratio: 16 / 9; }
}

/* =========================================================
   ブログのエディタと本文の装飾
   ========================================================= */
.editor-wrap { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.editor-wrap .ql-toolbar.ql-snow {
  position: sticky; top: 64px; z-index: 5; background: #fff;
  border: none; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; font-family: inherit;
}
.editor-wrap .ql-container.ql-snow { border: none; font-family: inherit; font-size: 1rem; }
.editor-wrap .ql-editor { min-height: 360px; line-height: 1.9; padding: 16px; }
.editor-wrap .ql-editor.ql-blank::before { font-style: normal; color: #9ca3af; }
.editor-wrap .ql-editor img { max-width: 100%; height: auto; border-radius: 6px; }
.editor-wrap:focus-within { outline: 2px solid var(--main); outline-offset: 1px; }
.editor-status { min-height: 1.2em; margin: 6px 0 0; font-size: 0.85rem; }
.editor-status.is-busy { color: var(--main); }
.editor-status.is-ok { color: #15803d; }
.editor-status.is-error { color: #b91c1c; }
.editor-help { margin: 4px 0 0; font-size: 0.8rem; color: var(--muted); }

/* 記事ページの装飾(エディタと同じ見た目にする) */
.post-body h2 { margin: 1.8em 0 0.6em; padding-bottom: 0.3em; font-size: 1.4rem; text-align: left; border-bottom: 2px solid var(--border); }
.post-body h3 { margin: 1.5em 0 0.5em; font-size: 1.2rem; }
.post-body ul, .post-body ol { margin: 0 0 1.4em; padding-left: 1.6em; }
.post-body li { margin: 0.2em 0; }
.post-body blockquote { margin: 0 0 1.4em; padding: 0.6em 1em; border-left: 4px solid #cbd5e1; background: var(--bg-soft); color: #4b5563; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body pre { margin: 0 0 1.4em; padding: 12px 16px; overflow-x: auto; border-radius: 8px; background: #1f2937; color: #f9fafb; font-size: 0.9rem; }
.post-body a { color: var(--main); }
.post-body img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 8px; }
.post-body p:has(> img:only-child) { margin-bottom: 1.4em; }
.post-body .ql-align-center { text-align: center; }
.post-body .ql-align-right { text-align: right; }
.post-body .ql-align-justify { text-align: justify; }
.post-body li.ql-indent-1 { margin-left: 1.5em; }
.post-body li.ql-indent-2 { margin-left: 3em; }
.post-body li.ql-indent-3 { margin-left: 4.5em; }

@media (max-width: 768px) {
  .editor-wrap .ql-toolbar.ql-snow { top: 64px; }
  .editor-wrap .ql-editor { min-height: 280px; }
}

/* 関連項目 */
.post-related { margin-top: 32px; padding: 16px 20px; border-radius: 12px; background: var(--bg-soft); }
.post-related-title { margin: 0 0 6px; font-size: 0.9rem; text-align: left; color: var(--muted); }
.post-related p { margin: 0; overflow-wrap: anywhere; }

/* =========================================================
   スポーツ新聞(記事ページ)
   ========================================================= */
.sp-page { background: #d9d4c7; }
.sp-paper {
  --ink: #111;
  --paper: #fbf9f3;
  --red: #5f5f5f;      /* 元は赤 */
  --yellow: #e2e2e2;   /* 元は黄色 */
  --blue: #f2f2f2;     /* 元は青。一番薄いグレー */
  --dots: radial-gradient(circle, var(--ink) 1.1px, transparent 1.5px) 0 0 / 7px 7px, var(--blue);   /* 黒のドット柄 */
  --halo: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff;   /* ドットの上でも文字が読めるように白いふち */
  --rule: #bdb6a6;
  --heavy: "Dela Gothic One", "Zen Kaku Gothic New", "Hiragino Sans", sans-serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  padding: 0 0 20px; color: var(--ink); background: var(--paper); font-family: var(--mincho);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 18px 44px rgba(0, 0, 0, 0.14);
  font-feature-settings: "palt" 1;
  overflow: hidden;
}
.sp-paper > *:not(.sp-masthead):not(.sp-ticker) { margin-left: 32px; margin-right: 32px; }

/* ---------- 題字 ---------- */
.sp-masthead {
  display: flex; align-items: stretch; justify-content: space-between; gap: 16px;
  border-bottom: 6px solid var(--ink);
}
.sp-logo {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px 12px 32px;
  background: var(--red); color: #fff; font-family: var(--heavy);
  clip-path: polygon(0 0, 100% 0, calc(100% - 28px) 100%, 0 100%);
  padding-right: 60px;
}
.sp-logo-main { font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1; letter-spacing: -0.02em; text-shadow: 4px 4px 0 var(--ink); }
.sp-logo-main em { font-style: normal; color: var(--yellow); }
.sp-logo-sub {
  writing-mode: vertical-rl; padding: 6px 4px; background: var(--yellow); color: var(--ink);
  font-size: clamp(0.9rem, 2vw, 1.3rem); letter-spacing: 0.1em; line-height: 1;
}
.sp-masthead-info {
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 4px;
  padding: 10px 32px 10px 0; font-family: var(--gothic); text-align: right;
}
.sp-masthead-info p { margin: 0; }
.sp-date { font-size: 0.95rem; font-weight: 700; }
.sp-date strong { margin: 0 2px; font-family: var(--heavy); font-size: 2rem; font-weight: 400; line-height: 1; }
.sp-date span {
  display: inline-grid; place-items: center; width: 1.9em; height: 1.9em; margin-left: 8px; vertical-align: 0.2em;
  background: var(--ink); color: #fff; border-radius: 50%; font-size: 0.85rem;
}
.sp-issue { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; color: #555; }
.sp-draft { padding: 2px 8px; background: var(--ink); color: var(--yellow); font-size: 0.75rem; font-weight: 700; }

/* ---------- 速報帯 ---------- */
.sp-ticker {
  display: flex; align-items: center; overflow: hidden;
  background: var(--ink); color: #fff; font-family: var(--gothic); font-weight: 700; font-size: 0.9rem;
}
.sp-ticker-label {
  flex: 0 0 auto; padding: 6px 16px 6px 32px; background: var(--yellow); color: var(--red);
  font-family: var(--heavy); font-weight: 400; letter-spacing: 0.2em;
}
.sp-ticker-text { display: flex; gap: 0; padding: 6px 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-ticker-text span + span::before { content: "◆"; margin: 0 0.9em; color: var(--yellow); font-size: 0.75em; vertical-align: 0.1em; }

/* ---------- 1面の見出し ---------- */
.sp-front { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; margin-top: 26px; }
.sp-front.has-side { grid-template-columns: minmax(0, 1fr) auto; }
.sp-heads { position: relative; min-width: 0; }
.sp-kicker {
  display: inline-block; margin: 0 0 10px; padding: 4px 16px 4px 12px;
  background: var(--dots); color: var(--ink); text-shadow: var(--halo); font-family: var(--heavy); font-size: 1.1rem; letter-spacing: 0.1em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.sp-headline {
  margin: 0; text-align: left;
  font-family: var(--heavy); font-weight: 400; font-size: clamp(2.4rem, 6.6vw, 5.4rem); line-height: 1.2; letter-spacing: -0.01em;
}
.sp-headline span {
  padding: 0.02em 0.18em; background: var(--red); color: #fff;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  text-shadow: 3px 3px 0 var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.sp-burst {
  position: absolute; right: -6px; top: -18px; display: grid; place-items: center;
  width: 108px; height: 108px; background: var(--yellow); color: var(--red);
  font-family: var(--heavy); font-size: 0.95rem; line-height: 1.1; text-align: center; transform: rotate(10deg);
  clip-path: polygon(50% 0, 61% 18%, 82% 9%, 79% 31%, 100% 38%, 84% 53%, 97% 72%, 75% 74%, 70% 96%, 52% 83%,
                     33% 98%, 27% 76%, 4% 76%, 16% 57%, 0 40%, 21% 31%, 17% 9%, 38% 17%);
}
.sp-side-head {
  margin: 0; padding: 14px 10px; writing-mode: vertical-rl; max-inline-size: 11em; align-self: start;
  background: var(--ink); color: var(--yellow); font-family: var(--heavy); font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.25; letter-spacing: 0.04em; border-right: 8px solid var(--red);
}

.sp-lead {
  margin: 26px 0 0; padding: 16px 18px; border: 3px solid var(--ink); border-left: 12px solid var(--red);
  background: #fff; font-family: var(--gothic); font-size: clamp(1.05rem, 1.8vw, 1.25rem); font-weight: 900; line-height: 1.8;
}
.sp-ai {
  display: inline-block; margin-left: 10px; padding: 1px 8px; vertical-align: 0.15em;
  background: var(--ink); color: var(--yellow); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em;
}
.sp-byline {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 16px; margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 2px solid var(--ink); font-family: var(--gothic); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; color: #444;
}

/* ---------- 本文:細い段組み、写真は段をまたいで大きく ---------- */
.sp-body {
  column-count: 3; column-gap: 26px; column-rule: 1px solid var(--rule);
  font-size: 1rem; line-height: 1.85; text-align: justify; font-weight: 500;
}
.sp-body > p:first-child::first-letter {
  float: left; margin: 0.08em 0.12em 0 0; padding: 0.08em 0.12em;
  background: var(--ink); color: #fff; font-family: var(--heavy); font-size: 2.6em; line-height: 1;
}
.sp-body-lead > p:first-child { font-family: var(--gothic); font-weight: 900; }
.sp-body p { margin: 0 0 0.9em; }
.sp-body p + p { text-indent: 1em; }
.sp-body img {
  display: block; max-width: 100%; height: auto; border-radius: 0;
  border: 4px solid var(--ink); box-shadow: 4px 4px 0 var(--red);
}
.sp-body h2, .sp-body h3 { break-after: avoid; margin: 1em 0 0.5em; padding: 0; border: none; text-align: left; line-height: 1.35; }
.sp-body h2 {
  padding: 4px 10px; background: var(--ink); color: #fff;
  font-family: var(--heavy); font-weight: 400; font-size: 1.35rem;
}
.sp-body h3 {
  padding-left: 10px; border-left: 6px solid var(--red);
  font-family: var(--gothic); font-weight: 900; font-size: 1.15rem;
}
.sp-body blockquote {
  break-inside: avoid; margin: 1em 0; padding: 10px 14px; border: none; background: var(--yellow); color: var(--ink);
  font-family: var(--gothic); font-size: 1.1rem; font-weight: 900; line-height: 1.7;
}
.sp-body blockquote::before { content: "“"; display: block; height: 0.6em; font-family: var(--heavy); font-size: 2.4em; line-height: 1; color: var(--red); }
.sp-body strong { background: linear-gradient(transparent 55%, var(--yellow) 55%); }
.sp-body ul, .sp-body ol { padding-left: 1.4em; }
.sp-body a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* ---------- 解説面 ---------- */
.sp-desk { margin-top: 34px; }
.sp-desk-title {
  display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 0; text-align: left; border: none;
}
.sp-desk-title span {
  padding: 6px 22px 6px 14px; background: var(--dots); color: var(--ink);
  font-family: var(--heavy); font-weight: 400; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: 0.08em;
  clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); text-shadow: 3px 3px 0 #fff, var(--halo);
}
.sp-desk-title small {
  padding: 4px 12px; background: var(--yellow); color: var(--red);
  font-family: var(--heavy); font-size: 1rem; transform: rotate(-4deg);
}

.sp-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.sp-column { border: 3px solid var(--ink); background: #fff; box-shadow: 5px 5px 0 var(--ink); }
.sp-column-tab {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 6px 12px;
  background: var(--ink); color: #fff; font-family: var(--gothic); font-size: 0.9rem; font-weight: 900; letter-spacing: 0.1em;
}
.sp-column:nth-child(3n+1) .sp-column-tab { background: var(--red); }
.sp-column:nth-child(3n+2) .sp-column-tab { background: var(--dots); color: var(--ink); text-shadow: var(--halo); }
.sp-column-tab b {
  display: inline-grid; place-items: center; flex: 0 0 auto; width: 1.8em; height: 1.8em; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-family: var(--heavy); font-weight: 400; letter-spacing: 0;
}
.sp-column-heading {
  margin: 12px 14px 8px; text-align: left; font-family: var(--heavy); font-weight: 400; font-size: 1.3rem; line-height: 1.4;
}
.sp-column-body { margin: 0 14px 16px; font-size: 0.95rem; line-height: 1.9; text-align: justify; text-indent: 1em; }

.sp-glossary { margin-top: 26px; padding: 16px 18px; background: var(--yellow); border: 3px solid var(--ink); }
.sp-glossary-title {
  display: inline-block; margin: 0 0 12px; padding: 3px 12px; background: var(--red); color: #fff;
  font-family: var(--heavy); font-weight: 400; font-size: 1.15rem; letter-spacing: 0.1em; text-align: left;
}
.sp-glossary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 24px; margin: 0; }
.sp-glossary dt { font-family: var(--gothic); font-size: 1.05rem; font-weight: 900; }
.sp-glossary dt::before { content: "▶"; margin-right: 4px; color: var(--red); font-size: 0.8em; }
.sp-glossary dd { margin: 2px 0 0; font-size: 0.9rem; line-height: 1.8; }

.sp-related {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; margin-bottom: 0; font-family: var(--gothic);
}
.sp-related-label { margin-right: 4px; padding: 3px 10px; background: var(--ink); color: #fff; font-size: 0.8rem; font-weight: 900; letter-spacing: 0.2em; }
.sp-tag { padding: 3px 12px; border: 2px solid var(--ink); background: #fff; font-size: 0.9rem; font-weight: 900; }
.sp-tag::before { content: "#"; margin-right: 2px; color: var(--red); }

.sp-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; margin-bottom: 0;
  padding-top: 14px; border-top: 2px solid var(--ink); font-family: var(--gothic);
}
.sp-category { padding: 3px 12px; background: var(--dots); color: var(--ink); text-shadow: var(--halo); border: 2px solid var(--ink); font-size: 0.9rem; font-weight: 900; }
.sp-note { margin-top: 12px; margin-bottom: 0; font-family: var(--gothic); font-size: 0.72rem; line-height: 1.7; color: #666; }
.sp-pending { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; font-family: var(--gothic); font-size: 0.9rem; font-weight: 700; }
.spinner {
  flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--rule, #ccc); border-top-color: var(--red, #333); animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.sp-editor-note { margin-top: 20px; padding: 12px 14px; border: 2px dashed var(--rule); font-family: var(--gothic); font-size: 0.85rem; }
.sp-editor-note p { margin: 0 0 8px; }
.sp-editor-note form { margin: 0; }
.sp-error { color: var(--red); font-weight: 700; }

.sp-colophon {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-top: 26px; padding-top: 8px;
  border-top: 6px solid var(--red); font-family: var(--gothic); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.2em;
}
.sp-actions { margin-top: 20px; }
.sp-page .back-link { margin-top: 16px; }

/* ---------- 画面幅に合わせる ---------- */
@media (max-width: 900px) {
  .sp-body { column-count: 2; }
  .sp-front.has-side { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .sp-side-head { writing-mode: horizontal-tb; max-inline-size: none; padding: 8px 12px; border-right: none; border-left: 8px solid var(--red); }
}
@media (max-width: 640px) {
  .sp-page .container { padding: 0 8px; }
  .sp-paper > *:not(.sp-masthead):not(.sp-ticker) { margin-left: 14px; margin-right: 14px; }
  .sp-masthead { flex-direction: column; gap: 0; }
  .sp-logo { padding: 12px 48px 10px 14px; clip-path: none; justify-content: space-between; }
  .sp-masthead-info { align-items: flex-start; padding: 8px 14px; text-align: left; }
  .sp-ticker-label { padding-left: 14px; }
  .sp-headline { font-size: clamp(2rem, 9vw, 2.8rem); }
  .sp-burst { width: 78px; height: 78px; font-size: 0.72rem; top: -12px; right: -4px; }
  .sp-kicker { margin-right: 70px; }
  .sp-body { column-count: 1; }
  .sp-body img { box-shadow: 5px 5px 0 var(--red); }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* AI 情報収集のオン/オフ */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; padding: 3px; background: var(--bg-soft); }
.segmented label { position: relative; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: inline-block; min-width: 72px; padding: 6px 18px; border-radius: 999px; text-align: center; font-size: 0.9rem; color: var(--muted); }
.segmented input:checked + span { background: var(--main); color: #fff; font-weight: bold; }
.segmented input[value="0"]:checked + span { background: #4b5563; }
.segmented input:focus-visible + span { outline: 2px solid var(--main); outline-offset: 2px; }
.field-help { margin: 8px 0 0; font-size: 0.8rem; line-height: 1.7; color: var(--muted); }
.field-help strong { color: #b45309; }

/* カテゴリとタグ(投稿画面・一覧) */
.field-row-tags { display: grid; grid-template-columns: 1fr 2fr; gap: 0 16px; }
@media (max-width: 640px) { .field-row-tags { grid-template-columns: 1fr; } }
.post-category {
  display: inline-block; margin-right: 8px; padding: 1px 10px; border-radius: 999px;
  background: var(--main); color: #fff; font-size: 0.75rem; font-weight: bold;
}
.post-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 8px; font-size: 0.8rem; color: var(--muted); }

/* =========================================================
   ギャラリー(ホワイトキューブ)
   ========================================================= */
.cube {
  --ink: #0d0d0d;
  --gray: #8a8a8a;
  --line: #0d0d0d;
  --wall: #f4f4f2;
  --sans: "Archivo", "Zen Kaku Gothic New", "Helvetica Neue", Arial, sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  padding: 48px 0 96px; background: #fff; color: var(--ink); font-family: var(--jp);
}

/* ---------- タイトル ---------- */
.cube-head {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; align-items: end;
  padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.cube-kicker {
  grid-column: 1 / -1; margin: 0; font-family: var(--sans); font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.cube-kicker::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--ink); }
.cube-title {
  margin: 0; text-align: left; font-family: var(--sans); font-weight: 800; text-transform: uppercase;
  font-size: clamp(3.4rem, 10vw, 8.5rem); line-height: 0.86; letter-spacing: -0.045em;
}
.cube-facts { margin: 0; font-size: 0.85rem; }
.cube-facts div { display: grid; grid-template-columns: 5.5em 1fr; padding: 9px 0; border-top: 1px solid #d8d8d8; }
.cube-facts div:last-child { border-bottom: 1px solid #d8d8d8; }
.cube-facts dt { color: var(--gray); font-size: 0.75rem; letter-spacing: 0.1em; }
.cube-facts dd { margin: 0; font-family: var(--sans); font-weight: 500; letter-spacing: 0.02em; }

/* ---------- 展示室 ---------- */
.cube-rooms {
  display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 16px 0; margin-bottom: 56px; border-bottom: 1px solid #d8d8d8;
  font-family: var(--sans); font-size: 0.95rem; font-weight: 500;
}
.cube-rooms a { position: relative; color: var(--gray); text-decoration: none; padding-bottom: 2px; }
.cube-rooms a:hover { color: var(--ink); }
.cube-rooms a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.cube-rooms sup { margin-left: 3px; font-size: 0.65em; }

/* ---------- 作品:2つ大きく、3つ小さくを繰り返す ---------- */
.cube-grid {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 64px 32px; margin: 0; padding: 0; list-style: none;
}
.cube-work { grid-column: span 4; min-width: 0; }
.cube-work:nth-child(5n+1), .cube-work:nth-child(5n+2) { grid-column: span 6; }
.cube-stage {
  position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3;
  padding: 9%; background: var(--wall); overflow: hidden;
}
.cube-work:nth-child(5n+1) .cube-stage, .cube-work:nth-child(5n+2) .cube-stage { aspect-ratio: 5 / 4; }
.cube-stage img {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 0;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.35);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cube-view {
  position: absolute; right: 0; bottom: 0; padding: 8px 14px; background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0; transform: translateY(100%); transition: transform 0.3s ease, opacity 0.3s ease;
}
.cube-stage:hover img, .cube-stage:focus-visible img { transform: scale(1.03); }
.cube-stage:hover .cube-view, .cube-stage:focus-visible .cube-view { opacity: 1; transform: none; }
.cube-stage:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.cube-caption { display: grid; grid-template-columns: 3.2em 1fr; gap: 12px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.cube-caption p { margin: 0; }
.cube-no { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; }
.cube-work-title { font-size: 0.95rem; font-weight: 700; line-height: 1.5; }
.cube-work-title a { color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.cube-work-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cube-meta { margin-top: 2px !important; font-family: var(--sans); font-size: 0.78rem; color: var(--gray); }
.cube-meta span { margin-left: 10px; padding: 1px 7px; border: 1px solid #cfcfcf; font-family: var(--jp); font-size: 0.7rem; color: var(--ink); }

.cube-pager {
  display: flex; justify-content: space-between; align-items: center; margin-top: 80px; padding-top: 16px;
  border-top: 1px solid var(--line); font-family: var(--sans); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
}
.cube-pager a { color: var(--ink); text-decoration: none; }
.cube-pager a:hover { text-decoration: underline; }
.cube-empty { padding: 80px 0; font-family: var(--sans); font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.cube-empty small { display: block; margin-top: 14px; font-family: var(--jp); font-size: 0.9rem; font-weight: 400; letter-spacing: 0; color: var(--gray); }

/* ---------- 作品を大きく見る ---------- */
.lightbox {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: none;
  background: #fff; color: #0d0d0d; font-family: "Archivo", "Zen Kaku Gothic New", sans-serif;
}
.lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.lightbox::backdrop { background: #fff; }
.lightbox-bar, .lightbox-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 28px;
}
.lightbox-foot { align-items: flex-end; border-top: 1px solid #0d0d0d; margin: 0 28px; padding: 14px 0 22px; }
.lightbox figure { display: flex; align-items: center; justify-content: center; min-height: 0; margin: 0; padding: 12px 28px 24px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.4); }
.lightbox figcaption { display: grid; grid-template-columns: auto 1fr; gap: 2px 16px; text-align: left; }
.lightbox-no { grid-row: span 2; font-size: 0.85rem; font-weight: 700; }
.lightbox-title { color: #0d0d0d; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 1.05rem; font-weight: 700; text-decoration: none; }
.lightbox-title:hover { text-decoration: underline; }
.lightbox-meta { color: #8a8a8a; font-size: 0.8rem; }
.lightbox-pos { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; }
.lightbox button {
  padding: 8px 4px; border: none; background: none; color: #0d0d0d; cursor: pointer; font-family: inherit;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.15em; text-transform: uppercase;
}
.lightbox button:hover, .lightbox button:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.lightbox-arrows { display: flex; gap: 28px; flex: 0 0 auto; }

@media (max-width: 900px) {
  .cube-head { grid-template-columns: 1fr; }
  .cube-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 20px; }
  .cube-work, .cube-work:nth-child(5n+2) { grid-column: span 1; }
  .cube-work:nth-child(5n+1) { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cube { padding: 32px 0 64px; }
  .cube-rooms { margin-bottom: 36px; }
  .cube-grid { grid-template-columns: 1fr; gap: 44px; }
  .cube-work { grid-column: 1 / -1 !important; }
  .lightbox-bar { padding: 12px 16px; }
  .lightbox figure { padding: 8px 12px 16px; }
  .lightbox-foot { flex-direction: column; align-items: stretch; margin: 0 16px; }
  .lightbox-arrows { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) { .cube-stage img, .cube-view { transition: none; } }

/* =========================================================
   記事ページ:3つのテンプレートで共通
   ========================================================= */
/* 続けて並んだ写真は、半分の大きさで横に2枚ずつ(左右の余白 5px) */
.post-body .post-photos {
  column-span: all; display: flex; flex-wrap: wrap; align-items: flex-start; margin: 14px -5px 18px; text-indent: 0;
}
.post-body .post-photos > p, .post-body .post-photos > figure { display: contents; }
.post-body .post-photos img { width: calc(50% - 10px); margin: 0 5px 10px; }

.article-editor-note {
  margin-top: 20px; padding: 12px 14px; border: 2px dashed #bbb; background: rgba(255, 255, 255, 0.6);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", sans-serif; font-size: 0.85rem; line-height: 1.7;
}
.article-editor-note p { margin: 0 0 8px; }
.article-editor-note form { margin: 0; }
.article-error { color: #b91c1c; font-weight: 700; }
.article-actions { margin-top: 20px; }

/* プレビュー中の帯 */
.preview-bar { position: sticky; top: 0; z-index: 50; background: #111; color: #fff; font-size: 0.85rem; }
.preview-bar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding-top: 10px; padding-bottom: 10px; }
.preview-bar p { margin: 0; }
.preview-bar strong { margin-right: 10px; padding: 2px 10px; border-radius: 999px; background: #fff; color: #111; }
.preview-bar-error { color: #fca5a5; }
.preview-bar-note { color: #d1d5db; }
.preview-bar .btn { margin-left: auto; border-color: #fff; color: #fff; background: transparent; }

/* ---------- シンプル ---------- */
.simple-draft { padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; font-size: 0.75rem; }
.simple-lead {
  margin: 0 0 28px; padding: 14px 18px; border-radius: 10px; background: var(--bg-soft); font-weight: bold; line-height: 1.9;
}
.simple-ai, .simple-kicker {
  display: inline-block; padding: 1px 8px; border-radius: 999px; background: #e5e7eb; color: #374151;
  font-size: 0.7rem; font-weight: bold; vertical-align: 0.15em;
}
.simple-ai { margin-left: 8px; }
.simple-tags { margin-top: 24px; }
.simple-desk { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.simple-desk-title { margin: 0 0 16px; font-size: 1.3rem; text-align: left; }
.simple-column { margin-bottom: 16px; padding: 16px 20px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.simple-column h3 { margin: 8px 0 6px; font-size: 1.1rem; text-align: left; }
.simple-column p { margin: 0; line-height: 1.9; }
.simple-glossary { display: grid; gap: 10px; margin: 20px 0; }
.simple-glossary dt { font-weight: bold; }
.simple-glossary dd { margin: 2px 0 0; color: var(--muted); font-size: 0.9rem; }
.simple-related { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.simple-chip { padding: 2px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); }
.simple-note { margin-top: 12px; font-size: 0.75rem; color: var(--muted); }
.simple-pending { display: flex; gap: 10px; align-items: center; font-size: 0.9rem; }

/* ---------- 投稿画面:デザインの選択 ---------- */
.layout-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.layout-option { position: relative; cursor: pointer; }
.layout-option input { position: absolute; opacity: 0; }
.layout-card {
  display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px; border: 2px solid var(--border);
  border-radius: 10px; background: #fff; transition: border-color 0.2s;
}
.layout-card strong { font-size: 0.9rem; }
.layout-card small { font-size: 0.75rem; line-height: 1.5; color: var(--muted); }
.layout-option:hover .layout-card { border-color: #9ca3af; }
.layout-option input:checked + .layout-card { border-color: var(--main); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.layout-option input:checked + .layout-card strong::after { content: " ✓"; color: var(--main); }
.layout-option input:focus-visible + .layout-card { outline: 2px solid var(--main); outline-offset: 2px; }

/* 小さな見本(色と形だけで各デザインを表す) */
.layout-thumb { position: relative; display: block; aspect-ratio: 16 / 10; margin-bottom: 6px; border-radius: 6px; overflow: hidden; }
.layout-thumb i { position: absolute; display: block; }
.layout-thumb-sports { background: #fbf9f3; }
.layout-thumb-sports i:nth-child(1) { left: 0; top: 0; width: 55%; height: 22%; background: #5f5f5f; clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%); }
.layout-thumb-sports i:nth-child(2) { left: 0; top: 22%; width: 100%; height: 8%; background: #111; }
.layout-thumb-sports i:nth-child(3) { left: 8%; top: 40%; width: 50%; height: 22%; background: #5f5f5f; box-shadow: 3px 3px 0 #111; }
.layout-thumb-sports i:nth-child(4) { right: 8%; top: 38%; width: 12%; height: 50%; background: #111; border-right: 3px solid #5f5f5f; }
.layout-thumb-newspaper { background: #f8f5ee; }
.layout-thumb-newspaper i:nth-child(1) { left: 8%; right: 8%; top: 8%; height: 18%; border-bottom: 3px solid #141414; background: linear-gradient(#141414, #141414) center 35% / 50% 40% no-repeat; }
.layout-thumb-newspaper i:nth-child(2) { left: 8%; top: 36%; width: 58%; height: 56%; background: repeating-linear-gradient(#141414 0 2px, transparent 2px 7px); opacity: 0.35; }
.layout-thumb-newspaper i:nth-child(3) { right: 8%; top: 36%; width: 18%; height: 56%; border-left: 1px solid #141414; background: linear-gradient(#141414, #141414) 60% 0 / 30% 90% no-repeat; }
.layout-thumb-newspaper i:nth-child(4) { left: 8%; top: 36%; width: 14%; height: 6%; background: #c4231a; }
.layout-thumb-simple { background: #f3f4f6; }
.layout-thumb-simple i:nth-child(1) { left: 18%; right: 18%; top: 0; bottom: 0; background: #fff; }
.layout-thumb-simple i:nth-child(2) { left: 24%; top: 14%; width: 40%; height: 9%; border-radius: 3px; background: #374151; }
.layout-thumb-simple i:nth-child(3) { left: 24%; right: 24%; top: 32%; height: 26%; border-radius: 4px; background: #d1d5db; }
.layout-thumb-simple i:nth-child(4) { left: 24%; right: 24%; top: 66%; height: 22%; background: repeating-linear-gradient(#9ca3af 0 2px, transparent 2px 7px); }

.btn-preview { margin-right: auto; }
@media (max-width: 640px) {
  .layout-options { grid-template-columns: 1fr; }
  .layout-card { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto 1fr; gap: 2px 12px; }
  .layout-thumb { grid-row: span 2; margin: 0; }
}
/* =========================================================
   タイポグラフィ新聞(記事ページ)
   ========================================================= */
.type-page { background: #ece7dc; }
.typo-paper {
  --ink: #141414;
  --paper: #f8f5ee;
  --red: #c4231a;
  --rule: #c9c1b0;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
  padding: 32px 40px 28px; color: var(--ink); background: var(--paper); font-family: var(--mincho);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 16px 40px rgba(0, 0, 0, 0.08);
  font-feature-settings: "palt" 1;   /* 和文の字間を詰めて組む */
}

/* ---------- 題字 ---------- */
.typo-masthead { border-bottom: 6px solid var(--ink); padding-bottom: 6px; margin-bottom: 4px; }
.typo-masthead-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--gothic); font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px;
}
.typo-no strong { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.05em; margin-left: 4px; }
.typo-date { font-size: 1.6rem; font-weight: 900; letter-spacing: 0.06em; }
.typo-date b { color: var(--red); }
.typo-date small { margin-left: 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.3em; }
.typo-title {
  margin: 4px 0 0; font-weight: 800; line-height: 0.9; text-align: center; letter-spacing: -0.04em;
  font-size: clamp(3.2rem, 13vw, 9rem);
}
.typo-title em { font-style: normal; color: var(--red); }
.typo-masthead-sub {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; margin-top: 8px;
  font-family: var(--gothic); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.35em;
}
.typo-masthead-sub span + span::before { content: "／"; margin: 0 0.8em; color: var(--rule); letter-spacing: 0; }
.typo-draft { color: var(--red); letter-spacing: 0.1em !important; }

/* ---------- 本記事 ---------- */
.typo-front {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 32px;
  padding-top: 28px; border-top: 1px solid var(--ink);
}
.typo-headline {
  grid-column: 2; grid-row: 1;
  margin: 0; padding-left: 28px; border-left: 1px solid var(--ink);
  writing-mode: vertical-rl; text-orientation: mixed; inline-size: 11em; max-inline-size: 70vh;
  font-size: clamp(2.6rem, 4.6vw, 4rem); font-weight: 800; line-height: 1.25; letter-spacing: 0.04em; text-align: start;
}
.typo-story { grid-column: 1; grid-row: 1; min-width: 0; }

.typo-lead {
  position: relative; margin: 0 0 18px; padding: 0 0 18px 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem); font-weight: 800; line-height: 1.7; letter-spacing: 0.02em;
  border-bottom: 1px solid var(--ink);
}
.typo-lead::before { content: ""; display: block; width: 56px; height: 6px; margin-bottom: 14px; background: var(--red); }
.typo-ai {
  display: inline-block; margin-left: 10px; padding: 1px 8px; vertical-align: 0.2em;
  border: 1px solid currentColor; font-family: var(--gothic); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.2em;
}
.typo-byline {
  display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0 0 18px;
  font-family: var(--gothic); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.2em; color: #555;
}

.typo-body {
  column-count: 2; column-gap: 32px; column-rule: 1px solid var(--rule);
  font-size: 1.02rem; line-height: 2; text-align: justify; font-weight: 500;
}
.typo-body > p:first-child::first-letter {
  -webkit-initial-letter: 3; initial-letter: 3;
  margin-right: 0.15em; font-weight: 800; color: var(--red);
}
.typo-body p { margin: 0 0 1em; }
.typo-body p + p { text-indent: 1em; }
.typo-body img, .typo-body figure, .typo-body blockquote { break-inside: avoid; }
.typo-body img { border-radius: 0; filter: grayscale(0.25) contrast(1.05); }
.typo-body h2, .typo-body h3 {
  break-after: avoid; margin: 1em 0 0.5em; padding: 0; border: none; text-align: left; font-weight: 800; line-height: 1.4;
}
.typo-body h2 { font-size: 1.45rem; }
.typo-body h2::before { content: "■"; margin-right: 0.3em; color: var(--red); font-size: 0.7em; vertical-align: 0.15em; }
.typo-body h3 { font-size: 1.15rem; }
.typo-body blockquote {
  margin: 1em 0; padding: 0.2em 0 0.2em 1em; border-left: 4px solid var(--red); background: none; color: inherit;
  font-size: 1.15rem; font-weight: 700; line-height: 1.8;
}
.typo-body ul, .typo-body ol { padding-left: 1.4em; }
.typo-body a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ---------- 解説面 ---------- */
.typo-desk { margin-top: 36px; padding-top: 14px; border-top: 6px solid var(--ink); }
.typo-desk-title {
  display: flex; align-items: baseline; gap: 16px; margin: 0 0 22px; padding-bottom: 10px;
  border-bottom: 1px solid var(--ink); text-align: left;
  font-family: var(--gothic); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.4em; color: #555;
}
.typo-desk-title span { font-family: var(--mincho); font-size: 2.2rem; font-weight: 800; letter-spacing: 0.15em; color: var(--ink); }

.typo-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0; }
.typo-column { padding: 0 24px 24px; border-left: 1px solid var(--rule); }
.typo-column:first-child { padding-left: 0; border-left: none; }
.typo-column-no {
  margin: 0; font-family: var(--gothic); font-size: 3.6rem; font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.5px var(--red); letter-spacing: 0.02em;
}
.typo-kicker {
  display: inline-block; margin: 10px 0 8px; padding: 2px 10px; background: var(--ink); color: var(--paper);
  font-family: var(--gothic); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.25em;
}
.typo-column-heading { margin: 0 0 10px; font-size: 1.35rem; font-weight: 800; line-height: 1.45; text-align: left; }
.typo-column-body { margin: 0; font-size: 0.95rem; line-height: 1.95; text-align: justify; text-indent: 1em; }

.typo-glossary { display: grid; grid-template-columns: auto 1fr; gap: 0 28px; margin-top: 8px; padding: 18px 0; border-top: 1px solid var(--ink); }
.typo-glossary-title {
  margin: 0; writing-mode: vertical-rl; font-size: 1.6rem; font-weight: 800; letter-spacing: 0.4em; text-align: left;
}
.typo-glossary dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; margin: 0; }
.typo-glossary dt { font-family: var(--gothic); font-size: 1.05rem; font-weight: 900; letter-spacing: 0.08em; }
.typo-glossary dt::after { content: ""; display: block; width: 24px; height: 3px; margin: 6px 0; background: var(--red); }
.typo-glossary dd { margin: 0; font-size: 0.9rem; line-height: 1.85; }

.typo-related {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 14px 0;
  border-top: 1px solid var(--ink); font-family: var(--gothic);
}
.typo-related-label { margin-right: 8px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.3em; color: #555; }
.typo-tag { padding: 3px 12px; border: 1.5px solid var(--ink); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.08em; }
.typo-tag::before { content: "#"; margin-right: 2px; color: var(--red); }

.typo-note { margin: 4px 0 0; font-family: var(--gothic); font-size: 0.72rem; line-height: 1.7; color: #777; }
.typo-pending { display: flex; gap: 10px; align-items: center; margin: 0 0 20px; font-family: var(--gothic); font-size: 0.9rem; }

.typo-editor-note { margin-top: 20px; padding: 12px 14px; border: 1px dashed var(--rule); font-family: var(--gothic); font-size: 0.85rem; }
.typo-editor-note p { margin: 0 0 8px; }
.typo-editor-note form { margin: 0; }
.typo-error { color: var(--red); }

.typo-colophon {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; margin-top: 24px; padding-top: 8px;
  border-top: 6px solid var(--ink); font-family: var(--gothic); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.3em;
}
.typo-actions { margin-top: 20px; }
.type-page .back-link { margin-top: 16px; }

/* ---------- 画面幅に合わせる ---------- */
@media (max-width: 900px) {
  .typo-paper { padding: 24px 24px 20px; }
  .typo-front { grid-template-columns: 1fr; }
  .typo-headline {
    grid-column: 1; grid-row: 1; margin-bottom: 20px; padding-left: 0; border-left: none;
    writing-mode: horizontal-tb; inline-size: auto; max-inline-size: none;
    font-size: clamp(2rem, 7vw, 3rem); line-height: 1.3; letter-spacing: 0.02em;
  }
  .typo-story { grid-row: 2; }
}
@media (max-width: 640px) {
  .type-page .container { padding: 0 8px; }
  .typo-paper { padding: 18px 14px 16px; }
  .typo-masthead-meta { font-size: 0.7rem; letter-spacing: 0.1em; }
  .typo-no strong, .typo-date { font-size: 1.15rem; }
  .typo-masthead-sub { font-size: 0.72rem; letter-spacing: 0.2em; }
  .typo-body { column-count: 1; }
  .typo-column, .typo-column:first-child { padding: 0 0 20px; border-left: none; }
  .typo-column + .typo-column { padding-top: 16px; border-top: 1px solid var(--rule); }
  .typo-glossary { grid-template-columns: 1fr; gap: 10px; }
  .typo-glossary-title { writing-mode: horizontal-tb; font-size: 1.3rem; }
  .typo-desk-title span { font-size: 1.8rem; }
}
