/* Invisible iPhone switches, see js/tick-switch.js. Sized with width and height,
   as switches do not stretch between insets. */
.tick-switch {
  --x: 0px;
  --y: 0px;
  position: absolute;
  z-index: 1;
  top: calc(var(--y) * -1);
  left: calc(var(--x) * -1);
  width: calc(100% + var(--x) * 2);
  height: calc(100% + var(--y) * 2);
  max-width: none;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* What they cover, where it is not positioned already. Never set by the script:
   Safari may run it before the styles have loaded. */
:is(.interactions-counter, .interactions-hint, .project-brand-flip, .back-about-link):has(> .tick-switch) { position: relative; }
/* As large as the tap areas they cover. */
.cursor-tilt-card .social-link > .tick-switch { --x: 4px; --y: 4px; }
.card-projects :is(.back-email, .back-about-link) > .tick-switch { --x: 8px; --y: 13px; }
.card-projects .back-avatar > .tick-switch { --x: 8px; --y: 8px; }
#container .back-tabs button > .tick-switch { width: calc(100% + 22px); }
/* Asking for motion access needs the real button tapped. */
.interactions.offers-tilt .interactions-hint > .tick-switch { pointer-events: none; }
/* The card's own, behind the links, photos and name. */
.cursor-tilt-card > * > .tick-switch { z-index: -1; }
/* The back's text lets taps through to it. */
.card-projects:has(> .tick-switch) > :is(.back-about, .back-panel) { pointer-events: none; }
.cursor-tilt-card.is-flipped .card-projects .project-brand-flip { pointer-events: auto; }
.card-panel { isolation: isolate; }
.cursor-tilt-card:not(.is-flipped) .tick-switch { pointer-events: auto; }
.cursor-tilt-card:not(.is-flipped) .card-projects .tick-switch,
.cursor-tilt-card.is-flipped > :not(.card-projects) .tick-switch { pointer-events: none; }
