:root {
  --bg: #f6f1e7;
  --card: #fffdf8;
  --ink: #1f1d1a;
  --muted: #6b655c;
  --line: #e4dccd;
  --green: #2f5d4a;
  --green-soft: #e3ece6;
  --amber: #b5791a;
  --red: #a23b2a;
  --red-soft: #f6e1dc;
  --radius: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; cursor: pointer; }

.btn {
  background: var(--green); color: #fff; border: 0; border-radius: 999px;
  padding: 10px 18px; font-weight: 600;
}
.btn:active { transform: translateY(1px); }
.link { background: none; border: 0; color: var(--muted); padding: 8px 4px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- login ---------- */
.login-body { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: 100%; max-width: 360px; text-align: center; }
.login-mark { border-radius: 12px; }
.login h1 { margin: 14px 0 2px; font-size: 26px; letter-spacing: -0.01em; }
.login-sub { margin: 0 0 28px; color: var(--muted); }
.login form { display: grid; gap: 10px; text-align: left; }
.login label { font-weight: 600; font-size: 14px; }
.login input {
  width: 100%; font: inherit; font-size: 18px; padding: 14px 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.login input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.login button {
  margin-top: 6px; padding: 14px; border: 0; border-radius: 12px;
  background: var(--green); color: #fff; font-weight: 600; font-size: 17px;
}
.login-error { margin: 0; color: var(--red); font-size: 14px; }

/* ---------- app ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 720px; margin: 0 auto; padding: 14px 16px;
}
.bar form { margin: 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand img { border-radius: 8px; }

.wrap { max-width: 720px; margin: 0 auto; padding: 8px 16px 48px; }
.intro h1 { font-size: clamp(24px, 5vw, 32px); line-height: 1.2; letter-spacing: -0.015em; margin: 12px 0 10px; }
.intro p { color: var(--muted); margin: 0 0 24px; max-width: 56ch; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 36px 16px; border: 2px dashed #cfc4b0; border-radius: var(--radius);
  background: var(--card); cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--green); background: #fbfaf4; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop:focus-within { outline: 3px solid var(--green-soft); outline-offset: 2px; }
.drop-btn {
  background: var(--green); color: #fff; border-radius: 999px; padding: 14px 28px;
  font-weight: 600; font-size: 18px;
}
.drop-hint { color: var(--muted); font-size: 14px; }

.all { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; }
.all[hidden] { display: none; }

.results { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: grid; grid-template-columns: 88px 1fr; gap: 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px;
}
.thumb {
  width: 88px; height: 88px; border-radius: 10px; overflow: hidden; background: #ece5d7;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb img:not([src]) { visibility: hidden; }
.info { min-width: 0; }
.name { margin: 2px 0 2px; font-weight: 600; overflow-wrap: anywhere; }
.status { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.status.ok { color: var(--green); }
.status.warn { color: var(--amber); }
.status.bad { color: var(--red); }
.chips { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  font-size: 13px; padding: 3px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green); text-decoration: line-through; text-decoration-thickness: 1px;
}
.chips li.hot { background: var(--red-soft); color: var(--red); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card.failed .thumb { opacity: .4; }

.foot { margin-top: 32px; color: var(--muted); font-size: 14px; }

@media (max-width: 420px) {
  .card { grid-template-columns: 72px 1fr; }
  .thumb { width: 72px; height: 72px; }
}
