*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

main {
  display: contents;
}

button {
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.25rem 2rem;
}

.page-wrap {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Header ── */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 2px;
}
.back-link:hover {
  color: var(--text);
}

.share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    color 0.12s,
    background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.share-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.share-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.header-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.header-title {
  font-family: "Inter Tight", sans-serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--text);
}

.header-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Section label ── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-all-btn {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  padding: 0;
  transition: color 0.12s;
  text-transform: uppercase;
}
.select-all-btn:hover {
  color: var(--text);
}

/* ── Pills ── */
.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.num-pill {
  font-size: 14px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border-radius: 999px;
  border: none;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.12s,
    color 0.12s,
    transform 0.08s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.num-pill:active {
  transform: scale(0.93);
}
.num-pill.selected {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
}

/* ── Divider ── */
.divider {
  height: 0.5px;
  background: var(--divider);
}

/* ── Stepper ── */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border-radius: 12px;
  padding: 6px;
  height: 52px;
}

.stepper-btn {
  width: 40px;
  height: 40px;
  font-size: 22px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.stepper-btn:hover {
  background: var(--surface-hover-alt);
}

.stepper-value {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  min-width: 32px;
  text-align: center;
  cursor: text;
}

.stepper-input {
  font-size: 16px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  color: var(--text);
  width: 48px;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 1.5px solid var(--border-stepper);
  outline: none;
  padding: 0;
}
.stepper-input:focus {
  border-bottom-color: var(--text);
}

/* ── Combo count ── */
.combo-count {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}
.combo-count span {
  font-weight: 500;
  color: var(--text);
}

/* ── Start button ── */
.start-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  border: none;
  cursor: pointer;
  transition:
    background 0.12s,
    transform 0.08s;
  letter-spacing: 0.01em;
  -webkit-tap-highlight-color: transparent;
}
.start-btn:hover {
  background: var(--btn-primary-bg-hover);
}
.start-btn:active {
  transform: scale(0.98);
}
.start-btn:disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-color);
  cursor: not-allowed;
  transform: none;
}
