:root {
  --bg: #f7f7f3;
  --surface: #ffffff;
  --surface-2: #edf6f3;
  --ink: #17211f;
  --muted: #66736f;
  --line: #dde5e1;
  --primary: #087b72;
  --primary-dark: #056158;
  --accent: #e4f4e5;
  --petal: #f7e3e8;
  --petal-strong: #d16a82;
  --route: #365f73;
  --surface-subtle: #fbfcfa;
  --border-strong: #a7cac5;
  --focus-ring: rgba(8, 123, 114, 0.22);
  --warning: #fbf4df;
  --danger: #b84a4a;
  --shadow: 0 18px 48px rgba(26, 44, 40, 0.09);
  --shadow-soft: 0 8px 24px rgba(26, 44, 40, 0.06);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(23, 33, 31, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(23, 33, 31, 0.018) 1px, transparent 1px),
    var(--bg);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 247, 243, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}

.petal {
  position: absolute;
  width: 8px;
  height: 14px;
  border: 1.5px solid color-mix(in srgb, var(--primary) 78%, var(--petal-strong));
  border-radius: 999px 999px 999px 2px;
  background: linear-gradient(180deg, #fff8f9, var(--petal));
  transform-origin: center 12px;
}

.petal-n {
  transform: translateY(-7px) rotate(45deg);
}

.petal-e {
  transform: translateX(7px) rotate(135deg);
}

.petal-s {
  transform: translateY(7px) rotate(225deg);
}

.petal-w {
  transform: translateX(-7px) rotate(315deg);
}

.mark-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--petal-strong);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  line-height: 1.1;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.top-nav a {
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  background: rgba(8, 123, 114, 0.08);
  color: var(--primary);
}

.search-band {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100vh - 69px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

body.has-results .search-band {
  display: block;
  min-height: 0;
}

#search-title,
#links-title,
#domestic-title {
  scroll-margin-top: 96px;
}

.search-command {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.has-results .search-command {
  width: min(1480px, calc(100% - 32px));
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 640px;
  margin-bottom: 0;
  font-size: clamp(18px, 1.35vw, 22px);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.has-results .search-panel {
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid rgba(167, 202, 197, 0.7);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.command-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

body.has-results .command-main {
  grid-template-columns: minmax(420px, 1fr) auto;
}

.command-search {
  min-width: 0;
}

.command-capture {
  min-height: 46px;
  justify-self: center;
  display: none;
}

body.has-results .command-capture {
  display: inline-flex;
  justify-self: stretch;
}

body:not(.has-results) .command-capture {
  display: none;
}

.command-support {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

body.has-results .command-support {
  justify-content: flex-start;
}

.command-controls {
  display: none;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  min-width: 0;
}

body.has-results .command-controls {
  display: grid;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.search-panel label,
.country-header {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.search-row input {
  min-width: 0;
  height: 54px;
  padding: 0 22px;
  border: 1px solid #cbd9d5;
  border-radius: 999px;
  background: #ffffff;
  outline: none;
  box-shadow: 0 10px 28px rgba(26, 44, 40, 0.08);
}

body.has-results .search-row input {
  height: 46px;
  padding: 0 16px;
  border-radius: 8px;
  background: #fbfdfc;
  box-shadow: none;
}

.search-row input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.quick-searches,
.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quick-searches span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-searches[hidden] {
  display: none;
}

.recent-chip,
.preset-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.preset-button {
  border-radius: 8px;
  color: var(--muted);
}

.preset-button.is-active {
  border-color: #a7cac5;
  background: #e7f5f2;
  color: var(--primary-dark);
}

.recent-chip:hover,
.preset-button:hover {
  border-color: #a7cac5;
  background: #f4fbf9;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible,
.country-choice:focus-within {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

.primary-action,
.secondary-action,
.quiet-action,
.text-button,
.link-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.primary-action {
  min-height: 46px;
  padding: 0 24px;
  background: linear-gradient(180deg, #0b8d83 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(8, 123, 114, 0.16);
}

body:not(.has-results) .primary-action {
  min-height: 54px;
  border-radius: 999px;
  padding: 0 28px;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.primary-action:hover {
  background: var(--primary-dark);
}

.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 52px;
  padding: 0 16px;
  border: 1px solid #a7cac5;
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfa 100%);
  color: var(--primary-dark);
  white-space: nowrap;
}

.quiet-action,
.text-button {
  background: transparent;
  color: var(--muted);
}

.quiet-action {
  min-height: 40px;
  padding: 0 12px;
}

.quiet-action:hover,
.text-button:hover {
  color: var(--primary);
}

.text-button {
  padding: 0;
}

.country-header {
  display: flex;
  min-height: 30px;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
}

.country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
  min-width: 0;
}

.country-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  min-width: 0;
}

.country-choice > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.country-choice > span > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-flag {
  flex: 0 0 auto;
}

.flag-icon {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 16px;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 31, 0.16);
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.flag-jp::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bc002d;
  transform: translate(-50%, -50%);
}

.flag-us {
  background: repeating-linear-gradient(180deg, #b22234 0 1.25px, #fff 1.25px 2.5px);
}

.flag-us::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 10px;
  height: 8px;
  background: #3c3b6e;
}

.flag-uk {
  background:
    linear-gradient(35deg, transparent 42%, #fff 42% 48%, #c8102e 48% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(-35deg, transparent 42%, #fff 42% 48%, #c8102e 48% 54%, #fff 54% 60%, transparent 60%),
    linear-gradient(90deg, transparent 38%, #fff 38% 45%, #c8102e 45% 55%, #fff 55% 62%, transparent 62%),
    linear-gradient(180deg, transparent 34%, #fff 34% 43%, #c8102e 43% 57%, #fff 57% 66%, transparent 66%),
    #012169;
}

.flag-de {
  background: linear-gradient(180deg, #000 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%);
}

.flag-fr {
  background: linear-gradient(90deg, #0055a4 0 33.33%, #fff 33.33% 66.66%, #ef4135 66.66%);
}

.flag-it {
  background: linear-gradient(90deg, #009246 0 33.33%, #fff 33.33% 66.66%, #ce2b37 66.66%);
}

.flag-es {
  background: linear-gradient(180deg, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75%);
}

.flag-ca {
  background: linear-gradient(90deg, #d52b1e 0 24%, #fff 24% 76%, #d52b1e 76%);
}

.flag-ca::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 9px;
  width: 4px;
  height: 5px;
  background: #d52b1e;
  clip-path: polygon(50% 0, 62% 31%, 100% 22%, 73% 48%, 86% 100%, 50% 70%, 14% 100%, 27% 48%, 0 22%, 38% 31%);
}

.flag-au {
  background: #012169;
}

.flag-au::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: 9px;
  height: 6px;
  background:
    linear-gradient(35deg, transparent 40%, #fff 40% 50%, #c8102e 50% 58%, transparent 58%),
    linear-gradient(-35deg, transparent 40%, #fff 40% 50%, #c8102e 50% 58%, transparent 58%),
    linear-gradient(90deg, transparent 39%, #fff 39% 46%, #c8102e 46% 56%, #fff 56% 63%, transparent 63%),
    linear-gradient(180deg, transparent 35%, #fff 35% 43%, #c8102e 43% 57%, #fff 57% 65%, transparent 65%),
    #012169;
}

.flag-au::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
}

.country-choice:hover {
  border-color: #b5d6d0;
  background: #ffffff;
}

.country-choice input {
  accent-color: var(--primary);
}

.content-shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.summary-strip,
.result-spotlight,
.extension-banner,
.compare-section,
.domestic-section,
.notice {
  margin-top: 12px;
}

.marketplace-links {
  margin-top: 0;
}

.result-spotlight {
  display: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.spotlight-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 229, 225, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  overflow: hidden;
}

.spotlight-main {
  border-color: #aacfc7;
  background: linear-gradient(180deg, #ffffff 0%, #f3fbf7 100%);
}

.spotlight-label {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  align-self: center;
}

.spotlight-card strong {
  font-size: 18px;
  font-weight: 850;
  line-height: 1.1;
}

.spotlight-card small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 4px;
}

.summary-strip h2 {
  margin-bottom: 0;
  font-size: 18px;
}

.summary-actions,
.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.insight-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.insight-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 13px;
}

.insight-row strong {
  margin-right: 4px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.section-heading p {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 0;
}

.marketplace-links {
  min-width: 0;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  overflow: visible;
  border: 0;
  background: transparent;
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(221, 229, 225, 0.95);
  background: rgba(255, 255, 255, 0.9);
}

.link-button:hover {
  border-color: #9dc9c3;
  background: #ffffff;
  color: var(--primary-dark);
}

.link-button span {
  display: block;
}

.link-button small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.market-card {
  display: grid;
  gap: 14px;
  min-height: 100%;
  padding: 16px;
  border: 1px solid rgba(221, 229, 225, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.market-card:hover {
  border-color: #b8d8d2;
  background: #fff;
}

.market-card-toprank {
  box-shadow: inset 3px 0 0 rgba(8, 123, 114, 0.42);
}

.market-card-issue {
  background: #fffdf8;
}

.rakuten-card {
  position: relative;
  top: auto;
  z-index: 3;
  align-self: start;
  border-color: rgba(229, 201, 205, 0.95);
  background:
    linear-gradient(180deg, rgba(255, 249, 249, 0.92), rgba(255, 255, 255, 0.88));
}

.rakuten-card:hover {
  border-color: #e6a9af;
}

.rakuten-mark {
  border-color: #efc4c8;
  color: #bf1f32;
  font-size: 15px;
  font-weight: 900;
}

.rakuten-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0f1;
  color: #9f1c2d;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.rakuten-card .candidate-primary {
  border-color: #e8b9be;
  box-shadow: inset 2px 0 0 #bf1f32, inset 0 999px 0 rgba(191, 31, 50, 0.025);
}

.rakuten-card .candidate-summary strong,
.rakuten-card .candidate-price strong {
  color: #8f1827;
}

.rakuten-setup .locked-extension-link {
  background: #bf1f32;
  box-shadow: 0 12px 28px rgba(191, 31, 50, 0.22);
}

.rakuten-setup .locked-extension-link:hover {
  background: #991726;
}

.locked-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.locked-config-button {
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: #8f1827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.rakuten-config {
  border-top: 1px solid rgba(229, 201, 205, 0.78);
  padding-top: 10px;
}

.rakuten-config summary {
  color: #8f1827;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.rakuten-config-form {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.rakuten-config-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.rakuten-config-form input {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(229, 201, 205, 0.96);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font-size: 12px;
  padding: 0 9px;
}

.rakuten-config-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.market-card-locked .candidate-summary {
  filter: blur(4px);
  opacity: 0.68;
  pointer-events: none;
  user-select: none;
}

.market-card-top,
.market-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.market-card-foot {
  min-height: 24px;
  padding-top: 2px;
}

.market-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.market-flag {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.market-flag .flag-icon {
  width: 23px;
  height: 16px;
}

.market-card-top small,
.market-card-foot span,
.candidate small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.market-card-top h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.rank-badge {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0f3;
  color: #6d4751;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.capture-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f6f3;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-link {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.mini-link:hover {
  color: var(--petal-strong);
}

.candidate-list {
  display: grid;
  gap: 10px;
}

.candidate-list-locked {
  position: relative;
  min-height: 206px;
  padding: 2px 0;
}

.candidate {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px 12px;
  min-height: 92px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

.candidate-thumb {
  width: 56px;
  height: 56px;
  align-self: start;
  border: 1px solid #dfe6e3;
  border-radius: 4px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f5f2ed 100%);
  object-fit: contain;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.candidate-copy {
  min-width: 0;
}

.candidate-primary {
  border-color: #bddbd6;
  box-shadow: inset 2px 0 0 var(--primary), inset 0 999px 0 rgba(8, 123, 114, 0.025);
  padding-left: 10px;
}

.candidate-placeholder {
  position: relative;
  opacity: 0.72;
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.candidate-placeholder .candidate-thumb {
  filter: saturate(0.82);
  object-fit: cover;
}

.candidate-placeholder .candidate-title {
  color: color-mix(in srgb, var(--ink) 72%, var(--muted));
}

.candidate-placeholder .candidate-title::after {
  content: "";
  position: absolute;
  inset: auto 0 1px 0;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(237, 246, 243, 0.2), rgba(8, 123, 114, 0.12), rgba(247, 227, 232, 0.34));
  pointer-events: none;
}

.candidate-placeholder .candidate-price strong {
  color: var(--primary-dark);
}

.locked-overlay {
  position: absolute;
  inset: 14px 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 10px;
  text-align: center;
  pointer-events: none;
}

.locked-extension-link,
.locked-amazon-link {
  pointer-events: auto;
}

.locked-extension-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 4px;
  background: #0b2a78;
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 42, 120, 0.24);
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.locked-extension-link:hover {
  background: #082162;
}

.locked-amazon-link {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.candidate-title {
  position: relative;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.4;
  text-decoration: none;
}

.candidate-title:hover {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.price-debug {
  color: var(--primary-dark) !important;
  font-weight: 800;
}

.tag-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 2px 5px 5px;
  background: var(--petal);
  box-shadow: inset 0 0 0 1px rgba(8, 123, 114, 0.25);
}

.candidate-price {
  min-width: 84px;
  text-align: right;
  white-space: nowrap;
}

.candidate-price strong,
.market-card-foot strong {
  font-variant-numeric: tabular-nums;
}

.candidate-price strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.candidate-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 4px 0 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.candidate-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.candidate-summary strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.candidate-summary small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.candidate-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.import-button,
.asin-button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #a9cdc7;
  border-radius: 4px;
  background: #fff;
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.memo-rail {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 8px;
  min-width: 0;
}

.memo-rail-heading,
.comparison-preview {
  padding: 10px;
  border: 1px solid rgba(221, 229, 225, 0.92);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
}

.memo-rail-heading h2 {
  margin-bottom: 4px;
}

.memo-rail-heading p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.comparison-preview {
  display: grid;
  gap: 6px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.comparison-preview.is-updated {
  border-color: #8fc3ba;
  background: #f2fbf8;
}

.preview-empty {
  display: grid;
  gap: 4px;
}

.preview-empty small,
.preview-item small {
  color: var(--muted);
  font-size: 12px;
}

.preview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-stats span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.preview-list {
  display: grid;
  gap: 0;
}

.preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}

.preview-item:first-child {
  border-top: 0;
}

.preview-item strong,
.preview-item small {
  display: block;
}

.preview-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-item > span {
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.preview-item.is-best {
  color: var(--primary-dark);
}

.asin-button {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
}

.import-button:hover,
.asin-button:hover {
  border-color: #8fc3ba;
  background: #eef8f6;
}

.candidate-empty {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface-subtle);
}

.candidate-empty strong,
.candidate-empty small {
  display: block;
}

.candidate-empty small {
  color: var(--muted);
}

.more-candidates {
  display: grid;
  gap: 8px;
}

.more-candidates summary {
  color: var(--primary-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.more-candidates summary:hover {
  color: var(--petal-strong);
}

.extension-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-radius: 8px;
  background: transparent;
}

.command-status {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto 10px;
  padding: 8px 0 10px;
}

.extension-status[hidden] {
  display: none;
}

.extension-status.is-success {
  border-color: #b5d6c0;
  background: transparent;
}

.extension-status.is-warning {
  border-color: #ead4aa;
  background: transparent;
}

.extension-status-copy {
  display: grid;
  gap: 3px;
}

.extension-status-copy strong {
  font-size: 15px;
}

.extension-status-copy small {
  color: var(--muted);
}

.extension-status-markets {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill.is-ok {
  border-color: #b5d6c0;
  color: var(--primary-dark);
}

.status-pill small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  opacity: 0.72;
}

.extension-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-right: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-radius: 0;
  background: transparent;
}

.extension-banner h2,
.extension-banner p {
  margin-bottom: 0;
}

.extension-banner p {
  color: var(--muted);
  font-size: 13px;
}

.extension-banner h2 {
  font-size: 16px;
}

.extension-banner.is-hidden {
  display: none;
}

.compare-section {
  border: 1px solid rgba(221, 229, 225, 0.92);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.78);
}

.memo-rail .compare-section {
  margin-top: 0;
}

.compare-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.compare-section > summary::-webkit-details-marker {
  display: none;
}

.compare-section > summary::after {
  content: "開く";
  min-width: 42px;
  padding: 4px 8px;
  border: 1px solid #a7cac5;
  border-radius: 999px;
  background: #ffffff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.compare-section[open] > summary::after {
  content: "閉じる";
}

.compare-section summary strong {
  display: block;
  font-size: 15px;
}

.compare-section summary small {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.compare-body {
  padding: 0 14px 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.comparison-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 14px;
}

.memo-rail .table-wrap {
  max-width: 100%;
}

.comparison-table th,
.comparison-table td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.comparison-table thead th {
  background: #f1f6f4;
  color: #41514e;
  font-size: 12px;
  font-weight: 800;
}

.comparison-table tbody th {
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-table tbody tr.best-row {
  background: var(--accent);
}

.market-cell strong,
.total-cell strong {
  display: block;
}

.market-cell small,
.total-cell small,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.best-label {
  display: inline-flex;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffffff;
  color: #287041;
  font-size: 11px;
  font-weight: 800;
}

.best-label[hidden] {
  display: none;
}

.source-label {
  display: inline-flex;
  margin-top: 4px;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #eef1f0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.source-label.is-candidate {
  background: #e4f4ff;
  color: #25627d;
}

.source-label.is-extension {
  background: #e7f5f2;
  color: var(--primary-dark);
}

.input-stack {
  display: grid;
  gap: 4px;
}

.price-input,
.memo-input {
  width: 100%;
  min-width: 104px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cdd9d6;
  border-radius: 8px;
  background: #fff;
  outline: none;
}

.memo-input {
  min-width: 180px;
}

.price-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.price-input:focus,
.memo-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 123, 114, 0.1);
}

.number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mobile-list {
  display: none;
}

.mobile-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mobile-card.best-row {
  background: var(--accent);
}

.mobile-card + .mobile-card {
  margin-top: 10px;
}

.mobile-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mobile-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.mobile-card-grid label {
  color: var(--muted);
  font-size: 12px;
}

.mobile-total {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  text-align: right;
}

.domestic-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.domestic-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

.domestic-links a:hover {
  border-color: #a7cac5;
  background: #ffffff;
}

.notice {
  padding: 12px;
  border: 1px solid #eadcb8;
  border-radius: 4px;
  background: linear-gradient(180deg, #fff9e9 0%, var(--warning) 100%);
}

.notice h2 {
  font-size: 18px;
}

.notice p {
  margin-bottom: 0;
  color: #62583c;
}

.legal-page {
  width: min(1060px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.legal-document {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(251, 252, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.legal-document h1 {
  max-width: none;
  font-size: 38px;
}

.legal-document .lead {
  max-width: 660px;
  color: var(--muted);
  font-size: 16px;
}

.legal-visual {
  width: 220px;
  max-width: 100%;
  height: auto;
}

.legal-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}

.legal-summary > div {
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(167, 202, 197, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.legal-summary strong,
.legal-summary small {
  display: block;
}

.legal-summary strong {
  margin-bottom: 6px;
  color: var(--primary-dark);
}

.legal-summary small {
  color: var(--muted);
}

.legal-section {
  padding-top: 18px;
}

.legal-section + .legal-section {
  margin-top: 6px;
  border-top: 1px solid rgba(221, 229, 225, 0.82);
}

.legal-section h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.legal-document p {
  color: var(--muted);
}

.legal-updated {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.app-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.52);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.app-footer p {
  margin: 0;
  padding: 24px 16px;
}

.app-footer a {
  margin-left: 12px;
  color: var(--primary-dark);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 920px) {
  .rakuten-card {
    position: static;
  }

  .legal-hero,
  .legal-summary {
    grid-template-columns: 1fr;
  }

  .legal-visual {
    width: 190px;
  }

  body.has-results .command-main,
  .command-main,
  .command-controls {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }

  .country-grid,
  .link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip,
  .section-heading,
  .extension-banner,
  .extension-status,
  .result-spotlight {
    align-items: stretch;
    flex-direction: column;
  }

  .extension-status-markets {
    justify-content: flex-start;
  }

  .result-spotlight {
    grid-template-columns: 1fr;
  }

  .insight-row {
    margin-left: 0;
  }
}

@media (max-width: 1280px) {
  .content-shell {
    width: min(100% - 24px, 1180px);
  }

  .link-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1040px) {
  .board-layout {
    grid-template-columns: 1fr;
  }

  .memo-rail {
    position: static;
    order: -1;
  }

  .memo-rail .compare-section {
    display: block;
  }
}

@media (max-width: 680px) {
  .legal-page {
    width: min(100% - 20px, 1180px);
    padding: 24px 0 44px;
  }

  .legal-document {
    padding: 20px;
  }

  .legal-document h1 {
    font-size: 30px;
  }

  .header-inner {
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .top-nav {
    gap: 4px;
    font-size: 12px;
  }

  .top-nav a {
    padding: 5px 7px;
  }

  .search-command,
  .content-shell,
  .header-inner {
    width: min(100% - 20px, 1180px);
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .command-capture {
    width: 100%;
  }

  .country-grid,
  .link-grid {
    grid-template-columns: 1fr;
  }

  .board-layout {
    gap: 14px;
  }

  .result-spotlight {
    gap: 8px;
  }

  .memo-rail-heading,
  .comparison-preview {
    padding: 12px;
  }

  .country-grid {
    max-height: 232px;
    overflow-y: auto;
    padding-right: 4px;
  }

  .table-wrap {
    display: none;
  }

  .mobile-list {
    display: block;
  }

  .mobile-card-grid {
    grid-template-columns: 1fr;
  }

  .candidate {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .candidate-thumb {
    width: 52px;
    height: 52px;
  }

  .candidate-price {
    grid-column: 2 / -1;
    text-align: left;
  }

  h1 {
    font-size: 30px;
  }
}
