:root {
  --ink: #222; --muted: #6a6a6a; --paper: #fff; --white: #fff;
  --line: #dddddd; --line-soft: #ebebeb; --soft: #f7f7f7; --field: #b0b0b0;
  --accent: #7d2f8f; --accent-dark: #66247a; --accent-soft: #f5edf7; --error: #b21b35; --ok: #0f6e3a; --ok-soft: #e7f3ea; --warn: #8a5300;
  --shadow-bar: 0 3px 12px #00000014, 0 1px 2px #00000014;
  --shadow-card: 0 6px 20px #0000001f;
  --page-pad: 40px; --compact-h: 72px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none; color-scheme: light;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 160px; }
body { margin: 0; line-height: 1.6; background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body:has(dialog[open]) { overflow: hidden; }
button { font: inherit; color: inherit; }
input,select { font-family: inherit; color: inherit; }
button,a,input,select,label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; background: none; }
button:disabled { cursor: not-allowed; opacity: .4; }
[aria-disabled=true] { cursor: progress; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:where(input:not([type=checkbox],[type=radio],[type=range]),select) { min-width: 0; width: 100%; min-height: 44px; border: 1px solid var(--field); border-radius: 8px; background: #fff; padding: 10px 12px; font-size: 14px; }
:where(input:not([type=checkbox],[type=radio],[type=range]),select):focus-visible { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex-shrink: 0; cursor: pointer; }
label { font-size: 13px; font-weight: 600; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; }
h1,h2,h3,h4,p { margin: 0; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 18px; line-height: 1.45; }
.small,small { font-size: 12px; font-weight: 400; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip { position: absolute; top: -80px; left: 16px; background: #fff; padding: 12px 16px; z-index: 200; border-radius: 8px; box-shadow: var(--shadow-card); font-weight: 600; }
.skip:focus { top: 8px; }
.error-text { color: var(--error); font-size: 14px; }
.error-text:empty { display: none; }

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; border-radius: 8px; border: 1px solid var(--ink); padding: 10px 18px; font-size: 14px; font-weight: 600; min-height: 44px; background: #fff; color: var(--ink); text-align: center; }
.button:hover { background: var(--soft); }
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #000; }
.button.secondary { background: #fff; }
.button svg { width: 18px; height: 18px; }
.text-button { border: 0; background: none; padding: 8px 4px; min-height: 40px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.text-button:hover { color: #000; }
.text-link { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; flex-shrink: 0; }
.icon-button svg { width: 18px; height: 18px; stroke-width: 2.2; }
.icon-button:hover { background: var(--soft); }
.count-badge { background: #f0f0f0; color: var(--ink); border-radius: 10px; min-width: 20px; height: 20px; padding: 0 6px; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }
.count-dot { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; }

/* Header */
.header { max-width: 1760px; margin: 0 auto; height: 80px; padding: 0 var(--page-pad); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: 22px; font-weight: 750; letter-spacing: -.6px; line-height: 1.1; min-width: 0; }
.brand small { display: block; font-size: 11px; letter-spacing: .5px; color: var(--muted); line-height: 1; margin-top: 4px; font-weight: 600; }
nav { display: flex; gap: 28px; align-items: center; height: 100%; }
.nav-button { display: flex; gap: 8px; align-items: center; height: 100%; border: 0; padding: 8px 4px; position: relative; font-size: 15px; color: var(--muted); white-space: nowrap; }
.nav-button:hover { color: var(--ink); }
.nav-button svg { width: 20px; height: 20px; }
.nav-button.active { color: var(--ink); font-weight: 600; }
.nav-button.active:after { content: ''; position: absolute; height: 2px; background: var(--ink); left: 4px; right: 4px; bottom: 14px; border-radius: 2px; }
.header-meta { display: flex; gap: 16px; justify-content: flex-end; font-size: 13px; align-items: center; color: var(--muted); }
.header-meta .button { min-height: 40px; padding: 8px 14px; }
.member-name { font-size: 13px; color: var(--ink); font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Compact search shown while scrolling */
.compact-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line-soft); box-shadow: 0 2px 10px #0000000f; animation: drop-in .18s ease-out; }
.compact-inner { max-width: 1760px; margin: 0 auto; height: var(--compact-h); padding: 0 var(--page-pad); display: flex; align-items: center; gap: 16px; }
.brand-mini img { display: block; }
.compact-pill { margin: 0 auto; display: flex; align-items: center; height: 48px; border: 1px solid var(--line); border-radius: 40px; box-shadow: var(--shadow-bar); padding: 0 7px 0 6px; background: #fff; max-width: min(680px, 62vw); min-width: 0; }
.compact-segment { border: 0; height: 100%; padding: 0 16px; font-size: 14px; font-weight: 600; white-space: nowrap; position: relative; min-width: 0; overflow: hidden; text-overflow: ellipsis; border-radius: 40px; }
.compact-segment:hover { background: var(--soft); }
.compact-segment + .compact-segment:before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 1px; background: var(--line); }
.compact-segment:nth-child(3) { color: var(--muted); font-weight: 400; }
.compact-submit { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; margin-left: 6px; flex-shrink: 0; }
.compact-submit svg { width: 16px; height: 16px; stroke-width: 2.6; }
.compact-mobile { display: none; }
.compact-bar .compact-filter { flex-shrink: 0; display: none; }
@keyframes drop-in { from { transform: translateY(-100%); } }

/* Search panel */
.search-panel { padding: 4px 24px 24px; border-bottom: 1px solid var(--line-soft); }
.search-compact { display: none; }
.search-bar { display: grid; grid-template-columns: minmax(200px,1.5fr) minmax(140px,1.1fr) minmax(120px,1fr) minmax(90px,.7fr) auto; align-items: center; max-width: 920px; height: 66px; margin: 0 auto; border: 1px solid var(--line); border-radius: 40px; box-shadow: var(--shadow-bar); background: #fff; scroll-margin-top: 100px; }
.search-field { min-width: 0; height: 64px; border: 0; border-radius: 40px; padding: 0 24px; display: flex; flex-direction: column; justify-content: center; text-align: left; position: relative; background: transparent; }
.search-field:not(.region-field):before { content: ''; width: 1px; height: 32px; background: var(--line); position: absolute; left: 0; top: 16px; }
.search-field:hover { background: var(--line-soft); }
.search-field:hover:before,.search-field:hover + .search-field:before,.search-field:focus-visible:before,.search-field:focus-visible + .search-field:before { opacity: 0; }
.field-label { font-size: 12px; font-weight: 600; line-height: 1.4; }
.field-value { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.search-submit { background: var(--accent); border: 0; color: #fff; height: 48px; min-width: 48px; border-radius: 40px; display: flex; gap: 8px; align-items: center; justify-content: center; padding: 0 20px; margin-right: 8px; font-weight: 600; font-size: 15px; }
.search-submit svg { width: 18px; height: 18px; stroke-width: 2.4; }
.search-submit:hover { background: var(--accent-dark); }
.search-submit.is-loading svg { display: none; }
.search-submit.is-loading:before { content: ''; width: 16px; height: 16px; border: 2px solid #ffffff80; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
.search-summary { display: flex; gap: 12px; justify-content: center; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 10px; }
.search-summary .text-button { font-size: 13px; color: var(--ink); min-height: 36px; }

/* Area bar */
.category-bar { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid transparent; transition: top .18s; }
body.compact-visible .category-bar { top: var(--compact-h); border-bottom-color: var(--line-soft); }
.category-inner { max-width: 1760px; margin: 0 auto; padding: 12px var(--page-pad); display: flex; align-items: center; gap: 12px; }
.area-shortcuts { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.area-shortcuts::-webkit-scrollbar { display: none; }
.area-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; white-space: nowrap; }
.area-chip svg { width: 16px; height: 16px; }
.area-chip:hover { border-color: var(--ink); color: var(--ink); }
.area-chip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: #fff; }
.filter-button { flex-shrink: 0; border: 1px solid var(--line); border-radius: 12px; min-height: 48px; padding: 0 16px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; background: #fff; }
.filter-button:hover { border-color: var(--ink); background: var(--soft); }
.filter-button svg { width: 18px; height: 18px; }

/* Results */
.shell { max-width: 1760px; margin: 0 auto; padding: 0 var(--page-pad) 56px; }
.results-section { scroll-margin-top: 160px; }
.results-section:focus { outline: none; }
.results-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 24px 0 6px; }
.results-title { min-width: 0; }
#result-count { font-weight: 400; color: var(--muted); font-size: 16px; margin-left: 4px; }
.results-meta { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.result-tools { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tool-button { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; padding: 8px 10px; min-height: 40px; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.tool-button svg { width: 16px; height: 16px; }
.tool-button:hover:not(:disabled) { background: var(--soft); }
.sort-label select { min-height: 40px; width: auto; padding: 6px 10px; border-color: var(--line); font-size: 13px; font-weight: 600; }
.scope-row { margin: 6px 0 18px; font-size: 13px; color: var(--muted); }
.search-dirty { font-size: 14px; margin: -4px 0 16px; }
.search-dirty .text-button { margin-left: 8px; min-height: 32px; padding: 4px; }
.status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
.status-row>* { margin-bottom: 14px; }
#status:empty { margin: 0; }
#status,.progress-text { font-size: 13px; color: var(--muted); min-width: 0; overflow-wrap: anywhere; }
#status.error { color: var(--error); }
.progress-text:empty { display: none; }
body.view-favorites .status-row { display: none; }
#load-progress { width: 140px; height: 8px; accent-color: var(--accent); }
.search-elapsed { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.status-row .text-button { min-height: 32px; padding: 4px; font-size: 13px; }
.warnings { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.warnings:empty { display: none; }
.notice { font-size: 13px; color: var(--muted); margin: 0 0 14px; padding: 10px 14px; background: var(--soft); border-radius: 10px; }
.notice-list { list-style: none; display: grid; gap: 4px; }
.notice-list li { overflow-wrap: anywhere; }
.loading-status:before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid #ddd; border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; margin-right: 10px; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.results-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }

/* Listing card: text first, no photos (the sources' images are not shown here) */
.listing-card { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px 2px 16px; background: #fff; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 4px; }
.card-head h3 { flex: 1; min-width: 0; padding-top: 9px; }
.save-button { flex-shrink: 0; border: 0; width: 44px; height: 44px; margin-right: -8px; padding: 0; display: grid; place-items: center; border-radius: 50%; }
.save-button svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.9; transition: transform .15s; }
.save-button:hover { background: var(--soft); }
.save-button:hover svg { transform: scale(1.08); }
.save-button.saved svg { fill: var(--accent); stroke: var(--accent); }
.save-button:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.card-body { padding: 2px 0 0; display: flex; flex-direction: column; flex: 1; gap: 2px; font-size: 14px; min-width: 0; }
.card-location { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.card-location>span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-rating { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--ink); white-space: nowrap; flex-shrink: 0; }
.card-rating.muted { color: var(--muted); }
.card-rating svg { width: 12px; height: 12px; fill: currentColor; stroke-width: 1; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.45; }
.listing-title { border: 0; text-align: left; padding: 0; width: 100%; font: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.listing-title:hover { text-decoration: underline; }
.card-price { margin-top: 6px; }
.card-price strong,.booking-price strong { font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.price-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.price-note { font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.budget-tag { width: fit-content; max-width: 100%; margin-top: 6px; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); overflow-wrap: anywhere; }
.budget-tag span { font-weight: 400; }
.budget-tag.is-within { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.budget-tag.is-partial { color: var(--ink); }
.budget-tag.is-over { color: var(--error); }
.budget-tag.is-unknown { color: var(--muted); }
.vacancy-line { margin-top: 4px; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.vacancy-line span { font-weight: 400; color: var(--muted); }
.vacancy-line.is-vacant { color: var(--ok); }
.vacancy-line.is-preparing { color: var(--warn); }
.vacancy-line.is-full,.vacancy-line.is-none,.vacancy-line.is-loading,.vacancy-line.is-unknown { color: var(--muted); font-weight: 400; }
.vacancy-line.is-error { color: var(--error); font-weight: 400; }
.vacancy-line.is-stale { color: var(--muted); }
.offer-lines { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; font-size: 13px; }
.offer-lines li { overflow-wrap: anywhere; }
.flag-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.flag-chips span { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: var(--soft); color: var(--ink); border: 1px solid var(--line-soft); }
.saved-note { font-size: 12px; color: var(--muted); margin-top: 4px; }
.card-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
.details-link { border: 0; padding: 10px 0; min-height: 44px; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* States */
.skeleton { display: grid; gap: 10px; align-content: start; min-height: 150px; padding: 18px 16px; border: 1px solid var(--line-soft); border-radius: 12px; }
.skeleton span { display: block; border-radius: 6px; background: linear-gradient(110deg,#efefef 8%,#f8f8f8 18%,#efefef 33%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.skeleton .skeleton-line { height: 14px; width: 82%; }
.skeleton .skeleton-line.short { width: 52%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty-state { grid-column: 1/-1; min-height: 260px; border: 1px solid var(--line-soft); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 48px 24px; }
.empty-state h3 { font-size: 20px; }
.empty-state p { font-size: 14px; color: var(--muted); max-width: 560px; overflow-wrap: anywhere; }
.empty-icon svg { width: 36px; height: 36px; color: var(--muted); stroke-width: 1.5; }
.empty-state.is-error .empty-icon svg { color: var(--error); }
.empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.empty-actions .button { white-space: normal; }
.load-more-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 40px 0 0; text-align: center; }
.load-more-row p:empty { display: none; }
.couples-only,.source-status { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line-soft); }
.couples-only h2,.source-status h2 { font-size: 18px; margin-bottom: 6px; }
.couples-only-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 12px; }
.couples-only-list li { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.couples-only-list a { text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.source-status dl { margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.source-status dl>div { display: flex; flex-wrap: wrap; gap: 0 12px; }
.source-status dt { font-weight: 600; min-width: 190px; }
.source-status dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; min-width: 0; }
.recent-section { margin-top: 48px; }
.recent-section h2 { font-size: 18px; margin-bottom: 14px; }
.recent-list { display: flex; flex-wrap: wrap; gap: 12px; }
.recent-chip { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; min-height: 56px; text-align: left; background: #fff; max-width: 100%; min-width: 0; }
.recent-chip:hover { border-color: var(--ink); box-shadow: var(--shadow-bar); }
.recent-chip svg { width: 20px; height: 20px; color: var(--muted); }
.recent-chip>span { display: grid; min-width: 0; }
.recent-chip strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-chip>span>span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.travel-note { font-size: 13px; color: var(--muted); margin: 40px 0 0; line-height: 1.8; }

/* Dialogs */
dialog { border: 0; border-radius: 16px; background: #fff; color: var(--ink); padding: 0; max-width: calc(100vw - 32px); max-height: min(90dvh, 920px); box-shadow: 0 12px 48px #0000004d; overflow: auto; overscroll-behavior: contain; scroll-padding: 76px 0 88px; }
dialog>.toast { top: 76px; bottom: auto; }
dialog[open] { animation: dialog-in .2s ease-out; }
dialog::backdrop { background: #00000080; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(16px); } }
.dialog-header { position: sticky; top: 0; z-index: 5; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 20px 12px 24px; border-bottom: 1px solid var(--line-soft); }
.dialog-header h2 { font-size: 17px; }
.dialog-body { padding: 20px 24px 24px; }
.dialog-footer { position: sticky; bottom: 0; z-index: 5; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line-soft); }
.dialog-footer>span { min-width: 0; overflow-wrap: anywhere; }
.picker-dialog { width: 560px; }
.region-dialog { width: 760px; }
.people-dialog { width: 440px; }
.filters-dialog { width: 720px; }
.login-dialog { width: 400px; }
.login-dialog form { display: grid; gap: 16px; }
.login-dialog label { display: grid; gap: 6px; }
#login-error { color: var(--error); font-size: 13px; }
#login-error:empty { display: none; }
.field-block { display: grid; gap: 6px; margin-top: 16px; font-size: 13px; }
.mode-group { margin-bottom: 4px; }
.geo-panel { display: grid; gap: 12px; margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; }
.geo-panel .button { justify-self: start; }
.areas-field { margin-top: 20px; }
.areas-field legend { font-size: 16px; margin-bottom: 8px; }
.area-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 8px; margin-top: 8px; }
.area-option { position: relative; display: block; min-width: 0; }
.area-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.area-option span { display: grid; min-height: 52px; align-content: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; overflow-wrap: anywhere; }
.area-option strong { font-size: 14px; line-height: 1.35; }
.area-option small { color: var(--muted); }
.area-option span:hover { border-color: var(--ink); }
.area-option input:checked+span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--soft); }
.area-option input:focus-visible+span { outline: 2px solid var(--ink); outline-offset: 2px; }
.rest-block { margin-top: 18px; }
.choice-caption { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* People */
.guest-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line-soft); }
.guest-row:last-of-type { border-bottom: 0; }
.guest-row label { font-size: 16px; }
.guest-row p { margin-top: 2px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 40px; height: 40px; border: 1px solid var(--field); border-radius: 50%; font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; background: #fff; }
.stepper button:hover:not(:disabled) { border-color: var(--ink); }
.stepper input:not([type=checkbox]) { border: 0; width: 48px; min-height: 40px; text-align: center; padding: 4px; appearance: textfield; -moz-appearance: textfield; font-size: 16px; }
.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Filters and choices */
.filter-section { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.filter-section:first-child { padding-top: 4px; }
.filter-section:last-child { border-bottom: 0; padding-bottom: 4px; }
.filter-section h3,.filter-section legend { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
fieldset.filter-section>legend { float: left; width: 100%; }
fieldset.filter-section>legend+* { clear: both; }
.filter-section>p { margin-top: 4px; }
.filter-section .choice-group { margin-top: 10px; }
.budget-fields { margin-top: 4px; }
.budget-row { margin-top: 8px; }
.budget-label { display: grid; gap: 6px; font-size: 12px; max-width: 240px; }
.money-input { position: relative; display: block; }
.money-input>span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 400; }
.money-input input:not([type=checkbox]) { padding-left: 30px; font-size: 16px; min-height: 48px; }
input[type=range] { width: 100%; accent-color: var(--ink); margin: 18px 0 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.choice-row { display: flex; align-items: center; gap: 16px; }
.choice-label { flex-shrink: 0; font-size: 14px; font-weight: 400; }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input,.amenity-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 40px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 14px; font-weight: 400; cursor: pointer; background: #fff; text-align: center; }
.choice span:hover { border-color: var(--ink); }
.choice input:checked+span { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.choice input:disabled+span { opacity: .4; cursor: not-allowed; }
.choice input:focus-visible+span,.amenity-chip input:focus-visible+span { outline: 2px solid var(--ink); outline-offset: 2px; }
.amenity-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.amenity-chips.is-collapsed .amenity-chip:nth-child(n+13) { display: none; }
.amenity-chip { position: relative; max-width: 100%; }
.amenity-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; font-weight: 400; cursor: pointer; background: #fff; overflow-wrap: anywhere; }
.amenity-chip span:hover { border-color: var(--ink); }
.amenity-chip input:checked+span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--soft); font-weight: 600; }
.toggle-list { display: grid; margin-top: 6px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; font-weight: 400; cursor: pointer; }
.toggle-row>span { display: grid; gap: 2px; min-width: 0; }
.toggle-row strong { font-size: 15px; font-weight: 600; }
.toggle-row input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 48px; height: 32px; border-radius: 16px; background: var(--field); position: relative; flex-shrink: 0; transition: background .2s; }
.toggle-row input[type=checkbox]:before { content: ''; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0004; transition: transform .2s; }
.toggle-row input[type=checkbox]:checked { background: var(--ink); }
.toggle-row input[type=checkbox]:checked:before { transform: translateX(16px); }
.toggle-row input[type=checkbox]:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Usage log (administrators) */
.logs-dialog { width: 960px; }
.logs-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.logs-filters label { display: grid; gap: 6px; font-size: 12px; min-width: 140px; }
.logs-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin: 20px 0 12px; }
.logs-summary>div { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 2px; min-width: 0; }
.logs-summary strong { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.logs-summary span { font-size: 12px; color: var(--muted); }
.logs-content { margin-top: 10px; }
.logs-scroll { overflow: auto; border: 1px solid var(--line-soft); border-radius: 12px; max-height: 60dvh; }
.logs-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.logs-table th,.logs-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; background: #fff; overflow-wrap: anywhere; }
.logs-table thead th { position: sticky; top: 0; z-index: 1; background: #fafafa; font-weight: 600; white-space: nowrap; }
.logs-table td:first-child,.logs-table td:nth-child(3) { white-space: nowrap; font-variant-numeric: tabular-nums; }
.logs-table tr.is-failed td { color: var(--error); }
.log-role { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--ink); border-radius: 4px; font-size: 11px; font-weight: 600; }
.log-device { display: block; font-size: 12px; color: var(--muted); }
.logs-more { display: flex; justify-content: center; margin: 14px 0 6px; }

/* Detail */
.detail-dialog { width: 1120px; }
.detail-header { padding: 10px 20px; justify-content: flex-start; }
.detail-heading { font-size: 14px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-actions { display: flex; gap: 4px; }
.pill-action { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; padding: 8px 10px; min-height: 40px; font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; background: none; }
.pill-action:hover { background: var(--soft); }
.pill-action svg { width: 17px; height: 17px; }
.pill-action.saved svg { fill: var(--accent); stroke: var(--accent); }
.detail-content { padding: 8px 32px 36px; }
.detail-loading { margin-top: 10px; }
.detail-top { margin: 10px 0 16px; }
.detail-title { font-size: 26px; line-height: 1.35; overflow-wrap: anywhere; }
.detail-title:focus { outline: none; }
.detail-subline { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.detail-subline>* { min-width: 0; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 48px; margin-top: 20px; align-items: start; }
.detail-layout>.booking-card { grid-column: 2; grid-row: 1; }
.detail-layout>.detail-main { grid-column: 1; grid-row: 1; min-width: 0; }
.booking-card { position: sticky; top: 84px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 12px; padding: 22px; box-shadow: var(--shadow-card); background: #fff; min-width: 0; }
.booking-price strong { font-size: 20px; }
.detail-photo-link { margin-top: 6px; font-size: 14px; }
.detail-section { padding: 26px 0; border-top: 1px solid var(--line-soft); }
.detail-main>.detail-section:first-child { border-top: 0; padding-top: 4px; }
.detail-section h3 { font-size: 20px; font-weight: 600; margin-bottom: 12px; }
.detail-section>p { font-size: 14px; }
.detail-section>p.small { font-size: 13px; margin-top: 8px; }
.rule-kind + .rule-kind { margin-top: 18px; }
.rule-kind h4 { font-size: 15px; margin-bottom: 6px; overflow-wrap: anywhere; }
.rule-week { padding: 8px 0; border-top: 1px solid var(--line-soft); }
.rule-week-name { font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.rule-rows { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.rule-rows li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; padding: 6px 10px; border-radius: 8px; font-size: 14px; }
.rule-rows li>span { min-width: 0; overflow-wrap: anywhere; flex: 1 1 220px; }
.rule-rows li>strong { white-space: nowrap; font-weight: 600; }
.rule-rows li.is-hit { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.hit-tag { flex-basis: 100%; font-style: normal; font-size: 12px; font-weight: 600; color: var(--accent); }
.note-list { margin: 0 0 8px; padding-left: 1.2em; display: grid; gap: 4px; font-size: 14px; }
.note-list li { overflow-wrap: anywhere; }
.note-head { font-size: 14px; margin: 10px 0 4px; }
.unreadable { margin: 4px 0 10px; font-size: 13px; }
.unreadable summary { cursor: pointer; font-weight: 600; min-height: 32px; display: list-item; }
.unreadable ul { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 2px; color: var(--muted); }
.unreadable li { overflow-wrap: anywhere; }
.amenity-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.amenity-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; overflow-wrap: anywhere; min-width: 0; }
.amenity-list li svg { width: 18px; height: 18px; margin-top: 2px; }
.info-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; }
.info-grid>div { min-width: 0; }
.info-grid dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.info-grid dd { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.plan-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.plan-list li { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.plan-list li.is-fit { border-color: var(--ink); }
.plan-name a { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.fit-text { color: var(--ok); font-weight: 600; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.link-row .button { white-space: normal; }

/* Toast and footer */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 100; background: var(--ink); color: #fff; border-radius: 12px; padding: 13px 20px; font-size: 14px; box-shadow: 0 6px 24px #0004; max-width: min(560px, calc(100vw - 32px)); width: max-content; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%,8px); } }
footer { border-top: 1px solid var(--line-soft); padding: 28px var(--page-pad); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: 13px; background: var(--soft); }
footer .brand { font-size: 18px; }
footer p { flex-basis: 100%; color: var(--muted); }

/* Responsive */
@media(min-width:1640px) { .results-grid { grid-template-columns: repeat(5,minmax(0,1fr)); } }
@media(max-width:1128px) {
  :root { --page-pad: 24px; }
  .results-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
  .detail-layout { grid-template-columns: minmax(0,1fr) 320px; gap: 36px; }
}
@media(max-width:880px) {
  .header { grid-template-columns: 1fr auto auto; }
  .search-bar { grid-template-columns: minmax(130px,1.3fr) minmax(110px,1fr) minmax(96px,.9fr) minmax(64px,.6fr) auto; }
  .search-field { padding: 0 14px; }
  .search-submit { padding: 0 14px; }
  .search-submit .submit-label { display: none; }
  .results-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .results-heading { flex-direction: column; align-items: stretch; gap: 10px; }
  .result-tools { justify-content: flex-end; }
  .detail-layout { grid-template-columns: 1fr; gap: 0; margin-top: 16px; }
  .detail-layout>.booking-card,.detail-layout>.detail-main { grid-column: auto; grid-row: auto; }
  .booking-card { position: static; box-shadow: none; margin-bottom: 20px; }
  .compact-pill { max-width: 56vw; }
}
@media(max-width:720px) {
  :root { --page-pad: 16px; --compact-h: 64px; }
  html { scroll-padding-top: 80px; }
  h2 { font-size: 20px; }
  .header { height: 64px; gap: 10px; }
  .brand { font-size: 18px; gap: 7px; }
  .brand img { width: 30px; height: 30px; }
  .brand>span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .brand small { font-size: 10px; letter-spacing: .3px; }
  nav { gap: 12px; }
  .nav-button { font-size: 13px; gap: 5px; }
  .nav-button svg { width: 18px; height: 18px; }
  .nav-button.active:after { bottom: 10px; }
  .header-meta { gap: 8px; }
  .member-name,#logout-button { display: none; }
  #logs-open .nav-text { display: none; }
  #logs-open { padding: 8px; }
  .search-panel { padding: 0 16px 12px; border-bottom: 0; }
  .search-compact { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 40px; box-shadow: var(--shadow-bar); background: #fff; text-align: left; }
  .search-compact svg { width: 18px; height: 18px; stroke-width: 2.2; }
  .search-compact>span:not(.compact-edit) { display: grid; min-width: 0; flex: 1; line-height: 1.35; }
  .search-compact strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-compact>span>span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compact-edit { font-size: 13px; font-weight: 600; text-decoration: underline; flex-shrink: 0; }
  .search-panel:not(.collapsed) .search-compact { display: none; }
  .search-panel.collapsed .search-bar,.search-panel.collapsed .search-summary { display: none; }
  .search-bar { grid-template-columns: minmax(0,1fr) minmax(0,1fr); height: auto; border-radius: 20px; padding: 4px; gap: 0; }
  .search-field { height: auto; min-height: 58px; padding: 8px 14px; border-radius: 14px; }
  .region-field { grid-column: 1 / -1; border-bottom: 1px solid var(--line-soft); border-radius: 14px 14px 0 0; }
  .when-field,.usage-field { border-bottom: 1px solid var(--line-soft); border-radius: 0; }
  .when-field:before,.people-field:before { display: none; }
  .search-field:not(.region-field):before { top: 13px; }
  .search-submit { height: 46px; margin: 6px; padding: 0 18px; }
  .search-submit .submit-label { display: inline; }
  .search-summary { justify-content: space-between; font-size: 12px; margin-top: 6px; }
  .search-summary .text-button { font-size: 12px; }
  .category-bar { position: static; }
  .category-inner { padding: 4px 16px 8px; gap: 10px; }
  #filters-open { width: 48px; padding: 0; justify-content: center; position: relative; }
  #filters-open>span:not(.count-dot) { display: none; }
  #filters-open .count-dot { position: absolute; top: -6px; right: -6px; }
  .compact-inner { gap: 8px; }
  .brand-mini,.compact-pill { display: none; }
  .compact-mobile { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; border: 1px solid var(--line); border-radius: 40px; box-shadow: var(--shadow-bar); background: #fff; text-align: left; }
  .compact-mobile svg { width: 18px; height: 18px; stroke-width: 2.2; }
  .compact-mobile>span { display: grid; min-width: 0; line-height: 1.3; }
  .compact-mobile strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compact-mobile>span>span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .compact-bar .compact-filter { display: inline-flex; width: 48px; padding: 0; justify-content: center; position: relative; }
  .compact-filter-label { display: none; }
  .compact-filter .count-dot { position: absolute; top: -6px; right: -6px; }
  .results-heading { margin-top: 14px; }
  .result-tools { justify-content: space-between; }
  .tool-button { padding: 8px 6px; }
  .scope-row { font-size: 12px; margin-bottom: 14px; }
  .results-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .empty-state { padding: 36px 16px; min-height: 220px; }
  .travel-note { font-size: 12px; }
  .source-status dt { min-width: 0; flex-basis: 100%; }
  :where(input:not([type=checkbox],[type=radio],[type=range]),select) { font-size: 16px; }
  .sort-label select { font-size: 16px; }
  dialog { max-width: 100vw; max-height: 100dvh; }
  .region-dialog,.filters-dialog,.detail-dialog,.logs-dialog { width: 100vw; height: 100dvh; border-radius: 0; margin: 0; }
  .people-dialog,.login-dialog,.picker-dialog:not(.region-dialog) { width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92dvh; }
  dialog[open] { animation-name: sheet-in; }
  @keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
  .dialog-header { min-height: 56px; padding: 8px 12px 8px 20px; }
  .dialog-body { padding: 16px 20px 20px; }
  .dialog-footer { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
  .dialog-footer .button { flex-shrink: 0; }
  .area-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .choice-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .logs-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .logs-filters label { min-width: calc(50% - 6px); flex: 1 1 calc(50% - 6px); }
  .logs-filters .button { flex: 1 1 auto; }
  .detail-header { padding: 8px 12px; }
  .detail-heading { font-size: 13px; }
  .detail-content { padding: 4px 16px 24px; }
  .detail-title { font-size: 22px; }
  .detail-section h3 { font-size: 18px; }
  .detail-section { padding: 22px 0; }
  .booking-card { padding: 16px; }
  .amenity-list,.info-grid { grid-template-columns: minmax(0,1fr); }
  footer { padding: 24px 16px; gap: 12px; font-size: 12px; }
}
@media(max-width:380px) {
  .brand>span { display: none; }
  .header { gap: 8px; }
  nav { gap: 10px; }
  .area-list { grid-template-columns: minmax(0,1fr); }
  .result-tools { flex-wrap: wrap; }
}
@media(forced-colors:active) {
  .choice input:checked+span,.amenity-chip input:checked+span,.area-option input:checked+span,.area-chip[aria-pressed=true] { outline: 3px solid CanvasText; outline-offset: 1px; }
  .save-button.saved svg { fill: CanvasText; }
  .rule-rows li.is-hit { outline: 2px solid CanvasText; }
  .toggle-row input[type=checkbox] { border: 2px solid ButtonText; }
  .toggle-row input[type=checkbox]:before { top: 0; left: 0; border: 2px solid ButtonText; box-sizing: border-box; }
  .toggle-row input[type=checkbox]:checked:before { background: Highlight; forced-color-adjust: none; }
}
@media(prefers-reduced-motion:reduce) {
  *,*:before,*:after,::backdrop { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
