/* =========================================================
   StarPay 安装向导
   全站本地资源，不依赖任何外部字体或 CDN
   ========================================================= */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eaf2ff;
    --primary-border: #c3d6f8;
    --ink: #1c2430;
    --text: #5a6474;
    --muted: #69758a;
    --faint: #9aa6b8;
    --border: #e6ebf5;
    --border-strong: #dde6f2;
    --row-border: #eff3fa;
    --panel-head: #ebf2fe;
    --success: #16a34a;
    --success-soft: #e9f8f0;
    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --warning: #c97a0e;
    --warning-soft: #fff8e8;
    --warning-border: #f3e2be;
    --radius: 8px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[hidden] {
    display: none !important;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

button {
    color: inherit;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 15px;
    height: 15px;
    flex: none;
}

a:focus-visible,
button:focus-visible,
label:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- 顶部栏 ---------- */

.install-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 64px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.install-topbar-inner {
    height: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex: none;
}

.brand-word {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand-divider {
    width: 1px;
    height: 16px;
    flex: none;
    background: #d4dcea;
}

.brand-crumb {
    color: var(--muted);
    font-size: 13px;
    white-space: nowrap;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.version-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 4px;
    background: var(--primary-soft);
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
}

.top-link:hover {
    color: var(--primary);
}

.top-link .icon {
    color: var(--primary);
}

/* ---------- 整体骨架 ---------- */

.install-shell {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 108px);
    padding-left: 248px;
}

.install-rail {
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    z-index: 10;
    width: 248px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 36px 20px;
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid var(--border);
}

.rail-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.2px;
}

.install-steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.install-steps::before {
    content: "";
    position: absolute;
    top: 21px;
    bottom: 21px;
    left: 21.5px;
    width: 1px;
    background: #dce4f0;
    z-index: 0;
}

.step-item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 6px;
}

.step-item.is-active {
    background: var(--primary-soft);
}

.step-chip {
    width: 24px;
    height: 24px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #d4dcea;
    background: #fff;
    color: var(--muted);
}

.step-item.is-active .step-chip {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.step-item.is-done .step-chip {
    border-color: var(--success-soft);
    background: var(--success-soft);
    color: var(--success);
}

.step-item.is-failed {
    background: var(--danger-soft);
}

.step-item.is-failed .step-chip {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.step-item.is-failed .step-label {
    color: var(--danger);
    font-weight: 600;
}

.step-chip .icon {
    width: 13px;
    height: 13px;
}

.step-num {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
}

.step-label {
    color: var(--text);
    font-size: 13px;
    white-space: nowrap;
}

.step-item.is-active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.rail-spacer {
    flex: 1;
    min-height: 0;
}

.rail-help {
    flex: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.help-btn {
    height: 36px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
}

.help-btn:hover {
    border-color: var(--primary-border);
    color: var(--primary);
}

.help-btn .icon {
    color: var(--primary);
}

/* ---------- 主内容 ---------- */

.install-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.main-inner {
    flex: 1;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 56px 24px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.step-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.step-meta-index {
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-meta-tick {
    width: 1px;
    height: 10px;
    background: #d4dcea;
}

.step-meta-total {
    margin-left: -4px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.step-meta-rule {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.step-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
}

.step-desc {
    max-width: 640px;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 24px;
}

/* ---------- 卡片与表格 ---------- */

.panel {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #fff;
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 20px;
    background: var(--panel-head);
    border-bottom: 1px solid var(--border);
}

.panel-head-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
}

.panel-head-title .icon {
    color: var(--primary);
}

.panel-count {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}

.panel-body {
    padding: 24px;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.panel-table th {
    padding: 9px 18px;
    background: var(--panel-head);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-align: left;
}

.panel-table td {
    height: 44px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--row-border);
    vertical-align: middle;
}

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

.ext-name,
.dir-name {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
}

.ext-use {
    color: var(--muted);
    font-size: 12px;
}

.ext-version {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    text-align: right;
}

.status-cell {
    text-align: center;
}

.status-cell .icon {
    width: 15px;
    height: 15px;
}

.icon-ok {
    color: var(--success);
}

.icon-fail {
    color: var(--danger);
}

/* ---------- 环境检查 ---------- */

.env-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}

.env-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.php-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border: 1px solid var(--primary-border);
    border-radius: var(--radius);
    background: #fff;
}

.php-card-label {
    color: var(--muted);
    font-size: 12px;
}

.php-card-value {
    margin-top: 4px;
    font-family: var(--font-mono);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-all;
}

.php-card-value.is-fail {
    color: var(--danger);
}

.php-card-sub {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.status-badge {
    width: 32px;
    height: 32px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
}

.status-badge.is-ok {
    background: var(--success-soft);
    color: var(--success);
}

.status-badge.is-fail {
    background: var(--danger-soft);
    color: var(--danger);
}

.status-badge .icon {
    width: 16px;
    height: 16px;
}

/* ---------- 表单 ---------- */

.form-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-section-label {
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 1.2px;
    white-space: nowrap;
}

.form-section-rule {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.db-test-state {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    border-radius: 4px;
    background: #f4f6fa;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.db-test-state.is-ok {
    background: var(--success-soft);
    color: var(--success);
}

.db-test-state.is-fail {
    background: var(--danger-soft);
    color: var(--danger);
}

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

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

.field-label {
    font-size: 13px;
    font-weight: 500;
}

.req {
    color: var(--danger);
    font-weight: 500;
}

.field-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
    color: var(--faint);
}

.field-input:hover {
    border-color: #d4dcea;
}

.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.field-input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.field-help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.field-spacer {
    min-height: 1px;
}

.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--warning-border);
    border-radius: 6px;
    background: var(--warning-soft);
    color: #8a6212;
    font-size: 12.5px;
    line-height: 1.6;
}

.notice .icon {
    width: 15px;
    height: 15px;
    color: var(--warning);
}

.notice-primary {
    border-color: var(--primary-border);
    background: var(--primary-soft);
    color: #1e4fae;
}

.notice-primary .icon {
    color: var(--primary);
}

/* ---------- 用户协议 ---------- */

.terms-panel {
    position: relative;
    height: 470px;
}

.terms-scroll {
    height: calc(100% - 45px);
    padding: 26px 30px 44px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: #d4dcea transparent;
}

.terms-scroll::-webkit-scrollbar {
    width: 8px;
}

.terms-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.terms-scroll::-webkit-scrollbar-thumb {
    border: 2px solid #fff;
    border-radius: 4px;
    background: #d4dcea;
}

.terms-panel::after {
    content: "";
    position: absolute;
    right: 1px;
    bottom: 1px;
    left: 1px;
    height: 56px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff);
    pointer-events: none;
}

.terms-scroll p {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 25px;
}

.terms-scroll h4 {
    margin: 6px 0 0;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 26px;
}

.terms-scroll a {
    color: var(--primary);
    text-decoration: none;
}

.terms-scroll a:hover {
    text-decoration: underline;
}

.terms-danger {
    color: var(--danger) !important;
}

.agree-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--primary-border);
    border-radius: 6px;
    background: var(--primary-soft);
    cursor: pointer;
    user-select: none;
}

.agree-row.is-error {
    border-color: var(--danger);
    animation: shake 0.3s ease;
}

.agree-row input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.agree-box {
    width: 18px;
    height: 18px;
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--primary-border);
    border-radius: 4px;
    background: #fff;
    color: #fff;
}

.agree-box .icon {
    width: 12px;
    height: 12px;
    opacity: 0;
}

.agree-row input:checked + .agree-box {
    border-color: var(--primary);
    background: var(--primary);
}

.agree-row input:checked + .agree-box .icon {
    opacity: 1;
}

.agree-row input:focus-visible + .agree-box {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.agree-text {
    font-size: 13px;
    font-weight: 500;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-4px);
    }
    75% {
        transform: translateX(4px);
    }
}

/* ---------- 安装结果 ---------- */

.complete-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.result-badge {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--success-soft);
    color: var(--success);
}

.result-badge .icon {
    width: 22px;
    height: 22px;
}

.result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 50px;
    padding: 9px 24px;
    border-bottom: 1px solid var(--row-border);
}

.result-row:last-child {
    border-bottom: 0;
}

.result-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.result-label {
    width: 140px;
    flex: none;
    color: var(--muted);
    font-size: 13px;
}

.result-value {
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 13px;
    word-break: break-all;
}

.result-copy {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 1px solid var(--primary-border);
    border-radius: 4px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.result-copy:hover {
    background: #dbeafe;
}

.result-copy .icon {
    width: 13px;
    height: 13px;
}

/* ---------- 安装中 / 失败 ---------- */

.install-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 72px 20px;
    text-align: center;
}

.install-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid var(--primary-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.install-state-title {
    font-size: 16px;
    font-weight: 600;
}

.install-state-desc {
    max-width: 560px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.install-progress {
    width: 280px;
    max-width: 100%;
    height: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: var(--primary-soft);
}

.install-progress span {
    display: block;
    width: 36%;
    height: 100%;
    border-radius: 2px;
    background: var(--primary);
    animation: indeterminate 1.4s ease-in-out infinite;
}

.failure-view {
    width: 100%;
    max-width: 840px;
    margin: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.failure-badge {
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.2);
}

.failure-badge .icon {
    width: 27px;
    height: 27px;
}

.failure-view .step-title {
    margin-top: 20px;
    font-size: 26px;
}

.failure-view .step-desc {
    max-width: 580px;
    margin-top: 10px;
    color: var(--muted);
}

.failure-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.failure-box {
    width: 100%;
    margin-top: 26px;
    padding: 22px 26px;
    border-radius: var(--radius);
    background: #f6f7f9;
    text-align: left;
}

.failure-box-title {
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.failure-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.failure-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: var(--danger);
    font-size: 14px;
    line-height: 1.65;
}

.failure-list .icon {
    width: 16px;
    height: 16px;
    margin-top: 3px;
}

.failure-list span {
    min-width: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.failure-tip {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px dashed #dfe4ec;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.7;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes indeterminate {
    0% {
        transform: translateX(-110%);
    }
    100% {
        transform: translateX(380%);
    }
}

/* ---------- 底部操作区 ---------- */

.step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.step-progress {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
    white-space: nowrap;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn .icon {
    width: 15px;
    height: 15px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    border-color: var(--border);
    background: #fff;
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--primary-border);
    color: var(--primary);
}

.btn-back {
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    gap: 6px;
}

.btn-back .icon {
    width: 14px;
    height: 14px;
}

.btn[disabled],
.btn.is-loading {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* ---------- 底部版权与提示 ---------- */

.page-footer {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.install-toast {
    position: fixed;
    top: 84px;
    left: 50%;
    z-index: 100;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border-radius: 6px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(28, 36, 48, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.install-toast.is-show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.install-toast.is-error {
    background: #b91c1c;
}

.install-toast.is-success {
    background: #15803d;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
    .main-inner {
        padding: 32px 36px 24px;
    }

    .install-rail {
        width: 220px;
        padding: 32px 16px;
    }

    .install-shell {
        padding-left: 220px;
    }

    .env-grid {
        grid-template-columns: 1fr;
    }

    .env-side {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }
}

@media (max-width: 860px) {
    .install-topbar-inner {
        padding: 0 20px;
    }

    .install-shell {
        flex-direction: column;
        min-height: calc(100vh - 108px);
        padding-left: 0;
    }

    .install-rail {
        position: static;
        width: 100%;
        height: auto;
        padding: 14px 20px;
        gap: 12px;
        overflow: visible;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .rail-label,
    .rail-spacer,
    .rail-help {
        display: none;
    }

    .install-steps {
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .install-steps::-webkit-scrollbar {
        display: none;
    }

    .install-steps::before {
        display: none;
    }

    .step-item {
        flex: none;
        padding: 7px 10px;
    }

    .main-inner {
        padding: 28px 20px 20px;
        gap: 18px;
    }

    .step-title {
        font-size: 23px;
    }

    .env-side {
        grid-template-columns: 1fr;
    }

    .step-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .brand-divider,
    .brand-crumb,
    .top-link-label {
        display: none;
    }

    .install-topbar-inner {
        padding: 0 14px;
    }

    .main-inner {
        padding: 22px 14px 16px;
    }

    .step-title {
        font-size: 21px;
    }

    .failure-view {
        margin: 0 auto;
        padding: 12px 0 20px;
    }

    .failure-view .step-title {
        margin-top: 16px;
        font-size: 22px;
    }

    .failure-actions {
        width: 100%;
    }

    .failure-actions .btn {
        flex: 1;
    }

    .failure-box {
        margin-top: 20px;
        padding: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .panel-body {
        padding: 18px;
    }

    .panel-table .col-use {
        display: none;
    }

    .panel-table th,
    .panel-table td {
        padding-right: 12px;
        padding-left: 12px;
    }

    .step-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .footer-actions {
        justify-content: stretch;
    }

    .footer-actions .btn {
        flex: 1;
    }

    .result-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
        padding: 12px 14px;
    }

    .result-left {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
        width: 100%;
    }

    .result-label {
        width: auto;
    }

    .terms-scroll {
        padding: 20px 18px 42px;
    }

    .terms-panel {
        height: 420px;
    }
}

@media (max-width: 480px) {
    .panel-table .col-version {
        display: none;
    }

    .version-pill {
        padding: 4px 9px;
    }
}
