:root {
  --turq: #00b9a3; --orange: #f0642d; --ink: #202525; --line: #d9dee6;
  --bg: #f4f6f9; --panel: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: system-ui, -apple-system, Arial, sans-serif; color: var(--ink);
  background: var(--bg);
}
header {
  background: var(--ink); color: #fff; padding: 12px 20px;
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
header h1 { font-size: 16px; margin: 0; }
header .tag { background: var(--orange); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 10px; }
header .warnlabel { color: #ffd9c7; font-size: 12px; }

.layout { display: flex; gap: 16px; padding: 16px; align-items: flex-start; flex-wrap: wrap; }
.sidebar { width: 320px; display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #67707f; margin: 0 0 8px; }

.btnrow { display: flex; gap: 6px; flex-wrap: wrap; }
button, .btn {
  font: inherit; font-size: 13px; padding: 7px 10px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; cursor: pointer; color: var(--ink); text-decoration: none;
}
button:hover, .btn:hover { border-color: var(--turq); }
button.active { background: var(--turq); color: #fff; border-color: var(--turq); }
button.danger { background: #fff; color: #b0280f; border-color: #e7b7ac; margin-top: 8px; }
.filebtn { position: relative; overflow: hidden; display: inline-block; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.color-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; font-size: 13px; }
.color-row input[type=color] { width: 42px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 6px; }

.stage-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.stage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
#rendererLabel { font-size: 12px; color: #67707f; }
#stage { min-height: 720px; display: flex; justify-content: center; }
.jersey-svg { background: #fff; touch-action: none; }
#stage canvas { border: 0; }

.muted { color: #8a919c; font-size: 12px; }
.ok { color: #0a7d63; font-size: 12px; }
.warn { color: #b0280f; font-size: 12px; margin: 3px 0; }
#status { font-size: 12px; color: #67707f; padding: 0 16px 16px; }

.test { font-size: 12px; border-top: 1px solid var(--line); padding: 5px 0; }
.test.pass { color: #0a7d63; }
.test.fail { color: #b0280f; }

.modal { position: fixed; inset: 0; background: rgba(20,24,24,.55); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-inner { background: #fff; border-radius: 12px; max-width: 900px; width: 100%; max-height: 90vh; overflow: auto; padding: 18px; }
.proof-banner { background: #b0280f; color: #fff; text-align: center; font-weight: 700; padding: 8px; border-radius: 8px; letter-spacing: .05em; }
.proof-meta { font-size: 12px; color: #67707f; margin: 10px 0; }
.proof-meta code { background: #f0f2f5; padding: 1px 5px; border-radius: 4px; }
.proof-views { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.proof-views figure { margin: 0; text-align: center; }
.proof-views img { max-width: 360px; border: 1px solid var(--line); border-radius: 8px; }
.proof-views figcaption { font-size: 12px; color: #67707f; margin-bottom: 4px; }
.proof-actions { display: flex; gap: 8px; margin: 12px 0; justify-content: center; }
.modal-close { float: right; }
