*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --green: #1a5c2e;
  --green-light: #2d8a4e;
  --cream: #f4f7f0;
  --ink: #122016;
  --amber: #ffb703;
  --locked: #6b7280;
  --pass: #16a34a;
  --min-tap: 56px;
}

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--green);
  color: var(--ink);
  min-height: 100dvh;
}

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--cream);
  display: flex;
  flex-direction: column;
}

header.app-bar {
  background: var(--green);
  color: #fff;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header.app-bar h1 {
  margin: 0;
  font-size: 1.25rem;
  flex: 1;
}

main {
  flex: 1;
  padding: 1rem;
  padding-bottom: 2rem;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--min-tap);
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 14px;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin: 0.5rem 0;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--green-light);
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--green);
  border: 3px solid var(--green);
}

.btn-amber {
  background: var(--amber);
  color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--green);
  border: 2px dashed var(--green);
  min-height: 48px;
  font-size: 1rem;
}

.btn:disabled,
.btn-locked {
  background: var(--locked);
  color: #eee;
  cursor: not-allowed;
}

.hero-kick {
  width: 100%;
  height: auto;
  margin: 0.5rem 0 1rem;
  border-radius: 16px;
}

.title-big {
  font-size: 1.5rem;
  margin: 0.5rem 0;
  text-align: center;
  color: var(--green);
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 3px solid var(--green);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  margin: 0.6rem 0;
  min-height: var(--min-tap);
  cursor: pointer;
  touch-action: manipulation;
}

.skill-card:active {
  background: #e8f5e9;
}

.skill-card .tick {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 3px solid var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  color: var(--locked);
}

.skill-card.passed .tick {
  background: var(--pass);
  border-color: var(--pass);
  color: #fff;
}

.skill-card .name {
  flex: 1;
  font-size: 1.1rem;
  font-weight: 700;
}

.locked-level {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 0.75rem;
  background: #e5e7eb;
  color: var(--locked);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin: 0.4rem 0;
  min-height: var(--min-tap);
  font-weight: 700;
}

.locked-level .locked-soon {
  width: 100%;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.9;
}

.panel {
  background: #fff;
  border-radius: 16px;
  border: 2px solid #c5d9c8;
  padding: 1rem;
  margin: 0.75rem 0;
}

.panel h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--green);
}

.step-picture svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}

.step-caption {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0.75rem 0;
}

.timer-big {
  font-size: 3rem;
  font-weight: 800;
  text-align: center;
  color: var(--green);
  margin: 0.5rem 0;
}

.phase-label {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
}

.counter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 0.75rem 0;
}

.counter-value {
  font-size: 3rem;
  font-weight: 800;
  min-width: 4rem;
  text-align: center;
}

.counter-btn {
  width: var(--min-tap);
  height: var(--min-tap);
  font-size: 2rem;
  border-radius: 50%;
  border: 3px solid var(--green);
  background: #fff;
  color: var(--green);
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

.foot-toggle {
  display: flex;
  gap: 0.5rem;
}

.foot-toggle .btn {
  flex: 1;
  margin: 0;
}

.foot-toggle .btn.selected {
  outline: 4px solid var(--amber);
}

.test-hint {
  text-align: center;
  font-size: 1rem;
  margin: 0.25rem 0 0.75rem;
}

video.preview {
  width: 100%;
  max-height: 240px;
  background: #000;
  border-radius: 12px;
}

.celebrate {
  position: fixed;
  inset: 0;
  background: rgba(26, 92, 46, 0.92);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  text-align: center;
}

.celebrate.hidden {
  display: none;
}

.celebrate h2 {
  font-size: 2rem;
  margin: 0.5rem;
}

.celebrate p {
  font-size: 1.25rem;
}

.hidden {
  display: none !important;
}
