:root {
  --bg: #fff8ea;
  --panel: rgba(255, 251, 243, 0.78);
  --text: #674218;
  --text-soft: #8d6332;
  --shadow: 0 24px 60px rgba(157, 113, 39, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.86), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 215, 170, 0.72), transparent 26%),
    linear-gradient(180deg, #fff9ef 0%, #ffefcf 100%);
  color: var(--text);
}

body {
  display: flex;
  justify-content: center;
}

button,
textarea {
  font: inherit;
}

.app-shell {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  padding: 12px 10px 156px;
}

.phone-frame {
  padding-bottom: 8px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(12px);
  opacity: 0.78;
  pointer-events: none;
}

.ambient-left {
  top: 82px;
  left: -18px;
  width: 120px;
  height: 120px;
  background: rgba(255, 213, 119, 0.45);
}

.ambient-right {
  right: -16px;
  bottom: 220px;
  width: 140px;
  height: 140px;
  background: rgba(255, 199, 154, 0.52);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.topbar-tag {
  margin: 0 0 0 auto;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.ghost-button,
.primary-button,
.secondary-button,
.action-card {
  border: none;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ghost-button {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.78);
  color: var(--text);
  border: 1px solid rgba(129, 91, 43, 0.12);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeUp 0.45s ease;
}

.hero-card,
.coin-panel,
.fortune-result,
.share-card {
  background: var(--panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  padding: 18px 18px 16px;
  display: grid;
  gap: 12px;
  background:
    radial-gradient(circle at top right, rgba(255, 223, 149, 0.8), transparent 28%),
    linear-gradient(180deg, rgba(255, 251, 241, 0.98), rgba(255, 239, 202, 0.82));
}

.eyebrow,
.section-label,
.share-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.hero-copy h1,
.section-head h2 {
  margin: 8px 0 0;
  font-family: Georgia, serif;
  line-height: 1.1;
}

.hero-copy h1 {
  font-size: clamp(28px, 9vw, 38px);
}

.support-copy {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
}

.hero-otter img {
  display: block;
  width: min(54vw, 210px);
  margin: 0 auto;
  filter: drop-shadow(0 22px 34px rgba(170, 112, 39, 0.18));
  animation: floaty 5.5s ease-in-out infinite;
}

.action-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: 20px;
  text-align: left;
  background: rgba(255, 250, 241, 0.84);
  box-shadow: 0 18px 32px rgba(160, 112, 35, 0.12);
}

.action-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.action-desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
}

.action-fortune {
  background: linear-gradient(135deg, rgba(255, 234, 186, 0.95), rgba(255, 248, 237, 0.88));
}

.action-coin {
  background: linear-gradient(135deg, rgba(255, 221, 201, 0.95), rgba(255, 248, 242, 0.9));
}

.section-head {
  margin-bottom: 10px;
  padding: 4px 2px 0;
}

.section-head h2 {
  font-size: clamp(28px, 8vw, 36px);
}

.fortune-stage,
.share-wrap {
  display: grid;
  gap: 14px;
}

.fortune-deck,
.fortune-ritual {
  display: grid;
  gap: 14px;
}

.fortune-bubble {
  position: relative;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(255, 252, 246, 0.92);
  box-shadow: 0 14px 26px rgba(160, 112, 35, 0.1);
}

.fortune-bubble::after {
  content: "";
  position: absolute;
  left: 34px;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: rgba(255, 252, 246, 0.92);
  transform: rotate(45deg);
  border-radius: 4px;
}

.fortune-bubble p,
.fortune-guide-copy p:last-child,
.fortune-summary,
.share-summary,
.coin-caption,
.question-box span {
  margin: 0;
  line-height: 1.7;
  color: var(--text-soft);
}

.fortune-guide {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 226, 149, 0.74), transparent 26%),
    rgba(255, 249, 237, 0.9);
  box-shadow: 0 16px 28px rgba(160, 112, 35, 0.1);
}

.fortune-guide img {
  width: 100%;
  display: block;
  animation: floaty 4.8s ease-in-out infinite;
}

.fortune-cards {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 122px;
  gap: 12px;
  align-items: end;
  overflow-x: auto;
  padding: 8px 4px 12px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.fortune-pick {
  position: relative;
  min-height: 184px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: center;
}

.fortune-pick-card {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 184px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background:
    radial-gradient(circle at top, rgba(255, 229, 156, 0.88), transparent 24%),
    linear-gradient(180deg, rgba(112, 61, 18, 0.95), rgba(69, 39, 14, 0.98));
  box-shadow: 0 18px 32px rgba(97, 60, 18, 0.22);
  color: #ffeec0;
  transform-origin: bottom center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fortune-pick:nth-child(odd) .fortune-pick-card {
  transform: rotate(-10deg) translateY(12px);
}

.fortune-pick:nth-child(even) .fortune-pick-card {
  transform: rotate(8deg) translateY(4px);
}

.fortune-pick:nth-child(3n) .fortune-pick-card {
  transform: translateY(0);
}

.fortune-pick:hover .fortune-pick-card,
.fortune-pick:active .fortune-pick-card {
  transform: translateY(-6px) scale(1.02);
}

.fortune-pick.selected .fortune-pick-card {
  transform: translateY(-10px) scale(1.04);
  box-shadow: 0 22px 40px rgba(97, 60, 18, 0.28);
}

.card-back {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.card-star {
  font-size: 28px;
}

.card-back-title {
  font-family: Georgia, serif;
  font-size: 24px;
}

.card-back-subtitle {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 238, 192, 0.76);
}

.fortune-result,
.coin-panel,
.share-card {
  border-radius: 28px;
  padding: 18px;
}

.hidden {
  display: none !important;
}

.result-topline,
.tag-row,
.result-actions,
.share-card-head {
  display: flex;
  gap: 12px;
}

.result-topline {
  justify-content: space-between;
  align-items: center;
  color: var(--text-soft);
  font-size: 13px;
}

.fortune-result h3,
.share-card h3 {
  margin: 12px 0 0;
  font-size: 28px;
  font-family: Georgia, serif;
}

.tag-row {
  flex-wrap: wrap;
  margin-top: 16px;
}

.soft-tag,
.brand-benefit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.92);
  color: var(--text);
  font-size: 12px;
}

.list-block,
.share-lists > div {
  margin-top: 14px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 252, 246, 0.76);
}

.list-block ul,
.share-lists ul {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--text-soft);
  line-height: 1.7;
}

.otter-note,
.share-note {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 232, 182, 0.85), rgba(255, 246, 228, 0.9));
  color: var(--text);
  line-height: 1.75;
}

.result-actions {
  margin-top: 18px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 999px;
}

.primary-button {
  background: linear-gradient(180deg, #f7c860, #e3a53b);
  color: #5d3710;
  box-shadow: 0 16px 30px rgba(207, 144, 32, 0.26);
}

.secondary-button {
  background: rgba(255, 249, 238, 0.94);
  color: var(--text);
  box-shadow: 0 12px 24px rgba(170, 112, 39, 0.12);
}

.question-box {
  display: grid;
  gap: 10px;
}

.question-box textarea {
  width: 100%;
  resize: none;
  border: 1px solid rgba(139, 95, 31, 0.14);
  border-radius: 20px;
  padding: 16px;
  min-height: 84px;
  color: var(--text);
  background: rgba(255, 251, 244, 0.88);
}

.coin-stage {
  display: grid;
  place-items: center;
  min-height: 220px;
  perspective: 1200px;
}

.coin {
  position: relative;
  width: min(58vw, 212px);
  aspect-ratio: 1;
  transform-style: preserve-3d;
  transition: transform 0.45s ease-out;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.coin.holding {
  animation: coinLiftSpin 0.9s ease-in-out infinite;
}

.coin.coin-reset {
  animation: coinNudge 0.24s ease;
}

.coin.resolving {
  animation: coinDrop 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.coin.show-no {
  transform: rotateY(180deg);
}

.coin-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 50%;
  overflow: hidden;
}

.coin-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 20px 28px rgba(141, 99, 39, 0.18));
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.coin-back {
  transform: rotateY(180deg);
}

.coin-progress {
  width: min(72vw, 260px);
  height: 12px;
  margin: -2px auto 12px;
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.96);
  border: 1px solid rgba(184, 122, 53, 0.18);
  box-shadow: inset 0 1px 3px rgba(141, 99, 39, 0.12);
  overflow: hidden;
}

.coin-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f7c860, #e3a53b);
  transition: width 0.08s linear;
}

.coin-progress-tip {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 18px;
  text-align: center;
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.55;
  background: rgba(255, 238, 192, 0.98);
  border: 1px solid rgba(184, 122, 53, 0.18);
  box-shadow: 0 14px 28px rgba(170, 112, 39, 0.16);
}

.coin-helper {
  margin: -2px 0 14px;
  text-align: center;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.coin-prompt-label {
  margin: 8px 0 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(141, 99, 50, 0.7);
}

.coin-prompt-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.coin-prompt-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.72);
  color: rgba(103, 66, 24, 0.82);
  font-size: 13px;
  line-height: 1.4;
}

.coin-result {
  margin-top: 14px;
  text-align: center;
}

.coin-answer {
  margin: 0;
  font-size: 42px;
  font-family: Georgia, serif;
}

.coin-reflection,
.coin-guidance {
  margin: 10px 0 0;
  line-height: 1.65;
}

.coin-reflection {
  color: var(--text-soft);
}

.share-card {
  position: relative;
  background:
    radial-gradient(circle at top right, rgba(255, 219, 120, 0.72), transparent 28%),
    linear-gradient(180deg, rgba(255, 251, 245, 0.98), rgba(255, 236, 204, 0.92));
}

.share-mascot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.share-card-head {
  justify-content: flex-start;
  padding-right: 96px;
}

.share-date {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
}

.share-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.share-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 229, 0.92);
}

.share-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.share-brand {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(140, 96, 35, 0.2);
}

.share-brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.share-brand-name,
.brand-dock-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.share-brand-copy,
.share-brand-subcopy,
.brand-dock-tagline,
.brand-dock-subline {
  margin: 4px 0 0;
  line-height: 1.6;
  color: var(--text-soft);
}

.share-brand-subcopy {
  font-size: 12px;
}

.share-hint {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.brand-dock {
  position: fixed;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: min(428px, calc(100vw - 24px));
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  border-radius: 22px;
  background: rgba(255, 250, 242, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow: 0 20px 40px rgba(157, 113, 39, 0.16);
  z-index: 2;
}

.brand-dock-main {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
}

.brand-dock-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.brand-dock-tagline {
  font-size: 12px;
}

.brand-dock-subline {
  font-size: 10px;
  line-height: 1.35;
}

.brand-dock-cta {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #8a5a20 0%, #b87a35 100%);
  color: #fffaf3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(138, 90, 32, 0.2);
  cursor: pointer;
  white-space: nowrap;
}

.brand-dock-cta:active {
  transform: translateY(1px);
}

.brand-dock-benefits {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
}

@media (max-width: 420px) {
  .brand-dock {
    width: calc(100vw - 16px);
    bottom: 6px;
  }

  .brand-dock-main {
    grid-template-columns: 40px 1fr;
  }

  .brand-dock-cta {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 6px;
  }

  .brand-dock-icon {
    width: 40px;
    height: 40px;
  }

  .section-head h2 {
    font-size: 30px;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes coinLiftSpin {
  0% {
    transform: translateY(0) rotateY(0deg) rotateX(0deg) scale(1);
  }
  50% {
    transform: translateY(-18px) rotateY(360deg) rotateX(16deg) scale(1.04);
  }
  100% {
    transform: translateY(-8px) rotateY(720deg) rotateX(0deg) scale(1.02);
  }
}

@keyframes coinNudge {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes coinDrop {
  0% {
    transform: translateY(-8px) rotateY(720deg) rotateX(0deg) scale(1.02);
  }
  60% {
    transform: translateY(16px) rotateY(1080deg) rotateX(8deg) scale(0.98);
  }
  100% {
    transform: translateY(0) rotateY(1260deg) rotateX(0deg) scale(1);
  }
}
