:root {
  color-scheme: light;
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #14213d;
  background: #f4f7fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 3%, rgba(44, 123, 229, .1), transparent 28rem),
    radial-gradient(circle at 96% 20%, rgba(28, 190, 166, .08), transparent 24rem),
    #f4f7fb;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1080px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.site-header {
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(20, 33, 61, .09);
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  background: #1769e0;
  box-shadow: 0 8px 20px rgba(23, 105, 224, .24);
}

.brand-name { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }

.local-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #53617a;
  font-size: 13px;
  font-weight: 600;
}

.local-badge > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #18a985;
  box-shadow: 0 0 0 4px rgba(24, 169, 133, .12);
}

main { flex: 1; padding: 72px 0 56px; }

.hero { max-width: 640px; margin-bottom: 36px; }
.eyebrow { margin: 0 0 13px; color: #1769e0; font-size: 12px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; color: #111c34; font-size: clamp(42px, 7vw, 68px); line-height: 1.04; letter-spacing: -.055em; }
.lead { margin: 18px 0 0; color: #66738b; font-size: 17px; line-height: 1.7; }

.workflow { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }

.card {
  min-width: 0;
  padding: 26px;
  border: 1px solid rgba(20, 33, 61, .1);
  border-radius: 22px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 18px 50px rgba(31, 48, 78, .07);
}

.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.step-title { min-width: 0; display: flex; align-items: center; gap: 13px; }
.step-number {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #1769e0;
  background: #eaf2ff;
  font-size: 14px;
  font-weight: 800;
}
.step-label { margin: 0 0 2px; color: #8692a7; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
h2 { margin: 0; color: #18233c; font-size: 20px; letter-spacing: -.025em; }

.state-pill {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  color: #7a879c;
  background: #f0f3f7;
  font-size: 11px;
  font-weight: 700;
}
.state-pill.ready { color: #0b8066; background: #e4f7f1; }
.card-copy { min-height: 48px; margin: 22px 0 17px; color: #6e7a90; font-size: 14px; line-height: 1.7; }
code { padding: 2px 6px; border-radius: 5px; color: #1769e0; background: #edf4ff; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
button:not(:disabled):active { transform: translateY(1px); }
button.primary { color: #fff; background: #1769e0; font-weight: 750; box-shadow: 0 8px 20px rgba(23, 105, 224, .18); }
button.primary:not(:disabled):hover { background: #125cc7; box-shadow: 0 10px 26px rgba(23, 105, 224, .24); }
button.secondary { color: #43516a; border-color: #d9e0ea; background: #fff; font-weight: 650; }
button:disabled { opacity: .42; cursor: not-allowed; box-shadow: none; }

.file-picker {
  min-height: 72px;
  padding: 13px 15px;
  border: 1px dashed #bdc9da;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #34425c;
  background: #f9fbfd;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.file-picker:hover { border-color: #1769e0; background: #f5f9ff; }
.file-picker:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.file-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #1769e0; background: #eaf2ff; font-size: 21px; font-weight: 700; }
.file-picker strong, .file-picker small { display: block; }
.file-picker strong { font-size: 14px; }
.file-picker small { margin-top: 4px; color: #8793a8; font-size: 12px; }
.file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.info-box {
  min-height: 84px;
  margin: 14px 0 0;
  padding: 14px 15px;
  overflow: auto;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  color: #59677e;
  background: #f7f9fc;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.flash-button { width: 100%; margin-top: 14px; }
progress { width: 100%; height: 7px; margin-top: 15px; border: 0; border-radius: 99px; overflow: hidden; background: #e7ecf3; accent-color: #18a985; }
progress::-webkit-progress-bar { background: #e7ecf3; }
progress::-webkit-progress-value { border-radius: 99px; background: #18a985; transition: width .2s ease; }
progress::-moz-progress-bar { border-radius: 99px; background: #18a985; }

.status {
  min-height: 52px;
  margin-top: 20px;
  padding: 14px 17px;
  border: 1px solid #cdeee5;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #167861;
  background: #f0faf7;
  font-size: 14px;
  font-weight: 650;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #18a985; box-shadow: 0 0 0 4px rgba(24, 169, 133, .11); }
.status.error { color: #b43b4b; border-color: #f3cbd0; background: #fff5f6; }
.status.error .status-dot { background: #d84c5e; box-shadow: 0 0 0 4px rgba(216, 76, 94, .1); }

.notice { margin-top: 20px; padding: 4px 8px; display: flex; align-items: flex-start; gap: 12px; color: #788499; }
.notice-icon { flex: 0 0 auto; width: 22px; height: 22px; border: 1px solid #bdc7d5; border-radius: 50%; display: grid; place-items: center; font: 700 12px Georgia, serif; }
.notice p { margin: 0; font-size: 12px; line-height: 1.65; }
.notice strong { color: #536078; }

footer {
  min-height: 74px;
  border-top: 1px solid rgba(20, 33, 61, .09);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8a95a8;
  font-size: 12px;
  letter-spacing: .02em;
}
footer strong { color: #53617a; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 28px, 560px); }
  .site-header { height: 72px; }
  .local-badge { display: none; }
  main { padding: 48px 0 38px; }
  .hero { margin-bottom: 28px; }
  .workflow { grid-template-columns: 1fr; }
  .card { padding: 21px; border-radius: 18px; }
  .card-copy { min-height: auto; }
  footer { min-height: 68px; }
  footer > :last-child { display: none; }
}

@media (max-width: 420px) {
  .actions { grid-template-columns: 1fr; }
  .card-header { gap: 10px; }
  .state-pill { padding: 5px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
