:root { color-scheme: light dark; --bg:#f2f5f7; --panel:#fff; --ink:#15232d; --soft:#556570; --line:#d3dce2; --accent:#0b6b61; --on:#fff; --bad:#b3261e; --warn:#fff3d6; --ok:#dcf3ea; }
@media (prefers-color-scheme: dark) { :root { --bg:#10191f; --panel:#18242c; --ink:#e6eef2; --soft:#9fb0bb; --line:#2f404b; --accent:#58cdbd; --on:#08211d; --bad:#ff8a80; --warn:#41350f; --ok:#123c30; } }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
h1 { font-size: 1.25rem; margin: 0; } h2 { font-size: 1.1rem; margin: 0 0 .3rem; } h3 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: .9rem clamp(1rem, 3vw, 2rem); background: var(--panel); border-bottom: 1px solid var(--line); }
main { padding: 1.5rem clamp(1rem, 3vw, 2rem) 4rem; max-width: 1500px; margin: auto; }
input, select, button { font: inherit; color: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); padding: .5rem .65rem; min-height: 40px; }
button { cursor: pointer; font-weight: 600; } button:disabled { opacity: .55; cursor: default; }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.hint { color: var(--soft); margin: 0 0 .9rem; } .actions .hint { margin: 0; }
.error { color: var(--bad); margin: .6rem 0; min-height: 1.5em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.import { margin: 0 0 1rem; } .import .hint { margin: .5rem 0; }
.filebtn { display: inline-block; cursor: pointer; font-weight: 600; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; padding: .5rem .8rem; }
#files:focus-visible { outline: none; } .import:has(#files:focus-visible) .filebtn { outline: 2px solid var(--accent); outline-offset: 2px; }
.import:has(#files:disabled) .filebtn { opacity: .55; cursor: default; }
#importStatus { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; overflow-wrap: anywhere; }
.tablewrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th, td { padding: .4rem; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: .85rem; color: var(--soft); } tbody tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { width: 3rem; text-align: center; color: var(--soft); }
td input, td select { width: 100%; } td:nth-child(5) { width: 6.5rem; } td:last-child { width: 6.5rem; }
.invalid { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
#recent { margin-top: 2rem; } #recentList { list-style: none; padding: 0; display: grid; gap: .4rem; justify-items: start; }
.bar { display: flex; justify-content: space-between; align-items: end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
#filter { width: min(100%, 24rem); }
.notice { background: var(--warn); border-radius: 6px; padding: .7rem .9rem; margin: 0 0 1rem; }
#cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 390px), 1fr)); gap: 1rem; align-items: start; }
.card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: var(--bg); height: 230px; }
.gallery a { flex: 0 0 100%; scroll-snap-align: start; } .gallery img { width: 100%; height: 230px; object-fit: cover; display: block; }
.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--soft); }
.gallery .empty img, img.load { width: 22px; height: 22px; object-fit: contain; display: inline-block; vertical-align: middle; }
.gallery .empty img { width: 44px; height: 44px; }
.cardhead { padding: .9rem 1rem; display: grid; gap: .3rem; } .cardhead p { margin: 0; color: var(--soft); overflow-wrap: anywhere; }
.status { display: inline-flex; gap: .45rem; align-items: center; justify-self: start; font-size: .85rem; border-radius: 5px; padding: .15rem .5rem; background: var(--bg); }
.status.done { background: var(--ok); } .status.bad { background: var(--warn); }
.card details { border-top: 1px solid var(--line); } summary { cursor: pointer; font-weight: 600; padding: .65rem 1rem; }
dl { margin: 0; padding: 0 1rem .8rem; } dl div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .8rem; padding: .3rem 0; border-bottom: 1px solid var(--line); }
dl div:last-child { border-bottom: 0; } dt { color: var(--soft); } dt, dd { overflow-wrap: anywhere; } dd { margin: 0; white-space: pre-wrap; } dd a { color: var(--accent); }
.missing { color: var(--soft); font-style: italic; }
#other { margin-top: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; } #other .hint { padding: 0 1rem; } pre { margin: 0; padding: 1rem; max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
