:root {
    color-scheme: dark;
    --ink: #eef8ff;
    --muted: #92a8bc;
    --paper: #03050b;
    --card: rgba(9, 20, 38, .9);
    --line: rgba(93, 200, 255, .24);
    --accent: #49c8ff;
    --accent-dark: #168cff;
    --navy: #07101f;
    --green: #2dd4bf;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 12%, rgba(0, 174, 255, .20), transparent 32rem),
        radial-gradient(circle at 82% 78%, rgba(37, 99, 235, .18), transparent 34rem),
        linear-gradient(rgba(74, 190, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 190, 255, .055) 1px, transparent 1px),
        linear-gradient(145deg, #03050b 0%, #07101f 52%, #02040a 100%);
    background-size: auto, auto, 48px 48px, 48px 48px, auto;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-attachment: fixed;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

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

.brand { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 52px; }
.brand-identity { display: flex; align-items: center; gap: 14px; }
.brand-mark {
    display: grid; place-items: center; width: 48px; height: 48px;
    color: #04101b; background: linear-gradient(135deg, #79ddff, #247cff); border-radius: 14px;
    font: 800 22px/1 Inter, sans-serif;
    box-shadow: 0 0 28px rgba(73, 200, 255, .32);
}
.home-link {
    display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px;
    color: #9bdfff; background: rgba(9, 20, 38, .72);
    border: 1px solid rgba(93, 200, 255, .28); border-radius: 11px;
    font-size: 14px; font-weight: 700; text-decoration: none;
    transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.home-link:hover, .home-link:focus-visible {
    color: white; background: rgba(20, 53, 88, .85); border-color: #49c8ff;
    transform: translateY(-2px); outline: none;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font: 800 21px/1.1 Inter, sans-serif; }
h2, h3 { font-family: Inter, sans-serif; }
.eyebrow {
    margin-bottom: 5px; color: #63c9ff; font-size: 11px;
    font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
}

.card, .summary-card, .payment-card {
    background: linear-gradient(145deg, rgba(13, 29, 52, .9), rgba(5, 10, 22, .94));
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: 0 22px 65px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .04);
}

.lookup-card { padding: clamp(26px, 5vw, 52px); }
.card-copy { display: flex; gap: 20px; margin-bottom: 36px; }
.card-copy h2 { margin-bottom: 10px; font-size: clamp(26px, 5vw, 42px); letter-spacing: -.04em; }
.card-copy p { max-width: 560px; margin-bottom: 0; color: var(--muted); line-height: 1.6; }
.step { color: var(--accent); font: 700 12px/1 Inter, sans-serif; letter-spacing: .1em; }

form label:first-child { display: block; margin-bottom: 9px; font-weight: 700; font-size: 14px; }
.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input[type='text'], input:not([type]) { min-width: 0; }
#discord-id {
    width: 100%; min-width: 0; height: 58px; padding: 0 18px;
    color: var(--ink); background: rgba(2, 8, 18, .72); border: 1px solid rgba(93, 200, 255, .28); border-radius: 12px;
    outline: none; font-size: 16px; transition: border-color .2s, box-shadow .2s;
}
#discord-id::placeholder { color: #62778a; }
#discord-id:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(73, 200, 255, .13); }
.input-row button, .paypal-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 12px;
    height: 58px; padding: 0 24px; color: #03101b; background: linear-gradient(135deg, #70d7ff, #248cff);
    border: 0; border-radius: 12px; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: transform .2s, background .2s;
}
.input-row button:hover, .paypal-button:hover { background: linear-gradient(135deg, #9ce7ff, #49a4ff); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(36, 140, 255, .25); }
.remember { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: var(--muted); font-size: 14px; cursor: pointer; }
.remember input { width: 17px; height: 17px; accent-color: var(--accent); }
.error { min-height: 20px; margin: 10px 0 0; color: #ff8e9b; font-size: 14px; }
.help { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.help summary { color: var(--ink); font-weight: 600; cursor: pointer; }
.help p { margin: 10px 0 0; line-height: 1.55; }

.state-card, .empty-card { padding: 64px 30px; text-align: center; }
.spinner { width: 35px; height: 35px; margin: 0 auto 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.summary-card {
    display: flex; align-items: center; justify-content: space-between; padding: clamp(26px, 5vw, 46px);
    color: white; background: linear-gradient(125deg, #0c2848, #07101f 68%); border-color: rgba(93, 200, 255, .34); overflow: hidden; position: relative;
}
.summary-card::after { content: ''; position: absolute; width: 180px; height: 180px; right: 16%; top: -95px; border: 28px solid rgba(73, 200, 255, .08); border-radius: 50%; }
.summary-card .eyebrow { color: #7cdbff; }
.summary-card h2 { margin-bottom: 6px; font-size: clamp(42px, 8vw, 70px); letter-spacing: -.055em; }
.person-name { margin: 0; color: #b8c1d3; }
.quiet-button { position: relative; z-index: 1; padding: 10px 15px; color: inherit; background: transparent; border: 1px solid currentColor; border-radius: 9px; cursor: pointer; opacity: .82; }
.quiet-button:hover { opacity: 1; }

.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 46px 2px 16px; }
.section-heading > div { display: flex; align-items: baseline; gap: 14px; }
.section-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.03em; }
.count { color: var(--muted); font-size: 14px; }
.debt-list { border-top: 1px solid var(--line); }
.debt-item { display: grid; grid-template-columns: 44px 1fr auto; gap: 16px; align-items: center; padding: 22px 4px; border-bottom: 1px solid var(--line); }
.debt-number { color: #62778a; font-size: 12px; font-weight: 700; }
.debt-item h3 { margin-bottom: 4px; font-size: 17px; }
.debt-item p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.debt-item strong { color: #7cdbff; font: 700 18px/1 Inter, sans-serif; white-space: nowrap; }

.payment-card { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(320px, 1.3fr); align-items: center; gap: 34px; margin-top: 42px; padding: 28px 30px; }
.payment-card h3 { margin-bottom: 5px; }
.payment-intro > p:last-child { margin-bottom: 0; color: var(--muted); }
.payment-options { display: grid; gap: 12px; }
.paypal-button { width: 100%; white-space: nowrap; }
.bank-transfer { padding: 16px; background: rgba(2, 8, 18, .58); border: 1px solid rgba(93, 200, 255, .2); border-radius: 12px; }
.bank-transfer > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.iban-row { display: flex; align-items: center; gap: 10px; }
.iban-row code { min-width: 0; color: #bceaff; font: 600 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.iban-row button { flex: none; padding: 8px 10px; color: #9bdfff; background: rgba(20, 53, 88, .72); border: 1px solid rgba(93, 200, 255, .28); border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.iban-row button:hover, .iban-row button:focus-visible { color: white; border-color: var(--accent); outline: none; }
.copy-status { min-height: 16px; margin: 7px 0 -4px; color: #75e6d3; font-size: 12px; }
.success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 22px; color: white; background: var(--green); border-radius: 50%; font-size: 28px; }
.empty-card .quiet-button { color: var(--ink); margin-top: 14px; }
footer { padding: 32px 0 0; color: #62778a; text-align: center; font-size: 12px; }

@media (max-width: 640px) {
    .shell { width: min(100% - 20px, 920px); padding-top: 24px; }
    .brand { align-items: flex-start; margin: 0 10px 32px; }
    .home-link { padding: 10px; font-size: 0; }
    .home-link span { font-size: 18px; line-height: 1; }
    .input-row { grid-template-columns: 1fr; }
    .input-row button { width: 100%; }
    .card-copy { display: block; }
    .card-copy .step { display: block; margin-bottom: 12px; }
    .summary-card { align-items: flex-start; }
    .summary-card .quiet-button { margin-top: 4px; }
    .debt-item { grid-template-columns: 30px 1fr; }
    .debt-item strong { grid-column: 2; }
    .payment-card { grid-template-columns: 1fr; align-items: stretch; }
    .paypal-button { width: 100%; }
    .iban-row { align-items: stretch; flex-direction: column; }
}
