:root {
  --ink: #142238;
  --ink-soft: #526070;
  --ink-faint: #788391;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --surface-soft: #f9f8f3;
  --line: #dddcd4;
  --line-strong: #c9c8bf;
  --accent: #f45b35;
  --accent-dark: #d94320;
  --accent-soft: #fff0e9;
  --success: #187052;
  --success-soft: #eaf6f0;
  --warning: #976114;
  --warning-soft: #fff6df;
  --error: #a33d32;
  --error-soft: #fff0ed;
  --yahoo: #6f36b7;
  --mercari: #e63e50;
  --shadow-sm: 0 1px 2px rgba(20, 34, 56, 0.05);
  --shadow-md: 0 18px 50px rgba(20, 34, 56, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-width: 1240px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(rgba(20, 34, 56, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 34, 56, 0.028) 1px, transparent 1px),
    var(--paper);
  background-size: 64px 64px;
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button,
select,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 48px), 1360px);
  min-height: 76px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(20, 34, 56, 0.13);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(3, 4px);
  align-items: end;
  gap: 3px;
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 7px;
  background: var(--ink);
}

.brand-mark i {
  display: block;
  border-radius: 3px;
  background: var(--surface);
}

.brand-mark i:nth-child(1) {
  height: 6px;
}

.brand-mark i:nth-child(2) {
  height: 11px;
  background: #ffbf9f;
}

.brand-mark i:nth-child(3) {
  height: 16px;
  background: var(--accent);
}

.brand-name {
  font-size: 0.92rem;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.brand-name strong {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-actions a {
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}

.header-actions a:hover {
  color: var(--ink);
}

.access-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--ink-soft);
  font-size: 0.71rem;
  font-weight: 760;
  white-space: nowrap;
}

.access-status.is-active > span {
  color: var(--accent-dark);
}

.access-status button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 0.67rem;
  font-weight: 680;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
}

.access-status button:hover:not(:disabled) {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.access-status button:disabled {
  cursor: wait;
}

.access-dialog {
  width: min(calc(100% - 32px), 390px);
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.access-dialog::backdrop {
  background: rgba(20, 34, 56, 0.36);
  backdrop-filter: blur(3px);
}

.upgrade-dialog {
  width: min(calc(100% - 32px), 430px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #efc4b5;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.upgrade-dialog::backdrop {
  background: rgba(20, 34, 56, 0.42);
  backdrop-filter: blur(4px);
}

.upgrade-dialog-content {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 30px;
  border-radius: inherit;
  background:
    linear-gradient(145deg, rgba(255, 240, 233, 0.82), transparent 55%),
    var(--surface);
}

.upgrade-dialog-eyebrow,
.upgrade-dialog-availability {
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.02em;
}

.upgrade-dialog-content h2 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 5vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.upgrade-dialog-copy {
  margin: 0 0 4px;
  color: var(--ink-soft);
  font-size: 0.81rem;
  line-height: 1.58;
}

.upgrade-plan-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 8px 0 4px;
}

.upgrade-plan-controls label {
  display: grid;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 760;
}

.upgrade-plan-controls select {
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.upgrade-benefits {
  display: grid;
  gap: 7px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.81rem;
  line-height: 1.45;
}

.upgrade-benefits li {
  position: relative;
  padding-left: 20px;
}

.upgrade-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.upgrade-price {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.upgrade-dialog-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 4px;
}

.upgrade-dialog-actions .access-login-submit {
  margin: 0;
  grid-column: 1 / -1;
}

.upgrade-access-button {
  min-width: 0;
}

.upgrade-dialog-later {
  min-height: 43px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
}

.upgrade-dialog-later:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.access-login-form {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 28px;
}

.access-dialog-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--accent);
  color: white;
  font-size: 0.9rem;
}

.access-login-form h2 {
  margin: 5px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.access-login-form > p:not(.access-login-error) {
  margin: -3px 0 8px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.5;
}

.access-login-form label {
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 760;
}

.access-login-form input {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: 0;
  background: white;
  color: var(--ink);
  font: inherit;
}

.access-login-form input:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 34, 56, 0.08);
}

.access-login-error {
  margin: 0;
  color: var(--error);
  font-size: 0.72rem;
  font-weight: 650;
}

.access-login-submit {
  min-height: 43px;
  margin-top: 5px;
  border: 0;
  border-radius: 9px;
  background: var(--ink);
  color: white;
  font-weight: 760;
}

.access-login-submit:hover:not(:disabled) {
  background: #20324c;
}

.access-login-submit:disabled {
  cursor: wait;
  opacity: 0.7;
}

.access-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 1.2rem;
  line-height: 1;
}

.access-dialog-close:hover {
  background: var(--surface-soft);
  color: var(--ink);
}

.language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 254, 250, 0.78);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 720;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.language-trigger:hover,
.language-menu.is-open .language-trigger {
  border-color: var(--ink-soft);
  background: var(--surface);
}

.language-trigger:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 34, 56, 0.08);
}

.globe-icon {
  position: relative;
  display: block;
  width: 17px;
  height: 17px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  color: var(--accent-dark);
}

.globe-icon::before {
  position: absolute;
  inset: -1.5px 4px;
  border-right: 1px solid currentColor;
  border-left: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.globe-icon::after {
  position: absolute;
  top: 7px;
  right: 0;
  left: 0;
  border-top: 1px solid currentColor;
  content: "";
}

.globe-icon i {
  position: absolute;
  inset: 3px -1.5px;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  border-radius: 50%;
}

.language-chevron {
  display: inline-block;
  margin-left: 1px;
  color: var(--ink-faint);
  font-size: 0.82rem;
  line-height: 1;
  transform-origin: center 55%;
  transition: transform 150ms ease;
}

.language-menu.is-open .language-chevron {
  transform: rotate(180deg);
}

.language-popover {
  position: absolute;
  z-index: 50;
  top: calc(100% + 8px);
  right: 0;
  width: 150px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 16px 40px rgba(20, 34, 56, 0.14);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-5px);
  transition:
    opacity 140ms ease,
    visibility 140ms ease,
    transform 140ms ease;
}

.language-popover::before {
  position: absolute;
  top: -9px;
  right: 0;
  left: 0;
  height: 9px;
  content: "";
}

.language-hint {
  padding: 3px 9px 5px;
  color: var(--ink-faint);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.language-available-hint {
  margin-top: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.language-menu:hover .language-popover,
.language-menu.is-open .language-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.language-popover button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 680;
  text-align: left;
}

.language-popover button:hover,
.language-popover button:focus-visible {
  background: var(--surface-soft);
  color: var(--ink);
}

.language-popover button[aria-checked="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.language-popover button[aria-checked="true"]::after {
  margin-left: auto;
  content: "\2713";
}

main {
  overflow: hidden;
}

.hero {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 52px 0 56px;
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: end;
  gap: 44px;
}

.eyebrow,
.section-label {
  margin: 0 0 17px;
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.eyebrow > span[aria-hidden] {
  width: 25px;
  height: 2px;
  background: var(--accent);
}

html[lang="ja"] .hero h1,
html[lang="ja"] .results-header h2,
html[lang="ja"] .policy-hero h1,
html[lang="zh-CN"] .hero h1,
html[lang="zh-CN"] .results-header h2,
html[lang="zh-CN"] .policy-hero h1 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", "Songti SC", serif;
  letter-spacing: -0.045em;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.9rem, 5.5vw, 5.35rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.hero-copy > p:last-child {
  max-width: 420px;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.55vw, 1.18rem);
  line-height: 1.7;
}

.search-card {
  position: relative;
  margin-top: 32px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.search-card::before {
  position: absolute;
  top: -1px;
  right: 42px;
  left: 42px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  content: "";
}

.query-label {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.query-field {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  min-height: 58px;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #fff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.query-field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 34, 56, 0.08);
}

.search-icon {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 2px solid var(--ink-soft);
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 7px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-soft);
  content: "";
  transform: rotate(45deg);
}

.query-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
}

.query-field input::placeholder {
  color: #939aa3;
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 58px;
  padding: 0 22px;
  border: 0;
  border-radius: 13px;
  background: var(--ink);
  color: white;
  font-size: 0.9rem;
  font-weight: 750;
  transition:
    transform 150ms ease,
    background 150ms ease;
}

.search-button:hover {
  background: #20324c;
  transform: translateY(-1px);
}

.search-button:active {
  transform: translateY(0);
}

.search-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.button-arrow {
  color: #ffb49c;
  font-size: 1.2rem;
}

.search-settings {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 17px;
}

.mode-control {
  display: flex;
  gap: 3px;
  margin: 0;
  padding: 3px;
  border: 0;
  border-radius: 10px;
  background: #ecebe5;
}

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

.mode-control label {
  cursor: pointer;
}

.mode-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mode-control span {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 700;
  transition:
    color 150ms ease,
    background 150ms ease,
    box-shadow 150ms ease;
}

.mode-control input:checked + span {
  background: white;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.mode-control input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.limit-control {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 650;
}

.limit-control select {
  min-height: 34px;
  padding: 0 27px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 720;
}

.premium-tip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid #f1c6b7;
  border-radius: 11px;
  background: var(--accent-soft);
}

.premium-tip-spark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.78rem;
}

.premium-tip strong {
  display: block;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 790;
}

.premium-tip p {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 0.71rem;
  line-height: 1.45;
}

.trial-hint {
  margin: 14px 0 0;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 600;
}

.trial-hint.is-spent {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.recent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.recent > span {
  padding-top: 7px;
  color: var(--ink-faint);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

#recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

#recent-list button {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.72rem;
}

#recent-list button:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.benefit-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
  list-style: none;
}

.benefit-row li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255, 254, 250, 0.76);
}

.benefit-row strong {
  color: var(--ink);
  font-size: 0.74rem;
}

.benefit-row span {
  color: var(--ink-faint);
  font-size: 0.7rem;
}

.results {
  padding: 60px max(24px, calc((100vw - var(--max-width)) / 2)) 72px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.84);
  backdrop-filter: blur(10px);
}

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.results-header h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.results-header > div > p:last-child {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
}

.results-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.result-view-control {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  margin-top: 27px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.result-view-control button {
  min-height: 35px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 760;
}

.result-view-control button + button {
  border-left: 1px solid var(--line);
}

.result-view-control button span:first-child {
  color: var(--accent);
}

.result-view-control button.is-active {
  background: var(--ink);
  color: white;
}

.result-view-control button.is-active span:first-child {
  color: #ffb49c;
}

.result-view-control button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.result-view-control button.is-pending:disabled {
  position: relative;
  isolation: isolate;
  cursor: wait;
  overflow: hidden;
  color: var(--ink);
  opacity: 1;
}

.result-view-control button.is-pending::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  background:
    linear-gradient(110deg, transparent 8%, #ffe1d9 35%, #f8b8a9 50%, #ffe1d9 65%, transparent 92%);
  background-size: 220% 100%;
  animation: ai-match-flow 1.45s ease-in-out infinite;
}

.result-view-control button.is-pending span {
  position: relative;
  z-index: 1;
}

.result-view-control button.is-pending span:first-child {
  animation: ai-match-spark 1.45s ease-in-out infinite;
}

@keyframes ai-match-flow {
  from { background-position: 170% 0; }
  to { background-position: -70% 0; }
}

@keyframes ai-match-spark {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.16); }
}

@media (prefers-reduced-motion: reduce) {
  .result-view-control button.is-pending::before,
  .result-view-control button.is-pending span:first-child {
    animation: none;
  }
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--ink);
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.status-message {
  margin-top: 25px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.55;
}

.status-message.is-demo {
  border-color: #e4d9b9;
  background: var(--warning-soft);
  color: #71501b;
}

.status-message.is-error {
  border-color: #e7c5bf;
  background: var(--error-soft);
  color: var(--error);
}

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

.summary-card {
  min-width: 0;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.summary-card span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin-top: 7px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 0.69rem;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.upgrade-card {
  grid-column: 1 / -1;
  padding: 32px;
  border: 1px solid #f0c5b7;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, rgba(255, 240, 233, 0.95), rgba(255, 254, 250, 0.96)),
    var(--surface);
  text-align: center;
}

.upgrade-card-spark {
  display: grid;
  width: 34px;
  height: 34px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  font-size: 0.95rem;
}

.upgrade-card h3 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.upgrade-card p {
  max-width: 560px;
  margin: 10px auto 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.6;
}

.upgrade-card-status {
  display: inline-flex;
  margin-top: 17px;
  padding: 7px 10px;
  border: 1px solid #efbdaa;
  border-radius: 999px;
  background: rgba(255, 254, 250, 0.72);
  color: var(--accent-dark);
  font-size: 0.7rem;
  font-weight: 760;
}

.platform-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}

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

.platform-logo {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: white;
  font-size: 0.84rem;
  font-weight: 850;
}

.yahoo-logo {
  background: var(--yahoo);
}

.mercari-logo {
  background: var(--mercari);
}

.platform-title h3 {
  margin: 0;
  font-size: 0.94rem;
  letter-spacing: -0.015em;
}

.platform-title p {
  margin: 3px 0 0;
  color: var(--ink-faint);
  font-size: 0.69rem;
}

.state-pill {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 0.64rem;
  font-weight: 780;
}

.platform-panel.is-placeholder .state-pill,
.platform-panel.is-loading .state-pill {
  background: #efeee8;
  color: var(--ink-faint);
}

.platform-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.platform-meta > div {
  padding: 15px 20px;
}

.platform-meta > div + div {
  border-left: 1px solid var(--line);
}

.platform-meta span {
  display: block;
  color: var(--ink-faint);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
}

.platform-meta strong {
  display: block;
  margin-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.28rem;
  font-weight: 500;
}

.listing-list {
  display: grid;
  padding: 7px 14px;
}

.listing-card {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 6px;
  color: var(--ink);
  text-decoration: none;
  transition: background 140ms ease;
}

.listing-card + .listing-card {
  border-top: 1px solid #ecebe5;
}

.listing-card:hover {
  border-radius: 10px;
  background: var(--surface-soft);
}

.listing-image,
.listing-image-placeholder {
  width: 70px;
  height: 70px;
  border-radius: 9px;
  background: #efeee9;
  object-fit: cover;
}

.listing-image-placeholder {
  display: grid;
  place-items: center;
  color: var(--ink-faint);
}

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

.listing-copy h4 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 0.77rem;
  font-weight: 650;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.listing-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 0.62rem;
}

.listing-tags span:not(:first-child)::before {
  margin-right: 7px;
  content: "·";
}

.listing-price {
  min-width: 85px;
  text-align: right;
}

.listing-price strong {
  display: block;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 780;
  white-space: nowrap;
}

.listing-price span {
  display: block;
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.58rem;
}

.panel-disclosure {
  margin: 0 20px 17px;
  border-top: 1px solid var(--line);
}

.panel-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  list-style: none;
}

.panel-disclosure summary::-webkit-details-marker {
  display: none;
}

.panel-disclosure p {
  margin: 9px 0 0;
  color: var(--ink-faint);
  font-size: 0.69rem;
  line-height: 1.55;
}

.source-link {
  display: block;
  margin: 0 20px 19px;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 750;
  text-decoration: none;
}

.source-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-footnote {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--ink-faint);
  font-size: 0.72rem;
  line-height: 1.6;
}

.panel-error {
  margin: 18px;
  padding: 22px;
  border: 1px solid #ead6d1;
  border-radius: 12px;
  background: var(--error-soft);
}

.panel-error strong {
  display: block;
  margin-bottom: 7px;
  color: var(--error);
  font-size: 0.84rem;
}

.panel-error p {
  margin: 0;
  color: #76524d;
  font-size: 0.75rem;
  line-height: 1.6;
}

.empty-visual,
.loading-list {
  display: grid;
  gap: 10px;
  padding: 25px 20px;
}

.empty-visual span,
.loading-list span {
  display: block;
  height: 70px;
  border-radius: 9px;
  background: #f1f0eb;
}

.is-loading .skeleton-logo,
.skeleton-line,
.loading-list span {
  background: linear-gradient(
    100deg,
    #efeee9 20%,
    #f8f7f3 40%,
    #efeee9 60%
  );
  background-size: 220% 100%;
  animation: shimmer 1.25s linear infinite;
}

.skeleton-line {
  display: block;
  width: 78px;
  height: 8px;
  margin-top: 4px;
  border-radius: 5px;
}

.skeleton-line.wide {
  width: 128px;
  height: 11px;
}

@keyframes shimmer {
  to {
    background-position-x: -220%;
  }
}

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  padding: 27px max(24px, calc((100vw - var(--max-width)) / 2));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.footer-brand {
  justify-self: start;
}

footer p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.68rem;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-self: end;
  gap: 16px;
}

.footer-links a {
  justify-self: end;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

.policy-page {
  width: min(calc(100% - 48px), 980px);
  margin: 0 auto;
  padding: 82px 0 100px;
}

.policy-hero {
  max-width: 760px;
}

.policy-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.8rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.policy-hero > p:last-child {
  max-width: 620px;
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.7;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 55px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--line);
}

.policy-grid section {
  padding: 27px;
  background: var(--surface);
}

.policy-number {
  margin: 0;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
}

.policy-grid h2 {
  margin: 27px 0 10px;
  font-size: 1rem;
}

.policy-grid section > p:last-child,
.policy-contact p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.7;
}

.policy-contact {
  display: grid;
  grid-template-columns: 0.6fr 1fr;
  gap: 30px;
  margin-top: 15px;
  padding: 22px 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.72);
}

.policy-contact strong {
  font-size: 0.86rem;
}

.terms-page {
  width: min(calc(100% - 48px), 900px);
  margin: 0 auto;
  padding: 82px 0 100px;
}

.terms-hero {
  max-width: 760px;
}

.terms-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.terms-hero > p:last-child {
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.7;
}

.terms-document {
  margin-top: 55px;
  padding: clamp(25px, 5vw, 58px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.terms-document > p:first-child,
.terms-section p,
.terms-section li {
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.95;
}

.terms-document > p:first-child {
  margin: 0 0 38px;
}

.terms-section {
  padding-top: 29px;
  border-top: 1px solid var(--line);
}

.terms-section + .terms-section {
  margin-top: 29px;
}

.terms-section h2 {
  margin: 0 0 13px;
  font-size: 1.05rem;
  line-height: 1.5;
}

.terms-section p {
  margin: 0 0 10px;
}

.terms-section ol,
.terms-section ul {
  margin: 0;
  padding-left: 1.7em;
}

.terms-section li + li {
  margin-top: 6px;
}

.terms-issued {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.9;
  text-align: right;
}

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

:focus-visible {
  outline: 3px solid rgba(244, 91, 53, 0.42);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }

  .hero-copy {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-copy > p:last-child {
    max-width: 660px;
    margin: 0;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header,
  .hero {
    width: min(calc(100% - 30px), var(--max-width));
  }

  .site-header {
    min-height: 66px;
  }

  .header-actions {
    gap: 10px;
  }

  .header-actions a {
    display: none;
  }

  .hero {
    padding: 48px 0 54px;
  }

  .hero h1 {
    font-size: clamp(2.75rem, 15vw, 4.6rem);
  }

  .hero-copy > p:last-child {
    margin-top: 21px;
  }

  .search-card {
    margin-top: 32px;
    padding: 18px;
    border-radius: 18px;
  }

  .search-card::before {
    right: 25px;
    left: 25px;
  }

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

  .query-field,
  .search-button {
    min-height: 54px;
  }

  .search-settings {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .mode-control {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .mode-control span {
    text-align: center;
  }

  .limit-control {
    justify-content: space-between;
  }

  .recent {
    flex-direction: column;
    gap: 5px;
  }

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

  .results {
    padding: 55px 15px 65px;
  }

  .results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .results-actions {
    width: 100%;
    justify-content: space-between;
  }

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

  .listing-card {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .listing-image,
  .listing-image-placeholder {
    width: 62px;
    height: 62px;
  }

  .listing-price {
    grid-column: 2;
    min-width: 0;
    margin-top: -6px;
    text-align: left;
  }

  .listing-price span {
    display: inline;
    margin-left: 5px;
  }

  footer {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 28px 20px;
  }

  .footer-brand,
  .footer-links {
    justify-self: center;
  }

  .policy-page {
    width: min(calc(100% - 30px), 980px);
    padding: 55px 0 72px;
  }

  .terms-page {
    width: min(calc(100% - 30px), 900px);
    padding: 55px 0 72px;
  }

  .policy-grid {
    grid-template-columns: 1fr;
    margin-top: 38px;
  }

  .policy-contact {
    grid-template-columns: 1fr;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
