/* 白地のシンプルな画面。色・余白・サイズの指定をまとめています。 */
:root { color-scheme: light; font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif; color: #202620; background: #fff; }
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.45; }
main { width: min(100% - 40px, 760px); margin: 18px auto; }
h1 { margin: 0; font-size: 25px; line-height: 1.5; }
label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.search-row { display: flex; gap: 8px; max-width: 360px; }
input, button { font: inherit; }
input { flex: 1; width: 100%; min-width: 0; min-height: 34px; height: 34px; padding: 3px 10px; border: 1px solid #8d978d; border-radius: 5px; font-size: 16px; background: #fff; color: #202620; }
button { min-height: 34px; flex-shrink: 0; padding: 3px 14px; border: 1px solid #263e2b; border-radius: 5px; background: #263e2b; color: #fff; cursor: pointer; font-size: 15px; }
button:disabled { opacity: .5; cursor: wait; }
button.secondary { color: #394439; background: #fff; border-color: #8d978d; }
button.secondary:disabled { cursor: default; }
.field-label { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.week-dates { display: flex; gap: 4px; overflow-x: auto; padding: 4px 4px 8px; margin: -4px -4px 6px; }
.week-dates button { flex: 0 0 54px; min-height: 42px; padding: 3px 4px; font-size: 14px; white-space: nowrap; background: #fff; color: #394439; border-color: #a4ada4; line-height: 1.2; }
.week-dates button span { display: block; font-size: 12px; }
.week-dates button[aria-pressed="true"] { background: #263e2b; border-color: #263e2b; color: #fff; }
.week-dates .saturday { color: #2360a6; }
.week-dates .sunday { color: #b42335; }
.week-dates button[aria-pressed="true"] .saturday { color: #acd4ff; }
.week-dates button[aria-pressed="true"] .sunday { color: #ffbac4; }
a { color: #254f32; text-underline-offset: 3px; overflow-wrap: anywhere; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #82a388; outline-offset: 3px; }
.hint { margin: 4px 0 9px; color: #697269; font-size: 12px; }
.hint:empty { display: none; }
#search-status { margin: 10px 0 6px; font-size: 14px; overflow-wrap: anywhere; }
#search-status.error { color: #a12f27; }
.event { padding: 8px 0; border-top: 1px solid #d9dfd9; overflow-wrap: anywhere; }
.event .event-date { margin: 0; font-size: 14px; font-weight: 700; }
.event-day { font-size: 14px; }
h2 { font-size: 16px; line-height: 1.4; margin: 2px 0; }
.event p { margin: 2px 0; font-size: 14px; }
.event dl { margin: 3px 0 0; }
.event dt { font-size: 12px; color: #687368; margin-top: 4px; }
.event dd { margin: 0; font-size: 14px; white-space: pre-wrap; }
.notice { border-left: 3px solid #c5a25a; padding: 3px 8px; background: #fff9ee; white-space: pre-wrap; }
.cancelled h2 { text-decoration: line-through; }
.cancelled .event-date { color: #a03129; }
/* タイトルは16px、日付・本文・時刻は14px。時刻は太字で強調します。 */
.event .event-schedule { margin: 1px 0 2px; font-size: 14px; font-variant-numeric: tabular-nums; }
.event-schedule strong { font-weight: 700; }
.event-open { font-weight: 400; }
.event-actions { display: flex; justify-content: flex-start; margin-top: 3px; }
.calendar-link { display: inline-flex; flex: 0 0 auto; align-items: center; min-height: 30px; padding: 3px 8px; border: 1px solid #b3bdb3; border-radius: 5px; background: #fff; font-size: 13px; text-decoration: none; white-space: nowrap; }
.event-performers { line-height: 1.3; }
.calendar-link:hover { background: #f0f5f0; border-color: #263e2b; }
/* スマホでは文字の読みやすさを保ちつつ、余白を小さくします。 */
@media (max-width: 600px) {
  main { width: calc(100% - 32px); margin: 14px auto; }
  h1 { font-size: 22px; }
  input { font-size: 16px; padding: 3px 10px; }
  button { padding: 3px 12px; }
  h2 { font-size: 16px; }
  .event { padding: 7px 0; }
}

.place-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.place-buttons button { min-height: 30px; padding: 3px 6px; font-size: 13px; background: #fff; color: #394439; border-color: #a4ada4; }
.place-buttons button[aria-pressed="true"] { background: #263e2b; color: #fff; border-color: #263e2b; }
.event dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.event dt { margin: 0; padding-top: 1px; }
.favorite-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 7px 0 5px; }
.favorite-heading .field-label { margin: 0; }
.favorite-heading button { min-height: 28px; padding: 2px 9px; font-size: 12px; }
/* 名前は1行に保ち、画面幅を超える場合だけ省略して解除ボタンの幅を確保します。 */
.favorites { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 8px; }
.favorite-item { display: inline-flex; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.favorite-item button { min-height: 30px; background: #fff; color: #394439; border-color: #a4ada4; padding: 3px 9px; font-size: 13px; }
.favorite-item .favorite-search { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 5px 0 0 5px; text-align: left; }
.favorite-item .favorite-remove { flex: 0 0 30px; padding: 3px 6px; border-left: 0; border-radius: 0 5px 5px 0; }
.favorite-item button:disabled { opacity: .5; }
/* 検索対象ごとに枠で区切り、お気に入りはグループの枠内に置きます。 */
.search-section { min-width: 0; margin: 0 0 7px; padding: 5px 9px 8px; border: 1px solid #d9dfd9; border-radius: 5px; }
.search-section legend { padding: 0 5px; font-size: 14px; font-weight: 700; }
.search-section .hint:last-child, .search-section .place-buttons { margin-bottom: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.date-range { display: grid; grid-template-columns: minmax(105px, 1fr) minmax(105px, 1fr) auto; align-items: end; gap: 4px; max-width: 520px; overflow-x: auto; padding-bottom: 3px; }
.date-range-field { flex: 1; min-width: 0; }
.date-range-field label { font-size: 12px; font-weight: 400; margin-bottom: 3px; }
.date-range input { display: block; width: 100%; min-width: 0; max-width: 100%; padding: 3px 4px; font-size: 13px; appearance: none; -webkit-appearance: none; }
.date-range input::-webkit-date-and-time-value { text-align: left; min-width: 0; }
.date-range button { min-height: 34px; padding: 3px 7px; font-size: 12px; white-space: nowrap; }
.search-section legend button { margin-left: 5px; min-height: 24px; padding: 1px 8px; font-size: 12px; font-weight: 400; vertical-align: middle; }
.range-error { margin: 5px 0 0; color: #a12f27; font-size: 12px; }
.results-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; margin: 8px 0 6px; }
.results-toolbar #search-status { margin: 0; flex: 1 1 180px; }
.share-x[aria-disabled="true"] { opacity: .45; cursor: default; }
.favorite-item .favorite-search[aria-pressed="true"] { background: #263e2b; color: #fff; border-color: #263e2b; }
/* PCでは検索欄と同じ幅に収め、スマホでは画面幅に合わせて2等分します。 */
.search-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 360px; margin: 10px 0; }
.search-actions .reset-filters, .search-actions .share-x { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 40px; margin: 0; padding: 5px 8px; border: 1px solid #263e2b; border-radius: 5px; background: #263e2b; color: #fff; font-size: 15px; font-weight: 400; line-height: 1.45; text-decoration: none; white-space: nowrap; }
.search-actions .reset-filters:hover, .search-actions .share-x:hover { background: #36543b; }
.performer-link { display: inline-block; padding: 0; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.performer-link:hover { text-decoration-style: solid; }
.page-footer { display: flex; justify-content: center; padding: 20px 0 28px; }
.page-footer button { min-height: 40px; padding: 5px 24px; }
/* 文字サイズを保ったまま、見出しを左に置き、検索欄の縦の余白を減らします。 */
main { margin-top: 10px; }
header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 12px; margin-bottom: 6px; }
.site-title { display: flex; align-items: center; gap: 9px; min-width: 0; max-width: 100%; line-height: 1.35; }
.site-title > span { min-width: 0; overflow-wrap: anywhere; }
.site-icon { display: block; flex: 0 0 44px; width: 44px; height: 44px; object-fit: contain; }
.site-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 12px; }
.classic-link { display: inline-block; padding-block: 5px; font-size: 13px; white-space: nowrap; }
.site-updated { margin: 0; font-size: 12px; line-height: 1.5; color: #687368; white-space: nowrap; }
.search-section { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: start; gap: 4px; margin: 0 0 4px; padding: 5px 7px; border: 1px solid #d9dfd9; border-radius: 5px; }
.beta-badge { display: inline-block; margin-left: 3px; padding: 0 3px; border: 1px solid #a4ada4; border-radius: 3px; color: #687368; font-size: 10px; font-weight: 400; vertical-align: 1px; }
.section-label { padding-top: 5px; font-size: 14px; font-weight: 700; line-height: 1.45; white-space: nowrap; }
.section-controls { min-width: 0; }
.button-section { display: flex; flex-wrap: wrap; gap: 4px; }
.button-section .section-label { flex: 0 0 60px; align-self: center; padding-top: 0; }
.button-section .section-controls, .button-section .place-buttons { display: contents; }
#additional-place { flex: 0 0 76px; width: 76px; min-width: 0; max-width: 100%; min-height: 30px; padding: 3px 3px; font: inherit; font-size: 13px; color: #394439; background: #fff; border: 1px solid #a4ada4; border-radius: 5px; }
/* iPhoneのselect固有の高さを解除し、開催地ボタンと同じ寸法にそろえます。 */
#additional-place, #place-buttons button { height: 30px; min-height: 30px; margin: 0; line-height: 1.4; }
#additional-place { -webkit-appearance: none; appearance: none; padding: 3px 22px 3px 8px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='m1 1 4 4 4-4' fill='none' stroke='%23394439' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 7px center; background-size: 10px 6px; }
#place-storage-status { flex-basis: 100%; margin: 2px 0 0; }
#additional-place:focus-visible { outline: 3px solid #82a388; outline-offset: 3px; }
.additional-places { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; max-width: 100%; }
.additional-places:empty { display: none; }
.additional-place-tag { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; border: 1px solid #263e2b; border-radius: 5px; color: #263e2b; background: #f0f5f0; font-size: 13px; }
.additional-place-tag > span { padding: 3px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.additional-place-tag button { min-height: 28px; padding: 2px 7px; border: 0; border-left: 1px solid #b4c4b4; border-radius: 0 4px 4px 0; color: #263e2b; background: transparent; font-size: 14px; }
.search-section:first-child .section-controls { display: contents; }
.search-section:first-child .week-dates, .search-section:first-child .date-range, .search-section:first-child .hint, .search-section:first-child .range-error { grid-column: 2; }
.week-dates { margin: 0 0 4px; padding: 0 0 3px; gap: 4px; }
.date-range { padding-bottom: 0; }
.place-buttons { margin: 0; gap: 4px; }
.place-buttons button { white-space: nowrap; line-height: 1.4; }
#category-buttons button { padding-inline: 4px; }
.group-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.search-row { flex: 1 1 250px; gap: 5px; min-width: 0; max-width: 350px; }
.favorite-heading { margin: 0; gap: 4px; }
.favorite-heading .field-label { white-space: nowrap; }
.favorites:not(:empty) { margin-top: 5px; }
.search-actions { margin: 6px 0; }
.results-toolbar { margin: 6px 0 4px; }
@media (max-width: 600px) {
  main { width: calc(100% - 20px); margin-top: 8px; }
  .site-icon { flex-basis: 40px; width: 40px; height: 40px; }
  .search-section { grid-template-columns: 56px minmax(0, 1fr); gap: 3px; padding: 4px 5px; }
  .group-main { gap: 4px; }
  .button-section .section-label { flex-basis: 56px; }
  #group-section .section-controls, .group-main { display: contents; }
  #group-section .favorite-heading, #group-section .favorites, #group-section .hint { grid-column: 1 / -1; }
  #group-section .search-row { grid-column: 2; }
  .search-row { flex-basis: 100%; max-width: none; }
  .date-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; max-width: 100%; }
  .search-section:first-child .date-range, .search-section:first-child .hint, .search-section:first-child .range-error { grid-column: 1 / -1; }
  .date-range input { font-size: 13px; padding-left: 2px; padding-right: 2px; }
  .search-actions { max-width: none; }
  .date-range-field { min-width: 0; width: 100%; }
  .date-range input { width: 100%; min-width: 0; max-width: 100%; }
}
