:root {
  --paper: #fffdf7;
  --surface: #ffffff;
  --ink: #1d1a17;
  --ink-2: #57514b;
  --line: #1d1a17;
  --soft-line: #e4ddd2;
  --head: #e63312;       /* ばくはつの朱 */
  --head-ink: #ffffff;
  --pop: #ffd23f;        /* ばくはつの黄 */
  --pop-ink: #1d1a17;
  --sub: #2c5aa0;
  --sat: #1b2a6b;        /* 土曜はネイビー */
  --hol: #ffd23f;        /* 祝日は黄色 */
  --sun: #e63312;
  --closed: #9a948c;
  --num: "Barlow Condensed", "Zen Kaku Gothic New", sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --display: "Dela Gothic One", "Zen Kaku Gothic New", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--jp); font-size: 15px; line-height: 1.6;
  font-feature-settings: "palt";
}
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--head); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sp-only { display: none; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: var(--head); color: var(--head-ink); box-shadow: 0 2px 0 var(--ink); }
.top :focus-visible { outline-color: var(--pop); }
.top__inner, .tools, .days, .chips, .main, .foot { max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; }
.brand { margin: 0; display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.15; letter-spacing: .02em; }
.brand__burst {
  flex: none; width: 34px; height: 34px; background: var(--pop);
  clip-path: polygon(50% 0, 61% 26%, 88% 12%, 76% 39%, 100% 50%, 76% 61%, 88% 88%, 61% 74%, 50% 100%, 39% 74%, 12% 88%, 24% 61%, 0 50%, 24% 39%, 12% 12%, 39% 26%);
  animation: burst 6s ease-in-out infinite;
}
@keyframes burst { 0%, 90%, 100% { transform: scale(1) rotate(0); } 94% { transform: scale(1.25) rotate(20deg); } }
@media (prefers-reduced-motion: reduce) { .brand__burst { animation: none; } }
.pick-btn {
  flex: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--pop); color: var(--pop-ink); border: 2px solid var(--ink); border-radius: 999px; padding: 6px 7px 6px 15px; font-weight: 700;
  box-shadow: 2px 2px 0 var(--ink);
}
.pick-btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.pick-btn__n { font-family: var(--num); font-weight: 700; min-width: 26px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--pop); text-align: center; }

/* 日付の帯：8日間を1段で一望 */
.days { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px 4px; padding-top: 8px; padding-bottom: 8px; }
.day {
  appearance: none; border: 0; background: transparent; cursor: pointer; padding: 2px 0 4px; color: #fff;
  display: flex; flex-direction: column; align-items: center; border-radius: 10px;
}
.day:hover { background: rgba(255, 255, 255, .14); }
.day__m { font-family: var(--num); font-size: 12px; line-height: 1; height: 12px; }
.day__d { font-family: var(--num); font-weight: 600; font-size: 28px; line-height: 1; }
.day__w { font-size: 11px; line-height: 1.3; }
.day[data-dow="6"] .day__d, .day[data-dow="6"] .day__w { color: var(--sat); }
.day[data-dow="0"] .day__d, .day[data-dow="0"] .day__w { color: var(--pop); }
.day[data-hol] .day__d, .day[data-hol] .day__w { color: var(--hol); }
.day[aria-current="date"] { background: var(--pop); }
.day[aria-current="date"] .day__d, .day[aria-current="date"] .day__w, .day[aria-current="date"] .day__m { color: var(--ink); }

.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-bottom: 8px; }
.view { flex: none; display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; height: 38px; background: #fff; }
.view button { border: 0; background: #fff; color: var(--ink); padding: 4px 12px; cursor: pointer; font-weight: 500; }
.view button + button { border-left: 2px solid var(--ink); }
.view button[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
.search { flex: 1 1 0; min-width: 220px; }
.search input, .picker__filters input {
  width: 100%; height: 38px; border: 2px solid var(--ink); background: #fff; color: var(--ink); border-radius: 8px; padding: 6px 12px;
}
.search input::placeholder { color: #8a837b; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chips button {
  flex: none; cursor: pointer; border: 1.5px solid #fff; background: transparent; color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 13px;
}
.chips button[aria-pressed="true"] { background: #fff; color: var(--head); font-weight: 700; }

/* ---------- main ---------- */
.main { padding-top: 16px; padding-bottom: 40px; min-height: 50vh; }
.lead { margin: 4px 0 14px; font-size: 15px; }
.lead strong { font-weight: 700; }
.lead__n { font-family: var(--num); font-size: 26px; color: var(--head); padding: 0 2px; }
.lead__hol { margin-left: 6px; font-size: 12px; background: var(--head); color: #fff; padding: 1px 6px; border-radius: 4px; vertical-align: 2px; }
.note, .hint { color: var(--ink-2); }
.hint { font-size: 13px; margin: 0 0 10px; }

.area { margin: 0 0 28px; }
.area__name {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; padding-bottom: 6px;
  font-family: var(--display); font-weight: 400; font-size: 22px; border-bottom: 3px solid var(--ink);
}
.area__pref { font-family: var(--jp); font-size: 12px; color: var(--ink-2); }
.area__hashigo { font-family: var(--jp); font-size: 12px; font-weight: 700; background: var(--pop); border: 1.5px solid var(--ink); padding: 0 8px; border-radius: 999px; }
.area--closed .area__name { font-family: var(--jp); font-weight: 700; font-size: 15px; border-bottom-width: 1px; color: var(--ink-2); }

.mu { margin: 0 0 18px; }
.mu--solo { padding-bottom: 18px; border-bottom: 1px solid var(--soft-line); }
.mu__head { display: grid; gap: 2px 12px; grid-template-columns: 1fr auto; align-items: center; margin-bottom: 8px; }
.mu__title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mu__name { margin: 0; font-size: 17px; font-weight: 700; }
.mu__meta { grid-column: 1; display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 12px; color: var(--ink-2); }
.mu__links { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; }
.mu-btn { font-size: 12px; text-decoration: none; border: 1.5px solid var(--ink); border-radius: 999px; padding: 2px 10px; white-space: nowrap; background: #fff; }
.mu-btn:hover { background: var(--pop); }
.mu__note { font-size: 13px; color: var(--ink-2); margin: 4px 0 8px; }
.pill { font-size: 11px; font-weight: 700; border-radius: 4px; padding: 0 6px; }
.pill--open { background: #e3f3e8; color: #1c6b3a; }

/* 展覧会カード */
.exs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.ex {
  position: relative; background: var(--surface); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden;
  transition: transform .12s, box-shadow .12s;
}
.ex:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.ex__link { display: grid; grid-template-columns: 96px 1fr; gap: 12px; text-decoration: none; color: inherit; min-height: 128px; height: 100%; }
.ex__link .ex__body { padding-right: 40px; }
.want {
  position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--ink); background: #fff; font-size: 17px; line-height: 1; display: grid; place-items: center;
}
.want[aria-pressed="true"] { background: var(--pop); }
.want:hover { background: var(--pop); }
.ex--pick { border-color: var(--head); box-shadow: inset 0 0 0 1px var(--head); }
.ex__pickmark { margin-left: 6px; font-weight: 700; color: #fff; background: var(--head); border-radius: 4px; padding: 0 5px; }
.ex__comment { font-size: 12.5px; line-height: 1.5; background: #fff4c9; border-left: 3px solid var(--head); padding: 4px 8px; margin-top: 2px; }
.ex__img { display: block; background: var(--pop); border-right: 2px solid var(--ink); position: relative; }
.ex__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex__ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 40px; color: var(--ink); }
.ex--sub .ex__img { background: #cfe0ff; }
.ex__body { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px 10px 0; min-width: 0; }
.ex__kind { font-size: 11px; color: var(--ink-2); }
.ex--sub .ex__kind { color: var(--sub); }
.ex__title { font-weight: 700; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; }
.ex__period { font-family: var(--num); font-size: 15px; letter-spacing: .02em; color: var(--ink-2); }
.ex__badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; }
.badge { font-size: 11px; font-weight: 700; border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 7px; background: #fff; }
.badge--hot { background: var(--head); color: #fff; border-color: var(--head); }
.badge--new { background: var(--pop); }

.closed-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.closed-list li { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 14px; color: var(--ink-2); }
.closed-list a { color: var(--ink); font-weight: 500; }
.closed-list span { font-size: 12px; }

/* ---------- 会期表 ---------- */
.gantt-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.gantt { display: grid; grid-template-columns: minmax(170px, 260px) repeat(var(--cols), minmax(30px, 1fr)); min-width: 640px; align-items: stretch; }
.g-corner, .g-day { position: sticky; top: 0; background: var(--ink); color: #fff; font-size: 11px; padding: 4px 0; text-align: center; }
.g-corner { left: 0; z-index: 4; text-align: left; padding-left: 10px; display: flex; align-items: center; }
.g-day { border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.g-day b { font-family: var(--num); font-size: 18px; font-weight: 600; }
.g-day[data-dow="0"] { color: var(--pop); }
.g-day[data-dow="6"] { background: var(--sat); color: #fff; }
.g-day[data-hol] { color: var(--hol); }
.g-day.is-sel { background: var(--head); }
.g-day.is-today b { text-decoration: underline; text-underline-offset: 3px; }
.g-mu { padding: 10px 10px 2px; font-weight: 700; font-size: 14px; border-top: 1px solid var(--soft-line); }
.g-mu__in { position: sticky; left: 10px; display: inline-flex; gap: 10px; align-items: baseline; }
.g-mu a { text-decoration: none; }
.g-mu__in > span { font-weight: 400; font-size: 12px; color: var(--ink-2); }
.g-label {
  grid-column: 1; position: sticky; left: 0; z-index: 3; background: #fff; font-size: 12px; line-height: 1.35; padding: 6px 8px 6px 10px; text-decoration: none;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; border-right: 1px solid var(--soft-line);
}
.g-cell { grid-row: span 1; border-left: 1px dashed #eee5d8; min-height: 38px; }
.g-cell.is-sel { background: #fff4c9; }
.g-cell.is-closed { position: relative; z-index: 2; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(233, 228, 220, .95) 0 3px, rgba(255, 255, 255, .55) 3px 7px); }
.g-bar {
  align-self: center; height: 22px; margin: 0 2px; border-radius: 6px; background: var(--head); color: #fff; font-family: var(--num); font-size: 13px;
  display: flex; align-items: center; padding: 0 6px; overflow: hidden; white-space: nowrap; text-decoration: none; position: relative; z-index: 1;
  }
.g-bar--sub { background: var(--sub); }
.g-bar.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.g-bar.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.g-bar:hover { filter: brightness(.9); }



/* ---------- empty ---------- */
.empty { text-align: center; padding: 48px 16px; }
.empty__lead { font-family: var(--display); font-size: 22px; margin: 0 0 6px; }

/* ---------- picker ---------- */
.primary, .ghost { cursor: pointer; border-radius: 999px; padding: 8px 18px; font-weight: 700; border: 2px solid var(--ink); }
.primary { background: var(--pop); color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.ghost { background: #fff; }
.picker { border: 2px solid var(--ink); border-radius: 14px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); background: var(--paper); color: var(--ink); }
.picker::backdrop { background: rgba(29, 26, 23, .5); }
.picker__form { display: flex; flex-direction: column; max-height: calc(100dvh - 36px); }
.picker__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.picker__head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 20px; }
.picker__close { border: 0; background: none; cursor: pointer; text-decoration: underline; }
.picker__filters { padding: 0 16px 10px; }
.picker__list { overflow-y: auto; padding: 0 16px 8px; flex: 1; }
.picker__foot { display: flex; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--soft-line); }
.pref { margin-bottom: 10px; }
.pref__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-bottom: 2px solid var(--ink); padding: 4px 0; }
.pref__head h3 { margin: 0; font-size: 16px; }
.pref__toggle { border: 0; background: none; cursor: pointer; font-weight: 700; display: inline-flex; gap: 10px; align-items: baseline; padding: 0; }
.pref__toggle::before { content: "▾"; display: inline-block; transition: transform .15s; }
.pref.is-closed .pref__toggle::before { transform: rotate(-90deg); }
.pref__count { font-size: 12px; font-weight: 400; color: var(--ink-2); }
.bulk { cursor: pointer; font-size: 12px; border: 1.5px solid var(--ink); background: #fff; border-radius: 999px; padding: 1px 10px; }
.pref__body { padding-top: 6px; }
.pk-area { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; padding: 5px 0; border-bottom: 1px dashed var(--soft-line); }
.pk-area__name { font-size: 12px; color: var(--ink-2); width: 6.5em; flex: none; }
.pk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 14px; border: 1.5px solid var(--soft-line); background: #fff; border-radius: 999px; padding: 2px 10px 2px 7px; }
.pk:has(input:checked) { border-color: var(--ink); background: var(--pop); }
.pk input { accent-color: var(--ink); margin: 0; }

/* ---------- footer ---------- */
.foot { font-size: 11px; line-height: 1.7; text-align: center; color: var(--ink-2); padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--soft-line); }

@media (max-width: 640px) {
  .sp-only { display: inline; }
  .brand { font-size: 17px; }
  .brand__burst { width: 28px; height: 28px; }
  .day__d { font-size: 24px; }
  .view { width: 100%; }
  .view button { flex: 1; padding: 4px 6px; font-size: 13px; }
  .search { min-width: 0; flex-basis: 100%; }
  .exs { grid-template-columns: 1fr; }
  .mu__head { grid-template-columns: 1fr; }
  .mu__links { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .pk-area__name { width: 100%; }
  .top { position: static; }
  .gantt { grid-template-columns: 116px repeat(var(--cols), 30px); min-width: 0; }
  .g-label { font-size: 11px; padding: 5px 6px; }
}
.brand .nw { display: inline-block; white-space: nowrap; }
@media (max-width: 640px) { .brand { font-size: 16px; } }

/* ---------- 館ごとの最終取得 ---------- */
.mu__fetched { grid-column: 1 / -1; margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 0 12px; font-size: 11.5px; color: var(--ink-2); }
.mu__fetched .is-warn { color: var(--head); font-weight: 700; }
.mu__fetched a { color: inherit; }

/* ---------- めぐる ---------- */
.route-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.route-form label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.route-form select { font: inherit; border: 1.5px solid var(--ink); border-radius: 6px; padding: 3px 6px; background: #fff; }
.seg { display: inline-flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 4px 12px; cursor: pointer; font-weight: 500; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--pop); }
.route { border: 2px solid var(--ink); border-radius: 12px; background: #fff; padding: 12px 14px 14px; margin: 0 0 14px; }
.route__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 8px; }
.route__head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 19px; display: flex; gap: 10px; align-items: baseline; }
.route__head h3 span { font-family: var(--jp); font-size: 13px; color: var(--ink-2); }
.route__sum { font-size: 13px; font-weight: 700; }
.route__legs { list-style: none; margin: 0; padding: 0; }
.route__stop { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 6px 0; }
.route__time { font-family: var(--num); font-size: 22px; font-weight: 600; line-height: 1.1; display: flex; flex-direction: column; }
.route__time small { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.route__name { font-weight: 700; font-size: 16px; text-decoration: none; }
.route__name:hover { text-decoration: underline; }
.route__hours { display: block; font-size: 12px; color: var(--ink-2); }
.route__hours b { color: var(--head); }
.route__body ul { margin: 4px 0 0; padding-left: 1.1em; font-size: 14px; }
.route__body li { margin: 2px 0; }
.route__body li .badge { margin-left: 6px; }
.route__move { margin-left: 30px; padding: 2px 0 2px 42px; border-left: 3px dotted var(--ink); font-size: 12.5px; color: var(--ink-2); }
.route__map { display: inline-block; margin-top: 8px; }

/* ---------- 特集 ---------- */
.chips .chip-feature { background: var(--pop); color: var(--ink); border-color: var(--pop); font-weight: 700; }
.feat__title { font-family: var(--display); font-weight: 400; font-size: 26px; margin: 4px 0 6px; }
.feat__date { font-size: 12px; color: var(--ink-2); margin: 0 0 10px; }
.feat__lead { font-size: 16px; font-weight: 700; }
.feat__item { margin: 22px 0; }
.feat__item h3 { margin: 0 0 6px; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.feat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.feat-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; text-decoration: none; }
.feat-card span { font-size: 13px; color: var(--ink-2); }
.feat-card small { font-size: 11px; color: var(--ink-2); }
@media (max-width: 640px) {
  .view { overflow-x: auto; }
  .view button { padding: 4px 4px; font-size: 12.5px; white-space: nowrap; }
  .route__stop { grid-template-columns: 54px 1fr; }
  .route__move { margin-left: 24px; padding-left: 36px; }
}
