:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2024;
  --muted: #626c7a;
  --line: #e2e6ec;
  --app: #4f7cf7;
  --human: #2fa36b;
  --track: #eef1f6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --card: #1c2126;
    --text: #e8ebef;
    --muted: #9aa4b2;
    --line: #2c333b;
    --track: #262d34;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 14px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.head h1 {
  margin: 0 0 4px;
  font-size: 20px;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.topic {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
  word-break: break-all;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.tapRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 96px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.tap.app {
  background: var(--app);
}

.tap.human {
  background: var(--human);
}

.tap:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tap:active:not(:disabled) {
  transform: scale(0.985);
}

.tapPlus {
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.tapLabel {
  font-size: 13px;
}

.tapCount {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

button {
  font: inherit;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

button:hover:not(:disabled) {
  border-color: var(--app);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.status {
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  word-break: break-word;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat .value {
  font-size: 16px;
  font-weight: 700;
}

.stat small {
  color: var(--muted);
  font-size: 12px;
}

.h2 {
  font-size: 14px;
  margin: 18px 0 8px;
}

.hint {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}

.barRow {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.barLabel {
  font-size: 12.5px;
  color: var(--muted);
}

.track {
  display: block;
  background: var(--track);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width 0.2s ease;
}

.fill.app {
  background: var(--app);
}

.fill.human {
  background: var(--human);
}

.barValue {
  font-size: 12.5px;
  text-align: right;
  color: var(--muted);
}

.verdict {
  margin: 14px 0 0;
  font-size: 13.5px;
}

.history {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.historyItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--bg);
  border-left: 3px solid var(--track);
  font-size: 13px;
}

.historyItem.app {
  border-left-color: var(--app);
}

.historyItem.human {
  border-left-color: var(--human);
}

.historyTime {
  font-size: 12px;
  color: var(--muted);
}

.historyEmpty {
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 2px;
}

.foot {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}
