:root {
  --text: #0f172a;
  --heading: #111827;
  --muted: #6b7280;
  --line: #dcdfe6;
  --blue: #409eff;
  --blue-dark: #337ecc;
  --red: #f56c6c;
  --green: #67c23a;
  --amber: #e6a23c;
}

* { box-sizing: border-box; }
html, body { min-width: 320px; min-height: 100%; }
body { margin: 0; background: #f7faff; font-family: Inter, "SF Pro Display", "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: 0; }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
[hidden] { display: none !important; }

.layout { min-height: 100vh; display: flex; flex-direction: column; color: var(--text); overflow: hidden; transition: background .25s ease; }
.layout--entry { background: linear-gradient(135deg, #f8fafc, #eef6ff 48%, #f6fff8); }
.layout--gpt { background: linear-gradient(135deg, #f7faff, #eef2ff 48%, #f8fafc); }
.layout--claude { background: linear-gradient(135deg, #fff7ed, #fed7aa 42%, #f8fafc); }
.layout--grok { background: linear-gradient(135deg, #f8fafc, #e2e8f0 42%, #f1f5f9); }

.topbar { position: relative; min-height: 64px; padding: 16px 20px 0; display: flex; align-items: center; justify-content: flex-end; }
.locale-shell { position: absolute; top: 16px; right: 20px; }
.locale-trigger { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; color: #334155; border: 1px solid rgba(148,163,184,.22); border-radius: 20px; background: rgba(255,255,255,.78); backdrop-filter: blur(8px); font-size: 13px; font-weight: 500; }
.locale-flag { font-size: 16px; line-height: 1; }
.locale-label { margin: 0 2px; }
.locale-trigger .arrow { width: 12px; height: 12px; color: #94a3b8; }

.page-head { position: relative; z-index: 1; padding: 36px 20px 10px; text-align: center; }
.page-head h1 { margin: 0 0 8px; color: var(--text); font-size: 34px; line-height: 46px; font-weight: 700; }
.page-head p { margin: 0; color: var(--muted); font-size: 15px; line-height: 20px; }
.batch-link { display: inline-block; margin-top: 12px; padding: 6px 18px; color: #fff; border: 0; border-radius: 20px; background: var(--text); font-size: 13px; line-height: 17px; font-weight: 600; transition: background .2s, transform .15s; }
.batch-link:hover { background: #1e293b; transform: translateY(-1px); }

main { flex: 1; width: 100%; max-width: 1140px; margin: 0 auto; padding: 20px 20px 40px; display: flex; justify-content: center; animation: fade-down .4s ease; }
.entry-layout { width: 100%; display: flex; justify-content: center; align-items: flex-start; position: relative; }
.step-progress { display: none; }
.card-panel { padding: 52px; color: #303133; border: 1px solid rgba(148,163,184,.14); border-radius: 22px; background: linear-gradient(145deg,#fff,#f7fbff); box-shadow: 0 20px 45px rgba(15,23,42,.12); transition: transform .3s ease, box-shadow .3s ease; }
.card-panel:hover { transform: translateY(-3px); box-shadow: 0 28px 60px rgba(15,23,42,.14); }
.entry-card { width: min(100%, 762px); }
.entry-card { padding-bottom: 70px; }
.card-panel h2 { margin: 0 0 4px; color: var(--heading); font-size: 24px; line-height: 32px; font-weight: 700; }
.muted { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 19px; }
.stage-panel { display: none; }
.stage-panel.is-visible { display: block; animation: panel-in .2s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-8px); } }

form { margin-top: 0; }
.form-item { margin-bottom: 18px; }
.form-item label { min-height: 22px; padding-bottom: 8px; display: block; color: #606266; font-size: 14px; line-height: 22px; }
.required { margin-right: 4px; color: var(--red); }
.input-wrapper { width: 100%; height: 32px; padding: 1px 11px; display: inline-flex; align-items: center; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; transition: box-shadow .2s; }
.input-wrapper:focus-within { box-shadow: 0 0 0 1px var(--blue) inset; }
.input-wrapper input { width: 100%; height: 30px; padding: 0; color: #606266; border: 0; outline: 0; background: transparent; font-size: 14px; }
textarea { width: 100%; min-height: 138px; padding: 10px 11px; color: #606266; border: 0; border-radius: 4px; outline: 0; background: #fff; box-shadow: 0 0 0 1px var(--line) inset; font-size: 14px; line-height: 1.55; resize: vertical; transition: box-shadow .2s; }
textarea:focus { box-shadow: 0 0 0 1px var(--blue) inset; }
.field-error { min-height: 0; margin: 5px 0 0; color: var(--red); font-size: 12px; line-height: 18px; }
.field-error:empty { display: none; }
.action-item { margin-bottom: 0; }
.element-button { min-height: 40px; padding: 12px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #606266; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-family: Arial, sans-serif; font-size: 14px; line-height: 14px; font-weight: 500; transition: transform .2s, box-shadow .2s, color .2s, border .2s; }
.element-button.primary { color: #fff; border-color: var(--blue); background: var(--blue); }
.element-button.primary:hover:not(:disabled) { border-color: #79bbff; background: #79bbff; }
.element-button:not(.primary):hover:not(:disabled) { color: var(--blue); border-color: #c6e2ff; background: #ecf5ff; }
.element-button:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(59,130,246,.18); }
.element-button svg { width: 14px; height: 14px; }

.product-head { margin-bottom: 20px; padding-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #ebeef5; }
.product-head > div { display: flex; align-items: center; gap: 13px; }
.product-kind { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 12px; background: var(--blue); font-size: 12px; font-weight: 700; }
.product-label { color: #909399; font-size: 12px; }
.product-head h2 { font-size: 21px; line-height: 27px; }
.product-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.plain-button, .help-link { padding: 4px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue); border: 0; background: transparent; font-size: 13px; }
.plain-button svg { width: 14px; height: 14px; }
.label-row { display: flex; align-items: flex-start; justify-content: space-between; }
.help-link { font-size: 12px; }
.sensitive-note { margin-top: 7px; display: flex; align-items: flex-start; gap: 6px; color: #909399; font-size: 12px; line-height: 18px; }
.sensitive-note svg { width: 14px; height: 14px; margin-top: 2px; flex: 0 0 auto; color: var(--amber); }
.service-banner { margin: 0 0 18px; padding: 11px 13px; display: flex; align-items: flex-start; gap: 9px; color: #337ecc; border: 1px solid #a0cfff; border-radius: 4px; background: #ecf5ff; }
.service-banner.is-normal { color: #529b2e; border-color: #b3e19d; background: #f0f9eb; }
.service-banner.is-warning { color: #b88230; border-color: #f3d19e; background: #fdf6ec; }
.service-banner.is-danger { color: #c45656; border-color: #fab6b6; background: #fef0f0; }
.service-banner > svg { width: 16px; height: 16px; flex: 0 0 auto; }
.service-banner div { display: grid; gap: 2px; }
.service-banner strong { font-size: 13px; }
.service-banner span { font-size: 12px; line-height: 17px; }
.force-row { margin: 2px 0 18px; display: flex !important; align-items: center; gap: 8px; color: #606266; font-size: 13px !important; cursor: pointer; }
.force-row input { width: 14px; height: 14px; accent-color: var(--blue); }
.form-actions { margin-top: 4px; display: flex; justify-content: space-between; gap: 10px; }
.form-actions.centered { justify-content: center; margin-top: 22px; }

.result-panel { text-align: center; }
.result-symbol { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; color: var(--green); border-radius: 50%; background: #f0f9eb; }
.result-symbol.is-warning { color: var(--amber); background: #fdf6ec; }
.result-symbol.is-danger { color: var(--red); background: #fef0f0; }
.result-symbol svg { width: 27px; height: 27px; }
.result-kicker { color: #909399; font-size: 12px; }
.result-panel h2 { margin-top: 4px; }
.result-panel > p { margin: 6px 0 20px; color: var(--muted); font-size: 14px; }
.result-details { margin: 0; display: grid; grid-template-columns: repeat(2,1fr); text-align: left; border: 1px solid #ebeef5; border-radius: 4px; overflow: hidden; }
.result-details div { padding: 12px 14px; border-bottom: 1px solid #ebeef5; }
.result-details div:nth-child(odd) { border-right: 1px solid #ebeef5; }
.result-details div:nth-last-child(-n+2) { border-bottom: 0; }
.result-details dt { margin-bottom: 4px; color: #909399; font-size: 11px; }
.result-details dd { margin: 0; color: #303133; overflow-wrap: anywhere; font-size: 13px; font-weight: 500; }

.support-stack { width: 100%; display: flex; justify-content: center; }
.support-card { width: min(100%,762px); }
.support-heading { display: flex; justify-content: space-between; gap: 20px; }
.segmented-control { height: 42px; margin: 20px 0; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; border-radius: 6px; background: #f2f3f5; }
.segmented-control button { border: 0; border-radius: 4px; color: #606266; background: transparent; font-size: 13px; }
.segmented-control button.is-active { color: var(--blue); background: #fff; box-shadow: 0 1px 4px rgba(15,23,42,.1); font-weight: 600; }
.support-result { margin-top: 18px; padding: 13px; color: #529b2e; border: 1px solid #b3e19d; border-radius: 4px; background: #f0f9eb; font-size: 13px; line-height: 1.6; }
.support-result.is-error { color: #c45656; border-color: #fab6b6; background: #fef0f0; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; padding: 18px; display: grid; place-items: center; background: rgba(15,23,42,.48); backdrop-filter: blur(3px); }
.confirm-modal { width: min(440px,100%); padding: 28px; position: relative; border-radius: 12px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.2); }
.modal-close { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; display: grid; place-items: center; color: #909399; border: 0; background: transparent; }
.modal-close svg { width: 17px; height: 17px; }
.modal-symbol { width: 44px; height: 44px; margin-bottom: 14px; display: grid; place-items: center; color: var(--amber); border-radius: 10px; background: #fdf6ec; }
.modal-symbol svg { width: 21px; height: 21px; }
.confirm-modal h2 { margin: 0; color: var(--heading); font-size: 20px; }
.confirm-modal > p { margin: 8px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.confirm-account { padding: 11px 12px; color: #606266; border: 1px solid #ebeef5; border-radius: 4px; background: #fafafa; overflow-wrap: anywhere; font-size: 12px; }
.confirm-check { margin-top: 14px; display: grid; grid-template-columns: 16px 1fr; gap: 8px; color: #606266; font-size: 12px; line-height: 1.5; cursor: pointer; }
.confirm-check input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--blue); }
.modal-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; }
.toast-region { position: fixed; z-index: 120; top: 20px; left: 50%; display: grid; gap: 8px; transform: translateX(-50%); }
.toast { width: min(380px,calc(100vw - 32px)); padding: 12px 15px; color: #606266; border: 1px solid #e1f3d8; border-radius: 4px; background: #f0f9eb; box-shadow: 0 8px 24px rgba(15,23,42,.12); font-size: 13px; }
.toast.is-error { color: #c45656; border-color: #fde2e2; background: #fef0f0; }
.is-loading { pointer-events: none; }
.is-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 520px) {
  .topbar { min-height: 56px; padding: 12px 14px 0; }
  .locale-shell { top: 12px; right: 14px; }
  .locale-label { display: none; }
  .page-head { padding-top: 30px; }
  .page-head h1 { font-size: 28px; line-height: 38px; }
  .page-head p { font-size: 14px; line-height: 1.55; }
  main { padding: 14px 14px 28px; }
  .card-panel { padding: 44px; }
  .entry-card { padding-bottom: 62px; }
  .product-head, .support-heading { align-items: flex-start; flex-direction: column; }
  .product-head .plain-button, .support-heading .plain-button { align-self: flex-start; padding-left: 0; }
  .result-details { grid-template-columns: 1fr; }
  .result-details div, .result-details div:nth-child(odd), .result-details div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid #ebeef5; }
  .result-details div:last-child { border-bottom: 0; }
}

@media (max-width: 380px) {
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .element-button { width: 100%; }
  .segmented-control { height: auto; grid-template-columns: 1fr; }
  .segmented-control button { min-height: 36px; }
}

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