/* ======================================================================
   Mobile base (S10 hygiene). Puls suite shared component, October 2026.
   Copy into each app and load it BEFORE the app stylesheet, so the app can
   override. Everything here is either inert on desktop browsers or scoped
   to the phone query, coarse pointers or hover:none. Desktop stays identical.

   Rule for every app (not done here, since it touches app selectors):
   wrap each :hover effect that moves, lifts or recolors an element in
     @media (hover: hover) { ... }
   so a tap on a phone does not leave the hover state stuck. Keep the
   desktop selectors and values unchanged inside the wrapper.
   ====================================================================== */

/* iOS Safari inflates text on rotation without this; desktop browsers
   ignore it. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Scroll containment for sheets, panels and lists that scroll on their own:
   scrolling past the end no longer moves the page behind. Add the class to
   the scrolling element (Warum panel, train dialog, detail panes, lists). */
@media (max-width: 720px), (pointer: coarse) and (max-height: 500px) {
  .pl-contain { overscroll-behavior: contain; }
}

/* iOS zooms into any focused field under 16 px. Coarse pointers only, so
   desktop forms keep their size. */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
}

/* Press feedback on touch screens (there is no :active feedback in the
   suite yet). Add .pl-press to buttons, chips and list rows. */
@media (hover: none) {
  .pl-press { -webkit-tap-highlight-color: transparent; }
  .pl-press:active {
    opacity: 0.72;
    transform: scale(0.98);
    transition: opacity 60ms ease, transform 60ms ease;
  }
}
@media (hover: none) and (prefers-reduced-motion: reduce) {
  .pl-press:active { transform: none; }
}

/* Star button from FavStore.starButton() and share button from
   PulsShare.button(). Neutral defaults, themed through custom properties
   (set them on the button or any ancestor). Both are created by script on
   phones only for share; the star may also appear on desktop if an app
   decides so, which is why these rules are not media scoped. */
.pl-star, .pl-share {
  --pl-btn-ink: currentColor;
  --pl-btn-bg: transparent;
  --pl-btn-focus: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  box-sizing: border-box;
  border: 0;
  border-radius: 12px;
  background: var(--pl-btn-bg);
  color: var(--pl-btn-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.pl-star { width: 44px; height: 44px; padding: 0; }
.pl-share--icon { width: 44px; padding: 0; }
.pl-star:focus-visible, .pl-share:focus-visible {
  outline: 2px solid var(--pl-btn-focus);
  outline-offset: 2px;
}
.pl-star svg path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.pl-star[aria-pressed="true"] { --pl-star-fill: #eab308; }
.pl-star[aria-pressed="true"] svg path {
  fill: var(--pl-star-fill);
  stroke: var(--pl-star-fill);
}
@media (hover: none) {
  .pl-star:active, .pl-share:active { opacity: 0.72; }
}

/* screen-reader-only label (copy button, icon variant) */
.pl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
