:root {
  color-scheme: dark;
  --bg: #0d0e11; --panel: #15171c; --panel-2: #1c1f26; --line: rgba(255, 255, 255, 0.09); --text: #f3f4f6; --muted: #a9afba; --dim: #7b828e;
  --accent: #e5a00d; --accent-bright: #f5b529; --ok: #4cb963; --warn: #e0913a; --bad: #e5484d; --info: #5aa9f0; --r: 12px;
}
:root[data-theme='light'] { color-scheme: light; --bg: #f6f6f4; --panel: #ffffff; --panel-2: #efefec; --line: rgba(0, 0, 0, 0.12); --text: #17181b; --muted: #55595f; --dim: #7a7e85; --accent: #b87800; --accent-bright: #9a6400; }
.theme { width: 34px; height: 34px; margin-right: 10px; padding: 0; border-radius: 17px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 16px; line-height: 1; }
.theme:hover { color: var(--text); border-color: var(--accent); }
.topright { display: flex; align-items: center; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, 'Segoe UI', -apple-system, sans-serif; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: 0.2px; }
.mark { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); display: inline-block; }
.who { color: var(--muted); font-size: 14px; }
main { max-width: 1100px; margin: 0 auto; padding: 8px 16px 64px; }
.hero { padding: 34px 0 10px; text-align: center; }
h1 { margin: 0 0 6px; font-size: clamp(24px, 5vw, 34px); line-height: 1.15; }
h2 { margin: 28px 0 12px; font-size: 18px; }
.sub { margin: 0 auto 18px; max-width: 560px; color: var(--muted); }
#q { width: 100%; max-width: 620px; padding: 14px 16px; font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); outline: none; }
#q:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(229, 160, 13, 0.2); }
.msg { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--ok); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.card { position: relative; text-align: left; padding: 0; background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
.card .art { position: relative; aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; background: var(--panel-2); border: 1px solid var(--line); transition: transform 0.15s, border-color 0.15s; }
.card:hover .art, .card:focus-visible .art { transform: translateY(-3px); border-color: var(--accent); }
.card:focus-visible { outline: none; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .ph { display: flex; align-items: center; justify-content: center; height: 100%; padding: 8px; text-align: center; color: var(--dim); font-size: 13px; }
.badge { position: absolute; left: 0; right: 0; bottom: 0; padding: 5px 6px; font-size: 12px; font-weight: 650; text-align: center; background: rgba(0, 0, 0, 0.78); color: #fff; }
.badge.ok { color: #7fe39a; } .badge.wait { color: var(--accent-bright); }
.card .t { margin-top: 7px; font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .y { font-size: 12.5px; color: var(--dim); }
.kind { position: absolute; top: 6px; left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11px; font-weight: 650; background: rgba(0, 0, 0, 0.7); color: #fff; }
.list { display: grid; gap: 10px; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.row img, .row .ph { width: 46px; height: 69px; object-fit: cover; border-radius: 6px; background: var(--panel-2); flex: none; }
.row .tx { flex: 1; min-width: 0; }
.row .tt { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .ss { font-size: 13.5px; color: var(--muted); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 650; border: 1px solid var(--line); background: var(--panel-2); }
.chip.requested { color: var(--accent-bright); border-color: rgba(229, 160, 13, 0.45); }
.chip.approved, .chip.downloading { color: var(--info); border-color: rgba(90, 169, 240, 0.45); }
.chip.ready { color: var(--ok); border-color: rgba(76, 185, 99, 0.5); }
.chip.declined { color: var(--bad); border-color: rgba(229, 72, 77, 0.45); }
button { font: inherit; cursor: pointer; }
button.primary { padding: 10px 18px; border-radius: 10px; border: 0; background: var(--accent); color: #17130a; font-weight: 650; }
button.primary:disabled { opacity: 0.5; cursor: default; }
button.ghost { padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); }
button.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.modal { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, 0.62); }
.modal[hidden] { display: none; }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: 92vh; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 18px; }
@media (min-width: 700px) { .modal { align-items: center; } .sheet { border-radius: 18px; } }
.x { position: absolute; top: 8px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; }
.m-body { display: flex; gap: 16px; }
.m-body img { width: 120px; align-self: flex-start; border-radius: 10px; background: var(--panel-2); flex: none; }
.m-text { flex: 1; min-width: 0; }
.m-text h3 { margin: 0 28px 2px 0; font-size: 20px; }
.m-sub { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.m-text p { margin: 0 0 12px; font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 0 0 12px; padding: 8px 12px; }
legend { padding: 0 6px; font-size: 13.5px; color: var(--muted); }
fieldset label { display: block; padding: 3px 0; font-size: 14.5px; }
fieldset input[type=text] { width: 7em; padding: 4px 8px; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; }
.note { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.note input { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: inherit; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; }
.m-actions { display: flex; gap: 10px; }
@media (max-width: 480px) { .m-body { flex-direction: column; } .m-body img { width: 96px; } }
@media (prefers-reduced-motion: reduce) { .card .art { transition: none; } }
