:root {
  color-scheme: light;
  --page: #f4f6f9;
  --paper: #ffffff;
  --paper-soft: #f8fafc;
  --ink: #0d1117;
  --ink-2: #1f2937;
  --muted: #627083;
  --line: #dce3ee;
  --line-strong: #b9c5d6;
  --accent: #0b63f6;
  --accent-strong: #074cc0;
  --accent-soft: #eaf2ff;
  --warm: #f59e0b;
  --success: #0f7a55;
  --danger: #b42318;
  --shadow: 0 24px 70px rgb(15 23 42 / 11%);
  --shadow-tight: 0 8px 22px rgb(15 23 42 / 8%);
  --focus-ring: 0 0 0 3px rgb(11 99 246 / 18%);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgb(11 99 246 / 8%) 0 240px, transparent 520px),
    radial-gradient(circle at 82% 8%, rgb(245 158 11 / 8%) 0 180px, transparent 430px),
    linear-gradient(90deg, rgb(15 23 42 / 4%) 1px, transparent 1px) 0 0 / 46px 46px,
    var(--page);
  color: var(--ink);
  margin: 0;
  min-height: 100dvh;
}

button {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 760;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}

button:hover {
  background: #f8fafc;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-tight);
}

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

button:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 14px 30px rgb(11 99 246 / 22%);
  color: #fff;
}

button.primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: .56;
  transform: none;
}

.app-shell {
  margin: 0 auto;
  min-height: 100dvh;
  padding: 24px 0 54px;
  width: min(1220px, calc(100vw - 48px));
}

.topbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 0;
  min-width: 0;
}

.brand-logo {
  display: block;
  height: 88px;
  margin-left: 0;
  object-fit: contain;
  object-position: left center;
  width: 286px;
}

.brand-logo-wrap {
  display: block;
  flex: 0 0 auto;
}

.brand h1 {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.brand p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin: 4px 0 0;
  display: none;
}

.topbar-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 15px;
}

#languageToggle {
  min-height: 40px;
  min-width: 0;
  padding: 8px 13px;
}

.hero {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(400px, .88fr) minmax(0, 1.12fr);
  min-height: min(620px, calc(100dvh - 166px));
}

.import-panel {
  min-width: 0;
  padding: 18px 0 18px 4px;
  transform: translateY(-46px);
}

.handoff-notice {
  background: #eaf8f3;
  border: 1px solid #b7decd;
  border-radius: 8px;
  color: #0b5f59;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  margin: 0 0 18px;
  padding: 11px 13px;
}

.import-panel h2 {
  color: var(--ink);
  font-size: clamp(52px, 5.4vw, 78px);
  font-weight: 870;
  letter-spacing: 0;
  line-height: .95;
  margin: 0 0 12px;
  max-width: 6.2em;
  overflow-wrap: anywhere;
  text-wrap: balance;
  word-break: normal;
}

.hero-english {
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.35;
  margin: 0 0 18px;
}

.hero-subtitle {
  color: var(--muted);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.55;
  margin: 0 0 34px;
  max-width: 34ch;
  white-space: pre-line;
}

.file-import-card {
  padding-left: 0;
}

.action-note {
  color: #7a8798;
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 12px;
}

.import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.import-actions button {
  background: #fff;
  border-color: #cbd7e8;
  box-shadow: 0 14px 34px rgb(15 23 42 / 8%);
  font-size: 15px;
  min-height: 56px;
  padding-inline: 22px;
}

.import-actions button:first-child {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.import-actions button:first-child:hover {
  background: #020617;
  border-color: #020617;
}

.community-link {
  align-items: center;
  background: var(--accent-soft);
  border: 1px solid rgb(11 99 246 / 22%);
  border-radius: 8px;
  color: var(--accent-strong);
  display: inline-flex;
  font-size: 14px;
  font-weight: 780;
  gap: 8px;
  line-height: 1.2;
  margin-top: 14px;
  min-height: 44px;
  padding: 10px 14px;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.community-link::before {
  content: "💬";
  font-size: 15px;
}

.community-link::after {
  content: "↗";
  font-size: 13px;
  opacity: .72;
}

.community-link:hover {
  background: #dceaff;
  border-color: rgb(11 99 246 / 36%);
  box-shadow: var(--shadow-tight);
  transform: translateY(-1px);
}

.community-link:focus-visible {
  box-shadow: var(--focus-ring);
  outline: none;
}

.status {
  color: var(--accent-strong);
  font-size: 14px;
  min-height: 22px;
  margin: 18px 0 0;
}

.product-preview {
  min-width: 0;
  position: relative;
}

.preview-chrome {
  background: #0f172a;
  border: 1px solid rgb(15 23 42 / 14%);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.preview-bar {
  align-items: center;
  background: #111827;
  display: flex;
  gap: 7px;
  min-height: 42px;
  padding: 0 15px;
}

.preview-bar span {
  border-radius: 50%;
  height: 9px;
  width: 9px;
}

.preview-bar span:nth-child(1) {
  background: #ff7b33;
}

.preview-bar span:nth-child(2) {
  background: #fbbf24;
}

.preview-bar span:nth-child(3) {
  background: #22d3ee;
}

.preview-bar strong {
  color: #cad5e4;
  font-size: 12px;
  font-weight: 760;
  margin-left: 10px;
}

.preview-chrome iframe {
  background: #fff;
  border: 0;
  display: block;
  height: 460px;
  pointer-events: auto;
  transform-origin: top left;
  width: 100%;
}

.demo-action {
  align-items: center;
  background: rgb(255 255 255 / 86%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgb(15 23 42 / 8%);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 12px 0 0 auto;
  padding: 14px 16px;
  width: min(520px, 100%);
}

.demo-action strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
  line-height: 1.25;
  margin: 0 0 4px;
}

.demo-action p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

#tryDemo {
  min-width: 124px;
}

.operations-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 18px;
}

.projects-panel {
  background: rgb(255 255 255 / 88%);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgb(15 23 42 / 8%);
  color: var(--ink);
}

.privacy-footer {
  color: var(--muted);
  display: grid;
  gap: 12px;
  justify-items: center;
  margin: 24px auto 0;
  max-width: 920px;
  min-width: 0;
  padding: 16px 2px 0;
}

.privacy-footer p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: justify;
  text-align-last: left;
}

.footer-status {
  max-width: 860px;
  width: 100%;
}

.footer-links {
  align-items: center;
  border-bottom: 1px solid rgb(185 197 214 / 45%);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  justify-content: center;
  padding-bottom: 12px;
  width: 100%;
}

.footer-links a {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 720;
  line-height: 1.45;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.footer-disclaimer {
  color: rgb(100 116 139 / 92%);
  font-size: 12px;
  line-height: 1.65;
  max-width: 860px;
  width: 100%;
}

.projects-heading h2 {
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.25;
  margin: 0;
}

.projects-panel {
  min-width: 0;
  padding: 20px;
}

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

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

.project-row {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 13px;
}

.project-row h3 {
  color: var(--ink);
  font-size: 15px;
  margin: 0 0 5px;
  overflow-wrap: anywhere;
}

.project-row p,
.empty-projects {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  overflow-wrap: anywhere;
}

.project-meta {
  min-width: 0;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.modal-backdrop {
  align-items: center;
  background: rgb(15 23 42 / 58%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 86px rgb(0 0 0 / 24%);
  color: var(--ink);
  max-height: min(680px, calc(100dvh - 36px));
  overflow: auto;
  padding: 18px;
  width: min(620px, 100%);
}

.modal-heading,
.modal-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.modal-heading h2 {
  font-size: 18px;
  margin: 0;
}

.modal > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 12px 0 16px;
}

.entry-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  margin-bottom: 16px;
  max-height: 340px;
  overflow: auto;
}

.entry-option {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 6px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 11px 12px;
}

.entry-option:last-child {
  border-bottom: 0;
}

.entry-option strong,
.entry-option span {
  overflow-wrap: anywhere;
}

.entry-option span {
  color: var(--muted);
  font-size: 12px;
}

.modal-actions {
  justify-content: flex-end;
}

@media (max-width: 1080px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .import-panel {
    padding-top: 36px;
  }

  .product-preview::before {
    display: none;
  }

  .preview-chrome iframe {
    height: 420px;
  }

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

@media (max-width: 760px) {
  .app-shell {
    padding: 22px 0 40px;
    width: min(560px, calc(100vw - 28px));
  }

  .topbar {
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
  }

  .topbar-meta {
    flex: 0 0 auto;
  }

  #languageToggle {
    font-size: 12px;
    min-height: 38px;
    padding: 8px 10px;
  }

  .brand-logo {
    height: 62px;
    width: 198px;
  }

  .import-panel {
    padding: 18px 0 4px;
    transform: none;
  }

  .import-panel h2 {
    font-size: 42px;
    line-height: 1.04;
    max-width: 9em;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .import-panel > p:not(.handoff-notice):not(.status) {
    font-size: 15px;
    max-width: 36ch;
  }

  .hero-english {
    font-size: 14px;
  }

  .import-actions {
    display: grid;
    max-width: 352px;
  }

  .import-actions button {
    width: 100%;
  }

  .community-link {
    justify-content: center;
    max-width: 352px;
    width: 100%;
  }

  .product-preview {
    display: block;
  }

  .preview-chrome {
    display: none;
  }

  .demo-action {
    align-items: stretch;
    display: grid;
    margin-top: 0;
    width: 100%;
  }

  .project-row {
    align-items: flex-start;
    display: grid;
  }

  .project-actions {
    justify-content: flex-start;
  }

  .privacy-footer {
    justify-items: start;
  }

  .privacy-footer p {
    font-size: 12px;
    line-height: 1.55;
    max-width: 100%;
  }

  .footer-links {
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 420px) {
  .app-shell {
    width: min(560px, calc(100vw - 24px));
  }

  .brand-logo {
    height: 50px;
    margin-left: 0;
    width: 160px;
  }

  .brand h1 {
    font-size: 18px;
  }

  .import-panel h2 {
    font-size: 36px;
    max-width: 8.8em;
  }

}
