.checkout {
    --panel: #161618;
    --panel-2: #1d1d20;
    --line: rgb(255 255 255 / 8%);
    --text: #efefef;
    --dim: #9b96a3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    font-family: Inter, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
}

.checkout [hidden] {
    display: none !important;
}

.co-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 2rem, 64rem);
    margin: 0 auto;
    padding: 1.25rem 0;
}

.co-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #fff;
    font-family: var(--display-font);
    font-size: 1.1rem;
    text-decoration: none;
}

.co-brand img {
    width: 2rem;
    height: 2rem;
    object-fit: contain;
}

.co-secure {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--dim);
    font-size: 0.85rem;
}

.co-secure svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.co-main {
    width: min(100% - 2rem, 64rem);
    display: flex;
    flex: 1;
    flex-direction: column;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.co-main h1 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
}

.co-sub {
    margin: 0.35rem 0 0;
    color: var(--dim);
}

.co-panel,
.co-summary,
.co-cart {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgb(22 22 24 / 92%);
    box-shadow: 0 20px 50px rgb(0 0 0 / 30%);
    backdrop-filter: blur(6px);
}

.co-notice {
    display: grid;
    justify-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 28rem;
    margin: auto;
    padding: 2.5rem 2rem;
    text-align: center;
}

.co-notice p {
    margin: 0;
    color: var(--dim);
    line-height: 1.6;
}

.co-notice-icon {
    width: 3.5rem;
    height: 3.5rem;
    object-fit: contain;
}

.co-notice .co-button {
    width: 100%;
    margin-top: 0.5rem;
}

.co-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #0b1622;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: filter 160ms ease, transform 160ms ease;
}

.co-button:hover:not(:disabled) {
    filter: brightness(1.1);
}

.co-button:active:not(:disabled) {
    transform: translateY(1px);
}

.co-button:disabled {
    background: #2a2a2e;
    color: var(--dim);
    cursor: not-allowed;
}

.co-button-discord {
    background: #5865f2;
    color: #fff;
}

.co-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
}

.co-link:hover {
    text-decoration: underline;
}

:is(.co-button, .co-link, .co-apply, .co-code input):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.co-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.co-cart,
.co-summary {
    padding: 1.75rem;
}

.co-back {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.co-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--panel-2);
}

.co-item-icon {
    width: 3rem;
    height: 3rem;
    padding: 0.4rem;
    border-radius: 10px;
    background: rgb(114 186 255 / 10%);
    object-fit: contain;
}

.co-item-text {
    display: grid;
    flex: 1;
    gap: 0.2rem;
}

.co-item-text span {
    color: var(--dim);
    font-size: 0.9rem;
}

.co-includes {
    margin-top: 1.5rem;
}

.co-includes h2 {
    margin: 0 0 0.75rem;
    color: var(--dim);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.co-includes ul {
    display: grid;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.co-includes li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.co-includes li::before {
    width: 1.1rem;
    height: 1.1rem;
    flex: none;
    border-radius: 50%;
    background: rgb(114 186 255 / 15%) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9 16.2-3.5-3.5L4 14.2l5 5 11-11-1.5-1.5z' fill='%2372baff'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
    content: "";
}

.co-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.co-account {
    margin: 0;
    color: var(--dim);
    font-size: 0.9rem;
}

.co-account strong {
    color: var(--text);
}

.co-account .co-link {
    margin-left: 0.4rem;
    font-size: 0.85rem;
}

.co-code {
    display: flex;
    gap: 0.5rem;
}

.co-code input {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    padding: 0 0.9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0f0f11;
    color: var(--text);
    font: inherit;
    letter-spacing: 0.04em;
}

.co-code input:focus {
    border-color: var(--accent);
    outline: none;
}

.co-apply {
    padding: 0 1.1rem;
    border: 0;
    border-radius: 10px;
    background: #1f3550;
    color: #dbeaff;
    font: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.co-apply:hover:not(:disabled) {
    background: #27446a;
}

.co-apply:disabled {
    opacity: 0.6;
    cursor: progress;
}

.co-hint {
    margin-top: -0.4rem;
    font-size: 0.8rem;
}

.co-box {
    display: grid;
    gap: 0.75rem;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.co-row {
    display: flex;
    justify-content: space-between;
    color: var(--dim);
}

.co-total {
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 700;
}

.co-pay {
    width: 100%;
    min-height: 54px;
    font-size: 1rem;
}

.co-fine {
    margin: 0;
    color: var(--dim);
    font-size: 0.75rem;
    line-height: 1.5;
}

.co-message {
    margin: 0;
    color: var(--dim);
    font-size: 0.875rem;
    line-height: 1.4;
}

.co-message:empty {
    display: none;
}

.co-message.is-error {
    color: #ff8a8a;
}

.co-message.is-success {
    color: #7ee2a8;
}

.co-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

@media (max-width: 760px) {
    .co-grid {
        grid-template-columns: 1fr;
    }

    .co-cart,
    .co-summary {
        padding: 1.25rem;
    }

    .co-main {
        padding-top: 1rem;
    }
}

/* In the game's Store tab window: back to the game without buying. */
.ingame-back {
    position: fixed; bottom: 12px; left: 12px; z-index: 20;
    padding: 8px 12px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 8px;
    background: rgba(13, 20, 33, 0.85); color: #f1f2f5; font: inherit; font-size: 13px; cursor: pointer;
}
.ingame-back:hover { background: rgba(40, 52, 74, 0.95); }
