* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', system-ui, sans-serif;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

/* Counter columns */

#app {
  display: flex;
  height: 100%;
  width: 100%;
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
}

.tap-zone {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tap-zone:active {
  filter: brightness(1.15);
}

.column-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.count-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(6rem, 25vw, 14rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
}

.column-symbol {
  width: clamp(28px, 7vw, 52px);
  height: clamp(28px, 7vw, 52px);
  opacity: 0.5;
}

.empty-state {
  color: #666;
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
}

/* Control buttons */

.controls {
  position: fixed;
  top: max(8px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
  z-index: 10;
}

.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.ctrl-btn:active {
  background: rgba(0, 0, 0, 0.7);
}

/* Settings overlay */

.settings-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 20;
  align-items: center;
  justify-content: center;
}

.settings-overlay.open {
  display: flex;
}

.settings-panel {
  background: #1c1c1e;
  border-radius: 12px;
  padding: 20px;
  min-width: 260px;
  max-height: 80vh;
  overflow-y: auto;
  color: #fff;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.settings-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

.settings-done {
  background: none;
  border: none;
  color: #0a84ff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #2c2c2e;
}

.settings-row:last-child {
  border-bottom: none;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.settings-row label {
  flex: 1;
  font-size: 0.95rem;
}

.toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 26px;
  background: #39393d;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle:checked {
  background: #30d158;
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle:checked::after {
  transform: translateX(18px);
}
