/* Minimal mobile-first styles. Neutral colors. Red only for final fail status. */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: #1a1a1a;
  background: #f7f7f8;
  font-size: 16px;
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

header h1 {
  font-size: 22px;
  margin: 0 0 8px;
}

.lede {
  background: #fff8e1;
  border-left: 4px solid #f4b400;
  padding: 12px;
  margin: 12px 0;
  border-radius: 0 6px 6px 0;
  font-size: 15px;
}
.lede .en { display: block; color: #555; font-size: 13px; margin-top: 4px; }

#status-bar {
  position: sticky;
  top: 0;
  background: #f7f7f8;
  padding: 12px 0;
  margin: 8px 0 4px;
  z-index: 10;
}

.bar {
  width: 100%;
  height: 8px;
  background: #e5e5e7;
  border-radius: 4px;
  overflow: hidden;
}
#bar-fill {
  display: block;
  height: 100%;
  background: #4caf50;
  transition: width 0.3s ease;
}
#bar-label {
  margin: 6px 0 0;
  font-size: 13px;
  color: #555;
}

.phase-block {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 12px 0;
}
.phase-block h2 {
  font-size: 16px;
  margin: 0 0 8px;
  color: #333;
}

.test-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.test-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid #f0f0f2;
  font-size: 14px;
}
.test-list li:first-child { border-top: 0; }
.test-list .icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-weight: bold;
}
.test-list .icon.pending { color: #888; }
.test-list .icon.running { color: #2196f3; animation: spin 1s linear infinite; }
.test-list .icon.ok { color: #4caf50; }
.test-list .icon.fail { color: #d32f2f; }
.test-list .label { flex: 1; }
.test-list .meta {
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: #666;
  text-align: right;
  min-width: 80px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#final-form {
  background: #fff;
  border: 1px solid #e5e5e7;
  border-radius: 8px;
  padding: 14px;
  margin: 16px 0;
}
#final-form h2 { font-size: 17px; margin: 0 0 6px; }
#final-form form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
#final-form label { display: flex; flex-direction: column; font-size: 14px; gap: 4px; color: #333; }
#final-form input, #final-form select, #final-form textarea {
  font-size: 15px;
  padding: 9px 10px;
  border: 1px solid #d5d5d7;
  border-radius: 6px;
  font-family: inherit;
}
#final-form textarea { min-height: 70px; resize: vertical; }

button {
  font-size: 15px;
  padding: 11px 18px;
  background: #1976d2;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: #1565c0; }
button:disabled { background: #999; cursor: not-allowed; }
button span { display: block; }
button .en { font-size: 11px; opacity: 0.8; margin-top: 2px; }

#submission-status {
  background: #e8f5e9;
  border: 1px solid #4caf50;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}
#submission-status.fail {
  background: #ffebee;
  border-color: #d32f2f;
}
#submission-status h2 { margin: 0 0 8px; font-size: 18px; }
#submission-status pre {
  background: #f5f5f5;
  padding: 10px;
  border-radius: 4px;
  font-size: 11px;
  overflow-x: auto;
  max-height: 300px;
  white-space: pre-wrap;
  word-break: break-all;
}

footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e5e5e7;
  font-size: 12px;
  color: #888;
}
footer p { margin: 4px 0; }
.small { font-size: 11px; }
code {
  background: #f0f0f2;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
