/* =========================================================================
 * TempDB — light theme, simple
 * ========================================================================= */

:root {
    --bg:           #ffffff;
    --bg-soft:      #fafafa;
    --surface:      #ffffff;
    --surface-soft: #f7f7f8;
    --surface-hover: #f1f1f3;

    --border:        #e6e6ea;
    --border-strong: #d0d0d6;

    --text:        #1a1a1f;
    --text-muted:  #6b6b76;
    --text-soft:   #9b9ba6;

    --accent:        #2563eb;
    --accent-hover:  #1d4ed8;
    --accent-soft:   #eef2ff;

    --success:      #16a34a;
    --success-soft: #f0fdf4;
    --error:        #dc2626;
    --error-soft:   #fef2f2;

    --r-sm: 6px;
    --r-md: 8px;
    --r-lg: 12px;

    --shadow-sm: 0 1px 2px rgba(15, 15, 25, 0.04);
    --shadow:    0 1px 3px rgba(15, 15, 25, 0.06), 0 1px 2px rgba(15, 15, 25, 0.04);

    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-size: 15px; -webkit-text-size-adjust: 100%; }
@media (min-width: 900px) { html { font-size: 17px; } }

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

button { font: inherit; color: inherit; cursor: pointer; }
input  { font: inherit; color: inherit; }
a      { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

.text-muted { color: var(--text-muted); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* layout */
.container {
    width: 100%; max-width: 880px;
    margin: 0 auto; padding: 0 20px;
}

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    position: sticky; top: 0; z-index: 30;
}
.site-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 56px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text); font-weight: 600; font-size: 1rem;
    letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); text-decoration: none; }
.brand-logo {
    width: 28px; height: 28px;
    border-radius: 6px;
    object-fit: contain;
    flex: 0 0 28px;
    display: block;
}
.brand-name { line-height: 1; }

/* =========================================================================
 * Language switcher (header right)
 * ========================================================================= */
.lang-switcher {
    position: relative;
    line-height: 1;
}
.lang-switcher summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
}
.lang-switcher summary::-webkit-details-marker { display: none; }

.lang-current {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.lang-current:hover {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
}
.lang-globe { display: inline-flex; }
.lang-caret { font-size: 0.7rem; }

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    min-width: 160px;
    margin: 0;
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
    list-style: none;
    z-index: 50;
}
.lang-item {
    display: block;
    padding: 8px 10px;
    color: var(--text);
    font-size: 0.9rem;
    border-radius: var(--r-sm);
    text-decoration: none;
}
.lang-item:hover {
    background: var(--surface-soft);
    text-decoration: none;
}
.lang-item.is-active {
    color: var(--accent);
    background: var(--accent-soft);
    font-weight: 500;
}

@media (max-width: 480px) {
    .lang-menu {
        min-width: 140px;
        max-height: 60vh;
        overflow-y: auto;
    }
    .lang-current .lang-name {
        max-width: 80px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* legal language notice */
.legal-langnotice {
    margin: 12px 0 0;
    padding: 8px 12px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.site-main {
    flex: 1;
    display: flex; flex-direction: column; gap: 32px;
    padding: 48px 0 80px;
}

.site-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    padding: 14px 0 16px;
}
.site-footer-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.site-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 16px;
}
.site-footer .site-footer-links a {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
}
.site-footer .site-footer-links a:hover {
    color: var(--text);
    text-decoration: underline;
}
.site-footer-mail {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    padding: 0;
}
.site-footer-mail:hover {
    border-color: var(--accent);
    color: var(--accent);
    text-decoration: none;
}
.site-footer-copy {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 0.72rem;
}
.site-footer .brand { color: var(--text); }
.site-footer .brand:hover { color: var(--text); }

/* =========================================================================
 * Legal pages (Terms / Privacy / Refund)
 * ========================================================================= */
.legal { padding-top: 16px; padding-bottom: 32px; max-width: 720px; }
.legal-header { margin-bottom: 32px; }
.legal-eyebrow {
    color: var(--accent); font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.12em;
    margin: 0 0 8px;
}
.legal-title {
    margin: 0; font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 700; letter-spacing: -0.02em;
}
.legal-meta {
    margin: 8px 0 0;
    color: var(--text-muted); font-size: 0.85rem;
}
.legal-content {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.7;
}
.legal-content p { margin: 0 0 14px; }
.legal-content h2 {
    margin: 28px 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.legal-content ul, .legal-content ol {
    margin: 0 0 14px;
    padding-left: 22px;
}
.legal-content li { margin-bottom: 6px; }
.legal-content a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-disclaimer {
    margin-top: 32px;
    padding: 12px 14px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text-muted);
    font-size: 0.85rem;
}
.legal-disclaimer strong { color: var(--text); }

/* hero */
.hero {
    text-align: center;
    padding: 32px 20px 12px;
}
.hero-title {
    font-size: clamp(1.8rem, 3.6vw, 2.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 12px;
    color: var(--text);
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}

/* card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) { .card { padding: 32px; } }

.card-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; flex-wrap: wrap;
    margin-bottom: 20px;
}
.card-title {
    margin: 0; font-size: 1.1rem; font-weight: 600;
    letter-spacing: -0.01em;
}
.card-sub { margin: 4px 0 0; color: var(--text-muted); font-size: 0.9rem; }

/* form fields */
.form { display: flex; flex-direction: column; gap: 24px; }

.field { display: flex; flex-direction: column; gap: 10px; }
.field-label {
    font-size: 0.9rem; font-weight: 500;
    color: var(--text);
}
.field-label-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 12px;
}
.field-aux-hint {
    font-size: 0.875rem; color: var(--text-muted);
    white-space: nowrap;
}
.field-aux-link {
    font-size: 0.875rem; color: var(--accent);
    text-decoration: none;
    white-space: nowrap;
}
.field-aux-link:hover { text-decoration: underline; }

.selection-summary {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.9rem;
    line-height: 1.45;
}
.selection-summary[hidden] { display: none !important; }
.selection-summary__label {
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}
.selection-summary__text {
    color: var(--text);
    font-weight: 600;
}

.flow-steps {
    display: flex; flex-wrap: wrap; gap: 8px 16px;
    margin: 0; padding: 0; list-style: none;
    font-size: 0.85rem; color: var(--text-muted);
}
.flow-steps__item {
    display: flex; align-items: center; gap: 6px;
}
.flow-steps__item::before {
    content: counter(flow-step);
    counter-increment: flow-step;
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.35rem; height: 1.35rem;
    border-radius: 50%;
    border: 1px solid var(--border);
    font-size: 0.78rem; font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
}
.flow-steps { counter-reset: flow-step; }
.flow-steps__item.is-current {
    color: var(--text); font-weight: 500;
}
.flow-steps__item.is-current::before {
    border-color: var(--accent); color: var(--accent);
}
.flow-steps__item.is-done {
    color: var(--text-muted);
}
.flow-steps__item.is-done::before {
    border-color: var(--accent); background: var(--accent); color: #fff;
}

/* option grids */
.db-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 760px) {
    .db-grid { grid-template-columns: repeat(2, 1fr); }
}

.plan-grid {
    display: grid; grid-template-columns: 1fr; gap: 8px;
}
@media (min-width: 600px) { .plan-grid { grid-template-columns: repeat(3, 1fr); } }

.option-card {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
    padding: 12px 14px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}
.option-card:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}
.option-card.is-selected,
.option-card[aria-checked="true"] {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 1px var(--accent) inset, 0 4px 12px -4px rgba(37, 99, 235, 0.18);
    transform: translateY(-2px);
}
.option-card--plan.is-selected .option-price,
.option-card--plan[aria-checked="true"] .option-price {
    color: var(--accent);
}
.option-card { transition: transform 120ms ease, border-color 120ms ease, background 120ms ease, box-shadow 120ms ease; }
.option-name { font-weight: 500; font-size: 0.92rem; }
.option-sub  { color: var(--text-muted); font-size: 0.875rem; }

/* =========================================================================
 * Database brand-coloured cards
 * ========================================================================= */
.db-card {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr;
    grid-template-areas: "logo text";
    gap: 10px;
    padding: 12px 12px 12px 16px;
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    overflow: hidden;
    min-width: 0;
    transition: transform 140ms ease,
                border-color 140ms ease,
                box-shadow 140ms ease,
                background 140ms ease;
}
.db-card:hover {
    transform: translateY(-2px);
    border-color: var(--brand-color, var(--border-strong));
    box-shadow: var(--shadow);
}
.db-card:hover .db-stripe { width: 6px; }

.db-stripe {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--brand-color, transparent);
    transition: width 140ms ease;
}

.db-logo {
    grid-area: logo;
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--brand-soft, var(--surface-soft));
    color: var(--brand-color, var(--text));
    font-weight: 700; font-size: 0.9rem;
    border: 1px solid var(--brand-border, var(--border));
}

.db-text {
    grid-area: text;
    display: flex; flex-direction: column; gap: 2px;
    min-width: 0;
}
.db-text .option-name {
    font-weight: 600; font-size: 0.88rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-text .option-sub {
    color: var(--text-muted); font-size: 0.8125rem; line-height: 1.35;
}

.db-check {
    position: absolute; top: 6px; right: 6px;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-color, var(--accent));
    color: #fff;
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 160ms ease, transform 160ms ease;
}

.db-card.is-selected,
.db-card[aria-checked="true"] {
    border-color: var(--brand-color);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.db-card.is-selected .db-stripe,
.db-card[aria-checked="true"] .db-stripe { width: 6px; }
.db-card.is-selected .db-check,
.db-card[aria-checked="true"] .db-check {
    opacity: 1; transform: scale(1);
}
.db-card.is-selected .db-logo,
.db-card[aria-checked="true"] .db-logo {
    background: var(--brand-color);
    color: #fff;
    border-color: var(--brand-color);
}

/* per-brand palette */
.db-card[data-brand="redis"] {
    --brand-color: #dc2626;
    --brand-soft:  #fef2f2;
    --brand-border:#fecaca;
    --brand-glow:  rgba(220, 38, 38, 0.12);
}
.db-card[data-brand="mongodb"] {
    --brand-color: #16a34a;
    --brand-soft:  #f0fdf4;
    --brand-border:#bbf7d0;
    --brand-glow:  rgba(22, 163, 74, 0.12);
}
.db-card[data-brand="mysql57"] {
    --brand-color: #0284c7;
    --brand-soft:  #f0f9ff;
    --brand-border:#bae6fd;
    --brand-glow:  rgba(2, 132, 199, 0.12);
}
.db-card[data-brand="mysql84"] {
    --brand-color: #0e7490;
    --brand-soft:  #ecfeff;
    --brand-border:#a5f3fc;
    --brand-glow:  rgba(14, 116, 144, 0.12);
}
.db-card[data-brand="postgresql"] {
    --brand-color: #4f46e5;
    --brand-soft:  #eef2ff;
    --brand-border:#c7d2fe;
    --brand-glow:  rgba(79, 70, 229, 0.14);
}

.option-card--plan { padding: 14px 16px; gap: 4px; }
.option-price {
    font-size: 1.25rem; font-weight: 700;
    margin: 4px 0 2px;
    color: var(--text);
}
.option-card--recommended { border-color: var(--border-strong); }
.option-badge {
    position: absolute; top: 8px; right: 10px;
    padding: 2px 7px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.68rem; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase;
}

/* code input + button */
.code-row {
    display: grid; grid-template-columns: 1fr; gap: 8px;
}
@media (min-width: 600px) {
    .code-row { grid-template-columns: 1fr auto; }
}

.text-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-mono);
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.text-input::placeholder { color: var(--text-soft); font-family: var(--font-sans); }
.text-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn-primary {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 11px 22px;
    background: var(--accent);
    color: #fff;
    border: 1px solid var(--accent);
    border-radius: var(--r-md);
    font-size: 0.95rem; font-weight: 500;
    transition: background 120ms ease, border-color 120ms ease;
    min-width: 120px;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    position: relative;
    display: inline-flex; align-items: center;
    padding: 8px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.88rem;
    transition: border-color 120ms ease, background 120ms ease;
}
.btn-secondary:hover {
    border-color: var(--border-strong);
    background: var(--surface-soft);
}

.btn-primary.is-loading .btn-label { opacity: 0; }
.btn-spinner {
    position: absolute; left: 50%; top: 50%;
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 连接信息区复制按钮：多语言文案不换行、不被 flex 挤压 */
#copy-btn.btn-secondary {
    flex-shrink: 0;
    justify-content: center;
    white-space: nowrap;
    min-width: min(100%, 9.5rem);
}
#copy-btn .copy-label {
    white-space: nowrap;
}
/* 反馈时保留「全部复制」占位宽度，避免按钮塌缩成竖排 */
#copy-btn .copy-label.copy-label--hidden {
    visibility: hidden;
}

.copy-feedback[hidden] {
    display: none !important;
}
.copy-feedback {
    position: absolute; left: 0; right: 0; top: 0; bottom: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 0 10px;
    background: var(--surface);
    color: var(--success); font-weight: 500;
    font-size: inherit;
    line-height: 1.2;
    white-space: nowrap;
    border-radius: var(--r-md);
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
}
.copy-feedback.is-visible {
    opacity: 1;
    transform: scale(1);
}
.copy-feedback.is-error { color: #b91c1c; }

#copy-btn.is-copy-active {
    border-color: #86efac;
    background: var(--success-soft);
}

/* alerts */
.alert {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-soft);
    font-size: 0.9rem;
}
.alert-message { margin: 0; }
.alert-meta {
    margin: 4px 0 0;
    font-family: var(--font-mono); font-size: 0.78rem;
    color: var(--text-muted); word-break: break-all;
}
.alert-meta span + span { margin-left: 14px; }
.alert-error   { background: var(--error-soft);   border-color: #fecaca; color: #991b1b; }
.alert-success { background: var(--success-soft); border-color: #bbf7d0; color: #166534; }

/* connection key/value grid */
.kv-grid {
    margin: 0; padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
}
.kv-row {
    display: grid; grid-template-columns: 140px 1fr;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
}
.kv-row:last-child { border-bottom: none; }
.kv-row dt {
    color: var(--text-muted); font-size: 0.82rem; font-weight: 500;
    margin: 0;
}
.kv-row dd {
    margin: 0;
    color: var(--text);
    font-family: var(--font-mono); font-size: 0.88rem;
    word-break: break-all;
}
.kv-row--full dd code {
    display: block; padding: 10px 12px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-family: var(--font-mono); font-size: 0.84rem;
    word-break: break-all; color: var(--text);
}

/* how-it-works */
.section-title {
    font-size: 1.15rem; font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}
.how-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 16px;
}
.how-item {
    display: grid; grid-template-columns: 28px 1fr;
    gap: 14px; align-items: flex-start;
}
.how-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-muted);
    font-size: 0.85rem; font-weight: 600;
}
.how-title { margin: 0; font-size: 0.98rem; font-weight: 600; }
.how-desc  { margin: 4px 0 0; color: var(--text-muted); font-size: 0.92rem; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================================
 * Mobile / tablet
 * ========================================================================= */

/* iOS 点击高亮统一禁掉，由各自的 :active / hover 反馈接管 */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* iOS 防止 input < 16px 触发自动缩放 */
@media (max-width: 760px) {
    .text-input { font-size: 16px; padding: 12px 14px; }
}

/* ≤ 760px：平板 / 大屏手机 */
@media (max-width: 760px) {
    .container { padding: 0 16px; }
    .site-main { padding: 24px 0 64px; gap: 24px; }
    .site-header-inner { height: 52px; }

    .hero { padding: 24px 16px 8px; }
    .hero-title { font-size: clamp(1.55rem, 6vw, 2.1rem); margin-bottom: 10px; }
    .hero-subtitle { font-size: 0.92rem; }

    .card { padding: 18px; border-radius: 10px; }
    .card-header { gap: 12px; }

    .form { gap: 20px; }
    .field { gap: 8px; }

    /* 数据库：3 列（5 张卡，最后一张孤儿在右下） */
    .db-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .db-card {
        grid-template-columns: 28px 1fr;
        padding: 10px 10px 10px 14px;
        gap: 8px;
    }
    .db-logo { width: 28px; height: 28px; font-size: 0.82rem; }
    .db-stripe { width: 3px; }
    .db-card:hover .db-stripe,
    .db-card.is-selected .db-stripe { width: 4px; }
    .db-text .option-name { font-size: 0.84rem; }
    .db-text .option-sub  { font-size: 0.8rem; }

    /* 套餐：保持 3 列方便对比价格，紧凑 */
    .plan-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .option-card--plan { padding: 12px; }
    .option-name { font-size: 0.86rem; }
    .option-price { font-size: 1.1rem; margin: 2px 0; }
    .option-sub { font-size: 0.8rem; }
    .option-badge { font-size: 0.6rem; padding: 1px 5px; top: 6px; right: 6px; }

    /* 兑换码 + 激活按钮：堆叠并填满 */
    .btn-primary { width: 100%; padding: 13px 22px; min-height: 44px; min-width: 0; }
    .field-label-row { flex-wrap: wrap; gap: 4px 12px; }

    /* 连接信息卡 */
    .card-header { flex-direction: column; align-items: stretch; }
    .btn-secondary { width: 100%; justify-content: center; min-height: 40px; padding: 10px 14px; }
    #copy-btn.btn-secondary { min-width: 100%; }
    .kv-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }
    .kv-row dt { font-size: 0.78rem; }
    .kv-row dd { font-size: 0.86rem; }

    /* how-it-works */
    .how-item { grid-template-columns: 24px 1fr; gap: 12px; }
    .how-num  { width: 24px; height: 24px; font-size: 0.78rem; }
}

/* ≤ 480px：手机竖屏 */
@media (max-width: 480px) {
    .site-main { padding: 16px 0 56px; gap: 20px; }
    .hero { padding: 16px 16px 4px; }

    /* 数据库：2 列（5 张 → 2+2+1，孤儿落到第三行左侧） */
    .db-grid { grid-template-columns: repeat(2, 1fr); }
    .db-card { padding: 12px 12px 12px 16px; grid-template-columns: 32px 1fr; }
    .db-logo { width: 32px; height: 32px; font-size: 0.9rem; }
    .db-text .option-name { font-size: 0.92rem; }
    .db-text .option-sub  { font-size: 0.85rem; }

    /* 套餐：1 列堆叠，价格清晰 */
    .plan-grid { grid-template-columns: 1fr; gap: 8px; }
    .option-card--plan {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        padding: 14px 16px;
        column-gap: 12px;
    }
    .option-card--plan .option-name  { flex: 1 1 60%; font-size: 0.95rem; }
    .option-card--plan .option-price { flex: 0 0 auto; font-size: 1.2rem; margin: 0; }
    .option-card--plan .option-sub   { flex: 1 1 100%; font-size: 0.85rem; }
    .option-badge { position: static; align-self: flex-start; margin-bottom: 4px; }

    /* 顶部 brand 单独居中 */
}

