.rpg-tool {
    --rpg-blue: #0b78d0;
    --rpg-blue-dark: #07579a;
    --rpg-teal: #008f7a;
    --rpg-green: #178a55;
    --rpg-orange: #f97316;
    --rpg-red: #d83a3a;
    --rpg-ink: #172033;
    --rpg-muted: #607186;
    --rpg-soft: #f4f8fc;
    --rpg-soft-2: #eaf2f8;
    --rpg-line: #d8e4ef;
    --rpg-panel: #ffffff;
    --rpg-radius: 8px;
    --rpg-shadow: 0 16px 42px rgba(31, 63, 96, 0.12);
    width: 100%;
    color: var(--rpg-ink);
}

.rpg-tool *,
.rpg-tool *::before,
.rpg-tool *::after {
    box-sizing: border-box;
    letter-spacing: 0;
}

.rpg-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(11, 120, 208, 0.24);
    border-left: 4px solid var(--rpg-blue);
    border-radius: var(--rpg-radius);
    background: linear-gradient(90deg, rgba(11, 120, 208, 0.09), rgba(0, 143, 122, 0.06));
    color: #16446f;
    font-size: 14px;
    line-height: 1.55;
}

.rpg-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--rpg-blue);
    box-shadow: 0 4px 12px rgba(11, 120, 208, 0.15);
}

.rpg-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--rpg-line);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    background: #eaf1f8;
}

.rpg-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--rpg-radius);
    background: transparent;
    color: #123f69;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.rpg-tab i {
    color: var(--rpg-orange);
    font-size: 18px;
}

.rpg-tab:hover {
    background: rgba(255, 255, 255, 0.76);
    color: var(--rpg-blue-dark);
}

.rpg-tab.is-active {
    background: #ffffff;
    border-color: rgba(11, 120, 208, 0.34);
    box-shadow: 0 10px 24px rgba(34, 86, 135, 0.14);
    color: var(--rpg-blue-dark);
    transform: translateY(-1px);
}

.rpg-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--rpg-line);
    border-radius: 0 0 12px 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: var(--rpg-shadow);
}

.rpg-main,
.rpg-side {
    min-width: 0;
}

.rpg-panel {
    display: none;
    border: 1px solid var(--rpg-line);
    border-radius: 10px;
    background: var(--rpg-panel);
    overflow: hidden;
}

.rpg-panel.is-active {
    display: block;
}

.rpg-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--rpg-line);
    background: linear-gradient(180deg, #fbfdff, #f1f6fb);
}

.rpg-panel-head > div {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    font-size: 15px;
}

.rpg-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--rpg-blue);
    color: #ffffff;
    font-weight: 900;
    font-size: 13px;
}

.rpg-section {
    margin: 16px 18px 0;
    padding-top: 16px;
    border-top: 1px solid #edf3f8;
}

.rpg-section-title {
    margin-bottom: 10px;
    color: #2b4259;
    font-size: 13px;
    font-weight: 900;
}

.rpg-grid {
    display: grid;
    gap: 14px;
    padding: 16px 18px 0;
}

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

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

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

.rpg-field span {
    color: #3a5068;
    font-size: 13px;
    font-weight: 800;
}

.rpg-field input,
.rpg-field select {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd9e6;
    border-radius: var(--rpg-radius);
    background: #ffffff;
    color: var(--rpg-ink);
    font-size: 14px;
    line-height: 1.3;
    padding: 9px 11px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rpg-field input:focus,
.rpg-field select:focus {
    border-color: var(--rpg-blue);
    box-shadow: 0 0 0 3px rgba(11, 120, 208, 0.13);
}

.rpg-choice-grid,
.rpg-toggle-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.rpg-choice-grid-small {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rpg-choice,
.rpg-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 11px 12px;
    border: 1px solid #dce6ef;
    border-radius: var(--rpg-radius);
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rpg-choice:hover,
.rpg-toggle:hover {
    border-color: rgba(11, 120, 208, 0.45);
    box-shadow: 0 8px 20px rgba(27, 77, 120, 0.08);
}

.rpg-choice:has(input:checked),
.rpg-toggle:has(input:checked) {
    border-color: rgba(0, 143, 122, 0.48);
    background: rgba(0, 143, 122, 0.06);
}

.rpg-choice input,
.rpg-toggle input {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    accent-color: var(--rpg-teal);
}

.rpg-choice span {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.rpg-choice b {
    color: #20344a;
    font-size: 13px;
    line-height: 1.2;
}

.rpg-choice small {
    color: var(--rpg-muted);
    font-size: 12px;
    line-height: 1.2;
}

.rpg-toggle {
    min-height: 48px;
    color: #2b4259;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.rpg-account-box {
    display: none;
}

.rpg-account-box.is-active {
    display: block;
}

.rpg-email-field.is-hidden {
    display: none;
}

.rpg-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
}

.rpg-btn,
.rpg-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    border-radius: var(--rpg-radius);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
    white-space: normal;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rpg-btn {
    padding: 10px 15px;
    border: 1px solid transparent;
}

.rpg-btn:hover,
.rpg-link-btn:hover {
    transform: translateY(-1px);
}

.rpg-btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.rpg-btn-primary {
    background: linear-gradient(135deg, #0b78d0, #075fae);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(11, 120, 208, 0.24);
}

.rpg-btn-primary:hover {
    background: linear-gradient(135deg, #0c83df, #0867bb);
}

.rpg-btn-success {
    background: linear-gradient(135deg, #008f7a, #08735f);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(0, 143, 122, 0.2);
}

.rpg-btn-outline {
    border-color: #cbd9e6;
    background: #ffffff;
    color: #285071;
}

.rpg-btn-outline:hover {
    border-color: var(--rpg-blue);
    color: var(--rpg-blue-dark);
    box-shadow: 0 8px 18px rgba(34, 86, 135, 0.1);
}

.rpg-btn-soft {
    border-color: rgba(249, 115, 22, 0.3);
    background: rgba(249, 115, 22, 0.08);
    color: #97440d;
}

.rpg-link-btn {
    border: 1px solid rgba(11, 120, 208, 0.22);
    background: #ffffff;
    color: var(--rpg-blue-dark);
    padding: 8px 12px;
}

.rpg-link-btn i {
    color: var(--rpg-orange);
}

.rpg-preview-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 18px 0;
    padding: 12px;
    border: 1px dashed #bfd0de;
    border-radius: var(--rpg-radius);
    background: #f8fbfd;
    color: var(--rpg-muted);
    font-family: Consolas, Monaco, "Courier New", monospace;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.rpg-preview-line i {
    color: var(--rpg-orange);
}

.rpg-runbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 18px;
}

.rpg-progress {
    height: 9px;
    margin: 0 18px;
    border-radius: 999px;
    background: #e5eef6;
    overflow: hidden;
}

.rpg-progress span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--rpg-blue), var(--rpg-teal));
    transition: width 0.2s ease;
}

.rpg-status {
    min-height: 24px;
    margin: 10px 18px 0;
    color: var(--rpg-muted);
    font-size: 13px;
    line-height: 1.5;
}

.rpg-status.is-error {
    color: var(--rpg-red);
}

.rpg-status.is-success {
    color: var(--rpg-green);
}

.rpg-table-wrap {
    margin: 16px 18px 0;
    border: 1px solid var(--rpg-line);
    border-radius: var(--rpg-radius);
    overflow: auto;
    background: #ffffff;
}

.rpg-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 720px;
    font-size: 13px;
}

.rpg-table th,
.rpg-table td {
    padding: 10px 11px;
    border-bottom: 1px solid #edf3f8;
    text-align: left;
    vertical-align: middle;
}

.rpg-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f3f7fb;
    color: #38536d;
    font-weight: 900;
    white-space: nowrap;
}

.rpg-table td {
    color: #20344a;
    overflow-wrap: anywhere;
}

.rpg-table tbody tr:last-child td {
    border-bottom: none;
}

.rpg-table code {
    color: #122b43;
    font-size: 12px;
    background: #f2f6fa;
    border: 1px solid #e1ebf3;
    border-radius: 6px;
    padding: 3px 5px;
}

.rpg-empty-row td {
    padding: 32px 12px;
    color: var(--rpg-muted);
    text-align: center;
}

.rpg-mini {
    color: var(--rpg-muted);
    font-size: 12px;
    line-height: 1.4;
}

.rpg-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rpg-side-block {
    border: 1px solid var(--rpg-line);
    border-radius: 10px;
    background: #ffffff;
    padding: 14px;
}

.rpg-side-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #1f4566;
    font-size: 14px;
    font-weight: 900;
}

.rpg-side-title i {
    color: var(--rpg-orange);
}

.rpg-meter {
    height: 10px;
    border-radius: 999px;
    background: #e6eef6;
    overflow: hidden;
}

.rpg-meter span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--rpg-red);
    transition: width 0.25s ease, background 0.25s ease;
}

.rpg-score {
    margin-top: 9px;
    color: #17344f;
    font-size: 16px;
    font-weight: 900;
}

.rpg-hint {
    margin-top: 6px;
    color: var(--rpg-muted);
    font-size: 12px;
    line-height: 1.55;
}

.rpg-summary-list {
    display: grid;
    gap: 9px;
    margin: 0;
}

.rpg-summary-list div {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.rpg-summary-list dt {
    color: var(--rpg-muted);
    font-size: 12px;
    font-weight: 800;
}

.rpg-summary-list dd {
    margin: 0;
    color: #1d344a;
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.rpg-side-tips ul {
    margin: 0;
    padding-left: 18px;
    color: var(--rpg-muted);
    font-size: 12px;
    line-height: 1.65;
}

@media (max-width: 1100px) {
    .rpg-shell {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 820px) {
    .rpg-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rpg-shell {
        padding: 12px;
    }

    .rpg-grid-2,
    .rpg-grid-3,
    .rpg-choice-grid,
    .rpg-choice-grid-small,
    .rpg-toggle-grid,
    .rpg-side {
        grid-template-columns: 1fr;
    }

    .rpg-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .rpg-actions,
    .rpg-runbar {
        justify-content: stretch;
    }

    .rpg-btn,
    .rpg-link-btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .rpg-tabs {
        gap: 6px;
        padding: 8px;
    }

    .rpg-tab {
        min-height: 44px;
        padding: 8px;
        font-size: 13px;
    }

    .rpg-grid,
    .rpg-section,
    .rpg-actions,
    .rpg-runbar,
    .rpg-panel-head,
    .rpg-table-wrap,
    .rpg-status,
    .rpg-progress,
    .rpg-preview-line {
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 0;
        padding-right: 0;
    }

    .rpg-panel-head {
        padding: 14px 12px;
        margin-left: 0;
        margin-right: 0;
    }

    .rpg-actions,
    .rpg-runbar {
        padding: 14px 12px;
    }
}
