/* ==========================================================================
   米托管 MI HOSTING — 小米运动账号托管 单页
   设计参考：OneTool 浅灰紫后台（白侧栏 / 白导航 / 淡灰内容底 / 紫色主按钮）
   说明：纯静态页面，无任何远程字体与图标依赖，图标均为内联 SVG。
   ========================================================================== */

/* ---------- 1. 设计变量 ---------- */
:root {
    --brand: #6d5bd0;
    --brand-strong: #5b48c0;
    --brand-soft: #efecfb;
    --brand-soft-2: #f6f4fe;
    --brand-line: #ddd6f7;

    --bg: #f6f6fa;
    --surface: #ffffff;
    --surface-alt: #fbfbfe;

    --text: #1f2334;
    --text-2: #4b5169;
    --text-3: #7d839b;
    --text-4: #9aa0b5;

    --line: #ebecf2;
    --line-strong: #e0e2ec;

    --blue: #3b82f6;
    --blue-soft: #eaf2ff;
    --green: #12a06a;
    --green-soft: #e6f7f0;
    --amber: #b7791f;
    --amber-soft: #fdf6e6;
    --red: #d6423b;
    --red-soft: #fdeceb;
    --grey-soft: #f1f2f6;

    --radius-lg: 14px;
    --radius: 10px;
    --radius-sm: 8px;

    --shadow-sm: 0 1px 2px rgba(31, 35, 52, 0.04);
    --shadow: 0 4px 16px rgba(31, 35, 52, 0.06);
    --shadow-lg: 0 18px 48px rgba(31, 35, 52, 0.14);

    --sidebar-w: 224px;
    --header-h: 60px;

    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
        "Noto Sans CJK SC", "WenQuanYi Micro Hei", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* ---------- 2. 基础重置 ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

button {
    font: inherit;
    color: inherit;
}

img, svg {
    display: block;
}

svg {
    flex: 0 0 auto;
}

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

/* ---------- 3. 布局骨架 ---------- */
.app {
    display: flex;
    min-height: 100vh;
}

/* 侧栏 */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-w);
    background: var(--surface);
    border-right: 1px solid var(--line);
}

.sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: var(--header-h);
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: linear-gradient(135deg, #7b68e0, #5b48c0);
    color: #fff;
    box-shadow: 0 3px 10px rgba(109, 91, 208, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-text strong {
    font-size: 15px;
    letter-spacing: 0.2px;
}

.brand-text span {
    font-size: 11px;
    color: var(--text-3);
}

.sidebar__nav {
    flex: 1 1 auto;
    padding: 14px 12px;
    overflow-y: auto;
}

.nav-label {
    padding: 4px 10px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--text-4);
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 4px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-2);
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.nav-item:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.nav-item svg {
    color: var(--text-3);
    transition: color 0.16s ease;
}

.nav-item[aria-current="page"] {
    background: var(--brand-soft);
    border-color: var(--brand-line);
    color: var(--brand-strong);
    font-weight: 600;
}

.nav-item[aria-current="page"] svg {
    color: var(--brand);
}

.nav-badge {
    margin-left: auto;
    min-width: 20px;
    padding: 0 6px;
    border-radius: 20px;
    background: var(--grey-soft);
    color: var(--text-3);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.nav-item[aria-current="page"] .nav-badge {
    background: #fff;
    color: var(--brand-strong);
}

.sidebar__foot {
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid var(--line);
}

.side-note {
    padding: 10px 12px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--brand-soft-2);
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.5;
}

.side-note strong {
    display: block;
    margin-bottom: 2px;
    color: var(--brand-strong);
    font-size: 12.5px;
}

/* 主区域 */
.main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    height: var(--header-h);
    padding: 0 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.topbar__toggle {
    display: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-2);
    cursor: pointer;
}

.topbar__title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.topbar__title strong {
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__title span {
    font-size: 11.5px;
    color: var(--text-3);
}

.topbar__spacer {
    flex: 1 1 auto;
}

/* 顶栏右侧：登录 / 注册入口 */
.topbar__auth {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.topbar__auth .btn {
    white-space: nowrap;
}

.topbar__auth .btn svg {
    width: 14px;
    height: 14px;
}

.content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 26px 40px;
}

/* ---------- 4. 通用组件 ---------- */
.view[hidden] {
    display: none;
}

.page-head {
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.page-head p {
    margin-top: 4px;
    color: var(--text-3);
    font-size: 13px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: 18px;
}

.card__body {
    padding: 20px 22px;
}

.card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.card__head h2,
.card__head h3 {
    font-size: 14.5px;
    font-weight: 600;
}

.card__head .card__sub {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 400;
}

.card__head .spacer {
    flex: 1 1 auto;
}

.icon-tile {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--blue);
}

.icon-tile.is-purple {
    background: var(--brand-soft);
    color: var(--brand);
}

.icon-tile.is-green {
    background: var(--green-soft);
    color: var(--green);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease,
        box-shadow 0.16s ease, transform 0.06s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 8px rgba(109, 91, 208, 0.28);
}

.btn--primary:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    color: #fff;
}

.btn--ghost {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--text-2);
}

.btn--ghost:hover {
    border-color: var(--brand-line);
    color: var(--brand-strong);
    background: var(--brand-soft-2);
}

.btn--soft {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand-strong);
}

.btn--soft:hover {
    background: #e7e2fb;
    color: var(--brand-strong);
}

.btn--danger-ghost {
    background: #fff;
    border-color: #f1cfcc;
    color: var(--red);
}

.btn--danger-ghost:hover {
    background: var(--red-soft);
    border-color: #e9b6b2;
    color: var(--red);
}

.btn--sm {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12.5px;
}

.btn--lg {
    min-height: 44px;
    padding: 0 22px;
    font-size: 14.5px;
}

.btn--block {
    width: 100%;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 22px;
    padding: 0 8px;
    border-radius: 6px;
    background: var(--grey-soft);
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.tag .dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.tag--green {
    background: var(--green-soft);
    color: var(--green);
}

.tag--amber {
    background: var(--amber-soft);
    color: var(--amber);
}

.tag--red {
    background: var(--red-soft);
    color: var(--red);
}

.tag--purple {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.tag--blue {
    background: var(--blue-soft);
    color: #2563c9;
}

/* 提示条（轻量，不强警示） */
.notice {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--brand-line);
    border-radius: var(--radius);
    background: var(--brand-soft-2);
    color: var(--text-2);
    font-size: 12.5px;
    line-height: 1.6;
}

.notice svg {
    margin-top: 2px;
    color: var(--brand);
    width: 16px;
    height: 16px;
}

.notice strong {
    color: var(--brand-strong);
}

.notice--blue {
    border-color: #d7e5fd;
    background: #f4f8ff;
}

.notice--blue svg {
    color: var(--blue);
}

.notice--plain {
    border-color: var(--line);
    background: var(--surface-alt);
}

.notice--plain svg {
    color: var(--text-3);
}

.notice svg {
    flex: 0 0 auto;
}

/* 「存储不可用」提示内部的文本容器：允许换行收起，避免长句撑破卡片 */
.storage-notice-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow-wrap: anywhere;
}

/* ---------- 5. 说明卡 hero ---------- */
.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px 24px 22px;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 20px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 11.5px;
    font-weight: 600;
}

.hero h1 {
    margin: 12px 0 8px;
    font-size: 23px;
    font-weight: 600;
    letter-spacing: 0.2px;
    line-height: 1.35;
}

.hero p {
    color: var(--text-2);
    font-size: 13.5px;
    max-width: 52ch;
}

.hero__points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    color: var(--text-2);
    font-size: 12px;
}

.pill svg {
    width: 14px;
    height: 14px;
    color: var(--blue);
}

.hero__panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    padding: 14px 16px;
}

.hero__panel h2 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-4);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.spec-list {
    display: grid;
    gap: 8px;
}

.spec-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--text-2);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line-strong);
}

.spec-list li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.spec-list b {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ---------- 6. 套餐卡 ---------- */
.plans-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 12px;
}

.plans-head h2 {
    font-size: 15px;
    font-weight: 600;
}

.plans-head span {
    font-size: 12.5px;
    color: var(--text-3);
}

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

.plan {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 18px 18px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.plan:hover {
    border-color: var(--brand-line);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.plan[data-selected="true"] {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.12), var(--shadow);
}

.plan__flag {
    position: absolute;
    top: -1px;
    right: 14px;
    padding: 2px 8px;
    border-radius: 0 0 7px 7px;
    background: var(--brand);
    color: #fff;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.plan__top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.plan__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--blue-soft);
    color: var(--blue);
}

.plan[data-plan="quarter"] .plan__icon {
    background: var(--brand-soft);
    color: var(--brand);
}

.plan[data-plan="half"] .plan__icon {
    background: var(--green-soft);
    color: var(--green);
}

.plan[data-plan="year"] .plan__icon {
    background: var(--amber-soft);
    color: var(--amber);
}

.plan__name {
    font-size: 14.5px;
    font-weight: 600;
}

.plan__days {
    font-size: 11.5px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
}

.plan__price {
    display: flex;
    align-items: baseline;
    gap: 3px;
    margin-bottom: 2px;
}

.plan__price .cur {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
}

.plan__price .num {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.plan__unit {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 14px;
}

.plan__perks {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line-strong);
}

.plan__perks li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.45;
}

.plan__perks svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--green);
}

.plan__pick {
    margin-top: auto;
}

/* 选中态：由脚本切换 btn--soft + aria-checked，这里补强视觉 */
.plan__pick[aria-checked="true"],
.plan__pick.btn--soft {
    background: var(--brand-soft);
    border-color: transparent;
    color: var(--brand-strong);
    font-weight: 600;
}

.plan__pick[aria-checked="true"]:hover,
.plan__pick.btn--soft:hover {
    background: #e7e2fb;
    color: var(--brand-strong);
}

/* ---------- 7. 表单 ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field--full {
    grid-column: 1 / -1;
}

.field > label,
.field-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
}

.field .req {
    color: var(--red);
    margin-left: 2px;
}

.field .opt {
    margin-left: 6px;
    font-weight: 400;
    color: var(--text-4);
    font-size: 11.5px;
}

.input,
.textarea,
.select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 13.5px;
    line-height: 1.5;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input::placeholder,
.textarea::placeholder {
    color: var(--text-4);
}

.input:hover,
.textarea:hover {
    border-color: #d3d6e2;
}

.input:focus,
.textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.14);
}

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

.input[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: var(--red);
    background: #fffafa;
}

.input[aria-invalid="true"]:focus,
.textarea[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 3px rgba(214, 66, 59, 0.14);
}

.field__hint {
    font-size: 11.5px;
    color: var(--text-3);
}

.field__error {
    display: none;
    font-size: 11.5px;
    color: var(--red);
}

.field__error.is-visible {
    display: block;
}

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12.5px;
    color: var(--text-2);
    cursor: pointer;
    line-height: 1.55;
}

.checkline input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.checkline a {
    text-decoration: underline;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.form-actions .hint {
    flex: 1 1 200px;
    font-size: 12px;
    color: var(--text-3);
}

/* 金额汇总行 */
.summary-rows {
    display: grid;
    gap: 9px;
    font-size: 13px;
}

.summary-rows > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-2);
}

.summary-rows b {
    color: var(--text);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.summary-rows .total {
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px dashed var(--line-strong);
    font-size: 14px;
}

.summary-rows .total b {
    font-size: 20px;
    color: var(--brand-strong);
    letter-spacing: -0.3px;
}

/* ---------- 8. 表格 / 列表 ---------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.8px;
    min-width: 620px;
}

table.data th,
table.data td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    white-space: nowrap;
}

table.data th {
    background: var(--surface-alt);
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

table.data td {
    color: var(--text-2);
}

table.data tbody tr:last-child td {
    border-bottom: 0;
}

table.data tbody tr:hover td {
    background: #fcfcff;
}

table.data .mono {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text);
}

table.data .num {
    font-variant-numeric: tabular-nums;
    color: var(--text);
    font-weight: 600;
}

.row-actions {
    display: flex;
    gap: 8px;
}

.empty {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 12.8px;
}

.empty__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    color: var(--text-4);
}

/* 托管账号列表 */
.host-list {
    display: grid;
    gap: 12px;
}

.host-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 15px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.host-item__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
}

.host-item__main {
    min-width: 0;
}

.host-item__title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.host-item__meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.host-item__meta span {
    font-variant-numeric: tabular-nums;
}

.host-item__side {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

/* ---------- 9. 订单详情 / 确认单 ---------- */
.confirm-box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.confirm-box__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--brand-soft-2);
    border-bottom: 1px solid var(--brand-line);
}

.confirm-box__head .icon-tile {
    background: #fff;
}

.confirm-box__head h3 {
    font-size: 14px;
    font-weight: 600;
}

.confirm-box__head p {
    font-size: 12px;
    color: var(--text-3);
}

.confirm-box__head .spacer {
    flex: 1 1 auto;
}

dl.kv {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    margin: 0;
    padding: 4px 0;
}

dl.kv dt,
dl.kv dd {
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

dl.kv dt {
    color: var(--text-3);
}

dl.kv dd {
    margin: 0;
    color: var(--text);
    word-break: break-word;
}

dl.kv > dt:last-of-type,
dl.kv > dd:last-of-type {
    border-bottom: 0;
}

dl.kv .num {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* 支付方式 */
.pay-methods {
    display: grid;
    gap: 10px;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.pay-method:hover {
    border-color: var(--brand-line);
    background: var(--brand-soft-2);
}

.pay-method input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand);
}

.pay-method:has(input:checked),
.pay-method.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft-2);
    box-shadow: 0 0 0 3px rgba(109, 91, 208, 0.1);
}

.pay-method.is-selected .pay-method__main strong {
    color: var(--brand-strong);
}

.pay-method__icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--grey-soft);
    color: var(--text-2);
}

.pay-method[data-method="alipay"] .pay-method__icon {
    background: var(--blue-soft);
    color: #2f7bff;
}

.pay-method[data-method="wechat"] .pay-method__icon {
    background: var(--green-soft);
    color: var(--green);
}

.pay-method[data-method="wallet"] .pay-method__icon {
    background: var(--brand-soft);
    color: var(--brand);
}

.pay-method__main {
    flex: 1 1 auto;
    min-width: 0;
}

.pay-method__main strong {
    display: block;
    font-size: 13.2px;
    font-weight: 600;
}

.pay-method__main span {
    font-size: 11.5px;
    color: var(--text-3);
}

.sim-pay-panel {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px dashed var(--brand-line);
    border-radius: var(--radius);
    background: var(--brand-soft-2);
}

.sim-pay-panel p {
    font-size: 12.5px;
    color: var(--text-2);
}

.sim-pay-panel .form-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top-color: var(--brand-line);
}

/* 成功结果 */
.result {
    text-align: center;
    padding: 30px 22px 26px;
}

.result__mark {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: var(--green-soft);
    color: var(--green);
    box-shadow: 0 0 0 8px rgba(18, 160, 106, 0.08);
}

.result h2 {
    font-size: 19px;
    font-weight: 600;
}

.result > p {
    margin-top: 6px;
    color: var(--text-3);
    font-size: 13px;
}

.result__meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 18px;
    margin-top: 14px;
    padding: 9px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface-alt);
    font-size: 12px;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}

.result__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

/* ---------- 10. 状态步骤条 ---------- */
.steps {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    width: fit-content;
    max-width: 100%;
}

.step {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-4);
    white-space: nowrap;
}

.step__dot {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-4);
}

.step[data-state="done"] {
    color: var(--text-2);
}

.step[data-state="done"] .step__dot {
    background: var(--green-soft);
    border-color: var(--green-soft);
    color: var(--green);
}

.step[data-state="current"] {
    color: var(--brand-strong);
    font-weight: 600;
}

.step[data-state="current"] .step__dot {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.step__line {
    width: 18px;
    height: 1px;
    background: var(--line-strong);
}

/* ---------- 11. 帮助 / 日志 ---------- */
.faq {
    display: grid;
    gap: 10px;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.faq details[open] {
    border-color: var(--brand-line);
    background: var(--brand-soft-2);
}

.faq summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 13.2px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary svg {
    color: var(--text-3);
    transition: transform 0.18s ease;
}

.faq details[open] summary svg:first-child {
    color: var(--brand);
}

.faq summary .chev {
    margin-left: auto;
}

.faq details[open] .chev {
    transform: rotate(180deg);
    color: var(--brand);
}

.faq .faq-body {
    padding: 0 14px 14px 42px;
    font-size: 12.8px;
    color: var(--text-2);
    line-height: 1.7;
}

.faq .faq-body p + p {
    margin-top: 6px;
}

.faq .faq-body ul {
    display: grid;
    gap: 4px;
    margin: 6px 0;
    padding-left: 0;
}

.faq .faq-body li {
    position: relative;
    padding-left: 13px;
}

.faq .faq-body li::before {
    content: "";
    position: absolute;
    left: 1px;
    top: 9px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand);
    opacity: 0.6;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.help-card {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
}

.help-card h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.help-card h3 svg {
    color: var(--blue);
    width: 16px;
    height: 16px;
}

.help-card p,
.help-card li {
    font-size: 12.5px;
    color: var(--text-2);
    line-height: 1.65;
}

.help-card ul {
    display: grid;
    gap: 3px;
}

.log-list {
    display: grid;
}

.log-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12.8px;
}

.log-item:last-child {
    border-bottom: 0;
}

.log-item__icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--surface-alt);
    color: var(--text-3);
}

.log-item__title {
    color: var(--text);
    font-weight: 500;
}

.log-item__desc {
    font-size: 11.5px;
    color: var(--text-3);
}

.log-item__time {
    font-size: 11.5px;
    color: var(--text-4);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.log-item.is-ok .log-item__icon {
    background: var(--green-soft);
    color: var(--green);
}

.log-item.is-warn .log-item__icon {
    background: var(--amber-soft);
    color: var(--amber);
}

.log-item.is-brand .log-item__icon {
    background: var(--brand-soft);
    color: var(--brand);
}

/* ---------- 12. 页脚 ---------- */
.site-footer {
    margin-top: 28px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 22px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 26px 18px;
}

.site-footer h3 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-4);
    margin-bottom: 10px;
}

.site-footer__about p {
    font-size: 12.5px;
    color: var(--text-3);
    line-height: 1.7;
    max-width: 46ch;
}

.site-footer__about .brand-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
}

.site-footer ul {
    display: grid;
    gap: 7px;
    font-size: 12.5px;
    color: var(--text-3);
}

.site-footer ul li {
    line-height: 1.55;
}

.site-footer .link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-2);
    font-size: 12.5px;
    cursor: pointer;
    text-align: left;
}

.site-footer .link-btn:hover {
    color: var(--brand-strong);
    text-decoration: underline;
}

.site-footer__bar {
    border-top: 1px solid var(--line);
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 26px 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-4);
}

.site-footer__bar span {
    line-height: 1.6;
}

/* ---------- 13. 弹窗 ---------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(27, 29, 44, 0.42);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.overlay.is-open {
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 460px;
    max-height: min(86vh, 720px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateY(8px) scale(0.99);
    transition: transform 0.18s ease;
}

.overlay.is-open .modal {
    transform: none;
}

.modal--wide {
    max-width: 560px;
}

.modal__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--line);
}

.modal__head h2 {
    font-size: 15.5px;
    font-weight: 600;
}

.modal__head p {
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-3);
}

.modal__head .icon-tile {
    margin-top: 1px;
}

.modal__head .spacer {
    flex: 1 1 auto;
}

.modal__close {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-3);
    cursor: pointer;
}

.modal__close:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.modal__body {
    padding: 16px 20px;
    overflow-y: auto;
    font-size: 13px;
    color: var(--text-2);
}

.modal__body > p + p,
.modal__body > p + .modal__list {
    margin-top: 10px;
}

.modal__list {
    display: grid;
    gap: 7px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-alt);
    font-size: 12.5px;
}

.modal__list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.modal__list svg {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--brand);
}

.modal__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface-alt);
}

.modal__field-error {
    margin-top: 8px;
    font-size: 12px;
    color: var(--red);
    display: none;
}

.modal__field-error.is-visible {
    display: block;
}

/* ---------- 13.1 登录 / 注册弹窗 ---------- */
.auth-tabs {
    display: flex;
    gap: 4px;
    padding: 3px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
}

.auth-tab {
    flex: 1 1 0;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-3);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.auth-tab:hover {
    color: var(--text-2);
}

.auth-tab[aria-selected="true"] {
    background: #fff;
    color: var(--brand-strong);
    box-shadow: var(--shadow-sm);
}

.auth-tab:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
}

.auth-form {
    display: grid;
    gap: 12px;
}

.auth-form .field__error {
    margin-top: 2px;
}

.auth-error {
    min-height: 0;
    margin-top: 0;
}

.auth-submit {
    margin-top: 2px;
}

/* 移动端遮罩 */
.scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(27, 29, 44, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

/* ---------- 14. Toast ---------- */
.toast-wrap {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
    width: calc(100% - 32px);
    max-width: 420px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-lg);
    font-size: 12.8px;
    color: var(--text);
    animation: toast-in 0.2s ease;
}

.toast svg {
    width: 16px;
    height: 16px;
    color: var(--brand);
}

.toast.is-ok svg {
    color: var(--green);
}

.toast.is-warn svg {
    color: var(--amber);
}

.toast.is-out {
    animation: toast-out 0.22s ease forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(6px);
    }
}

/* ---------- 15. 响应式 ---------- */
@media (max-width: 1080px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

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

@media (max-width: 860px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.22s ease;
        box-shadow: var(--shadow-lg);
        width: 264px;
    }

    body.nav-open .sidebar {
        transform: none;
    }

    body.nav-open .scrim {
        opacity: 1;
        pointer-events: auto;
    }

    .main {
        margin-left: 0;
    }

    .topbar {
        padding: 0 14px;
        gap: 10px;
    }

    .topbar__toggle {
        display: grid;
    }

    .content {
        padding: 18px 14px 32px;
    }

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

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

    .site-footer__inner {
        grid-template-columns: minmax(0, 1fr);
        padding: 22px 14px 14px;
        gap: 18px;
    }

    .site-footer__bar {
        padding: 12px 14px 20px;
    }
}

@media (max-width: 560px) {
    :root {
        --header-h: 56px;
    }

    .plans-grid {
        gap: 10px;
    }

    .plan {
        padding: 14px 14px 13px;
    }

    .plan__price .num {
        font-size: 24px;
    }

    .plan__perks li {
        font-size: 12px;
    }

    .hero {
        padding: 18px 16px;
        gap: 16px;
    }

    .hero h1 {
        font-size: 19px;
    }

    .card__body {
        padding: 16px;
    }

    .card__head {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .host-item {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 10px;
    }

    .host-item__side {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .host-item__side .btn {
        flex: 1 1 auto;
    }

    dl.kv {
        grid-template-columns: minmax(0, 1fr);
    }

    dl.kv dt {
        padding-bottom: 0;
        border-bottom: 0;
        font-size: 11.5px;
    }

    dl.kv dd {
        padding-top: 2px;
    }

    .steps {
        width: 100%;
        gap: 5px;
        padding: 9px 11px;
        border-radius: 12px;
    }

    .step {
        font-size: 11px;
    }

    .step__line {
        width: 8px;
    }

    .overlay {
        align-items: flex-end;
        padding: 0;
    }

    .modal,
    .modal--wide {
        max-width: none;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }

    .modal__foot .btn {
        flex: 1 1 auto;
    }

    .result {
        padding: 24px 16px 22px;
    }

    .form-actions .btn--primary {
        flex: 1 1 auto;
    }

    .log-item {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .log-item__time {
        grid-column: 2 / -1;
    }
}

@media (max-width: 390px) {
    .topbar__auth {
        gap: 6px;
    }

    .topbar__auth .btn {
        padding-left: 9px;
        padding-right: 9px;
    }

    .topbar__auth .btn svg {
        display: none;
    }

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

    .plan {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
    }

    .plan__top,
    .plan__price,
    .plan__unit,
    .plan__perks {
        grid-column: 1;
    }

    .plan__perks {
        margin-bottom: 10px;
    }

    .plan__pick {
        grid-column: 2;
        grid-row: 1 / span 3;
        align-self: center;
        margin-top: 0;
    }

    .plan__flag {
        position: static;
        grid-column: 1 / -1;
        justify-self: start;
        margin: -4px 0 10px;
        border-radius: 6px;
    }

    .host-item__icon {
        width: 34px;
        height: 34px;
    }

    .plan__price .num {
        font-size: 26px;
    }
}

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

/* 打印 / 无 JS 兜底提示 */
.noscript-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--amber-soft);
    border-radius: var(--radius);
    background: var(--amber-soft);
    color: var(--amber);
    font-size: 12.5px;
}
