﻿:root {
    --bg: #0b1020;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --good: #22c55e;
    --bad: #ef4444;
    --warn: #f59e0b;
    --accent: #60a5fa;
    --border: rgba(255,255,255,.10);
    --shadow: 0 18px 60px rgba(0,0,0,.45);
    --radius: 16px;
}

* {
    box-sizing: border-box
}

html, body {
    min-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
    background: radial-gradient(900px 500px at 70% -10%, rgba(96,165,250,.20), transparent 60%), radial-gradient(700px 500px at 0% 30%, rgba(34,197,94,.12), transparent 55%), radial-gradient(800px 500px at 100% 70%, rgba(245,158,11,.10), transparent 55%), var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    flex-direction: column;
    gap:14px;
}

.app {
    width: min(1080px, 100%);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

header {
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0));
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.brand {
    display: block;
    align-items: center;
    gap: 12px;
    min-width: 240px;
}

.logo {
    width: auto !important;
    height: 60px;
    background-size: 100% 100% !important;
    background: url("/images/logo-icon.png");
}

.title {
    display: flex;
    flex-direction: column;
    gap: 2px
}

    .title b {
        font-size: 14px;
        letter-spacing: .2px
    }

    .title span {
        font-size: 12px;
        color: var(--muted)
    }

.topmeta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end
}

.pill {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    display: flex;
    gap: 8px;
    align-items: center;
    color: rgba(255,255,255,.92);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%
}

    .dot.good {
        background: var(--good)
    }

    .dot.bad {
        background: var(--bad)
    }

    .dot.warn {
        background: var(--warn)
    }

main {
    display: grid;
    grid-template-columns: 410px 1fr;
    min-height: 610px;
}

@media (max-width: 960px) {
    main {
        grid-template-columns: 1fr
    }
}

aside {
    border-right: 1px solid var(--border);
    background: rgba(0,0,0,.14);
    padding: 16px;
}

@media (max-width: 960px) {
    aside {
        border-right: none;
        border-bottom: 1px solid var(--border)
    }
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.25);
}

    .card h3 {
        margin: 0 0 8px 0;
        font-size: 13px;
        letter-spacing: .2px;
        color: rgba(255,255,255,.92)
    }

.small {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45
}

.kpiGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.kpi {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
}

    .kpi .label {
        font-size: 11px;
        color: var(--muted)
    }

    .kpi .value {
        font-size: 16px;
        font-weight: 850;
        margin-top: 4px
    }

.btnrow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px
}

button {
    border: none;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 14px;
    color: rgba(255,255,255,.92);
    background: rgba(96,165,250,.18);
    border: 1px solid rgba(96,165,250,.28);
    transition: transform .06s ease, background .12s ease, border-color .12s ease;
    font-weight: 800;
    letter-spacing: .2px;
}

    button:hover {
        transform: translateY(-1px);
        background: rgba(96,165,250,.24)
    }

    button:active {
        transform: translateY(0px)
    }

    button.secondary {
        background: rgba(255,255,255,.06);
        border: 1px solid var(--border);
        font-weight: 700
    }

    button.good {
        background: rgba(34,197,94,.14);
        border: 1px solid rgba(34,197,94,.30)
    }

    button.danger {
        background: rgba(239,68,68,.14);
        border: 1px solid rgba(239,68,68,.30)
    }

    button:disabled {
        opacity: .55;
        cursor: not-allowed;
        transform: none
    }

section {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px
}

.progress {
    height: 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    overflow: hidden
}

.bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(96,165,250,.95), rgba(34,197,94,.80))
}

.stage {
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    min-height: 360px;
}

    .stage h2 {
        margin: 0 0 6px 0;
        font-size: 16px;
        letter-spacing: .2px
    }

.desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 12px
}

.row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between
}

.statline {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center
}

.chip {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    color: rgba(255,255,255,.92);
}

    .chip.good {
        border-color: rgba(34,197,94,.35);
        background: rgba(34,197,94,.10)
    }

    .chip.bad {
        border-color: rgba(239,68,68,.35);
        background: rgba(239,68,68,.10)
    }

    .chip.warn {
        border-color: rgba(245,158,11,.40);
        background: rgba(245,158,11,.10)
    }

.kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(0,0,0,.22);
    color: rgba(255,255,255,.92);
}

.bigTarget {
    height: 220px;
    border-radius: 22px;
    border: 1px dashed rgba(255,255,255,.22);
    background: rgba(0,0,0,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    user-select: none;
    touch-action: manipulation;
}

    .bigTarget.go {
        border-style: solid;
        background: radial-gradient(260px 160px at 50% 35%, rgba(34,197,94,.25), rgba(0,0,0,.18));
        box-shadow: inset 0 0 0 1px rgba(34,197,94,.18);
    }

    .bigTarget.no {
        border-style: solid;
        background: radial-gradient(260px 160px at 50% 35%, rgba(239,68,68,.22), rgba(0,0,0,.18));
        box-shadow: inset 0 0 0 1px rgba(239,68,68,.16);
    }

.hint {
    font-size: 14px;
    color: rgba(255,255,255,.92);
    line-height: 1.4
}

.sub {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--muted)
}

.choiceRow {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px
}

.choice {
    flex: 1;
    min-width: 140px;
    padding: 12px 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.05);
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: transform .06s ease, background .12s ease, border-color .12s ease;
    color: rgba(255,255,255,.92);
    font-weight: 900;
    font-size: 12px;
}

    .choice:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.07)
    }

    .choice.selected {
        border-color: rgba(96,165,250,.45);
        background: rgba(96,165,250,.14)
    }

.qgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

@media (max-width: 560px) {
    .qgrid {
        grid-template-columns: 1fr
    }
}

.q {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    background: rgba(0,0,0,.16);
}

    .q label {
        display: block;
        font-size: 12px;
        color: rgba(255,255,255,.9);
        margin-bottom: 10px
    }

input[type="range"] {
    width: 100%
}

.rangeMeta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px
}

.resultBanner {
    border-radius: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

    .resultBanner.good {
        border-color: rgba(34,197,94,.35);
        background: rgba(34,197,94,.10)
    }

    .resultBanner.bad {
        border-color: rgba(239,68,68,.35);
        background: rgba(239,68,68,.10)
    }

    .resultBanner.warn {
        border-color: rgba(245,158,11,.40);
        background: rgba(245,158,11,.10)
    }

.badge {
    min-width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(0,0,0,.18);
    font-size: 20px;
}

.toast {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.60);
    border: 1px solid rgba(255,255,255,.14);
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: rgba(255,255,255,.92);
    display: none;
    max-width: min(760px, 92vw);
    z-index: 9999;
}

.history {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px
}

.daybox {
    aspect-ratio: 1/1;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.04);
    position: relative;
    overflow: hidden;
}

    .daybox.good {
        background: rgba(34,197,94,.14);
        border-color: rgba(34,197,94,.22)
    }

    .daybox.bad {
        background: rgba(239,68,68,.14);
        border-color: rgba(239,68,68,.22)
    }

    .daybox.warn {
        background: rgba(245,158,11,.14);
        border-color: rgba(245,158,11,.22)
    }

    .daybox span {
        position: absolute;
        inset: auto 6px 6px auto;
        font-size: 10px;
        color: rgba(255,255,255,.85);
        background: rgba(0,0,0,.20);
        border: 1px solid rgba(255,255,255,.10);
        padding: 2px 6px;
        border-radius: 999px;
    }

.select {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.18);
    color: rgba(255,255,255,.92);
    outline: none;
}

.toggleRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    opacity: 0;
    height: 0;
    width: 0;
}

.switch {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,.20);
    position: relative;
    cursor: pointer;
    flex: 0 0 auto;
}

.knob {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    position: absolute;
    top: 1px;
    left: 1px;
    transition: left .12s ease;
}

.switch.on {
    border-color: rgba(96,165,250,.45);
    background: rgba(96,165,250,.14)
}

    .switch.on .knob {
        left: 23px;
        background: rgba(255,255,255,.95)
    }

@media (max-height: 780px) {
    body {
        padding: 12px
    }
}


.btn.hold {
    background: #1f8f63; /* HOLD: green-ish but different shade than GO */
    border-color: rgba(255,255,255,0.16);
}

    .btn.hold:hover {
        filter: brightness(1.06);
    }


/* Disclaimer modal */
.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 10000;
}

.modal {
    width: min(720px, 96vw);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.14);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    box-shadow: 0 18px 70px rgba(0,0,0,.55);
    overflow: hidden;
}

.modalHeader {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

    .modalHeader b {
        font-size: 13px;
        letter-spacing: .2px
    }

.modalBody {
    padding: 14px 16px
}

    .modalBody p {
        margin: 0 0 10px 0;
        color: rgba(255,255,255,.90);
        line-height: 1.5;
        font-size: 13px
    }

    .modalBody ul {
        margin: 8px 0 10px 18px;
        padding: 0;
        color: rgba(255,255,255,.86);
        font-size: 13px;
        line-height: 1.5
    }

.modalFooter {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.modalNote {
    font-size: 12px;
    color: var(--muted)
}



/* Overlay stays fixed and always centered */
.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

/* Modal container: fixed max height so it never exceeds screen */
.modal {
    width: min(680px, 96vw);
    max-height: min(86vh, 760px);
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    overflow: hidden;
    /* nicer glass look */
    background: rgba(16, 24, 40, 0.92);
    border: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 18px 60px rgba(0,0,0,.55);
}

/* Header stays fixed, body scrolls */
.modalHeader {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.10);
    background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0))
}

/* BODY becomes the scrollable area */
.modalBody {
    padding: 16px 18px;
    overflow-y: auto;
    flex: 1;
}

/* Footer stays fixed */
.modalFooter {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,.10);
    background: rgba(16, 24, 40, 0.70);
}

/* Slim scrollbar (works in Chromium + Firefox) */
.modalBody::-webkit-scrollbar {
    width: 8px;
}

.modalBody::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.14);
    border-radius: 999px;
}

    .modalBody::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,.22);
    }

.modalBody {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

.donationList {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donationItem {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
}

    .donationItem:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.06);
    }

.donationIcon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255,255,255,.06);
}

.donationMeta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.donationTitle {
    font-weight: 900;
    letter-spacing: .2px;
}

.donationCoins {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.donationArrow {
    opacity: .7;
    font-weight: 900;
}

.donateAddrBox {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    word-break: break-all;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    line-height: 1.35;
}


/* nice banner for donation message */
.donateHero {
    border-radius: 18px;
    padding: 14px 14px;
    background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(124,58,237,.12));
    border: 1px solid rgba(255,255,255,.10);
}

.donateHeroTitle {
    font-weight: 900;
    letter-spacing: .3px;
    font-size: 16px;
}

.donateHeroSub {
    font-size: 13px;
    opacity: .82;
    line-height: 1.45;
    margin-top: 6px;
}

/* Donation list cards */
.donationItem {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
}

    .donationItem:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.18);
    }

.donationIcon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
}

.donationTitle {
    font-weight: 900;
    letter-spacing: .2px;
}

.donationArrow {
    opacity: .7;
    font-weight: 900;
    font-size: 18px;
}

/* QR image container nicer */
.qrBox {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
}

.qrImg {
    width: 240px;
    height: 240px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
}

/* Copy box */
.donateAddrBox {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    word-break: break-all;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    line-height: 1.35;
}



/* ===== Slim full-page scrollbars ===== */
html, body {
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(255,255,255,.18) transparent;
}

    /* Chrome / Edge / Safari */
    html::-webkit-scrollbar,
    body::-webkit-scrollbar {
        width: 10px;
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,.14);
        border-radius: 999px;
    }

        html::-webkit-scrollbar-thumb:hover,
        body::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,.22);
        }

    html::-webkit-scrollbar-track,
    body::-webkit-scrollbar-track {
        background: transparent;
    }


/* Donate modal extras */
.donateGrid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.donationItem {
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
    border-radius: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: transform .14s ease, background .14s ease, border-color .14s ease;
    user-select: none;
}

    .donationItem:hover {
        transform: translateY(-2px);
        background: rgba(255,255,255,.06);
        border-color: rgba(255,255,255,.18);
    }

.donationIcon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}

.donationMeta {
    flex: 1;
    min-width: 0;
}

.donationTitle {
    font-weight: 900;
    letter-spacing: .2px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.donationTag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.06);
    opacity: .9;
}

.donationSub {
    font-size: 13px;
    opacity: .78;
    margin-top: 4px;
    line-height: 1.35;
}

.addrPreview {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 12px;
    opacity: .75;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donationArrow {
    opacity: .65;
    font-weight: 900;
    font-size: 18px;
    padding-left: 4px;
}

.donateHero {
    border-radius: 18px;
    padding: 14px 14px;
    background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(124,58,237,.12));
    border: 1px solid rgba(255,255,255,.10);
}

.donateHeroTitle {
    font-weight: 900;
    letter-spacing: .3px;
    font-size: 16px;
}

.donateHeroSub {
    font-size: 13px;
    opacity: .82;
    line-height: 1.45;
    margin-top: 6px;
}

.donateNote {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    border: 1px dashed rgba(255,255,255,.14);
    font-size: 13px;
    opacity: .82;
    line-height: 1.45;
}

/* Main vs Detail view transition (clean) */
.fadeSwap {
    animation: fadeSwap .18s ease;
}

@keyframes fadeSwap {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Detail QR */
.qrBox {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    margin-top: 12px;
}

.qrImg {
    width: 240px;
    height: 240px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    padding: 8px;
}

/* Address box + copy */
.donateAddrBox {
    margin-top: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 13px;
    word-break: break-all;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 14px;
    padding: 10px 12px;
    line-height: 1.35;
}

/* Copy animation */
.copiedFlash {
    animation: copiedFlash .25s ease;
    border-color: rgba(34,197,94,.55) !important;
    box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

@keyframes copiedFlash {
    from {
        transform: scale(1.00);
    }

    to {
        transform: scale(1.01);
    }
}

/* donate buttons row in detail */
.donateActions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    align-content:center;
    align-items:center;

}

    .donateActions button {
        width: 160px;
        margin:auto
    }

/* small “close x” */
.modalX {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    color: rgba(255,255,255,.85);
    transition: .14s ease;
}

    .modalX:hover {
        background: rgba(255,255,255,.10);
    }
.coinIconWrap {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,0.06);
}

.coinIcon {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 16px;
}

.qrCoinIcon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}
.donateDetailIcon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    object-fit: contain;
}


.footerLegal {
    width: min(1080px, 100%);
    text-align: center;
    font-size: 12px;
    line-height: 1.4;
    opacity: 0.65;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.18);
    border-radius: 16px;
    letter-spacing: .2px;
    user-select: none;
    backdrop-filter: blur(8px);
}



/* ===== Mobile header cleanup ===== */
@media (max-width: 640px) {
    header {
        padding: 14px 12px 12px 12px;
        gap: 10px;
        justify-content: center;
    }

    .brand {
        width: 100%;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .logo {
        height: 52px;
        width: 200px;
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain !important;
    }

    /* Make pills line scroll horizontally instead of wrapping into chaos */
    .topmeta {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        gap: 8px;
    }

        .topmeta::-webkit-scrollbar {
            height: 6px;
        }

        .topmeta::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,.14);
            border-radius: 999px;
        }

    .pill {
        flex: 0 0 auto;
        font-size: 11px;
        padding: 7px 9px;
    }

    #donatePill {
        flex: 0 0 auto;
        height: 32px !important;
        padding: 0 12px !important;
        border-radius: 12px !important;
    }
}

/* ===== Collapsible aside (mobile) ===== */
.mobileFold summary {
    display: none;
}

@media (max-width: 960px) {
    .mobileFold summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,.10);
        background: rgba(0,0,0,.18);
        cursor: pointer;
        user-select: none;
        font-weight: 900;
        letter-spacing: .2px;
    }
    body > div.app > main > aside > details > div:nth-child(2) {
        margin-top:12px;
    }
    .mobileFold summary::after {
        content: "▾";
        opacity: .7;
        font-size: 16px;
    }

    .mobileFold[open] summary::after {
        content: "▴";
    }

    .mobileFold {
        width: 100%;
    }
}

@media (max-width: 640px) {
    header {
        flex-direction: column;
        align-items: center;
    }

    .brand {
        width: 100%;
        min-width: 0;
        display: flex;
        justify-content: center;
    }

    .logo {
        width: 220px !important;
        height: 56px !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
    }
}

@media (max-width: 640px) {
    .topmeta {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 pills per row */
        gap: 8px;
        justify-content: stretch;
    }

    .pill {
        width: 100%;
        justify-content: center;
        padding: 8px 10px;
        font-size: 11.5px;
    }

    #donatePill {
        grid-column: 1 / -1; /* full row */
        width: 100%;
        margin-left: 0 !important;
        height: 36px !important;
    }
    
}


@media (max-width: 960px) {
    main {
        display: flex;
        flex-direction: column;
    }

    section {
        order: 1; /* show challenge first */
    }

    aside {
        order: 2; /* settings below */
    }
}
