:root {
  --ink: #17191a;
  --muted: #70777b;
  --line: #d8dddf;
  --page: #f4f6f7;
  --surface: #ffffff;
  --soft: #edf7fc;
  --brand: #0086cc;
  --brand-dark: #006da6;
  --focus: #0086cc;
  --shadow: 0 18px 50px rgba(19, 33, 36, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Arial, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.55;
}
button, input { font: inherit; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  min-height: 86px;
  padding: 0 clamp(20px, 3vw, 48px);
  background: var(--surface);
  border-bottom: 1px solid #e7eaeb;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  color: #090a0a;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -2.5px;
  line-height: .8;
  text-decoration: none;
}
.logo small { margin-top: 7px; color: #777; font-size: 8px; font-weight: 400; letter-spacing: .1px; }
.desktop-nav { display: flex; gap: 28px; margin-left: 44px; }
.desktop-nav a, .header-actions > a { font-size: 13px; font-weight: 700; letter-spacing: .7px; text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.cart-button { position: relative; display: grid; width: 30px; height: 30px; place-items: center; font-size: 22px; transform: rotate(180deg); }
.cart-button b { position: absolute; top: -4px; right: -5px; display: grid; width: 18px; height: 18px; place-items: center; color: #fff; background: var(--focus); border-radius: 50%; font-size: 10px; transform: rotate(180deg); }
.icon-button { display: none; padding: 8px; background: transparent; border: 0; }
.menu-button span { display: block; width: 18px; height: 2px; margin: 3px 0; background: var(--ink); }

main { width: min(920px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 56px; }
.breadcrumb { display: flex; gap: 9px; align-items: center; margin-bottom: 26px; color: var(--muted); font-size: 12px; }
.breadcrumb a { text-decoration: none; }
.search-hero { text-align: center; }
.eyebrow { margin: 0 0 6px; color: var(--brand); font-size: 12px; font-weight: 700; letter-spacing: 2px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(27px, 4vw, 40px); font-weight: 600; letter-spacing: .04em; }
.lead { margin-bottom: 24px; color: var(--muted); }
#search-form { width: min(660px, 100%); margin: 0 auto; text-align: left; }
#search-form label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.search-field {
  display: flex;
  align-items: center;
  min-height: 58px;
  padding: 5px 9px 5px 18px;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 13px;
  transition: border-color .2s, box-shadow .2s;
}
.search-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px rgba(0, 134, 204, .14); }
.search-icon, .empty-search-icon { position: relative; display: block; width: 18px; height: 18px; flex: 0 0 18px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after, .empty-search-icon::after { content: ""; position: absolute; right: -5px; bottom: -3px; width: 7px; height: 2px; background: currentColor; transform: rotate(45deg); transform-origin: left center; }
.search-field input { width: 100%; min-width: 0; padding: 10px 14px; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-field input::placeholder { color: #858b8e; }
#clear-search { display: none; width: 36px; height: 36px; color: var(--muted); background: #edf0f1; border: 0; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; }
#clear-search.visible { display: block; }
.model-help { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 15px; margin-top: 13px; color: var(--muted); font-size: 12px; }
.model-help > span { display: inline-flex; align-items: center; gap: 6px; }
.info-icon { display: inline-grid; width: 16px; height: 16px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; font-weight: 700; }
.model-help button, .text-button { padding: 0; color: var(--brand); background: transparent; border: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.device-panel { margin-top: 38px; padding: clamp(22px, 4vw, 34px); background: var(--surface); border-radius: 20px; box-shadow: var(--shadow); }
.section-heading, .results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.section-heading h2, .results-heading h2 { margin-bottom: 0; font-size: 19px; font-weight: 600; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.text-button { white-space: nowrap; }
.popular-makers { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 17px; }
.popular-makers button, .all-makers-list button {
  padding: 9px 15px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .18s, color .18s, background .18s, transform .18s;
}
.popular-makers button:hover, .all-makers-list button:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.popular-makers button[aria-pressed="true"], .all-makers-list button[aria-pressed="true"] { color: #fff; background: var(--brand); border-color: var(--brand); }
.all-makers { margin-top: 20px; padding: 18px; background: var(--page); border-radius: 14px; }
.all-makers-label { margin-bottom: 11px; color: var(--muted); font-size: 12px; }
.all-makers-list { display: flex; flex-wrap: wrap; gap: 8px; }
.all-makers-list button { background: var(--surface); font-size: 12px; }
.results-heading { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.device-panel.search-active .section-heading,
.device-panel.search-active .popular-makers,
.device-panel.search-active .all-makers { display: none; }
.device-panel.search-active .results-heading { margin-top: 0; padding-top: 0; border-top: 0; }
#result-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.results-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 15px; }
.result-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  color: var(--ink);
  background: var(--page);
  border: 1px solid transparent;
  border-radius: 11px;
  text-decoration: none;
  transition: border-color .18s, transform .18s, background .18s;
}
.result-card:hover { background: var(--soft); border-color: var(--brand); transform: translateY(-1px); }
.phone-icon { position: relative; width: 34px; height: 34px; flex: 0 0 34px; background: var(--soft); border-radius: 9px; }
.phone-icon::before { content: ""; position: absolute; inset: 7px 10px; border: 1.5px solid var(--brand); border-radius: 2px; }
.phone-icon::after { content: ""; position: absolute; left: 15px; bottom: 8px; width: 4px; height: 1px; background: var(--brand); }
.result-copy { min-width: 0; flex: 1; }
.result-copy strong { display: block; overflow: hidden; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.result-copy span { display: block; overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); font-size: 22px; font-weight: 300; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 40px 10px 8px; color: var(--muted); text-align: center; }
.empty-state[hidden] { display: none; }
.empty-state .empty-search-icon { margin-bottom: 14px; }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 4px 0 16px; font-size: 12px; }
.empty-state button, .show-more { padding: 10px 18px; color: #fff; background: var(--brand); border: 0; border-radius: 9px; cursor: pointer; }
.show-more { display: block; margin: 20px auto 0; background: var(--ink); }
.show-more[hidden] { display: none; }
.selection-note { margin: 15px 4px 0; color: var(--muted); font-size: 12px; }

dialog { width: min(520px, calc(100% - 32px)); padding: 0; color: var(--ink); background: var(--surface); border: 0; border-radius: 18px; box-shadow: 0 24px 80px rgba(0, 0, 0, .22); }
dialog::backdrop { background: rgba(12, 18, 19, .46); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 26px 15px; }
.dialog-header h2 { margin: 0; font-size: 22px; }
#close-help { width: 36px; height: 36px; color: var(--muted); background: var(--page); border: 0; border-radius: 50%; font-size: 24px; cursor: pointer; }
#help-content { padding: 0 26px 28px; }
.help-step { display: grid; grid-template-columns: 28px 1fr; gap: 11px; margin-top: 14px; }
.help-step b { display: grid; width: 26px; height: 26px; place-items: center; color: #fff; background: var(--brand); border-radius: 50%; font-size: 12px; }
.help-step p { margin: 2px 0 0; }
.help-step a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.alternative-help { margin-top: 22px; padding: 16px 18px; background: var(--soft); border-radius: 12px; }
.alternative-help strong { color: var(--brand); }
.alternative-help p { margin: 5px 0 0; }
.alternative-help a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.alternative-help .chrome-search-link { display: inline-block; margin-top: 12px; padding: 10px 16px; color: #fff; background: var(--brand); border-radius: 9px; text-decoration: none; }
.alternative-help .chrome-search-link:hover { background: var(--brand-dark); }
.alternative-help small { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

:focus-visible { outline: 3px solid rgba(0, 134, 204, .45); outline-offset: 3px; }

@media (max-width: 760px) {
  .site-header { min-height: 58px; justify-content: space-between; padding: 0 18px; }
  .logo { font-size: 29px; }
  .logo small { margin-top: 6px; }
  .icon-button { display: block; }
  .desktop-nav, .header-actions > a { display: none; }
  .header-actions { margin-left: 0; }
  main { width: min(100% - 32px, 620px); padding-top: 27px; }
  .breadcrumb { display: none; }
  .lead { max-width: 320px; margin-right: auto; margin-left: auto; font-size: 14px; }
  .search-field { min-height: 56px; }
  .device-panel { margin-top: 28px; border-radius: 16px; }
  .device-panel.search-active { margin-top: 16px; }
  .popular-makers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .popular-makers button { width: 100%; }
  .results-list { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  main { width: calc(100% - 24px); }
  .device-panel { padding: 20px 16px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { max-width: 180px; }
  .model-help { max-width: 300px; margin-right: auto; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
