@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  color-scheme: light;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", Roboto, sans-serif;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #eef2f9;
  --text: #2c3650;
  --text-strong: #0b1020;
  --text-muted: #54607a;
  --text-faint: #8893a8;
  --border: #e7ecf3;
  --border-strong: #d2dae6;
  --primary: #2f55ec;
  --primary-hover: #2143cf;
  --primary-text: #ffffff;
  --accent: #2f55ec;
  --accent-soft: #e7edff;
  --accent-text: #243fbf;
  --ok: #18a558;
  --shadow: 0 10px 30px -16px rgba(13, 20, 38, 0.14);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #080b14;
  --surface: #111726;
  --surface-alt: #1a2233;
  --text: #c2cbdd;
  --text-strong: #f2f5fc;
  --text-muted: #97a3bb;
  --text-faint: #69748a;
  --border: #2f3a51;
  --border-strong: #3a465f;
  --primary: #5e7dff;
  --primary-hover: #859aff;
  --primary-text: #0a0e1a;
  --accent: #5e7dff;
  --accent-soft: #1a2649;
  --accent-text: #bccbff;
  --ok: #45d483;
  --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -80px;
  z-index: 100;
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
}
.skip-link:focus { top: 1rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: 1180px;
  min-height: 62px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: var(--text-strong);
  font-weight: 750;
  white-space: nowrap;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.brand span { overflow: hidden; text-overflow: ellipsis; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-left: 0.5rem;
  font-size: 0.9rem;
}
.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--primary); }

.nav-spacer { flex: 1; }
.nav-controls { display: inline-flex; align-items: center; gap: 0.45rem; }

.lang-sel,
.icon-btn {
  min-height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  font: inherit;
}
.lang-sel { padding: 0 0.55rem; max-width: 148px; }
.icon-btn {
  width: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline; }

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}
.nav-cta {
  min-height: 36px;
  padding: 0 0.85rem;
  background: var(--primary);
  color: var(--primary-text);
}
.nav-cta:hover { background: var(--primary-hover); color: var(--primary-text); text-decoration: none; }

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.2rem 1.25rem 0;
}

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.78fr);
  gap: 2rem;
  align-items: start;
}
.breadcrumb {
  display: inline-flex;
  color: var(--text-faint);
  font-size: 0.88rem;
  margin-bottom: 1.2rem;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent-text);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
h1 {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  max-width: 820px;
}
.lead {
  margin-top: 1rem;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 1.06rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.45rem;
}
.btn {
  min-height: 42px;
  padding: 0 1rem;
}
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); color: var(--primary-text); text-decoration: none; }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text-strong); }
.btn-secondary:hover { border-color: var(--primary); text-decoration: none; }

.product-panel,
.section-card,
.related-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.product-panel {
  padding: 1.25rem;
}
.panel-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-strong);
  font-weight: 800;
}
.panel-brand img { width: 42px; height: 42px; border-radius: 10px; }
.quick-facts {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.quick-facts li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.93rem;
}
.quick-facts .mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
}
.store-row {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.1rem;
}
.store-row a {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.75rem;
  color: var(--text-strong);
  font-size: 0.9rem;
}
.store-row a:hover { border-color: var(--primary); text-decoration: none; }

.section-stack {
  display: grid;
  gap: 1.1rem;
  margin-top: 2.4rem;
}
.section-card {
  padding: 1.4rem;
}
.section-card h2 {
  color: var(--text-strong);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.7rem);
  line-height: 1.2;
}
.section-card p,
.section-card li {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
.check-list,
.step-list {
  list-style: none;
  display: grid;
  gap: 0.8rem;
  margin-top: 1rem;
}
.check-list li,
.step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.65rem;
}
.num,
.check {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 900;
}
.faq-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.95rem 1rem;
  background: var(--surface-alt);
}
.faq-list summary {
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 750;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list p { margin-top: 0.55rem; }

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.related-card {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
}
.related-card strong { color: var(--text-strong); line-height: 1.3; }
.related-card span { color: var(--text-muted); font-size: 0.88rem; }
.related-card:hover { border-color: var(--primary); text-decoration: none; }

.usecase-guide-section {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.usecase-guide-links {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}
.usecase-guide-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
  color: var(--text-strong);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}
.usecase-guide-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
.usecase-guide-link.current {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  color: var(--primary);
}

.final-cta {
  margin-top: 2.4rem;
  padding: 2rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 68%, #0f172a));
  color: #ffffff;
}
.final-cta h2 { font-family: var(--font-display); font-size: clamp(1.45rem, 3vw, 2rem); line-height: 1.2; }
.final-cta p { color: rgba(255,255,255,0.86); margin-top: 0.55rem; max-width: 720px; }
.final-cta .btn { margin-top: 1rem; background: #ffffff; color: #1d4ed8; }

footer {
  max-width: 1180px;
  margin: 3rem auto 0;
  padding: 2rem 1.25rem;
  color: var(--text-faint);
  font-size: 0.86rem;
}
.footer-line {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .case-hero,
  .two-col,
  .related-grid { grid-template-columns: 1fr; }
  .usecase-guide-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .topbar-inner { padding: 0 0.85rem; gap: 0.55rem; }
  .brand span { max-width: 126px; }
  .lang-sel { max-width: 106px; }
  .nav-cta { display: none; }
  main { padding: 2.4rem 0.9rem 0; }
  .section-card,
  .product-panel,
  .final-cta { padding: 1.1rem; }
  .usecase-guide-links { grid-template-columns: 1fr; }
}


/* ── Browser download buttons (added) ─────────────────── */
.store-cta-label {
  flex: 1 1 100%;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.1rem;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.66rem 1rem;
  border-radius: 11px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.store-btn::before {
  content: "";
  width: 20px; height: 20px; flex: 0 0 20px;
  background-position: center; background-repeat: no-repeat; background-size: 20px 20px;
}
.store-btn::after {
  content: "↗";
  margin-left: 0.15rem;
  color: var(--text-faint);
  font-weight: 600;
  transition: transform 0.15s ease, color 0.15s ease;
}
.store-btn:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border-strong));
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
  transform: translateY(-1px);
  text-decoration: none;
}
.store-btn:hover::after { color: var(--primary); transform: translate(2px, -2px); }
.store-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.store-btn[href*="chromewebstore.google.com"]::before { background-image: url("../assets/browser-logos/chrome.svg"); }
.store-btn[href*="microsoftedge.microsoft.com"]::before { background-image: url("../assets/browser-logos/edge.svg"); }
.store-btn[href*="addons.mozilla.org"]::before { background-image: url("../assets/browser-logos/firefox.svg"); }

.final-dl { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.1rem; }
.final-cta .store-btn { background: #ffffff; border-color: transparent; color: #1d4ed8; box-shadow: 0 12px 26px -14px rgba(0,0,0,0.45); }
.final-cta .store-btn::after { color: #1d4ed8; }
.final-cta .store-btn:hover { background: #eef2ff; color: #1d4ed8; transform: translateY(-1px); }

@media (max-width: 560px) {
  .store-btn { width: 100%; }
  .store-btn::after { margin-left: auto; }
}
