:root{
    color-scheme:dark;
    --bg:#0b0b0d;
    --bg-deep:#09090b;
    --surface:#15151a;
    --surface-2:#18181e;
    --surface-3:#101014;
    --text:#fafafa;
    --muted:#a3a5ad;
    --muted-2:#777a84;
    --line:#2b2d33;
    --line-soft:#23252b;
    --brand:#ff2e4d;
    --brand-hover:#ff405c;
    --brand-dark:#2d171e;
    --brand-glow:rgba(255,46,77,.22);
    --success:#49c58b;
    --warning:#f3b24c;
    --danger:#ff647c;
    --shadow:0 30px 90px rgba(0,0,0,.36);
    --radius:26px;
    --radius-sm:18px;
    --shell:1484px;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;background:var(--bg)}
body{
    margin:0;
    min-width:320px;
    min-height:100vh;
    min-height:100dvh;
    color:var(--text);
    background:
        radial-gradient(900px 620px at 6% 27%,rgba(126,25,42,.46),transparent 64%),
        radial-gradient(980px 720px at 100% 70%,rgba(20,35,88,.46),transparent 66%),
        linear-gradient(180deg,#0b0b0d 0%,#09090b 100%);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
    overflow-x:hidden;
}
body::before{
    content:"";
    position:fixed;
    inset:65px 0 0;
    pointer-events:none;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.025) 1px,transparent 1px);
    background-size:60px 60px;
    -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,.82),rgba(0,0,0,.25) 72%,transparent);
    mask-image:linear-gradient(to bottom,rgba(0,0,0,.82),rgba(0,0,0,.25) 72%,transparent);
}
body.is-busy{cursor:progress}
button,input{font:inherit}
button{color:inherit}
a{color:inherit;text-decoration:none}
[hidden]{display:none!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.skip-link{position:fixed;left:12px;top:12px;z-index:1000;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-weight:800;transform:translateY(-180%)}
.skip-link:focus{transform:none}

.site-header{
    position:relative;
    z-index:20;
    height:65px;
    border-bottom:1px solid rgba(255,255,255,.055);
    background:#0b0b0d;
}
.header-inner{
    width:min(var(--shell),calc(100% - 48px));
    height:65px;
    margin-inline:auto;
    display:flex;
    align-items:center;
    justify-content:flex-start;
}
.brand{
    display:inline-flex;
    align-items:center;
    min-width:0;
    border-radius:8px;
    outline:none;
}
.brand img{display:block;width:205px;height:auto;max-width:100%}
.brand:focus-visible{outline:2px solid var(--brand);outline-offset:5px}

.page-shell{
    position:relative;
    z-index:2;
    width:min(920px,calc(100% - 48px));
    margin:0 auto;
    min-height:calc(100vh - 121px);
    min-height:calc(100dvh - 121px);
    display:grid;
    place-items:center;
    padding:72px 0 84px;
}
.upload-card{
    width:100%;
    padding:14px;
    border:1px solid var(--line);
    border-radius:30px;
    background:rgba(21,21,26,.93);
    box-shadow:var(--shadow);
    backdrop-filter:blur(10px);
    -webkit-backdrop-filter:blur(10px);
}
.honeypot{position:fixed!important;left:-10000px!important;top:-10000px!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;pointer-events:none!important}

.dropzone{
    position:relative;
    min-height:410px;
    border:1px dashed #383a42;
    border-radius:22px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    padding:58px 30px;
    overflow:hidden;
    cursor:pointer;
    outline:none;
    background:
        radial-gradient(440px 230px at 50% 0%,rgba(255,46,77,.06),transparent 72%),
        linear-gradient(180deg,#17171c 0%,#131318 100%);
    transition:border-color .2s ease,background .2s ease,transform .2s ease,box-shadow .2s ease;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}
.dropzone::before{
    content:"";
    position:absolute;
    width:360px;
    height:360px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(255,46,77,.09),rgba(255,46,77,0) 68%);
    top:-220px;
    left:50%;
    transform:translateX(-50%);
    pointer-events:none;
}
.dropzone:hover,.dropzone:focus-visible,.dropzone.is-dragging{
    border-color:rgba(255,46,77,.66);
    background:
        radial-gradient(440px 230px at 50% 0%,rgba(255,46,77,.095),transparent 72%),
        linear-gradient(180deg,#19191f 0%,#141419 100%);
    box-shadow:0 0 0 4px rgba(255,46,77,.065),0 22px 60px rgba(0,0,0,.18);
}
.dropzone.is-dragging{transform:scale(1.002)}
.dropzone.is-invalid{border-color:rgba(255,100,124,.65)}
.dropzone input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;pointer-events:none}
.upload-icon{
    position:relative;
    z-index:1;
    width:64px;
    height:64px;
    margin-bottom:24px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,46,77,.18);
    border-radius:19px;
    color:var(--brand);
    background:var(--brand-dark);
    box-shadow:0 12px 32px rgba(0,0,0,.18);
}
.upload-icon svg{width:29px;height:29px}
.dropzone>strong{
    position:relative;
    z-index:1;
    font-size:clamp(28px,4vw,38px);
    line-height:1.06;
    letter-spacing:-.045em;
    font-weight:760;
    color:#fff;
}
.dropzone>span:not(.upload-icon){position:relative;z-index:1;margin-top:11px;color:var(--muted);font-size:15px}
.dropzone>span b{color:var(--brand);font-weight:750}
.dropzone>small{position:relative;z-index:1;margin-top:22px;color:var(--muted-2);font-size:12px;line-height:1.55}

.file-panel{
    margin-top:14px;
    padding:14px;
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    background:#111115;
}
.file-panel-head{min-height:44px;padding:0 4px 11px;display:flex;align-items:center;justify-content:space-between;gap:16px}
.file-panel-head>div{display:flex;align-items:baseline;gap:9px;min-width:0}
.file-panel-head strong{font-size:14px;color:#fff}
.file-panel-head span{color:var(--muted-2);font-size:12px}
.text-button{
    min-height:44px;
    border:0;
    padding:0 12px;
    border-radius:11px;
    background:transparent;
    color:var(--muted);
    cursor:pointer;
    font-size:12px;
    font-weight:680;
    transition:color .18s ease,background .18s ease;
}
.text-button:hover,.text-button:focus-visible{color:#fff;background:#1e1e24;outline:none}
.preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.preview-item{
    min-width:0;
    position:relative;
    padding:8px;
    display:grid;
    grid-template-columns:52px minmax(0,1fr) 36px;
    align-items:center;
    gap:10px;
    border:1px solid var(--line-soft);
    border-radius:14px;
    background:#17171c;
}
.preview-item.is-invalid{border-color:rgba(255,100,124,.45)}
.preview-thumb{width:52px;height:52px;overflow:hidden;display:grid;place-items:center;border-radius:10px;background:#202027;color:var(--muted)}
.preview-thumb img{width:100%;height:100%;display:block;object-fit:cover}
.preview-fallback{font-size:9px;font-weight:800;letter-spacing:.08em}
.preview-copy{min-width:0}
.preview-copy strong,.preview-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.preview-copy strong{font-size:12px;font-weight:650;color:#f4f4f5}
.preview-copy small{margin-top:4px;color:var(--muted-2);font-size:10px}
.preview-item.is-invalid .preview-copy small{color:var(--danger)}
.preview-remove{
    width:36px;
    height:36px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--muted-2);
    cursor:pointer;
    font-size:21px;
    line-height:1;
    transition:color .18s ease,background .18s ease;
}
.preview-remove:hover,.preview-remove:focus-visible{color:#fff;background:#222229;outline:none}

.submit-btn{
    width:100%;
    min-height:58px;
    margin-top:14px;
    padding:0 24px;
    border:1px solid var(--brand);
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    background:var(--brand);
    box-shadow:0 14px 34px rgba(255,46,77,.16);
    color:#fff;
    font-size:14px;
    font-weight:760;
    cursor:pointer;
    transition:transform .18s ease,box-shadow .18s ease,background .18s ease,opacity .18s ease;
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
}
.submit-btn svg{width:19px;height:19px;transition:transform .18s ease}
.submit-btn:not(:disabled):hover{transform:translateY(-1px);background:var(--brand-hover);box-shadow:0 18px 40px rgba(255,46,77,.22)}
.submit-btn:not(:disabled):hover svg{transform:translateX(3px)}
.submit-btn:focus-visible{outline:3px solid rgba(255,46,77,.2);outline-offset:3px}
.submit-btn:disabled{opacity:.34;cursor:not-allowed;box-shadow:none}

.progress-wrap{margin-top:14px;padding:15px 16px;border:1px solid var(--line);border-radius:15px;background:#111115}
.progress-copy{margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.progress-copy strong{font-size:12px;color:#f6f6f7}
.progress-copy span{color:var(--muted);font-size:11px;font-variant-numeric:tabular-nums}
.progress-track{height:5px;overflow:hidden;border-radius:999px;background:#26262c}
.progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:var(--brand);box-shadow:0 0 16px rgba(255,46,77,.45);transition:width .18s ease}

#serverMessages:empty{display:none}
#serverMessages:not(:empty){margin-bottom:14px}
.notice{padding:14px 15px;display:flex;align-items:flex-start;gap:9px;border:1px solid var(--line);border-radius:14px;background:#111115}
.notice strong{font-size:12px;white-space:nowrap}
.notice span{color:var(--muted);font-size:12px;line-height:1.5}
.notice-success{border-color:rgba(73,197,139,.25);background:rgba(19,54,40,.32)}
.notice-warning{border-color:rgba(243,178,76,.25);background:rgba(70,49,17,.28)}
.notice-error{border-color:rgba(255,100,124,.28);background:rgba(69,23,32,.30)}
.notice-success strong{color:var(--success)}
.notice-warning strong{color:var(--warning)}
.notice-error strong{color:var(--danger)}
.upload-ref{margin-left:auto;color:var(--muted-2);font-size:10px;font-variant-numeric:tabular-nums;letter-spacing:.06em;white-space:nowrap}
.result-list{display:grid;gap:7px;margin-top:9px}
.result-row{padding:9px 10px;display:grid;grid-template-columns:8px minmax(0,1fr);gap:9px;align-items:center;border:1px solid var(--line);border-radius:11px;background:#15151a}
.result-state{width:7px;height:7px;border-radius:999px;background:var(--muted-2)}
.result-row.is-error .result-state{background:var(--danger)}
.result-row strong,.result-row small{display:block}
.result-row strong{font-size:11px}
.result-row small{margin-top:2px;color:var(--muted);font-size:10px}

.site-footer{
    position:relative;
    z-index:2;
    min-height:56px;
    padding-bottom:env(safe-area-inset-bottom,0px);
    display:flex;
    align-items:center;
    justify-content:center;
    border-top:1px solid rgba(255,255,255,.05);
    color:#666973;
    font-size:11px;
    background:#0b0b0d;
}

@media(max-width:980px){
    .page-shell{width:min(860px,calc(100% - 40px));padding:58px 0 72px}
    .preview-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:720px){
    body::before{inset:64px 0 0;background-size:44px 44px;opacity:.75}
    .site-header{height:64px}
    .header-inner{width:calc(100% - 32px);height:64px}
    .brand img{width:178px}
    .page-shell{
        width:calc(100% - 28px);
        min-height:calc(100dvh - 120px);
        padding:34px 0 48px;
        place-items:start center;
    }
    .upload-card{padding:10px;border-radius:24px}
    .dropzone{min-height:350px;border-radius:18px;padding:42px 20px}
    .dropzone>strong{font-size:clamp(26px,7.2vw,32px)}
    .preview-grid{grid-template-columns:1fr}
    .submit-btn{min-height:56px}
    .notice{flex-wrap:wrap}
    .upload-ref{width:100%;margin-left:0}
}

@media(max-width:480px){
    .header-inner{width:calc(100% - 24px)}
    .brand img{width:170px}
    .page-shell{width:calc(100% - 20px);padding:24px 0 36px}
    .upload-card{padding:8px;border-radius:21px}
    .dropzone{min-height:315px;border-radius:16px;padding:34px 16px}
    .upload-icon{width:58px;height:58px;border-radius:17px;margin-bottom:21px}
    .upload-icon svg{width:27px;height:27px}
    .dropzone>strong{font-size:27px}
    .dropzone>span:not(.upload-icon){font-size:14px}
    .dropzone>small{max-width:260px;margin-top:18px;font-size:11px}
    .file-panel{padding:9px;border-radius:15px}
    .file-panel-head{padding-inline:2px;gap:8px}
    .file-panel-head>div{display:grid;gap:2px}
    .preview-item{grid-template-columns:50px minmax(0,1fr) 40px;padding:7px}
    .preview-thumb{width:50px;height:50px}
    .preview-remove{width:40px;height:40px}
    .submit-btn{min-height:54px;margin-top:10px;font-size:14px}
    .progress-wrap{margin-top:10px;padding:13px}
    #serverMessages:not(:empty){margin-bottom:10px}
    .notice{padding:12px 13px}
}

@media(max-width:360px){
    .brand img{width:162px}
    .page-shell{width:calc(100% - 16px)}
    .dropzone{min-height:290px;padding:28px 12px}
    .dropzone>strong{font-size:25px}
    .dropzone>span:not(.upload-icon){font-size:13px}
    .preview-copy strong{font-size:11px}
}

@media(hover:none) and (pointer:coarse){
    .dropzone:hover{border-color:#383a42;box-shadow:none}
    .submit-btn:not(:disabled):hover{transform:none;background:var(--brand);box-shadow:0 14px 34px rgba(255,46,77,.16)}
    .submit-btn:not(:disabled):hover svg{transform:none}
    .text-button:hover,.preview-remove:hover{background:transparent}
}

@media(prefers-reduced-motion:reduce){
    html{scroll-behavior:auto}
    *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
