:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --ink: #111827;
    --muted: #667085;
    --panel: #ffffff;
    --line: #d9e0ea;
    --brand: #1d4ed8;
    --brand-dark: #173ea8;
    --ok: #0f766e;
    --bad: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 42%, #ffffff 100%);
    color: var(--ink);
}

.shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

.brand {
    font-size: 22px;
    font-weight: 800;
}

.badge {
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    padding: 8px 12px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.7);
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
}

.panel,
.side {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 45px rgba(16, 24, 40, 0.08);
}

.panel {
    padding: 28px;
}

.side {
    padding: 22px;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.12;
}

p {
    color: var(--muted);
    line-height: 1.65;
}

form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    font-size: 16px;
}

input:focus {
    outline: 3px solid rgba(29, 78, 216, 0.14);
    border-color: var(--brand);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    padding: 0 18px;
}

.button:hover {
    background: var(--brand-dark);
}

.button.secondary {
    background: #eef2ff;
    color: var(--brand);
}

.amount-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.amount-row button {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-weight: 700;
}

.notice {
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 14px;
    background: #f8fafc;
    color: var(--muted);
}

.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    background: #fff7ed;
    color: #b45309;
}

.status.completed {
    background: #ecfdf3;
    color: var(--ok);
}

.status.failed,
.status.expired {
    background: #fef3f2;
    color: var(--bad);
}

.summary {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.summary div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.summary span:first-child {
    color: var(--muted);
}

.checkout-panel {
    display: grid;
    gap: 18px;
}

.checkout-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    align-items: start;
}

.summary.compact {
    margin-top: 0;
}

.frame-box {
    position: relative;
    min-height: 720px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.frame-box iframe {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
    background: #ffffff;
}

.frame-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: #ffffff;
    color: var(--muted);
    font-weight: 700;
    z-index: 2;
}

.checkout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 860px) {
    .layout,
    .grid-2,
    .checkout-head {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    h1 {
        font-size: 28px;
    }

    .amount-row {
        grid-template-columns: 1fr 1fr;
    }

    .frame-box,
    .frame-box iframe {
        min-height: 680px;
        height: 680px;
    }
}
