@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;700&family=Zen+Maru+Gothic:wght@400;500;700&display=swap");

:root {
  color-scheme: light;
  --sky: #7dc395;
  --sky-deep: #65b082;
  --paper: #f8f8f0;
  --card: rgb(247, 243, 223);
  --brown: #725d42;
  --brown-dark: #794f27;
  --muted: #9f927d;
  --border: #9f927d;
  --border-soft: #c4b89e;
  --shadow: #bdaea0;
  --mint: #19c8b9;
  --mint-dark: #11a89b;
  --yellow: #ffcc00;
  --yellow-dark: #e0b800;
  --green: #86d67a;
  --grass: #6fba2c;
  --pink: #f8a6b2;
  --purple: #b77dee;
  --blue: #889df0;
  --coral: #e59266;
  --red: #fc736d;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--sky);
  color: var(--brown);
  font-family: Nunito, "Noto Sans SC", "Zen Maru Gothic", -apple-system, "PingFang SC", sans-serif;
  font-weight: 500;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
}

.island-page {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 22px clamp(20px, 4vw, 64px) 38px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.42), transparent 18rem),
    linear-gradient(180deg, #8ed4a6 0%, var(--sky) 58%, #77bd74 100%);
}

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  color: var(--brown-dark);
  font-weight: 900;
  font-size: 24px;
  box-shadow: 0 5px 0 0 var(--shadow);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  color: var(--brown-dark);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.brand span {
  color: rgba(114, 93, 66, 0.78);
  font-size: 13px;
}

.progress-badge,
.guide-bubble,
.progress-card,
.signal-list span,
.shell-clues span,
.poster-tags span,
.name-tag {
  border: 2px solid var(--border);
  background: var(--card);
  box-shadow: 0 4px 0 0 var(--shadow);
}

.progress-badge {
  min-height: 40px;
  padding: 10px 18px;
  border-radius: 50px;
  color: var(--brown);
  font-weight: 800;
}

.landscape {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.cloud {
  position: absolute;
  width: 112px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 34px -13px 0 8px rgba(255, 255, 255, 0.82), 72px 0 0 2px rgba(255, 255, 255, 0.82);
}

.c1 {
  left: 9%;
  top: 19%;
  animation: drift 13s ease-in-out infinite;
}

.c2 {
  right: 14%;
  top: 12%;
  transform: scale(0.8);
  animation: drift 16s ease-in-out infinite reverse;
}

.hill {
  position: absolute;
  bottom: -72px;
  width: 72vw;
  height: 260px;
  border-radius: 50% 50% 0 0;
}

.h1 {
  left: -18vw;
  background: #74be66;
}

.h2 {
  right: -16vw;
  bottom: -92px;
  background: #8ac68a;
}

.tree {
  position: absolute;
  bottom: 150px;
  width: 46px;
  height: 70px;
  border-radius: 28px 28px 18px 18px;
  background: #4f9d43;
  box-shadow: inset -10px -10px 0 rgba(0, 0, 0, 0.08);
}

.tree::after {
  content: "";
  position: absolute;
  left: 19px;
  bottom: -36px;
  width: 9px;
  height: 42px;
  border-radius: 8px;
  background: #9a835a;
}

.t1 {
  left: 8%;
}

.t2 {
  right: 10%;
  transform: scale(0.82);
}

.grass {
  position: absolute;
  bottom: 52px;
  width: 88px;
  height: 32px;
  background:
    linear-gradient(60deg, transparent 47%, #4f9d43 48% 55%, transparent 56%),
    linear-gradient(120deg, transparent 47%, #4f9d43 48% 55%, transparent 56%);
  opacity: 0.72;
}

.g1 {
  left: 22%;
}

.g2 {
  left: 50%;
  transform: scale(0.8);
}

.g3 {
  right: 22%;
  transform: scale(1.1);
}

.hero-copy,
.egg-stage,
.name-card,
.poster-actions,
.test-copy {
  position: relative;
  z-index: 2;
  border: 3px solid var(--border);
  border-radius: 40px 35px 45px 38px / 38px 45px 35px 40px;
  background: rgba(247, 243, 223, 0.94);
  box-shadow: 0 8px 24px rgba(107, 92, 67, 0.26), 0 6px 0 0 var(--shadow);
}

.hero-copy {
  width: min(660px, 100%);
  margin: clamp(80px, 13vh, 150px) 0 0;
  padding: clamp(28px, 4vw, 48px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--grass);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 16px;
  color: var(--brown-dark);
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0.01em;
}

h2 {
  color: var(--brown-dark);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 900;
}

p {
  color: var(--brown);
  font-size: 17px;
  line-height: 1.75;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.action-row.center {
  justify-content: center;
}

.island-btn,
.round-btn,
.login-choice button {
  min-height: 48px;
  border: 2.5px solid var(--border-soft);
  border-radius: 50px;
  background: var(--paper);
  color: var(--brown);
  padding: 0 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 5px 0 0 var(--shadow);
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.island-btn:hover,
.round-btn:hover,
.login-choice button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 0 0 var(--shadow);
}

.island-btn:active,
.round-btn:active,
.login-choice button:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 var(--shadow);
}

.island-btn:focus-visible,
.round-btn:focus-visible,
input:focus-visible,
.login-choice button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

.island-btn.primary {
  background: var(--yellow);
  border-color: var(--yellow-dark);
}

.egg-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.falling-egg {
  position: absolute;
  top: -160px;
  animation: eggDrop 4.6s cubic-bezier(0.19, 1, 0.22, 1) infinite;
}

.e1 { left: 58%; animation-delay: 0s; }
.e2 { left: 72%; animation-delay: 0.35s; }
.e3 { left: 84%; animation-delay: 0.7s; }
.e4 { left: 39%; animation-delay: 1.05s; }
.e5 { left: 67%; animation-delay: 1.4s; }
.e6 { left: 91%; animation-delay: 1.75s; }
.e7 { left: 47%; animation-delay: 2.1s; }
.e8 { left: 77%; animation-delay: 2.45s; }
.e9 { left: 52%; animation-delay: 2.8s; }
.e10 { left: 88%; animation-delay: 3.15s; }
.e11 { left: 63%; animation-delay: 3.5s; }
.e12 { left: 34%; animation-delay: 3.85s; }
.e13 { left: 80%; animation-delay: 4.2s; }
.e14 { left: 42%; animation-delay: 4.55s; }
.e15 { left: 70%; animation-delay: 4.9s; }
.e16 { left: 95%; animation-delay: 5.25s; }

.egg {
  position: relative;
  display: block;
  width: 96px;
  height: 118px;
  border: 3px solid var(--border);
  border-radius: 54% 54% 46% 46%;
  background: var(--card);
  box-shadow: inset -12px -14px 0 rgba(114, 93, 66, 0.12), 0 8px 0 rgba(114, 93, 66, 0.18);
}

.egg.small {
  width: 70px;
  height: 86px;
}

.egg::before,
.egg::after,
.egg i,
.egg b {
  content: "";
  position: absolute;
  border-radius: 999px;
}

.egg::before {
  left: 20px;
  top: 25px;
  width: 16px;
  height: 22px;
  background: var(--pink);
}

.egg::after {
  right: 20px;
  top: 48px;
  width: 18px;
  height: 14px;
  background: var(--blue);
}

.egg i {
  left: 38px;
  bottom: 26px;
  width: 28px;
  height: 17px;
  background: var(--green);
}

.egg b {
  left: 45px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: var(--yellow);
}

.egg.star::before { background: var(--purple); }
.egg.star::after { background: var(--yellow); }
.egg.star i { background: var(--mint); }
.egg.wave::before { background: var(--blue); }
.egg.wave::after { background: var(--coral); }
.egg.wave i { background: var(--yellow); }
.egg.berry::before { background: var(--red); }
.egg.berry::after { background: var(--pink); }
.egg.berry i { background: var(--purple); }

.guide-bubble {
  position: absolute;
  right: clamp(20px, 5vw, 76px);
  bottom: 82px;
  z-index: 3;
  width: min(280px, calc(100% - 40px));
  border-radius: 28px;
  padding: 18px 20px;
}

.guide-bubble strong,
.guide-bubble span {
  display: block;
}

.guide-bubble strong {
  color: var(--brown-dark);
  font-weight: 900;
  margin-bottom: 4px;
}

.guide-bubble span {
  line-height: 1.55;
}

.test-shell {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 150px);
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  width: min(1180px, 100%);
  margin: 0 auto;
}

.test-copy {
  padding: 28px;
}

.signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}

.signal-list span,
.shell-clues span,
.poster-tags span {
  border-radius: 50px;
  padding: 8px 12px;
  color: var(--brown);
  font-size: 13px;
  font-weight: 800;
}

.swipe-card {
  position: relative;
  width: min(520px, 100%);
  min-height: 520px;
  justify-self: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 4px solid var(--border);
  border-radius: 38px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 204, 0, 0.22), transparent 12rem),
    var(--card);
  padding: 34px;
  box-shadow: 0 14px 0 0 var(--shadow), 0 26px 42px rgba(107, 92, 67, 0.22);
  touch-action: none;
  user-select: none;
  animation: cardFall 0.55s cubic-bezier(0.2, 1.3, 0.34, 1) both;
  transition: transform 0.18s ease;
}

.swipe-card.dragging {
  transition: none;
}

.swipe-card[data-intent="yes"] {
  border-color: var(--mint);
}

.swipe-card[data-intent="no"] {
  border-color: var(--red);
}

.card-ribbon {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--mint);
  color: white;
  font-weight: 900;
  box-shadow: 0 4px 0 0 var(--mint-dark);
}

.swipe-card p {
  font-size: 16px;
}

.swipe-stamps {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-weight: 900;
}

.bottom-control {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 5;
  width: min(680px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 96px 1fr 96px;
  align-items: center;
  gap: 14px;
}

.round-btn {
  width: 96px;
  height: 72px;
  padding: 0;
  border-radius: 999px;
}

.round-btn.mint {
  background: var(--mint);
  color: white;
  border-color: var(--mint-dark);
  box-shadow: 0 5px 0 0 var(--mint-dark);
}

.round-btn.coral {
  background: var(--red);
  color: white;
  border-color: #d94e4e;
  box-shadow: 0 5px 0 0 #d94e4e;
}

.progress-card {
  border-radius: 24px;
  padding: 13px 18px;
  font-weight: 900;
}

.meter {
  height: 14px;
  margin-top: 8px;
  border-radius: 50px;
  background: #e6d9bf;
  overflow: hidden;
}

.meter i {
  display: block;
  width: var(--value, 0%);
  height: 100%;
  border-radius: 50px;
  background: repeating-linear-gradient(-45deg, #0ec4b6, #0ec4b6 10px, #01b0a7 10px, #01b0a7 20px);
  background-size: 28px 28px;
  animation: stripe 1s linear infinite;
}

.egg-stage {
  width: min(760px, 100%);
  margin: clamp(42px, 8vh, 82px) auto 0;
  text-align: center;
  padding: clamp(28px, 5vw, 48px);
}

.big-egg-button {
  position: relative;
  width: min(320px, 72vw);
  aspect-ratio: 1 / 1;
  margin: 10px auto 22px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.big-egg-button .hero-egg {
  width: min(230px, 54vw);
  height: min(286px, 68vw);
  animation: juicyPulse 1.2s ease-in-out infinite;
}

.big-egg-button.crack-one .hero-egg::before,
.big-egg-button.crack-two .hero-egg::before {
  box-shadow: 30px 30px 0 -2px var(--red);
}

.big-egg-button.crack-two .hero-egg::after {
  box-shadow: -34px 42px 0 -2px var(--mint);
}

.tap-ring {
  position: absolute;
  inset: 18%;
  border: 4px solid rgba(255, 204, 0, 0.72);
  border-radius: 50%;
  animation: ring 1.4s ease-out infinite;
}

.tap-ring.r2 {
  animation-delay: 0.45s;
}

.shell-clues {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.critter {
  position: relative;
  width: 220px;
  height: 210px;
  animation: popIn 0.45s cubic-bezier(0.2, 1.5, 0.34, 1) both;
}

.face {
  position: absolute;
  left: 25px;
  top: 42px;
  width: 170px;
  height: 150px;
  border: 4px solid var(--border);
  border-radius: 54px 54px 68px 68px;
  background: #f7cd67;
  box-shadow: inset -16px -18px 0 rgba(114, 93, 66, 0.1), 0 8px 0 0 var(--shadow);
}

.ear {
  position: absolute;
  top: 8px;
  width: 72px;
  height: 76px;
  border: 4px solid var(--border);
  border-radius: 46px 46px 22px 22px;
  background: #e59266;
  z-index: 0;
}

.ear.left {
  left: 26px;
  transform: rotate(-18deg);
}

.ear.right {
  right: 26px;
  transform: rotate(18deg);
}

.eye {
  position: absolute;
  top: 58px;
  width: 16px;
  height: 22px;
  border-radius: 50%;
  background: var(--brown-dark);
}

.eye.left {
  left: 48px;
}

.eye.right {
  right: 48px;
}

.nose {
  position: absolute;
  left: 78px;
  top: 76px;
  width: 18px;
  height: 14px;
  border-radius: 50%;
  background: var(--brown-dark);
}

.mouth {
  position: absolute;
  left: 72px;
  top: 98px;
  width: 30px;
  height: 12px;
  border-bottom: 4px solid var(--brown-dark);
  border-radius: 0 0 30px 30px;
}

.name-layout,
.poster-layout {
  position: relative;
  z-index: 2;
  min-height: calc(100vh - 110px);
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
}

.pet-podium {
  display: grid;
  justify-items: center;
  gap: 18px;
}

.pet-podium .critter {
  transform: scale(1.2);
}

.name-tag {
  border-radius: 50px;
  padding: 12px 28px;
  color: var(--brown-dark);
  font-weight: 900;
  font-size: 22px;
}

.name-card {
  padding: clamp(26px, 4vw, 42px);
}

label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--brown-dark);
  font-weight: 900;
}

input {
  height: 52px;
  border: 3px solid var(--border-soft);
  border-radius: 50px;
  background: var(--paper);
  color: var(--brown);
  padding: 0 22px;
  font-weight: 700;
  box-shadow: 0 4px 0 0 #d4c9b4;
  outline: none;
}

input:focus {
  border-color: var(--yellow);
  box-shadow: 0 4px 0 0 var(--yellow-dark), 0 0 0 4px rgba(255, 204, 0, 0.18);
}

.login-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.login-choice button.active {
  background: var(--mint);
  color: white;
  border-color: var(--mint-dark);
  box-shadow: 0 5px 0 0 var(--mint-dark);
}

.poster-layout {
  grid-template-columns: minmax(320px, 520px) minmax(320px, 1fr);
}

.share-poster {
  position: relative;
  z-index: 2;
  aspect-ratio: 4 / 3;
  border: 4px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 204, 0, 0.28), transparent 10rem),
    linear-gradient(145deg, #f7f3df 0%, #f8f8f0 100%);
  box-shadow: 0 14px 0 0 var(--shadow), 0 26px 48px rgba(107, 92, 67, 0.24);
  padding: 28px;
  color: var(--brown);
  overflow: hidden;
}

.poster-top,
.poster-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 900;
}

.poster-critter {
  position: absolute;
  right: 26px;
  bottom: 54px;
  transform: scale(0.74);
  transform-origin: bottom right;
}

.share-poster h1 {
  margin-top: 56px;
  max-width: 60%;
}

.share-poster p {
  max-width: 58%;
  font-weight: 800;
}

.poster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 62%;
}

.poster-foot {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 22px;
  color: var(--muted);
}

.poster-actions {
  padding: clamp(26px, 4vw, 42px);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  pointer-events: none;
  border: 3px solid var(--border);
  border-radius: 50px;
  background: var(--card);
  color: var(--brown);
  padding: 13px 20px;
  font-weight: 900;
  box-shadow: 0 5px 0 0 var(--shadow);
  transition: all 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@keyframes drift {
  0%,
  100% { transform: translateX(0); }
  50% { transform: translateX(24px); }
}

@keyframes eggDrop {
  0% {
    transform: translateY(-120px) rotate(-20deg) scale(0.8);
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  68% {
    transform: translateY(calc(100vh - 190px)) rotate(18deg) scale(1);
  }
  78% {
    transform: translateY(calc(100vh - 214px)) rotate(-8deg) scale(1.08, 0.92);
  }
  100% {
    transform: translateY(calc(100vh - 190px)) rotate(4deg) scale(1);
    opacity: 1;
  }
}

@keyframes cardFall {
  0% {
    transform: translateY(-120vh) rotate(-12deg) scale(0.92);
    opacity: 0;
  }
  78% {
    transform: translateY(16px) rotate(2deg) scale(1.04);
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(0) scale(1);
  }
}

@keyframes stripe {
  from { background-position: 0 0; }
  to { background-position: -28px 0; }
}

@keyframes juicyPulse {
  0%,
  100% { transform: scale(1); }
  50% { transform: scale(1.06, 0.96) translateY(4px); }
}

@keyframes ring {
  0% {
    opacity: 0.72;
    transform: scale(0.8);
  }
  100% {
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes popIn {
  0% {
    transform: translateY(40px) scale(0.4);
    opacity: 0;
  }
  70% {
    transform: translateY(-8px) scale(1.12);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .island-page {
    padding: 18px 18px 120px;
  }

  .progress-badge {
    display: none;
  }

  .hero-copy {
    margin-top: 76px;
  }

  h1 {
    font-size: 38px;
  }

  .guide-bubble {
    left: 18px;
    right: 18px;
    bottom: 26px;
    width: auto;
  }

  .test-shell,
  .name-layout,
  .poster-layout {
    grid-template-columns: 1fr;
    gap: 22px;
    min-height: auto;
    margin-top: 28px;
  }

  .test-copy {
    order: 2;
  }

  .swipe-card {
    min-height: 430px;
    padding: 26px;
  }

  .bottom-control {
    grid-template-columns: 74px 1fr 74px;
    bottom: 18px;
  }

  .round-btn {
    width: 74px;
    height: 62px;
  }

  .egg-stage {
    margin-top: 34px;
  }

  .poster-layout {
    align-items: start;
  }

  .share-poster {
    width: 100%;
  }

  .poster-critter {
    transform: scale(0.56);
  }
}
