:root {
  --bg: #0b1224;
  --card: #101b35;
  --accent: #22d3ee;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --danger: #f43f5e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
}

main {
  min-height: 100vh;
}

section {
  width: 100%;
  min-height: 100vh;
  background: var(--card);
  border: none;
  border-radius: 0;
  padding: 24px;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

section[hidden] {
  display: none !important;
}

.title {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  margin-bottom: 6px;
}

.target {
  color: var(--muted);
  font-size: clamp(18px, 3vw, 22px);
  margin-bottom: 12px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 8px 0 16px;
}

.count {
  font-size: clamp(140px, 30vw, 260px);
  font-weight: 800;
  text-align: center;
  margin: 12px 0 24px;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.edit-btn {
  flex: 0 0 56px;
  height: 48px;
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  background: #162544;
  border: 1px solid #1f2a44;
  border-radius: 10px;
  cursor: pointer;
}

.hint {
  flex: 1 1 auto;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.ios-note {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.35;
}

.tg-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12px;
  color: #f59e0b;
  max-width: 520px;
  line-height: 1.35;
}

.primary,
.secondary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  cursor: pointer;
  border: none;
}

.primary {
  background: var(--accent);
  color: var(--bg);
}

.secondary {
  background: #162544;
  color: var(--text);
  border: 1px solid #1f2a44;
}

.timer {
  font-size: clamp(140px, 28vw, 240px);
  font-weight: 800;
  text-align: center;
  line-height: 1;
  letter-spacing: 0.02em;
  margin: 6px 0 12px;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

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

.actions button {
  flex: 1;
}

.actions.top-only {
  align-self: stretch;
  justify-content: center;
  margin-top: 0;
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
}

.actions.top-only button {
  max-width: 260px;
}

.debug-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 20;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #1f2a44;
  background: #0b1224;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.debug {
  width: min(720px, 92vw);
  max-height: 60vh;
  overflow: auto;
  background: #0b1224;
  border: 1px solid #1f2a44;
  border-radius: 12px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}
