:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #586574;
  --line: #d9e0e6;
  --paper: #f7f8f5;
  --white: #ffffff;
  --teal: #116a6c;
  --teal-dark: #0a4547;
  --coral: #d86d4a;
  --gold: #c89b3c;
  --shadow: 0 18px 60px rgba(28, 40, 48, 0.14);
}

* { box-sizing: border-box; }
html { width: 100%; max-width: 100%; scroll-behavior: smooth; }
body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
main, section, header, footer, figure, img { max-width: 100%; }
h1, h2, h3, p, a, strong, span { overflow-wrap: anywhere; }
button, input, textarea { font: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  background: rgba(247, 248, 245, 0.9);
  border-bottom: 1px solid rgba(217, 224, 230, 0.72);
  backdrop-filter: blur(18px);
}
.brand, .nav-links, .hero-actions, .site-footer { display: flex; align-items: center; }
.brand { min-width: 0; gap: 12px; font-weight: 800; }
.brand span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--teal);
  color: var(--white);
  font-size: 15px;
  letter-spacing: 0;
}
.nav-links { flex-shrink: 0; gap: 28px; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--teal-dark); }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: min(760px, calc(100svh - 72px));
  padding: clamp(60px, 7vw, 96px) 6vw clamp(44px, 5vw, 76px);
}
.hero-copy, .hero-media, .product-panel { min-width: 0; }
.hero-copy { max-width: 760px; }
.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 18px; overflow-wrap: anywhere; font-size: clamp(38px, 5.2vw, 68px); line-height: 1.08; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: clamp(28px, 4vw, 48px); line-height: 1.12; letter-spacing: 0; }
h3 { margin-bottom: 12px; overflow-wrap: anywhere; font-size: 21px; line-height: 1.25; }
.english-name {
  max-width: 650px;
  margin-bottom: 20px;
  color: var(--teal-dark);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 800;
  line-height: 1.25;
}
.hero-text { max-width: 650px; color: var(--muted); font-size: clamp(17px, 2vw, 21px); }
.hero-actions { flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--teal-dark);
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.button:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}
.button.primary { background: var(--teal-dark); color: var(--white); }
.button.secondary { background: rgba(255, 255, 255, 0.55); color: var(--teal-dark); }
.button:hover { transform: translateY(-1px); }
.hero-media { margin: 0; }
.hero-media img {
  display: block;
  max-width: 100%;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.hero-media figcaption { margin-top: 12px; color: var(--muted); font-size: 14px; }
.section { padding: clamp(64px, 8vw, 112px) 6vw; }
.stats-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 1px 6vw;
  background: var(--line);
}
.stat { min-height: 150px; padding: 28px; background: var(--white); }
.stat span, .contact-list span { display: block; color: var(--muted); font-size: 14px; font-weight: 800; }
.stat strong { display: block; margin-top: 8px; color: var(--teal-dark); font-size: clamp(28px, 4vw, 48px); line-height: 1; }
.intro { border-block: 1px solid var(--line); background: var(--white); }
.section-heading { max-width: 780px; margin-bottom: 34px; }
.article-body { max-width: 1050px; color: #26323d; font-size: clamp(17px, 1.7vw, 20px); }
.article-body p { margin-bottom: 0; text-align: justify; }
.split-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.category-list, .contact-list { margin: 0; padding: 0; list-style: none; }
.category-list { display: grid; gap: 12px; margin-top: 24px; }
.category-list button {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--teal-dark);
  font: inherit;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}
.category-list button.is-active {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: var(--white);
}
.category-list strong {
  display: inline-grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: rgba(17, 106, 108, 0.1);
  font-size: 14px;
}
.category-list button.is-active strong {
  background: rgba(255, 255, 255, 0.18);
}
.product-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.product-toolbar input {
  width: min(320px, 100%);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font: inherit;
}
.product-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.product-card, .page-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.product-card h3 { min-height: 54px; }
.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.product-card p, .page-card p { color: var(--muted); }
.product-card p {
  display: -webkit-box;
  min-height: 76px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}
.product-actions button,
.product-card a,
.page-card a {
  color: var(--teal-dark);
  font-weight: 900;
}
.product-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--teal-dark);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.product-actions button[data-inquire-product] {
  background: var(--teal-dark);
  color: var(--white);
}
.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
}
.product-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.product-dialog::backdrop { background: rgba(10, 20, 24, 0.58); }
.dialog-close {
  position: sticky;
  top: 0;
  float: right;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
#product-detail img {
  display: block;
  width: min(360px, 100%);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
#product-detail p { color: var(--muted); white-space: pre-wrap; }
#product-detail .detail-summary { color: var(--ink); font-weight: 800; }
.dialog-inquiry { margin-top: 18px; }
.breadcrumb-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--teal-dark);
  font-weight: 900;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.product-page {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: start;
}
.product-page img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.product-page article {
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.product-page p { color: var(--muted); white-space: pre-wrap; }
.product-page .detail-summary { color: var(--ink); font-weight: 800; }
.related-pages { background: var(--white); border-block: 1px solid var(--line); }
.page-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); align-items: start; gap: clamp(28px, 5vw, 70px); }
.inquiry-form {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.field-label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.inquiry-form input,
.inquiry-form textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.inquiry-form input:focus,
.inquiry-form textarea:focus,
.product-toolbar input:focus,
.admin-login input:focus,
.admin-card input:focus,
.admin-card textarea:focus {
  outline: 2px solid rgba(17, 106, 108, 0.22);
  border-color: var(--teal);
}
.inquiry-form textarea { min-height: 120px; resize: vertical; }
.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.form-status[data-type="success"] { color: var(--teal-dark); }
.form-status[data-type="error"] { color: #a43d2a; }
.form-status[data-type="pending"] { color: var(--muted); }
.contact-list { display: grid; gap: 16px; max-width: 820px; margin-top: 24px; }
.contact-list li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.contact-list strong { overflow-wrap: anywhere; font-size: clamp(17px, 2vw, 22px); line-height: 1.35; }
.site-footer { justify-content: space-between; gap: 18px; padding: 26px 6vw; color: var(--muted); border-top: 1px solid var(--line); }
.load-error { padding: 12px 6vw; background: #fff1f0; color: #8f1d13; }
.admin-shell { padding: 5vw 6vw; }
.admin-login,
.admin-card {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
.admin-login { width: min(460px, 100%); }
.admin-login label,
.admin-card label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 800;
}
.admin-login input,
.admin-card input,
.admin-card textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}
.admin-card textarea { min-height: 120px; resize: vertical; }
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto 24px;
}
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 12px 0 18px;
}
.admin-filters input {
  flex: 1 1 280px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.admin-filters span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.filter-button.is-active {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
  color: var(--white);
}
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.admin-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}
.admin-product {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.admin-product img {
  width: 160px;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.inquiry-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.inquiry-item.is-done {
  opacity: 0.72;
}
.inquiry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.inquiry-heading span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.inquiry-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.inquiry-meta strong {
  color: var(--ink);
}
.inquiry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.inquiry-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.inquiry-item span,
.inquiry-item small {
  display: block;
  color: var(--muted);
}
.admin-status {
  overflow: auto;
  max-height: 260px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
@media (max-width: 960px) {
  .hero, .stats-band, .split-section, .product-list, .page-grid { grid-template-columns: 1fr; }
  .product-page { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 56px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { align-items: stretch; flex-direction: column; gap: 14px; padding-block: 16px; }
  .brand span:last-child { white-space: normal; }
  .nav-links { width: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 10px 22px; overflow: visible; padding-bottom: 2px; }
  h1 { font-size: 30px; line-height: 1.14; word-break: break-all; }
  .product-page { overflow: hidden; width: 100vw; padding-inline: 28px; }
  .product-page img,
  .product-page article {
    width: calc(100vw - 84px);
    max-width: calc(100vw - 84px);
    justify-self: start;
  }
  .product-page article { padding: 20px; }
  .product-page h1 { max-width: 8.8em; font-size: 27px; line-height: 1.18; word-break: break-all; }
  .product-page p { overflow-wrap: anywhere; word-break: break-all; }
  .company-hero h1 { max-width: 9em; }
  .english-name, .hero-text { overflow-wrap: anywhere; word-break: break-word; }
  .hero-text { max-width: 18em; }
  .hero { display: flex; flex-direction: column; padding-inline: 28px; }
  .hero > * { width: 100%; max-width: 100%; }
  .hero-media img { object-fit: contain; }
  .hero-text { font-size: 17px; }
  .button { width: 100%; }
  .product-toolbar { align-items: stretch; flex-direction: column; }
  .contact-list li { grid-template-columns: 1fr; gap: 4px; }
  .site-footer { align-items: flex-start; flex-direction: column; }
  .inquiry-form { padding: 16px; }
  .inquiry-heading { align-items: flex-start; flex-direction: column; }
  .admin-grid,
  .admin-row,
  .admin-product { grid-template-columns: 1fr; }
  .admin-shell { padding: 24px 16px; }
  .admin-login,
  .admin-card {
    width: 100%;
    max-width: none;
    padding: 20px;
  }
  .admin-login input,
  .admin-card input,
  .admin-card textarea {
    min-width: 0;
  }
  .admin-topbar { align-items: stretch; flex-direction: column; }
  .admin-actions .button { width: calc(50% - 5px); }
  .admin-product img { width: 100%; max-width: 220px; }
}
