:root {
  color-scheme: light;
  --bg: #f5f5f3;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --border: #222;
  --accent: #1a5fb4;
  --accent-text: #ffffff;
  --danger: #a51d2d;
  --miss-bg: #f8d7d7;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Author rules that set `display` (e.g. .actions { display: flex }) would
   otherwise override the UA's default [hidden] { display: none }. */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.screen {
  max-width: 32rem;
  margin: 0 auto;
  padding: calc(1.5rem + env(safe-area-inset-top)) 1.25rem 3rem;
}

h1 {
  font-size: 1.4rem;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  text-transform: capitalize;
}

p {
  line-height: 1.5;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.confirm-text {
  width: 100%;
  color: var(--danger);
  margin: 0 0 0.5rem;
}

button {
  font: inherit;
  padding: 0.75rem 1.2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  min-height: 44px;
}

button.primary {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

button.danger {
  color: var(--danger);
  border-color: var(--danger);
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.secondary-actions {
  margin-top: 2rem;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.targets {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem;
  margin: 1.5rem 0;
}

.target {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  min-height: auto;
  touch-action: manipulation;
}

.target-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: #fff;
  transition: background-color 0.1s ease;
}

.target.miss .target-circle {
  background: #111;
}

.target-label {
  font-size: 0.8rem;
  color: var(--text);
}

.history-session {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
  cursor: pointer;
}

.history-session .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.bout-detail {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: #fff;
}

.target-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.target-chip {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.target-chip.miss {
  background: var(--miss-bg);
  border-color: var(--danger);
  color: var(--danger);
}

.empty-state {
  color: var(--muted);
  font-style: italic;
}
