﻿:root {
  color-scheme: light;
  --ink: #18212f;
  --muted: #667085;
  --line: #d9e1ec;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --cinnabar: #b42318;
  --gold: #b88a2d;
  --jade: #0f766e;
  --blue: #1d4ed8;
  --shadow: 0 18px 50px rgba(24, 33, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 42px;
  color: #ffffff;
  background: rgba(20, 29, 42, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.session-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.text-btn {
  border: 0;
  background: transparent;
  color: #fff4cf;
  cursor: pointer;
  font: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: #a92820;
  color: #fff4cf;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.25;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.top-nav a {
  padding: 8px 0;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #151d2b;
}

.hero-media {
  position: absolute;
  inset: 0;
  background-image: url("/assets/hero-kylin-software-v2.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.48) 48%, rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.04) 38%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(780px, calc(100% - 48px));
  margin-left: max(24px, 8vw);
  padding-top: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  width: min(680px, 100%);
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
}

.primary-btn {
  background: var(--cinnabar);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.primary-btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.primary-btn.dark {
  background: var(--ink);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}

.hero-strip {
  position: absolute;
  z-index: 3;
  left: max(24px, 8vw);
  right: max(24px, 8vw);
  bottom: 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-strip span {
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.82);
  text-align: center;
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
}

.hero-strip span:last-child {
  border-right: 0;
}

.section {
  padding: 78px max(24px, 7vw);
}

.intro-band {
  background: var(--paper);
}

.intro-band .section-head {
  display: block;
  max-width: 920px;
  margin: 0 auto 32px;
  text-align: center;
}

.intro-band .section-head p:last-child {
  max-width: 860px;
  margin: 12px auto 0;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head.compact {
  display: block;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-head p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 16px;
}

.product-shell {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  min-height: 570px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.product-list {
  display: grid;
  align-content: start;
  background: #18212f;
  color: #ffffff;
  border-right: 1px solid var(--line);
}

.product-tab {
  width: 100%;
  min-height: 94px;
  padding: 18px 20px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.product-tab strong,
.product-tab span {
  display: block;
}

.product-tab strong {
  font-size: 17px;
  line-height: 1.3;
}

.product-tab span {
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.45;
}

.product-tab.active {
  background: #ffffff;
  color: var(--ink);
}

.product-tab.active span {
  color: var(--muted);
}

.product-detail {
  display: grid;
  grid-template-rows: auto 1fr;
  padding: 36px;
}

.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 30px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.product-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.product-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--product-color, var(--cinnabar));
}

.product-detail h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.product-detail .summary {
  margin: 18px 0 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.85;
}

.release-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.release-meta span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
}

.product-badge {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--product-color, var(--cinnabar));
}

.product-badge small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.product-badge strong {
  font-size: 19px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 28px;
  margin-top: 28px;
}

.detail-block h4 {
  margin: 0 0 12px;
  font-size: 18px;
}

.detail-block + .detail-block {
  margin-top: 24px;
}

.detail-block p {
  margin: 0;
  color: #475467;
  line-height: 1.8;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.chip {
  padding: 8px 11px;
  border-radius: 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 13px;
}

.license-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.license-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--product-color, var(--cinnabar));
  background: #f8fafc;
  color: #344054;
}

.download-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.order-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(360px, 1fr);
  gap: 20px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.product-cta strong,
.product-cta span {
  display: block;
}

.product-cta strong {
  font-size: 18px;
}

.product-cta span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.order-panel strong,
.order-panel span {
  display: block;
}

.order-panel strong {
  font-size: 18px;
}

.order-panel span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.order-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, 2fr) auto;
  gap: 10px;
  align-items: end;
}

.order-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.order-form input,
.order-form select {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.plan-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.plan-field legend {
  margin-bottom: 6px;
  color: #344054;
  font-size: 12px;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-card {
  min-height: 74px;
  cursor: pointer;
}

.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.plan-card > span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.plan-card input:checked + span {
  border-color: var(--product-color, var(--cinnabar));
  box-shadow: inset 0 0 0 1px var(--product-color, var(--cinnabar));
}

.plan-card strong,
.plan-card em,
.plan-card del,
.plan-card small {
  display: block;
  font-style: normal;
}

.plan-card strong {
  color: var(--ink);
  font-size: 14px;
}

.plan-card em {
  color: var(--product-color, var(--cinnabar));
  font-size: 20px;
  font-weight: 800;
}

.plan-card del,
.plan-card small {
  color: var(--muted);
  font-size: 12px;
}

.my-orders {
  margin-top: 28px;
}

.orders-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.orders-head h3 {
  margin: 0;
  font-size: 28px;
}

.orders-head span {
  color: var(--muted);
}

.orders-list {
  display: grid;
  gap: 12px;
}

.order-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.order-summary-grid span {
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.order-summary-grid strong {
  color: var(--ink);
  font-size: 28px;
}

.center-order-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.center-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.center-order-head h3 {
  margin: 5px 0 0;
  font-size: 20px;
}

.order-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.center-order-meta {
  display: grid;
  grid-template-columns: 1fr 1.7fr 1fr 1fr;
  gap: 10px;
  padding-top: 14px;
}

.center-order-meta span {
  min-width: 0;
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.center-order-meta strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.license-result {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.license-result strong {
  display: block;
  margin-bottom: 8px;
  color: #047857;
}

.license-result code {
  display: block;
  padding: 12px;
  border-radius: 8px;
  background: #18212f;
  color: #fff4cf;
  overflow-wrap: anywhere;
}

.order-item {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.order-item strong,
.order-item span,
.order-item small,
.order-item code {
  display: block;
}

.order-item span,
.order-item small {
  margin-top: 7px;
  color: var(--muted);
}

.order-item code {
  margin-top: 10px;
  padding: 10px;
  border-radius: 8px;
  background: #18212f;
  color: #fff4cf;
  overflow-wrap: anywhere;
}

.order-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: #eef2f7;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.order-status.pending_payment {
  background: #fff7ed;
  color: #c2410c;
}

.order-status.payment_submitted {
  background: #fefce8;
  color: #a16207;
}

.order-status.paid_confirmed {
  background: #eff6ff;
  color: #1d4ed8;
}

.order-status.license_issued {
  background: #ecfdf3;
  color: #047857;
}

.order-status.cancelled {
  background: #f2f4f7;
  color: #667085;
}

.payment-box {
	display: grid;
	grid-template-columns: minmax(312px, max-content) minmax(0, 1fr);
	gap: 14px;
	margin-top: 14px;
	padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.payment-box > div {
	grid-column: 1 / -1;
}

.payment-qr-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(132px, 150px));
	gap: 12px;
	align-content: start;
}

.payment-qr-list figure {
	margin: 0;
}

.payment-qr-list figcaption {
	margin-top: 6px;
	color: var(--muted);
	font-size: 13px;
	text-align: center;
}

.payment-box strong,
.payment-box span {
	display: block;
}

.payment-box span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.payment-qr {
	display: block;
	width: 100%;
	max-width: 150px;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	border: 1px solid var(--line);
	border-radius: 8px;
  background: #ffffff;
}

.payment-proof-form {
  display: grid;
  gap: 10px;
  align-content: start;
}

.payment-proof-form input {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.download-item strong,
.download-item span {
  display: block;
}

.download-item strong {
  font-size: 15px;
}

.download-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.download-panel strong,
.download-panel span {
  display: block;
}

.download-panel strong {
  font-size: 18px;
}

.download-panel span {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.login-panel {
  align-items: flex-start;
}

.login-form {
  display: grid;
  grid-template-columns: 150px 120px auto auto;
  gap: 10px;
  align-items: end;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.login-form input {
  width: 100%;
  height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.auth-modal[hidden] {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 17, 30, 0.58);
}

.auth-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.auth-dialog h2 {
  margin: 4px 0 18px;
  font-size: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.modal-login-form {
  grid-template-columns: 1fr 130px;
}

.modal-login-form label:first-child {
  grid-column: 1 / -1;
}

.modal-login-form .primary-btn {
  min-height: 42px;
}

.ghost-form-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.form-message {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--cinnabar);
  font-size: 13px;
}

.delivery {
  background: #ffffff;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.step {
  min-height: 190px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.step span {
  color: var(--cinnabar);
  font-weight: 800;
}

.step h3 {
  margin: 18px 0 10px;
  font-size: 20px;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  min-height: 44px;
  display: grid;
  place-items: center;
  padding: 10px 24px;
  color: rgba(255, 255, 255, 0.78);
  background: #18212f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.center-body {
  min-height: 100vh;
  background: #eef2f7;
}

.center-header {
  position: sticky;
  background: #18212f;
}

.center-main {
  display: grid;
  gap: 22px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.center-title {
  display: grid;
  gap: 8px;
}

.center-title h1 {
  margin: 0;
  font-size: 36px;
}

.center-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.center-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.center-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.account-panel {
  display: grid;
  gap: 16px;
}

.account-panel h2,
.center-panel h2 {
  margin: 0;
  font-size: 22px;
}

.account-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.account-card span,
.center-empty {
  color: var(--muted);
}

.center-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.center-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 12px;
}

.center-form input,
.center-form select {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
}

.downloads-panel {
  grid-column: 2;
}

.center-download-grid {
  margin-top: 16px;
}

.center-orders-panel {
  margin-top: 2px;
}

.center-login-form {
  grid-template-columns: 1fr;
}

@media (max-width: 0px) {
  .site-header {
    position: relative;
    height: auto;
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 24px;
    background: #18212f;
  }

  .top-nav {
    gap: 16px;
    flex-wrap: wrap;
  }

  .session-badge {
    align-self: flex-start;
  }

  .hero {
    min-height: auto;
    align-items: start;
  }

  .hero-content {
    width: calc(100% - 48px);
    margin: 0 24px;
    padding: 64px 0 26px;
  }

  .hero-strip,
  .section-head,
  .product-shell,
  .product-hero,
  .detail-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero-strip {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    width: calc(100% - 48px);
    margin: 0 24px 24px;
  }

  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-tab {
    min-height: 108px;
  }

  .download-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .product-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .order-panel,
  .order-form {
    grid-template-columns: 1fr;
  }

  .center-main {
    width: min(100% - 32px, 760px);
  }

  .center-grid {
    grid-template-columns: 1fr;
  }

  .downloads-panel {
    grid-column: auto;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .login-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 0px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .brand strong {
    font-size: 14px;
  }

  .brand small {
    font-size: 11px;
  }

  .top-nav {
    width: 100%;
    font-size: 13px;
    gap: 8px;
  }

  .top-nav a {
    padding: 7px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
  }

  .session-badge {
    width: 100%;
    justify-content: space-between;
  }

  .hero-content {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 46px 0 22px;
  }

  .hero h1 {
    font-size: 36px;
    line-height: 1.12;
  }

  .lead {
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-actions {
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .hero-strip {
    grid-template-columns: 1fr 1fr;
    width: calc(100% - 32px);
    margin: 0 16px 18px;
  }

  .hero-strip span:nth-child(2) {
    border-right: 0;
  }

  .section {
    padding: 52px 16px;
  }

  .center-main {
    width: calc(100% - 28px);
    padding-top: 24px;
  }

  .center-title h1 {
    font-size: 30px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .product-list {
    grid-template-columns: 1fr;
  }

  .product-tab {
    min-height: 82px;
    padding: 14px 16px;
  }

  .product-detail {
    padding: 18px;
  }

  .product-detail h3 {
    font-size: 30px;
  }

  .product-badge {
    padding: 18px;
  }

  .chip {
    max-width: 100%;
  }

  .orders-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .order-item {
    padding: 14px;
  }

  .plan-options {
    grid-template-columns: 1fr;
  }

	.payment-box {
		grid-template-columns: 1fr;
	}

	.payment-qr-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.payment-qr {
		max-width: none;
	}

  .login-form {
    grid-template-columns: 1fr;
  }

  .auth-dialog {
    padding: 20px;
  }
}

.portal-body {
  min-height: 100vh;
  background: #eef2f7;
}

.portal-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 24px;
  color: #ffffff;
  background: #18212f;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.portal-brand strong,
.portal-brand small {
  display: block;
}

.portal-brand strong {
  font-size: 18px;
}

.portal-brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.portal-menu {
  display: grid;
  gap: 8px;
}

.portal-menu button,
.portal-back {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

.portal-menu button.active {
  border-color: rgba(233, 196, 106, 0.35);
  background: rgba(233, 196, 106, 0.14);
  color: #ffffff;
}

.portal-menu button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.portal-back {
  margin-top: auto;
  border-color: rgba(255, 255, 255, 0.12);
}

.portal-main {
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
  padding: 28px clamp(18px, 4vw, 44px) 52px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-header h1 {
  margin: 4px 0 0;
  font-size: clamp(28px, 4vw, 42px);
}

.portal-view,
.portal-login-view {
  display: grid;
  gap: 18px;
}

.portal-view[hidden],
.portal-login-view[hidden] {
  display: none;
}

.login-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  align-items: stretch;
}

.login-console {
  grid-template-areas:
    "intro form"
    "caps form";
}

.login-intro,
.login-card,
.login-side,
.login-capabilities,
.portal-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(24, 33, 47, 0.08);
}

.login-intro {
  grid-area: intro;
  min-height: 300px;
  padding: 34px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(24, 33, 47, 0.96), rgba(15, 118, 110, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}

.login-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.login-intro h2 {
  margin: 24px 0 12px;
  font-size: 40px;
}

.login-intro p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.8;
}

.login-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.login-metrics span {
  display: grid;
  gap: 5px;
  min-height: 74px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
}

.login-metrics strong {
  color: #ffffff;
  font-size: 28px;
}

.login-card {
  grid-area: form;
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 32px;
}

.login-card-head h3 {
  margin: 4px 0 0;
  font-size: 28px;
}

.login-card h2,
.portal-panel h2,
.account-settings h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.center-login-form {
  grid-template-columns: 1fr;
}

.center-login-form .primary-btn {
  min-height: 44px;
}

.login-note {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  line-height: 1.7;
}

.login-capabilities {
  grid-area: caps;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.login-capabilities div {
  min-height: 112px;
  padding: 18px;
  background: #ffffff;
}

.login-capabilities strong,
.login-capabilities span {
  display: block;
}

.login-capabilities strong {
  color: var(--ink);
  font-size: 17px;
}

.login-capabilities span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-side {
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 24px;
  color: #ffffff;
  background: #0f766e;
}

.login-side strong,
.login-side span {
  display: block;
}

.login-side span {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.75;
}

.portal-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.portal-stat {
  display: grid;
  gap: 10px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 26px rgba(24, 33, 47, 0.07);
}

.portal-stat span {
  color: var(--muted);
  font-size: 13px;
}

.portal-stat strong {
  font-size: 34px;
  line-height: 1;
}

.portal-panel {
  padding: 22px;
}

.portal-notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 8px;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.08);
  font-weight: 700;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.purchase-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 20px;
  align-items: start;
}

.purchase-form {
  margin-top: 0;
}

.selected-product {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 22px;
  border-radius: 8px;
  color: #ffffff;
  background: #1b2534;
}

.selected-product h2 {
  margin: 0;
  font-size: 26px;
}

.selected-product span,
.selected-product small,
.selected-product li {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.selected-product ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
}

.order-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.order-status {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  font-size: 12px;
  font-weight: 800;
}

.compact-orders .order-item {
  min-height: 0;
}

.account-settings {
  display: grid;
  gap: 16px;
  max-width: 560px;
}

.danger-btn {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(180, 35, 24, 0.26);
  border-radius: 8px;
  background: rgba(180, 35, 24, 0.08);
  color: var(--cinnabar);
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 0px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: sticky;
    z-index: 30;
    height: auto;
    padding: 14px 18px;
  }

  .portal-brand {
    min-height: 42px;
  }

  .portal-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .portal-menu button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .portal-back {
    display: none;
  }

  .login-workspace,
  .purchase-workspace {
    grid-template-columns: 1fr;
  }

  .portal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 0px) {
  .portal-main {
    padding: 20px 14px 38px;
  }

  .portal-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-header h1 {
    font-size: 30px;
  }

  .portal-cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .portal-stat {
    min-height: 96px;
    padding: 14px;
  }

  .portal-stat strong {
    font-size: 28px;
  }

  .portal-panel,
  .login-card,
  .login-side,
  .selected-product {
    padding: 18px;
  }

  .quick-actions,
  .order-title-line {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-proof-form {
    grid-template-columns: 1fr;
  }
}


.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.download-panel .download-actions {
  justify-content: flex-start;
}

.product-badge span,
.selected-product small span {
  display: block;
  margin-top: 6px;
  color: rgba(15, 23, 42, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .download-actions {
    justify-content: flex-start;
  }
}
