:root{
  --bg: #f8fafc;
  --fg: #0f172a;
  --muted: #475569;
  --primary: #2563eb;
  --primary-press: #1e40af;
  --surface: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 25px rgba(0,0,0,.06);
}
@import url('https://fonts.googleapis.com/css2?family=Nabla&display=swap');
@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --fg: #e5e7eb;
    --muted: #94a3b8;
    --primary: #60a5fa;
    --primary-press: #3b82f6;
    --surface: #0f172a;
    --shadow: 0 10px 25px rgba(0,0,0,.35);
  }
}

*{ box-sizing:border-box; }
html, body { height:100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

.app{
  min-height:100dvh;
  padding: 16px;
  display:grid;
  place-items:center;
  gap: 24px;
}

.titulo{
  font-family: "Nabla", system-ui;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "EDPT" 100,
    "EHLT" 12;  
   font-size: 2rem;
}

.stage{
  display:grid;
  place-items:center;
  gap: 8px;
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(92vw, 640px);
}

.display{
  /* letra muy grande y responsiva */
  font-weight: 1000;
  line-height: 1;
  text-align:center;
  letter-spacing: .04em;
  font-size: 14rem;
  transition: opacity .22s ease;
}

.counter{
  margin: 0;
  padding: 8rem 0rem 2rem 0rem;
  font-size: clamp(1rem, 3.5vw, 1.125rem);
  color: var(--muted);
}

.controls{
  display:flex;
  gap: 12px;
}

.btn{
  appearance: none;
  border: 0;
  border-radius: calc(var(--radius) - 6px);
  padding: 4rem 4rem;
  font-size: clamp(1rem, 3.5vw, 1.125rem);
  font-weight: 700;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
  box-shadow: var(--shadow);
}

.btn:focus-visible{
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary{
  background: var(--primary);
  color: #fff;
}
.btn-primary:active{ transform: translateY(1px); }

.btn-secondary{
  background: transparent;
  color: var(--fg);
  border: 2px solid var(--muted);
}
.btn-secondary:active{ transform: translateY(1px); }

@media (prefers-reduced-motion: reduce){
  .display{ transition: none !important; }
  .btn:active{ transform: none !important; }
}

/* Utilidad para ocultar pero accesible */
.sr-only{
  position:absolute !important;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  white-space:nowrap; border:0;
}

/* En pantallas grandes, separamos un poco más */
@media (min-width: 900px){
  .app{ gap: 30px; }
  .stage{ padding: 10px;}
  .controls{ gap: 16px; }
  .titulo{font-size: 5rem;height: 3rem;}
}
