:root {
    color-scheme: dark;
    --bg: #070b12;
    --line: rgba(148, 163, 184, .18);
    --muted: #94a3b8;
    --text: #f8fafc;
    --accent: #2dd4a5;
    --shadow: 0 22px 60px rgba(0, 0, 0, .36);
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 12% 5%, rgba(45, 212, 165, .11), transparent 25rem),
        radial-gradient(circle at 88% 92%, rgba(37, 99, 235, .09), transparent 30rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    position: fixed;
    inset: 0;
    pointer-events: none;
    content: "";
    opacity: .025;
    background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
    background-size: 38px 38px;
}

.shell {
    width: min(720px, calc(100% - 28px));
    margin: 0 auto;
    padding: 22px 0 18px;
}

.brand, .result-heading { display: flex; align-items: center; }
.brand { gap: 12px; margin-bottom: 14px; }
.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(45, 212, 165, .42);
    border-radius: 12px;
    background: rgba(45, 212, 165, .09);
    color: var(--accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(22px, 4vw, 28px); letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: clamp(20px, 3vw, 25px); letter-spacing: -.03em; }
.eyebrow { margin-bottom: 3px; color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.lead { margin-bottom: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.panel, .result-panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(155deg, rgba(21, 30, 46, .97), rgba(9, 15, 25, .97));
    box-shadow: var(--shadow);
}

.panel { padding: 22px; }
.panel-copy { padding-right: 150px; }
.result-panel { padding: 20px; }
.has-result .panel { margin-top: 12px; padding: 12px; }
.has-result .panel-copy { display: none; }
.has-result .upload-form { grid-template-columns: minmax(0, 1fr) 160px; margin-top: 0; }
.has-result .drop-zone, .has-result .primary-button { min-height: 54px; }
.has-result .upload-icon { width: 32px; height: 32px; flex-basis: 32px; }
.has-result .upload-icon svg { width: 18px; }
.intro {
    position: absolute;
    top: 23px;
    right: 22px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: #b7c4d5;
    font-size: 11px;
    font-weight: 700;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 11px var(--accent); }

.upload-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 10px;
    margin-top: 17px;
}

.drop-zone {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px dashed rgba(148, 163, 184, .4);
    border-radius: 13px;
    background: rgba(3, 8, 16, .34);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.drop-zone:hover, .drop-zone.is-dragging { border-color: var(--accent); background: rgba(45, 212, 165, .05); transform: translateY(-1px); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { display: block; margin-bottom: 3px; font-size: 14px; }
.drop-zone span, .drop-zone small { color: var(--muted); font-size: 12px; }
.drop-zone small { margin-left: auto; white-space: nowrap; }
.file-copy { min-width: 0; }
#file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: rgba(45, 212, 165, .1);
}
.upload-icon svg { width: 21px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.primary-button {
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 18px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--accent), #22b98f);
    color: #03120e;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 850;
    box-shadow: 0 12px 28px rgba(45, 212, 165, .14);
    transition: filter .2s ease, transform .2s ease;
}
.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:disabled { cursor: wait; filter: saturate(.5); opacity: .7; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.notice { margin: 15px 0 0; padding: 11px 13px; border-radius: 11px; font-size: 13px; line-height: 1.45; }
.notice.error { border: 1px solid rgba(251, 113, 133, .34); background: rgba(251, 113, 133, .09); color: #fecdd3; }
.result-heading { justify-content: space-between; margin-bottom: 13px; }
.result-heading h2 { margin-bottom: 0; }
.verified { padding: 6px 10px; border: 1px solid rgba(45, 212, 165, .28); border-radius: 999px; background: rgba(45, 212, 165, .08); color: var(--accent); font-size: 10px; font-weight: 800; }
.details-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 9px; }
.details-grid div { padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(3, 8, 16, .26); }
.details-grid dt { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.details-grid dd { margin: 0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; font-weight: 750; }
.pin-card {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 13px 18px;
    border: 1px solid rgba(45, 212, 165, .27);
    border-radius: 13px;
    background: linear-gradient(130deg, rgba(45, 212, 165, .1), rgba(17, 147, 111, .02));
}
.pin-card span { color: #b9c9c4; font-size: 10px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.pin-card strong { color: var(--accent); font-family: "SFMono-Regular", Consolas, monospace; font-size: clamp(31px, 7vw, 43px); letter-spacing: .15em; line-height: 1; text-shadow: 0 0 24px rgba(45, 212, 165, .22); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 0; color: var(--muted); font-size: 10px; }
footer strong { color: #cbd5e1; font-size: 11px; }

@media (max-width: 640px) {
    .shell { padding-top: 14px; }
    .panel { padding: 18px; }
    .panel-copy { padding-right: 0; }
    .intro { position: static; margin-bottom: 9px; }
    .upload-form { grid-template-columns: 1fr; margin-top: 14px; }
    .has-result .upload-form { grid-template-columns: 1fr; }
    .primary-button { min-height: 48px; }
    .drop-zone small { display: none; }
    .details-grid { grid-template-columns: 1fr; }
    footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
