:root {
  color: #221e1a;
  background: #f3f0e8;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
}

h1, h2, p { margin: 0; }

h1 { font-size: 1.7rem; font-weight: 650; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; }

.eyebrow {
  color: #6d6458;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede, .hint { color: #5e564c; }

.card {
  background: #fffdf9;
  border: 1px solid #e3dccf;
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.login-card { width: min(26rem, 100%); display: grid; gap: 0.8rem; }
.login-card h1 { margin-top: 0.2rem; }

.work {
  width: min(920px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
  display: grid;
  gap: 0.9rem;
}

.top, .progress-head, .owner, .top-actions, .actions, .legend {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
}

.top-actions, .actions, .legend { justify-content: flex-start; flex-wrap: wrap; }
.owner { align-items: flex-start; }
.owner-controls { display: grid; gap: 0.45rem; min-width: min(16rem, 100%); }

label { display: grid; gap: 0.28rem; font-size: 0.92rem; }

input, select, button, .linkish {
  font: inherit;
  border-radius: 10px;
  border: 1px solid #d9d0c2;
  padding: 0.55rem 0.7rem;
  background: white;
  color: inherit;
}

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin: 0.8rem 0; }

button, .linkish { cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }

.primary { background: #1e4d3a; color: white; border-color: #1e4d3a; }
.ghost { background: transparent; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.model { font-size: 0.92rem; color: #5e564c; }
.model.ok { color: #1e4d3a; }
.model.bad { color: #8a3b2a; }
.error { color: #8a3b2a; min-height: 1.2em; }
.file { width: fit-content; }

.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; color: #5e564c; font-size: 0.88rem; }
.samples ul { margin: 0.2rem 0 0; padding-left: 1.1rem; }

.bar { height: 8px; background: #efe8dc; border-radius: 99px; overflow: hidden; margin: 0.8rem 0; }
.bar span { display: block; height: 100%; width: 0; background: #1e4d3a; }

.swatch { width: 0.85rem; height: 0.85rem; border-radius: 3px; display: inline-block; }
.keep { background: #d9ead3; }
.drop { background: #ffff00; }
.review { background: #add8e6; }

#log {
  white-space: pre-wrap;
  background: #f7f4ee;
  border-radius: 10px;
  padding: 0.7rem;
  max-height: 12rem;
  overflow: auto;
  font-family: inherit;
}

@media (max-width: 720px) {
  .fields, .samples, .owner { grid-template-columns: 1fr; display: grid; }
  .top { display: grid; }
}
