:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1d2228;
  --muted: #69727d;
  --line: #dde1e6;
  --primary: #1a73e8;
  --primary-text: #ffffff;
  --ok: #188038;
  --bad: #c5221f;
  --warn: #b06000;
  --excluded: #9aa0a6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --panel: #1f2328;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --line: #353a40;
    --primary: #8ab4f8;
    --primary-text: #12233d;
    --ok: #81c995;
    --bad: #f28b82;
    --warn: #fdd663;
    --excluded: #5f6368;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
.top {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
}
h1 { margin: 0; font-size: 18px; }
.sub { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.who { color: var(--muted); font-size: 13px; text-align: right; }
main { max-width: 1280px; margin: 0 auto; padding: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 560px; }
button {
  font: inherit; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); cursor: pointer;
}
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--primary); color: var(--primary-text); border-color: var(--primary); font-weight: 600; }
.msg { min-height: 1.5em; color: var(--muted); }
.msg.bad { color: var(--bad); }
.msg.ok { color: var(--ok); }
.bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.bar.bottom { justify-content: flex-end; margin-top: 16px; }
.hint { margin: 0; color: var(--muted); flex: 1 1 320px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-top: 8px; }
.card {
  position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: 10px;
  overflow: hidden; cursor: pointer; outline: none;
}
.card:focus-visible { border-color: var(--primary); }
.imgbox { background: repeating-conic-gradient(#0000000d 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: flex; justify-content: center; align-items: center; min-height: 110px; padding: 8px; }
.imgbox img { max-width: 100%; height: auto; display: block; }
.info { padding: 10px 12px 12px; }
.info p { margin: 0; overflow-wrap: anywhere; }
.host { font-size: 17px; font-weight: 700; }
.url { font-size: 12px; color: var(--muted); }
.name { font-size: 11px; color: var(--muted); margin-top: 6px !important; }
.warn { color: var(--warn); font-size: 13px; }
.warn:empty { display: none; }
.gam { display: inline-block; margin-top: 6px; font-size: 12px; color: var(--primary); }
.badge { position: absolute; top: 8px; right: 8px; margin: 0; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--panel); }
.badge:empty { display: none; }
.card.excluded { border-color: var(--excluded); border-style: dashed; }
.card.excluded .imgbox, .card.excluded .info { opacity: .35; }
.card.excluded .badge { color: var(--excluded); border: 1px solid var(--excluded); }
.card.done { border-color: var(--ok); }
.card.done .badge { color: var(--ok); border: 1px solid var(--ok); }
.card.failed { border-color: var(--bad); }
.card.failed .badge { color: var(--bad); border: 1px solid var(--bad); }
.card.locked { cursor: default; }
@media (max-width: 480px) {
  .top { flex-direction: column; align-items: flex-start; }
  .who { text-align: left; }
  .grid { grid-template-columns: 1fr; }
}
