/* こみちマルシェ — 地域マルシェ・手づくり市
   クリーム × トマト × からし × 若葉 × 紺。手描き風の線、旗飾り、少し傾いた写真であたたかく */
:root {
  --cream: #FFF7E8;
  --paper: #FFFDF7;
  --sand: #F3E7CB;
  --tomato: #E8573C;
  --tomato-dark: #C2402A;
  --mustard: #E9B23C;
  --leaf: #5E9E5A;
  --sky: #6C8FC6;
  --navy: #2D3A4A;
  --muted: #6E7480;
  --line: #E8DCC0;
  --hand: "Kiwi Maru", "Zen Kaku Gothic New", serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Quicksand", sans-serif;
  --ease: cubic-bezier(.3, .8, .3, 1.1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font-family: var(--jp); font-size: 15.5px; line-height: 1.9; letter-spacing: .03em; -webkit-font-smoothing: antialiased; background-image: radial-gradient(rgba(45, 58, 74, .05) 1px, transparent 1.4px); background-size: 18px 18px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, figure, dl, dd, ul, ol, details { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 300; padding: 8px 14px; background: var(--navy); color: #fff; border-radius: 10px; }
.skip:focus { top: 12px; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.section { padding: clamp(72px, 9vw, 120px) 0; }
.head { margin-bottom: clamp(28px, 4vw, 44px); }
.head-en { font-family: var(--en); font-weight: 700; font-size: 16px; color: var(--tomato); letter-spacing: .1em; display: block; width: fit-content; transform: rotate(-3deg); }
.head h2 { font-family: var(--hand); font-weight: 500; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.4; position: relative; display: inline-block; }
.head h2::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: 2px; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 Q 25 1 50 5 T 100 5 T 150 5 T 198 4' fill='none' stroke='%23E9B23C' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat; z-index: -1; }
.head > p:not(.head-en) { color: var(--muted); margin-top: 6px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; cursor: pointer; border: 2px solid var(--navy); transition: transform .3s var(--ease), box-shadow .3s; box-shadow: 3px 4px 0 var(--navy); }
.btn:hover { transform: translate(-1px, -2px) rotate(-1deg); box-shadow: 5px 6px 0 var(--navy); }
.btn--tomato { background: var(--tomato); color: #fff; }
.btn--line { background: #fff; }
.btn--full { width: 100%; }

/* ---------- status / header ---------- */
.status-bar { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; background: var(--leaf); color: #fff; font-size: 14px; font-weight: 700; text-align: center; }
.status-bar.is-rain { background: var(--sky); }
.status-bar.is-today { background: var(--tomato); }
.sb-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 20px; padding: 10px clamp(16px, 3vw, 40px); background: rgba(255, 247, 232, .94); backdrop-filter: blur(6px); border-bottom: 2px dashed var(--line); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.logo svg { width: 46px; height: 46px; }
.logo span { font-family: var(--hand); font-size: 22px; line-height: 1.1; display: flex; flex-direction: column; }
.logo small { font-family: var(--en); font-weight: 700; font-size: 11px; color: var(--tomato); letter-spacing: .1em; }
.gnav { display: flex; gap: 4px; }
.gnav a { text-decoration: none; font-weight: 700; font-size: 14px; padding: 8px 12px; border-radius: 999px; }
.gnav a:hover { background: var(--sand); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 50px 0 80px; overflow: hidden; }
.bunting { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 80px; }
.bunting .flag { transform-box: fill-box; transform-origin: top center; animation: sway 3s ease-in-out infinite; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.hero-inner { width: min(1160px, calc(100% - 40px)); margin: 40px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero-badge { display: inline-block; padding: 6px 18px; border-radius: 999px; background: var(--mustard); font-weight: 700; transform: rotate(-3deg); }
.hero h1 { font-family: var(--hand); font-weight: 500; font-size: clamp(54px, 8vw, 104px); line-height: 1.05; margin: 18px 0 14px; display: flex; flex-direction: column; }
.hero h1 span:nth-child(2) { color: var(--tomato); margin-left: .6em; }
.hero-date { font-family: var(--en); font-weight: 700; font-size: clamp(22px, 2.4vw, 28px); }
.hero-date b { font-size: 1.5em; color: var(--tomato); }
.hero-place { font-weight: 700; font-size: 14px; color: var(--leaf); }
.hero-lead { margin-top: 14px; color: var(--muted); }
.hero-cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hero-photos { position: relative; aspect-ratio: 1 / 1; }
.hp { position: absolute; background: #fff; padding: 10px 10px 34px; box-shadow: 0 10px 24px -12px rgba(45, 58, 74, .45); }
.hp img { width: 100%; height: 100%; object-fit: cover; }
.hp-1 { left: 4%; top: 6%; width: 74%; aspect-ratio: 4 / 3.2; transform: rotate(-3deg); }
.hp-1 img { aspect-ratio: 4 / 3; }
.hp-2 { right: 0; top: 50%; width: 40%; transform: rotate(5deg); }
.hp-2 img, .hp-3 img { aspect-ratio: 1; }
.hp-3 { left: 12%; bottom: 0; width: 34%; transform: rotate(-6deg); }
.hp::before { content: ""; position: absolute; left: 50%; top: -10px; width: 70px; height: 22px; margin-left: -35px; background: rgba(233, 178, 60, .7); transform: rotate(-4deg); }
.doodle { position: absolute; }
.doodle-sun { right: 4%; top: -4%; width: 90px; animation: spin 20s linear infinite; }
.doodle-leaf { left: -2%; top: 48%; width: 56px; transform: rotate(-20deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- about ---------- */
.about { background: var(--paper); border-block: 2px dashed var(--line); }
.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 32px; align-items: start; }
.about-list > div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; padding: 14px 0; border-bottom: 2px dotted var(--line); }
.about-list dt { font-family: var(--hand); color: var(--tomato); }
.about-list b { color: var(--tomato); }
.about-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.about-cards li { aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--c); color: #fff; transition: transform .4s var(--ease); }
.about-cards li:nth-child(2) { color: var(--navy); }
.about-cards li:hover { transform: rotate(-8deg) scale(1.05); }
.about-cards b { font-family: var(--en); font-size: 44px; line-height: 1; }
.about-cards span { font-size: 13px; font-weight: 700; }

/* ---------- shops ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filters button { --c: var(--navy); padding: 8px 18px; border-radius: 999px; border: 2px solid var(--c); background: #fff; color: var(--navy); font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.filters button small { font-family: var(--en); margin-left: 2px; }
.filters button[aria-pressed="true"] { background: var(--c); color: #fff; }
.shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.shop-grid li { display: flex; }
.shop { position: relative; background: #fff; border-radius: 18px; overflow: hidden; border: 2px solid var(--navy); box-shadow: 3px 4px 0 var(--navy); transition: transform .35s var(--ease), box-shadow .35s; cursor: pointer; text-align: left; padding: 0; display: flex; flex-direction: column; width: 100%; height: 100%; font: inherit; color: inherit; }
.shop:hover, .shop:focus-visible { transform: translate(-1px, -3px) rotate(-.8deg); box-shadow: 5px 7px 0 var(--navy); }
.shop-img { aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; position: relative; }
.shop-img img { width: 100%; height: 100%; object-fit: cover; }
.shop-ill { position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; }
.shop-no { position: absolute; left: 10px; top: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--navy); font-family: var(--en); font-weight: 700; font-size: 14px; }
.shop-body { padding: 12px 14px 14px; flex: 1; }
.shop-cat { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); padding: 1px 10px; border-radius: 99px; }
.shop h3 { font-family: var(--hand); font-weight: 500; font-size: 17px; line-height: 1.4; margin-top: 6px; }
.shop p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 2px; }

/* ---------- map ---------- */
.map { background: var(--paper); border-block: 2px dashed var(--line); }
.map-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 32px; align-items: center; }
.map-info { margin-top: 20px; padding: 18px 20px; border-radius: 18px; border: 2px solid var(--navy); background: #fff; min-height: 120px; box-shadow: 3px 4px 0 var(--navy); }
.mi-empty { color: var(--muted); }
.map-info h3 { font-family: var(--hand); font-weight: 500; font-size: 20px; }
.map-info .mi-no { font-family: var(--en); font-weight: 700; color: var(--tomato); }
.map-info p { font-size: 14px; color: var(--muted); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 13px; font-weight: 700; }
.map-legend li { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(45, 58, 74, .25); }
.map-box svg { width: 100%; height: auto; }
.booth { cursor: pointer; outline: none; }
.booth circle { stroke: var(--navy); stroke-width: 2; transition: transform .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.booth text { font-family: var(--en); font-weight: 700; font-size: 13px; fill: #fff; pointer-events: none; }
.booth.is-dark text { fill: var(--navy); }
.booth:hover circle, .booth:focus-visible circle { transform: scale(1.25); }
.booth.is-active circle { transform: scale(1.4); stroke-width: 3; filter: drop-shadow(0 3px 0 var(--navy)); }
.booth.is-dim { opacity: .25; }

/* ---------- workshop ---------- */
.ws-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: start; }
.ws-photo { background: #fff; padding: 10px 10px 40px; transform: rotate(-2deg); box-shadow: 0 10px 24px -12px rgba(45, 58, 74, .45); }
.ws-photo img { aspect-ratio: 4 / 4.4; object-fit: cover; width: 100%; }
.ws-list { display: grid; gap: 12px; }
.ws { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 16px 18px; border-radius: 18px; background: #fff; border: 2px solid var(--line); }
.ws h3 { font-family: var(--hand); font-weight: 500; font-size: 18px; }
.ws-meta { font-size: 13px; color: var(--muted); }
.ws-seat { grid-column: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.ws-bar { width: 120px; height: 8px; border-radius: 99px; background: var(--sand); overflow: hidden; }
.ws-bar i { display: block; height: 100%; background: var(--leaf); border-radius: 99px; transition: width .6s var(--ease); }
.ws.is-few .ws-bar i { background: var(--mustard); }
.ws.is-full .ws-bar i { background: var(--tomato); }
.ws-btn { grid-column: 2; grid-row: 1 / 4; min-width: 110px; min-height: 48px; border-radius: 999px; border: 2px solid var(--navy); background: var(--mustard); font-weight: 700; cursor: pointer; }
.ws-btn:disabled { background: var(--sand); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.ws-btn[aria-pressed="true"] { background: var(--leaf); color: #fff; }

/* ---------- stage ---------- */
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.stage-photo { background: #fff; padding: 10px 10px 40px; transform: rotate(2deg); box-shadow: 0 10px 24px -12px rgba(45, 58, 74, .45); }
.stage-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.timeline { position: relative; padding-left: 20px; border-left: 3px dashed var(--mustard); }
.timeline li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 12px; padding: 10px 0; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--tomato); border: 3px solid var(--cream); }
.timeline time { font-family: var(--en); font-weight: 700; font-size: 18px; color: var(--tomato); }
.timeline span { font-weight: 700; display: flex; flex-direction: column; }
.timeline small { font-weight: 400; color: var(--muted); font-size: 13px; }

/* ---------- join ---------- */
.join { background: var(--paper); border-top: 2px dashed var(--line); }
.join-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.join-photo { margin-top: 10px; border-radius: 22px; overflow: hidden; }
.join-photo img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.join-form { background: #fff; border: 2px solid var(--navy); border-radius: 24px; padding: clamp(20px, 4vw, 32px); box-shadow: 4px 5px 0 var(--navy); }
.f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.f > span { font-weight: 700; font-size: 14px; }
.f input, .f textarea { min-height: 50px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--cream); font-size: 16px; }
.f textarea { line-height: 1.7; resize: vertical; }
.f input:focus, .f textarea:focus { outline: none; border-color: var(--mustard); background: #fff; }
.f .is-invalid { border-color: var(--tomato); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; }
.chips span { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--line); background: var(--cream); font-size: 14px; font-weight: 700; transition: background .2s, border-color .2s; }
.chips input:checked + span { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.chips input:focus-visible + span { outline: 3px solid var(--mustard); outline-offset: 2px; }
.f-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--leaf); }
.err { color: var(--tomato-dark); font-size: 13px; font-weight: 700; }
.err:empty { display: none; }
.fee { margin: 6px 0 16px; padding: 12px 16px; border-radius: 14px; background: var(--sand); font-size: 14px; }
.fee b { font-family: var(--en); font-size: 24px; color: var(--tomato); margin: 0 4px; }
.fee small { display: block; color: var(--muted); font-size: 12px; }
.form-title { font-family: var(--hand); font-weight: 500; font-size: 22px; margin-bottom: 12px; }
.confirm > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 10px 0; border-bottom: 2px dotted var(--line); font-size: 14px; }
.confirm dt { font-weight: 700; color: var(--leaf); }
.form-actions { display: flex; gap: 12px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.join-done { text-align: center; }
.join-done svg { width: 90px; margin: 10px auto 14px; }
.join-done p { color: var(--muted); }

/* ---------- faq ---------- */
.faq-inner { max-width: 820px; }
.faq details { background: #fff; border: 2px solid var(--line); border-radius: 16px; margin-bottom: 10px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "＋"; position: absolute; right: 18px; top: 14px; color: var(--tomato); font-size: 20px; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #fff; padding: 0 0 30px; margin-top: 40px; position: relative; }
.footer-wave { position: absolute; left: 0; right: 0; top: -39px; width: 100%; height: 40px; }
.footer-inner { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding-top: 40px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.footer-logo { font-family: var(--hand); font-size: 30px; line-height: 1.2; display: flex; flex-direction: column; }
.footer-logo small { font-family: var(--en); font-size: 12px; color: var(--mustard); letter-spacing: .1em; }
.demo-note { width: min(1120px, calc(100% - 40px)); margin: 26px auto 0; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 11px; opacity: .8; }
.copy { width: min(1120px, calc(100% - 40px)); margin: 4px auto 0; font-family: var(--en); font-size: 12px; opacity: .7; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(24px) rotate(-.6deg); transition: opacity .8s ease, transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 1000px) {
  .gnav { display: none; }
  .shop-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .hero-inner, .about-grid, .map-grid, .ws-grid, .stage-grid, .join-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-photos { max-width: 480px; width: 100%; margin-inline: auto; }
  .about-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .about-cards b { font-size: 28px; }
  .about-cards span { font-size: 11px; line-height: 1.3; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ws-photo { max-width: 420px; }
  .ws { grid-template-columns: 1fr; }
  .ws-btn { grid-column: 1; grid-row: auto; width: 100%; }
  .about-list > div, .confirm > div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---- 日本語の改行（全サイト共通・2026-10-17 追加）----
   見出し・ボタンは文節で折り返し（Chrome/Edge）、本文は最後の行に1〜2文字だけ残るのを防ぐ。
   :where() で詳細度を0にしているので、各サイトの個別指定が常に優先される */
:where(h1, h2, h3, h4, h5, h6, dt, th, figcaption, button, label, [class*="lead"]) { word-break: auto-phrase; overflow-wrap: anywhere; text-wrap: balance; }
:where(p, li, dd, td, blockquote) { text-wrap: pretty; line-break: strict; }
:where(time, .nw) { white-space: nowrap; }

/* ---- フッターのナビと営業情報（2026-10-17 追加）---- 色と書体はフッターから受け継ぐ */
.pf-fnav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 28px; margin: 26px auto 0; padding: 0 16px; }
.pf-fnav a { padding: 6px 0; font-size: 13px; letter-spacing: .12em; text-decoration: none; color: inherit; opacity: .82; transition: opacity .2s; }
.pf-fnav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.pf-finfo { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 22px; margin: 12px auto 0; padding: 0 16px; font-size: 12.5px; line-height: 1.8; opacity: .72; }
.pf-finfo span { white-space: nowrap; }
@media (max-width: 600px) { .pf-fnav { gap: 0 20px; } .pf-finfo { flex-direction: column; align-items: center; gap: 0; } .pf-finfo span { white-space: normal; text-wrap: balance; text-align: center; } }

/* ワークショップの予約欄（管理画面の「ワークショップ予約」に届く） */
.ws-form { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; padding-top: 6px; }
.ws-form input { flex: 1 1 160px; min-width: 0; min-height: 46px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--cream); font-size: 16px; }
.ws-form input:focus { outline: none; border-color: var(--mustard); background: #fff; }
.ws-form input.is-invalid { border-color: var(--tomato); }
.ws-form button { min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--navy); background: var(--mustard); font-weight: 700; cursor: pointer; }
.ws-form .ws-cancel { background: transparent; border-color: var(--line); }
.join-closed { padding: 28px 20px; text-align: center; line-height: 1.9; }
.join-closed b { display: block; font-size: 19px; color: var(--tomato); margin-bottom: 4px; }
