:root {
  --ink: #1c1d24;
  --muted: #5d6670;
  --line: #e3e6ea;
  --bg: #f3f5f7;
  --card: #ffffff;
  --accent: #17288b;
  --accent-2: #00afdd;
  --accent-soft: #eef0f8;
  --fav: #b45309;
  --fav-soft: #fff7ed;
  --ok: #1f6b3a;
  --side: 268px;
  --detail: min(440px, 100vw);
  --font: Inter, "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(26, 31, 38, 0.08);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --top-h: 0px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html {
  max-width: 100%;
}
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { appearance: none; }
button, a, input, select, summary, .card, .tag, .chip {
  touch-action: manipulation;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  z-index: 50;
  background: var(--accent);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  min-width: 0;
  background: #fff;
  border-bottom: 4px solid var(--accent);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  color: inherit;
  text-decoration: none;
}
.site-logo-img {
  height: 40px;
  width: auto;
  max-width: min(220px, calc(100vw - 168px));
  flex: 0 1 auto;
  display: block;
  object-fit: contain;
  object-position: left center;
}
.site-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
}
.site-menu a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 6px;
}
.site-menu a:hover { background: var(--accent-soft); }
.site-menu a[aria-current="page"] { font-weight: 700; }

.top {
  position: sticky;
  top: 0;
  flex: 0 0 auto;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 24px;
  align-items: center;
  padding: 0 24px 0;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(26, 31, 38, 0.04);
}
.top .site-nav {
  position: relative;
  z-index: auto;
  grid-column: 1 / -1;
  margin: 0 -24px;
  padding: 0 24px;
}
.top .search {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 10px 0;
}
.top .top-stats {
  grid-column: 2;
  grid-row: 2;
  align-self: stretch;
}
.brand { min-width: 0; }
.eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.top h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.lede {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.lede a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.lede a:hover { text-decoration: underline; }
.site-notice {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 24px;
  background: #fff4e5;
  color: #7c2d12;
  font-size: 12px;
  line-height: 1.55;
  border-top: 1px solid #f0d2b0;
  border-bottom: 1px solid #f0d2b0;
  min-width: 0;
}
.site-notice strong {
  display: inline-block;
  flex: 0 0 auto;
  margin-right: 0;
  padding: 1px 7px;
  border-radius: 999px;
  background: #9a3412;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.site-notice .notice-long,
.site-notice .notice-short {
  min-width: 0;
  flex: 1 1 8rem;
}
.site-notice a {
  color: #9a3412;
  font-weight: 700;
  white-space: nowrap;
}
.notice-short { display: none; }
.site-foot {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin: 32px 0 8px;
  padding: 28px 0 12px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  letter-spacing: 0;
}
.site-foot p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.site-foot a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.site-foot a:hover { text-decoration: underline; color: var(--accent); }
.foot-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  min-width: 0;
}
.foot-brand .site-logo { margin-bottom: 2px; flex: 0 0 auto; }
.foot-brand .site-logo-img { height: 36px; max-width: 200px; }
.foot-navs { display: contents; }
.site-foot .foot-title {
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
  color: var(--muted);
}
.site-foot nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.site-foot nav a {
  padding: 3px 0;
}
.foot-meta {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.search {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  color: var(--muted);
  pointer-events: none;
}
.search input {
  width: 100%;
  border: 1px solid #c9d0d8;
  border-radius: 999px;
  padding: 10px 88px 10px 38px;
  background: #fff;
  outline: none;
  font-size: 15px;
  line-height: 1.4;
}
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input::placeholder { color: #8b939c; }
.search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -0.7em;
  min-width: 22px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  font-family: inherit;
}
.search:focus-within .search-kbd,
.search:has(.search-clear:not([hidden])) .search-kbd { display: none; }
button.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}
.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 999px;
}
.search-clear:hover { background: var(--bg); color: var(--ink); }
.top-stats {
  display: flex;
  gap: 8px;
  white-space: nowrap;
  align-items: center;
  padding: 10px 0;
  min-width: 0;
  flex-shrink: 1;
}
.stat {
  border: 0;
  background: transparent;
  padding: 2px 8px;
  text-align: right;
  cursor: default;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 4.75em;
}
.stat b {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat.btn { cursor: pointer; border-radius: 8px; padding: 2px 8px; }
.stat.btn:hover,
.stat.btn.on { background: var(--fav-soft); color: var(--fav); }
.stat.btn.on b { color: var(--fav); }

.shell {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  overflow: hidden;
}
.filters {
  border-right: 1px solid var(--line);
  padding: 16px 16px 24px;
  background: var(--card);
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.filters .hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.filter-block { margin: 0; }
.filter-block summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  list-style: none;
  padding: 11px 0 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-block summary::-webkit-details-marker { display: none; }
.filter-block summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-right: 1.5px solid #9aa3ad;
  border-bottom: 1.5px solid #9aa3ad;
  transform: rotate(45deg);
  translate: 0 -2px;
}
.filter-block[open] summary::after { transform: rotate(-135deg); translate: 0 2px; }
.filter-block summary .n-sel {
  color: var(--accent);
  font-weight: 600;
  margin-left: 0;
}
.filter-block .filter-list,
.filter-block .chip-row {
  margin-top: 8px;
  max-height: 240px;
  overflow: auto;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip,
.check {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 999px;
  flex: 0 0 auto;
  max-width: 100%;
}
.chip.on,
.check:has(input:checked) {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #c5c9e8;
}
.chip.fav.on {
  background: var(--fav-soft);
  color: var(--fav);
  border-color: #f0d2b0;
}
.check { display: inline-flex; gap: 6px; align-items: center; }
.check input { accent-color: var(--accent); }
.filter-list { display: grid; gap: 1px; }
.filter-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 2.2em;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
  padding: 7px 6px;
  border-radius: 6px;
  min-height: 34px;
}
.filter-list label:hover { background: var(--bg); }
.filter-list input { margin: 0; accent-color: var(--accent); }
.filter-list label span:not(.n) {
  min-width: 0;
  line-height: 1.35;
}
.filter-list .n {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.filters .ghost {
  width: 100%;
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px;
  cursor: pointer;
  color: var(--muted);
}
.filters .ghost:hover { background: var(--bg); color: var(--ink); }
.filters .ghost:disabled { opacity: 0.4; cursor: default; }

.main {
  min-width: 0;
  overflow: auto;
  padding: 0 24px 48px;
}
.toolbar {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  padding: 14px 0 12px;
  background: var(--bg);
}
.toolbar .count {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.toolbar-end {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-left: auto;
  min-width: 0;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-left: 4px;
  flex: 0 0 auto;
  min-width: 0;
}
.seg button {
  border: 0;
  background: transparent;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.seg button.on {
  background: var(--accent);
  color: #fff;
}
.seg button:focus-visible,
.chip:focus-visible,
.save-btn:focus-visible,
.fav-btn:focus-visible,
.close:focus-visible,
.sort:focus-visible,
.sort-dir:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
select.sort {
  border: 0;
  background: transparent;
  padding: 7px 2px;
  font-size: 13px;
  min-width: 0;
  max-width: 16em;
  width: 11em;
}
.sort-field {
  display: inline-flex;
  align-items: center;
  gap: 2px 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 4px 0 10px;
  min-height: 34px;
  min-width: 0;
  flex-shrink: 1;
}
.sort-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
.sort-dir {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  white-space: nowrap;
}
.sort-dir:hover { background: var(--bg); color: var(--ink); }
.sort-dir.on {
  background: var(--accent-soft);
  color: var(--accent);
}
.interest {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
  min-width: 0;
  max-width: 100%;
}
.interest[hidden] { display: none; }
.interest .label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  flex: 0 0 auto;
}
.view-hint {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.view-hint[hidden] { display: none; }
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 0 0 12px;
  min-width: 0;
  max-width: 100%;
}
.active-filters[hidden] { display: none; }
.active-filters .chip { padding-right: 8px; }
.active-filters .chip .x { margin-left: 4px; opacity: 0.6; }
.results.list { display: grid; gap: 8px; min-width: 0; }
.results.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
  gap: 12px;
}
.group-h {
  grid-column: 1 / -1;
  margin: 22px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.group-h:first-child { margin-top: 4px; }
.group-h .n {
  font-weight: 500;
  color: var(--muted);
  font-size: 12px;
}

.card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  width: 100%;
  align-items: start;
  scroll-margin-top: 64px;
  position: relative;
}
.results.cards .card {
  grid-template-columns: 1fr;
  min-height: 0;
  padding: 0 0 14px;
  overflow: hidden;
}
.results.cards .card .thumb,
.results.cards .card .thumb-ph { border-radius: 0; }
.results.cards .meta { padding: 0 14px; }
.results.cards .save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 4px rgba(26, 31, 38, 0.12);
}
.card:hover {
  border-color: #c5d4e8;
  box-shadow: var(--shadow);
}
.card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.card:active {
  background: #f7f9fb;
}
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.thumb,
.thumb-ph {
  width: 80px;
  height: 80px;
  object-fit: cover;
  object-position: top center;
  background: var(--bg);
  border-radius: 8px;
}
.thumb-ph {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 700;
  font-size: 18px;
}
.results.cards .thumb,
.results.cards .thumb-ph {
  width: 100%;
  height: 148px;
}
.meta { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
  min-width: 0;
}
.name {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.title {
  margin: 4px 0 8px;
  font-size: 13px;
  color: #434a53;
  line-height: 1.5;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--bg);
  color: #434a53;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
}
.tag:hover { background: var(--accent-soft); color: var(--accent); }
.room {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.room-id {
  color: var(--ink);
  font-weight: 700;
}
.badge {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.save-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  border-radius: 999px;
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 0;
}
.save-btn svg { width: 16px; height: 16px; }
.save-btn:hover,
.save-btn.on {
  background: var(--fav-soft);
  color: var(--fav);
  border-color: #f0d2b0;
}
.save-btn.on svg,
.save-btn.on svg path { fill: currentColor; }

.detail-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 8px;
}
.fav-btn {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.fav-btn.on {
  background: var(--fav-soft);
  color: var(--fav);
  border-color: #f0d2b0;
}
.memo {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--card);
  resize: vertical;
  border-radius: var(--radius);
}
.save-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}
.save-hint a { font-weight: 700; }
.g-Ⅰ { color: var(--accent); }
.g-Ⅱ { color: #0f766e; }
.g-Ⅲ { color: #b45309; }

.empty {
  padding: 72px 16px;
  text-align: center;
  color: var(--muted);
}
.empty p { margin: 0 0 16px; }
.empty .ghost {
  border: 1px solid var(--line);
  background: var(--card);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}
.empty .ghost:hover { background: var(--accent-soft); color: var(--accent); }

.detail-root[hidden] { display: none !important; }
.detail-root {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr var(--detail);
}
.detail-backdrop { background: rgba(26, 31, 38, 0.28); }
.detail {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  overflow: hidden;
  padding: 0;
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 0;
}
.detail-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 20px;
}
.detail-foot {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--card);
  z-index: 3;
}
.detail-foot .fav-btn {
  min-height: 44px;
  width: 100%;
}

@media (min-width: 1101px) {
  body.detail-open .top,
  body.detail-open .shell {
    margin-right: var(--detail);
  }
  body.detail-open .detail-root {
    inset: 0 0 0 auto;
    width: var(--detail);
    grid-template-columns: minmax(0, 1fr);
  }
  body.detail-open .detail-backdrop { display: none; }
}
.detail-bar {
  position: relative;
  flex: 0 0 auto;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.detail-bar-name {
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail .close {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}
.detail-hero img.hero {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  background: #2a2e34;
}
.detail-hero-text { padding: 16px 20px 8px; }
.detail-hero .kicker { margin-bottom: 6px; }
.detail-hero h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.detail-hero .lead {
  font-size: 15px;
  margin: 0;
  color: #434a53;
  line-height: 1.55;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.detail-room {
  display: inline-block;
  margin: 10px 0 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}
.detail-body { padding: 8px 20px 0; }
.detail-sec { margin: 18px 0; }
.detail-sec h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.body { font-size: 14px; margin: 0; }
.kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 16px;
  font-size: 13px;
  margin: 0;
}
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv a { color: var(--accent); }
.kv button.linkish { font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a,
.links button.plain {
  display: inline-block;
  max-width: 100%;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: var(--accent);

  background: var(--card);
  cursor: pointer;
  font-size: 13px;
}
.links a:hover { background: var(--accent-soft); }
.msg {
  background: var(--accent-soft);
  padding: 12px 14px;
  font-size: 13px;
  margin: 0;
  border-radius: var(--radius);
  color: #27466e;
  line-height: 1.65;
}
.links a.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.links a.primary:hover { background: #163d73; color: #fff; }
.extra-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.group-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.filter-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--card);
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 999px;
}
.filter-toggle.on {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: #c5d4e8;
}
.filter-scrim {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 22;
  border: 0;
  background: rgba(26, 31, 38, 0.32);
  color: transparent;
  cursor: pointer;
}
.filters-head {
  display: none;
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--card);
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 0 12px;
  margin: 0 0 4px;
  border-bottom: 1px solid var(--line);
}
.filters-handle {
  grid-column: 1 / -1;
  width: 36px;
  height: 4px;
  margin: 4px auto 8px;
  background: #d5dbe2;
  border-radius: 999px;
}
.filters-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.filters-done {
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 8px 16px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
}

@media (hover: none) {
  .card:hover {
    border-color: var(--line);
    box-shadow: none;
  }
  .card.active:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
  }
}

@media (max-width: 1100px) {
  html, body { height: auto; }
  body {
    overflow-x: clip;
    overflow-y: auto;
  }
  .top {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 12px;
    padding: 0 16px 0;
  }
  .top .site-nav {
    margin: 0 -16px;
    padding: 0 16px;
    padding-top: var(--safe-top);
    min-height: calc(56px + var(--safe-top));
  }
  .site-notice {
    margin: 0;
    padding: 8px 16px;
  }
  .search { min-width: 0; }
  .search input {
    font-size: 16px;
    padding: 12px 16px 12px 38px;
    min-height: 44px;
  }
  .search:has(.search-clear:not([hidden])) input { padding-right: 64px; }
  .search-clear {
    min-width: 44px;
    min-height: 44px;
  }
  .top h1 { font-size: 20px; }
  .shell {
    display: block;
    overflow: visible;
  }
  .main {
    padding: 0 16px calc(48px + var(--safe-bottom));
    overflow: visible;
  }
  .toolbar { top: var(--top-h, 0px); }
  .site-foot {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
  .foot-navs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
  }
  .filters {
    display: none;
    position: fixed;
    z-index: 24;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 88vw);
    max-height: none;
    padding: calc(12px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
    box-shadow: var(--shadow);
    overscroll-behavior: contain;
  }
  .filters-head { display: grid; }
  .filters-handle { display: none; }
  body.filters-open,
  body.detail-open {
    overflow: hidden;
    height: 100%;
    height: 100dvh;
  }
  body.filters-open .filters { display: flex; }
  body.filters-open .filter-scrim { display: block; }
  .detail-root {
    display: block;
  }
  .detail-backdrop { display: none; }
  .detail {
    position: fixed;
    inset: 0;
    width: auto;
    height: 100%;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .detail-bar { padding-top: calc(10px + var(--safe-top)); }
  .filter-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 14px;
    font-weight: 700;
    flex: 0 0 auto;
  }
  .card { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .thumb, .thumb-ph { width: 64px; height: 64px; }
  .toolbar .count {
    margin-left: 0;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .group-chips {
    flex: 1 1 auto;
    min-width: 0;
  }
  .toolbar-end {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    min-width: 0;
  }
  .seg { flex: 0 0 auto; min-width: 0; }
  .sort-field { flex: 0 0 auto; }
  .search-kbd { display: none; }
  .links a,
  .links button.plain {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
  }
  .detail .close {
    min-height: 40px;
    padding: 8px 16px;
  }
  body.doc .site-nav {
    padding: 0 16px;
    padding-top: var(--safe-top);
  }
  body.doc .site-notice { padding: 8px 16px; }
  .doc-main { padding-left: 16px; padding-right: 16px; }
  body.doc > .site-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 720px) {
  .notice-long { display: none; }
  .notice-short { display: block; }
  .top {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 0 12px 0;
    position: sticky;
    top: 0;
    z-index: 22;
    min-width: 0;
  }
  .top .site-nav {
    position: relative;
    z-index: auto;
    margin: 0 -12px;
    padding: 0 12px;
    padding-top: var(--safe-top);
    min-height: calc(48px + var(--safe-top));
    background: #fff;
    gap: 8px;
  }
  .site-logo-img {
    height: 28px;
    max-width: min(148px, calc(100vw - 140px));
  }
  .site-menu .nav-extra { display: none; }
  .site-menu a { padding: 8px 8px; font-size: 13px; }
  .top-stats { display: none; }
  .top .search {
    min-width: 0;
    margin: 0 -12px;
    padding: 8px 12px;
    background: var(--card);
  }
  .search input { padding-right: 16px; }
  .search:has(.search-clear:not([hidden])) input { padding-right: 64px; }
  .site-notice {
    margin: 0;
    padding: 5px 12px;
    font-size: 11px;
    line-height: 1.4;
    overflow: visible;
  }
  .site-foot {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-top: 22px;
    min-width: 0;
  }
  .foot-navs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
    padding-top: 4px;
  }
  .site-foot nav a {
    padding: 5px 0;
  }
  .main {
    padding: 0 12px calc(32px + var(--safe-bottom));
    overflow: visible;
  }
  .toolbar {
    position: sticky;
    top: var(--top-h, 0px);
    z-index: 6;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 6px 8px;
    margin: 0 -12px;
    padding: 8px 12px;
    min-width: 0;
    align-items: center;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .toolbar-end { display: contents; }
  .filter-toggle {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    min-height: 40px;
    padding: 6px 12px;
  }
  .toolbar .count {
    display: block;
    grid-column: 3;
    grid-row: 1;
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    margin: 0;
    font-size: 12px;
    align-self: center;
    justify-self: end;
    white-space: nowrap;
  }
  .group-chips,
  .active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    min-width: 0;
  }
  .group-chips {
    grid-column: 1 / -1;
    grid-row: 2;
    flex: none;
  }
  .group-chips .chip,
  .active-filters .chip {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 6px 10px;
  }
  .seg {
    grid-column: 1 / 3;
    grid-row: 3;
    display: flex;
    width: auto;
    margin-left: 0;
    min-width: 0;
  }
  .seg button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    padding: 6px 8px;
    white-space: nowrap;
  }
  .sort-field {
    grid-column: 3;
    grid-row: 3;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    justify-content: flex-end;
  }
  .sort-label { display: none; }
  .sort-field .sort {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 7.5em;
    width: auto;
    font-size: 16px;
    padding: 6px 4px;
  }
  .sort-dir {
    min-height: 40px;
    padding: 6px 10px;
    flex-shrink: 0;
  }
  .results.list .title {
    display: none;
  }
  .results.cards .title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
    font-size: 13px;
    overflow-wrap: anywhere;
  }
  .interest { display: none; }
  .active-filters {
    margin: 8px 0;
    padding-bottom: 2px;
  }
  .filters {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: min(88dvh, 100%);
    max-height: min(88dvh, 100%);
    border-radius: 16px 16px 0 0;
    padding: 4px 16px calc(16px + var(--safe-bottom));
  }
  .filters-handle { display: block; }
  .filters .hint { display: none; }
  .filter-list label {
    min-height: 44px;
    align-items: center;
    font-size: 15px;
    padding: 10px 6px;
  }
  .filter-list input { margin: 0; }
  .filter-block summary { padding: 14px 0 10px; font-size: 13px; }
  .filters .ghost {
    min-height: 44px;
    margin-top: 12px;
  }
  .results.list,
  .results.cards {
    gap: 6px;
  }
  .results.list .card {
    grid-template-columns: 52px minmax(0, 1fr) 40px;
    gap: 6px 10px;
    padding: 8px;
    min-width: 0;
    scroll-margin-top: calc(var(--compact-sticky, 110px) + 8px);
  }
  .results.list .thumb,
  .results.list .thumb-ph {
    width: 52px;
    height: 52px;
  }
  .save-btn {
    width: 40px;
    height: 40px;
  }
  .name {
    font-size: 15px;
    overflow-wrap: anywhere;
    line-height: 1.35;
  }
  .results.list .tags,
  .results.cards .tags { display: none; }
  .results.list .kicker {
    flex-wrap: nowrap;
    overflow: hidden;
    margin-bottom: 1px;
  }
  .results.list .kicker span {
    white-space: nowrap;
  }
  .results.list .kicker span:nth-child(n + 3) { display: none; }
  .results.list .room {
    margin-top: 2px;
    flex-wrap: wrap;
    overflow: visible;
  }
  .results.list .room-id {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.01em;
  }
  .results.list .hometown { display: none; }
  .results.cards {
    grid-template-columns: 1fr;
  }
  .results.cards .card {
    grid-template-columns: 1fr;
    scroll-margin-top: calc(var(--compact-sticky, 110px) + 8px);
  }
  .results.cards .thumb,
  .results.cards .thumb-ph,
  .results.cards .card .thumb,
  .results.cards .card .thumb-ph {
    width: 100%;
    height: 112px;
    border-radius: 0;
  }
  .results.cards .meta {
    padding: 0 14px;
    padding-right: 52px;
  }
  .results.cards .save-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 1px 4px rgba(26, 31, 38, 0.12);
  }
  .group-h {
    position: sticky;
    top: var(--compact-sticky, 110px);
    z-index: 4;
    margin-top: 12px;
    margin-left: -12px;
    margin-right: -12px;
    padding: 8px 12px;
    font-size: 13px;
    background: var(--bg);
    border-bottom-color: var(--line);
  }
  .view-hint {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  .detail-hero img.hero { height: 140px; }
  .detail-hero h2 {
    font-size: 20px;
    overflow-wrap: anywhere;
  }
  .detail-hero .lead { overflow-wrap: anywhere; }
  .detail-hero-text,
  .detail-body { padding-left: 16px; padding-right: 16px; }
  .kv {
    grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
    font-size: 14px;
  }
  .detail-foot {
    padding: 10px 16px calc(12px + var(--safe-bottom));
  }
}

@media (max-width: 400px) {
  .site-notice {
    font-size: 11px;
    padding: 5px 12px;
  }
  .site-notice strong {
    margin-right: 0;
    font-size: 10px;
    padding: 1px 6px;
  }
  .site-logo-img {
    height: 24px;
    max-width: min(120px, calc(100vw - 128px));
  }
  .seg button {
    padding: 6px 4px;
    font-size: 12px;
  }
  .results.list .card {
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    gap: 8px;
    padding: 8px;
  }
  .results.list .thumb,
  .results.list .thumb-ph {
    width: 48px;
    height: 48px;
  }
  .save-btn {
    width: 36px;
    height: 36px;
  }
  .name { font-size: 14px; }
  .kv {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }
  .kv dt { white-space: normal; }
}

body.doc {
  display: block;
  overflow-x: clip;
  overflow-y: auto;
  height: auto;
  min-height: 100%;
  background: #fff;
  font-size: 16px;
  line-height: 2;
  letter-spacing: 0.025em;
  max-width: 100%;
}
body.doc .site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0 24px;
  padding-top: var(--safe-top);
}
body.doc .site-notice {
  margin: 0;
  padding: 8px 24px;
}
.crumbs {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.5;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--muted);
}
.crumbs li {
  display: flex;
  align-items: center;
}
.crumbs li:not(:last-child)::after {
  content: ">";
  margin: 0 8px;
  color: #b0b6be;
}
.crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.crumbs a:hover { text-decoration: underline; color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }
.doc-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 20px 24px 8px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.doc-main h1 {
  margin: 0 0 32px;
  padding: 12px 8px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.35;
  border-bottom: 3px solid var(--accent);
  scroll-margin-top: 88px;
}
.doc-lead {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--ink);
}
.doc-main section h2 {
  margin: 32px 0 16px;
  padding: 8px 16px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.4;
  border-left: 8px solid var(--accent);
  scroll-margin-top: 88px;
}
.doc-main h1 + h2,
.doc-main section h1 + h2 {
  margin-top: 0;
}
.doc-main h3 {
  margin: 1.6em 0 0.5em;
  font-size: 1.05rem;
  scroll-margin-top: 88px;
}
.doc-main p { margin: 0 0 24px; }
.doc-main li { margin: 0 0 6px; }
.doc-main ul { padding-left: 1.4em; margin: 0 0 24px; }
.doc-main a { font-weight: 600; }
.doc-main > :last-child { margin-bottom: 0; }
.doc-aside {
  margin: 4px 0 0;
  padding: 0;
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--muted);
}
.doc-aside a { font-weight: 600; }
.nowrap { white-space: nowrap; }
.doc-main code {
  font-size: 0.88em;
  letter-spacing: 0;
  background: var(--accent-soft);
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-all;
}
.doc-policy {
  margin: 0 0 24px;
}
.doc-policy > div { margin: 0 0 16px; }
.doc-policy dt {
  font-weight: 700;
  margin: 0;
}
.doc-policy dd {
  margin: 0 0 8px;
  padding: 0 0 0 16px;
}
body.doc > .site-foot {
  width: 100%;
  margin: 32px 0 0;
  padding: 28px max(24px, calc((100% - 960px) / 2)) calc(20px + var(--safe-bottom));
  background: #f6f6f7;
  border-top: 1px solid var(--line);
}

@media (max-width: 720px) {
  body.doc .site-nav {
    padding: 0 12px;
    padding-top: var(--safe-top);
    min-height: calc(52px + var(--safe-top));
    gap: 8px;
  }
  body.doc .site-notice { padding: 8px 12px; }
  .doc-main {
    padding: 16px 16px 0;
  }
  .doc-main h1 { font-size: 1.35rem; padding: 10px 4px; }
  .nowrap { white-space: normal; }
  body.doc > .site-foot {
    margin-top: 24px;
    padding: 22px 16px calc(16px + var(--safe-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .card, .detail, .filters { transition: none; }
}
