/* Shared 9:16 canvas, code-drawn phone and cursor. Page layout lives in o-projekcie.css. */
[data-volley-ad] {
  --ad-phone-fit: 0.6;
  --ad-cam-zoom: 1;
  --ad-cam-shift-x: 0px;
  --ad-cam-shift-y: 0px;
}
.ad-visual {
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}
.journey .ad-ui-map-card-track {
  width: max-content;
  height: 164px;
  gap: 8px;
}
.journey .ad-ui-map-game-card {
  width: 275.52px;
  outline: none;
}
.journey .ad-ui-map-game-card:first-child {
  outline: 1px solid #183e35;
}
.journey .ad-ui-map-canvas .ad-ui-map-credit {
  bottom: 178px;
}
.journey .ad-ui-map-canvas .ad-ui-map-location {
  bottom: 195px;
}
.ad-stage {
  width: 100%;
  aspect-ratio: 9 / 16;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 66% 46%, #3c6542 0%, #204d3d 32%, #153a31 70%);
  color: #fff;
  border: 1px solid #254c3b;
  border-radius: 22px;
  box-shadow: 0 28px 48px -25px #183e3559;
  container-type: inline-size;
}
.ad-stage-grain {
  position: absolute;
  inset: -8%;
  opacity: 0.2;
  pointer-events: none;
  background-image: radial-gradient(#e5f3c840 0.5px, transparent 0.5px);
  background-size: 5px 5px;
  z-index: -1;
}
.ad-stage-orbit {
  position: absolute;
  pointer-events: none;
  border: 1px solid #c0d99526;
  border-radius: 50%;
  width: 140%;
  height: 70%;
  left: -20%;
  top: 20%;
  transform: rotate(-28deg);
  z-index: -1;
}
.ad-stage-orbit-two {
  width: 180%;
  height: 35%;
  top: 36%;
  left: -40%;
  transform: rotate(28deg);
}
.ad-stage-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: absolute;
  left: 7%;
  right: 7%;
  top: 3.6%;
  font-size: 1.65cqw;
  line-height: 1.5;
  letter-spacing: 0.1em;
  color: #c4d6b4;
  z-index: 8;
}
.ad-stage-brand {
  color: #fff;
  font-size: 3.4cqw;
  font-weight: 750;
  letter-spacing: -0.055em;
}
.ad-stage-brand > span {
  color: #d7f19c;
}
.ad-hook-area {
  position: absolute;
  z-index: 8;
  left: 7%;
  right: 7%;
  top: 7.8%;
  text-align: center;
  pointer-events: none;
}
.ad-hook {
  font-size: 7cqw;
  font-weight: 750;
  line-height: 1.06;
  letter-spacing: -0.05em;
  margin: 0;
  min-height: 15cqw;
  white-space: pre-line;
  text-wrap: balance;
  color: #e5f8bc;
}
.ad-subhook {
  font-size: 2.35cqw;
  line-height: 1.65;
  color: #d3e1c8;
  margin: 2.3cqw 0 0;
  min-height: 4cqw;
}
.ad-phone-viewport {
  position: absolute;
  inset: 20% 0 6%;
  overflow: hidden;
  z-index: 3;
}
.ad-phone-anchor {
  position: absolute;
  left: 50%;
  top: 5.333333cqw;
  width: 384px;
  height: 800px;
  /* Scale the entire drawing, including text, without relaying out its contents. */
  transform: translate(
      calc(-50% + var(--ad-cam-shift-x) * var(--ad-phone-fit)),
      calc((400px * (1 - var(--ad-cam-zoom)) + var(--ad-cam-shift-y)) * var(--ad-phone-fit))
    )
    scale(calc(var(--ad-phone-fit) * var(--ad-cam-zoom)));
  transform-origin: 50% 0;
  z-index: 3;
}
.ad-camera {
  width: 384px;
  height: 800px;
  position: relative;
  transform: none;
}
/* Keep Chromium text sharp at its displayed size. iOS must scale the drawing as
   a whole: WebKit's CSS zoom can scale text differently from its fixed-size UI. */
@supports (zoom: 1) and (not (-webkit-touch-callout: none)) {
  .ad-phone-anchor {
    width: calc(384px * var(--ad-phone-fit) * var(--ad-cam-zoom));
    height: calc(800px * var(--ad-phone-fit) * var(--ad-cam-zoom));
    left: calc(
      (100% - 384px * var(--ad-phone-fit) * var(--ad-cam-zoom)) / 2 + var(--ad-cam-shift-x) *
        var(--ad-phone-fit)
    );
    top: calc(
      5.333333cqw + (400px * (1 - var(--ad-cam-zoom)) + var(--ad-cam-shift-y)) * var(--ad-phone-fit)
    );
    transform: none;
  }
  .ad-camera {
    zoom: calc(var(--ad-phone-fit) * var(--ad-cam-zoom));
  }
}
.ad-phone {
  width: 384px;
  height: 800px;
  position: relative;
  background: #182b24;
  border: 2px solid #5b6d5c;
  border-radius: 51px;
  box-shadow:
    inset 0 0 0 4px #1e3229,
    inset 0 0 0 6px #34483a,
    18px 20px 16px -14px #081e2280,
    0 35px 55px #061d2759;
}
.ad-phone::before {
  content: '';
  position: absolute;
  width: 5px;
  height: 63px;
  left: -5px;
  top: 174px;
  background: #405c48;
  border-radius: 4px;
  box-shadow: 0 -66px 0 -1px #405c48;
}
.ad-phone::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 70px;
  right: -5px;
  top: 166px;
  background: #405c48;
  border-radius: 4px;
}
.ad-device-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: absolute;
  z-index: 3;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 27px;
  background: #f6f7f2;
  border-radius: 34px 34px 0 0;
  padding: 2px 20px 0;
  font-size: 11px;
  font-weight: 750;
  color: #183e35;
}
.ad-device-camera {
  position: absolute;
  width: 80px;
  height: 17px;
  background: #182b24;
  left: 50%;
  top: 3px;
  transform: translateX(-50%);
  border-radius: 20px;
}
.ad-device-signal {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}
.ad-device-signal i {
  display: inline-block;
  width: 18px;
  height: 8px;
  border-radius: 2px;
  border: 1px solid #183e35;
  background: linear-gradient(90deg, #183e35 80%, transparent 80%);
}
.ad-ui-screen {
  width: 360px;
  height: 740px;
  position: absolute;
  left: 10px;
  top: 35px;
  overflow: hidden;
  color: #183e35;
  background: #f6f7f2;
  border-radius: 0 0 31px 31px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
.ad-device-home {
  width: 92px;
  height: 4px;
  background: #d9e3d6;
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 20px;
}
.ad-cursor {
  position: absolute;
  z-index: 90;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border: 2px solid #21412a;
  border-radius: 50%;
  background: #f5ffd7bb;
  box-shadow:
    0 0 0 5px #ffffff80,
    0 4px 8px #16382538;
  opacity: 0;
  pointer-events: none;
}
.ad-focus-ring {
  position: absolute;
  z-index: 89;
  top: 0;
  left: 0;
  width: 48px;
  height: 48px;
  border: 2px solid #8db444;
  border-radius: 50%;
  background: #d7f19c26;
  opacity: 0;
  pointer-events: none;
}
[data-volley-ad] [data-ad-pressed] {
  opacity: 0.78 !important;
}
.ad-cursor::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid #a5ce52;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(calc(0.4 + var(--ad-tap-progress, 0)));
  opacity: var(--ad-tap-opacity, 0);
}
.ad-stage-footer {
  position: absolute;
  z-index: 8;
  left: 7%;
  right: 7%;
  bottom: 3.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  pointer-events: none;
}
.ad-free-pill {
  display: inline-flex;
  border: 1px solid #c4dba1;
  background: #d7f19c;
  border-radius: 30px;
  padding: 1.8cqw 3cqw;
  font-size: 2.5cqw;
  color: #183e35;
  font-weight: 750;
}
.ad-stage-footer > span:last-child {
  text-align: right;
  color: #d5e2c8;
  font-size: 2.15cqw;
  line-height: 1.5;
}
.ad-stage-footer b {
  font-weight: 600;
  color: #edf8dc;
}
.ad-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Only decoration drifts continuously; phone text settles after each short zoom. */
[data-volley-ad][data-ad-enhanced='true'] .ad-stage-orbit-one {
  animation: ad-orbit-one var(--ad-orbit-ms) ease-in-out infinite;
}
[data-volley-ad][data-ad-enhanced='true'] .ad-stage-orbit-two {
  animation: ad-orbit-two var(--ad-orbit-ms) ease-in-out infinite;
}
[data-volley-ad][data-ad-enhanced='true'] .ad-stage-grain {
  animation: ad-grain var(--ad-grain-ms) ease-in-out infinite;
}

[data-volley-ad]:is([data-ad-state='modal'], [data-ad-state='guest']) .ad-ui-join-modal,
[data-volley-ad]:is([data-ad-state='share'], [data-ad-state='overviewShare']) .share-dialog,
[data-ad-profile='organizer'][data-ad-state='profile'] .org-request-profile-card {
  animation: ad-ui-enter var(--ad-entrance-ms) ease-out backwards;
}
[data-volley-ad][data-ad-state='guest'] .ad-ui-guest-row,
[data-volley-ad]:is([data-ad-state='sent'], [data-ad-state='accepted']) .ad-ui-outgoing,
[data-volley-ad][data-ad-state='accepted'] .ad-ui-acceptance-message,
[data-ad-profile='organizer']:is(
    [data-ad-state='applicants'],
    [data-ad-state='profile'],
    [data-ad-state='approve']
  )
  .org-request-applicant,
[data-ad-profile='overview'][data-ad-state='overviewApplicants'] .org-request-applicant,
[data-ad-profile='overview'][data-ad-state='overviewSent'] .overview-chat-mine,
[data-volley-ad]:is([data-ad-state='approved'], [data-ad-state='overviewAccepted'])
  .org-request-approved-notice {
  animation: ad-ui-pop var(--ad-pop-ms) ease-out backwards;
}
[data-volley-ad][data-ad-state='joinedDetails'] [data-ad-field] {
  animation: ad-count-flash var(--ad-count-ms) ease-out;
}
[data-volley-ad][data-ad-state='pending'] .ad-ui-pending-status,
[data-ad-profile='organizer'][data-ad-state='request'] .org-request-pending,
[data-ad-profile='overview'][data-ad-state='overviewManage'] .overview-pending {
  animation: ad-pending var(--ad-pulse-ms) ease-in-out infinite;
}
[data-volley-ad][data-ad-playing='false'] .ad-stage * {
  animation-play-state: paused;
}

@keyframes ad-ui-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ad-ui-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ad-count-flash {
  35% {
    color: #518224;
    background-color: #e5f8bc;
  }
}
@keyframes ad-pending {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.65;
  }
}
@keyframes ad-orbit-one {
  0%,
  100% {
    transform: rotate(-28deg) translate(0, 0);
  }
  50% {
    transform: rotate(-16deg) translate(6px, -6px);
  }
}
@keyframes ad-orbit-two {
  0%,
  100% {
    transform: rotate(28deg) translate(0, 0);
  }
  50% {
    transform: rotate(18deg) translate(-6px, 6px);
  }
}
@keyframes ad-grain {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(8px, -8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-volley-ad] .ad-stage * {
    animation: none !important;
  }
  .ad-cursor,
  .ad-focus-ring {
    display: none;
  }
}
