* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #0d1420; color: #e8eefb; font-family: system-ui, sans-serif; display: grid; place-items: center; }
.home { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; align-items: center; max-width: 72rem; padding: 2rem 1.5rem; }
.eyebrow { margin: 0 0 .5rem; color: #5ab0ff; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
h1 { margin: 0 0 1rem; font-size: clamp(1.8rem, 4vw, 2.75rem); line-height: 1.15; }
.lead { margin: 0 0 2rem; color: #b6c3dc; line-height: 1.6; }
.panel { max-width: 22rem; padding: 1.5rem; border-radius: 14px; background: #ffffff10; border: 1px solid #ffffff26; }
.panel h2 { margin: 0 0 1rem; font-size: 1.1rem; }
label { display: block; margin: .75rem 0 .25rem; font-size: .9rem; color: #b6c3dc; }
input { width: 100%; padding: .6rem .75rem; border-radius: 8px; border: 1px solid #ffffff40; background: #0a0f18; color: inherit; font: inherit; }
input:focus-visible, .button:focus-visible, .link:focus-visible { outline: 2px solid #5ab0ff; outline-offset: 2px; }
.button { display: inline-block; margin-top: 1.25rem; padding: .65rem 1.25rem; border: 0; border-radius: 8px; background: #5ab0ff; color: #0d1420; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.link { padding: 0; border: 0; background: none; color: #9fb4d6; font: inherit; text-decoration: underline; cursor: pointer; }
.error { margin: 0; padding: .5rem .75rem; border-radius: 8px; background: #ff6b6b26; color: #ffb4b4; }
.hint { color: #b6c3dc; }
.hero { width: 100%; height: auto; }
@media (max-width: 52rem) { .home { grid-template-columns: 1fr; gap: 2rem; } .hero { order: -1; } }
.listing { display: block; }
.list { max-width: 110rem; margin: 0 auto; padding: 2rem 1.5rem; }
.bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.bar h1 { margin: 0; font-size: 1.8rem; }
.actions { display: flex; align-items: center; gap: 1rem; }
.actions form { margin: 0; }
.button.small { margin: 0; padding: .4rem .9rem; }
.table-wrap { overflow: auto; max-height: calc(100vh - 16rem); min-height: 12rem; border-radius: 14px; border: 1px solid #ffffff26; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid #ffffff14; white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 2; background: #1a2232; color: #b6c3dc; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
tbody th { font-weight: 600; white-space: normal; }
tbody tr:last-child > * { border-bottom: 0; }
tbody tr:hover { background: #ffffff08; }
td a { color: #5ab0ff; }
code { font-size: .85rem; }
.badge { padding: .15rem .6rem; border-radius: 999px; background: #ffffff1a; color: #b6c3dc; font-size: .8rem; }
.badge.on { background: #4ade8026; color: #86efac; }
.narrow { max-width: 40rem; }
.panel.wide { max-width: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
select, textarea { width: 100%; padding: .6rem .75rem; border-radius: 8px; border: 1px solid #ffffff40; background: #0a0f18; color: inherit; font: inherit; }
.check { display: flex; align-items: center; gap: .5rem; margin-top: 1rem; }
.check input { width: auto; }
.check label { margin: 0; color: inherit; }
.thumb { display: block; margin: .5rem 0; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; border: 1px solid #ffffff26; }
.thumb[hidden] { display: none; }
.help { margin: .25rem 0 0; font-size: .8rem; color: #8fa0bd; }
.errorlist { margin: 0; padding: 0; list-style: none; color: #ffb4b4; }
form a { color: #5ab0ff; }
.copy { display: inline-flex; align-items: center; gap: .5rem; padding: .25rem .5rem; margin: -.25rem -.5rem; border: 0; border-radius: 6px; background: none; color: #5ab0ff; font: inherit; cursor: pointer; }
.copy:hover { background: #5ab0ff1f; }
.copy:focus-visible { outline: 2px solid #5ab0ff; outline-offset: 2px; }
.copy .i-ok { display: none; }
.copy.done { color: #86efac; }
.copy.done .i-ok { display: inline; }
.copy.done .i-copy { display: none; }
.layout { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.folders { padding-left: 2.25rem; }
.folders ul { margin: 0 0 1rem; padding: 0; list-style: none; }
.folders li a { display: flex; justify-content: space-between; gap: .5rem; padding: .5rem .75rem; border-radius: 8px; color: #b6c3dc; text-decoration: none; overflow-wrap: anywhere; }
.folders li a:hover { background: #ffffff10; }
.folders li a[aria-current] { background: #5ab0ff26; color: #fff; }
.count { color: #8fa0bd; font-size: .85rem; }
.folder-action { display: block; padding: .35rem .75rem; color: #5ab0ff; font-size: .9rem; text-decoration: none; }
.folder-action:hover { text-decoration: underline; }
@media (max-width: 52rem) { .layout { grid-template-columns: 1fr; } }
.folder-form { margin: 0; }
.folder-form select { width: auto; max-width: 12rem; padding: .3rem .5rem; font-size: .9rem; }
.folders ul.sub { margin: 0 0 .25rem 1rem; padding-left: .5rem; border-left: 1px solid #ffffff26; }
.folders ul.sub li a { padding: .35rem .75rem; font-size: .92rem; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.pager a { color: inherit; }
.folders summary { position: relative; display: flex; align-items: center; cursor: pointer; list-style: none; }
.folders summary::-webkit-details-marker { display: none; }
.folders summary::before { content: "▸"; position: absolute; left: -2.25rem; width: 2.25rem; top: 50%; transform: translateY(-50%); font-size: 2rem; line-height: 1; text-align: center; color: #8fa0bd; }
.folders details[open] > summary::before { content: "▾"; }
.folders summary a { flex: 1; }
.button.danger { background: #f87171; }
.delete-list { max-height: 20rem; overflow-y: auto; padding-left: 1.25rem; }
.messages { margin: 0 0 1rem; padding: 0; list-style: none; }
.messages li { padding: .6rem .9rem; border-radius: 8px; background: #4ade8026; color: #86efac; }
.messages li.warning { background: #facc1526; color: #fde68a; }
.bulk { display: flex; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.bulk .button { margin: 0; }
td.pick, th.pick { width: 3rem; }
.pick input[type=checkbox] { width: 1rem; height: 1rem; padding: 0; margin: 0; cursor: pointer; }
th a.sort { color: inherit; text-decoration: none; white-space: nowrap; }
th a.sort:hover { text-decoration: underline; }
.folder-picker { margin: 1rem 0 0; padding: 0 1rem 1rem; border: 1px solid #ffffff26; border-radius: 10px; }
.folder-picker legend { padding: 0 .4rem; color: #b6c3dc; font-size: .9rem; }
.folder-picker [hidden] { display: none; }
.new-folder { margin-top: .6rem; }
.new-folder summary { cursor: pointer; color: #5ab0ff; font-size: .9rem; }
.new-folder input { margin-top: .5rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; align-items: end; margin-bottom: .75rem; }
.filters label { margin-top: 0; }
.filter-actions { display: flex; gap: 1rem; align-items: center; }
.filter-actions .button { margin: 0; }
.result-count { margin: 0 0 .75rem; font-size: .9rem; }
td:last-child:not(.pick), thead th:last-child { position: sticky; right: 0; background: #131b29; box-shadow: -1px 0 0 #ffffff14; }
thead th:last-child { z-index: 3; background: #1a2232; }
