*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --ink: #4a3550;
  --muted: #a58a9f;
  --paper: #fffdfb;
  --cream: #fff7f4;
  --font-body: "Quicksand", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --font-hand: "Caveat", "Segoe Script", cursive;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: -25vmax;
  z-index: -2;
  background:
    radial-gradient(38vmax 38vmax at 10% 6%, #ffe1eb 0%, transparent 62%),
    radial-gradient(42vmax 42vmax at 92% 10%, #e7e1ff 0%, transparent 64%),
    radial-gradient(48vmax 48vmax at 48% 108%, #ffe9d7 0%, transparent 64%),
    radial-gradient(30vmax 30vmax at 80% 70%, #fdeaf6 0%, transparent 70%),
    #fff7f4;
  animation: drift 26s ease-in-out infinite alternate;
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(2%, -2.5%, 0) scale(1.07);
  }
}

.her-name {
  font-weight: 700;
  color: #c4658f;
}

.floaties {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.floaties span {
  position: absolute;
  bottom: -60px;
  opacity: 0;
  animation: rise linear infinite;
  will-change: transform, opacity;
  filter: saturate(0.9);
}

@keyframes rise {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.4;
  }
  100% {
    transform: translate3d(var(--dx, 20px), -112vh, 0) rotate(var(--rot, 40deg));
    opacity: 0;
  }
}

.phone {
  position: relative;
  z-index: 2;
  width: min(430px, calc(100vw - 32px));
  height: min(900px, calc(100svh - 40px));
  margin: auto;
  padding: 10px;
  border-radius: 56px;
  background: linear-gradient(155deg, #322838, #171219 55%, #241b28);
  box-shadow:
    0 60px 110px -40px rgba(80, 40, 78, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 0 100px rgba(255, 180, 215, 0.3);
}

body {
  display: grid;
  place-items: center;
  padding: 20px;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 46px;
  background: #fff8f5;
  isolation: isolate;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(70% 40% at 8% 0%, #ffe6ef 0%, transparent 70%),
    radial-gradient(65% 45% at 100% 12%, #ebe5ff 0%, transparent 70%),
    radial-gradient(80% 45% at 50% 108%, #ffe9d9 0%, transparent 70%),
    #fff8f5;
}

.statusbar {
  position: relative;
  z-index: 3;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  height: 44px;
  padding: 0 24px;
  color: #6b5568;
}

.clock {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.island {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 106px;
  height: 27px;
  border-radius: 999px;
  background: #14101a;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-icons svg {
  display: block;
}

.app-scroll {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 20px 104px;
  scrollbar-width: none;
}

.app-scroll::-webkit-scrollbar {
  display: none;
}

.app.modal-open .app-scroll {
  overflow: hidden;
}

.app-header {
  padding-top: 4px;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #9b7f9a;
}

.brand-heart {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow:
    0 6px 14px -8px rgba(120, 70, 120, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  color: #a17f9c;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px -14px rgba(120, 70, 120, 0.7);
  cursor: pointer;
  transition:
    transform 0.25s,
    color 0.25s,
    background 0.25s;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover {
  color: #c4658f;
  background: #fff;
  transform: translateY(-2px);
}

.icon-btn:active {
  transform: scale(0.94);
}

.avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd3e2, #d9c8ff);
  box-shadow:
    0 10px 20px -12px rgba(150, 90, 150, 0.6),
    0 0 0 3px rgba(255, 255, 255, 0.75);
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.greeting {
  margin: 18px 0 0;
  font-family: var(--font-hand);
  font-size: 1.3rem;
  color: #b986a6;
}

h1 {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 9vw, 2.35rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #3d2b44;
}

.sub {
  margin: 10px 0 0;
  font-size: 0.83rem;
  font-weight: 500;
  line-height: 1.65;
  color: #8c7286;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.chip {
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 600;
  color: #8a6f86;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 18px -14px rgba(120, 70, 120, 0.6);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #b08fa4;
}

.opened-count {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #bda6b5;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card {
  --c1: #d3c3fb;
  --c2: #a58bea;
  --ink: #7c62c9;
  --shadow: rgba(150, 110, 220, 0.55);
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 156px;
  padding: 12px;
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  text-align: left;
  color: #3c2a42;
  cursor: pointer;
  background: linear-gradient(158deg, var(--c1), var(--c2));
  box-shadow:
    0 16px 28px -20px var(--shadow),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
  isolation: isolate;
  transition:
    transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.3s;
  animation: cardIn 0.7s both cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 85% at 6% 0%, rgba(255, 255, 255, 0.6), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 46%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.4) 1px, transparent 1.5px);
  background-size: 13px 13px;
  opacity: 0.5;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 22px 36px -20px var(--shadow),
    0 1px 0 rgba(255, 255, 255, 0.55) inset;
}

.card:active {
  transform: scale(0.97);
}

.card:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fffdfb,
    0 0 0 6px var(--c2),
    0 16px 28px -20px var(--shadow);
}

.card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-num {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(60, 42, 66, 0.55);
  background: rgba(255, 255, 255, 0.42);
}

.card-opened {
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(60, 42, 66, 0.6);
  opacity: 0;
  transition: opacity 0.3s;
}

.card.is-open .card-opened {
  opacity: 1;
}

.card-emoji {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-top: 8px;
  border-radius: 16px;
  line-height: 1;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.46));
  box-shadow:
    0 10px 18px -10px rgba(55, 25, 60, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 0 0 3px rgba(255, 255, 255, 0.14);
  transform: rotate(-3deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card:hover .card-emoji {
  transform: rotate(2deg) translateY(-2px);
}

.emoji-main {
  display: block;
  font-size: 23px;
  line-height: 1;
  filter: drop-shadow(0 3px 4px rgba(60, 30, 60, 0.22));
  transition: transform 0.35s;
}

.card:hover .emoji-main {
  transform: scale(1.1);
}

.mini {
  position: absolute;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.76));
  box-shadow:
    0 4px 8px -3px rgba(55, 25, 60, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  animation: bob 3.6s ease-in-out infinite;
}

.mini-a {
  top: -9px;
  right: -11px;
}

.mini-b {
  bottom: -8px;
  left: -11px;
  font-size: 10px;
  animation-delay: 0.9s;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }
  50% {
    transform: translateY(-3px) rotate(4deg);
  }
}

.card-mark {
  position: absolute;
  right: -10px;
  bottom: -15px;
  z-index: 0;
  font-size: 76px;
  line-height: 1;
  opacity: 0.18;
  pointer-events: none;
  filter: saturate(1.1) blur(0.3px);
  transform: rotate(9deg);
  transition:
    opacity 0.35s,
    transform 0.35s;
}

.card:hover .card-mark {
  opacity: 0.28;
  transform: rotate(4deg) scale(1.05);
}

.card-info {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: auto;
  padding-top: 10px;
  padding-right: 22px;
}

.kicker {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(60, 42, 66, 0.5);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: #3c2a42;
}

.note {
  font-family: var(--font-hand);
  font-size: 0.94rem;
  line-height: 1.2;
  color: rgba(60, 42, 66, 0.72);
}

.card-cta {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.65) inset;
  transition:
    background 0.3s,
    transform 0.3s;
}

.card:hover .card-cta {
  background: #fff;
  transform: translateX(2px);
}

.quote-card {
  position: relative;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 30px -26px rgba(120, 70, 120, 0.7);
}

.quote-heart {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 15px;
  opacity: 0.8;
}

.quote-card p {
  margin: 0;
  padding-right: 24px;
  font-family: var(--font-hand);
  font-size: 1.12rem;
  line-height: 1.4;
  color: #8a6f86;
}

.hint {
  margin: 22px 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.02rem;
  color: #b08fa4;
}

.app-footer {
  margin-top: 26px;
  padding-bottom: 6px;
  text-align: center;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c3a9b8;
}

.tabbar {
  position: relative;
  z-index: 5;
  display: grid;
  flex-shrink: 0;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 9px 14px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(222, 196, 212, 0.45);
  background: rgba(255, 250, 248, 0.9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 7px 4px 5px;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #b39aaa;
  background: none;
  cursor: pointer;
  transition:
    color 0.25s,
    transform 0.2s;
}

.tab svg {
  width: 21px;
  height: 21px;
}

.tab.is-active {
  color: #d4759f;
}

.tab.is-active::before {
  content: "";
  position: absolute;
  inset: 1px 10px;
  z-index: -1;
  border-radius: 15px;
  background: linear-gradient(180deg, #ffe6ef, #fff0f6);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.tab:active {
  transform: scale(0.93);
}

.tab.on {
  color: #c4658f;
}

.tab.on svg {
  animation: sway 1.9s ease-in-out infinite;
}

@keyframes sway {
  0%,
  100% {
    transform: rotate(-7deg);
  }
  50% {
    transform: rotate(7deg);
  }
}

.sheet-layer {
  position: absolute;
  inset: 0;
  z-index: 20;
  visibility: hidden;
  pointer-events: none;
}

.sheet-layer.open {
  visibility: visible;
  pointer-events: auto;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 28, 48, 0.38);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s;
}

.sheet-layer.open .sheet-backdrop {
  opacity: 1;
}

.sheet {
  --c1: #d3c3fb;
  --c2: #a58bea;
  --ink: #7c62c9;
  --shadow: rgba(150, 110, 220, 0.55);
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  max-height: 88%;
  border-radius: 30px 30px 0 0;
  background: linear-gradient(180deg, #fffdf8 0%, #fff8f3 100%);
  box-shadow: 0 -24px 60px -24px rgba(70, 34, 66, 0.45);
  transform: translateY(104%);
  transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1);
  overflow: hidden;
}

.sheet::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  height: 5px;
  background: linear-gradient(90deg, var(--c1), var(--c2));
}

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

.sheet.dragging {
  transition: none;
}

.sheet-grab {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  padding: 12px 0 4px;
  cursor: grab;
  touch-action: none;
}

.sheet-grab span {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #e6d3de;
}

.sheet-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0 0 3px;
  border: 0;
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  color: #a385a0;
  background: #f7eaef;
  cursor: pointer;
  transition:
    transform 0.3s,
    color 0.3s,
    background 0.3s;
}

.sheet-close:hover,
.sheet-close:focus-visible {
  transform: rotate(90deg);
  color: #7d5c78;
  background: #f1dde6;
  outline: none;
}

.sheet-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 24px calc(32px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}

.sheet-scroll::-webkit-scrollbar {
  display: none;
}

.sheet-seal {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  font-size: 27px;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow:
    0 14px 24px -14px var(--shadow),
    0 0 0 5px #fffdf8;
}

.sheet-scroll[hidden] {
  display: none;
}

.surprise-scroll {
  padding-top: 8px;
}

.gift-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 116px;
  margin: 0 auto 8px;
}

.gift-box {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 28px;
  font-size: 44px;
  line-height: 1;
  background: linear-gradient(150deg, #fff4c9, #ffd3dd);
  box-shadow:
    0 18px 30px -16px rgba(220, 140, 120, 0.65),
    0 0 0 5px rgba(255, 255, 255, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  animation: giftFloat 3.4s ease-in-out infinite;
}

@keyframes giftFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-2.5deg);
  }
  50% {
    transform: translateY(-6px) rotate(2.5deg);
  }
}

.gift-spark {
  position: absolute;
  font-size: 16px;
  animation: sparkle 2.8s ease-in-out infinite;
}

.spark-a {
  top: 4px;
  right: 12px;
}

.spark-b {
  bottom: 16px;
  left: 6px;
  font-size: 14px;
  animation-delay: 0.7s;
}

.spark-c {
  top: 20px;
  left: 14px;
  font-size: 12px;
  animation-delay: 1.3s;
}

@keyframes sparkle {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.9) rotate(-6deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.15) rotate(6deg);
  }
}

.claim-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 4px;
  padding: 14px;
  border-radius: 18px;
  background: #fff5f0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 10px 22px -20px rgba(140, 80, 100, 0.5);
}

.claim-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 19px;
  background: linear-gradient(150deg, #ffe6b8, #ffd0dd);
  box-shadow: 0 6px 12px -8px rgba(200, 120, 130, 0.6);
}

.claim-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.claim-text strong {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c98aa0;
}

.claim-text span {
  font-size: 0.84rem;
  line-height: 1.55;
  color: #5f4a5c;
}

.claim-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: center;
  text-decoration: none;
  padding: 14px 18px;
  border: 0;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #f78fb3, #c98ae8);
  box-shadow:
    0 14px 26px -14px rgba(200, 110, 160, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.25s;
}

.claim-btn:active {
  transform: scale(0.97);
}

.claim-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #d989c9;
}

.app-icon-preview {
  width: 88px;
  height: 88px;
  margin: 4px auto 16px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow:
    0 16px 30px -16px rgba(100, 60, 90, 0.6),
    0 0 0 4px rgba(255, 255, 255, 0.8);
}

.app-icon-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.install-steps {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.install-steps .claim-card {
  margin-top: 0;
  padding: 11px 13px;
}

.letter-kicker {
  margin: 0 0 6px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #bb9db1;
}

.letter-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #46304c;
}

.letter-body p {
  margin: 0 0 13px;
  font-size: 0.9rem;
  line-height: 1.78;
  color: #5f4a5c;
  animation: fadeUp 0.55s both;
}

.letter-body p:nth-child(1) {
  animation-delay: 0.06s;
}
.letter-body p:nth-child(2) {
  animation-delay: 0.11s;
}
.letter-body p:nth-child(3) {
  animation-delay: 0.16s;
}
.letter-body p:nth-child(4) {
  animation-delay: 0.21s;
}
.letter-body p:nth-child(5) {
  animation-delay: 0.26s;
}
.letter-body p:nth-child(6) {
  animation-delay: 0.31s;
}
.letter-body p:nth-child(n + 7) {
  animation-delay: 0.36s;
}

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

.letter-list {
  display: grid;
  gap: 8px;
  margin: 2px 0 15px;
  padding: 0;
  list-style: none;
  animation: fadeUp 0.55s 0.25s both;
}

.letter-list li {
  padding: 9px 13px;
  border-radius: 13px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #5f4a5c;
  background: #fdf1f6;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.75) inset;
}

.letter-ps {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px dashed #ead9e3;
  font-size: 0.8rem;
  font-style: italic;
  line-height: 1.65;
  color: #9a8197;
}

.letter-ps[hidden] {
  display: none;
}

.letter-sign {
  margin: 14px 0 0;
  font-family: var(--font-hand);
  font-size: 1.55rem;
  text-align: right;
  color: var(--ink);
}

.burst {
  position: fixed;
  z-index: 80;
  font-size: 18px;
  pointer-events: none;
  animation: burst 0.95s ease-out forwards;
}

@keyframes burst {
  from {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 1;
  }
  to {
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty)))
      scale(1.15) rotate(var(--r));
    opacity: 0;
  }
}

.toast {
  position: absolute;
  bottom: calc(84px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 30;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #fff;
  white-space: nowrap;
  background: rgba(63, 45, 69, 0.92);
  box-shadow: 0 14px 30px -12px rgba(60, 30, 60, 0.5);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.upi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.upi-hero {
  position: relative;
  margin-top: 22px;
  padding: 22px;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(148deg, #d9f8ea 0%, #c9dcff 55%, #ffd9e7 100%);
  box-shadow:
    0 20px 40px -26px rgba(80, 140, 150, 0.6),
    0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.upi-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.5;
  pointer-events: none;
}

.upi-hero-kicker {
  position: relative;
  z-index: 1;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(47, 85, 82, 0.6);
}

.upi-amount {
  position: relative;
  z-index: 1;
  margin: 10px 0 4px;
  font-family: var(--font-display);
  font-size: 2.9rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.035em;
  color: #2f5d58;
}

.upi-hero-sub {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: #5b7c78;
}

.upi-coin {
  position: absolute;
  z-index: 1;
  animation: bob 3.8s ease-in-out infinite;
}

.coin-a {
  top: 20px;
  right: 22px;
  font-size: 23px;
}

.coin-b {
  right: 52px;
  bottom: 24px;
  font-size: 14px;
  animation-delay: 1.1s;
}

.upi-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 16px 32px -26px rgba(80, 110, 120, 0.55);
}

.upi-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9aa5a8;
}

.upi-live {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #8fbcae;
}

.upi-copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.upi-id {
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #2f5d58;
  overflow-wrap: anywhere;
}

.copy-btn {
  flex-shrink: 0;
  padding: 8px 13px;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #6fc4a8, #7aa7e8);
  box-shadow: 0 8px 16px -10px rgba(80, 150, 140, 0.75);
  cursor: pointer;
  transition:
    transform 0.2s,
    filter 0.2s;
}

.copy-btn:hover {
  filter: brightness(1.04);
}

.copy-btn:active {
  transform: scale(0.95);
}

.copy-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 6px #9cd9c4;
}

.upi-note {
  margin: 12px 0 0;
  font-size: 0.77rem;
  line-height: 1.6;
  color: #6c7f80;
}

.upi-note strong {
  color: #3b6b64;
}

.upi-steps {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.upi-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.85) inset;
}

.upi-step-num {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.64rem;
  font-weight: 700;
  color: #3b6b64;
  background: linear-gradient(150deg, #d7f5e8, #cfe0ff);
}

.upi-step strong {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #3f5658;
}

.upi-step div span {
  display: block;
  margin-top: 2px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #718385;
}

.upi-claim {
  margin-top: 18px;
  background: linear-gradient(135deg, #5fc7a6, #7aa7e8);
  box-shadow:
    0 14px 26px -14px rgba(70, 150, 140, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}

.upi-claim.is-claimed {
  color: #a58aa0;
  background: linear-gradient(135deg, #efe3f2, #fbeef2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
  cursor: default;
}

.upi-claimed-note {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 1.02rem;
  color: #7f9a92;
}

.upi-terms {
  margin-top: 16px;
  padding-top: 0;
  border-top: 0;
  text-align: center;
  font-size: 0.74rem;
}

.screen[hidden] {
  display: none;
}

@media (max-width: 560px) {
  body {
    display: block;
    padding: 0;
  }

  .phone {
    width: 100%;
    height: 100svh;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .app {
    border-radius: 0;
  }

  .statusbar {
    display: none;
  }

  .app-scroll {
    padding-top: calc(22px + env(safe-area-inset-top));
  }

  .tabbar {
    padding-bottom: calc(9px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .app-scroll {
    padding-right: 16px;
    padding-left: 16px;
  }

  .card {
    min-height: 160px;
    padding: 12px;
  }

  .sheet-scroll {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .floaties {
    display: none;
  }
}
