/* A thin ink contour, a little thickness at the foot, and light caught in the rim. */
:is(.launch-action, .launch-link, .wallet, #mnav, .field-button, .pill,
    .guide-topics a, .mode-switch span, .trade button.chip, .bf-kols button,
    .wlist > :is(button, a), .sheet .x, .ca button, .form .more, .footer-motion) {
  --glass-tint: rgb(248 240 223 / 62%);
  --glass-edge: #837768;
  --glass-foot: #b8aa97;
  --glass-depth: 2px;
  --glass-light: 0%;
  --glass-surface:
    linear-gradient(108deg, transparent 28%, rgb(255 255 255 / 44%) 40%, transparent 53%)
      var(--glass-light) center / 220% 100% no-repeat,
    linear-gradient(175deg, rgb(255 255 255 / 76%), transparent 48%, rgb(221 200 163 / 15%));
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--glass-surface), var(--glass-tint);
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / 94%), inset 0 -2px 0 rgb(255 255 255 / 53%),
    0 var(--glass-depth) 0 var(--glass-foot);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  color: #29231c;
  text-decoration: none;
  touch-action: manipulation;
  transition: background-position 360ms cubic-bezier(.22,.75,.25,1), transform 140ms ease, box-shadow 140ms ease;

  /* Coral belongs to the action that advances the current task. */
  &:is(.launch-action, .filled, .pill-red) {
    --glass-tint: rgb(255 132 65 / 92%);
    --glass-edge: #503425;
    --glass-foot: #98512d;
    --glass-depth: 2.5px;
  }
  &:is([aria-current], [aria-pressed="true"], [aria-expanded="true"], .on),
  .mode-switch input:checked + & {
    --glass-tint: #ffdcab;
    --glass-edge: #704828;
    --glass-foot: #b28b65;
  }
  @media (hover: hover) and (pointer: fine) {
    &:hover:not(:disabled, [aria-disabled="true"]) {
      --glass-light: 88%;
      --glass-depth: 3px;
      transform: translateY(var(--lift-on-hover, -1px));
      filter: none;
    }
  }
  &:focus-visible {
    outline: 2px solid #704328;
    outline-offset: 4px;
  }
  &:active:not(:disabled, [aria-disabled="true"]) {
    --glass-depth: 0px;
    --glass-light: 100%;
    transform: translateY(var(--sink-on-press, 1.5px));
    transition-duration: 75ms;
  }
  &:is(:disabled, [aria-disabled="true"]), .mode-switch input:disabled + & {
    background: #ebe7e1;
    border-color: #c3bcb0;
    color: #696157;
    box-shadow: none;
    transform: none;
    opacity: 1;
    cursor: not-allowed;
  }
}

.launch-actions {gap: 12px}
.launch-actions > a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 0 21px;
  white-space: nowrap;
}
.mast-actions .wallet {min-height: 38px; padding-inline: 16px}
.sheet .x {line-height: 1}
.wlist > :is(button, a) {border-radius: 14px}
.form .more, .footer-motion {padding: 7px 12px}
.footer-motion {margin-block: 5px}
.mode-switch input:focus-visible + span {outline: 2px solid #704328; outline-offset: 3px}

/* Two white ink strokes caught in opposite corners of the larger lenses. */
:is(.launch-action,.launch-link,.wallet) {position: relative; isolation: isolate}
:is(.launch-action,.launch-link,.wallet)::before,
:is(.launch-action,.launch-link)::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  width: 22px;
  height: 7px;
  top: 3px;
  left: 13px;
  border-top: 2px solid rgb(255 255 255 / 90%);
  border-radius: 70%;
  transform: rotate(-8deg);
}
:is(.launch-action,.launch-link)::after {
  inset: auto 12px 3px auto;
  width: 12px;
  opacity: .85;
  transform: rotate(170deg);
}

/* The folded plane echoes the courier's glider. Each face meets at the same fold. */
.paper-plane {
  display: inline-block;
  flex: none;
  width: 25px;
  height: 20px;
  position: relative;
  background: #30271f;
  clip-path: polygon(0 34%, 100% 0, 70% 83%, 44% 64%, 30% 98%, 23% 57%);
  transform: rotate(2deg);
}
.paper-plane::before,.paper-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff9ea;
  clip-path: polygon(12% 36%, 82% 10%, 26% 51%);
}
.paper-plane::after {background: #ffe5be; clip-path: polygon(39% 55%, 86% 15%, 68% 73%)}
.flight-label {display: inline-block}
.lookout {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 2px;
  width: 23px;
  height: 18px;
}
.lookout i {
  position: relative;
  width: 10px;
  height: 16px;
  border: 1.5px solid #31291f;
  border-radius: 55% 50% 49% 48%;
  background: #fffaf0;
  transform: rotate(8deg);
}
.lookout i + i {height: 15px; transform: rotate(5deg)}
.lookout i::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 6px;
  left: calc(50% - 2px);
  top: calc(50% - 3px);
  border-radius: 50%;
  background: #31291f;
  transform: translate(var(--eye-x, .8px), var(--eye-y, .4px));
  transition: transform 95ms ease-out;
}

@keyframes glider-nudge {
  0%, 100% {transform: rotate(2deg)}
  24% {transform: translate(-3px, 1px) rotate(-10deg)}
  50% {transform: translate(6px, -2px) rotate(6deg)}
  75% {transform: translate(-1px, 0) rotate(-3deg)}
}
@keyframes label-nudge {
  0%, 34%, 100% {transform: none}
  54% {transform: translate(2px,-1px) rotate(-1deg)}
  80% {transform: translate(-.5px,0)}
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  html:not([data-ink-paused]) .launch-action:is(:hover, :focus-visible) .paper-plane {
    animation: glider-nudge 430ms cubic-bezier(.25,.65,.33,1);
  }
  html:not([data-ink-paused]) .launch-action:is(:hover, :focus-visible) .flight-label {
    animation: label-nudge 430ms ease-out;
  }
}
@media (max-width: 700px) {
  .mast-actions .wallet, #mnav {min-height: 36px; padding-inline: 12px}
}
@media (max-width: 400px) {
  .launch-actions {column-gap: 9px}
  .launch-actions > a {min-height: 44px; padding-inline: 12px; font-size: 14px; gap: 7px}
  .mast-actions {gap: 6px}
  #mnav {padding-inline: 9px}
}
html[data-ink-paused] {--lift-on-hover: 0px; --sink-on-press: 0px}
@media (prefers-reduced-motion: reduce) {
  :root {--lift-on-hover: 0px; --sink-on-press: 0px}
}
@media (forced-colors: active) {
  .launch-actions .paper-plane, .lookout {display: none}
  .guide-topics a[aria-current], .mode-switch input:checked + span, .trade button.chip.on,
  .bf-kol-choose[aria-pressed="true"] {outline: 2px solid Highlight; outline-offset: -3px}
}
