.ccx-opening,
.ccx-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.ccx-opening {
  z-index: 2147483000;
  background: var(--ccx-opening-color);
  opacity: 1;
  transition: opacity 760ms cubic-bezier(.28, .08, .24, 1);
}

.ccx-opening.ccx-leaving {
  opacity: 0;
  pointer-events: none;
}

.ccx-opening video,
.ccx-backdrop video,
.ccx-backdrop img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
}

.ccx-opening button {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgb(255 255 255 / .45);
  border-radius: 24px;
  background: rgb(20 24 29 / .72);
  color: #fff;
  font: inherit;
  font-size: 13px;
  letter-spacing: .08em;
  cursor: pointer;
}

.ccx-skip {
  right: max(24px, env(safe-area-inset-right));
}

.ccx-music {
  left: max(24px, env(safe-area-inset-left));
}

.ccx-opening button:hover {
  background: rgb(20 24 29 / .9);
}

.ccx-opening button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* The website theme also supplies colors to menus rendered outside the page shell. */
:root:has(.ccx-surface) {
  --background: #faf7f6;
  --foreground: #2c252d;
  --muted-foreground: #625663;
  --card: #fffafc;
  --popover: #fff9fb;
  --primary: #893950;
  --primary-foreground: #fff7fa;
  --secondary: #f4e9ed;
  --muted: #f4ecee;
  --accent: #f2e2e9;
  --border: #d8c7cf;
  --input: #cebbc5;
  --ring: #a35975;
  --sidebar: #f7eef1;
  --ccx-wash: rgb(255 255 255 / .57);
  --ccx-panel: color-mix(in srgb, var(--card) 85%, transparent);
  --ccx-panel-shadow: 0 18px 44px -34px #66354d61;
  --ccx-sakura-title: linear-gradient(105deg, #a84971 3%, #be597e 62%, #a34b70 100%);
  --ccx-sakura-button: linear-gradient(124deg, #faebf1, #f5dfe9);
  --ccx-sakura-button-text: #5c2942;
  --ccx-sakura-button-border: rgb(148 92 118 / 32%);
}

:root.dark:has(.ccx-surface) {
  --background: #101a2c;
  --foreground: #f3edf5;
  --muted-foreground: #bdc6da;
  --card: #18263b;
  --popover: #1c2b43;
  --primary: #e8b2c8;
  --primary-foreground: #33202d;
  --secondary: #26354e;
  --muted: #1f2e46;
  --accent: #332d44;
  --border: #3e4a63;
  --input: #4c5871;
  --ring: #db9fbc;
  --sidebar: #142037;
  --ccx-wash: rgb(0 0 0 / .43);
  --ccx-panel: color-mix(in srgb, var(--card) 85%, transparent);
  --ccx-panel-shadow: 0 20px 50px -32px #040b19b0;
  --ccx-logo-glow: rgb(241 170 205 / .72);
  --ccx-sakura-title: linear-gradient(105deg, #ffe1ec 3%, #f0acc7 62%, #e99fbc 100%);
  --ccx-sakura-button: linear-gradient(124deg, #ffe1ec 0%, #f1bfd1 54%, #dda2bc 100%);
  --ccx-sakura-button-text: #402536;
  --ccx-sakura-button-border: #edbdd1;
}

.ccx-petal-layer,
.ccx-cursor-petal {
  --ccx-petal: #b95e81;
}

.dark :is(.ccx-petal-layer, .ccx-cursor-petal) {
  --ccx-petal: #f1adc9;
}

.ccx-motion-toggle {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 40;
  min-height: 44px;
  padding-inline: 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 91%, transparent);
  color: var(--foreground);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ccx-motion-toggle:hover {
  background: var(--card);
}

.ccx-motion-toggle:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

.ccx-motion-toggle[hidden],
.ccx-intro .ccx-motion-toggle {
  display: none;
}

.ccx-petal-layer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  pointer-events: none;
}

.ccx-petals {
  position: absolute;
}

.ccx-petals > span,
.ccx-cursor-petal::before {
  border-radius: 76% 24% 67% 33% / 63% 43% 57% 37%;
  background: linear-gradient(140deg, color-mix(in srgb, var(--ccx-petal) 74%, white), var(--ccx-petal) 70%);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--ccx-petal) 34%, transparent);
}

.ccx-petals > span {
  --ccx-drift-x: -34px;
  --ccx-drift-y: 38px;
  --ccx-petal-angle: -66deg;
  position: absolute;
  width: 16px;
  height: 11px;
  opacity: 0;
  animation: ccx-petal-drift 1260ms ease-out both;
}

.ccx-petals > span:nth-child(2) {
  --ccx-drift-x: 39px;
  --ccx-drift-y: 25px;
  --ccx-petal-angle: 92deg;
  width: 14px;
  height: 10px;
  animation-delay: 60ms;
}

.ccx-petals > span:nth-child(3) {
  --ccx-drift-x: 11px;
  --ccx-drift-y: 45px;
  --ccx-petal-angle: 52deg;
  width: 12px;
  height: 8px;
  animation-delay: 100ms;
}

@keyframes ccx-petal-drift {
  from {
    opacity: 0;
    transform: translate(-5px, -6px) rotate(-12deg) scale(.45);
  }
  14% {
    opacity: .9;
  }
  42% {
    opacity: .76;
  }
  to {
    opacity: 0;
    transform: translate(var(--ccx-drift-x), var(--ccx-drift-y)) rotate(var(--ccx-petal-angle));
  }
}

.ccx-cursor-petal {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1000;
  pointer-events: none;
  transition: transform 150ms ease-out;
}

.ccx-cursor-petal[hidden] {
  display: none;
}

.ccx-cursor-petal::before {
  display: block;
  width: 11px;
  height: 8px;
  content: "";
  opacity: .68;
  animation: ccx-cursor-sway 2.8s ease-in-out infinite alternate;
}

@keyframes ccx-cursor-sway {
  from {
    transform: translateY(-2px) rotate(-20deg);
  }
  to {
    transform: translateY(2px) rotate(22deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  :root:not(.ccx-intro, .ccx-motion-paused) .ccx-home .ink-hero-logo {
    transform-origin: 50% 60%;
    animation: ccx-logo-sway 9s ease-in-out .65s infinite;
  }

  :root.dark:not(.ccx-intro, .ccx-motion-paused) .ccx-home .ink-hero-logo .ink-logo-dark {
    animation: ccx-logo-glow 9s ease-in-out .65s infinite;
  }
}

@keyframes ccx-logo-sway {
  0%, 59%, 100% {
    transform: translateY(0) rotate(0);
  }
  18% {
    transform: translateY(-5px) rotate(-1.6deg);
  }
  37% {
    transform: translateY(2px) rotate(1deg);
  }
}

@keyframes ccx-logo-glow {
  0%, 59%, 100% {
    filter: drop-shadow(0 0 0 transparent);
  }
  18% {
    filter: drop-shadow(0 0 10px var(--ccx-logo-glow));
  }
  37% {
    filter: drop-shadow(0 0 5px var(--ccx-logo-glow));
  }
}

.ccx-surface {
  isolation: isolate;
}

.ccx-surface::before {
  transition: opacity 600ms ease;
}

.ink-public-shell.ccx-surface.ccx-bg-visible::before,
.ink-auth-shell.ccx-surface.ccx-bg-visible::before,
.ink-app-shell.ccx-surface.ccx-bg-visible:not(:has(.wallet-ink-page))::before {
  opacity: 0;
}

.ccx-backdrop {
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease;
}

.ccx-bg-visible > .ccx-backdrop {
  opacity: 1;
}

.ccx-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--ccx-wash);
}

.ccx-backdrop video {
  visibility: hidden;
}

.ccx-bg-playing > .ccx-backdrop video {
  visibility: visible;
}

/* Match the intro's final frame to the first image of the loop behind it. */
.ccx-intro .ccx-bg-visible > .ccx-backdrop,
.ccx-intro .ccx-bg-visible::before {
  transition: none;
}

.ccx-surface :is(.bg-card, .ink-auth-panel) {
  background-color: var(--ccx-panel);
}

.ccx-surface :is([data-slot="card"], section.bg-card, aside.bg-card, .ink-auth-panel) {
  border-color: var(--border);
}

:root:not(.dark) :is(.ink-public-shell, .ink-auth-shell).ccx-surface {
  --ccx-panel: color-mix(in srgb, var(--card) 76%, transparent);
}

.ink-public-shell.ccx-home .ink-home-hero {
  padding-top: clamp(6.5rem, 10vw, 9rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
}

.ink-public-shell.ccx-home .ink-home-hero > div {
  max-width: 80rem;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.25rem;
}

.ccx-home .ink-home-hero > div > div {
  grid-column: auto;
}

.ccx-home .ink-home-hero > div > div:first-child {
  display: grid;
  grid-template-columns: clamp(5.75rem, 9.4vw, 8.5rem) minmax(0, 1fr);
  column-gap: clamp(.9rem, 2.1vw, 2rem);
  align-content: center;
}

.ccx-home .ink-home-hero .ink-hero-identity {
  display: contents;
}

.ccx-home .ink-home-hero > div > div:first-child > :not(.ink-hero-identity),
.ccx-home .ink-hero-identity > div {
  grid-column: 2;
}

.ink-public-shell.ccx-home .ink-hero-logo {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: start;
  width: 100%;
  height: auto;
  aspect-ratio: 430 / 820;
}

.ink-public-shell.ccx-home .ink-home-hero h1 {
  font-size: clamp(1.8rem, 2.6vw, 2.55rem);
  line-height: 1.25;
  letter-spacing: .02em;
}

@supports (background-clip: text) {
  @media (forced-colors: none) {
    .ccx-home .ink-home-hero h1 .text-primary {
      background-image: var(--ccx-sakura-title);
      background-clip: text;
      color: transparent;
    }
  }
}

.ccx-home > section a.bg-primary,
.ink-public-shell.ccx-surface a:is(.bg-primary, .bg-foreground):is([href="/sign-in"], [href^="/sign-in?"], [data-preview-page="/dashboard"]),
.ink-auth-shell.ccx-surface .ink-auth-panel button.bg-primary[type="submit"] {
  background-image: var(--ccx-sakura-button);
  border-color: var(--ccx-sakura-button-border);
  color: var(--ccx-sakura-button-text);
}

:root:not(.dark) :is(
  .ccx-home > section a.bg-primary,
  .ink-public-shell.ccx-surface a:is(.bg-primary, .bg-foreground):is([href="/sign-in"], [href^="/sign-in?"], [data-preview-page="/dashboard"]),
  .ink-auth-shell.ccx-surface .ink-auth-panel button.bg-primary[type="submit"]
) {
  background-clip: border-box;
  border: 1px solid var(--ccx-sakura-button-border);
  box-shadow: none;

  &:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
  }
}

.ccx-home > section a.bg-primary:hover,
.ink-public-shell.ccx-surface a:is(.bg-primary, .bg-foreground):is([href="/sign-in"], [href^="/sign-in?"], [data-preview-page="/dashboard"]):hover,
.ink-auth-shell.ccx-surface .ink-auth-panel button.bg-primary[type="submit"]:hover:enabled {
  filter: saturate(1.1);
}

.ccx-home .ink-home-hero .ink-hero-identity > div > div:first-child {
  border-color: var(--border);
  background-color: var(--accent);
}

.ccx-home .ink-home-hero > div > div:first-child > p {
  max-inline-size: 29em;
  margin-top: 1.25rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.ccx-home .ink-home-hero > div > div:first-child > div:nth-child(3) {
  margin-top: 1.6rem;
}

.ccx-home .ink-home-hero > div > div:first-child > div:last-child {
  margin-top: 1.8rem;
}

.ccx-home .ink-home-hero > div > div:first-child > div:last-child a {
  color: var(--foreground);
  background-color: var(--ccx-panel);
}

.ccx-home .ink-home-hero > div > div:nth-child(2) > div {
  margin-top: 0;
}

.ccx-home .ink-home-hero > div > div:nth-child(2) > div > div {
  background: var(--ccx-panel);
  border-color: var(--border);
  box-shadow: var(--ccx-panel-shadow);
}

:root:not(.dark) .ccx-home .ink-home-hero > div > div:nth-child(2) > div > div {
  --ccx-panel: color-mix(in srgb, var(--card) 68%, transparent);
  backdrop-filter: blur(2px);
}

:root:not(.dark) .ccx-home .ink-home-hero > div > div:nth-child(2) :is([class~="bg-muted/20"], [class~="bg-muted/30"]) {
  background-color: color-mix(in srgb, var(--muted) 9%, transparent);
}

.ccx-home .ink-home-hero > div > div:nth-child(2) > div > div > div {
  border-color: color-mix(in srgb, var(--border) 75%, transparent);
}

.ccx-home .ink-home-hero > div > div:nth-child(2) :is([class~="text-foreground/40"], [class~="text-foreground/50"]) {
  color: var(--muted-foreground);
}

.ccx-surface [data-slot="section-heading"] {
  text-shadow: 0 1px 5px var(--background);
}

@media (min-width: 67.5rem) {
  .ink-public-shell.ccx-home .ink-home-hero > div {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3vw, 2.75rem);
    align-items: center;
  }
}

.ccx-reveal .ink-public-shell.ccx-home .ink-home-hero > div > div {
  transition: opacity 640ms cubic-bezier(.22, .61, .36, 1) 150ms,
    transform 640ms cubic-bezier(.22, .61, .36, 1) 150ms;
}

.ccx-reveal .ink-public-shell.ccx-home .ink-home-hero > div > div:nth-child(2) {
  transition-delay: 235ms;
}

.ccx-intro .ink-public-shell.ccx-home .ink-home-hero > div > div {
  opacity: 0;
  transform: translateY(9px);
  transition: none;
}

@media (max-width: 639px) {
  .ink-public-shell.ccx-home .ink-home-hero {
    padding: 5.25rem 1.25rem 3.25rem;
  }

  .ccx-home .ink-home-hero > div > div:first-child {
    grid-template-columns: minmax(0, 1fr);
  }

  .ccx-home .ink-home-hero > div > div:first-child > :not(.ink-hero-identity),
  .ccx-home .ink-hero-identity > div {
    grid-column: 1;
  }

  .ink-public-shell.ccx-home .ink-hero-logo {
    grid-row: auto;
    justify-self: center;
    width: 4.5rem;
    margin: 0 0 .9rem;
  }

  .ink-public-shell.ccx-home .ink-home-hero h1 {
    font-size: clamp(1.55rem, 6.25vw, 2.35rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ccx-opening,
  .ccx-backdrop,
  .ccx-surface::before,
  .ccx-reveal .ink-public-shell.ccx-home .ink-home-hero > div > div {
    transition: none;
  }
}

.ccx-phone-opening {position:fixed;inset:0;overflow:hidden;z-index:2147483000;pointer-events:none;animation:ccx-phone-dismiss 2s both;}
.ccx-phone-opening img {display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%;animation:ccx-phone-pan 2s ease-out both;}
.ccx-phone-opening button {position:absolute;right:max(18px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));min-height:46px;padding:0 20px;border:1px solid #ffffff70;border-radius:28px;background:#171b22df;color:white;font:inherit;pointer-events:auto;}
@keyframes ccx-phone-dismiss {0%,70%{opacity:1}99%{opacity:0}100%{opacity:0;visibility:hidden}}
@keyframes ccx-phone-pan {from{transform:scale(1.05)}to{transform:scale(1)}}
@media(prefers-reduced-motion:reduce){.ccx-phone-opening{display:none}}
