/* =============================================================
   おてもとソニック
   骨格:インディゴ+白+グレー/オレンジは応募ボタンだけ/影なし・1px線・角丸5px
   ============================================================= */
:root {
  --indigo: #2e53ff;
  --orange: #ff622b;
  --orange-deep: #e54f1f;
  --white: #ffffff;
  --fog: #f2f2f2;
  --bone: #f8f8f8;
  --mist: #ececec;
  --grid: #d3d3d3;
  --ink: #212121;
  --muted: #5c5c5c;

  --radius: 5px;
  --line: 1px solid var(--indigo);
  --max: 1200px;
  --gutter: 16px;
  --section: 56px;

  --font-en: "Bebas Neue", "Zen Kaku Gothic New", sans-serif;
  --font-head: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  --font-body: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --section: 80px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
p + p { margin-top: 1em; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sp-only { display: inline; }
@media (min-width: 768px) { .sp-only { display: none; } }

/* ---------- ヘッダー ---------- */
.site-header { background: var(--indigo); color: var(--white); border-bottom: 1px solid rgba(255,255,255,.35); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.site-header__logo { font-family: var(--font-en); font-size: 24px; letter-spacing: .04em; text-decoration: none; line-height: 1; white-space: nowrap; }
.site-header__nav { display: flex; gap: 8px; }
.site-header__nav a {
  font-size: 12px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--white); border-radius: var(--radius); padding: 4px 10px; white-space: nowrap;
}
.site-header__nav a:hover { background: var(--white); color: var(--indigo); }
@media (max-width: 374px) { .site-header__nav a:first-child { display: none; } }

/* ---------- 開催状況のお知らせ(中止など) ---------- */
.notice { background: var(--white); color: var(--ink); border-bottom: var(--line); }
.notice[hidden] { display: none; }
.notice__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 14px; padding-bottom: 14px; font-weight: 700; font-size: 17px; }
.notice__label {
  font-family: var(--font-head); font-size: 13px; padding: 2px 10px;
  background: var(--indigo); color: var(--white); border-radius: 3px;
}

/* ---------- いちばん上 ---------- */
.hero { background: var(--indigo); color: var(--white); padding: 40px 0 var(--section); }
.hero__inner { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1.15fr 1fr; gap: 24px; }
}
.hero__en {
  font-family: var(--font-en); font-size: clamp(64px, 17vw, 150px);
  line-height: .86; letter-spacing: .02em;
}
.hero__title {
  margin: 20px 0 0; font-family: var(--font-head); font-weight: 900;
  font-size: clamp(32px, 7.5vw, 56px); line-height: 1.25; letter-spacing: .04em;
}
.hero__lead { margin-top: 8px; font-family: var(--font-head); font-weight: 700; font-size: clamp(17px, 3.6vw, 24px); line-height: 1.5; }
/* 開催のタイミング。参考サイトの作法(白抜き文字・1px白線・大きな表示書体)で見せる */
.when {
  margin-top: 28px; max-width: 520px;
  border: 1px solid var(--white); border-radius: var(--radius);
}
.when__en {
  padding: 12px 20px 0; font-family: var(--font-en); font-size: clamp(20px, 5vw, 26px);
  line-height: 1; letter-spacing: .08em; opacity: .85;
}
.when__ja {
  margin: 0 !important; padding: 6px 20px 0; font-family: var(--font-head); font-weight: 900;
  font-size: clamp(34px, 9.4vw, 58px); line-height: 1.2; letter-spacing: .02em; white-space: nowrap;
}
.when__time {
  margin: 0 !important; padding: 0 20px 14px; font-family: var(--font-en); font-size: clamp(28px, 7vw, 40px);
  line-height: 1.1; letter-spacing: .04em;
}
.when__next {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
  margin: 0 !important; padding: 10px 20px; border-top: 1px solid var(--white);
  font-family: var(--font-en); font-size: 24px; line-height: 1.1; letter-spacing: .04em;
}
.when__next-label { font-size: 15px; padding: 2px 6px 0; border: 1px solid var(--white); border-radius: 3px; }
.when__next .is-pending { font-family: var(--font-head); font-size: 16px; font-weight: 700; }

/* キャラクターは背景なしで直接置く */
.hero__visual { position: relative; width: 100%; margin: 0 auto; }
.hero__cat { width: 100%; max-width: 440px; margin: 0 auto; }
@media (max-width: 899px) { .hero__cat { max-width: 300px; } }

/* ---------- セクション共通 ---------- */
.band { padding: var(--section) 0; }
.band--white { background: var(--white); }
.band--gray { background: var(--fog); }
.band--indigo { background: var(--indigo); color: var(--white); }

.sec-head {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center;
  margin: 0 0 32px; padding-bottom: 16px; border-bottom: var(--line); font-weight: normal;
}
.sec-head__num {
  grid-row: 1 / 3; display: grid; place-items: center; width: 52px; height: 52px;
  border: var(--line); border-radius: var(--radius);
  font-family: var(--font-en); font-size: 30px; line-height: 1; padding-top: 3px; color: var(--indigo);
}
.sec-head__en { font-family: var(--font-en); font-size: clamp(34px, 7vw, 56px); line-height: .9; letter-spacing: .03em; color: var(--indigo); }
.sec-head__ja { font-family: var(--font-head); font-weight: 700; font-size: 15px; line-height: 1.4; color: var(--ink); }
.sec-head--rev { border-bottom-color: var(--white); }
.sec-head--rev .sec-head__num { border-color: var(--white); color: var(--white); }
.sec-head--rev .sec-head__en, .sec-head--rev .sec-head__ja { color: var(--white); }
.sec-lead { margin-bottom: 24px; }

/* ---------- 01 おてもとソニックとは ---------- */
.about { display: grid; gap: 32px; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; } }
/* メインキャッチの右側:写真のモチーフを描き起こした線画で余白を埋める */
.catch-row { display: grid; gap: 16px; align-items: center; }
.illust { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; }
.illust img { width: 100%; height: auto; }
@media (max-width: 899px) { .illust { max-width: 360px; margin-bottom: 28px; } }
@media (min-width: 900px) {
  .catch-row { grid-template-columns: auto 1fr; gap: 40px; }
  .illust {
    grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: auto auto; gap: 18px 14px;
    grid-template-areas: "stall coffee ukulele" "stall stand table";
  }
  .illust__stall { grid-area: stall; align-self: center; }
  .illust__coffee { grid-area: coffee; }
  .illust__ukulele { grid-area: ukulele; transform: translateY(-10px); }
  .illust__stand { grid-area: stand; }
  .illust__table { grid-area: table; }
}

/* メインキャッチ(3行とも同じ大きさ) */
.catch {
  margin: 8px 0 20px; color: var(--indigo); font-family: var(--font-head); font-weight: 900;
  font-size: clamp(52px, 15vw, 128px); line-height: 1.12; letter-spacing: .02em;
}
.catch-lead {
  font-family: var(--font-head); font-weight: 700; font-size: clamp(18px, 4.4vw, 26px); line-height: 1.6;
  padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--grid);
}
.photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: var(--line); border-radius: var(--radius); }
/* ---------- 02 日曜日の過ごし方 ---------- */
.sub-catch { font-family: var(--font-head); font-weight: 900; color: var(--indigo); font-size: clamp(28px, 6.6vw, 44px); line-height: 1.3; margin-bottom: 20px; }
.spend__close { font-family: var(--font-head); font-weight: 700; font-size: clamp(17px, 4vw, 20px); line-height: 1.7; }
/* 参考サイトの「左に見出しを固定+右に番号つきの一覧」の形 */
.spend-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 32px; border: var(--line); border-radius: var(--radius); }
@media (min-width: 900px) { .spend-photo { aspect-ratio: 2 / 1; } }
.spend-wrap { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .spend-wrap { grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
  .spend-side { position: sticky; top: 24px; }
}
.spend { margin: 0; padding: 0; list-style: none; display: grid; border-bottom: var(--line); }
@media (min-width: 600px) { .spend { grid-template-columns: 1fr 1fr; column-gap: 24px; } }
.spend li {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: var(--line);
  font-family: var(--font-head); font-weight: 700; font-size: 17px; line-height: 1.45; color: var(--ink); word-break: auto-phrase;
}
.spend__num {
  flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding-top: 3px;
  border: var(--line); border-radius: var(--radius); background: var(--white);
  font-family: var(--font-en); font-weight: 400; font-size: 22px; color: var(--indigo);
}
.relief { margin: 36px 0 0; padding: 8px 20px; background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); font-size: 15px; }
.relief > div { display: grid; grid-template-columns: 4em 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px dashed var(--grid); }
.relief > div:last-child { border-bottom: 0; }
.relief dt { font-weight: 700; color: var(--indigo); }
.relief dd { margin: 0; }

/* ---------- 04 次回の開催(縁日の引換券) ---------- */
.ticket {
  display: grid; background: var(--white); color: var(--ink);
  border: 1px solid var(--white); border-radius: var(--radius);
}
.ticket__main { padding: 28px 24px; border-bottom: 2px dashed var(--indigo); }
.ticket__label { font-size: 13px; font-weight: 700; color: var(--indigo); }
.ticket__date {
  margin-top: 4px; font-family: var(--font-head); font-weight: 900; color: var(--indigo);
  font-size: clamp(26px, 6.4vw, 44px); line-height: 1.3;
}
.ticket__note { margin-top: 8px; font-size: 14px; color: var(--muted); }
.ticket__info { margin: 0; padding: 20px 24px 8px; }
.ticket__info > div { display: grid; grid-template-columns: 4em 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.ticket__info > div:last-child { border-bottom: 0; }
.ticket__info dt { font-weight: 700; color: var(--indigo); }
.ticket__info dd { margin: 0; }
.ticket > .btn { margin: 8px 24px 28px; justify-self: start; }
@media (min-width: 900px) {
  .ticket { grid-template-columns: 1fr 1.3fr; grid-template-rows: auto 1fr; }
  .ticket__main { grid-row: 1 / 3; border-bottom: 0; border-right: 2px dashed var(--indigo); padding: 40px; display: flex; flex-direction: column; justify-content: center; }
  .ticket__info { padding: 28px 40px 8px; }
  .ticket > .btn { margin: 8px 40px 36px; align-self: start; }
}

/* ---------- 03 長屋のみなさん ---------- */
.exhibitors { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .exhibitors { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .exhibitors { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.exhibitor {
  display: block; background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius);
  padding: 24px; text-decoration: none;
}
a.exhibitor:hover { border-color: var(--indigo); }
.exhibitor img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 14px; }
.exhibitor__genre { font-size: 12px; font-weight: 700; color: var(--indigo); }
.exhibitor__name { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.4; color: var(--indigo); }
.exhibitor__text { margin-top: 6px !important; font-size: 14px; color: var(--muted); }
.exhibitor--empty { border-style: dashed; background: var(--bone); }
.exhibitor--empty .exhibitor__name { color: var(--muted); }
.exhibitor--you { grid-column: 1 / -1; border: 1px dashed var(--indigo); background: var(--white); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; }
.exhibitor--you .exhibitor__more { margin-top: 0 !important; margin-left: auto; }
.exhibitor--you:hover { background: var(--bone); }
.exhibitor__more { margin-top: 12px !important; font-size: 13px; font-weight: 700; color: var(--indigo); }
.exhibitor__more::after { content: " →"; }

/* ---------- 05 出店してみたい方へ ---------- */
.apply { display: grid; gap: 28px; align-items: start; }
@media (min-width: 900px) { .apply { grid-template-columns: 1fr 1fr; gap: 56px; } }
.apply__card { background: var(--white); border: 1px solid var(--grid); border-radius: var(--radius); padding: 28px 24px; }
@media (min-width: 900px) { .apply__card { padding: 36px; } }
.apply__card-title { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--indigo); }
.apply__card .btn { width: 100%; margin-top: 24px; }
.apply__catch { font-family: var(--font-head); font-weight: 900; color: var(--indigo); font-size: clamp(24px, 5vw, 34px); line-height: 1.4; margin-bottom: 16px; }
.terms { margin: 16px 0 0; border-top: 1px solid var(--grid); font-size: 15px; }
.terms > div { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--grid); }
.terms dt { font-weight: 700; color: var(--indigo); }
.terms dd { margin: 0; }

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 24px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.4;
  text-decoration: none; text-align: center;
}
.btn--orange { background: var(--orange); color: var(--white); border: 1px solid var(--orange); font-size: 18px; min-height: 60px; }
.btn--orange:hover { background: var(--orange-deep); border-color: var(--orange-deep); }
.btn--ghost-indigo { border: var(--line); color: var(--indigo); background: var(--white); }
.btn--ghost-indigo:hover { background: var(--indigo); color: var(--white); }

/* 上に戻るボタン(スクロールで下がったら右下に出る。青い帯の上でも見えるよう白い線で縁取る) */
.to-top {
  position: fixed; right: var(--gutter); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 52px; height: 52px; border: 1px solid var(--white); border-radius: var(--radius);
  background: var(--indigo); color: var(--white); text-decoration: none;
  font-family: var(--font-en); font-size: 14px; letter-spacing: .06em; line-height: 1;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--white); color: var(--indigo); border-color: var(--indigo); }
.to-top:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .to-top { transition: none; transform: none; } }
/* URLが未設定のとき(近日公開) */
.btn.is-disabled, .btn.is-disabled:hover {
  background: var(--mist); border: 1px dashed var(--grid); color: var(--muted); cursor: default;
}

/* ---------- 06 最新の情報 ---------- */
.sns { display: grid; gap: 10px; }
@media (min-width: 768px) { .sns { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
.sns__item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 18px 20px; border: 1px solid var(--white); border-radius: var(--radius);
  text-decoration: none; color: var(--white);
}
.sns__item:hover { background: var(--white); color: var(--indigo); }
.sns__name { font-family: var(--font-en); font-size: 30px; line-height: 1; letter-spacing: .04em; padding-top: 3px; }
.sns__status { font-size: 13px; font-weight: 700; }
.sns__item.is-disabled, .sns__item.is-disabled:hover { border-style: dashed; background: transparent; color: rgba(255,255,255,.7); cursor: default; }

/* ---------- フッター ---------- */
.site-footer { background: var(--white); padding: 48px 0 32px; border-top: var(--line); font-size: 13px; }
.site-footer__logo { font-family: var(--font-en); font-size: 40px; line-height: 1; color: var(--indigo); letter-spacing: .03em; }
.site-footer__info { margin: 20px 0 0; font-size: 15px; }
.site-footer__info > div { display: grid; grid-template-columns: 3em 1fr; gap: 8px; padding: 4px 0; }
.site-footer__info dt { font-weight: 700; color: var(--indigo); }
.site-footer__info dd { margin: 0; }
.site-footer__copy { margin-top: 24px; color: var(--muted); }

/* フォーカスを見やすく(キーボード操作向け) */
a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- 動き(試行中・2026-10-24)。軽さ優先:外部ライブラリなし、1回だけ、短く ---------- */
html { scroll-behavior: smooth; }
.btn, .sns__item, .exhibitor, .site-header__nav a { transition: background-color .15s, color .15s, border-color .15s; }
@media (prefers-reduced-motion: no-preference) {
  /* いちばん上:読み込み時に、名前と開催情報が下からふわっと出る */
  .hero__text > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero__text > :nth-child(2) { animation-delay: .08s; }
  .hero__text > :nth-child(3) { animation-delay: .16s; }
  .hero__text > :nth-child(4) { animation-delay: .24s; }
  .hero__cat { animation: rise .8s .2s cubic-bezier(.2, .7, .2, 1) both; }
  /* 各セクション:画面に入ったときに一度だけ出る(main.js が .is-in を付ける) */
  .js-motion .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js-motion .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- 動き 第2段階(2026-10-25)。元のサイトの動きのうち、軽い3つを再現 ---------- */
/* ② 流れる文字の帯 */
.looper { overflow: hidden; border-bottom: var(--line); }
.looper__rail { overflow: hidden; padding: 12px 0; background: var(--white); color: var(--indigo); }
.looper__rail--rev { background: var(--indigo); color: var(--white); }
.looper__track { display: flex; width: max-content; }
.looper__track span { flex: none; padding: 0 22px; font-family: var(--font-en), var(--font-head); font-weight: 400; font-size: clamp(22px, 4vw, 34px); line-height: 1.1; letter-spacing: .04em; white-space: nowrap; }
.looper__rail--rev .looper__track span { font-family: var(--font-head); font-weight: 900; font-size: clamp(18px, 3.2vw, 26px); }
.looper__track span::after { content: "●"; display: inline-block; margin-left: 44px; font-size: .4em; vertical-align: middle; }

@media (prefers-reduced-motion: no-preference) {
  .looper__track { animation: loop 40s linear infinite; }
  .looper__rail--rev .looper__track { animation-direction: reverse; animation-duration: 46s; }

  /* ① 見出しが行ごとに下からせり上がる(main.js が行に分ける) */
  .js-motion .split .h-line { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
  .js-motion .split .h-line > span { display: inline-block; transform: translateY(110%); transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
  .js-motion .split.is-in .h-line > span { transform: none; }
  .js-motion .split .h-line:nth-child(2) > span { transition-delay: .09s; }
  .js-motion .split .h-line:nth-child(3) > span { transition-delay: .18s; }
  .js-motion .hero__en.split { animation: none; }

  /* ③ スクロールに合わせて一覧が光る(読んでいる位置の項目だけ青く、ほかはグレー。切り替えは一瞬) */
  .js-motion .spend li { color: #9a9a9a; }
  .js-motion .spend li .spend__num { color: #9a9a9a; border-color: var(--grid); }
  .js-motion .spend li.is-active { color: var(--ink); }
  .js-motion .spend li.is-active .spend__num { background: var(--indigo); border-color: var(--indigo); color: var(--white); }
}
@keyframes loop { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ⑥ なめらかな慣性スクロール(Lenis)が動いているときの決まりごと */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ⑦ 物理演算で降ってきて積み重なる場所。動きがないときは、下にそろえて並べた絵として見せる */
.pile {
  position: relative; overflow: hidden; height: 260px; background: var(--white); border-top: var(--line);
  display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding: 0 var(--gutter);
}
@media (min-width: 768px) { .pile { height: 330px; } }
.pile__item { flex: none; width: 70px; height: auto; user-select: none; -webkit-user-drag: none; }
@media (min-width: 768px) { .pile__item { width: 110px; } }
.pile:not(.is-physics) .pile__item:nth-child(n+7) { display: none; }
.pile.is-physics { display: block; cursor: grab; }
.pile.is-physics.is-grabbing { cursor: grabbing; }
.pile.is-physics .pile__item { position: absolute; left: 0; top: 0; will-change: transform; }

/* ⑦ いちばん上:ねこの周りに降らせる物。動きがないときは出さない(ねこだけを見せる) */
.hero { overflow: hidden; }
.hero__visual .pile__item { display: none; }
.hero__visual.is-physics .pile__item { display: block; position: absolute; left: 0; top: 0; z-index: 1; will-change: transform; }
.hero__visual.is-physics { cursor: grab; }
.hero__visual.is-physics.is-grabbing { cursor: grabbing; }
