@font-face {
    font-family: Inter;
    src: url('?asset=font.woff2&v=1.1.0') format('woff2');
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}
:root {
    color-scheme: dark;
    --bg: #10151d;
    --panel: #19212d;
    --surface: #131b26;
    --raised: #222e3c;
    --line: #344152;
    --soft-line: #2b3746;
    --ink: #edf2f8;
    --muted: #a8b6c8;
    --quiet: #94a4b9;
    --blue: #538ff3;
    --bright: #9dc5ff;
    --mint: #73d5be;
    --bad: #ff9e9f;
    --radius: 9px;
    font-family: Inter, 'Segoe UI', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.5;
}
* {
    box-sizing: border-box;
}
html {
    min-height: 100%;
}
body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}
button,
input,
textarea,
select {
    font: inherit;
}
button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.47rem;
    padding: 0.46rem 0.8rem;
    min-height: 2.24rem;
    font-size: 0.875rem;
    font-weight: 570;
    line-height: 1.25;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--ink);
    white-space: nowrap;
    text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #8cc4ff;
    outline-offset: 3px;
}
button:disabled {
    cursor: default;
    opacity: 0.52;
}
button:disabled:hover {
    filter: none;
}
.primary {
    background: #2769d3;
    border-color: #437edf;
    color: white;
}
.primary:hover:enabled {
    background: #3377df;
}
.quiet,
.button-link {
    background: var(--raised);
    border-color: #3a495c;
}
.quiet:hover:enabled,
.button-link:hover {
    background: #2c3b4d;
}
.text-button,
.icon-button,
.nav-item {
    background: transparent;
}
.text-button {
    padding: 0.35rem 0.45rem;
    color: var(--bright);
    min-height: 2rem;
}
.text-button:hover:enabled {
    background: #263447;
}
.icon-button {
    width: 2.15rem;
    height: 2.15rem;
    min-height: 0;
    padding: 0;
    color: var(--muted);
}
.icon-button:hover:enabled,
.subtle {
    background: var(--raised);
    color: var(--ink);
}
.icon {
    height: 1.1rem;
    width: 1.1rem;
    display: block;
    flex: none;
}
.topbar {
    background: #141b25;
    border-bottom: 1px solid var(--line);
}
.bar-inner,
.workspace,
footer {
    width: min(100% - 3.2rem, 72rem);
    margin: 0 auto;
}
.bar-inner {
    min-height: 3.85rem;
    display: flex;
    align-items: center;
    gap: 2.4rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.56rem;
    font-size: 1.05rem;
    font-weight: 750;
    white-space: nowrap;
    letter-spacing: -0.033em;
}
.brand img {
    width: 2rem;
    height: 2rem;
}
.brand b {
    font-weight: 520;
    color: #c9d5e5;
    letter-spacing: -0.035em;
}
nav {
    display: flex;
    gap: 0.35rem;
    align-self: stretch;
    align-items: center;
}
.nav-item {
    height: 2.15rem;
    min-height: 2.15rem;
    padding: 0.4rem 0.7rem;
    color: var(--muted);
    font-size: 0.875rem;
}
.nav-item:hover {
    background: var(--raised);
}
.nav-item.active {
    background: #20364f;
    color: #aecfff;
}
.nav-item .icon {
    width: 1rem;
    height: 1rem;
}
.bar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.24rem;
}
.bar-actions form {
    margin: 0;
}
.workspace {
    flex: 1;
    padding: 2.05rem 0 2.7rem;
}
h1,
h2,
h3,
p {
    margin: 0;
}
h1 {
    font-size: clamp(1.5rem, 2.2vw, 1.9rem);
    line-height: 1.21;
    font-weight: 670;
    letter-spacing: -0.045em;
}
h2 {
    font-size: 1.015rem;
    font-weight: 640;
    letter-spacing: -0.023em;
}
h3 {
    font-size: 1.12rem;
    font-weight: 620;
    letter-spacing: -0.028em;
}
.page-head,
.panel-head,
.output-head,
.dialog-head,
.progress-label,
.pagination,
.file-spec,
.selection-bar,
.target-album,
.button-row,
.queue-line,
.album-line {
    display: flex;
    align-items: center;
}
.page-head {
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.55rem;
}
.page-head p,
.muted {
    color: var(--muted);
}
.page-head p {
    font-size: 0.925rem;
    margin-top: 0.27rem;
}
.card {
    background: var(--panel);
    border: 1px solid var(--soft-line);
    border-radius: var(--radius);
}
.upload-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(17.5rem, 1fr);
    gap: 1rem;
    align-items: start;
}
.left-stack {
    display: grid;
    gap: 1rem;
    min-width: 0;
}
.panel-head {
    min-height: 3.48rem;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.65rem 1.1rem;
    border-bottom: 1px solid var(--soft-line);
}
.panel-head h2 {
    display: flex;
    align-items: center;
    gap: 0.53rem;
    white-space: nowrap;
}
.panel-head h2 > .icon {
    color: #98b5d4;
}
.target-album {
    gap: 0.36rem;
    min-width: 0;
}
.target-album label,
.file-spec,
.output-head > span,
.queue-empty,
.progress-detail,
.pagination span,
small,
.selection-bar > span {
    color: var(--quiet);
    font-size: 0.8rem;
}
.target-album select {
    max-width: 11rem;
    min-height: 1.95rem;
    font-size: 0.82rem;
}
.target-album .icon-button {
    width: 1.95rem;
    height: 1.95rem;
}
label {
    font-size: 0.875rem;
    font-weight: 530;
}
select,
input:not([type='checkbox']),
textarea {
    border: 1px solid #3b495c;
    color: var(--ink);
    background: var(--surface);
    border-radius: 5px;
    font-size: 0.9rem;
}
input:not([type='checkbox']),
select {
    min-height: 2.26rem;
    padding: 0.38rem 0.64rem;
}
select {
    appearance: none;
    background-image: url('?asset=chevron.svg&v=1.1.0');
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 14px;
    padding-right: 1.7rem;
    max-width: 100%;
    text-overflow: ellipsis;
}
input::placeholder,
textarea::placeholder {
    color: #8e9db1;
    opacity: 1;
}
.dropzone {
    margin: 1.04rem 1.12rem 0.55rem;
    padding: 1.55rem 1rem;
    background: #162231;
    border: 1px dashed #4d6e97;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition:
        border-color 0.15s,
        background 0.15s;
}
.dropzone.over {
    background: #1b3553;
    border-color: #93c3ff;
    outline: 2px solid #799bd2;
    outline-offset: -2px;
}
.dropzone h3 {
    margin: 0.65rem 0 0.2rem;
}
.dropzone p {
    font-size: 0.86rem;
    color: var(--muted);
    line-height: 1.65;
}
.dropzone button {
    margin-top: 0.9rem;
}
.upload-symbol,
.auth-symbol,
.empty-icon {
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: #a7cfff;
    background: #223c5c;
    width: 2.8rem;
    height: 2.8rem;
}
.upload-symbol .icon,
.auth-symbol .icon,
.empty-icon .icon {
    width: 1.5rem;
    height: 1.5rem;
}
kbd {
    padding: 0.05rem 0.24rem;
    font:
        500 0.74rem/1.3 Inter,
        'Segoe UI',
        sans-serif;
    border: 1px solid #43536a;
    border-radius: 3px;
    color: #ced8e7;
    background: #223042;
}
.file-spec {
    padding: 0 1.16rem 0.84rem;
    gap: 0.35rem;
    justify-content: space-between;
    flex-wrap: wrap;
}
.count {
    font-size: 0.74rem;
    font-weight: 620;
    min-width: 1.32rem;
    line-height: 1.22rem;
    text-align: center;
    background: #2a384a;
    color: #bfcee0;
    border-radius: 5px;
}
.queue-empty {
    padding: 1.1rem;
    font-size: 0.875rem;
}
.panel-body,
.dialog-body {
    padding: 1.08rem;
}
.panel-body > label,
.output-head label {
    display: block;
}
.panel-body > select,
.form-stack input,
.form-stack select,
.dialog-body > .format-select {
    width: 100%;
}
.panel-body > select {
    margin-top: 0.35rem;
}
.output-head {
    justify-content: space-between;
    gap: 0.5rem;
    margin: 1.05rem 0 0.35rem;
}
textarea.link-output {
    resize: vertical;
    min-height: 6rem;
    max-height: 28rem;
    padding: 0.65rem 0.74rem;
    width: 100%;
    display: block;
    font:
        400 0.81rem/1.65 'Cascadia Code',
        Consolas,
        ui-monospace,
        monospace;
    background: #101923;
    color: #c1d7f4;
}
.wide {
    width: 100%;
    margin-top: 0.78rem;
}
.wide:disabled {
    background: #29394d;
    color: #b2c1d5;
    border-color: #38495b;
    opacity: 0.78;
}
#progress-panel {
    padding: 0.8rem 1.1rem;
    border-bottom: 1px solid var(--soft-line);
}
.progress-label {
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--muted);
}
.progress-label strong {
    color: #dfe9f6;
    font-weight: 560;
}
progress {
    display: block;
    margin: 0.36rem 0;
    width: 100%;
    height: 5px;
    border: none;
    border-radius: 4px;
    appearance: none;
    background: #2e3a4b;
    color: var(--blue);
    overflow: hidden;
}
progress::-webkit-progress-bar {
    background: #2e3a4b;
    border-radius: 4px;
}
progress::-webkit-progress-value {
    background: var(--blue);
    border-radius: 4px;
}
progress::-moz-progress-bar {
    background: var(--blue);
    border-radius: 4px;
}
.queue-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.queue-row {
    padding: 0.64rem 1.1rem;
    border-bottom: 1px solid var(--soft-line);
}
.queue-row:last-child {
    border: 0;
}
.queue-line {
    gap: 0.7rem;
}
.queue-img {
    width: 2.65rem;
    height: 2.25rem;
    object-fit: contain;
    background: #101923;
    border-radius: 4px;
}
.queue-info {
    min-width: 0;
    flex: 1;
}
.queue-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.88rem;
    font-weight: 560;
}
.queue-meta {
    font-size: 0.76rem;
    color: var(--quiet);
}
.queue-status {
    font-size: 0.78rem;
    color: #b8ceec;
    white-space: nowrap;
}
.done .queue-status {
    color: var(--mint);
}
.failed .queue-status,
.danger-text {
    color: var(--bad);
}
.queue-error {
    color: var(--bad);
    font-size: 0.8rem;
    margin: 0.3rem 0;
}
.queue-row progress {
    margin: 0.43rem 0 0;
}
.queue-slot {
    min-width: 1.9rem;
    display: flex;
    justify-content: center;
}
.queue-slot > .icon {
    color: var(--mint);
}
.media-tools {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
}
.search-box {
    position: relative;
    min-width: 9rem;
    flex: 1;
}
.search-box > .icon {
    position: absolute;
    left: 0.65rem;
    top: 0.65rem;
    color: var(--quiet);
}
.search-box input {
    width: 100%;
    padding-left: 2.1rem;
}
.filter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.82rem;
}
.filter select {
    max-width: 14rem;
}
.selection-bar {
    flex-wrap: wrap;
    gap: 0.7rem;
    padding: 0.72rem 0.1rem;
    min-height: 3.65rem;
}
.selection-bar .button-row {
    margin-left: auto;
}
.button-row {
    flex-wrap: wrap;
    gap: 0.44rem;
}
.check {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    color: var(--muted);
    font-size: 0.84rem;
    cursor: pointer;
}
input[type='checkbox'] {
    accent-color: #5d9cff;
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    margin: 0;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr));
    gap: 0.82rem;
}
.image-card {
    overflow: hidden;
    position: relative;
    min-width: 0;
}
.image-card.checked {
    border-color: var(--blue);
}
.thumb-button {
    display: block;
    padding: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--soft-line);
    aspect-ratio: 1.85;
    background: #111824;
}
.thumb-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.thumb-button:focus-visible {
    outline-offset: -3px;
}
.tile-check {
    position: absolute;
    top: 0.48rem;
    left: 0.48rem;
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    background: #15202feb;
    border: 1px solid #46566c;
    border-radius: 4px;
}
.tile-info {
    padding: 0.52rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.tile-caption {
    flex: 1;
    min-width: 0;
}
.tile-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    font-size: 0.88rem;
}
.tile-meta {
    font-size: 0.75rem;
    color: var(--quiet);
}
.tile-info .icon-button {
    width: 1.9rem;
    height: 1.9rem;
}
.empty-view {
    text-align: center;
    padding: 2rem 1rem;
}
.empty-icon {
    margin: 0 auto 0.7rem;
}
.empty-view p {
    font-size: 0.87rem;
    color: var(--muted);
    margin-top: 0.25rem;
}
.pagination {
    justify-content: center;
    gap: 1rem;
    margin: 1.25rem 0;
}
.auth-wrap {
    flex: 1;
    display: grid;
    place-items: start center;
    padding: clamp(2rem, 11vh, 8rem) 1rem 2rem;
}
.auth {
    width: min(100%, 25.3rem);
    padding: 1.65rem;
}
.auth-symbol {
    margin-bottom: 1rem;
}
.auth h1 {
    font-size: 1.55rem;
}
.auth-lead {
    font-size: 0.9rem;
    margin: 0.5rem 0 1.25rem;
}
.form-stack {
    display: grid;
    gap: 0.77rem;
}
.form-stack label {
    display: grid;
    gap: 0.28rem;
}
.form-stack small {
    margin-top: -0.36rem;
}
.form-stack > .primary {
    margin-top: 0.35rem;
}
.inline-error {
    background: #40292f;
    border: 1px solid #78454e;
    border-radius: 5px;
    color: #ffc4c4;
    font-size: 0.87rem;
    padding: 0.65rem 0.75rem;
    margin: 0.7rem 0;
}
dialog {
    width: min(92vw, 30rem);
    padding: 0;
    border: 1px solid #415269;
    border-radius: 9px;
    background: var(--panel);
    color: var(--ink);
    box-shadow: 0 16px 60px #0008;
    max-height: 88dvh;
    overflow: auto;
}
dialog::backdrop {
    background: #060b13ba;
}
dialog.wide-dialog {
    width: min(94vw, 43rem);
}
.dialog-head {
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.62rem 1rem;
    border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
    min-width: 0;
    overflow-wrap: anywhere;
}
.dialog-body p {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 0.85rem;
}
.dialog-body label:not(.check) {
    display: grid;
    gap: 0.3rem;
}
.dialog-body > .button-row,
.dialog-body form > .button-row {
    margin-top: 1rem;
    justify-content: flex-end;
}
.dialog-body .link-output {
    margin-top: 0.7rem;
}
.danger {
    background: #66353e;
    border-color: #93505c;
    color: #ffe1e2;
}
.danger:enabled:hover {
    background: #7e414b;
}
.album-line {
    gap: 0.45rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--soft-line);
}
.album-line > span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.88rem;
}
.album-line small {
    margin-left: 0.4rem;
}
.dialog-preview {
    width: 100%;
    display: block;
    max-height: 40vh;
    object-fit: contain;
    background: #101720;
    border-radius: 5px;
    margin-bottom: 0.6rem;
}
.notification {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.65rem 1rem;
    border-radius: 7px;
    font-size: 0.89rem;
    background: #213d38;
    color: #d4fff1;
    border: 1px solid #46766d;
    z-index: 8;
    max-width: min(94vw, 40rem);
    box-shadow: 0 4px 22px #0005;
}
.notification.bad {
    background: #38272e;
    color: #ffd0d2;
    border-color: #92535c;
}
footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0.03rem;
    border-top: 1px solid var(--soft-line);
    color: var(--quiet);
    font-size: 0.76rem;
}
.foot-dot {
    margin: 0 0.17rem;
}
[hidden] {
    display: none !important;
}
@media (max-width: 830px) {
    .bar-inner,
    .workspace,
    footer {
        width: calc(100% - 2rem);
    }
    .upload-layout {
        grid-template-columns: minmax(0, 1.38fr) minmax(14.5rem, 1fr);
    }
    .target-album label {
        display: none;
    }
    .media-tools {
        flex-wrap: wrap;
    }
    .search-box {
        flex-basis: 100%;
    }
    .filter {
        flex: 1;
    }
    .filter select {
        flex: 1;
        max-width: none;
        min-width: 0;
    }
    .bar-inner {
        gap: 1.35rem;
    }
}
@media (max-width: 660px) {
    .bar-inner {
        flex-wrap: wrap;
        gap: 0.2rem 0.7rem;
        padding-top: 0.55rem;
    }
    .brand {
        margin-right: auto;
    }
    .bar-actions {
        order: 1;
    }
    .bar-inner nav {
        order: 2;
        width: 100%;
        padding: 0.3rem 0;
    }
    .workspace {
        padding: 1.35rem 0 1.7rem;
    }
    .upload-layout {
        grid-template-columns: 1fr;
    }
    .page-head {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-bottom: 1rem;
        gap: 0.74rem;
    }
    .page-head > .quiet {
        display: none;
    }
    .panel-head,
    .panel-body {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }
    .dropzone {
        margin: 0.85rem 0.85rem 0.55rem;
        padding: 1.22rem 0.6rem;
    }
    .target-album label {
        display: block;
    }
    .selection-bar .button-row {
        width: 100%;
        margin: 0;
    }
    .media-tools {
        gap: 0.58rem;
        padding: 0.67rem;
    }
    .filter {
        font-size: 0.78rem;
    }
    .filter select {
        font-size: 0.8rem;
    }
    .image-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
        gap: 0.6rem;
    }
    .notification {
        width: max-content;
    }
    footer {
        padding-bottom: 0.8rem;
    }
}
@media (max-width: 390px) {
    .target-album label,
    .filter > span {
        display: none;
    }
    .bar-inner,
    .workspace,
    footer {
        width: calc(100% - 1.3rem);
    }
    .target-album select {
        max-width: 7.9rem;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}