.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: var(--sp-3) var(--sp-5);
  border: 0;
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-ink);
  font-weight: 700;
  font-size: var(--fs-md);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 120ms var(--ease-out), background-color 120ms;
  touch-action: manipulation;
  user-select: none;
}

.btn small {
  font-weight: 400;
  font-size: var(--fs-xs);
  opacity: 0.8;
}

.btn:active:not(:disabled) { transform: scale(0.97); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--c-primary);
  color: var(--c-primary-ink);
}

@media (hover: hover) {
  .btn--primary:hover:not(:disabled) { background: var(--c-primary-hover); }
}

.btn--ghost {
  background: transparent;
  color: var(--c-on-bg);
  box-shadow: inset 0 0 0 2px rgba(247, 243, 232, 0.35);
}

.card .btn--ghost,
.modal .btn--ghost {
  color: var(--c-ink);
  box-shadow: inset 0 0 0 2px var(--c-line);
}

.icon-btn {
  width: var(--tap);
  height: var(--tap);
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.card .icon-btn {
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: var(--c-surface-2);
}

.chip-btn {
  min-height: 40px;
  padding: 0 var(--sp-4);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
  cursor: pointer;
}

/* Toggle switch built on a real checkbox */
.switch {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  cursor: pointer;
  position: relative;
}

.switch__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch__track {
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--c-line);
  position: relative;
  flex: none;
  transition: background-color 150ms;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 150ms var(--ease-out);
}

.switch__input:checked + .switch__track { background: var(--c-first-cut); }
.switch__input:checked + .switch__track::after { transform: translateX(18px); }
.switch__input:focus-visible + .switch__track { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.switch__text { display: flex; flex-direction: column; }
.switch__text small { color: var(--c-ink-muted); font-size: var(--fs-xs); }
