#match-panel, #topics, .official-hobby-anchor, #home-open-meetings { scroll-margin-top: 85px; }
.schedule-controls { display: grid; gap: 10px; margin: 16px 0 20px; }
.schedule-tabs { display: flex; gap: 4px; padding: 4px; background: #f0e7da; border-radius: 12px; max-width: 470px; }
.schedule-tabs button, .schedule-filters button, .calendar-header button, .calendar-day {
  min-height: 44px; font: inherit; font-size: .9rem; font-weight: 750; color: #40392d; cursor: pointer;
}
.schedule-tabs button { flex: 1; border: 0; border-radius: 8px; background: transparent; white-space: nowrap; }
.schedule-tabs button[aria-pressed="true"] { background: #fffdf8; color: #853825; box-shadow: 0 1px 4px #37251924; }
.schedule-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-filters button { padding: 3px 13px; border: 1px solid #dfd5c7; border-radius: 30px; background: #fffcf6; }
.schedule-filters button[aria-pressed="true"] { border-color: #bb7563; background: #f5e4da; color: #703520; }
.schedule-list-section { margin: 20px 0 24px; }
.schedule-list-section h3 { font-size: 1rem; margin: 0 0 10px; }
.schedule-entries { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,290px),1fr)); gap: 10px; }
.schedule-entry {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 13px 14px 7px;
  border: 1px solid #e2d8c9; border-left: 4px solid #798252; border-radius: 12px; background: #fffdf8;
}
.schedule-entry.entry-official { border-left-color: #b85742; }
.schedule-entry.entry-candidate { border-left-color: #ad8c56; }
.schedule-entry small { display: block; color: #6b5e4b; font-size: .77rem; font-weight: 740; margin-bottom: 4px; }
.schedule-entry h4 { margin: 0 0 4px; font-size: 1.02rem; }
.schedule-entry p { margin: 3px 0; font-size: .86rem; }
.schedule-entry .text-link { margin-top: auto; min-height: 44px; width: auto; }
.schedule-entry .participation-count { padding: 2px 0; margin: 4px 0; }
.calendar-sheet { max-width: 560px; padding: 8px; background: #fffdf8; border: 1px solid #e2d8c9; border-radius: 14px; }
.calendar-header { display: flex; align-items: center; justify-content: space-between; min-height: 47px; margin-bottom: 4px; }
.calendar-header h3 { font-size: 1rem; margin: 0; }
.calendar-header button { min-width: 44px; font-size: 1.35rem; border: 0; border-radius: 8px; background: #f5eee3; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 2px; }
.calendar-weekday { text-align: center; font-size: .75rem; line-height: 2; color: #645b4e; }
.calendar-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 1px; border: 1px solid transparent; border-radius: 8px; background: #fffdf8; }
.calendar-day[aria-current="date"] { border-color: #a45640; }
.calendar-day[aria-pressed="true"] { color: #713822; background: #f5e4da; }
.calendar-dots { display: flex; gap: 3px; height: 6px; }
.calendar-dots i, .calendar-legend i { background: #686f45; display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.calendar-dots .candidate, .calendar-legend .candidate { background: #ad8c56; }
.calendar-dots .official, .calendar-legend .official { background: #ac4732; }
.calendar-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 15px; margin: 9px 0 3px; color: #595043; font-size: .75rem; }
.calendar-legend i { margin-right: 5px; vertical-align: 1px; }
.map-container { height: clamp(320px, 53vh, 510px); border: 1px solid #ded6c7; border-radius: 14px; z-index: 0; overflow: hidden; background: #eae6d9; }
.map-container > p { padding: 16px; }
.map-note { margin: 8px 0; font-size: .83rem; color: #5e5547; }
.map-container.leaflet-container {
  background-color: #eeede4;
  background-image: linear-gradient(#71634f08 1px,transparent 1px),linear-gradient(90deg,#71634f08 1px,transparent 1px);
  background-size: 34px 34px;
}
.district-map-caption {
  display: block; padding: 5px 9px; color: #554b3d; background: #fffdf8; border: 1px solid #ddd5c7;
  border-radius: 6px; font-size: .8rem; font-weight: 750;
}
.district-map-marker { overflow: visible; }
.district-map-marker span {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; min-height: 30px;
  white-space: nowrap; padding: 2px 4px; border: 1px solid #a55a41; border-radius: 6px;
  color: #632f21; background: #fffaf0; box-shadow: 0 1px 3px #55362728;
  font: 760 .72rem/1.2 system-ui,sans-serif;
}
.district-map-marker b { color: #fff; background: #873b28; border-radius: 9px; min-width: 16px; padding: 2px 3px; text-align: center; font-size: 10px; }
.district-map-marker:focus-visible span { outline: 2px solid #222; outline-offset: 2px; }
.map-source { margin: 3px 0 11px; color: #665d4b; font-size: .72rem; }
.map-source a { color: inherit; text-decoration: underline; }
.map-popup-activity { margin-right: 5px; font-size: 16px; }
.map-container:has(.leaflet-popup) .leaflet-top { z-index: 650; }
.map-container .leaflet-popup-content details { margin: 5px 0; }
.map-container .leaflet-popup-content summary { padding: 8px 0; color: #6a3927; font-weight: 750; cursor: pointer; }
.map-container .leaflet-popup-content ul { margin: 5px 0 0; padding-left: 17px; }
.map-container .leaflet-popup-content a { display: inline-block; padding: 7px 0; font-weight: 700; }
.profile-photo-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin: 16px 0;
  border: 1px solid #e3d8c9; background: #fffcf6; border-radius: 14px;
}
.profile-photo-preview { flex: 0 0 72px; width: 72px; height: 72px; }
.profile-photo-preview img, .profile-photo-preview .member-avatar { display: grid; border-radius: 50%; height: 72px; width: 72px; object-fit: cover; place-items: center; font-size: 28px; }
.profile-photo-controls { min-width: 0; }
.profile-photo-controls h3, .profile-photo-controls p { margin: 0 0 6px; }
.photo-upload-label { display: grid; gap: 5px; margin: 8px 0; color: #423323; font-size: .86rem; font-weight: 700; }
.photo-upload-label input { width: 100%; max-width: 255px; font: inherit; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px 11px; margin-top: 9px; }
.photo-actions .button { padding-inline: 13px; min-height: 44px; }
.photo-actions [disabled] { opacity: .57; cursor: default; }
.photo-actions [hidden] { display: none; }
.home-open { margin: 36px 0; }
.home-open h2 { margin: 0 0 6px; }
.home-open-intro { margin: 0 0 14px; }
.home-open-links { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 9px; }
@media (max-width: 380px) {
  .profile-photo-card { flex-wrap: wrap; }
  .schedule-filters button { padding-inline: 9px; }
}

.hobby-visual-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,205px),1fr)); gap: 12px; }
.hobby-visual-card {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  border: 1px solid #e2d8c9; border-radius: 13px; background: #fffdf8; color: inherit;
}
.hobby-visual-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #ede6d9; }
.hobby-visual-body { display: flex; flex: 1; flex-direction: column; padding: 10px 12px; gap: 5px; }
.hobby-visual-body h3 { margin: 0; font-size: clamp(1rem, 3.7vw, 1.28rem); line-height: 1.22; letter-spacing: -.045em; }
.hobby-visual-meta { margin: 1px 0; color: #615343; font-size: .86rem; }
.hobby-visual-card .participation-count { padding: 3px 0; }
.hobby-visual-card .member-avatar { width: 24px; height: 24px; }
.hobby-visual-card .avatar-anonymous::before { top: 4px; width: 6px; height: 6px; }
.hobby-visual-card .avatar-anonymous::after { top: 11px; width: 10px; height: 6px; }
.hobby-visual-link { margin-top: auto; font-size: .85rem; color: #843925; font-weight: 750; }
.hobby-visual-card:hover .hobby-visual-link { text-decoration: underline; }
.hobby-visual-card.for-notice { border-color: #d7c3a6; background: #fcf7ee; }
.topic-schedule-heading {
  display: grid; grid-template-columns: minmax(96px,165px) minmax(0,1fr); align-items: center;
  gap: 12px; padding: 10px; border: 1px solid #e2d8c9; border-radius: 14px; background: #fffdf8;
}
.topic-schedule-heading .hobby-visual-photo { border-radius: 9px; aspect-ratio: 1.3; }
.topic-schedule-heading h2 { font-size: clamp(1.2rem,4.5vw,2rem); line-height: 1.2; margin: 3px 0 5px; }
.topic-schedule-heading .text-link { font-size: .88rem; }
.topic-schedule-heading .topic-back { color: #695745; }
.map-container .leaflet-popup-content li small { display: block; margin: -4px 0 5px; color: #5b4b3b; }
@media (max-width: 620px) {
  .hobby-visual-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .hobby-visual-body { padding: 8px; }
  .topic-schedule-heading { grid-template-columns: minmax(82px,.62fr) 1.38fr; gap: 9px; }
}

.activity-heading, .schedule-entry-heading { display: flex; gap: 8px; align-items: center; }
.activity-icon {
  display: inline-grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px;
  border-radius: 10px; background: #f2e9d9; font-size: 22px; line-height: 1;
}
.schedule-entry-heading { margin-bottom: 7px; }
.schedule-entry-heading h4, .schedule-entry-heading small { margin-bottom: 0; }
.hobby-visual-body .activity-icon { width: 29px; height: 29px; flex-basis: 29px; font-size: 17px; border-radius: 7px; }

.overlap-dates { display: grid; gap: 8px; }
.overlap-day { border: 1px solid #ded2c2; border-radius: 12px; background: #fffdf8; }
.overlap-day summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 14px; list-style: none; font-weight: 800; cursor: pointer; }
.overlap-day summary::-webkit-details-marker { display: none; }
.overlap-day summary::after { content: ''; width: 7px; height: 7px; margin: 0 4px 4px 12px; flex: none; border: solid #8a4b37; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.overlap-day[open] summary::after { margin-top: 5px; transform: rotate(225deg); }
.overlap-day .overlap-locations { border-top: 1px solid #eee4d7; }
.overlap-locations { display: grid; gap: 11px; padding: 12px 14px; background: #fffdf8; border-radius: 0 0 12px 12px; }
.overlap-area ul { padding: 0; margin: 4px 0 0; list-style: none; }
.overlap-area li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #f1e7db; font-size: .85rem; }
.overlap-area li small { display: block; color: #675b4c; line-height: 1.4; }
.overlap-area li .text-link { flex: none; white-space: nowrap; min-height: 44px; font-size: .82rem; }
.topic-members { margin: 10px 0 16px; padding: 12px; border: 1px solid #e2d8c9; border-radius: 12px; background: #fffdf8; }
.topic-members-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; margin-bottom: 7px; }
.topic-members-heading h3 { margin: 0; font-size: .95rem; }
.topic-members-heading .button { width: auto; min-height: 44px; padding-inline: 12px; font-size: .83rem; }
.topic-members-heading .button[aria-pressed="true"] { color: #43533b; background: #edf0e5; opacity: 1; }
.topic-members .form-status { margin-top: 6px; }
.topic-people { display: flex; flex-wrap: wrap; gap: 5px; }
.topic-person { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; min-height: 28px; padding: 2px 7px 2px 3px; border-radius: 16px; background: #f2ede3; color: #3e3429; font-size: .78rem; overflow-wrap: anywhere; }
.topic-person .member-avatar { flex: none; width: 22px; height: 22px; font-size: 13px; }
.topic-person small { color: #5f5546; font-size: .75rem; }
.roster-more { padding-inline: 7px; }
.overlap-area { border: 1px solid #e8ddcc; border-radius: 10px; padding: 0 9px; }
.overlap-area > summary { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; position: relative; min-height: 48px; padding: 7px 24px 7px 0; list-style: none; cursor: pointer; }
.overlap-area > summary::-webkit-details-marker { display: none; }
.overlap-area > summary::after { content: ''; position: absolute; top: 18px; right: 4px; width: 7px; height: 7px; border: solid #8a4b37; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.overlap-area[open] > summary::after { top: 21px; transform: rotate(225deg); }
.overlap-area-label { font-weight: 780; color: #774734; }
.overlap-area-roster:empty { display: none; }
