/* Phone workout entry. Inputs stay at least 16px so iOS does not zoom on
   focus. Flexible tracks and min-width:0 stop a number field from forcing
   the page sideways. Extra cells (seconds, distance) wrap inside the card
   instead of widening it. Column count is left to the existing row. */
#exList,
.logwrap,
.exc,
.exc-b,
.srow,
.shdr,
.rir-row,
.sin,
.set-copy {
  min-width: 0;
  max-width: 100%;
}
.sin {
  font-size: 17px;
  width: 100%;
  box-sizing: border-box;
}
/* Match the six actual cells at every width, including landscape/tablets. */
.srow, .shdr { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 22px 44px 44px; gap: 8px; }
.set-copy {
  grid-column: 2 / 4;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--sub, #b8bfce);
  font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: 0;
  white-space: normal;
}
.set-copy:focus-visible { outline: 2px solid var(--p2); outline-offset: -2px; }
.set-sound { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 13px; flex: 0 0 auto;
  background: var(--panel); border: 1px solid var(--bdr); border-radius: 13px; margin-bottom: 10px; font: 650 15px var(--ui, sans-serif); color: var(--txt); }
.set-copy:disabled { opacity: .45; }
.owner-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  min-width: 0;
}
.owner-ops-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}
.owner-ops-field input {
  font-size: 16px;
  min-height: 44px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--bdr2, rgba(255,255,255,.16));
  background: var(--bg, #080810);
  color: inherit;
}
@media (max-width: 430px) {
  #app,
  #exList,
  .logwrap,
  .exc,
  .exc-b {
    overflow-x: hidden;
  }
  /* Six cells: number, load or time, weight, check, warm-up, remove.
     The warm-up cell is 44px so its two-line WARM UP label fits.
     The experience sheet still describes the older five-cell row. */
  .srow,
  .shdr {
    grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 16px 44px 36px;
    gap: 4px;
  }
  .srow .swarm,
  .srow .sdel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 44px;
    padding: 0;
    box-sizing: border-box;
  }
  .sval {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
  }
  .rir-row {
    margin-left: 0;
    min-width: 0;
    max-width: 100%;
  }
  .rir-row .sin {
    max-width: 100%;
    flex: 1 1 auto;
  }
}

/* Settings sheet: five plain group headings, one switch, one pill.
   The switch is the one on/off control in Settings: a 44px tap target
   whose track and thumb are drawn from its own aria-checked state, with
   On / Off written beside it so the state never relies on colour alone.
   Native checkboxes in Settings (alerts, operational alerts) wear the
   same track; they keep their own checked state and form behaviour. */
.set-group-h { font: 750 18px/1.3 var(--ui, sans-serif); letter-spacing: 0; color: var(--txt);
  margin: 30px 2px 10px; padding-top: 14px; border-top: 1px solid var(--bdr); }
.set-body > .set-group-h:first-child { border-top: 0; padding-top: 0; }
.set-body > .set-group-h:first-child { margin-top: 4px; }
.set-switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 44px;
  padding: 0 2px 0 8px; margin: 0; background: transparent; border: 0; color: var(--sub);
  font: 600 13px/1 var(--ui, sans-serif); cursor: pointer; flex: none; }
.set-switch::after { content: ''; flex: none; width: 46px; height: 28px; box-sizing: border-box; border-radius: 14px;
  border: 1px solid var(--bdr2); background-color: var(--panel2);
  background-image: radial-gradient(circle at 13px 50%, var(--mut) 9px, transparent 9.5px);
  transition: background-color .15s, border-color .15s; }
.set-switch[aria-checked="true"] { color: var(--txt); }
.set-switch[aria-checked="true"]::after { border-color: var(--accent, var(--p1)); background-color: var(--accent, var(--p1));
  background-image: radial-gradient(circle at 31px 50%, #06101a 9px, transparent 9.5px); }
.set-switch:focus-visible, .set-pill:focus-visible { outline: 2px solid var(--accent, var(--p1)); outline-offset: 2px; border-radius: 10px; }
#setBody .push-check input[type=checkbox] { -webkit-appearance: none; appearance: none; margin: 0; flex: none; order: 2; margin-left: auto;
  width: 46px; height: 28px; border-radius: 14px; border: 1px solid var(--bdr2); background-color: var(--panel2);
  background-image: radial-gradient(circle at 13px 50%, var(--mut) 9px, transparent 9.5px); cursor: pointer; }
#setBody .push-check input[type=checkbox]:checked { border-color: var(--accent, var(--p1)); background-color: var(--accent, var(--p1));
  background-image: radial-gradient(circle at 31px 50%, #06101a 9px, transparent 9.5px); }
#setBody .push-check input[type=checkbox]:focus-visible { outline: 2px solid var(--accent, var(--p1)); outline-offset: 2px; }
#setBody .push-check { justify-content: space-between; cursor: pointer; }
.set-switch:disabled { opacity: .45; cursor: default; }
.bwshare.set-switch-row { grid-template-columns: 1fr auto; font: 600 13px/1.3 var(--ui, sans-serif); color: var(--txt); }
.bwshare.set-switch-row .set-switch { grid-column: auto; width: auto; }
.bwshare.set-switch-row small { grid-column: 1 / -1; font-size: 12px; }
.set-pill { min-height: 44px; min-width: 88px; padding: 8px 14px; margin: 0; flex: none; box-sizing: border-box;
  background: transparent; color: var(--txt); border: 1px solid var(--bdr2); border-radius: 10px;
  font: 600 13px/1.2 var(--ui, sans-serif); letter-spacing: .02em; cursor: pointer; }
.set-pill:hover { border-color: var(--accent, var(--p1)); }
#setBody .set-row:has(> .set-pill) { align-items: center; }
#setBody .set-foot { padding-top: 0; margin-bottom: 10px; }
#ironAlerts .push-fail { font-size: 13px; line-height: 1.5; color: var(--txt); margin: 10px 0; }
#setBody #prSave { margin-top: 12px; }
