:root {
  --fg: #1d2433; --muted: #5d6676; --line: #e3e7ee; --bg: #ffffff; --soft: #f5f7fb;
  --accent: #2f6fde; --accent-dark: #1f56b5; --ok: #1d7a46; --bad: #c0392b; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--fg); background: var(--bg); line-height: 1.65; font-size: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: .92em;
  background: var(--soft); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 1.6rem 0 1rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.2rem 0 .4rem; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); font-size: .92rem; }
.small { font-size: .85rem; }
.offscreen { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

/* header and footer */
.top { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 5; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--fg); font-size: 1.08rem; }
.brand:hover { text-decoration: none; }
.brand em { font-style: normal; font-size: .8rem; color: var(--muted); }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { color: var(--fg); padding: 6px 10px; border-radius: 8px; }
nav a:hover, nav a.active { background: var(--soft); text-decoration: none; }
nav a.lang { color: var(--accent); }
.foot { border-top: 1px solid var(--line); margin-top: 3rem; padding: 1.4rem 0 2rem; color: var(--muted); font-size: .88rem; }
.foot p { margin: .3rem 0; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }

/* home */
.hero { text-align: center; padding: 2.5rem 0 1rem; }
.hero h1 { font-size: 2.4rem; margin: .6rem 0 .3rem; }
.hero-icon { display: block; margin: 0 auto; }
.lead { font-size: 1.2rem; color: var(--muted); margin: 0 0 .4rem; }
.platforms { letter-spacing: .02em; color: var(--muted); }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; }
.card h3 { margin-top: 0; }
.card p { margin: .3rem 0; }
.features .card p { color: var(--muted); font-size: .95rem; }
.price { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.amount { font-size: 1.6rem; font-weight: 700; color: var(--fg); }
.amount.small { font-size: 1.2rem; }
.price .btn { margin-top: 10px; }
.notice { background: var(--soft); border-radius: var(--radius); padding: 12px 16px; color: var(--muted); font-size: .92rem; }
ul.ticks { padding-left: 1.2rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--soft); font-weight: 600; }
.compare td:not(:first-child), .compare th:not(:first-child) { text-align: center; width: 70px; }
.table { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* buttons and forms */
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--fg); border-radius: 8px;
  padding: 9px 18px; font: inherit; cursor: pointer; line-height: 1.3; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--bad); border-color: #f0c4be; }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.link { border: 0; background: none; color: var(--muted); padding: 6px 0; }
.btn:disabled { opacity: .6; cursor: wait; }
button.copy { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 10px; font: inherit; font-size: .85rem; cursor: pointer; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px 20px; margin: 1.2rem 0; }
.field { display: block; margin: .8rem 0; }
.field span { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 4px; }
input, select { font: inherit; }
.field input, .field select, .search input, .actions input {
  width: 100%; max-width: 460px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus, select:focus { outline: 2px solid #b8cff5; border-color: var(--accent); }
.choices { margin: .4rem 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: #f3f7fe; }
.choice input { margin-top: 5px; }
.choice-body { display: flex; flex-direction: column; }
.choice-body .amount { font-size: 1.25rem; }
.choice.small { display: inline-flex; align-items: center; padding: 8px 14px; margin: 0 8px 8px 0; }
.choice.small .choice-body { flex-direction: row; gap: 8px; }
.choice.small input { margin-top: 0; }
.choice.disabled { opacity: .55; cursor: not-allowed; }
.agree { display: flex; gap: 8px; align-items: flex-start; margin: 1rem 0; }
.agree input { margin-top: 6px; }
.error { color: var(--bad); }
.result { padding: 10px 14px; border-radius: 8px; background: var(--soft); }
.result.ok { color: var(--ok); background: #eef8f2; }
.result.error { color: var(--bad); background: #fdf1ef; }
.status { font-weight: 600; color: var(--accent-dark); }

/* payment panel */
.meta { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 1rem 0; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.qr { display: block; width: 260px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; margin: 10px 0; }
.key { font-size: 1.15rem; }
.key code { font-size: 1.05rem; padding: .3em .6em; }

/* documents */
.doc { max-width: 780px; }
.doc table { margin: .8rem 0; }

/* admin */
.flash { background: #eef8f2; color: var(--ok); padding: 10px 14px; border-radius: 8px; margin-top: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 1.2rem; }
.stats div { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-direction: column; }
.stats strong { font-size: 1.3rem; }
.stats span { color: var(--muted); font-size: .85rem; }
.filters a { margin-right: 12px; }
.filters a.active { font-weight: 700; }
.actions form { display: flex; gap: 6px; align-items: center; margin: 0 0 6px; flex-wrap: wrap; }
.actions input { max-width: 190px; padding: 4px 8px; font-size: .85rem; }
.actions.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 1rem 0; }
.search { display: flex; gap: 8px; margin: 1rem 0; }
.bad { color: var(--bad); font-weight: 600; }
tr.st-pending td:first-child { border-left: 3px solid var(--accent); }

@media (max-width: 640px) {
  h1 { font-size: 1.5rem; }
  .hero h1 { font-size: 1.9rem; }
  .panel { padding: 2px 14px 14px; }
  nav a { padding: 6px 7px; }
  .meta { grid-template-columns: 1fr; }
  .meta dt { margin-top: 6px; }
}
