.cashli-gallery {
  --cg-purple: var(--purple, #5530c0);
  --cg-deep: var(--purple-deep, #3d2195);
  --cg-ink: var(--ink, #1d1826);
  --cg-muted: var(--muted, #60596b);
  --cg-ease: var(--ease, cubic-bezier(.22, .68, .22, 1));
  padding-block: clamp(68px, 9vw, 140px);
  color: var(--cg-ink);
  background: #f6f3fa;
  scroll-margin-top: 28px;
}

:where(.cg-shell) {
  width: min(1240px, calc(100% - 2 * clamp(18px, 5.2vw, 76px)));
  margin-inline: auto;
}

.cashli-gallery [hidden] {
  display: none !important;
}

.cg-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: clamp(24px, 3.1vw, 42px);
}

.cg-header h2 {
  margin: 0;
  font-size: clamp(2.9rem, 7.2vw, 6.1rem);
  font-weight: 650;
  line-height: .96;
  letter-spacing: -.072em;
  word-spacing: .045em;
}

.cg-header em {
  color: var(--cg-purple);
  font-style: normal;
}

.cg-navigation {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 auto;
}

.cg-position {
  font-size: .69rem;
  font-variant-numeric: tabular-nums;
  font-weight: 680;
  color: var(--cg-muted);
  margin-right: 5px;
  white-space: nowrap;
}

.cg-arrow {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  padding: 0;
  border: 1px solid #ddd3e9;
  border-radius: 50%;
  background: #fffdfd;
  color: var(--cg-deep);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}

.cg-arrow span {
  display: block;
  transition: transform .17s var(--cg-ease);
}

.cg-arrow:hover {
  border-color: #cdbbe8;
  background: #eee5fa;
}

.cg-arrow[data-gallery-prev]:hover span {
  transform: translateX(-2px);
}

.cg-arrow[data-gallery-next]:hover span {
  transform: translateX(2px);
}

.cg-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 16px;
  padding: 3px;
  border: 1px solid #e6ddee;
  border-radius: 23px;
  background: #fdfafb;
}

.cg-tabs button {
  min-height: 42px;
  padding: 7px 16px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: none;
  color: var(--cg-muted);
  font: inherit;
  font-size: .82rem;
  font-weight: 670;
  overflow-wrap: anywhere;
  cursor: pointer;
  transition: color .14s, background .16s;
}

.cg-tabs button:hover {
  background: #f6effb;
  color: var(--cg-deep);
}

.cg-tabs button[aria-selected="true"] {
  border-color: #e8dbf5;
  background: #eee4f7;
  color: var(--cg-deep);
}

.cg-arrow:focus-visible,
.cg-tabs button:focus-visible,
.cg-actions > :focus-visible,
.cg-panel:focus-visible {
  outline: 2px solid var(--cg-purple);
  outline-offset: 3px;
}

.cg-stage {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.cg-runway {
  height: 0;
}

.cashli-gallery[data-gallery-scroll] {
  --cg-pin-top: clamp(14px, 3.6svh, 31px);
}

.cashli-gallery[data-gallery-scroll] .cg-shell {
  position: sticky;
  top: var(--cg-pin-top);
}

.cashli-gallery[data-gallery-scroll] .cg-runway {
  height: calc(clamp(172px, 33svh, 306px) * var(--cg-steps));
}

.cashli-gallery[data-gallery-scroll] .cg-header {
  margin-bottom: clamp(16px, 2.5svh, 26px);
}

.cashli-gallery[data-gallery-scroll] .cg-header h2 {
  font-size: clamp(2.4rem, min(7vw, 9svh), 5.4rem);
}

.cashli-gallery[data-gallery-scroll] .cg-visual {
  min-height: clamp(342px, min(44vw, 64svh), 580px);
}

.cashli-gallery[data-gallery-scroll] .cg-device {
  width: clamp(141px, min(18vw, calc((100svh - 226px) * .4)), 248px);
  translate: 0 var(--cg-visual-lift, 0px);
}

.cashli-gallery[data-gallery-scroll] .cg-panel {
  z-index: var(--cg-layer, 1);
  opacity: var(--cg-view-opacity, 1);
}

.cashli-gallery[data-gallery-scroll] .cg-copy {
  opacity: var(--cg-copy-opacity, 1);
  translate: 0 var(--cg-copy-lift, 0px);
}

.cashli-gallery[data-gallery-ready] .cg-stage {
  position: relative;
  isolation: isolate;
  gap: 0;
  overflow: clip;
  border-radius: clamp(20px, 3vw, 36px);
}

.cg-panel {
  --cg-spot: #fffaff;
  --cg-surface: #e7dcf4;
  --cg-floor: #eee3f7;
  display: grid;
  grid-template-columns: minmax(0, 1.27fr) minmax(0, 1fr);
  align-items: stretch;
  min-width: 0;
  border: 1px solid #e7dff0;
  border-radius: clamp(20px, 3vw, 36px);
  background: #fffdf9;
  overflow: clip;
}

.cashli-gallery[data-gallery-ready] .cg-panel {
  grid-area: 1 / 1;
}

.cg-panel[data-gallery-standby] {
  visibility: hidden;
  pointer-events: none;
}

.cg-panel:focus-visible {
  outline-offset: -3px;
}

.cg-panel[data-gallery-active] {
  z-index: 2;
}

.cg-panel[data-gallery-leaving] {
  z-index: 1;
  pointer-events: none;
}

.cg-receipt {
  --cg-spot: #fffcf9;
  --cg-surface: #efdee2;
  --cg-floor: #f6e9e6;
}

.cg-split {
  --cg-spot: #fffbff;
  --cg-surface: #e6dbf2;
  --cg-floor: #eee7f5;
}

.cg-bills {
  --cg-spot: #fafdff;
  --cg-surface: #dcdef2;
  --cg-floor: #e8ecf6;
}

.cg-savings {
  --cg-spot: #fffef8;
  --cg-surface: #dceadd;
  --cg-floor: #e9f0e4;
}

.cg-visual {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  min-width: 0;
  min-height: clamp(465px, 44vw, 610px);
  overflow: clip;
  padding: 29px 22px 38px;
  background:
    radial-gradient(ellipse at 46% 22%, var(--cg-spot) 0, transparent 68%),
    linear-gradient(161deg, var(--cg-surface) 56%, var(--cg-floor) 100%);
}

.cg-visual::before {
  content: "";
  position: absolute;
  inset: 11% 13% 11%;
  z-index: -1;
  border: 1px solid #ffffff88;
  border-radius: 50%;
  transform: rotate(-17deg);
  pointer-events: none;
}

.cg-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(to right, #6c517b16 1px, transparent 1px), linear-gradient(to bottom, #6c517b16 1px, transparent 1px);
  background-size: 29px 29px;
  mask-image: radial-gradient(ellipse at 52% 54%, black 18%, transparent 84%);
  pointer-events: none;
}

.cashli-gallery[data-gallery-ready] .cg-visual {
  touch-action: pan-y;
  cursor: grab;
}

.cashli-gallery[data-gallery-dragging] .cg-visual {
  cursor: grabbing;
  user-select: none;
}

.cg-visualInner {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  transform: translateX(var(--cg-drag, 0));
  transition: transform .18s var(--cg-ease);
}

.cashli-gallery[data-gallery-dragging] .cg-visualInner {
  transition: none;
}

.cg-device {
  box-sizing: border-box;
  width: clamp(178px, 18vw, 248px);
  max-width: 100%;
  padding: 5px;
  border: 1px solid #847d8e;
  border-radius: clamp(27px, 2.6vw, 36px);
  background: #2d2833;
  box-shadow:
    0 0 0 1px #fff8 inset,
    0 1px 4px #38244a40,
    0 10px 19px #2c193827,
    0 24px 44px #38244a20;
  transition: opacity .24s var(--cg-ease);
}

.cg-device img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 786 / 1704;
  border-radius: clamp(21px, 2.2vw, 30px);
  background: #fff;
  user-select: none;
}

.cg-visual[data-gallery-zoomed] .cg-device {
  opacity: 0;
}

.cg-detail {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 17px;
  width: 100%;
  margin: 0;
  padding-inline: clamp(0px, 2.3vw, 33px);
  pointer-events: none;
}

.cg-detail img {
  display: block;
  width: min(100%, 440px);
  height: auto;
  max-height: 390px;
  object-fit: contain;
  border-radius: clamp(9px, 1.5vw, 19px);
  box-shadow: 0 1px 0 #ffffffd9, 0 16px 39px #2e17342a;
  user-select: none;
}

.cg-detail figcaption {
  max-width: 30ch;
  text-align: center;
  color: var(--cg-muted);
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.45;
}

.cg-visualNote {
  position: absolute;
  inset: auto auto 11px 14px;
  color: #604f6d;
  font-size: .68rem;
  line-height: 1.4;
}

.cg-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: clamp(24px, 5.2vw, 76px);
}

.cg-copy h3 {
  margin: 0;
  max-width: 12ch;
  color: var(--cg-ink);
  font-size: clamp(2rem, 4.1vw, 4.15rem);
  font-weight: 650;
  line-height: 1.015;
  letter-spacing: -.071em;
}

.cg-copy p {
  margin: 0;
  max-width: 34ch;
  color: var(--cg-muted);
  font-size: clamp(.98rem, 1.37vw, 1.18rem);
  line-height: 1.55;
}

.cg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 5px;
}

.cg-detailButton {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: min(100%, 10.6rem);
  min-height: 44px;
  padding: 9px 13px;
  border: 1px solid #ded0ee;
  border-radius: 22px;
  background: #f5eefb;
  color: var(--cg-deep);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s, border-color .16s;
}

.cg-detailButton:hover {
  border-color: #cdb9e9;
  background: #ede1f7;
}

.cg-detailMark {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
}

.cg-detailMark::before,
.cg-detailMark::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: currentColor;
}

.cg-detailMark::before {
  width: 10px;
  height: 1px;
}

.cg-detailMark::after {
  width: 1px;
  height: 10px;
  transform: scaleY(1);
  transition: transform .16s var(--cg-ease);
}

.cg-detailButton[aria-expanded="true"] .cg-detailMark::after {
  transform: scaleY(0);
}

.cg-screenReader {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 880px) {
  .cg-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  }

  .cg-device {
    width: clamp(164px, 22vw, 224px);
  }

  .cg-actions {
    gap: 3px;
  }

  .cg-copy {
    padding-inline: clamp(18px, 4vw, 40px);
  }
}

@media (max-width: 670px) {
  .cashli-gallery[data-gallery-scroll] {
    --cg-pin-top: 8px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-header {
    margin-bottom: 10px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-header h2 {
    font-size: clamp(1.9rem, 7.5vw, 3.3rem);
  }

  .cashli-gallery[data-gallery-scroll] .cg-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2px;
    width: 100%;
    margin-bottom: 9px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-tabs button {
    min-height: 44px;
    padding-inline: 0;
    font-size: clamp(.67rem, 2.8vw, .78rem);
    white-space: nowrap;
  }

  .cashli-gallery[data-gallery-scroll] .cg-visual {
    min-height: clamp(202px, 40svh, 340px);
    padding-block: 12px 27px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-device {
    width: clamp(96px, min(45vw, calc((100svh - 316px) * .36)), 172px);
    border-radius: 24px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-device img {
    border-radius: 18px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-copy {
    min-height: 176px;
    gap: 7px;
    padding: 13px 15px 12px;
  }

  .cashli-gallery[data-gallery-scroll] .cg-copy h3 {
    font-size: clamp(1.55rem, 6.15vw, 2.4rem);
  }

  .cashli-gallery[data-gallery-scroll] .cg-copy p {
    font-size: .92rem;
    line-height: 1.4;
  }

  .cashli-gallery[data-gallery-scroll] .cg-runway {
    height: calc(clamp(155px, 29svh, 230px) * var(--cg-steps));
  }

  .cashli-gallery[data-gallery-scroll] .cg-detail img {
    max-height: 215px;
  }

  .cg-header {
    align-items: end;
  }

  .cg-header h2 {
    font-size: clamp(2.5rem, 9vw, 3.9rem);
  }

  .cg-position {
    display: none;
  }

  .cg-navigation {
    gap: 5px;
  }

  .cg-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .cg-visual {
    min-height: 412px;
    padding: 16px 14px 32px;
  }

  .cg-visual::before {
    inset: 12% 6%;
  }

  .cg-device {
    width: clamp(153px, 44vw, 196px);
    border-radius: 29px;
  }

  .cg-device img {
    border-radius: 23px;
  }

  .cg-detail {
    gap: 11px;
    padding-inline: 0;
  }

  .cg-detail figcaption {
    font-size: .78rem;
  }

  .cg-copy {
    min-height: 224px;
    align-content: start;
    gap: 9px;
    padding: 20px 18px 14px;
  }

  .cg-copy h3 {
    max-width: unset;
  }

  .cg-actions {
    gap: 4px 13px;
    margin-top: 2px;
  }
}

@media (max-width: 390px) {
  .cg-tabs {
    gap: 1px;
    padding: 2px;
    border-radius: 20px;
  }

  .cg-tabs button {
    min-height: 44px;
    padding-inline: 8px;
    font-size: .75rem;
  }

  .cg-visual {
    min-height: 380px;
    padding-inline: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cashli-gallery *,
  .cashli-gallery *::before,
  .cashli-gallery *::after {
    transition: none !important;
    animation: none !important;
  }
}

html[data-motion-off] .cashli-gallery *,
html[data-motion-off] .cashli-gallery *::before,
html[data-motion-off] .cashli-gallery *::after {
  transition: none !important;
  animation: none !important;
}
