:root {
  --bg: #0b0f14;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --accent: #3be4a6;
  --danger: #ff5c5c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: manipulation;
}

body {
  margin: 0;
  position: fixed;
  inset: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    "Noto Sans",
    "Liberation Sans",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 700px at 20% -10%, rgba(59, 228, 166, 0.22), transparent 60%),
    radial-gradient(900px 600px at 110% 30%, rgba(91, 156, 255, 0.16), transparent 55%),
    radial-gradient(900px 600px at 10% 110%, rgba(255, 92, 92, 0.08), transparent 55%),
    var(--bg);
}

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: 18px 16px 28px;
}

.header {
  padding: 10px 4px 18px;
}

.title {
  font-size: 20px;
  letter-spacing: 0.2px;
  font-weight: 700;
}

.subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.subtitle:empty {
  display: none;
}

.main {
  display: grid;
  gap: 16px;
}

.tap {
  width: min(360px, 86vw);
  aspect-ratio: 1/1;
  margin: 8px auto 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    radial-gradient(60% 60% at 30% 25%, rgba(255, 255, 255, 0.16), transparent 70%),
    radial-gradient(70% 70% at 70% 70%, rgba(59, 228, 166, 0.16), transparent 70%),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
  color: var(--text);
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 80ms ease, border-color 140ms ease, box-shadow 140ms ease;
  will-change: transform;
}

.tap::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 140ms ease, box-shadow 140ms ease;
  pointer-events: none;
}

.tap__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  pointer-events: none;
}

.tap:active {
  transform: scale(0.986);
  border-color: rgba(59, 228, 166, 0.5);
}

.tap--pressed::after {
  opacity: 1;
  box-shadow:
    0 0 0 10px rgba(59, 228, 166, 0.06),
    0 0 0 2px rgba(59, 228, 166, 0.34);
}

.tap__count {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.tap__hint {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  pointer-events: none;
}

.panel {
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(10px);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 4px 2px;
}

.label {
  font-size: 13px;
  color: var(--muted);
}

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

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 10px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 80ms ease, border-color 140ms ease, background 140ms ease;
}

.chip:active {
  transform: translateY(1px);
}

.chip--active {
  border-color: rgba(59, 228, 166, 0.7);
  box-shadow: 0 0 0 2px rgba(59, 228, 166, 0.14) inset;
  background: linear-gradient(135deg, rgba(59, 228, 166, 0.16), rgba(255, 255, 255, 0.06));
}

.actions {
  display: block;
  margin-top: 12px;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 11px 12px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn--full {
  width: 100%;
}

.btn__icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.86);
}

.btn__icon svg {
  width: 18px;
  height: 18px;
}

.btn__text {
  letter-spacing: 0.08em;
}

.btn--ghost:active {
  transform: translateY(1px);
}

.status {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  min-height: 16px;
}

.status--error {
  color: rgba(255, 92, 92, 0.92);
}

@media (max-width: 380px) {
  .chips {
    grid-template-columns: repeat(2, 1fr);
  }
}
