:root { --blue: #2F669B; --title: #12263b; --text: #2b3d50; --muted: #6b7c8f; --panel: #f3f7fb; --line: #e3ecf5; --bad: #a33a3a; }
[hidden] { display: none !important; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--panel); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
h1 { margin: 0; font-size: 22px; color: var(--title); }
h2 { margin: 24px 0 8px; font-size: 17px; color: var(--title); }
h2:first-child { margin-top: 0; }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.top { max-width: 760px; margin: 0 auto; padding: 24px 16px 16px; display: flex; align-items: center; justify-content: space-between; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 24px; margin-bottom: 16px; }
.narrow { max-width: 380px; margin: 12vh auto 16px; }
.muted { color: var(--muted); font-size: 14px; margin: 4px 0; }
.center { text-align: center; }
label { display: block; font-size: 14px; margin-bottom: 6px; }
input[type=password], input#folder { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #c9d6e4; border-radius: 12px; color: var(--title); }
input:focus, button:focus-visible, .drop:focus-visible { outline: 3px solid rgba(47,102,155,.35); outline-offset: 1px; }
button { font: inherit; font-weight: 600; background: var(--blue); color: #fff; border: 0; border-radius: 12px; padding: 10px 18px; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.ghost { background: transparent; color: var(--blue); border: 1px solid var(--line); }
button.small { padding: 6px 12px; font-size: 14px; }
form button[type=submit] { margin-top: 12px; width: 100%; }
.top form button[type=submit] { width: auto; margin: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check input { margin-top: 4px; }
code { background: var(--panel); border-radius: 6px; padding: 1px 6px; font-size: 13px; }
.drop { margin-top: 12px; border: 2px dashed #b9cde2; border-radius: 16px; padding: 28px 16px; text-align: center; cursor: pointer; background: #fafcfe; }
.drop.over { border-color: var(--blue); background: #eef4fa; }
.drop p { margin: 4px 0; }
.msg { color: var(--bad); font-size: 14px; margin: 8px 0 0; }
.items { list-style: none; margin: 16px 0 0; padding: 0; }
.items li { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.items img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; background: var(--panel); }
.items .url { width: 100%; font: 13px/1.4 ui-monospace, Menlo, monospace; border: 0; background: transparent; color: var(--title); padding: 0; }
.items .meta { font-size: 13px; color: var(--muted); }
.items .err { color: var(--bad); font-size: 14px; }
@media (max-width: 560px) { .items li { grid-template-columns: 56px 1fr; } .items img { width: 56px; } }
.folders { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.folder-list { display: contents; }
.folder { display: flex; align-items: center; gap: 10px; min-width: 160px; height: 56px; padding: 0 18px; background: #fff; color: var(--title); border: 1px solid #c9d6e4; border-radius: 14px; font-weight: 600; }
.folder:hover { filter: none; border-color: var(--blue); }
.folder svg { width: 22px; height: 22px; flex: none; color: var(--muted); }
.folder[aria-checked=true] { background: #eef4fa; border: 2px solid var(--blue); padding: 0 17px; color: var(--blue); }
.folder[aria-checked=true] svg { color: var(--blue); }
.folder.add { min-width: 56px; width: 56px; justify-content: center; padding: 0; font-size: 26px; font-weight: 400; color: var(--blue); border-style: dashed; }
.new-folder { display: flex; gap: 8px; margin-top: 12px; }
.new-folder input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid #c9d6e4; border-radius: 12px; color: var(--title); }
.new-folder button[type=submit] { width: auto; margin: 0; }
@media (max-width: 560px) { .folder { min-width: 0; flex: 1 1 140px; } .new-folder { flex-wrap: wrap; } }
/* bottom pixel squares (pixels.js): fixed behind the content, never catch clicks */
.pixels { position: fixed; left: 0; bottom: 0; width: 100vw; z-index: 0; pointer-events: none; }
.top, main, .narrow, body > noscript { position: relative; z-index: 1; }
main { padding-bottom: 32vh; }
body.login main { padding-bottom: 24px; } /* the login card keeps its own inner padding */
.items .actions { display: flex; gap: 8px; align-items: center; }
button.icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 33px; padding: 0; }
button.icon svg { width: 18px; height: 18px; }
button.delete { background: #fff; color: var(--bad); border: 1px solid #ecd3d3; }
button.delete:hover { background: #fbf1f1; filter: none; }
button:disabled { opacity: .45; cursor: default; }
button.danger { background: var(--bad); }
.confirm { border: 0; border-radius: 20px; padding: 28px; max-width: 420px; width: calc(100% - 32px); color: var(--text); box-shadow: 0 24px 60px rgba(18, 38, 59, .25); }
.confirm::backdrop { background: rgba(18, 38, 59, .45); }
.confirm h2 { margin: 0 0 16px; }
.confirm img { display: block; width: 100%; max-height: 200px; object-fit: contain; background: var(--panel); border-radius: 12px; }
.confirm-name { font: 13px/1.4 ui-monospace, Menlo, monospace; color: var(--title); margin: 12px 0 4px; word-break: break-all; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.confirm-actions button { width: auto; margin: 0; }
@media (max-width: 560px) { .items .actions { grid-column: 1 / -1; } .items .actions .copy { flex: 1; } }
