/* MB10 (spec 25 §5.2, defect M9) — Routines phone tap floors, ≤820px only.
   Loaded after routines.css (static/index.html); desktop rendering is
   untouched — every rule below lives inside this one media query.

   The 2026-09-08 phone audit (spec 25 §2.7/§6 M9) measured, on Routines at
   390/360: 28×28 chevrons (the row's only visible opener), 36px enable
   toggles, 30px filter chips, a 34px Create CTA, and a 36px search field.

   Card = hit target: the whole card becomes the opener, exactly like the
   Files rows and the Agents sheet list. .routine-open is the card's real
   button; on phone its ::after stretches the button's hit area over the
   entire card surface (the row is the containing block), so the retired
   28×28 chevron's zone — and every other dead corner — opens the routine.
   The chevron button itself stops being a hit target and is replaced by a
   same-place decorative indicator (no button semantics, pointer-events
   none), while the toggle paints above the stretched button so enabling
   and disabling keeps its own target. */
@media (max-width: 820px) {
  .routine-row {
    position: relative;
  }
  .routine-row .routine-open::after {
    content: "";
    position: absolute;
    inset: 0;
  }
  .routine-row-actions {
    position: relative;
    z-index: 1;
    /* The strip itself is not a control: its dead space must fall through
       to the stretched card button, only the toggle stays tappable. */
    pointer-events: none;
  }
  .routine-row-actions .routine-toggle {
    pointer-events: auto;
  }
  .routine-row-actions .routine-chevron {
    display: none;
  }
  /* Decorative stand-in: the #icon-expand chevron path (24×24, stroke
     1.7 — the geometry the button rendered), as a mask so currentColor
     themes it. The sprite itself can't be referenced cross-document here:
     Chromium's CSS mask needs a same-document or data-URI SVG. */
  .routine-row-actions::after {
    content: "";
    width: 1.75rem;
    height: 1.75rem;
    background-color: currentColor;
    opacity: .7;
    pointer-events: none;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m10 6 6 6-6 6' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m10 6 6 6-6 6' fill='none' stroke='%23000' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  }
  .routine-row:hover .routine-row-actions::after {
    color: var(--ui-accent);
    opacity: 1;
  }
  .routine-toggle {
    min-height: 44px;
  }
  .routine-filter,
  .routine-tag-option {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }
  #routine-setup-open,
  #routines-grid [data-create-first-routine] {
    min-height: 44px;
  }
  #routine-search {
    height: auto;
    min-height: 44px;
  }
  /* Same-floor control inside the create sheet reachable on phone (the
     specific-time remove glyph); the sheet shell itself is the shared
     sheet system, verified separately (spec 25 Q4). */
  .routine-specific-remove {
    min-height: 44px;
    min-width: 44px;
  }
}
