/* The same ink casing surrounds mobile captures and the receipt recording.
   Hardware sits outside the genuine app pixels. Desktop captures stay unframed. */
.drawn-phone-frame,
.receipt-story--drawn .drawn-phone-frame {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 32px 11px 17px;
  border: 0;
  outline: 0;
  border-radius: 38px 33px 35px 31px / 32px 39px 33px 37px;
  background: var(--phone-shell,
    repeating-linear-gradient(112deg, #8b9c7610 0 1px, transparent 1px 5px),
    linear-gradient(105deg, #edf0df, #e0e5d3 42%, #f0eddf 77%, #e4e8d6));
  box-shadow: var(--phone-shadow, 3px 5px 0 #344b3c12);
  isolation: isolate;
}
.drawn-phone-frame::before,
.receipt-story--drawn .drawn-phone-frame::before {
  content: "";
  position: absolute;
  inset: -5px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: url("assets/drawn-phone-outline.svg") center / 100% 100% no-repeat;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}
.drawn-phone-frame::after,
.receipt-story--drawn .drawn-phone-frame::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 50%;
  width: 61px;
  height: 7px;
  border: 1px solid var(--phone-ink, #344b3c);
  border-radius: 6px 4px 7px 5px;
  background: var(--phone-speaker, #85947a);
  box-shadow: none;
  transform: translateX(-50%) rotate(-2deg);
  pointer-events: none;
}
.drawn-phone-frame > img,
.drawn-phone-frame > video,
.receipt-story--drawn .drawn-phone-frame > video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--phone-screen-line, #425441);
  border-radius: 23px 20px 24px 21px / 21px 25px 20px 24px;
  box-shadow: none;
  background: #f5f8f4;
}
a:has(> .drawn-phone-frame),
.provider-phone a:has(> .drawn-phone-frame) {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.feature-guide .feature-proof .drawn-phone-frame {
  margin: 0;
}
.feature-guide .feature-proof .drawn-phone-frame img {
  border-radius: 23px 20px 24px 21px / 21px 25px 20px 24px;
}
/* Hover should never pull pixels out of their phone screen. */
a.image-zoom:has(> .drawn-phone-frame):hover img,
a.image-zoom:has(> .drawn-phone-frame):focus-visible img {
  transform: none;
}
.drawn-phone-frame > video.has-basic-controls {
  border-bottom: 0;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.receipt-playback {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--phone-screen-line, #425441);
  border-top: 0;
  border-radius: 0 0 24px 21px;
  background: var(--playback-paper, #f5f8f4);
  color: var(--phone-ink, #344b3c);
}
.receipt-playback button {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--control-line, #819074);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.receipt-playback input {
  min-width: 0;
  width: 100%;
  height: 32px;
  accent-color: var(--accent-current, #557450);
  cursor: pointer;
}
.receipt-playback-time {
  white-space: nowrap;
  font: 10px/1 Arial, sans-serif;
}
.receipt-playback :focus-visible {
  outline: 2px solid var(--accent-current, #557450);
  outline-offset: 3px;
}
@media (prefers-color-scheme: dark) {
  .illustration-site .drawn-phone-frame::before,
  .illustration-site .receipt-story--drawn .drawn-phone-frame::before {
    background: var(--phone-ink);
    mask: url("assets/drawn-phone-outline.svg") center / 100% 100% no-repeat;
  }
}
