:root {
  --ink: #1d212b;
  --muted: #646a73;
  --line: #dcdfe4;
  --paper: #f8f8f6;
  --white: #fff;
  --green-950: #001d4a;
  --green-900: #0033a0;
  --green-800: #1d4987;
  --green-700: #1456f0;
  --mint: #f0f4ff;
  --accent: #0033a0;
  --accent-light: #94b4ff;
  --danger: #e22e28;
  --shadow: 0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.04);
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  font-family: "Noto Sans SC", "Space Grotesk", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(20,86,240,.28); outline-offset: 2px; }
[hidden] { display: none !important; }

.brand-lockup { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; }
.brand-lockup > span:last-child { display: grid; gap: 2px; }
.brand-lockup strong { font-size: 16px; letter-spacing: .03em; }
.brand-lockup small { font-size: 8px; letter-spacing: .2em; color: var(--muted); }
.brand-lockup--light { color: #fff; }
.brand-lockup--light small { color: rgba(255,255,255,.55); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #dcdfe4; border-radius: 8px; color: var(--green-800); font-family: Georgia, "STSong", serif; font-weight: 700; background: #f0f4ff; }
.eyebrow { margin: 0 0 10px; color: var(--green-700); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.eyebrow--light { color: var(--accent-light); }
.eyebrow--accent { color: var(--accent-light); }

.login-shell { height: 100vh; height: 100dvh; min-height: 620px; overflow: hidden; display: grid; grid-template-columns: minmax(420px, 1.15fr) minmax(440px, .85fr); background: var(--paper); }
.login-brand { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(36px, 5vw, 72px); color: #fff; background: linear-gradient(135deg, #001d4a 0%, #0033a0 50%, #004b93 100%); }
.login-brand::before, .hero__pattern { display: none; }
.login-brand::after { display: none; }
.login-brand__glow { display: none; }
.login-brand > * { position: relative; z-index: 1; }
.login-brand__content { margin: auto 0; max-width: 680px; padding: 28px 0; }
.login-brand__content h1 { margin: 0; max-width: 680px; font-family: Georgia, "Noto Serif SC", "STSong", serif; font-size: clamp(38px, 4vw, 58px); font-weight: 500; line-height: 1.16; letter-spacing: -.04em; }
.login-brand__content > p:last-child { max-width: 570px; margin: 20px 0 0; color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.7; }
.login-signature { margin-left: 12px; color: var(--accent-light); font-weight: 700; white-space: nowrap; }
.login-brand__stats { display: flex; gap: 52px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); }
.login-brand__stats div { display: grid; gap: 5px; }
.login-brand__stats strong { color: var(--accent-light); font: 500 23px Georgia, "STSong", serif; }
.login-brand__stats span { color: rgba(255,255,255,.48); font-size: 12px; }

.login-panel { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; padding: 28px clamp(28px, 6vw, 84px); }
.login-card { width: min(100%, 480px); margin: auto; }
.mobile-brand { display: none; }
.login-card h2 { margin: 0; font: 600 36px/1.2 Georgia, "Noto Serif SC", "STSong", serif; letter-spacing: -.03em; }
.login-card__intro { margin: 15px 0 28px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.login-card__intro strong { color: var(--green-800); font-weight: 800; }
.access-checks { display: grid; gap: 1px; overflow: hidden; margin-bottom: 28px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--line); }
.access-check { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; background: rgba(255,255,255,.78); }
.access-check__body { min-width: 0; }
.access-check__ip { display: flex; align-items: baseline; gap: 4px; }
.access-check__ip strong { overflow: hidden; color: var(--ink); font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.access-check__side { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 7px 10px; }
.access-check__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--green-700); background: var(--mint); font-size: 10px; font-weight: 900; }
.access-check small { color: var(--muted); font-size: 10px; }
.ip-meta, .ip-connection, .ip-risk { margin: 4px 0 0; font-size: 10px; line-height: 1.45; }
.ip-meta { overflow-wrap: anywhere; color: #51565d; }
.ip-connection { color: #8f959e; }
.ip-risk { color: #c25705; font-weight: 700; }
.ip-type { border-radius: 999px; padding: 4px 8px; color: var(--green-800); background: #e0e9ff; font-size: 9px; font-weight: 800; white-space: nowrap; }
.ip-lookup { grid-column: 1 / -1; color: var(--green-800); font-size: 9px; font-weight: 700; text-decoration: none; }
.ip-lookup:hover { text-decoration: underline; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; }
.status-dot--ok { background: #31a545; box-shadow: 0 0 0 4px rgba(49,165,69,.12); }
.login-form { display: grid; gap: 10px; }
.login-form label { font-size: 12px; font-weight: 700; }
.password-control { display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: .2s; }
.password-control:focus-within { border-color: var(--green-800); box-shadow: 0 0 0 3px rgba(29,73,135,.10); }
.password-control input { min-width: 0; flex: 1; border: 0; outline: 0; padding: 15px 16px; color: var(--ink); background: transparent; }
.password-control button { border: 0; padding: 0 15px; color: var(--green-700); background: transparent; font-size: 12px; font-weight: 700; }
.form-error { margin: 2px 0; color: var(--danger); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 10px; font-weight: 700; transition: transform .18s, background .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button--primary { min-height: 49px; padding: 0 18px; color: #fff; background: var(--green-800); box-shadow: 0 4px 10px rgba(29,73,135,.16); }
.button--primary:hover { background: var(--green-900); }
.button--wide { width: 100%; margin-top: 7px; }
.privacy-note { margin: 20px 0 0; padding-left: 14px; border-left: 2px solid var(--accent); color: var(--muted); font-size: 10px; line-height: 1.7; }
.login-footer { margin: 18px auto 0; color: #8b928f; font-size: 10px; text-align: center; }

.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.app-shell > main { flex: 1 0 auto; }
.topbar { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(18px); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; width: min(1120px, calc(100% - 40px)); height: 64px; margin: auto; }
.topbar__actions { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 11px; }
.online-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; color: #258832; background: #e4fae1; font-weight: 700; }
.online-pill i { width: 6px; height: 6px; border-radius: 50%; background: #31a545; }
.session-ip b { color: var(--ink); font-weight: 650; }
.button--ghost { border: 1px solid var(--line); color: var(--ink); background: #fff; }
.button--small { min-height: 34px; padding: 0 13px; font-size: 11px; }

.hero { position: relative; overflow: hidden; min-height: 205px; color: #fff; background: linear-gradient(135deg, #001d4a 0%, #0033a0 50%, #004b93 100%); }
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 64px; width: min(1120px, calc(100% - 40px)); min-height: 205px; margin: auto; padding: 34px 0 46px; }
.hero__copy h1 { margin: 0; font: 500 clamp(36px, 4vw, 48px)/1.08 Georgia, "Noto Serif SC", "STSong", serif; letter-spacing: -.035em; }
.hero__copy h1 em { color: var(--accent-light); font-style: normal; }
.hero__copy > p:last-child { max-width: 560px; margin: 12px 0 0; color: rgba(255,255,255,.74); font-size: 12px; line-height: 1.6; }
.hero__metrics { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(255,255,255,.06); }
.metric { display: grid; gap: 4px; padding: 20px 18px; border-right: 1px solid rgba(255,255,255,.13); }
.metric:last-child { border: 0; }
.metric span, .metric small { color: rgba(255,255,255,.48); font-size: 10px; }
.metric strong { color: #fff; font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 24px; font-weight: 750; line-height: 1.2; letter-spacing: -.035em; }

.search-wrap { position: relative; z-index: 3; width: min(1120px, calc(100% - 40px)); margin: -20px auto 0; }
.search-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); }
.directory-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); background: #fff; }
.directory-mode { display: flex; align-items: center; justify-content: center; min-width: 0; border: 0; border-radius: 8px; padding: 13px 16px; color: #646a73; background: #f8f8f6; text-align: center; transition: color .18s, background .18s, box-shadow .18s; }
.directory-mode:hover { color: var(--green-800); background: #fff; }
.directory-mode.is-active { color: var(--green-800); background: #f0f4ff; box-shadow: inset 0 0 0 1px #94b4ff; }
.directory-mode__icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--green-800); background: #e7f1fc; font: 700 15px Georgia, "STSong", serif; }
.directory-mode.is-active .directory-mode__icon { color: #fff; background: var(--accent); }
.directory-mode > span:nth-child(2) { display: grid; gap: 3px; }
.directory-mode strong { font-size: 13px; }
.directory-mode small { color: inherit; opacity: .66; font-size: 9px; }
.directory-mode em { justify-self: end; color: inherit; opacity: .62; font-size: 10px; font-style: normal; }
.search-panel__header, .results-heading { display: flex; align-items: center; justify-content: space-between; }
.search-panel__header { padding: 17px 22px; border-bottom: 1px solid var(--line); }
.search-panel__header > div, .results-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.search-panel__header b, .results-heading b { display: block; font-size: 13px; }
.search-panel__header small, .results-heading small { display: block; margin-top: 2px; color: #929995; font-size: 8px; letter-spacing: .14em; }
.section-number { color: var(--accent); font: 700 12px/1 system-ui, sans-serif; letter-spacing: .08em; }
.search-form { padding: 20px 22px 23px; }
.search-order-hint { color: #8f959e; font-size: 10px; }
.condition-stack { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.condition-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 49px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.condition-row:last-child { border-bottom: 0; }
.condition-label { color: #646a73; font-size: 10px; font-weight: 750; white-space: nowrap; }
.scope-tabs, .choice-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.scope-tab, .trade-mode-tab { border: 0; border-radius: 6px; padding: 7px 12px; color: #646a73; background: transparent; font-size: 11px; font-weight: 700; }
.scope-tab:hover, .trade-mode-tab:hover { color: var(--green-800); background: #f0f4ff; }
.scope-tab.is-active, .trade-mode-tab.is-active { color: var(--green-800); background: #e0e9ff; box-shadow: inset 0 0 0 1px #94b4ff; }
.condition-fields { display: grid; grid-template-columns: repeat(3, minmax(130px, 1fr)); gap: 8px; }
.condition-fields label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; color: #8f959e; font-size: 9px; white-space: nowrap; }
.condition-fields select, .results-tools select { min-width: 0; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; outline: none; color: var(--ink); background: #f8f8f6; font-size: 10px; }
.condition-fields select:focus, .results-tools select:focus { border-color: var(--green-800); }
.clear-filters { border: 0; padding: 8px 4px; color: var(--green-700); background: transparent; font-size: 10px; font-weight: 700; white-space: nowrap; }
.search-control { display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; margin-top: 16px; border: 1px solid var(--line); border-radius: 6px; background: rgba(237,235,232,.5); box-shadow: none; }
.search-icon { position: relative; width: 19px; height: 19px; margin-left: 18px; border: 2px solid var(--green-700); border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; transform: rotate(45deg); background: var(--green-700); }
.search-control input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 16px; color: var(--ink); background: transparent; font-size: 14px; }
.button--search { align-self: stretch; border-radius: 0; padding: 0 22px; color: #fff; background: var(--green-800); }
.button--search:hover { background: var(--green-900); }
.quick-suggestions { color: var(--muted); font-size: 10px; }
.quick-suggestions > div { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-suggestions button { border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; color: var(--green-800); background: #f8f8f6; font-size: 10px; }
.quick-suggestions button:hover { border-color: #94b4ff; background: #f0f4ff; }

.results-section { width: min(1120px, calc(100% - 40px)); margin: 38px auto 64px; }
.results-heading { margin-bottom: 18px; }
.results-tools { display: flex; align-items: center; gap: 10px; }
.results-tools strong { color: var(--green-800); font-size: 16px; font-weight: 750; }
.export-button { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; padding: 0 13px; color: var(--ink); background: #fff; font-size: 11px; font-weight: 800; }
.export-button:hover { border-color: var(--green-800); color: #fff; background: var(--green-800); }
.results-status { min-height: 18px; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.results-list { display: grid; gap: 12px; }
.company-card { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 22px; padding: 21px 22px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; box-shadow: 0 2px 4px -2px rgba(0,0,0,.04); transition: border-color .18s, box-shadow .18s; }
.company-card:hover { border-color: #94b4ff; box-shadow: var(--shadow); }
.company-card__top { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
.company-card h3 { margin: 0; font-size: 17px; letter-spacing: -.015em; }
.search-highlight { border-radius: 3px; padding: 0 2px; color: #0033a0; background: #e0e9ff; font-weight: 800; }
.role-badge, .tag { display: inline-flex; align-items: center; min-height: 22px; border-radius: 6px; padding: 0 7px; font-size: 9px; font-weight: 800; }
.role-badge { color: var(--green-800); background: #e0e9ff; }
.role-badge--buyer { color: #0033a0; background: #f0f4ff; }
.company-card__location { color: var(--muted); font-size: 11px; }
.company-card__products { display: -webkit-box; max-width: 850px; margin: 0 0 14px; overflow: hidden; color: #465264; font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.company-card__products b { color: var(--ink); }
.match-reason { display: inline-flex; margin: -2px 0 10px; border-radius: 999px; padding: 4px 9px; color: #1d4987; background: #f0f4ff; font-size: 9px; font-weight: 750; }
.company-card__meta, .company-card__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.company-card__meta { margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.company-card__meta span { padding-right: 9px; border-right: 1px solid var(--line); }
.company-card__meta span:last-child { border: 0; }
.tag { color: #51565d; background: #f2f3f5; font-weight: 650; }
.tag--fair { color: #1d4987; background: #e9ecf2; }
.company-card__action { display: flex; align-items: center; }
.detail-button { min-width: 122px; min-height: 39px; border: 1px solid var(--line); border-radius: 6px; color: var(--green-800); background: #fff; font-size: 11px; font-weight: 800; }
.detail-button:hover { color: #fff; background: var(--green-800); }
.empty-state { padding: 64px 24px; border: 1px dashed #cbd5d0; border-radius: var(--radius-md); color: var(--muted); background: rgba(255,255,255,.55); text-align: center; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font: 500 22px Georgia, "STSong", serif; }
.skeleton { height: 154px; border-radius: var(--radius-md); background: linear-gradient(90deg, #ecefeb 25%, #f7f8f6 37%, #ecefeb 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; }
.load-more-sentinel { min-height: 52px; padding: 20px 0 4px; color: var(--muted); font-size: 11px; text-align: center; }

.app-footer { display: flex; justify-content: center; margin-top: auto; padding: 20px; border-top: 1px solid var(--line); color: #7b8495; background: #fff; font-size: 10px; }

.company-dialog { width: min(820px, calc(100vw - 28px)); max-height: min(88vh, 900px); border: 1px solid var(--line); border-radius: 10px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 24px 64px rgba(0,29,74,.22); }
.company-dialog::backdrop { background: rgba(8,25,52,.56); backdrop-filter: blur(3px); }
.dialog-shell { min-height: 240px; }
.dialog-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 28px 20px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.dialog-header > div { display: grid; gap: 9px; }
.dialog-header .role-badge { justify-self: start; }
.dialog-header h2 { margin: 0; font: 600 24px/1.3 Georgia, "Noto Serif SC", "STSong", serif; }
.dialog-close { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); background: #fff; font-size: 23px; font-weight: 300; }
.dialog-content { padding: 24px 28px 32px; }
.detail-loading { display: grid; place-items: center; min-height: 220px; color: var(--muted); font-size: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 24px; margin: 0 0 25px; }
.detail-grid > div { padding: 10px 0; border-bottom: 1px solid #eef1ef; }
.detail-grid dt { margin-bottom: 5px; color: var(--muted); font-size: 9px; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.detail-section { margin-top: 26px; }
.detail-section__title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; font-size: 12px; }
.detail-section__title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: var(--accent); }
.contact-list { display: grid; gap: 8px; }
.contact-row { display: grid; grid-template-columns: 1fr 1.2fr 1.5fr auto; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #f8f8f6; font-size: 11px; }
.contact-row strong { font-size: 12px; }
.contact-row a { color: var(--green-700); text-decoration: none; overflow-wrap: anywhere; }
.contact-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.copy-button { border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; color: var(--green-700); background: #fff; font-size: 9px; font-weight: 700; }
.history-list { display: grid; gap: 7px; }
.history-item { display: grid; grid-template-columns: 54px 84px 1fr; gap: 10px; padding: 11px 13px; border-radius: 8px; background: #f0f4ff; font-size: 10px; }
.detail-link { color: var(--green-700); text-decoration: none; border-bottom: 1px solid rgba(37,99,166,.25); }
.sensitive-banner { margin: 0 0 20px; padding: 11px 13px; border: 1px solid #94b4ff; border-radius: 8px; color: #1d4987; background: #f0f4ff; font-size: 10px; line-height: 1.55; }
.back-to-top { position: fixed; z-index: 45; right: 22px; bottom: 22px; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #fff; background: var(--green-800); box-shadow: 0 10px 26px rgba(15,35,70,.22); font-size: 21px; line-height: 1; }
.back-to-top:hover { background: var(--green-900); transform: translateY(-1px); }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(380px, calc(100vw - 44px)); border-radius: 10px; padding: 12px 16px; color: #fff; background: var(--green-900); box-shadow: 0 12px 32px rgba(15,35,70,.22); font-size: 11px; }

@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-shell { min-height: 620px; overflow-y: auto; }
  .login-panel { min-height: 100vh; min-height: 100dvh; overflow: visible; padding: 32px 24px; }
  .mobile-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 54px; }
  .hero__inner { grid-template-columns: 1fr; gap: 24px; padding: 34px 0 50px; }
  .hero__metrics { max-width: 620px; }
  .directory-mode { display: flex; }
  .directory-mode em { display: none; }
  .condition-fields { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

@media (max-width: 640px) {
  .topbar__inner, .hero__inner, .search-wrap, .results-section { width: min(100% - 20px, 1120px); }
  .topbar__inner { height: 64px; }
  .brand-lockup small, .online-pill, .session-ip { display: none; }
  .hero { min-height: 240px; }
  .hero__inner { min-height: 240px; gap: 18px; padding: 26px 0 36px; }
  .hero__copy h1 { font-size: 34px; }
  .hero__copy > p:last-child { margin-top: 10px; font-size: 12px; line-height: 1.55; }
  .hero__metrics { grid-template-columns: repeat(3, 1fr); width: 100%; }
  .metric { display: grid; grid-template-columns: 1fr; align-items: start; gap: 3px; padding: 11px 9px; border-right: 1px solid rgba(255,255,255,.13); border-bottom: 0; }
  .metric strong { font-size: 18px; }
  .metric small { display: none; }
  .search-wrap { margin-top: -14px; }
  .search-panel { border-radius: 14px; }
  .directory-switch { grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px; }
  .directory-mode { padding: 11px 9px; }
  .directory-mode__icon { width: 30px; height: 30px; border-radius: 8px; font-size: 13px; }
  .directory-mode strong { font-size: 12px; }
  .directory-mode small { display: none; }
  .search-panel__header { padding: 14px; }
  .search-form { padding: 16px 14px 18px; }
  .search-order-hint { display: none; }
  .condition-row { grid-template-columns: 1fr; gap: 7px; padding: 10px; }
  .condition-label { padding-left: 2px; }
  .scope-tabs, .choice-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .scope-tabs::-webkit-scrollbar, .choice-tabs::-webkit-scrollbar { display: none; }
  .scope-tab, .trade-mode-tab { flex: 0 0 auto; }
  .condition-fields { grid-template-columns: 1fr; }
  .condition-fields label { grid-template-columns: 70px minmax(0, 1fr); }
  .clear-filters { justify-self: start; padding-left: 2px; }
  .search-control { grid-template-columns: 1fr; }
  .search-control input { padding: 14px 12px; font-size: 13px; }
  .button--search { grid-column: 1/-1; min-height: 45px; border-top: 1px solid #d5e2f0; }
  .quick-suggestions > div { flex-wrap: nowrap; min-width: 0; overflow-x: auto; padding-bottom: 3px; scrollbar-width: none; }
  .quick-suggestions > div::-webkit-scrollbar { display: none; }
  .quick-suggestions button { flex: 0 0 auto; }
  .results-section { margin-top: 30px; margin-bottom: 48px; }
  .results-heading { align-items: flex-start; gap: 12px; }
  .results-tools { display: grid; grid-template-columns: auto auto; justify-items: end; gap: 6px; }
  .results-tools strong { grid-column: 1 / -1; }
  .results-tools select { max-width: 128px; }
  .export-button { min-height: 35px; padding: 0 11px; }
  .company-card { grid-template-columns: 1fr; gap: 16px; padding: 17px 16px; }
  .company-card h3 { font-size: 15px; }
  .company-card__action { justify-content: stretch; }
  .detail-button { width: 100%; }
  .app-footer { flex-direction: column; padding-top: 18px; padding-bottom: 18px; }
  .company-dialog { width: calc(100vw - 16px); max-height: 92dvh; border-radius: 14px; }
  .dialog-header { padding: 17px 16px 14px; }
  .dialog-header h2 { font-size: 20px; }
  .dialog-content { padding: 18px 16px 24px; }
  .detail-grid { grid-template-columns: 1fr; }
  .contact-row { grid-template-columns: 1fr; gap: 6px; }
  .history-item { grid-template-columns: 48px 1fr; }
  .history-item span:last-child { grid-column: 1/-1; }
  .back-to-top { right: 14px; bottom: 14px; width: 42px; height: 42px; }
}

@media (max-width: 420px) {
  .brand-lockup { gap: 9px; }
  .brand-lockup strong { font-size: 14px; }
  .brand-mark { width: 34px; height: 34px; }
  .directory-mode { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .directory-mode__icon { display: none; }
  .hero__copy h1 { font-size: 33px; }
  .metric { padding-left: 7px; padding-right: 7px; }
  .metric strong { font-size: 17px; }
  .search-panel__header small, .results-heading small { display: none; }
}
