html.goji-sn-lock { overflow: hidden; }
.du-ft-cta.is-loading { opacity: .75; cursor: progress; }

.goji-sn {
    --sn-red: var(--du-red, #ae020a);
    --sn-red-d: var(--du-red-d, #8c0108);
    --sn-ink: var(--du-ink, #141a2a);
    --sn-ink-2: var(--du-ink-2, #394155);
    --sn-muted: var(--du-muted, #667085);
    --sn-line: var(--du-line, #e6e9f0);
    --sn-field: #d5dae3;
    --sn-surface: var(--du-surface, #fff);
    --sn-tint: var(--du-tint, #f6f7fa);
    --sn-ok: #12805c;
    width: min(620px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100dvh - 40px);
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: var(--sn-surface);
    color: var(--sn-ink);
    box-shadow: 0 30px 80px -24px rgba(10, 16, 40, .45), 0 0 0 1px rgba(10, 16, 40, .04);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    font-family: var(--du-body, system-ui, sans-serif);
    scrollbar-width: thin;
}
.goji-sn[open] { animation: goji-sn-in .22s cubic-bezier(.2, .8, .2, 1); }
.goji-sn::backdrop { background: rgba(9, 14, 30, .58); backdrop-filter: blur(3px); }
@keyframes goji-sn-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .goji-sn[open] { animation: none; } }

.goji-sn-box { position: relative; padding: 26px 28px 20px; }
.goji-sn *, .goji-sn *::before, .goji-sn *::after { box-sizing: border-box; }
.goji-sn [hidden] { display: none !important; }

.goji-sn-x {
    position: absolute; top: 16px; right: 16px; z-index: 2;
    width: 38px; height: 38px; display: grid; place-items: center;
    margin: 0; padding: 0; border: 1px solid var(--sn-line); border-radius: 50%;
    background: var(--sn-surface); color: var(--sn-ink-2); cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}
.goji-sn-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.goji-sn-x:hover { background: var(--sn-tint); color: var(--sn-red); border-color: currentColor; }

.goji-sn-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: center; padding-right: 44px; margin: 0 0 22px; }
.goji-sn-badge {
    width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in srgb, var(--sn-red) 11%, transparent); color: var(--sn-red);
}
.goji-sn-badge svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.goji-sn-head h2 { margin: 0 0 4px; font-size: 27px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; color: var(--sn-ink); font-family: inherit; }
.goji-sn-head p { margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--sn-muted); }

.goji-sn-form { display: grid; gap: 16px; margin: 0; }
.goji-sn-field { display: grid; gap: 7px; min-width: 0; }
.goji-sn-label { display: block; font-size: 14.5px; font-weight: 700; color: var(--sn-ink); line-height: 1.3; }
.goji-sn-label i { font-style: normal; color: var(--sn-red); }
.goji-sn-input {
    display: block; width: 100%; margin: 0;
    padding: 11px 14px; border: 1px solid var(--sn-field); border-radius: 9px;
    background: var(--sn-surface); color: var(--sn-ink);
    font: inherit; font-size: 15px; line-height: 1.5;
    transition: border-color .15s, box-shadow .15s, background .15s;
    -webkit-appearance: none; appearance: none;
}
.goji-sn-input::placeholder { color: #98a1b2; opacity: 1; }
.goji-sn-input:hover { border-color: #b9c1cf; }
.goji-sn-input:focus { outline: none; border-color: var(--sn-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sn-red) 12%, transparent); }
.goji-sn-area { min-height: 116px; resize: vertical; }
.goji-sn-area--sm { min-height: 80px; }
.goji-sn-field.is-invalid .goji-sn-input { border-color: var(--sn-red); background: color-mix(in srgb, var(--sn-red) 3%, var(--sn-surface)); }
.goji-sn-field.is-valid .goji-sn-input { border-color: color-mix(in srgb, var(--sn-ok) 55%, var(--sn-field)); }

.goji-sn-meta { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.goji-sn-count { margin-left: auto; font-size: 12.5px; color: var(--sn-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.goji-sn-count.is-near { color: var(--sn-red); font-weight: 700; }

.goji-sn-err {
    display: flex; align-items: flex-start; gap: 6px; margin: 0;
    font-size: 13px; line-height: 1.4; color: var(--sn-red); font-weight: 600;
}
.goji-sn-err::before {
    content: "!"; flex: none; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
    display: grid; place-items: center; background: var(--sn-red); color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
}

.goji-sn-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.goji-sn-drop {
    position: relative; min-height: 160px; display: grid;
    border: 1.5px dashed #c8cfdb; border-radius: 12px; background: var(--sn-tint);
    transition: border-color .15s, background .15s, box-shadow .15s; overflow: hidden;
}
.goji-sn-drop:hover, .goji-sn-drop.is-drag { border-color: var(--sn-red); background: color-mix(in srgb, var(--sn-red) 4%, var(--sn-tint)); }
.goji-sn-drop:focus-within { border-color: var(--sn-red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--sn-red) 12%, transparent); }
.goji-sn-drop.has-file { border-style: solid; border-color: var(--sn-field); background: var(--sn-surface); }
.goji-sn-field--photo.is-invalid .goji-sn-drop { border-color: var(--sn-red); }
.goji-sn-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.goji-sn-drop-in {
    display: grid; justify-items: center; align-content: center; gap: 4px;
    padding: 18px 12px 14px; text-align: center; cursor: pointer; min-height: 160px;
}
.goji-sn-drop-ic {
    width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px;
    background: #e3e7ee; color: #7b8494;
}
.goji-sn-drop-ic svg { width: 26px; height: 26px; fill: currentColor; }
.goji-sn-drop-in strong { font-size: 14px; color: var(--sn-ink); font-weight: 700; }
.goji-sn-drop-in small { font-size: 12.5px; color: var(--sn-muted); }
.goji-sn-drop .goji-sn-err--pill {
    margin: 0 12px 12px; padding: 5px 10px; border-radius: 999px; justify-content: center; align-items: center;
    background: color-mix(in srgb, var(--sn-red) 12%, var(--sn-surface)); font-size: 12.5px; text-align: center;
}
.goji-sn-drop .goji-sn-err--pill::before { display: none; }

.goji-sn-preview { display: grid; grid-template-rows: 1fr auto; min-height: 160px; }
.goji-sn-preview img { width: 100%; height: 128px; object-fit: cover; display: block; background: var(--sn-tint); }
.goji-sn-preview-bar { display: grid; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--sn-line); }
.goji-sn-preview-name { font-size: 12px; color: var(--sn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goji-sn-preview-acts { display: flex; gap: 8px; }
.goji-sn-mini {
    flex: 1; display: inline-grid; place-items: center; min-height: 32px; margin: 0; padding: 4px 10px;
    border: 1px solid var(--sn-line); border-radius: 8px; background: var(--sn-surface); color: var(--sn-ink-2);
    font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; line-height: 1.2;
}
.goji-sn-mini:hover { border-color: var(--sn-ink-2); }
.goji-sn-mini--del { color: var(--sn-red); }
.goji-sn-mini--del:hover { border-color: var(--sn-red); background: color-mix(in srgb, var(--sn-red) 6%, var(--sn-surface)); }

.goji-sn-trap { position: absolute !important; left: -10000px !important; top: auto; width: 1px; height: 1px; overflow: hidden; }

.goji-sn-alert {
    margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 13.5px; font-weight: 600; line-height: 1.45;
    background: color-mix(in srgb, var(--sn-red) 9%, var(--sn-surface)); color: var(--sn-red);
    border: 1px solid color-mix(in srgb, var(--sn-red) 25%, transparent);
}

.goji-sn-foot { display: grid; gap: 12px; padding-top: 18px; margin-top: 4px; border-top: 1px solid var(--sn-line); }
.goji-sn-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; max-width: 420px; width: 100%; margin: 0 auto; }
.goji-sn-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 50px; margin: 0; padding: 10px 20px; border-radius: 11px; border: 1px solid transparent;
    font: inherit; font-size: 16px; font-weight: 700; line-height: 1.2; cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.goji-sn-btn:active { transform: translateY(1px); }
.goji-sn-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--sn-red) 22%, transparent); }
.goji-sn-btn--ghost { background: var(--sn-surface); border-color: var(--sn-field); color: var(--sn-ink); }
.goji-sn-btn--ghost:hover { background: var(--sn-tint); border-color: #b9c1cf; }
.goji-sn-btn--primary { background: var(--sn-red); color: #fff; box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--sn-red) 80%, transparent); }
.goji-sn-btn--primary:hover { background: var(--sn-red-d); }
.goji-sn-btn--primary:disabled { cursor: progress; opacity: .9; }
.goji-sn-send { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.goji-sn-spin { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: goji-sn-spin .8s linear infinite; }
.goji-sn-btn.is-busy .goji-sn-send { display: none; }
.goji-sn-btn.is-busy .goji-sn-spin { display: inline-block; }
@keyframes goji-sn-spin { to { transform: rotate(360deg); } }
.goji-sn-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; font-size: 12.5px; color: var(--sn-muted); text-align: center; }
.goji-sn-note svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }

.goji-sn-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 34px 8px 16px; outline: none; }
.goji-sn-done-ic {
    width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 6px;
    background: color-mix(in srgb, var(--sn-ok) 13%, transparent); color: var(--sn-ok);
    animation: goji-sn-pop .35s cubic-bezier(.2, 1.4, .4, 1);
}
.goji-sn-done-ic svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes goji-sn-pop { from { transform: scale(.6); opacity: 0; } }
.goji-sn-done h2 { margin: 0; font-size: 26px; font-weight: 800; color: var(--sn-ink); font-family: inherit; }
.goji-sn-done p { margin: 0 0 14px; max-width: 420px; font-size: 15px; line-height: 1.55; color: var(--sn-muted); }

:root[data-theme="dark"] .goji-sn { --sn-field: #3a4256; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06); }
:root[data-theme="dark"] .goji-sn-drop { border-color: #465069; }
:root[data-theme="dark"] .goji-sn-drop-ic { background: #2a3142; color: #9aa4b8; }
:root[data-theme="dark"] .goji-sn-input::placeholder { color: #7d879b; }

@media (max-width: 640px) {
    .goji-sn {
        width: 100%; height: 100%; max-height: none; max-width: none; margin: 0; border-radius: 0;
        box-shadow: none;
    }
    .goji-sn[open] { animation-name: goji-sn-up; }
    @keyframes goji-sn-up { from { opacity: .6; transform: translateY(24px); } }
    .goji-sn-box { min-height: 100%; padding: 18px 16px 0; display: flex; flex-direction: column; }
    .goji-sn-main { display: flex; flex-direction: column; flex: 1; }
    .goji-sn-form { flex: 1; align-content: start; }
    .goji-sn-x { top: 12px; right: 12px; }
    .goji-sn-head { gap: 12px; margin-bottom: 18px; grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .goji-sn-badge { width: 50px; height: 50px; }
    .goji-sn-badge svg { width: 24px; height: 24px; }
    .goji-sn-head h2 { font-size: 22px; }
    .goji-sn-head p { font-size: 13.5px; }
    .goji-sn-input { font-size: 16px; }
    .goji-sn-foot {
        position: sticky; bottom: 0; z-index: 3; margin: 6px -16px 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--sn-surface); box-shadow: 0 -10px 24px -18px rgba(10, 16, 40, .5);
    }
    .goji-sn-btn { min-height: 48px; font-size: 15px; }
    .goji-sn-done { padding-top: 60px; }
}
@media (max-width: 460px) {
    .goji-sn-photos { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .goji-sn-drop, .goji-sn-drop-in, .goji-sn-preview { min-height: 132px; }
    .goji-sn-preview img { height: 150px; }
    .goji-sn-actions { gap: 10px; }
}

.goji-sn-box { padding-bottom: 0; }
.goji-sn-form { gap: 14px; }
.goji-sn-head { margin-bottom: 18px; }
.goji-sn-badge { width: 62px; height: 62px; }
.goji-sn-area { min-height: 104px; }
.goji-sn-drop, .goji-sn-drop-in, .goji-sn-preview { min-height: 148px; }
.goji-sn-drop-in { padding: 14px 12px 12px; }
.goji-sn-preview img { height: 116px; }
.goji-sn-foot {
    position: sticky; bottom: 0; z-index: 3;
    margin: 2px -28px 0; padding: 14px 28px 16px;
    background: var(--sn-surface);
    box-shadow: 0 -12px 24px -20px rgba(10, 16, 40, .45);
}
.goji-sn-done { padding-bottom: 28px; }
.goji-sn-field.is-invalid .goji-sn-input { border-color: var(--sn-red); box-shadow: inset 0 0 0 1px var(--sn-red); }
.goji-sn-field.is-invalid .goji-sn-input:focus { box-shadow: inset 0 0 0 1px var(--sn-red), 0 0 0 4px color-mix(in srgb, var(--sn-red) 12%, transparent); }
.goji-sn-field--photo.is-invalid .goji-sn-drop { border-width: 2px; }
@media (max-width: 640px) {
    .goji-sn-foot { margin: 6px -16px 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
    .goji-sn-note { font-size: 11.5px; }
    .goji-sn-note svg { width: 12px; height: 12px; }
}
:root[data-theme="dark"] .goji-sn-field--photo.is-invalid .goji-sn-drop,
:root[data-theme="dark"] .goji-sn-drop:hover, :root[data-theme="dark"] .goji-sn-drop.is-drag { border-color: var(--sn-red); }
