:root {
  --ink: #072c36;
  --ink-soft: #164959;
  --surface: rgba(247, 253, 250, 0.9);
  --surface-strong: #fbfff9;
  --foam: #f1fff8;
  --seafoam: #9ee6d8;
  --aqua: #35b7c8;
  --blue: #08799c;
  --deep: #063c58;
  --navy: #05283e;
  --coral: #f27763;
  --kelp: #3e8e73;
  --sun: #f3c95d;
  --muted: rgba(7, 44, 54, 0.72);
  --line: rgba(241, 255, 248, 0.34);
  --line-dark: rgba(7, 44, 54, 0.18);
  --shadow-soft: 0 1rem 2.8rem rgba(3, 24, 37, 0.18);
  --shadow-card: 0 1.6rem 3.4rem rgba(3, 24, 37, 0.34);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.42;
  background:
    radial-gradient(ellipse at 14% 12%, rgba(241, 255, 248, 0.28) 0 8rem, transparent 18rem),
    radial-gradient(ellipse at 88% 8%, rgba(242, 119, 99, 0.14) 0 5rem, transparent 15rem),
    linear-gradient(180deg, #78c6bf 0%, #3c9aaa 34%, #18718c 68%, #0b465f 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--deep);
}

body {
  min-height: 100vh;
  margin: 0;
  background: transparent;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background:
    radial-gradient(circle at 16% 28%, rgba(7, 44, 54, 0.16) 0 0.045rem, transparent 0.062rem) 0 0 / 0.9rem 0.95rem,
    radial-gradient(circle at 74% 62%, rgba(241, 255, 248, 0.2) 0 0.04rem, transparent 0.06rem) 0.32rem 0.24rem / 1.15rem 1.05rem,
    repeating-linear-gradient(0deg, rgba(241, 255, 248, 0.055) 0 1px, transparent 1px 0.72rem),
    repeating-linear-gradient(90deg, rgba(7, 44, 54, 0.04) 0 1px, transparent 1px 1rem);
  mix-blend-mode: multiply;
  opacity: 0.78;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(241, 255, 248, 0.18) 0 16rem, transparent 34rem),
    radial-gradient(ellipse at 22% 34%, rgba(241, 255, 248, 0.1) 0 8rem, transparent 18rem),
    radial-gradient(ellipse at 78% 58%, rgba(7, 44, 54, 0.12) 0 8rem, transparent 20rem),
    linear-gradient(180deg, rgba(241, 255, 248, 0.12), transparent 32%, rgba(2, 24, 38, 0.24));
  opacity: 0.62;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

a:focus-visible,
button:focus-visible,
.carousel:focus-visible,
.arrangement-card:focus-visible {
  outline: 3px solid rgba(241, 255, 248, 0.62);
  outline-offset: 4px;
}

.site-shell {
  width: min(100%, 68rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(1rem, env(safe-area-inset-top)) 1rem 2rem;
  overflow-x: hidden;
}

.profile-panel {
  position: relative;
  padding: 0.8rem 0 1.55rem;
}

.profile-panel::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1.05rem;
  left: 0;
  height: 2.05rem;
  background-image: url("data:image/svg+xml,%3Csvg width='144' height='32' viewBox='0 0 144 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 13 C12 3 24 3 36 13 S60 23 72 13 S96 3 108 13 S132 23 144 13' fill='none' stroke='%23f1fff8' stroke-opacity='.58' stroke-width='2.4' stroke-linecap='butt'/%3E%3Cpath d='M0 22 C12 12 24 12 36 22 S60 32 72 22 S96 12 108 22 S132 32 144 22' fill='none' stroke='%239ee6d8' stroke-opacity='.36' stroke-width='2.2' stroke-linecap='butt'/%3E%3C/svg%3E");
  background-position: center center;
  background-repeat: repeat-x;
  background-size: 9rem 2rem;
  filter: drop-shadow(0 0.42rem 0.72rem rgba(158, 230, 216, 0.14));
  opacity: 0.96;
  pointer-events: none;
}

.brand-header {
  position: relative;
  display: grid;
  grid-template-columns: 6.4rem minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
  max-width: 48rem;
}

.logo-callout {
  position: relative;
  width: fit-content;
}

.logo-frame {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.65rem;
  height: 5.65rem;
  overflow: hidden;
  border: 1px solid rgba(241, 255, 248, 0.5);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 22%, rgba(255, 255, 255, 0.72) 0 0.75rem, transparent 0.78rem),
    linear-gradient(180deg, rgba(241, 255, 248, 0.92), rgba(158, 230, 216, 0.54)),
    rgba(241, 255, 248, 0.64);
  box-shadow:
    inset 0 0.38rem 0.8rem rgba(255, 255, 255, 0.42),
    inset 0 -0.7rem 1rem rgba(8, 121, 156, 0.2),
    0 1rem 2.4rem rgba(3, 24, 37, 0.22);
  transform: rotate(-1.5deg);
}

.logo-frame::before {
  content: "";
  position: absolute;
  inset: 0.5rem;
  border: 1px solid rgba(8, 121, 156, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.32), transparent 42%),
    radial-gradient(circle at 74% 72%, rgba(53, 183, 200, 0.2), transparent 38%);
  pointer-events: none;
}

.logo-button {
  padding: 0;
  font: inherit;
}

.logo-button:hover {
  transform: rotate(-1.5deg) translateY(-1px) scale(1.02);
}

.logo-button:active {
  transform: rotate(-1.5deg) translateY(1px) scale(0.99);
}

.brand-logo {
  position: relative;
  z-index: 1;
  width: 5.95rem;
  height: auto;
  transform: translateY(0.38rem);
  pointer-events: none;
}

.swimming-porpoise {
  position: fixed;
  top: var(--swim-top, 36vh);
  left: -8rem;
  z-index: 20;
  width: 6.4rem;
  height: auto;
  filter: drop-shadow(0.35rem 0.42rem 0.18rem rgba(3, 24, 37, 0.3));
  pointer-events: none;
  transform-origin: center;
  animation:
    porpoise-swim 3.2s cubic-bezier(0.2, 0.72, 0.24, 1) var(--swim-delay, 0s) forwards,
    porpoise-bob 580ms ease-in-out var(--swim-delay, 0s) infinite alternate;
}

@keyframes porpoise-swim {
  0% {
    opacity: 0;
    transform: translate3d(-8rem, 1.4rem, 0) rotate(-8deg) scale(var(--swim-scale, 1));
  }

  12% {
    opacity: 1;
  }

  48% {
    transform: translate3d(48vw, -0.75rem, 0) rotate(7deg) scale(var(--swim-scale, 1));
  }

  88% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate3d(calc(100vw + 8rem), 0.8rem, 0) rotate(-5deg) scale(var(--swim-scale, 1));
  }
}

@keyframes porpoise-bob {
  from {
    margin-top: -0.28rem;
  }

  to {
    margin-top: 0.28rem;
  }
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 0.38rem;
}

.kicker {
  width: fit-content;
  padding: 0.24rem 0.48rem;
  border: 1px solid rgba(241, 255, 248, 0.36);
  border-radius: 999px;
  color: var(--deep);
  background: rgba(158, 230, 216, 0.9);
  box-shadow: 0 0.7rem 1.5rem rgba(3, 24, 37, 0.12);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  max-width: 10ch;
  margin: 0;
  color: var(--foam);
  font-size: 2.15rem;
  font-weight: 950;
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow: 0 0.55rem 1.7rem rgba(3, 24, 37, 0.32);
  text-wrap: balance;
}

.arrangement-stage {
  margin-top: 1.45rem;
}

.stage-heading {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}

.stage-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.9rem;
  width: 100%;
}

.stage-heading h2 {
  margin: 0;
  color: var(--foam);
  font-size: 1.8rem;
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 0.5rem 1.35rem rgba(3, 24, 37, 0.28);
}

.arrangement-counter {
  flex: 0 0 auto;
  padding: 0.44rem 0.58rem;
  border: 1px solid rgba(241, 255, 248, 0.42);
  border-radius: 999px;
  color: var(--foam);
  background: rgba(5, 40, 62, 0.38);
  box-shadow: 0 0.72rem 1.4rem rgba(3, 24, 37, 0.12);
  backdrop-filter: blur(16px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 900;
}

.carousel-wrap {
  position: relative;
  margin-inline: -1rem;
}

.carousel-wrap::before,
.carousel-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 2rem;
  pointer-events: none;
}

.carousel-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(8, 121, 156, 0.88), transparent);
}

.carousel-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(6, 78, 114, 0.88), transparent);
}

.carousel {
  overflow: hidden;
  overscroll-behavior-x: contain;
  perspective: 58rem;
  scrollbar-width: none;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel.is-dragging {
  cursor: grabbing;
}

.carousel-track {
  position: relative;
  min-height: 25rem;
  padding: 1.55rem 0 2rem;
  transform-style: preserve-3d;
}

.arrangement-card {
  position: absolute;
  top: 1.55rem;
  left: 50%;
  display: grid;
  align-content: end;
  width: min(74vw, 19.25rem);
  min-height: 21.35rem;
  overflow: hidden;
  padding: 0.78rem;
  border: 1px solid rgba(241, 255, 248, 0.56);
  border-radius: 0.52rem;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(247, 253, 250, 0.94), rgba(229, 250, 245, 0.88)),
    var(--surface);
  box-shadow:
    0 1.1rem 2.4rem rgba(3, 24, 37, 0.18),
    0 0 0 0.35rem rgba(241, 255, 248, 0.08);
  transform: translateX(-50%) translateZ(0) scale(0.86);
  transform-origin: center;
  opacity: 0.46;
  filter: saturate(0.72) contrast(0.94);
  transition: box-shadow 120ms ease-out, border-color 120ms ease-out;
  cursor: pointer;
  will-change: transform, opacity, filter;
}

.arrangement-card:nth-child(2n) {
  box-shadow:
    -0.26rem 0.42rem 0 rgba(158, 230, 216, 0.18),
    0 1.1rem 2.4rem rgba(3, 24, 37, 0.18);
}

.arrangement-card.is-left {
  transform-origin: center;
}

.arrangement-card.is-active {
  z-index: 2;
  box-shadow:
    var(--shadow-card),
    0 0 0 0.42rem rgba(158, 230, 216, 0.18);
}

.carousel.is-dragging .arrangement-card {
  transition-duration: 0ms;
}

.arrangement-card:hover {
  border-color: rgba(241, 255, 248, 0.9);
}

.arrangement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(247, 253, 250, 0.02) 0%, rgba(229, 250, 245, 0.22) 48%, rgba(247, 253, 250, 0.97) 100%),
    linear-gradient(90deg, rgba(53, 183, 200, 0.74) 0 0.18rem, transparent 0.18rem 100%),
    repeating-linear-gradient(0deg, rgba(8, 121, 156, 0.05) 0 1px, transparent 1px 6px);
  pointer-events: none;
}

.card-preview {
  position: absolute;
  inset: -0.35rem;
  width: calc(100% + 0.7rem);
  height: calc(100% + 0.7rem);
  object-fit: cover;
  object-position: top center;
  filter: blur(1px) saturate(0.72) contrast(1.12) sepia(0.08);
  opacity: 0.86;
  transform: scale(1.025);
}

.arrangement-card.is-active .card-preview {
  filter: blur(0.2px) saturate(0.88) contrast(1.1);
  opacity: 0.98;
}

.sheet-label {
  position: absolute;
  top: 1.62rem;
  left: 0.92rem;
  z-index: 3;
  width: fit-content;
  max-width: calc(100% - 1.84rem);
  padding: 0.26rem 0.46rem;
  border: 1px solid rgba(241, 255, 248, 0.32);
  border-radius: 999px;
  color: var(--foam);
  background: rgba(62, 142, 115, 0.92);
  box-shadow: 0 0.42rem 1rem rgba(3, 24, 37, 0.16);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.card-title {
  position: relative;
  z-index: 3;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0.58rem 0.64rem;
  border: 1px solid rgba(8, 121, 156, 0.16);
  border-radius: 0.36rem;
  color: var(--ink);
  background: rgba(247, 253, 250, 0.94);
  box-shadow: 0 0.7rem 1.6rem rgba(3, 24, 37, 0.1);
  font-size: var(--title-size, 1.55rem);
  font-weight: 950;
  line-height: 0.98;
  letter-spacing: 0;
  text-wrap: balance;
}

.empty-state {
  width: min(84vw, 24rem);
  min-height: 13rem;
  margin: 1rem auto;
  padding: 1.2rem;
  border: 1px dashed rgba(241, 255, 248, 0.5);
  border-radius: 0.5rem;
  color: var(--foam);
  background: rgba(5, 40, 62, 0.35);
  box-shadow: 0 1rem 2.4rem rgba(3, 24, 37, 0.12);
  text-align: center;
  backdrop-filter: blur(14px);
}

.empty-state h3 {
  margin: 0.5rem 0;
}

.empty-state p {
  margin: 0;
  color: rgba(241, 255, 248, 0.76);
}

.selected-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
  width: min(100%, 13rem);
  margin: 0.05rem auto 0;
  padding: 0.42rem;
  border: 1px solid rgba(241, 255, 248, 0.28);
  border-radius: 999px;
  background: rgba(5, 40, 62, 0.38);
  box-shadow: 0 0.9rem 2rem rgba(3, 24, 37, 0.16);
  backdrop-filter: blur(14px);
}

.selected-actions > * {
  min-width: 0;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.15rem;
  padding: 0 0.92rem;
  border-radius: 999px;
  font-weight: 950;
  font-size: 0.96rem;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.primary-action {
  border: 1px solid rgba(241, 255, 248, 0.38);
  color: var(--deep);
  background: linear-gradient(180deg, #f1fff8, #9ee6d8);
  box-shadow: 0 0.85rem 1.7rem rgba(3, 24, 37, 0.2);
}

.secondary-action {
  border: 1px solid rgba(241, 255, 248, 0.28);
  color: var(--foam);
  background: rgba(5, 40, 62, 0.36);
  font: inherit;
}

.primary-action:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.social-strip {
  display: flex;
  justify-content: center;
  margin-top: 1.28rem;
  padding: 0.7rem 0 0.1rem;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  flex: 0 0 auto;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.15rem;
  min-width: 3.15rem;
  height: 3.15rem;
  min-height: 3.15rem;
  padding: 0;
  border: 1px solid rgba(241, 255, 248, 0.28);
  border-radius: 50%;
  box-shadow: 0 0.75rem 1.5rem rgba(3, 24, 37, 0.2);
  text-decoration: none;
}

.social-icon--instagram {
  color: #fff;
  background:
    radial-gradient(circle at 30% 110%, #feda75 0 22%, transparent 43%),
    radial-gradient(circle at 12% 88%, #fa7e1e 0 25%, transparent 46%),
    radial-gradient(circle at 92% 10%, #4f5bd5 0 24%, transparent 45%),
    linear-gradient(135deg, #833ab4 0%, #c13584 42%, #e1306c 63%, #fd1d1d 78%, #fcb045 100%);
}

.social-icon--tiktok {
  color: #fff;
  background: #050505;
}

.social-links svg {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.social-icon--instagram svg {
  stroke: currentColor;
}

.social-icon--tiktok svg {
  width: 2.02rem;
  height: 2.02rem;
  overflow: visible;
}

.tiktok-shadow,
.tiktok-mark {
  stroke: none;
}

.tiktok-shadow--cyan {
  fill: #25f4ee;
  transform: translate(-1px, 1px);
}

.tiktok-shadow--red {
  fill: #fe2c55;
  transform: translate(1px, -1px);
}

.tiktok-mark {
  fill: #fff;
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(3, 24, 37, 0.58);
  backdrop-filter: blur(4px);
}

.preview-sheet {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 11;
  width: min(100%, 45rem);
  max-height: 84vh;
  margin: 0 auto;
  padding: 0.62rem 1rem max(1rem, env(safe-area-inset-bottom));
  border: 1px solid rgba(241, 255, 248, 0.3);
  border-bottom: 0;
  border-radius: 0.9rem 0.9rem 0 0;
  background: linear-gradient(180deg, rgba(241, 255, 248, 0.96), rgba(229, 250, 245, 0.96));
  box-shadow: 0 -1rem 4rem rgba(3, 24, 37, 0.36);
  transform: translateY(110%);
  transition: transform 180ms ease;
}

.preview-sheet.is-open {
  transform: translateY(0);
}

.sheet-handle {
  width: 3.2rem;
  height: 0.28rem;
  margin: 0 auto 0.7rem;
  border-radius: 999px;
  background: rgba(7, 44, 54, 0.24);
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sheet-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.1;
}

.close-button {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(7, 44, 54, 0.16);
  border-radius: 50%;
  color: var(--ink);
  background: #fbfff9;
  font: inherit;
  font-size: 1.6rem;
}

.pdf-crop {
  height: min(50vh, 28rem);
  margin: 0.8rem 0;
  overflow: hidden;
  border: 1px solid rgba(7, 44, 54, 0.14);
  border-radius: 0.5rem;
  background: #fff;
}

.pdf-crop iframe {
  width: 100%;
  height: 170%;
  border: 0;
  transform-origin: top center;
}

.sheet-download {
  width: 100%;
}

@media (max-width: 42rem) {
  .site-shell {
    padding-inline: 0.85rem;
  }

  .brand-header {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.9rem;
  }

  .brand-copy {
    width: 100%;
    max-width: 21.5rem;
  }

  .logo-frame {
    width: 4.95rem;
    height: 4.95rem;
  }

  .brand-logo {
    width: 5.35rem;
  }

  .stage-title-row {
    align-items: start;
    flex-direction: column;
    gap: 0.55rem;
  }

  .stage-heading {
    max-width: 21.5rem;
  }
}

@media (min-width: 48rem) {
  .site-shell {
    padding-top: 1.45rem;
  }

  .profile-panel {
    padding-bottom: 1.7rem;
  }

  .brand-header {
    grid-template-columns: 6.8rem minmax(0, 1fr);
    gap: 1.3rem;
  }

  .logo-frame {
    width: 6.1rem;
    height: 6.1rem;
  }

  .brand-logo {
    width: 6.55rem;
  }

  h1 {
    font-size: 4.2rem;
  }

  .stage-heading h2 {
    font-size: 3.4rem;
  }

  .arrangement-stage {
    margin-top: 1.8rem;
  }

  .carousel-wrap {
    margin-inline: 0;
  }

  .carousel-wrap::before,
  .carousel-wrap::after {
    width: 3rem;
  }

  .arrangement-card {
    width: min(36vw, 20.25rem);
    min-width: min(36vw, 20.25rem);
  }
}
