/* Radar GSTH. Identidade: grafite, lima só como sinal, Space Grotesk + Inter + JetBrains Mono.
   Layout: aplicativo de uma tela. Lista ordenada pela pontuação à esquerda, mapa sincronizado à direita. */
:root {
  --bg: #0b0d10; --void: #07090b; --surface: #12161b; --raised: #1a2026; --raised2: #222a31;
  --ink: #f2f4f0; --soft: #d3d9dd; --muted: #9aa4af; --faint: #6f7a83;
  --line: rgba(242,244,240,.09); --line2: rgba(242,244,240,.18);
  --lime: #c8f031; --lime2: #d8f86a; --on-lime: #0b0d10; --amber: #f0bc66; --danger: #ff8c7f;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.16,1,.3,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 14px; line-height: 1.45; }
h1, h2, h3, p, ul, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 8px; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.err { color: var(--danger); font-size: 13px; }

.app { height: 100%; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { height: 30px; width: auto; display: block; }
.logo span { font-family: var(--display); font-size: 18px; letter-spacing: -0.03em; }
.status { margin-left: auto; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; min-width: 0; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.status.live i { background: var(--lime); animation: blink 1s steps(2) infinite; }
.status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes blink { 50% { opacity: .25; } }
.btn { height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  background: var(--raised); border: 1px solid var(--line); transition: background .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.btn:hover { background: var(--raised2); border-color: var(--line2); }
.btn:active { transform: scale(.97); }
.btn.lime { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.btn.lime:hover { background: var(--lime2); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 12.5px; }
.btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); }
/* overflow: clip (e não hidden) impede que o scrollIntoView desloque o painel para o lado. */
.side { position: relative; border-right: 1px solid var(--line); min-height: 0; overflow: clip; background: var(--bg); }
.pane { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; transition: transform .45s var(--ease), opacity .3s var(--ease); background: var(--bg); }
.pane.off-l { transform: translateX(-8%); opacity: 0; pointer-events: none; }
.pane.off-r { transform: translateX(100%); pointer-events: none; }
.phead { padding: 18px 18px 12px; display: flex; flex-direction: column; gap: 12px; border-bottom: 1px solid var(--line); }
.phead h1 { font-size: 26px; line-height: 1.05; }
.phead h1 small { font-family: var(--body); font-size: 13px; letter-spacing: 0; color: var(--muted); font-weight: 400; margin-left: 8px; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { flex: 1; height: 30px; border-radius: 999px; font-size: 12.5px; font-weight: 500; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; transition: background .25s var(--ease), color .25s var(--ease); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg .num { font-size: 11px; opacity: .7; }
.search { height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 12px; width: 100%; }
.search::placeholder, .f input::placeholder { color: var(--faint); }
.chips, .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); font-size: 12px; color: var(--soft); transition: all .2s var(--ease); }
.chip:hover { border-color: var(--line2); }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-weight: 600; }

.list { flex: 1; overflow-y: auto; overflow-x: clip; min-height: 0; }
.row { display: grid; grid-template-columns: 52px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .2s var(--ease); }
.row:hover, .row.hot { background: var(--surface); }
.row.new { animation: rowin .6s var(--ease); }
@keyframes rowin { from { transform: translateX(-14px); background: rgba(200,240,49,.14); } to { transform: none; } }
.th { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-size: 16px; color: rgba(255,255,255,.8); overflow: hidden;
  background: repeating-linear-gradient(135deg, hsl(var(--h, 200) 22% 24%) 0 9px, hsl(var(--h, 200) 22% 20%) 9px 18px); }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row b { font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .where { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta { display: flex; gap: 10px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--soft); flex-wrap: wrap; }
.pres { display: inline-flex; align-items: center; gap: 5px; }
.pres i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.pres.none { color: var(--lime); } .pres.none i { background: var(--lime); }
.pres.social { color: var(--amber); } .pres.social i { background: var(--amber); }
.pres.site { color: var(--muted); }
.iaL { font-size: 12px; color: var(--muted); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.iabox { border: 1px dashed var(--line2); border-radius: 14px; padding: 14px; font-size: 13px; color: var(--soft); }
.cfg { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 8px 12px; align-items: center; }
.cfg label { font-size: 13px; color: var(--soft); }
.cfg label small { display: block; font-size: 11.5px; color: var(--faint); }
.cfg input { height: 38px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); padding: 0 10px; width: 100%; font-family: var(--mono); text-align: right; }
.sc { text-align: right; min-width: 44px; }
.sc b { font-family: var(--mono); font-weight: 500; font-size: 20px; line-height: 1; }
.sc span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.sc.q b { color: var(--lime); } .sc.f b { color: var(--faint); }
.qa { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) translateX(8px); display: flex; gap: 6px; opacity: 0; pointer-events: none; transition: all .25s var(--ease); background: var(--surface); padding: 4px; border-radius: 999px; border: 1px solid var(--line2); }
.row:hover .qa, .row:focus-within .qa { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.qa button { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; }
.qa button:hover { background: var(--raised2); }
.qa button.y:hover { background: var(--lime); color: var(--on-lime); }
.qa svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--lime); color: var(--on-lime); }
.empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.more { padding: 14px 18px; color: var(--muted); font-size: 12.5px; text-align: center; }
.pfoot { border-top: 1px solid var(--line); padding: 10px 18px; font-size: 12px; color: var(--faint); max-height: 40%; overflow-y: auto; }
.pfoot summary { cursor: pointer; color: var(--muted); }
.pfoot li { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0 0; color: var(--soft); }
.pfoot li span:nth-child(2) { color: var(--muted); white-space: nowrap; }
.pfoot li button { color: var(--faint); font-size: 12px; text-decoration: underline; }
.pfoot li button:hover { color: var(--danger); }
.hintk { font-size: 11.5px; color: var(--faint); margin-top: 10px; }

.ficha { overflow-y: auto; }
.fhead { display: flex; align-items: center; gap: 8px; padding: 12px 18px; position: sticky; top: 0; background: var(--bg); z-index: 2; border-bottom: 1px solid var(--line); }
.gal { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 84px 84px; gap: 6px; padding: 18px 18px 0; }
.gal div { border-radius: 14px; overflow: hidden; background: repeating-linear-gradient(135deg, hsl(var(--h, 200) 22% 24%) 0 12px, hsl(var(--h, 200) 22% 20%) 12px 24px); display: grid; place-items: end start; font-size: 11px; color: rgba(255,255,255,.55); }
.gal div span { padding: 8px 10px; }
.gal div:first-child { grid-row: span 2; }
.gal.one { grid-template-columns: 1fr; grid-template-rows: 174px; }
.gal.one div:first-child { grid-row: auto; }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fbody { padding: 18px; display: flex; flex-direction: column; gap: 22px; }
.fbody h2 { font-size: 30px; line-height: 1.02; overflow-wrap: anywhere; }
.fbody .where { color: var(--muted); margin-top: 6px; font-size: 13px; }
.score { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.score .big { font-family: var(--mono); font-size: 52px; line-height: 1; letter-spacing: -0.04em; }
.score .big.q { color: var(--lime); }
.score .big small { display: block; font-family: var(--body); font-size: 12px; letter-spacing: 0; color: var(--muted); margin-top: 6px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bars div { display: grid; grid-template-columns: 96px minmax(0,1fr) 40px; gap: 8px; align-items: center; font-size: 12px; color: var(--soft); }
.bars i { height: 5px; border-radius: 999px; background: var(--raised2); overflow: hidden; display: block; }
.bars i u { display: block; height: 100%; background: var(--ink); border-radius: 999px; width: 0; transition: width .8s var(--ease); }
.bars span:last-child { text-align: right; color: var(--muted); }
.why { font-size: 13px; color: var(--soft); }
.kv { display: grid; grid-template-columns: 96px minmax(0,1fr); gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { overflow-wrap: anywhere; }
.kv a { color: var(--ink); text-decoration-color: var(--lime); text-underline-offset: 3px; }
.sub { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.rev { padding: 12px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.rev .num { color: var(--lime); margin-right: 8px; }
.rev small { display: block; color: var(--faint); margin-top: 4px; }
.facts { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--bg); border-top: 1px solid var(--line); margin-top: auto; }
.facts .btn { flex: 1; height: 44px; }

.mapw { position: relative; min-height: 0; overflow: hidden; background: var(--void); }
#map { position: absolute; inset: 0; background: var(--void); font-family: var(--body); }
.maplibregl-map { font-family: var(--body); }
.maplibregl-ctrl-bottom-right { right: max(6px, env(safe-area-inset-right, 0px)); bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.maplibregl-ctrl-group { background: rgba(11,13,16,.9) !important; border: 1px solid var(--line2); border-radius: 14px !important; overflow: hidden; box-shadow: none !important; }
.maplibregl-ctrl-group button { width: 38px; height: 38px; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--line); }
.maplibregl-ctrl-group button:hover { background: var(--raised2) !important; }
.maplibregl-ctrl-group .maplibregl-ctrl-icon { filter: invert(1) brightness(.92); }
.maplibregl-ctrl-attrib { background: rgba(11,13,16,.75) !important; color: var(--faint); font-size: 10px; }
.maplibregl-ctrl-attrib a { color: var(--muted); }
.maplibregl-ctrl-attrib-button { filter: invert(1); opacity: .6; }
.mkw { width: 0; height: 0; }
.mk { position: absolute; left: 0; top: 0; width: 0; height: 0; padding: 0; z-index: 1; cursor: pointer; }
.mk b { position: absolute; left: 0; top: -30px; width: 30px; height: 30px; border-radius: 50% 50% 50% 3px; transform-origin: 0 100%; transform: rotate(-45deg) scale(var(--s, 1)); display: grid; place-items: center; background: var(--bg); border: 2px solid var(--ink); color: var(--ink); transition: transform .3s var(--ease); box-shadow: 0 6px 14px rgba(0,0,0,.5); }
.mk b i { transform: rotate(45deg); font: 500 11px var(--mono); font-style: normal; }
.mk.q b { background: var(--lime); border-color: var(--bg); color: var(--on-lime); }
.mk.f b { width: 12px; height: 12px; left: -6px; top: -6px; border-radius: 50%; transform-origin: center; transform: scale(var(--s, 1)); background: var(--raised2); border-color: var(--faint); box-shadow: none; }
.mk.f b i { display: none; }
.mk.descartado { opacity: .35; }
.mk:hover b, .mk.hot b { --s: 1.3; }
.mk:focus-visible { outline: none; }
.mk:focus-visible b { outline: 2px solid var(--lime); outline-offset: 3px; }
.mk.drop b { animation: mkdrop .7s var(--ease); }
@keyframes mkdrop { from { translate: 0 -46px; opacity: .3; } to { translate: 0 0; opacity: 1; } }
.mk u { position: absolute; left: 7px; top: -52px; width: 13px; height: 13px; border-radius: 50%; background: var(--lime); border: 2px solid var(--bg); }
.mk.f u { left: 3px; top: -17px; }
.mk span { position: absolute; left: 0; top: -76px; transform: translateX(-50%); white-space: nowrap; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.mk.f span { top: -40px; }
.mk:hover span, .mk.hot span { opacity: 1; }
.sweepw { background: none; border: 0; pointer-events: none !important; }
.sweep { position: absolute; border-radius: 50%; border: 1px dashed rgba(200,240,49,.5); pointer-events: none; }
.sweep.on::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(200,240,49,0) 0 78%, rgba(200,240,49,.28) 100%); animation: spin 2.4s linear infinite; }
.sweep::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--lime); }
@keyframes spin { to { transform: rotate(360deg); } }
.legend { position: absolute; left: 16px; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 14px; font-size: 12px; color: var(--soft); background: rgba(11,13,16,.86); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; z-index: 500; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--faint); }
.legend i.q { background: var(--lime); border-color: var(--lime); } .legend i.m { border-color: var(--ink); }
.scanbox { position: absolute; top: 16px; left: 16px; width: min(350px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line2); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; transform-origin: top left; transition: transform .4s var(--ease), opacity .25s var(--ease); z-index: 600; }
.scanbox.closed { transform: scale(.94) translateY(-8px); opacity: 0; pointer-events: none; }
.scanbox h2 { font-size: 20px; }
.f { display: flex; flex-direction: column; gap: 5px; }
.f label, .f .t { font-size: 12px; color: var(--muted); }
.f small { font-size: 11.5px; color: var(--faint); }
.f input[type=text], .f select, .loginbox input { height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--bg); padding: 0 12px; width: 100%; min-width: 0; }
.row2 { display: flex; gap: 8px; align-items: center; }
.row2 input { flex: 1; }
.row2 .btn.sm { height: 40px; }
.depth { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 6px; }
.depth button { border: 1px solid var(--line); background: var(--bg); border-radius: 12px; padding: 8px 10px; text-align: left; font-size: 12.5px; font-weight: 600; transition: border-color .2s; }
.depth button small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.depth button[aria-pressed="true"] { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--soft); }
.toast { position: absolute; left: 50%; top: 16px; transform: translate(-50%, -20px); background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13px; padding: 10px 16px; border-radius: 999px; opacity: 0; transition: all .45s var(--ease); pointer-events: none; z-index: 700; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

body.login { display: grid; place-items: center; padding: 24px 16px; }
.loginbox { width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.loginbox img { width: 96px; height: auto; margin-left: -8px; }
.loginbox h1 { font-size: 44px; line-height: 1; }
.loginbox > p { color: var(--muted); }
.loginbox form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.loginbox label { font-size: 12px; color: var(--muted); }
.loginbox .btn { height: 44px; margin-top: 6px; }

@media (max-width: 860px) {
  html, body { height: auto; }
  .app { height: auto; }
  .work { display: flex; flex-direction: column; }
  .mapw { order: -1; height: 46svh; min-height: 300px; position: sticky; top: 0; z-index: 1; }
  .side { border-right: 0; overflow: visible; z-index: 2; }
  .pane { position: static; } .pane.off-l, .pane.off-r { display: none; }
  .list { overflow: visible; }
  .qa { display: none; }
  .legend { font-size: 11px; gap: 10px; bottom: auto; top: 12px; left: 12px; }
  .scanbox { top: 8px; left: 8px; width: calc(100% - 16px); max-height: calc(100% - 16px); }
  .status span { display: none; }
  #bout { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---- Pesquisa atual, histórico, sugestões e nichos ---- */
.search { border-radius: 999px; padding: 0 16px; }
.pane.off-l { transform: translateX(-8%) scale(.985); }
.pane.off-r { transform: translateX(100%) scale(1.01); opacity: 0; }
.scope { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 9px 12px 9px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: background .25s var(--ease), border-color .25s var(--ease); }
.scope:hover { background: var(--raised); border-color: var(--line2); }
.scope-k { font-size: 11.5px; color: var(--muted); flex: none; }
.scope-v { font-weight: 600; font-size: 13.5px; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.scope:hover svg { transform: translateX(3px); stroke: var(--lime); }
.phead h1 .num { font-family: var(--display); }
.lote { font-size: 12.5px; color: var(--soft); border-left: 2px solid var(--lime); padding-left: 10px; }
.pfoot { max-height: none; overflow: visible; font-size: 11.5px; }

.row.t-q { box-shadow: inset 3px 0 0 var(--lime); }
.rmain { min-width: 0; }
.th { position: relative; }
.th img { position: absolute; inset: 0; }
.badge.pop { animation: badgepop .4s var(--ease); }
@keyframes badgepop { from { transform: scale(.4); } 60% { transform: scale(1.12); } to { transform: none; } }
.mk.drop b { animation-delay: calc(var(--i, 0) * 22ms); animation-fill-mode: backwards; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.empty .btn { margin-top: 14px; }
.radar { width: 64px; height: 64px; border-radius: 50%; border: 1px dashed rgba(200,240,49,.5); position: relative; margin-bottom: 14px; }
.radar::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(200,240,49,0) 0 72%, rgba(200,240,49,.4) 100%); animation: spin 2s linear infinite; }
.radar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--lime); }

#phist { overflow-y: auto; }
.hbody { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.hbody h2 { font-size: 30px; line-height: 1.02; }
.hsub { color: var(--muted); font-size: 13px; max-width: 46ch; }
.hlist { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.hitem { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; transition: border-color .25s var(--ease); }
.hitem:hover { border-color: var(--line2); }
.hitem.cur { border-color: var(--lime); }
.hopen { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; padding: 13px 14px; }
.hopen b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.hopen span { font-size: 12.5px; color: var(--muted); }
.hmeta { display: inline-flex; align-items: center; gap: 6px; }
.hmeta i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.hitem.live .hmeta i { background: var(--lime); animation: blink 1s steps(2) infinite; }
.hacts { display: flex; gap: 14px; padding: 0 14px 12px; }
.hacts button { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.hacts button:hover { color: var(--ink); }
.hacts button.danger { color: var(--danger); font-weight: 600; }
.hsec { font-size: 12px; color: var(--muted); margin-top: 12px; }
.hnote { font-size: 13px; color: var(--muted); padding: 6px 2px; }

.scanbox { width: min(390px, calc(100% - 32px)); }
.combo { position: relative; }
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--raised); border: 1px solid var(--line2); border-radius: 14px; padding: 6px; max-height: 260px; overflow-y: auto; }
.sug li { padding: 8px 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.sug li b { font-weight: 600; font-size: 13.5px; }
.sug li span { font-size: 12px; color: var(--muted); }
.sug li:hover, .sug li[aria-selected="true"] { background: var(--raised2); }
.sug li[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--lime); }
.nsel { display: flex; flex-wrap: wrap; gap: 6px; min-height: 28px; align-items: center; }
.nnone { font-size: 12.5px; color: var(--faint); }
.chip.on { background: var(--lime); color: var(--on-lime); border-color: var(--lime); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip.on svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ngroups { display: flex; flex-direction: column; gap: 10px; max-height: 176px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg); }
.ngroup > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.ngroup > div { display: flex; flex-wrap: wrap; gap: 6px; }
.est { font-size: 12.5px; color: var(--soft); min-height: 18px; }

@media (max-width: 860px) {
  .row { grid-template-columns: 52px minmax(0,1fr) auto; }
  .qa { display: flex; position: static; opacity: 1; transform: none; pointer-events: auto; grid-column: 2 / -1; justify-self: start; border: 0; background: none; padding: 0; }
  .qa button { border: 1px solid var(--line2); }
  .row:hover .qa, .row:focus-within .qa { transform: none; }
  .hbody { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
