:root {
  --ink: #17232e;
  --ink-2: #4a5866;
  --ink-3: #56636f;
  --line: #e2e6ea;
  --bg: #f6f5f1;
  --card: #ffffff;
  --brand: #0f5257;
  --brand-2: #e6f1f1;
  --accent: #d9480f;
  --star: #c27c0e;
  --good: #1f7a3d;
  --good-bg: #e7f4ea;
  --warn: #9a5b00;
  --warn-bg: #fdf2dd;
  --bad: #b3261e;
  --bad-bg: #fbe9e7;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  --top: 58px;
  --chips: 48px;
  --tab: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; }
[hidden] { display: none !important; }
a { color: var(--brand); }
button { font: inherit; color: inherit; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid #f59f00; outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.btn:hover { border-color: #c9d0d6; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: #0b4246; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.good { background: var(--good); color: #fff; border-color: var(--good); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 10px; font-size: 14px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.icon-btn { width: 44px; padding: 0; }
.btn:disabled { opacity: .5; cursor: default; }
.count {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}

/* ---------- login ---------- */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; background: var(--brand-2); }
.login-card { width: min(380px, 100%); background: var(--card); padding: 28px; border-radius: 20px; box-shadow: var(--shadow); display: grid; gap: 14px; }
.login-card input { height: 50px; font-size: 17px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); }
.error { color: var(--bad); margin: 0; min-height: 1em; }

/* ---------- layout ---------- */
.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--top); display: flex; align-items: center; gap: 8px; padding: 0 10px;
  background: var(--card); border-bottom: 1px solid var(--line); flex: none; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.01em; color: var(--brand); }
.brand.big { font-size: 22px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: var(--brand) url('/icons/glyph.svg') center/70% no-repeat; flex: none; }
.brand-text { display: none; }
.search { flex: 1; position: relative; min-width: 0; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input {
  width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg);
  padding: 0 12px 0 40px; font-size: 16px;
}
.filter-btn span:first-of-type { display: none; }

.chips {
  height: var(--chips); flex: none; display: flex; gap: 8px; align-items: center; padding: 0 10px;
  overflow-x: auto; background: var(--card); border-bottom: 1px solid var(--line); scrollbar-width: none; z-index: 15;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--line); background: var(--card);
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2);
}
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.area { border-style: dashed; }
.chip.area.on { border-style: solid; }

.main { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; }
.page { overflow-y: auto; padding: 16px 14px calc(var(--tab) + var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; }
.page h1 { font-size: 24px; margin: 4px 0 6px; letter-spacing: -.01em; }
.page h2 { font-size: 17px; margin: 22px 0 8px; }
.page .lede { color: var(--ink-2); margin: 0 0 14px; line-height: 1.45; }

.find-view { display: block; }
.list-pane { position: absolute; inset: 0; display: flex; flex-direction: column; }
.map-pane { position: absolute; inset: 0; visibility: hidden; }
.find-view.show-map .map-pane { visibility: visible; z-index: 2; }
@media (max-width: 959px) { .find-view.show-map .list-pane .results, .find-view.show-map .list-pane .more { visibility: hidden; } }
#map { position: absolute; inset: 0; background: #e8ecef; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 6px; flex: none; }
.summary { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.summary b { color: var(--ink); }
.sort { font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.sort select { height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-size: 14px; max-width: 170px; }
.mobile-toggle { display: flex; gap: 0; margin: 0 14px 8px; background: #e9ece9; border-radius: 12px; padding: 3px; flex: none; position: relative; z-index: 5; }
.seg { flex: 1; height: 36px; border: 0; background: transparent; border-radius: 10px; font-weight: 700; cursor: pointer; color: var(--ink-2); }
.seg.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
@media (max-width: 959px) { .list-head { flex-wrap: wrap; } .sort { width: 100%; justify-content: flex-end; } }
.find-view.show-map .mobile-toggle { position: absolute; top: 46px; left: 0; right: 0; z-index: 1001; box-shadow: var(--shadow); }
.find-view.show-map .list-head { position: relative; z-index: 1001; background: var(--bg); }

.results { flex: 1; overflow-y: auto; padding: 4px 12px calc(var(--tab) + var(--safe-b) + 20px); -webkit-overflow-scrolling: touch; }
.more { flex: none; }
.empty { text-align: center; color: var(--ink-2); padding: 40px 20px; line-height: 1.5; }
.empty b { display: block; font-size: 18px; color: var(--ink); margin-bottom: 6px; }

/* ---------- building card ---------- */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 12px; margin-bottom: 10px;
  border: 2px solid transparent; cursor: pointer;
}
.card.selected { border-color: var(--brand); }
.card-top { display: flex; align-items: flex-start; gap: 10px; }
.card-title { flex: 1; min-width: 0; }
.card-title h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.card-sub { font-size: 13.5px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; color: #c3c9ce; flex: none; }
.star svg { width: 26px; height: 26px; }
.star.on { color: var(--star); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
  background: #eef1f3; color: var(--ink-2); line-height: 1.2;
}
.badge.good { background: var(--good-bg); color: var(--good); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.brand { background: var(--brand-2); color: var(--brand); }
.badge svg { width: 15px; height: 15px; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.card-foot .btn { min-height: 40px; }
.card-foot .spacer { flex: 1; }
.status-pill { font-size: 12.5px; font-weight: 700; padding: 4px 9px; border-radius: 999px; color: #fff; }
.checked { font-size: 12.5px; color: var(--ink-3); }
.checked.stale { color: var(--warn); font-weight: 600; }

/* ---------- map ---------- */
.map-tools { position: absolute; left: 10px; right: 10px; bottom: calc(var(--tab) + var(--safe-b) + 12px); z-index: 1000; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; pointer-events: none; }
.map-tools > * { pointer-events: auto; }
.map-btn { box-shadow: var(--shadow); }
.map-check { background: var(--card); padding: 8px 12px; border-radius: 12px; box-shadow: var(--shadow); font-size: 14px; font-weight: 600; display: flex; gap: 6px; align-items: center; min-height: 44px; }
.draw-hint {
  position: absolute; top: 96px; left: 50%; transform: translateX(-50%); z-index: 1002; background: var(--ink); color: #fff;
  padding: 10px 10px 10px 16px; border-radius: 14px; display: flex; gap: 12px; align-items: center; width: max-content; max-width: calc(100% - 20px);
  font-size: 15px; box-shadow: var(--shadow);
}
.draw-hint .btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.drawing #map { cursor: crosshair; touch-action: none; }
.legend { position: absolute; right: 10px; top: 100px; z-index: 999; background: rgba(255,255,255,.95); border-radius: 10px; padding: 6px 10px; font-size: 12px; display: grid; gap: 3px; box-shadow: var(--shadow); color: var(--ink-2); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.d-default { background: #2b7a78; } .d-star { background: #e3a008; } .d-vacancy { background: #1f9d55; }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.35 system-ui, sans-serif; min-width: 200px; }
.pop h4 { margin: 0 0 4px; font-size: 15px; }
.pop .badges { margin: 6px 0 8px; }
.pop .btn { min-height: 38px; width: 100%; }
.dest-icon { background: var(--accent); color: #fff; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4); display: grid; place-items: center; font-weight: 900; font-size: 14px; }

/* ---------- detail ---------- */
.detail {
  position: fixed; inset: 0; z-index: 2000; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: up .18s ease-out;
}
@keyframes up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
.detail-head { position: sticky; top: 0; z-index: 3; background: var(--card); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 4px; }
.detail-head h2 { font-size: 17px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-body { padding: 14px 14px calc(110px + var(--safe-b)); max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 24px; margin: 4px 0 4px; letter-spacing: -.01em; }
.hero .card-sub { white-space: normal; font-size: 15px; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin: 14px 0; }
.panel h3 { margin: 0 0 10px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.panel p { margin: 6px 0; line-height: 1.45; }
.muted { color: var(--ink-3); font-size: 14px; }
.big-action { display: grid; gap: 8px; }
.big-action .btn { min-height: 52px; font-size: 16px; }
.actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.actions-grid .btn { min-height: 46px; font-size: 14px; white-space: normal; text-align: center; line-height: 1.15; }
.facts { display: grid; grid-template-columns: 1fr; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eef0f2; font-size: 15px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.yes { color: var(--good); } .no { color: var(--ink-3); font-weight: 500 !important; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; }
.status-row .chip { height: 38px; }
textarea, .field input, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 16px; background: #fff;
}
textarea { min-height: 96px; resize: vertical; }
.field { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.check-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.check-row .btn { min-height: 48px; }
.history { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.cat { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid #eef0f2; font-size: 14.5px; }
.cat:last-child { border-bottom: 0; }
.cat .lvl { font-weight: 700; }
.lvl.l1 { color: var(--bad); } .lvl.l2 { color: var(--warn); } .lvl.l3 { color: var(--good); }
details summary { cursor: pointer; font-weight: 600; color: var(--brand); padding: 8px 0; }
.scorebig { font-size: 40px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.scoreline { display: flex; align-items: center; gap: 14px; }
.callout { background: var(--brand-2); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; }
.callout.warn { background: var(--warn-bg); }

/* ---------- sheet (filters, dialogs) ---------- */
.sheet { position: fixed; inset: 0; z-index: 3000; background: rgba(15,25,35,.45); display: flex; align-items: flex-end; }
.sheet-card {
  background: var(--bg); width: 100%; max-height: 92%; border-radius: 20px 20px 0 0; display: flex; flex-direction: column;
  animation: up .18s ease-out;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line); background: var(--card); border-radius: 20px 20px 0 0; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.sheet-body { overflow-y: auto; padding: 6px 16px 16px; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 16px calc(10px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--card); display: flex; gap: 10px; }
.sheet-foot .btn { flex: none; min-height: 50px; font-size: 16px; }
.sheet-foot .btn.primary, .sheet-foot .btn:only-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fgroup { background: var(--card); border-radius: var(--radius); padding: 4px 14px; margin: 12px 0; box-shadow: var(--shadow); }
.fgroup h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin: 12px 0 2px; }
.frow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; border-bottom: 1px solid #eef0f2; }
.frow:last-child { border-bottom: 0; }
.frow label { flex: 1; font-size: 15.5px; cursor: pointer; }
.frow small { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.frow select, .frow input[type=number] { height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 15px; padding: 0 8px; max-width: 46%; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #cfd5da; border-radius: 16px; transition: .15s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid #f59f00; outline-offset: 2px; }
.seg-choice { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0; }
.seg-choice .chip { height: 38px; }

/* ---------- check & list pages ---------- */
.group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px 0; overflow: hidden; }
.group-head { padding: 14px; display: grid; gap: 8px; border-bottom: 1px solid #eef0f2; }
.group-head h3 { margin: 0; font-size: 17px; }
.group-head .row .btn { flex: 1; }
.gitem { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #eef0f2; }
.gitem:last-child { border-bottom: 0; }
.gitem .grow { flex: 1; min-width: 0; cursor: pointer; }
.gitem .grow b { display: block; font-size: 15px; }
.tabs-inline { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 4px; }
.stat { background: var(--card); border-radius: 12px; padding: 10px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 12.5px; color: var(--ink-3); }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line); display: flex; z-index: 1500;
}
.tab { flex: 1; border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 600; color: var(--ink-3); cursor: pointer; position: relative; }
.tab svg { width: 24px; height: 24px; }
.tab.active { color: var(--brand); }
.tab .count { position: absolute; top: 6px; left: calc(50% + 6px); height: 18px; min-width: 18px; font-size: 11px; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab) + var(--safe-b) + 16px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 4000; font-weight: 600; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

.desktop-only { display: none !important; }

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  :root { --tab: 0px; }
  .desktop-only { display: inline-flex !important; }
  label.desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .topbar { padding: 0 16px; gap: 12px; }
  .brand-text { display: inline; }
  .search { max-width: 460px; }
  .filter-btn span:first-of-type { display: inline; }
  .tabbar { position: static; order: 0; height: auto; border: 0; background: transparent; margin-left: auto; gap: 4px; padding: 0; }
  .topbar .tabbar-slot { margin-left: auto; }
  .tab { flex-direction: row; gap: 6px; padding: 0 14px; height: 40px; border-radius: 10px; font-size: 14.5px; flex: none; }
  .tab svg { width: 18px; height: 18px; }
  .tab.active { background: var(--brand-2); }
  .tab .count { position: static; }
  .chips { padding: 0 16px; }
  .find-view .list-pane { right: auto; width: 440px; border-right: 1px solid var(--line); background: var(--bg); z-index: 3; }
  .find-view .map-pane { left: 440px; visibility: visible; }
  .results { padding-bottom: 24px; }
  .map-tools { bottom: 18px; left: 16px; right: auto; }
  .legend { top: 12px; }
  .draw-hint { top: 16px; }
  .detail { inset: calc(var(--top) + var(--chips)) auto 0 0; width: 440px; border-right: 1px solid var(--line); box-shadow: 8px 0 24px rgba(0,0,0,.08); }
  .detail-body { padding-bottom: 40px; }
  .sheet { align-items: stretch; justify-content: flex-end; }
  .sheet-card { width: 460px; max-height: none; height: 100%; border-radius: 0; }
  .sheet-head { border-radius: 0; }
  .sheet.center { align-items: center; justify-content: center; }
  .sheet.center .sheet-card { height: auto; max-height: 86%; border-radius: 18px; }
  .sheet.center .sheet-head { border-radius: 18px 18px 0 0; }
  .page { padding: 24px 24px 40px; }
  .page > .wrap { max-width: 860px; margin: 0 auto; }
  .toast { bottom: 24px; }
}

/* ---------- added in review fixes ---------- */
.linkish { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; font: inherit; font-size: inherit; }
.linkish.strong { font-weight: 700; text-decoration: none; display: block; margin-top: 6px; font-size: 14.5px; text-align: left; }
.active-filters { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.center { text-align: center; }
.card-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.card-link:focus-visible { outline: 3px solid #f59f00; outline-offset: 3px; border-radius: 4px; }
.card:hover { border-color: #cfe1e1; }
.badge.rent { background: #efe9fb; color: #5b3aa8; }
.welcome { margin: 0 0 12px; border: 2px solid var(--brand-2); }
.welcome ol { margin: 4px 0 12px; padding-left: 22px; line-height: 1.5; font-size: 15px; }
.welcome li { margin-bottom: 4px; }
.rent-list { display: grid; gap: 0; margin-bottom: 8px; }
.rent-row { display: grid; grid-template-columns: 80px 70px 1fr 40px; align-items: center; gap: 6px; padding: 6px 0; border-bottom: 1px solid #eef0f2; font-size: 15px; }
.rent-row .btn { width: 40px; padding: 0; }
.rent-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; align-items: end; }
.rent-form .field { margin: 6px 0; }
.rent-form .btn { grid-column: 1 / -1; margin-top: 4px; }
.history-note { padding: 8px 0; border-bottom: 1px solid #eef0f2; white-space: pre-wrap; font-size: 14.5px; }
.score-good { color: var(--good); } .score-warn { color: var(--warn); } .score-bad { color: var(--bad); }
.vertex { background: #fff; border: 3px solid #d9480f; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.draw-hint small { opacity: .8; }
.draw-hint .btn.solid { background: #fff; color: var(--ink); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { background: transparent; color: #ffd28a; border: 0; font-weight: 800; cursor: pointer; padding: 6px 4px; font-size: 15px; }
.gitem .grow .linkish.strong { margin: 0 0 2px; font-size: 15px; color: var(--ink); }

@media (max-width: 959px) { .find-view.show-map .mobile-toggle { top: auto; } .find-view.show-map .list-head + .mobile-toggle { position: relative; top: 0; } }
@media (max-width: 959px) { .find-view.show-map .list-head + .mobile-toggle { margin: 0; border-radius: 0; padding: 3px 14px 8px; background: var(--bg); box-shadow: 0 2px 6px rgba(0,0,0,.08); } }

/* ---------- AI ---------- */
.ai-btn { color: #6d28d9; border-color: #ddd0f7; background: #f6f1ff; }
.ai-btn span { display: none; }
@media (min-width: 960px) { .ai-btn span { display: inline; } }
.ai-banner { background: #f6f1ff; border: 1px solid #ddd0f7; border-radius: 12px; padding: 8px 12px; margin-top: 6px; font-size: 13.5px; color: #3b2a63; line-height: 1.4; }
.ai-banner b { color: #4c1d95; }
.ai-choice { display: grid; gap: 10px; }
.ai-choice button { text-align: left; display: block; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); cursor: pointer; box-shadow: var(--shadow); }
.ai-choice b { display: block; font-size: 16px; margin-bottom: 3px; }
.ai-choice span { color: var(--ink-2); font-size: 14px; }
.examples { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.examples .chip { height: auto; min-height: 34px; padding: 6px 10px; white-space: normal; text-align: left; font-weight: 500; }
.scam { background: var(--bad-bg); color: #7a1a14; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; }
.scam ul { margin: 6px 0 0; padding-left: 20px; }
.ok-note { background: var(--good-bg); color: #14532d; border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.match { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eef0f2; flex-wrap: wrap; }
.match .grow { flex: 1; min-width: 160px; }
.ai-line { font-size: 13px; margin-top: 3px; display: block; }
.ai-line.found { color: var(--good); font-weight: 700; }
.ai-line.none { color: var(--ink-3); }
.ai-line.problem { color: var(--warn); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 3px solid #ddd0f7; border-top-color: #6d28d9; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -4px; margin-right: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.examples .chip { flex: 0 1 auto; max-width: 100%; }
