:root { --ink: #222; --muted: #777; --line: #e3e0da; --bg: #faf8f4; --card: #fff; --accent: #2f6f5e; --warn: #b5522b; }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 60rem; margin: 0 auto; padding: 1rem; }
a { color: var(--accent); }
h1 { font-size: 1.5rem; margin: .5rem 0 1rem; }
h2 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
code { font-size: .8em; color: var(--muted); }
.muted { color: var(--muted); }
.err { color: var(--warn); font-weight: 600; }
.count { font-size: .75em; color: var(--muted); font-weight: normal; }

/* the bar */
.bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
       gap: .4rem 1rem; padding: .5rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
.bar .links { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; }
.bar .links a, .filters a { padding: .3rem .65rem; border-radius: .4rem; text-decoration: none; }
.bar .links a.on, .filters a.on { background: var(--accent); color: #fff; }
.bar .sep { width: 1px; height: 1.3rem; background: var(--line); margin: 0 .3rem; }
.bar .me { color: var(--muted); font-size: .9em; }

/* forms */
.card { max-width: 24rem; margin: 3rem auto; padding: 1.5rem; background: var(--card); border: 1px solid var(--line); border-radius: .6rem; }
label { display: block; margin: .8rem 0; }
input[name], button { display: block; width: 100%; margin-top: .25rem; padding: .55rem; font: inherit; border: 1px solid #ccc; border-radius: .4rem; }
button { background: var(--accent); color: #fff; border: 0; cursor: pointer; margin-top: 1.2rem; }

/* one row: picture + name | checkbox | the others */
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(8rem, 18rem) 3rem 1fr; align-items: center; gap: 1rem;
        padding: .75rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 4rem; }
.item:target { background: #fff6d8; }
.item figure { margin: 0; }
.item img { display: block; width: 100%; max-height: 18rem; object-fit: contain; background: #eee; border-radius: .3rem; }
.item figcaption { margin-top: .3rem; }
.item figcaption code { display: block; }
.item .note { display: block; font-size: .9em; color: var(--muted); }
.tick { margin: 0; text-align: center; }
.tick input { width: 1.6rem; height: 1.6rem; cursor: pointer; accent-color: var(--accent); }
.others { color: var(--warn); }
.item.mine figcaption strong { color: var(--accent); }
@media (max-width: 30rem) { .item { grid-template-columns: 9rem 2.5rem 1fr; gap: .6rem; } }

/* manifest and log */
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
td, th { padding: .4rem .6rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.manifest img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: .25rem; display: block; }
.manifest tr.many td:last-child, .summary .many { color: var(--warn); font-weight: 600; }
.manifest tr.none td:last-child, .summary .none { color: var(--muted); }
.manifest th, .manifest td:first-child { white-space: nowrap; width: 1%; }
.log td { white-space: nowrap; }
.log td:last-child { width: 100%; white-space: normal; }
.log .when { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.log tr.w-check td:nth-child(3) { color: var(--accent); }
.log tr.w-uncheck td:nth-child(3), .log tr.w-delete td:nth-child(3), .log tr.w-login-failed td:nth-child(3) { color: var(--warn); }
.filters { display: flex; gap: .3rem; }
