:root {
    font: 16px/1.5 "Segoe UI", system-ui, sans-serif;
    color: #202d29;
    background: #f4f6f2;
    --green:#195740;
    --line:#d5dfd7
}

* { box-sizing: border-box }

body { margin: 0 }
#qrImage { display: block; margin: auto; max-width: 100%; height: auto; image-rendering: pixelated }

header {
    background: #153c30;
    color: white
}

.bar, main {
    max-width: 1080px;
    margin: auto;
    padding: 18px 32px
}

.heading, .section-title, footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px
}

.brand {
    color: white;
    text-decoration: none;
    font-size: 21px;
    font-weight: 650
}

.brand { display: inline-flex; align-items: center; gap: 8px }

.bar {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 8px;
}
.bar select, .bar button {
    min-height: 44px;
    border-color: #54816d;
    border-radius: 10px;
}
.bar select { background: #204b3c; color: white; color-scheme: dark }
.bar select:disabled { opacity: 1; -webkit-text-fill-color: #e0eee6 }
.bar button { background: #def5a7; color: #173425; border-color: transparent }
.bar button:hover { background: #cee992 }
.brand img { border-radius: 7px }
.wallet-address { display: flex; gap: 4px; align-items: center }
.wallet-address #address { margin: 0 }
#copyAddress {
    width: 44px; height: 44px; padding: 0;
    color: var(--green); background: transparent; border-color: transparent;
}
#copyAddress:hover { background: #d9e7da }
#copyAddress svg { vertical-align: middle }
#mobileProof:not([hidden]) { display: inline-block; text-decoration: none; background:#def5a7; color:#173425; text-align:center }

button, select, input, a.primary {
    font: inherit;
    border: 1px solid #bacac0;
    border-radius: 7px;
    padding: 9px 13px;
    background: white;
    color: #243d31
}

button {
    cursor: pointer;
    font-weight: 600
}

#mobileApprove { text-decoration: none; font-weight: 600; text-align: center }
button:hover { background: #edf4ed }

button:disabled {
    opacity: .55;
    cursor: wait
}

.primary, a.primary {
    color: white;
    background: var(--green);
    border-color: var(--green)
}

.primary:hover { background: #0e4632 }

main { padding-top: 36px }
#devnetNote { margin:0 0 20px; padding:12px 16px; border-left:4px solid var(--green); background:#e6f0db; color:#183d2d }

h1 {
    font-size: clamp(32px, 5vw, 48px);
    letter-spacing: -.045em;
    line-height: 1.12;
    margin: 4px 0 20px
}

h2 {
    font-size: 21px;
    letter-spacing: -.03em;
    margin: 0
}

.eyebrow, small, .section-title span { color: #53695e }

.eyebrow {
    font-size: 13px;
    margin: 0
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #eaf0e8
}

.stats > div { padding: 16px 20px }

.stats > div + div { border-left: 1px solid var(--line) }

.stats small, .stats strong { display: block }

.stats strong {
    font: 600 20px/1.5 ui-monospace, monospace;
    margin-top: 7px
}

section {
    background: white;
    border: 1px solid var(--line);
    border-radius: 10px;
    margin: 18px 0;
    overflow: hidden
}

.section-title, .row {
    padding: 16px 20px;
    border-bottom: 1px solid #ebefeb
}

.section-title span, .row small { font-size: 12px }

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

.row small { display: block }
.token-identity { display: inline-flex; align-items: center; gap: 10px; overflow-wrap: anywhere }
.token-identity img { border-radius: 50%; object-fit: contain; flex: none }

.empty {
    padding: 24px 20px;
    color: #596d60
}

a { color: var(--green) }

#notice:empty { display: none }

#notice {
    padding: 10px 16px;
    border-left: 3px solid #55785b;
    background: #eef1df
}

dialog {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 24px;
    width: min(500px, 94vw);
    box-shadow: 0 25px 90px #102b2330
}

dialog::backdrop { background: #102b235f }

label {
    display: block;
    margin: 14px 0
}

input {
    display: block;
    width: 100%;
    margin-top: 4px
}

footer {
    justify-content: flex-end;
    margin-top: 24px
}

.sr {
    position: absolute;
    clip-path: inset(100%)
}

dt {
    font-size: 12px;
    color: #526659
}

dd {
    margin: 2px 0 12px;
    overflow-wrap: anywhere
}

#actions {
    display: grid;
    gap: 8px
}

.visibility-switch {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 44px; cursor: pointer;
}
.visibility-switch input {
    appearance: none; flex: none; width: 44px; height: 26px; min-height: 0;
    margin: 0; padding: 2px; border: 1px solid #53695e; border-radius: 20px;
    background: #647269; cursor: pointer;
}
.visibility-switch input::before {
    content: ""; display: block; width: 20px; height: 20px;
    border-radius: 50%; background: white;
}
.visibility-switch input:checked { background: #19543f }
.visibility-switch input:checked::before { transform: translateX(18px) }
#hiddenFilter { margin: 0 12px 12px }
#historyNav:not([hidden]) {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 12px; border-top: 1px solid #dae2da;
}

button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #6dac86 }

@media (max-width: 650px) {
    .bar, main { padding: 14px }

    .heading {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .stats { grid-template-columns: 1fr 1fr }

    .stats > div:last-child {
        grid-column: span 2;
        border-top: 1px solid var(--line)
    }

    .stats > div { padding: 10px }

    .bar {
        grid-template-columns: minmax(0,1fr) minmax(0,1fr);
        grid-template-areas: "brand action" "network provider";
        gap: 12px 8px;
    }
    .brand { grid-area: brand; font-size: 19px }
    #connect { grid-area: action; justify-self: end }
    #network { grid-area: network }
    #walletProvider { grid-area: provider }
    .bar select { width: 100% }
    main { padding-top: 22px }
    .heading { align-items: center; margin-bottom: 16px }
    .heading h1 { margin-bottom: 0 }
    .stats > div:last-child { border-left: 0 }

    .section-title, .row { padding: 12px }
}
#importForm { padding: 0 16px 16px }
#logoPreview { max-width: 96px; height: auto }
