:root {
  color-scheme: light;
  --ink: #171a17;
  --muted: #5d665f;
  --quiet: #858d88;
  --line: #dce4dd;
  --paper: #f6f8f6;
  --surface: #ffffff;
  --surface-soft: #eef3ef;
  --accent: #28563a;
  --accent-deep: #193724;
  --accent-soft: #e3eee6;
  --shadow: 0 18px 40px rgba(27, 43, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:active,
a:active {
  transform: translateY(1px);
}

a {
  color: inherit;
}

h1,
h2,
p {
  margin: 0;
}

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

.topbar {
  min-height: 68px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(23, 26, 23, 0.08);
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-seal {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.mobile-cart-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-deep);
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  flex: 0 0 auto;
}

.mobile-cart-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.mobile-cart-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mobile-cart-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -7px;
  right: -7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.mobile-cart-count:not(:empty) {
  display: inline-flex;
}

.cart-backdrop {
  display: none;
}

.language-switcher {
  display: block;
}

.language-switcher select {
  width: auto;
  min-width: 116px;
  height: 34px;
  padding: 0 30px 0 10px;
  border-color: var(--line);
  background-color: var(--surface);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 800;
}

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

.topnav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.topnav a {
  text-decoration: none;
}

.topnav a:hover {
  color: var(--accent-deep);
}

.sync-status {
  min-height: 34px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.hero {
  max-width: 1480px;
  min-height: 470px;
  margin: 0 auto;
  padding: 54px 28px 42px;
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1fr);
  gap: 52px;
  align-items: center;
}

.hero-copy {
  max-width: 700px;
  display: grid;
  gap: 22px;
}

.kicker {
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 800;
}

.hero h1 {
  max-width: 640px;
  font-size: clamp(42px, 5.4vw, 72px);
  line-height: 1;
  font-weight: 800;
  white-space: pre-line;
  text-wrap: balance;
  overflow-wrap: normal;
}

html[lang="ko"] .hero h1,
html[lang="ja"] .hero h1,
html[lang="zh-CN"] .hero h1 {
  max-width: 620px;
  font-size: clamp(40px, 4.4vw, 62px);
  line-height: 1.08;
  word-break: keep-all;
}

.hero-lede {
  max-width: 540px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

#exportButton,
.load-more,
.product-actions button {
  min-height: 42px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

#exportButton,
.load-more,
.product-actions button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
}

#exportButton:hover,
.load-more:hover,
.product-actions button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.hero-visual {
  display: grid;
  gap: 16px;
  align-content: center;
}

.ticket-line {
  min-height: 46px;
  padding: 0 2px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ticket-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.ticket-line strong {
  font-size: 18px;
}

.muted-line {
  justify-content: flex-start;
  gap: 22px;
}

.hero-shelf {
  min-height: 296px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.shelf-item {
  min-width: 0;
  min-height: 140px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(27, 43, 31, 0.05);
}

.shelf-item img {
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
}

.trust-band {
  max-width: 1480px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface);
}

.trust-band > div {
  min-height: 112px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 7px;
}

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

.trust-band strong {
  font-size: 15px;
}

.trust-band span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.workspace {
  max-width: 1480px;
  margin: 0 auto;
  padding: 38px 28px 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 24px;
  align-items: start;
}

.catalog-area {
  min-width: 0;
}

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

.section-heading h2 {
  max-width: 760px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 800;
}

.section-heading p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 15px;
}

.text-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.text-button:hover {
  background: var(--accent-soft);
}

.controls {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: end;
  box-shadow: 0 8px 24px rgba(27, 43, 31, 0.04);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 118px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: var(--quiet);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 86, 58, 0.16);
}

.concern-filter {
  margin: 14px 0 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.concern-filter button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.concern-filter button:hover {
  border-color: rgba(40, 86, 58, 0.42);
}

.concern-filter button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.summary {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
}

.summary > div {
  min-height: 78px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 4px;
}

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

.metric {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.label {
  color: var(--muted);
  font-size: 13px;
}

.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 14px;
}

.product {
  min-height: 382px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  display: grid;
  grid-template-rows: 192px 1fr;
  transition:
    transform 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.product:hover {
  transform: translateY(-2px);
  border-color: rgba(40, 86, 58, 0.42);
  box-shadow: var(--shadow);
}

.product-media {
  width: 100%;
  height: 192px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfb 0%, #eef3ef 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  padding: 14px;
  object-fit: contain;
}

.image-fallback {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  padding: 14px;
  background: linear-gradient(180deg, #fbfcfb 0%, #eef3ef 100%);
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: left;
}

.image-placeholder strong {
  color: var(--accent-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.image-placeholder span {
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12px;
  line-height: 1.35;
}

.shelf-item .image-placeholder {
  text-align: center;
}

.product-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.product-topline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand {
  min-width: 0;
  color: var(--accent-deep);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.concern-pill {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 11px;
  font-weight: 800;
}

.name-block {
  min-height: 78px;
  display: grid;
  align-content: start;
  gap: 4px;
}

.name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
}

.translated-name {
  color: var(--muted);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 12px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price {
  font-size: 17px;
  font-weight: 800;
}

.origin {
  color: var(--quiet);
  font-size: 12px;
  text-decoration: line-through;
}

.badges {
  min-height: 24px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 6px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.product-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.product-actions button.is-selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-deep);
}

#exportButton:disabled {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--quiet);
  cursor: not-allowed;
}

.load-more {
  width: 100%;
  margin-top: 16px;
}

.request-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 17px;
  display: grid;
  gap: 15px;
  box-shadow: 0 12px 30px rgba(27, 43, 31, 0.06);
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.panel-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.panel-heading h2 {
  margin-top: 4px;
  font-size: 23px;
}

.panel-heading-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.panel-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.close-cart-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent-deep);
  display: none;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.close-cart-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.request-items {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
  padding-right: 2px;
}

.request-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: start;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.request-item img {
  width: 48px;
  height: 56px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface);
}

.request-item > .image-fallback {
  width: 48px;
  height: 56px;
  border-radius: 8px;
  background: var(--surface);
  display: grid;
  place-items: center;
  padding: 4px;
  text-align: center;
  font-size: 10px;
}

.request-item-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.request-item-copy strong,
.request-item-copy span,
.request-item-copy em {
  display: block;
  overflow: hidden;
}

.request-item-copy strong {
  color: var(--accent-deep);
  font-size: 13px;
}

.request-item-copy span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.request-item-translation {
  color: var(--quiet);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 11px;
  line-height: 1.35;
}

.request-item-copy em {
  color: var(--ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.quantity-stepper {
  width: max-content;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  display: inline-grid;
  grid-template-columns: 30px minmax(30px, auto) 30px;
  align-items: center;
  overflow: hidden;
}

.quantity-stepper button {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--accent-deep);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 800;
}

.quantity-stepper button:hover {
  background: var(--accent-soft);
}

.quantity-stepper output {
  min-width: 30px;
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.remove {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-weight: 800;
}

.remove:hover {
  background: var(--accent-soft);
}

.disclaimer {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.empty {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 14px;
}

.catalog-empty {
  grid-column: 1 / -1;
}

.request-items .empty {
  min-height: 112px;
}

.email-field {
  margin-top: 2px;
}

.form-message {
  min-height: 0;
  color: #8a4d0f;
  font-size: 12px;
  line-height: 1.35;
}

.form-message:empty {
  display: none;
}

.product-skeleton {
  min-height: 382px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.skeleton-image,
.skeleton-line {
  background: linear-gradient(90deg, #edf2ee 0%, #f7f9f7 50%, #edf2ee 100%);
  background-size: 220% 100%;
  animation: pulse 1100ms ease-in-out infinite;
}

.skeleton-image {
  height: 192px;
}

.skeleton-body {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.skeleton-line {
  height: 13px;
  border-radius: 8px;
}

.skeleton-line.short {
  width: 42%;
}

.skeleton-line.medium {
  width: 74%;
}

@keyframes pulse {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 34px;
  }

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

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

  .request-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  body.cart-modal-open {
    overflow: hidden;
  }

  .topbar {
    position: sticky;
    min-height: auto;
    padding: 12px 18px;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .mobile-cart-button {
    display: inline-flex;
    margin-left: auto;
    z-index: 1;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .sync-status {
    width: auto;
    flex: 1 1 auto;
    text-align: center;
  }

  .topbar-actions {
    width: 100%;
    justify-content: stretch;
    margin-left: 0;
  }

  .language-switcher select {
    min-width: 116px;
  }

  .hero {
    padding: 42px 18px 30px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-shelf {
    min-height: 240px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trust-band {
    grid-template-columns: 1fr;
  }

  .trust-band > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .workspace {
    padding: 30px 18px 52px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .section-heading h2 {
    font-size: 28px;
  }

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

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

  .summary > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .cart-backdrop {
    width: 100%;
    height: 100%;
    background: rgba(23, 26, 23, 0.46);
    display: block;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    transition: opacity 180ms ease;
  }

  body.cart-modal-open .cart-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .request-panel {
    width: min(calc(100% - 24px), 520px);
    max-height: min(82dvh, 680px);
    padding: 16px;
    position: fixed;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 60;
    overflow: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 18px));
    transition:
      opacity 180ms ease,
      transform 220ms ease;
  }

  .request-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .request-panel .request-items {
    max-height: min(40dvh, 360px);
  }

  .close-cart-button {
    display: grid;
  }
}

@media (max-width: 560px) {
  .brand-mark {
    white-space: normal;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(112px, 0.8fr) minmax(0, 1fr);
  }

  .language-switcher select {
    width: 100%;
  }

  .hero h1 {
    font-size: 38px;
  }

  html[lang="ko"] .hero h1,
  html[lang="ja"] .hero h1,
  html[lang="zh-CN"] .hero h1 {
    max-width: 100%;
    font-size: 36px;
    line-height: 1.12;
  }

  .ticket-line {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
  }

  .muted-line {
    gap: 6px;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
