:root {
  --paper: #e6e6e6; /* メインビジュアルのモノクロに合わせたグレー（複製元は #f7f5f0） */
  --surface: #ffffff;
  --ink: #23221f;
  --muted: #62605a; /* グレーの背景で 4.5:1 以上にするため、複製元の #6d6a63 から少し濃くした */
  --line: #cfcfcf; /* グレーの背景に合わせて生成り寄りの #dcd8cf から無彩色にした */
  --accent: #1f4e79;
  --accent-ink: #ffffff;
  --error: #a3312a;
  --serif: "Noto Serif JP", "Hiragino Mincho ProN", serif;
  --sans: "Noto Sans JP", "Hiragino Sans", system-ui, sans-serif;
  --gutter: 16px;
  --max: 1080px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.02em;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.site-title { font-family: var(--serif); font-size: 15px; text-decoration: none; letter-spacing: 0.08em; }
.site-nav a { font-size: 13px; color: var(--muted); text-decoration: none; }

/* メインビジュアル */
.hero { padding: 56px 0 40px; text-align: center; }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.3em; color: var(--muted); margin: 0 0 16px; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 5.4vw, 36px); line-height: 1.6; margin: 0 0 24px; }
.hero-meta { font-size: 14px; color: var(--muted); margin: 0; }
.hero-lead { max-width: 36em; margin: 32px auto 0; font-size: 15px; text-align: left; }

/* 見出し */
.section { padding: 40px 0; }
.section-title { font-family: var(--serif); font-weight: 500; font-size: 20px; margin: 0 0 4px; letter-spacing: 0.1em; }
.section-sub { font-size: 13px; color: var(--muted); margin: 0 0 24px; }
.section-sub:has(+ .section-note) { margin-bottom: 4px; }
.section-note { font-size: 12px; color: var(--muted); margin: 0 0 24px; line-height: 1.6; }
.grid-group { grid-column: 1 / -1; margin-top: 12px; }
.grid-group:first-child { margin-top: 0; }
.grid-group h3 { font-family: var(--serif); font-size: 15px; font-weight: 500; margin: 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* 作品一覧 */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; } }

.card { all: unset; display: block; cursor: pointer; width: 100%; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.card-title { font-family: var(--serif); font-size: 15px; margin: 12px 0 2px; line-height: 1.5; }
.card-meta { font-size: 12px; color: var(--muted); margin: 0; }
.card-price { font-size: 13px; margin: 4px 0 0; }
.price-note { display: block; font-size: 11px; line-height: 1.6; color: var(--muted); margin: 2px 0 0; }

.artwork { aspect-ratio: 728 / 515; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.artwork img { width: 100%; height: 100%; object-fit: cover; }
.artwork-placeholder { font-size: 12px; color: var(--muted); }

/* 作品詳細（モーダル） */
.modal { border: 0; padding: 0; width: 100%; max-width: 760px; max-height: 100dvh; background: var(--surface); color: var(--ink); }
.modal::backdrop { background: rgb(20 20 18 / 0.6); }
@media (max-width: 767px) { .modal { margin: 0; max-width: none; height: 100dvh; } }
.modal-inner { padding: 16px var(--gutter) 32px; }
.modal-close { all: unset; cursor: pointer; display: block; margin-left: auto; font-size: 13px; color: var(--muted); padding: 8px 0; }
.modal-close:focus-visible { outline: 2px solid var(--accent); }
.modal .artwork { aspect-ratio: auto; min-height: 240px; border: 0; background: var(--paper); }
.modal h2 { font-family: var(--serif); font-weight: 500; font-size: 22px; margin: 20px 0 4px; }

.spec { display: grid; grid-template-columns: 7em 1fr; gap: 6px 12px; margin: 16px 0 24px; font-size: 14px; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }

/* ボタン */
.button { display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 15px; letter-spacing: 0.1em; padding: 14px 32px; text-decoration: none; text-align: center; cursor: pointer; min-width: 240px; }
.button:hover { opacity: 0.9; }
.button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.button[disabled] { opacity: 0.4; cursor: not-allowed; }
.button.secondary { background: transparent; color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 32px; }

/* フォーム */
.form { max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 24px; }
.field label, .field legend { display: block; font-size: 14px; margin-bottom: 6px; }
.required { font-size: 11px; color: var(--error); margin-left: 6px; }
.optional { font-size: 11px; color: var(--muted); margin-left: 6px; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 0; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field [aria-invalid="true"] { border-color: var(--error); }
.error { font-size: 13px; color: var(--error); margin: 4px 0 0; }
.error:empty { display: none; }
.form-alert { border: 1px solid var(--error); color: var(--error); padding: 12px 16px; margin-bottom: 24px; font-size: 14px; }
.form-alert:empty { display: none; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.notes { background: var(--surface); border: 1px solid var(--line); padding: 16px 20px; font-size: 14px; margin-bottom: 16px; }
.notes h3 { font-size: 14px; margin: 0 0 8px; }
.notes ul { margin: 0; padding-left: 1.2em; }
/* .field label { display: block } より強くして、チェックボックスと文字を横に並べる */
.check, .field .check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 0; }
.check input { width: 20px; height: 20px; margin: 3.5px 0 0; flex: none; } /* (1行目の高さ 27px - 20px) / 2。ブラウザ既定の左右の margin も消す */
.check + .hint { padding-left: 30px; } /* チェックボックス 20px + 間隔 10px で、ラベルの文字の頭にそろえる */

.confirm { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0 0 24px; border-top: 1px solid var(--line); }
.confirm div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.confirm dt { font-size: 12px; color: var(--muted); }
.confirm dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

.closed { text-align: center; padding: 48px 0; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0; font-size: 12px; color: var(--muted); }
.site-footer p { margin: 0 0 4px; }

.center { text-align: center; }
[hidden] { display: none !important; }
/* 読み上げ専用（画面には出さない）。選択の通知に使う。画面上はまとめ枠とカードのバッジで分かる */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* キービジュアル（画像があるときだけ表示） */
.hero-visual:empty { display: none; }
.hero-visual img { width: 100%; height: auto; }
.hero h1 span { display: block; }
.hero-cta { margin-top: 32px; }
.hero-cta-note { margin: 0; font-weight: 600; letter-spacing: 0.04em; }

/* 完了画面 */
.complete { max-width: 640px; }
.receipt { text-align: center; border: 1px solid var(--line); background: var(--surface); padding: 20px 16px; margin: 24px 0 16px; }
.receipt-label { font-size: 13px; color: var(--muted); margin: 0; letter-spacing: 0.2em; }
.receipt-id { font-size: clamp(32px, 9vw, 44px); font-weight: 500; letter-spacing: 0.12em; margin: 4px 0 8px; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; user-select: all; }
.receipt-note { font-size: 13px; margin: 0; }
.mail-message { font-size: 14px; padding: 12px 16px; background: var(--surface); border-left: 3px solid var(--accent); margin: 0 0 8px; }
.mail-message[data-sent="false"] { border-left-color: var(--error); }
.complete-block { margin-top: 32px; }
.complete-block h2 { font-family: var(--serif); font-weight: 500; font-size: 17px; margin: 0 0 12px; }
.complete-block ul, .complete-block ol { margin: 0; padding-left: 1.4em; font-size: 15px; }
.complete-block li + li { margin-top: 6px; }
.contact { font-size: 16px; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.contact a { user-select: all; }
.copy { font: inherit; font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

/* 作品画像：絵は切らずに全体を見せる */
.artwork img { object-fit: contain; }
.grid .artwork { aspect-ratio: 1; position: relative; }
.grid .artwork img { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: contain; }
.modal .artwork { padding: 12px; }
.modal .artwork img { max-height: 70dvh; width: auto; max-width: 100%; margin: 0 auto; }

/* 応募フォーム：絵のカードで希望を選ぶ */
.picker { border: 0; padding: 0; margin: 0 0 32px; min-width: 0; }
.destination { border: 0; padding: 0; min-width: 0; }
.destination .check { margin-bottom: 4px; }
/* 応募フォーム：作品のカードだけページ幅まで広げ、入力欄や同意欄は読みやすい 640px のままにする */
#form.form { max-width: var(--max); }
#form.form > :not(.picker) { max-width: 640px; margin-left: auto; margin-right: auto; }
.picker legend { font-size: 15px; margin-bottom: 6px; padding: 0; }
.picker-summary { list-style: none; margin: 12px 0 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 4px; }
.picker-summary li { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* 1行に固定し、作品名が長くても枠の高さを変えない */
.picker-summary li.is-set { color: var(--ink); font-weight: 500; }
.picker-grid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.picker-group { grid-column: 1 / -1; margin-top: 16px; }
.picker-group h2 { font-family: var(--serif); font-size: 17px; font-weight: 500; margin: 0; }
.picker-group .section-note { margin: 4px 0 0; }
.picker-subgroup { grid-column: 1 / -1; margin-top: 4px; }
.picker-subgroup h3 { font-family: var(--serif); font-size: 14px; font-weight: 500; margin: 0; padding-bottom: 4px; border-bottom: 1px solid var(--line); color: var(--muted); }
@media (min-width: 768px) { .picker-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; } }
.pick-card { position: relative; height: 100%; display: flex; flex-direction: column; }
.pick { font: inherit; color: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; width: 100%; flex: 1; min-height: 44px; padding: 8px 8px 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 6px; }
.pick:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.pick[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pick-badge { align-self: flex-start; font-size: 12px; line-height: 1; padding: 6px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); margin-bottom: 6px; }
.pick[aria-pressed="true"] .pick-badge { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
/* iOS Safari では aspect-ratio の枠の中で height: 100% が効かず画像がはみ出すため、一覧（.grid .artwork）と同じく絶対配置で収める */
.pick-art { display: block; position: relative; overflow: hidden; aspect-ratio: 1; background: var(--paper); margin-bottom: 6px; }
.pick-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pick-title { font-family: var(--serif); font-size: 15px; line-height: 1.5; }
.pick-meta { font-size: 12px; color: var(--muted); line-height: 1.5; }
.pick-price { font-size: 13px; }
.link-button { all: unset; cursor: pointer; color: var(--accent); text-decoration: underline; font-size: 13px; padding: 8px 0; }
.link-button:focus-visible { outline: 2px solid var(--accent); }
.choice-selects .link-button { display: inline-block; margin-bottom: 16px; }

/* 確認画面・完了画面の希望作品の縮小画像 */
.with-thumb { display: flex; align-items: center; gap: 12px; }
.with-thumb .thumb { width: 64px; height: 64px; object-fit: contain; background: var(--surface); border: 1px solid var(--line); flex: none; }

/* ---------- 蟷螂子のサイトで足した部品（複製元の配色・書体に合わせる） ---------- */
/* 会期・時間・会場（複製元の hero-meta と同じ見た目で3行にする） */
.hero-meta div { margin: 0; }
.hero-meta dt { display: inline; }
.hero-meta dt::after { content: "　"; }
.hero-meta dd { display: inline; margin: 0; }
/* メインビジュアルがあるときは、画像をヘッダーの直下に本文の幅（最大 720px）で置き、見出しは控えめにする（作家名・展覧会名は画像の中にある） */
.hero.has-visual { padding-top: 0; }
.hero.has-visual .hero-visual { max-width: 720px; margin: 32px auto 0; padding: 0 var(--gutter); box-sizing: content-box; }
.hero.has-visual .hero-visual img { width: 100%; aspect-ratio: 16 / 9; }
.hero.has-visual .hero-body { padding-top: 32px; }
.hero.has-visual h1 { font-size: clamp(17px, 4.4vw, 24px); margin-bottom: 16px; }

/* 展覧会について・作家 */
.prose { max-width: 36em; }
.prose p { margin: 0 0 1em; font-size: 15px; }
.artist-name { font-family: var(--serif); font-size: 17px; margin: 0 0 12px; }
.artist-name span { font-family: var(--sans); font-size: 12px; letter-spacing: 0.2em; color: var(--muted); margin-left: 8px; }

/* 作品詳細：正面・部分・側面・裏面を切り替える */
.viewer { margin: 0; }
.viewer-stage { background: var(--paper); position: relative; aspect-ratio: 1; }
/* 画像の縦横比が違っても枠の高さを変えない（切り替えでサムネイルが上下に動かないように）。画像は枠の中に収める */
.viewer-stage img { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); object-fit: contain; }
@media (min-width: 768px) { .viewer-stage { aspect-ratio: 4 / 3; } }
.viewer-caption { font-size: 12px; color: var(--muted); margin-top: 6px; }
.viewer-thumbs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.viewer-thumb { all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; border: 2px solid var(--line); font-size: 12px; text-align: center; color: var(--muted); background: var(--surface); }
.viewer-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--paper); }
.viewer-thumb span { display: block; padding: 2px 0; }
.viewer-thumb[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); font-weight: 500; }
.viewer-thumb:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.statement .keyword { margin: 0 0 12px; font-family: var(--serif); font-weight: 500; font-size: 15px; }
.statement { margin-top: 32px; border-top: 1px solid var(--line); padding-top: 16px; }
.statement h3 { font-family: var(--serif); font-weight: 500; font-size: 15px; margin: 0 0 12px; }

/* 展覧会について・作家：本文の幅（36em）に見出しごと収めて中央に置く（PC で左に寄らないように） */
.section.about .wrap { max-width: 36em; box-sizing: content-box; }
