:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14221f;
  background: #fffaf0;
  font-synthesis: none;
  --blue: #087f7a;
  --blue-dark: #075f5c;
  --ink: #14221f;
  --muted: #5b6d64;
  --rule: #d8eadf;
  --soft-blue: #eefaf3;
  --summer-sand: #fff6df;
  --summer-sky: #e9f7f8;
  --summer-leaf: #dff5df;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body, #root { min-height: 100%; margin: 0; }
body { min-width: 320px; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #fffaf0 0, #ffffff 340px); }
.topbar { height: 154px; flex: 0 0 auto; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 4.5vw, 72px); background: linear-gradient(90deg, #fff6df 0, #effbf3 100%); }
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-block strong { font-size: 30px; letter-spacing: -1.1px; }
.brand-block span { color: var(--muted); font-size: 16px; margin-left: 12px; line-height: 1.25; }
.brand-logo { width: 200px; height: 144px; object-fit: contain; display: block; flex: none; }
.version { color: var(--muted); font-size: 15px; }
.view-nav { height: 42px; min-height: 0; flex: 0 0 42px; padding: 0 clamp(24px, 4.5vw, 72px); border-bottom: 1px solid var(--rule); display: flex; align-items: center; gap: 8px; overflow-x: auto; }
.nav-tab { flex: none; border: 0; border-radius: 999px; background: transparent; color: var(--muted); padding: 6px 13px; font-weight: 750; cursor: pointer; }
.nav-tab:hover { color: var(--blue); background: var(--soft-blue); }
.nav-tab.active { color: white; background: var(--blue); }

main { flex: 1 0 auto; width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: clamp(28px, 3.5vw, 48px) 0 60px; }
.view { display: block; }
.search-workspace h1 { font-size: clamp(40px, 4.6vw, 66px); line-height: .99; letter-spacing: -3.2px; margin: 0; max-width: 1030px; }
.search-workspace > p { color: var(--muted); font-size: clamp(18px, 1.8vw, 25px); margin: 22px 0 37px; }
.lead-text { max-width: 980px; line-height: 1.42; }
form { max-width: 1030px; }
label { display: block; font-weight: 700; font-size: 18px; margin-bottom: 11px; }
label span { color: var(--muted); font-size: 14px; font-weight: 650; }
.search-line { display: grid; grid-template-columns: 1fr auto; gap: 28px; }
.detail-line { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(180px, .7fr); gap: 18px; }
.detail-line input { height: 58px; font-size: 19px; border-color: var(--rule); }
.input-wrap { position: relative; }
input { width: 100%; height: 68px; padding: 0 62px 0 24px; border: 2px solid var(--blue); border-radius: 8px; color: var(--ink); font-size: 24px; outline: none; box-shadow: 0 0 0 0 rgba(8,127,122,.15); transition: box-shadow .18s; background: #fffefa; }
input:focus { box-shadow: 0 0 0 4px rgba(8,127,122,.16); }
.clear { position: absolute; inset: 0 11px 0 auto; width: 44px; border: 0; background: transparent; color: #717986; cursor: pointer; display: grid; place-items: center; }
.primary { height: 68px; min-width: 174px; border: 0; border-radius: 7px; padding: 0 27px; background: var(--blue); color: white; font-weight: 700; font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: background .18s, transform .18s; }
.primary:hover { background: var(--blue-dark); }
.primary:active { transform: translateY(1px); }
.primary:focus-visible, .secondary:focus-visible, .nav-tab:focus-visible, a:focus-visible, .clear:focus-visible, .text-action:focus-visible { outline: 3px solid rgba(8,127,122,.28); outline-offset: 3px; }
.primary:disabled { opacity: .72; cursor: wait; }
.secondary { height: 52px; border: 1px solid var(--rule); border-radius: 7px; padding: 0 20px; background: #fff; color: var(--ink); font-weight: 700; cursor: pointer; }
.secondary:hover { border-color: var(--blue); color: var(--blue); }
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: #b42318; font-weight: 600; margin: 12px 0 0; }
.crawl-warning { color: #8a4b08; background: #fff8e8; border-left: 3px solid #e6a23c; padding: 12px 14px; margin: 16px 0 0; max-width: 1030px; }
.active-area { color: var(--muted); margin: 14px 0 0; font-size: 15px; }
.notice { margin-top: 28px; min-height: 72px; padding: 18px 24px; background: var(--summer-sky); color: #172033; display: flex; align-items: center; gap: 18px; border-radius: 7px; }
.notice svg { color: var(--blue); flex: none; }
.notice svg, .empty svg, .result-row a svg, .clear svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.result-row a svg { width: 18px; height: 18px; }
.results { margin-top: 36px; }
.results h2 { font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -1px; margin: 0 0 20px; }
.result-table { border-bottom: 1px solid var(--rule); }
.result-head, .result-row { display: grid; grid-template-columns: minmax(220px, .9fr) minmax(260px, 1.4fr); column-gap: 28px; align-items: center; }
.result-head { min-height: 42px; padding: 0 14px; color: #4d5766; text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .02em; border-bottom: 1px solid #8e96a3; }
.result-row { min-height: 68px; padding: 15px 14px; border-bottom: 1px solid var(--rule); font-size: 15px; transition: background .16s; }
.result-row:last-child { border-bottom: 0; }
.result-row:hover { background: #f7fcf7; }
.result-row strong { font-size: 18px; }
.result-status { display: grid; gap: 6px; align-content: center; }
.match-badge { width: fit-content; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 850; }
.match-badge.full { color: #05603a; background: #d1fadf; }
.match-badge.partial { color: #8a4b08; background: #fff4d6; }
.result-label { line-height: 1.35; }
.missing-label { color: var(--muted); font-size: 13px; }
.result-row a { color: var(--blue); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
.result-row a:hover { text-decoration: underline; }
.store-result-link { color: var(--ink); font-weight: 850; }
.store-result-link:hover { color: var(--blue); }
.store-result-link svg { flex: none; }
.map-panel { margin-top: 42px; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #fff; }
.map-heading-row { min-height: 92px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--rule); }
.map-heading-row h3 { margin: 3px 0 0; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.7px; }
.eyebrow { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.map-count { flex: none; padding: 8px 12px; border-radius: 999px; background: var(--summer-leaf); color: var(--ink); font-size: 14px; font-weight: 700; }
#store-map { width: 100%; height: 430px; background: #eaf5ef; z-index: 0; }
.map-fallback { margin: 0; padding: 24px; color: var(--muted); }
.map-popup { display: grid; gap: 6px; font-family: Inter, ui-sans-serif, system-ui, sans-serif; color: var(--ink); }
.map-popup-location { display: grid; gap: 6px; }
.map-popup-location + .map-popup-location { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.map-popup strong { font-size: 16px; }
.map-popup span { color: var(--muted); line-height: 1.35; }
.map-popup .map-popup-brand { color: var(--ink); font-weight: 600; }
.map-popup a { color: var(--blue); font-weight: 700; text-decoration: none; }
.store-cluster-icon { border-radius: 50%; background: rgba(8, 127, 122, .2); display: grid; place-items: center; }
.store-cluster-icon span { width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 14px; font-weight: 800; box-shadow: 0 2px 8px rgba(16, 24, 39, .28); }
.empty { margin: 70px auto 0; width: fit-content; max-width: 680px; color: var(--muted); display: flex; align-items: center; gap: 18px; }
.empty svg { color: var(--blue); flex: none; }
.empty div { display: grid; gap: 4px; }
.empty strong { color: var(--ink); font-size: 18px; }
.empty span { line-height: 1.45; }
.spinner { width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }

.section-heading { max-width: 900px; margin-bottom: 30px; }
.section-heading h1 { font-size: clamp(38px, 4.2vw, 58px); line-height: 1; letter-spacing: -2.4px; margin: 6px 0 14px; }
.section-heading p { color: var(--muted); font-size: clamp(17px, 1.6vw, 22px); line-height: 1.45; margin: 0; }
.section-heading code { padding: 2px 7px; border-radius: 6px; background: var(--soft-blue); color: var(--blue-dark); }
.toolbar { max-width: 760px; margin: 0 0 26px; }
.toolbar input, .settings-card input { height: 58px; font-size: 19px; border-color: var(--rule); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.data-card { border: 1px solid var(--rule); border-radius: 12px; padding: 20px; background: #fff; display: flex; flex-direction: column; gap: 10px; min-height: 190px; }
.data-card h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.card-meta { margin: 0; color: var(--ink); font-weight: 800; }
.card-detail { margin: 0; color: var(--muted); line-height: 1.45; }
.store-title-link { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.store-title-link svg { width: 18px; height: 18px; color: var(--blue); }
.store-title-link:hover { color: var(--blue); text-decoration: underline; }
.store-contact a { color: var(--blue); text-decoration: none; font-weight: 600; }
.store-contact a:hover { text-decoration: underline; }
.contact-separator { color: var(--muted); }
.source-note { display: block; margin-top: 6px; color: #6b5a1e; font-size: 13px; line-height: 1.35; }
.text-action { margin-top: auto; border: 0; background: transparent; color: var(--blue); padding: 0; font-weight: 800; text-decoration: none; cursor: pointer; width: fit-content; display: inline-flex; align-items: center; gap: 7px; }
.text-action:hover { text-decoration: underline; }
.text-action svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.list-empty { grid-column: 1 / -1; margin: 0; padding: 28px; border: 1px dashed var(--rule); border-radius: 12px; color: var(--muted); background: #fffdf6; }
.settings-card { border: 1px solid var(--rule); border-radius: 14px; padding: 24px; background: #fff; }
.field-help { margin: 10px 0 20px; color: var(--muted); line-height: 1.45; }
.settings-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings-actions .primary { height: 52px; }
.settings-status { min-height: 22px; margin: 16px 0 0; color: var(--ink); font-weight: 750; }

.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.content-card { border: 1px solid var(--rule); border-radius: 14px; padding: 24px; background: #fff; box-shadow: 0 1px 0 rgba(20,34,31,.03); }
.content-card h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.45px; }
.content-card p { margin: 0; color: var(--muted); line-height: 1.62; }
.content-card p + h2 { margin-top: 26px; }
.content-card a { color: var(--blue); font-weight: 800; text-decoration: none; }
.content-card a:hover { text-decoration: underline; }
.prose-card { max-width: 920px; }

footer { min-height: 92px; border-top: 1px solid var(--rule); padding: 18px clamp(24px, 4.5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 22px; color: var(--muted); font-size: 14px; flex-wrap: wrap; }
.footer-stats { display: flex; align-items: center; gap: 12px; }
footer i { width: 4px; height: 4px; background: #788190; border-radius: 50%; }
.footer-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.footer-link { border: 0; background: transparent; color: var(--muted); padding: 0; font: inherit; font-weight: 750; cursor: pointer; }
.footer-link:hover, .footer-link.active { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .result-head { display: none; }
  .result-row { grid-template-columns: 1fr; gap: 8px; align-items: start; padding: 18px 4px; }
  .result-row > *::before { display: block; margin-bottom: 4px; color: #687284; font-size: 11px; font-weight: 700; text-transform: uppercase; }
  .result-row > :nth-child(2)::before { content: "Osoite"; }
}

@media (max-width: 680px) {
  .topbar { height: 96px; padding: 0 18px; }
  .view-nav { height: 42px; min-height: 0; flex-basis: 42px; padding: 0 18px; }
  .brand-block { gap: 10px; }
  .brand-block strong { font-size: 23px; }
  .brand-block span, .version { display: none; }
  .brand-logo { width: 120px; height: 86px; }
  main { width: calc(100% - 36px); padding: 28px 0 44px; }
  .search-workspace h1 { font-size: 41px; letter-spacing: -2.1px; }
  .search-workspace > p { font-size: 18px; line-height: 1.45; margin: 18px 0 29px; }
  .search-line { grid-template-columns: 1fr; gap: 13px; }
  .detail-line { grid-template-columns: 1fr; }
  input, .primary { height: 61px; }
  .primary { width: 100%; }
  .notice { align-items: flex-start; padding: 17px; font-size: 14px; line-height: 1.45; }
  .section-heading h1 { font-size: 39px; letter-spacing: -1.8px; }
  .card-grid { grid-template-columns: 1fr; }
  .results { margin-top: 34px; }
  .result-row { grid-template-columns: 1fr; }
  .result-row strong { margin-bottom: 3px; }
  .map-panel { margin-top: 30px; }
  .map-heading-row { min-height: 82px; padding: 17px; align-items: flex-end; }
  #store-map { height: 340px; }
  .empty { margin-top: 42px; align-items: flex-start; }
  footer { min-height: 86px; padding: 18px; font-size: 12px; gap: 12px; align-items: flex-start; }
  .footer-nav { gap: 10px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
