:root {
  --ink: #152536;
  --muted: #607386;
  --paper: #f7fbfe;
  --paper-deep: #eef6fb;
  --surface: rgba(255, 255, 255, 0.82);
  --white: #ffffff;
  --line: #d8e6f0;
  --line-strong: #c4d9e8;
  --blue-950: #12385c;
  --blue-800: #226394;
  --blue-600: #4b8db8;
  --blue-100: #e8f2fa;
  --danger: #b42318;
  --success: #18764b;
  --rail: 236px;
  --shadow: 0 16px 34px rgba(31, 95, 145, 0.1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgba(75, 141, 184, 0.13), transparent 28rem),
    linear-gradient(rgba(31, 95, 145, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 145, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 48%, var(--paper-deep) 100%);
  background-size: 100% 100%, 32px 32px, 32px 32px, 100% 100%;
  color: var(--ink);
  font-family:
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans CJK SC",
    Arial,
    sans-serif;
  line-height: 1.68;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a,
button,
input,
textarea,
select,
label,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
[role="button"] {
  touch-action: manipulation;
}

.side-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.5rem;
  width: var(--rail);
  padding: 1.4rem 1.2rem;
  border-right: 1px solid rgba(216, 230, 240, 0.86);
  background: rgba(247, 251, 254, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: 18px 0 44px rgba(18, 56, 92, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  width: 168px;
  height: auto;
}

.side-nav {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding-top: 1rem;
}

.side-nav a {
  position: relative;
  padding: 0.62rem 0.65rem 0.62rem 1rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.96rem;
  font-weight: 700;
  transition:
    color 180ms ease,
    background-color 180ms ease,
    transform 180ms ease,
    font-size 180ms ease;
}

.side-nav a::before {
  position: absolute;
  top: 50%;
  left: 0.34rem;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--blue-800);
  content: "";
  transform: translateY(-50%);
  transition: height 180ms ease;
}

.side-nav a:focus-visible {
  background: rgba(232, 242, 250, 0.82);
  color: var(--blue-950);
  outline: none;
}

.side-nav a.is-active {
  background: rgba(232, 242, 250, 0.92);
  color: var(--blue-950);
  font-size: 1.06rem;
  font-weight: 950;
  transform: translateX(3px);
}

.side-nav a.is-active::before {
  height: 1.45rem;
}

.language-switch {
  display: flex;
  width: max-content;
  padding: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.language-switch button {
  min-width: 48px;
  padding: 0.34rem 0.58rem;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.language-switch button[aria-pressed="true"] {
  background: var(--blue-800);
  color: var(--white);
}

.page-shell,
.site-footer {
  margin-left: var(--rail);
}

.section-band,
.section-narrow,
.hero {
  width: min(1120px, calc(100% - 3rem));
  margin-inline: auto;
}

.section-band,
.section-narrow {
  position: relative;
  padding: clamp(4.4rem, 8vw, 7rem) 0;
  scroll-margin-top: 2rem;
}

.section-narrow {
  max-width: 960px;
}

.hero {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 100vh;
  padding: clamp(4rem, 7vw, 6rem) 0;
  scroll-margin-top: 2rem;
}

.hero::before {
  position: absolute;
  inset: 14% auto auto -2rem;
  width: 7rem;
  height: 18rem;
  border-left: 4px solid rgba(34, 99, 148, 0.24);
  border-top: 1px solid rgba(34, 99, 148, 0.16);
  content: "";
}

.hero-copy {
  min-width: 0;
  max-width: 900px;
  padding-left: 1.2rem;
  border-left: 4px solid rgba(34, 99, 148, 0.92);
}

.hero h1 {
  max-width: 100%;
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(2.8rem, 5.4vw, 4.8rem);
  line-height: 0.98;
  overflow-wrap: normal;
  word-break: keep-all;
  text-wrap: balance;
}

.hero-lede {
  max-width: 760px;
  margin: 1.1rem 0 0;
  color: #31475a;
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.74rem 1.06rem;
  border: 1px solid var(--blue-800);
  border-radius: 6px;
  font-weight: 850;
  line-height: 1.2;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(31, 95, 145, 0.18);
  outline: none;
}

.button.primary {
  background: var(--blue-800);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.7);
  color: var(--blue-950);
}

.button.small {
  min-height: 38px;
  padding: 0.54rem 0.86rem;
  font-size: 0.92rem;
}

.button:disabled {
  border-color: var(--line);
  background: #edf3f7;
  color: #8a9aab;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: clamp(2.2rem, 4.2vw, 3.2rem);
}

.service-card,
.history-card,
.download-item,
.contact-card {
  min-width: 0;
  border: 1px solid rgba(196, 217, 232, 0.9);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(31, 95, 145, 0.08);
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 1.05rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 252, 255, 0.86)),
    var(--white);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.service-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-800), rgba(75, 141, 184, 0.16));
  content: "";
}

.service-card span,
.section-kicker,
.download-type {
  margin: 0;
  color: var(--blue-800);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.service-card h2 {
  margin: 0.58rem 0 0.45rem;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.25;
}

.service-card p,
.section-heading p,
.download-item p,
.support p,
.contact-note,
.submit-note {
  color: var(--muted);
}

.service-card p,
.download-item p {
  margin: 0;
  overflow-wrap: anywhere;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: 1.7rem;
}

.section-heading h2,
.quote-copy h2,
.downloads h2,
.support h2,
.contact h2 {
  margin: 0.3rem 0 0;
  color: var(--blue-950);
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  line-height: 1.14;
}

.section-heading > p {
  max-width: 450px;
  margin: 0;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

.history,
.downloads,
.support,
.contact {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: clamp(1.2rem, 4vw, 4rem);
}

.history {
  border-block: 1px solid rgba(196, 217, 232, 0.72);
  background:
    linear-gradient(180deg, rgba(245, 250, 253, 0.82), rgba(235, 246, 252, 0.66)),
    rgba(247, 251, 254, 0.9);
}

.downloads {
  border-top: 1px solid rgba(196, 217, 232, 0.72);
  background: rgba(255, 255, 255, 0.58);
}

.support {
  border-block: 1px solid rgba(196, 217, 232, 0.72);
  background:
    linear-gradient(135deg, rgba(232, 242, 250, 0.88), rgba(255, 255, 255, 0.66)),
    var(--paper);
}

.contact {
  border-top: 1px solid rgba(196, 217, 232, 0.72);
  background: rgba(251, 253, 255, 0.82);
}

.history > .section-heading,
.history > .history-carousel,
.support > .support-layout {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.downloads > .section-heading,
.downloads > .download-list,
.contact > .section-kicker,
.contact > h2,
.contact > .contact-grid {
  width: min(960px, 100%);
  margin-inline: auto;
}

.history-grid {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.65rem 0.35rem 1.6rem;
  scroll-padding-inline: 0.35rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.history-grid::-webkit-scrollbar {
  display: none;
}

.history-carousel {
  position: relative;
  padding-inline: clamp(1.3rem, 3vw, 2.4rem);
}

.history-card {
  --float-offset: 0px;
  flex: 0 0 clamp(330px, 38vw, 430px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.92);
  scroll-snap-align: start;
  transform: translateY(var(--float-offset));
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease,
    transform 160ms ease;
}

.history-card:nth-child(3n + 2) {
  --float-offset: 8px;
}

.history-card:nth-child(4n) {
  --float-offset: 4px;
}

.history-media {
  display: grid;
  gap: 2px;
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid rgba(216, 230, 240, 0.8);
  background: rgba(216, 230, 240, 0.72);
}

.history-media[data-image-count="1"] {
  grid-template-columns: 1fr;
}

.history-media[data-image-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-media[data-image-count="3"] {
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.history-media[data-image-count="3"] img:first-child {
  grid-row: 1 / 3;
}

.history-media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  background: var(--white);
}

.history-card-body {
  display: grid;
  gap: 0.35rem;
  min-height: 6.4rem;
  padding: 0.95rem 1rem 1.05rem;
}

.history-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.3;
}

.history-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.91rem;
  line-height: 1.55;
}

.history-arrow {
  position: absolute;
  top: 0.65rem;
  bottom: 1.6rem;
  z-index: 5;
  display: grid;
  place-items: center;
  width: clamp(4rem, 6vw, 5.4rem);
  min-height: 4.6rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font: 800 3.5rem/1 Arial, sans-serif;
  opacity: 0.78;
  touch-action: manipulation;
  text-shadow:
    0 5px 18px rgba(13, 50, 82, 0.42),
    0 1px 2px rgba(10, 33, 56, 0.48);
  user-select: none;
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 160ms ease;
}

.history-arrow:focus-visible {
  border-radius: 8px;
  outline: 2px solid rgba(75, 141, 184, 0.85);
  outline-offset: 2px;
}

.history-arrow-prev {
  left: 0;
}

.history-arrow-next {
  right: 0;
}

.quote {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1rem, 4vw, 4rem);
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, rgba(18, 56, 92, 0.96), rgba(31, 95, 145, 0.92)),
    var(--blue-950);
  background-size: 26px 26px, 26px 26px, 100% 100%, 100% 100%;
  color: var(--white);
}

.quote-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(420px, 1fr);
  gap: clamp(1.4rem, 4vw, 3rem);
  width: min(1120px, 100%);
  margin-inline: auto;
}

.quote .section-kicker,
.quote-copy h2 {
  color: var(--white);
}

.quote-copy p {
  color: rgba(255, 255, 255, 0.84);
}

.privacy-note {
  margin-top: 1.4rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.privacy-note h3 {
  margin: 0 0 0.45rem;
  color: var(--white);
  font-size: 1.08rem;
}

.privacy-note p {
  margin: 0;
}

.quote-form {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 22px 54px rgba(8, 24, 39, 0.22);
}

.field {
  display: grid;
  gap: 0.36rem;
}

.field > span,
.requirements-head > span {
  color: var(--blue-950);
  font-size: 0.92rem;
  font-weight: 900;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
  color: var(--ink);
  padding: 0.72rem 0.78rem;
}

.field textarea {
  min-height: 118px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(77, 143, 189, 0.17);
  outline: none;
}

.field small {
  color: var(--muted);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.requirements-field {
  gap: 0.7rem;
}

.requirements-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.text-button {
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--blue-950);
  font-weight: 850;
}

.text-button:focus-visible {
  border-color: var(--blue-600);
  background: var(--blue-100);
  outline: none;
}

.requirement-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem;
  margin-top: 0.56rem;
}

.requirement-label {
  min-width: 4.6rem;
  padding-top: 0.72rem;
  color: var(--blue-950);
  font-size: 0.9rem;
  font-weight: 900;
}

.remove-requirement {
  min-width: 2.5rem;
  min-height: 2.76rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: var(--muted);
  font-weight: 900;
}

.remove-requirement:focus-visible {
  border-color: var(--danger);
  color: var(--danger);
  outline: none;
}

.submit-note {
  margin: 0;
  font-size: 0.96rem;
}

.quote-submit {
  width: 100%;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 850;
}

.form-status[data-state="error"] {
  color: var(--danger);
}

.form-status[data-state="success"] {
  color: var(--success);
}

.admin-panel {
  width: 100%;
  max-width: none;
  padding-inline: clamp(1rem, 4vw, 4rem);
  background: rgba(247, 251, 254, 0.9);
}

.admin-panel[hidden] {
  display: none;
}

.admin-shell {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.65rem;
}

.admin-status,
.admin-empty {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-weight: 850;
}

.admin-status[data-state="error"] {
  color: var(--danger);
}

.admin-status[data-state="success"] {
  color: var(--success);
}

.admin-dashboard {
  display: grid;
  gap: 1rem;
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid rgba(196, 217, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.admin-dashboard[hidden] {
  display: none;
}

.admin-dashboard-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-dashboard h3,
.admin-subtitle {
  margin: 0;
  color: var(--blue-950);
  font-size: 1.05rem;
  line-height: 1.35;
}

.admin-dashboard p {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.admin-subtitle {
  margin-top: 1.35rem;
}

.analytics-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--blue-950);
  font-weight: 950;
  white-space: nowrap;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.analytics-card {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid rgba(196, 217, 232, 0.8);
  border-radius: 8px;
  background: rgba(244, 250, 254, 0.72);
}

.analytics-label,
.analytics-card span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.analytics-card strong {
  color: var(--ink);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1;
}

.analytics-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.analytics-weekday {
  color: var(--blue-800);
  font-size: 0.78rem;
  font-weight: 950;
  text-align: center;
}

.analytics-day {
  display: grid;
  align-content: start;
  gap: 0.18rem;
  min-height: 5.2rem;
  padding: 0.5rem;
  border: 1px solid rgba(196, 217, 232, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 0.75rem;
  overflow: hidden;
}

.analytics-day strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.analytics-day.has-visits {
  border-color: rgba(42, 111, 166, 0.36);
  background: rgba(226, 243, 254, 0.78);
}

.analytics-day.is-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(42, 111, 166, 0.36);
}

.analytics-day.is-empty {
  min-height: 5.2rem;
  border-color: transparent;
  background: transparent;
}

.analytics-recent {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.25rem;
}

.analytics-recent h3 {
  margin: 0;
  color: var(--blue-950);
  font-size: 0.95rem;
}

.analytics-recent p {
  margin: 0;
}

.analytics-recent-list {
  display: grid;
  gap: 0.35rem;
}

.analytics-recent-list div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto auto;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(196, 217, 232, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.88rem;
}

.admin-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

.admin-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid rgba(196, 217, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.admin-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1.08rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.admin-badge {
  flex: 0 0 auto;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-800);
  font-size: 0.78rem;
  font-weight: 900;
}

.admin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}

.admin-fields div {
  min-width: 0;
}

.admin-fields dt,
.admin-requirements strong {
  color: var(--blue-950);
  font-size: 0.82rem;
  font-weight: 950;
}

.admin-fields dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-requirements {
  display: grid;
  gap: 0.35rem;
}

.admin-requirements ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.admin-requirements li {
  margin-top: 0.18rem;
  overflow-wrap: anywhere;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.admin-danger {
  border-color: rgba(180, 35, 24, 0.35);
  color: var(--danger);
}

.admin-danger:focus-visible {
  border-color: var(--danger);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}

.download-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.download-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
}

.download-item.muted {
  opacity: 0.78;
}

.download-item h3,
.contact-card h3 {
  margin: 0 0 0.45rem;
  color: var(--ink);
  font-size: 1.1rem;
}

.download-meta {
  display: grid;
  justify-items: end;
  gap: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

.support-layout {
  display: grid;
  gap: 1.35rem;
}

.support-heading {
  max-width: 760px;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.payment-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid rgba(196, 217, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 30px rgba(18, 56, 92, 0.08);
}

.payment-card-head {
  display: flex;
  min-height: 3.2rem;
  align-items: center;
  gap: 0.72rem;
}

.payment-card h3 {
  margin: 0.08rem 0 0;
  color: var(--ink);
  font-size: 1.04rem;
  line-height: 1.18;
}

.payment-type {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.2;
}

.payment-mark {
  display: grid;
  flex: 0 0 2.75rem;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 8px;
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 950;
  text-align: center;
}

.payment-mark-wechat {
  background: #09bb62;
}

.payment-mark-alipay {
  background: #1677ff;
}

.payment-mark-paypal {
  background: #0070ba;
  font-size: 1.12rem;
}

.payment-mark-chain {
  background: #243142;
  font-size: 0.7rem;
}

.payment-qr-frame {
  display: grid;
  place-items: center;
  width: 100%;
  margin-top: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  aspect-ratio: 1;
}

.payment-qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-qr-wechat {
  background: #09bb62;
}

.payment-qr-alipay {
  background: #1677ff;
}

.payment-note {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.payment-card-chain {
  grid-column: span 2;
}

.chain-gate,
.chain-confirm,
.chain-details {
  margin-top: 0.95rem;
}

.chain-gate,
.chain-confirm {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border-radius: 8px;
}

.chain-gate {
  border: 1px solid rgba(180, 35, 24, 0.24);
  background: rgba(180, 35, 24, 0.06);
}

.chain-gate p,
.chain-confirm p {
  margin: 0;
}

.chain-gate p {
  color: #7a271a;
  font-weight: 800;
}

.chain-confirm {
  border: 1px solid rgba(180, 35, 24, 0.34);
  background: #fff7ed;
}

.chain-confirm strong {
  color: var(--danger);
}

.chain-confirm p {
  color: #7a271a;
}

.chain-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chain-confirm-button {
  border-color: var(--danger);
  background: var(--danger);
}

.chain-details[hidden],
.chain-confirm[hidden],
.chain-gate[hidden] {
  display: none;
}

.payment-qr-chain {
  max-width: 360px;
  margin-inline: auto;
  background: #243142;
  aspect-ratio: 1035 / 1446;
}

.wallet-fields {
  display: grid;
  gap: 0.55rem;
  margin: 0.95rem 0 0;
}

.wallet-fields div {
  display: grid;
  grid-template-columns: 5.6rem minmax(0, 1fr);
  gap: 0.65rem;
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
}

.wallet-fields dt {
  color: var(--muted);
  font-weight: 850;
}

.wallet-fields dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.wallet-fields code {
  overflow-wrap: anywhere;
  color: var(--blue-950);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
}

.copy-address {
  margin-top: 0.85rem;
}

.copy-status {
  min-height: 1.35rem;
  margin: 0.55rem 0 0;
  color: var(--success);
  font-size: 0.9rem;
  font-weight: 850;
}

.copy-status[data-state="error"] {
  color: var(--danger);
}

.contact-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.4rem;
  margin-top: 1.5rem;
}

.contact-card {
  padding: 1.2rem;
}

.contact-card p {
  margin: 0.25rem 0;
  word-break: break-word;
}

.contact-card a {
  color: var(--blue-800);
  font-weight: 900;
}

.contact-note {
  max-width: 600px;
  margin: 0;
  align-self: center;
  font-size: 1.05rem;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer img {
  width: 180px;
  height: auto;
}

@media (hover: hover) and (pointer: fine) {
  .side-nav a:hover {
    background: rgba(232, 242, 250, 0.82);
    color: var(--blue-950);
  }

  .button:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(31, 95, 145, 0.18);
  }

  .service-card:hover {
    border-color: rgba(75, 141, 184, 0.65);
    box-shadow: 0 18px 38px rgba(31, 95, 145, 0.13);
    transform: translateY(-2px);
  }

  .history-card:hover {
    border-color: rgba(75, 141, 184, 0.6);
    box-shadow: 0 22px 50px rgba(31, 95, 145, 0.18);
    filter: saturate(1.04);
    transform: translateY(calc(var(--float-offset) - 7px));
  }

  .history-arrow:hover {
    color: rgba(255, 255, 255, 0.96);
    opacity: 1;
    transform: scale(1.04);
  }

  .text-button:hover {
    border-color: var(--blue-600);
    background: var(--blue-100);
  }

  .remove-requirement:hover {
    border-color: var(--danger);
    color: var(--danger);
  }

  .admin-danger:hover {
    border-color: var(--danger);
    background: rgba(180, 35, 24, 0.08);
    color: var(--danger);
  }
}

@media (max-width: 1180px) {
  :root {
    --rail: 208px;
  }

  .service-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  :root {
    --rail: 0px;
  }

  .side-rail {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.55rem 0.9rem;
    align-items: start;
    width: 100%;
    padding: 0.8rem;
    border-right: 0;
    border-bottom: 1px solid rgba(216, 230, 240, 0.86);
  }

  .brand img {
    width: 156px;
  }

  .side-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    gap: 0.25rem;
    min-width: 0;
    overflow-x: auto;
    padding-top: 0.25rem;
  }

  .side-nav a {
    flex: 0 0 auto;
    padding: 0.46rem 0.64rem;
    font-size: 0.9rem;
  }

  .side-nav a::before {
    display: none;
  }

  .side-nav a.is-active {
    transform: none;
    font-size: 0.95rem;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
  }

  .page-shell,
  .site-footer {
    margin-left: 0;
  }

  .section-band,
  .section-narrow,
  .hero {
    scroll-margin-top: 8.5rem;
  }

  .hero {
    min-height: auto;
    padding-top: 4.2rem;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-card {
    flex-basis: clamp(300px, 58vw, 390px);
  }

  .quote-layout,
  .support-layout {
    grid-template-columns: 1fr;
  }

  .quote-layout {
    width: min(760px, 100%);
  }

  .analytics-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .payment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-card-chain {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .section-band,
  .section-narrow,
  .hero {
    width: 100%;
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .quote {
    padding: 2rem 0.75rem 2.4rem;
  }

  .quote-layout {
    width: 100%;
    gap: 0.9rem;
  }

  .quote-copy {
    display: contents;
  }

  .quote .section-kicker {
    order: 1;
    margin: 0;
    font-size: 0.78rem;
  }

  .quote-copy h2 {
    order: 2;
    margin: 0;
    font-size: clamp(2rem, 10vw, 2.55rem);
    line-height: 1.08;
  }

  .quote-copy > p {
    display: none;
  }

  .quote-form {
    order: 3;
    width: 100%;
    padding: 0.95rem;
  }

  .privacy-note {
    order: 4;
    margin-top: 0;
    padding: 0.78rem;
  }

  .privacy-note h3 {
    font-size: 0.98rem;
  }

  .privacy-note p,
  .submit-note {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .hero h1 {
    font-size: clamp(2.15rem, 8.5vw, 2.8rem);
    line-height: 1.02;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .hero::before {
    display: none;
  }

  .hero-copy {
    padding-left: 0.9rem;
  }

  .hero-actions,
  .service-grid,
  .payment-grid,
  .form-row,
  .admin-fields,
  .download-item,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .payment-card-chain {
    grid-column: auto;
  }

  .chain-actions {
    display: grid;
  }

  .wallet-fields div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .history-carousel {
    padding-inline: 1.05rem;
  }

  .history-grid {
    gap: 0.82rem;
  }

  .history-card {
    flex-basis: min(82vw, 340px);
  }

  .history-arrow {
    width: 3.2rem;
    min-height: 3.8rem;
    font-size: 2.6rem;
  }

  .history-arrow:active {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.78;
    transform: none;
  }

  .hero-actions {
    display: grid;
  }

  .button {
    width: 100%;
  }

  .admin-card-head,
  .admin-dashboard-head,
  .admin-toolbar,
  .admin-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-controls {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    text-align: center;
    white-space: normal;
  }

  .analytics-summary {
    grid-template-columns: 1fr 1fr;
  }

  .analytics-calendar {
    gap: 0.22rem;
  }

  .analytics-day,
  .analytics-day.is-empty {
    min-height: 4.45rem;
    padding: 0.38rem;
    font-size: 0.68rem;
  }

  .analytics-recent-list div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .requirement-item {
    grid-template-columns: 1fr auto;
  }

  .requirement-label {
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: 0;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .history-card,
  .history-arrow {
    transition: none;
  }

  .history-card,
  .history-card:nth-child(3n + 2),
  .history-card:nth-child(4n),
  .history-card:hover,
  .history-arrow:hover {
    --float-offset: 0px;
    transform: none;
  }
}
