.matches-page .footer { margin-top: 25px; }
.match-hero { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 22px; padding: 25px; margin: 20px 0 16px; border: 1px solid var(--line); border-radius: 17px; background: #eee9dc; }
.match-hero h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.1; letter-spacing: -.08em; font-weight: 900; margin: 5px 0 9px; }
.match-hero p:not(.eyebrow) { max-width: 550px; color: var(--muted); font-size: 15px; }
.match-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 11px 0; }
.match-tabs button { min-height: 44px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 22px; background: var(--paper); color: var(--ink); font-weight: 780; }
.match-tabs button[aria-pressed=true] { background: var(--ink); color: var(--paper); }
.inbox-count { margin-left: 3px; color: #fff; padding: 2px 5px; border-radius: 20px; background: var(--rust); font-size: 11px; }
#match-panel { padding: 17px 0; scroll-margin-top: 10px; }
#match-panel > h2 { margin: 0 0 9px; font-size: clamp(23px, 4vw, 34px); line-height: 1.13; letter-spacing: -.065em; font-weight: 890; }
.match-empty { padding: 18px; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.match-empty .button { margin-top: 11px; }
.match-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.match-card { border-radius: 12px; background: var(--paper); border: 1px solid var(--line); padding: 12px; }
.match-card h3 { margin-top: 4px; font-size: 19px; font-weight: 850; letter-spacing: -.05em; }
.match-card p { margin-top: 4px; font-size: 13px; color: var(--muted); }
#match-panel .hobby-form { width: min(100%, 610px); }
#match-panel .short-form { width: min(100%, 410px); }
#match-panel form { margin-top: 12px; }
.match-hint { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 10px; max-width: 610px; border-radius: 10px; padding: 5px 9px; color: var(--olive); background: #e8ecdF; font-size: 14px; }
.hobby-form fieldset, .route-options { margin: 0; min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 9px; }
.hobby-form legend, .route-options summary, .match-section summary { font-size: 14px; font-weight: 850; }
.venue-choice input { accent-color: var(--rust); }
.hobby-form .preference-field { display: grid; gap: 8px; padding: 12px; background: var(--paper); border-radius: 14px; }
.hobby-form .preference-field legend { font-size: 16px; padding: 0 4px; }
.quick-picks, .chosen-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pref-chip, .chosen-chip {
  min-height: 44px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 22px;
  background: #f2ede1; color: var(--ink); font: inherit; font-weight: 750; font-size: 14px;
}
.pref-chip[aria-pressed=true], .chosen-chip { border-color: #ad704b; color: #713c22; background: #f7e5d8; }
.picker-trigger {
  display: flex; justify-content: space-between; align-items: center; gap: 7px; width: 100%;
  text-align: left; min-height: 46px; padding: 5px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink); font: inherit; font-size: 14px; font-weight: 800;
}
.picker-trigger span span { color: var(--muted); font-weight: 650; }
.picker-trigger span[aria-hidden] { color: var(--rust); margin-left: 3px; font-size: 19px; }
.quick-picks + .picker-trigger { margin-top: 7px; }
.chosen-chips:not(:empty) { margin-top: 7px; }
.slot-row { display: grid; gap: 8px; padding: 9px; border-radius: 10px; background: var(--page); }
.slot-meta { display: flex; align-items: end; gap: 8px; justify-content: space-between; }
.slot-meta label { width: min(100%, 200px); min-width: 0; }
.slot-meta input { width: 100%; }
.time-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.hobby-form .time-pill { position: relative; display: block; margin: 0; min-width: 0; cursor: pointer; }
.time-pill input {
  position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none;
}
.time-pill > span {
  display: grid; min-height: 58px; align-content: center; justify-items: center; text-align: center;
  border-radius: 9px; border: 1px solid var(--line); background: #f4ede1; padding: 3px 1px;
}
.time-pill strong { font-size: 14px; }
.time-pill small { font-size: clamp(9px, 2.4vw, 11px); line-height: 1.18; color: var(--muted); }
.time-pill:has(input:checked) > span { color: #713c22; background: #f7e5d8; border-color: #ad704b; box-shadow: inset 0 0 0 1px #ad704b; }
.time-pill:has(input:focus-visible) > span { outline: 2px solid var(--rust); outline-offset: 2px; }
.time-pill:has(input:disabled) > span { opacity: .48; }
.time-guide { color: var(--muted); font-size: 12px; }
.time-guide summary { cursor: pointer; width: fit-content; }
.time-guide p { margin: 4px 0; }
.discover-options { max-width: 610px; margin-bottom: 8px; background: var(--paper); }
.filter-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-actions .button { flex: 1 1 auto; }
#preference-picker {
  width: min(100% - 20px, 520px); max-height: min(82dvh, 680px); padding: 0;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper); color: var(--ink);
  overflow: hidden;
}
#preference-picker[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.picker-top, .picker-footer { padding: 13px 16px; background: var(--paper); }
.picker-top { border-bottom: 1px solid var(--line); }
.picker-top .dialog-heading { margin: 0; }
.picker-top p { margin: 5px 0; }
.picker-search { width: 100%; min-height: 44px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
.pref-regions:not([hidden]) { display: flex; gap: 6px; margin-top: 7px; }
.pref-regions button { flex: 1; }
.picker-list { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 12px 16px; }
.pref-topic-group + .pref-topic-group { margin-top: 15px; }
.pref-topic-group h3, .pref-line-heading { font-size: 16px; margin-bottom: 6px; letter-spacing: -.02em; }
.rail-lines button, .station-choice {
  min-height: 48px; padding: 5px 3px; width: 100%; display: grid; align-items: center; gap: 7px;
  border: 0; border-bottom: 1px solid var(--line); color: var(--ink); text-align: left; background: transparent; font: inherit;
}
.rail-lines button { grid-template-columns: auto 1fr auto auto; }
.rail-lines small, .station-choice small { color: var(--muted); font-size: 12px; }
.rail-lines i, .pref-line-heading i { display: inline-block; background: var(--rail-color); border-radius: 50%; width: 12px; height: 12px; }
.pref-line-heading { display: flex; align-items: center; gap: 6px; }
.station-choice { grid-template-columns: 1fr auto; }
.station-choice small { display: block; }
.station-tick { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; color: transparent; }
.station-choice[aria-pressed=true] .station-tick { color: #fff9f5; background: var(--rust); border-color: var(--rust); }
.picker-footer { border-top: 1px solid var(--line); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.picker-footer .button { width: 100%; }
.picker-footer .form-status:empty { display: none; }
.picker-credit { margin: 0 0 4px; font-size: 11px; }
.picker-credit a { text-decoration: underline; }
.route-options summary, .match-section summary { cursor: pointer; padding: 7px 0; }
.route-options label { margin-top: 5px; }
#group-dialog { width: min(100% - 20px, 570px); }
#group-content p { color: var(--muted); font-size: 14px; margin: 5px 0; }
#group-content .hobby-status { color: #79462c; }
#group-content .match-empty { margin-top: 8px; }
#group-content > .button { margin-top: 9px; }
.group-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 7px 0; }
.match-section { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); }
.match-section h3 { font-size: 16px; font-weight: 850; }
.match-section form { margin: 7px 0; }
.hobby-form .venue-choice { display: flex; align-items: start; gap: 7px; padding: 7px; background: var(--page); border-radius: 7px; }
.venue-choice small { display: block; font-weight: 550; color: var(--muted); }
.match-people { padding: 0; margin: 5px 0; list-style: none; }
.match-people li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); padding: 5px 0; font-size: 14px; }
@media(max-width:620px) {
  .match-hero { padding: 15px; margin-top: 12px; }
  .match-hero p:not(.eyebrow) { font-size: 14px; }
  .match-tabs button { padding-inline: 9px; font-size: 13px; }
  .match-grid { grid-template-columns: minmax(0,1fr); }
  #group-dialog { padding: 12px; }
  #preference-picker { width: 100%; max-width: none; max-height: 87dvh; margin: auto 0 0; border-radius: 17px 17px 0 0; }
}

.match-hint { margin-bottom: 8px; }
.match-hint > div { display: flex; flex-wrap: wrap; gap: 12px; }
.profile-avatar { max-width: 610px; margin-top: 8px; }
.profile-avatar summary .member-avatar { vertical-align: middle; margin-left: 4px; }
.match-account-link { padding-top: 8px; }
.match-final-count, #group-content .match-final-count { color: #793a25; font-weight: 750; }

#intro-profile, #instagram-settings { scroll-margin-top: 86px; }
.intro-settings { width: min(100%, 610px); padding: 0 13px; margin: 10px 0 18px; background: var(--paper); }
.intro-settings > summary { min-height: 44px; padding-block: 11px; }
.intro-settings > summary small { margin-left: 9px; color: var(--olive); font-size: .8rem; font-weight: 750; }
.intro-settings > .muted { margin-bottom: 12px; }
.intro-settings .hobby-form { padding-bottom: 10px; }
.intro-selects { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.intro-settings select, .intro-settings textarea {
  width: 100%; min-height: 44px; padding: 8px; border: 1px solid #d6ccbb; border-radius: 7px;
  color: var(--ink); background: #fff; font: inherit; font-size: 16px;
}
.intro-settings textarea { resize: vertical; }
.intro-settings legend small, .intro-settings label > small { font-size: .8rem; font-weight: 550; color: var(--muted); }
.intro-choices, .intro-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.hobby-form .intro-choice {
  display: flex; align-items: center; min-height: 44px; gap: 6px; margin: 0; padding: 5px 9px;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.intro-choice input { accent-color: var(--rust); width: 16px; height: 16px; margin: 0; }
.intro-choice:has(input:checked) { border-color: #ad704b; background: #f7e5d8; color: #713c22; }
.intro-feedback:empty { display: none; }
.intro-people { display: grid; gap: 6px; margin: 9px 0 5px; }
.intro-person { padding: 3px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.intro-person > summary { min-height: 44px; padding: 8px 0; }
.intro-person > summary .member-avatar { margin: 0 7px 0 3px; vertical-align: middle; }
.intro-person > summary small { margin-left: 6px; color: var(--muted); font-size: .78rem; }
.intro-person p { overflow-wrap: anywhere; }
.intro-person > summary .intro-overlap { display: inline-block; color: var(--olive); font-weight: 750; }
#group-content .intro-shared { padding: 7px 9px; border-radius: 6px; background: #edf0e5; color: #394838; }
.intro-person dl { display: grid; gap: 5px; margin: 7px 0 11px; font-size: .85rem; }
.intro-person dl div { display: grid; grid-template-columns: minmax(7.5rem, .8fr) 1.2fr; gap: 7px; }
.intro-person dt { color: var(--muted); }
.intro-person dd { margin: 0; }
@media (max-width:390px) {
  .intro-selects { grid-template-columns: minmax(0,1fr); }
}

.hour-picker { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 4px; align-items: center; }
.hour-step {
  min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px;
  background: #fffdf8; color: #735944; font: 750 1.25rem/1 system-ui,sans-serif;
}
.hour-rail {
  display: flex; align-items: stretch; gap: 2px; position: relative;
  overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #baae99 #f3eee4;
  scroll-snap-type: x proximity; padding: 3px;
}
.hobby-form label.hour-tile { position: relative; flex: 0 0 58px; min-height: 52px; cursor: pointer; scroll-snap-align: start; }
.hour-tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.hour-face { display: flex; flex-direction: column; justify-content: flex-end; text-align: center; gap: 4px; font-size: .88rem; font-weight: 750; }
.hour-face i { display: block; height: 26px; border: 1px solid #c9d9d9; border-radius: 4px; background: #dce9e7; }
.hour-tile input:checked + .hour-face { color: #38553e; }
.hour-tile input:checked + .hour-face i { background: #52795e; border-color: #52795e; }
.hour-tile input:checked + .hour-face i::before { content: "✓"; color: #fff; }
.hour-tile input:disabled + .hour-face { opacity: .46; }
.hour-tile input:focus-visible + .hour-face { outline: 2px solid var(--rust); outline-offset: 1px; border-radius: 3px; }
.hour-selected { font-size: .82rem; color: #5a5144; }
.retained-dates .retained-date { margin-top: 8px; }
.retained-date small { color: var(--muted); }
#slots { scroll-margin-top: 88px; }

.pref-location-modes:not([hidden]) { display: flex; margin: 8px 0 5px; }
.district-picks { gap: 8px; }

#candidate-content p { margin: 5px 0; color: var(--muted); font-size: .9rem; }
.candidate-people { display: grid; gap: 5px; margin: 7px 0 3px; padding: 0; list-style: none; }
.candidate-people li { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 9px; }
.candidate-people strong { overflow-wrap: anywhere; }

.intro-photo-controls .muted { margin: 4px 0 8px; }
.intro-photo-grid { display: grid; gap: 6px; }
.intro-photo-tile { display: grid; grid-template-columns: 67px minmax(0,1fr); align-items: center; gap: 9px; padding: 6px; border: 1px solid var(--line); background: var(--paper); border-radius: 10px; }
.intro-photo-preview { display: grid; place-items: center; width: 67px; aspect-ratio: 1; border-radius: 7px; overflow: hidden; background: #eee6d9; font-size: .74rem; color: var(--muted); }
.intro-photo-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-photo-tile input { min-width: 0; max-width: 100%; font-size: .8rem; }
.intro-photo-tile input::file-selector-button { padding: 5px 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); color: var(--ink); }
.intro-photo-tile [data-intro-photo-delete] { min-height: 35px; font-size: .8rem; }
.intro-thumb { width: 42px; height: 42px; margin: 0 7px 0 3px; border-radius: 50%; object-fit: cover; vertical-align: middle; }
.intro-main-photo { display: block; width: min(100%,270px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin: 8px 0; }
.intro-hobby-gallery { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; margin: 7px 0; }
.intro-hobby-gallery img { width: 100%; height: auto; border-radius: 7px; }
