/* style.css — 火柴棍变变变 */
* { box-sizing: border-box; }
body {
  margin: 0; background: #f6efe2; color: #3d3327;
  font: 15px/1.6 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button {
  font: inherit; border-radius: 8px; cursor: pointer;
  background: #fff; border: 1px solid #d8c9ac; color: #3d3327; padding: 7px 14px;
}
button:hover { background: #f3ead8; }
button.primary { background: #e07b39; border-color: #e07b39; color: #fff; }
button.primary:hover { background: #cf6c2b; }
button.danger { color: #b0392e; border-color: #dca39a; }
button.small { padding: 3px 9px; font-size: 13px; }
input, select {
  font: inherit; border: 1px solid #d8c9ac; border-radius: 7px; padding: 6px 8px; background: #fff; color: inherit;
}
input[type="number"] { width: 70px; }
input[type="text"] { width: 100%; }

.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 2px solid #e5d9c2; background: #fbf6ea;
}
.topbar h1 { font-size: 19px; margin: 0; color: #8a5a2b; }
.topbar .ver {
  font: 600 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #8a5a2b; background: #f3e7cf; border: 1px solid #e5d9c2;
  border-radius: 999px; padding: 3px 8px; letter-spacing: .02em;
}
.topbar .spacer { flex: 1; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; padding: 16px 18px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

.panel { background: #fff; border: 1px solid #e5d9c2; border-radius: 12px; padding: 14px; }
.panel h3 { margin: 2px 0 10px; font-size: 15px; color: #8a5a2b; }
.muted { color: #a2917a; font-size: 13px; }

.board-wrap { background: #fdfaf3; border: 1px solid #e5d9c2; border-radius: 12px; padding: 8px; }
svg.board { display: block; width: 100%; height: auto; }
.dot { fill: #d9cdb8; }
.match { stroke: #d9903f; stroke-width: 11; stroke-linecap: round; }
.head { fill: #a63a2a; }
.lifted { opacity: .3; }
.hit { stroke: transparent; stroke-width: 27; stroke-linecap: round; }
.hit.has { cursor: pointer; }
svg.interactive .hit.open { cursor: pointer; }
svg.interactive .hit.open:hover { stroke: rgba(0,0,0,.07); }
svg.placing .hit.open { stroke: rgba(224,123,57,.16); }
svg.placing .hit.open:hover { stroke: rgba(224,123,57,.45); }

.tabs { display: flex; gap: 8px; margin: 14px 0 10px; }
.tab { border-radius: 9px 9px 0 0; border-bottom-width: 3px; }
.tab.active { background: #fff; border-color: #e07b39; color: #b35c1d; font-weight: 600; }

.field { display: inline-flex; align-items: center; gap: 6px; margin: 4px 10px 4px 0; font-size: 14px; }
.field label { color: #7c6a52; }

.counts .crow { display: flex; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px dashed #eee2cc; }
.counts .crow:last-child { border-bottom: 0; }
.counts .cname { min-width: 86px; color: #7c6a52; }
.counts b { font-size: 17px; }
.counts .csizes { color: #a2917a; font-size: 12.5px; }

.condrow { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.condrow select, .condrow input { font-size: 13.5px; padding: 4px 6px; }
.cond-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dashed #eee2cc; font-size: 14px; }
.cond-line:last-child { border-bottom: 0; }
.cond-line.ok { color: #2e7d43; }
.cond-line.bad { color: #b0392e; }
.task-desc {
  background: #fdf3e3; border: 1px solid #f0dfc0; border-radius: 8px;
  padding: 8px 11px; font-size: 14.5px; margin-bottom: 8px;
}
.win-banner {
  background: #e8f5ec; border: 1px solid #bfe0c8; color: #2e7d43;
  border-radius: 8px; padding: 8px 11px; font-size: 14.5px; margin-bottom: 8px;
}
.steplist { display: flex; flex-direction: column; gap: 4px; }
.steprow {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  font-size: 13.5px; padding: 4px 6px; border-radius: 7px;
}
.steprow.cur { background: #fdf3e3; }
.steprow { white-space: nowrap; }
.steprow .spacer { flex: 1; }
.stepnum {
  display: inline-block; min-width: 20px; text-align: center;
  background: #f3e7cf; color: #8a5a2b; border-radius: 6px;
  font-weight: 700; font-size: 12.5px; padding: 1px 4px;
}
.iconbtn {
  width: 34px; height: 30px; padding: 0; line-height: 1; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center;
}
.mark { fill: #e07b39; opacity: .95; }
.marktext {
  fill: #fff; font: bold 10.5px system-ui, "PingFang SC", sans-serif;
  text-anchor: middle; dominant-baseline: central; pointer-events: none;
}
.silhouette { stroke: #8a8a8a; opacity: .4; stroke-width: 11; stroke-linecap: round; }
.fthumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 2px 0 6px; }
.fset { display: inline-flex; align-items: center; gap: 2px; color: #8b7a63; font-size: 12.5px; }
.fthumb { width: 30px; height: 30px; }
.fthumb path { fill: rgba(224, 164, 88, .18); stroke: #d79a45; stroke-width: 1.2; stroke-linejoin: round; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; padding: 16px 18px; }
.card { background: #fff; border: 1px solid #e5d9c2; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card .cname2 { font-weight: 700; font-size: 16px; }
.badge { display: inline-block; background: #f3e7cf; border-radius: 6px; padding: 1px 8px; font-size: 12.5px; color: #8a5a2b; margin-right: 6px; }
.card .btns { display: flex; gap: 8px; margin-top: 6px; }


#toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #3d3327; color: #fff; padding: 10px 20px; border-radius: 10px; z-index: 40; font-size: 14px;
}
.mv { font-size: 17px; font-weight: 700; color: #b35c1d; }
details.help { font-size: 13.5px; color: #7c6a52; }
details.help summary { cursor: pointer; color: #8a5a2b; }
details.help li { margin: 3px 0; }
.warn { color: #b0392e; font-size: 13.5px; }
