/* =========================================================
   Feifei の運動積分卡  ♡  styles
   ========================================================= */

:root {
  --ink: #4b2b39;
  --ink-soft: #7c5666;
  --muted: #a88494;
  --pink-50: #fff6fa;
  --pink-100: #ffe9f1;
  --pink-200: #ffd3e2;
  --pink-300: #ffb3cc;
  --pink-400: #ff86ae;
  --pink-500: #f65d91;
  --pink-600: #e33f78;
  --pink-700: #c22e63;
  --blue-50: #f3fbff;
  --blue-100: #e3f6ff;
  --blue-200: #c8edff;
  --blue-300: #a4dfff;
  --blue-400: #7ccdf7;
  --blue-500: #4aabe3;
  --blue-600: #2f8cc4;
  --blue-ink: #245b7a;
  --gold: #ffc84f;
  --gold-soft: #ffe7a8;
  --green: #5cc99a;
  --cream: #fffaf4;
  --line: #ffe3ec;
  --shadow-pink: 0 18px 36px -24px rgba(219, 74, 126, 0.5);
  --shadow-blue: 0 18px 36px -26px rgba(60, 140, 190, 0.5);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --font: "M PLUS Rounded 1c", "Baloo 2", "PingFang HK", "PingFang TC",
    "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif;
  --font-round: "Baloo 2", "M PLUS Rounded 1c", "PingFang HK", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: #fbeef4;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
textarea,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------------- desktop background ---------------- */

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 190, 214, 0.55) 1.5px, transparent 1.6px),
    radial-gradient(rgba(255, 225, 236, 0.8) 1.5px, transparent 1.6px);
  background-size: 36px 36px, 36px 36px;
  background-position: 0 0, 18px 18px;
  z-index: 0;
  pointer-events: none;
}

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

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}

.bg-blob.b1 {
  width: 440px;
  height: 440px;
  top: -140px;
  left: -120px;
  background: #ffd0e2;
}

.bg-blob.b2 {
  width: 460px;
  height: 460px;
  bottom: -170px;
  right: -140px;
  background: #cdeeff;
}

.bg-char {
  display: none;
  position: fixed;
  width: 300px;
  opacity: 0.13;
  filter: blur(0.4px);
}

.bg-char svg {
  width: 100%;
  height: auto;
}

.bg-kitty {
  left: 3%;
  bottom: 8%;
  transform: rotate(-8deg);
}

.bg-cinna {
  right: 3%;
  top: 10%;
  transform: rotate(8deg);
}

/* ---------------- app shell ---------------- */

.app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: linear-gradient(180deg, #fffafd 0%, #fff7fb 45%, #fffdfa 100%);
  box-shadow: 0 0 90px rgba(190, 100, 140, 0.15);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  overflow: clip;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 18px 8px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 30px;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 6px rgba(226, 63, 120, 0.25));
  transform: rotate(-6deg);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-text h1 {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #592c3d;
  white-space: nowrap;
}

.brand-text h1 span {
  color: var(--pink-500);
  font-size: 13px;
  font-weight: 700;
  margin: 0 1px;
}

.brand-text p {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.avatar-btn {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: linear-gradient(135deg, #fff, #ffe4ee);
  box-shadow: 0 7px 15px rgba(230, 90, 140, 0.24);
  overflow: hidden;
  padding: 0;
  transition: transform 0.2s ease;
}

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

.avatar-btn > svg {
  position: absolute;
  width: 56px;
  height: 62px;
  left: 50%;
  top: -4px;
  transform: translateX(-50%);
}

.avatar-dot {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 1.6px solid #fff;
  box-shadow: 0 0 0 2px rgba(92, 201, 154, 0.18);
}

/* ---------------- views ---------------- */

.main {
  padding-top: 2px;
}

.view {
  display: none;
}

.view.active {
  display: block;
  animation: viewIn 0.4s cubic-bezier(0.22, 0.8, 0.3, 1) both;
}

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-round);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--pink-600);
  background: rgba(255, 255, 255, 0.72);
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

/* ---------------- hero ---------------- */

.hero {
  position: relative;
  margin: 8px 16px 0;
  min-height: 192px;
  padding: 20px 18px 18px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 130% at 88% 110%, #ffd9e8 0%, transparent 62%),
    linear-gradient(135deg, #ffeaf2 0%, #ffdbe9 55%, #ffcfe2 100%);
  box-shadow: 0 20px 38px -26px rgba(219, 74, 126, 0.55), inset 0 1px 0 #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 1.6px, transparent 1.7px);
  background-size: 17px 17px;
  opacity: 0.6;
}

.hero::after {
  content: "";
  position: absolute;
  left: -30%;
  top: -70%;
  width: 110%;
  height: 110%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 62%);
  z-index: -1;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 64%;
}

.hero-copy h2 {
  font-size: clamp(25px, 7.2vw, 33px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #52283a;
  margin-top: 8px;
}

.hero-copy h2 em {
  font-style: normal;
  color: var(--pink-600);
  display: inline-block;
  padding: 0 3px;
  border-radius: 6px;
  background: linear-gradient(transparent 62%, rgba(255, 255, 255, 0.9) 62%);
}

.hero-copy p {
  margin-top: 9px;
  font-size: 12px;
  line-height: 1.65;
  color: #8a5568;
  font-weight: 500;
}

.hero-art {
  position: absolute;
  right: 6px;
  bottom: -18px;
  width: 176px;
  z-index: 2;
  filter: drop-shadow(0 14px 16px rgba(190, 60, 110, 0.18));
  animation: float 6s ease-in-out infinite;
}

.hero-art svg {
  width: 100%;
  height: auto;
}

.hero-blob {
  position: absolute;
  inset: -6% -2%;
  border-radius: 50%;
  background: radial-gradient(circle at 55% 45%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 66%);
  z-index: -1;
}

.hero-spark {
  position: absolute;
  z-index: 4;
  color: #fff;
  text-shadow: 0 2px 6px rgba(226, 63, 120, 0.3);
  animation: twinkle 3.2s ease-in-out infinite;
}

.hero-spark.s1 {
  top: 16px;
  right: 150px;
  font-size: 15px;
}

.hero-spark.s2 {
  top: 66px;
  right: 26px;
  font-size: 12px;
  color: #ff7ba5;
  animation-delay: 0.8s;
}

.hero-spark.s3 {
  bottom: 20px;
  right: 140px;
  font-size: 10px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-7px) rotate(-1.5deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.85);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ---------------- check-in ---------------- */

.checkin-area {
  margin: 15px 16px 0;
}

.checkin-card {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--pink-100);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-pink);
}

.checkin-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 26px;
  width: 58px;
  height: 18px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 196, 217, 0.95) 0 5px,
    rgba(255, 240, 246, 0.95) 5px 10px
  );
  transform: rotate(-4deg);
  box-shadow: 0 2px 4px rgba(200, 100, 140, 0.08);
}

.checkin-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 13px;
  border: none;
  border-radius: 19px;
  padding: 14px 15px;
  color: #fff;
  background: linear-gradient(135deg, #ff8db4 0%, #f65d91 48%, #e94b82 100%);
  box-shadow: 0 12px 22px -12px rgba(230, 63, 120, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.checkin-btn::after {
  content: "";
  position: absolute;
  top: -60%;
  left: -30%;
  width: 50%;
  height: 220%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  transform: rotate(18deg);
  animation: sheen 4.5s ease-in-out infinite;
}

@keyframes sheen {
  0%,
  55% {
    transform: translateX(-160%) rotate(18deg);
  }
  80%,
  100% {
    transform: translateX(360%) rotate(18deg);
  }
}

.checkin-btn:active {
  transform: scale(0.98);
  box-shadow: 0 6px 14px -10px rgba(230, 63, 120, 0.7);
}

.cam {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.cam svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: #fff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkin-btn .btn-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.checkin-btn b {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.checkin-btn small {
  font-size: 10.5px;
  opacity: 0.92;
  letter-spacing: 0.01em;
}

.checkin-btn .plus {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-round);
  font-size: 20px;
  font-weight: 800;
  color: var(--pink-500);
  background: #fff;
  border-radius: 999px;
  padding: 2px 10px 3px;
  box-shadow: 0 4px 10px rgba(150, 30, 70, 0.18);
}

.rule {
  margin-top: 10px;
  font-size: 10px;
  color: #b08394;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  letter-spacing: 0.02em;
}

.rule svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* done card */

.done-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: #fff;
  border: 1.5px solid #d9f2e7;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 16px 32px -24px rgba(60, 160, 120, 0.45);
  position: relative;
}

.done-photo {
  position: relative;
  padding: 0;
  background: #ffe9f1;
  cursor: pointer;
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 18px;
  overflow: hidden;
  border: 2.5px solid #fff;
  box-shadow: 0 5px 12px rgba(80, 40, 60, 0.14);
}

.done-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.done-check {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  display: grid;
  place-items: center;
  border: 2.5px solid #fff;
  box-shadow: 0 4px 8px rgba(60, 160, 120, 0.3);
}

.done-check svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done-copy {
  flex: 1;
  min-width: 0;
  padding-right: 30px;
}

.done-tag {
  font-family: var(--font-round);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #45b385;
}

.done-copy h3 {
  font-size: 15.5px;
  font-weight: 800;
  color: #3f2a33;
  margin: 1px 0 3px;
}

.done-copy p {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.done-time {
  display: block;
  margin-top: 4px;
  font-size: 9.5px;
  color: #b9a1ac;
  letter-spacing: 0.02em;
}

.done-plus {
  position: absolute;
  top: 11px;
  right: 11px;
  font-family: var(--font-round);
  font-size: 12px;
  font-weight: 800;
  color: #3aa979;
  background: #e9f9f1;
  border-radius: 999px;
  padding: 2px 7px;
}

/* mini progress */

.mini-card {
  display: block;
  width: calc(100% - 32px);
  margin: 14px 16px 0;
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--pink-100);
  border-radius: var(--radius-lg);
  padding: 15px 16px 13px;
  box-shadow: var(--shadow-pink);
  color: var(--ink);
  transition: transform 0.18s ease;
}

.mini-card:active {
  transform: scale(0.985);
}

.mini-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mini-label {
  display: block;
  font-family: var(--font-round);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: #bd7590;
}

.mini-count {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 1px;
}

.mini-count b {
  font-family: var(--font-round);
  font-size: 27px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--pink-600);
}

.mini-count span {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
}

.mini-streak {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fff5f8;
  border: 1px solid #ffe1ec;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 9.5px;
  color: #a86f83;
  white-space: nowrap;
}

.mini-streak svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #ff9f43;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini-streak b {
  font-family: var(--font-round);
  font-size: 11px;
  color: #f08a2e;
}

.mini-dots {
  display: flex;
  gap: 5px;
  margin: 10px 0 9px;
}

.mini-dot {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #ffe5ee;
  overflow: hidden;
  position: relative;
  transition: background 0.3s ease;
}

.mini-dot.on {
  background: linear-gradient(90deg, #ffb3cc, var(--pink-500));
  box-shadow: 0 1px 4px rgba(246, 93, 145, 0.35);
}

.mini-dot.on:nth-child(2n) {
  background: linear-gradient(90deg, #ffc2d7, #ff7fa9);
}

.mini-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #a98795;
}

.mini-foot .go {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: var(--pink-600);
  font-weight: 800;
  white-space: nowrap;
}

.mini-foot .go svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.love-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 20px 16px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #bda0ad;
}

.love-note span {
  color: #ffa8c3;
  font-size: 11px;
}

/* ---------------- points ---------------- */

.points-hero {
  position: relative;
  margin: 4px 14px 0;
  padding: 22px 20px 36px;
  min-height: 218px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #f0fbff 0%, #dcf4ff 55%, #c6ecff 100%);
  border: 1.5px solid #e2f5ff;
  box-shadow: inset 0 1px 0 #fff, 0 20px 38px -28px rgba(60, 140, 190, 0.55);
  isolation: isolate;
}

.points-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  opacity: 0.55;
}

.points-copy {
  position: relative;
  z-index: 3;
  width: 60%;
}

.points-copy .eyebrow {
  color: var(--blue-600);
  background: rgba(255, 255, 255, 0.78);
}

.points-copy h2 {
  margin-top: 8px;
  font-size: clamp(25px, 7.2vw, 32px);
  line-height: 1.22;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-ink);
}

.points-copy p {
  margin-top: 9px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #5b8aa6;
  font-weight: 500;
}

.points-art {
  position: absolute;
  right: 6px;
  bottom: -8px;
  width: 176px;
  z-index: 2;
  filter: drop-shadow(0 16px 16px rgba(40, 120, 170, 0.18));
  animation: float 7s ease-in-out infinite;
}

.points-art svg {
  width: 100%;
  height: auto;
}

.points-blob {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 68%);
  z-index: -1;
}

.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  filter: blur(1px);
  opacity: 0.9;
  z-index: 1;
}

.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 50%;
}

.cloud.c1 {
  width: 116px;
  height: 26px;
  left: -26px;
  bottom: 26px;
  opacity: 0.85;
}

.cloud.c1::before {
  width: 46px;
  height: 46px;
  left: 18px;
  bottom: 0;
}

.cloud.c1::after {
  width: 32px;
  height: 32px;
  left: 56px;
  bottom: 2px;
}

.cloud.c2 {
  width: 80px;
  height: 18px;
  right: -14px;
  top: 26px;
  opacity: 0.6;
}

.cloud.c2::before {
  width: 30px;
  height: 30px;
  right: 12px;
  bottom: 0;
}

.cloud.c3 {
  width: 140px;
  height: 22px;
  right: 34px;
  bottom: -6px;
  opacity: 0.55;
}

.cloud.c3::before {
  width: 40px;
  height: 40px;
  left: 26px;
  bottom: 0;
}

.pt-star {
  position: absolute;
  color: #ffd873;
  z-index: 3;
  text-shadow: 0 0 8px rgba(255, 200, 79, 0.7);
  animation: twinkle 3s ease-in-out infinite;
}

.pt-star.p1 {
  top: 18px;
  right: 152px;
  font-size: 13px;
}

.pt-star.p2 {
  top: 72px;
  right: 24px;
  font-size: 9px;
  animation-delay: 0.9s;
}

.pt-star.p3 {
  bottom: 54px;
  left: 46%;
  font-size: 11px;
  animation-delay: 1.6s;
}

.board-card {
  position: relative;
  z-index: 2;
  margin: -22px 16px 0;
  background: #fff;
  border: 1.5px solid #e8f6ff;
  border-radius: 28px;
  padding: 17px 16px 14px;
  box-shadow: var(--shadow-blue);
}

.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.board-kicker {
  font-family: var(--font-round);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #7fb8d6;
}

.board-head h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--blue-ink);
  letter-spacing: -0.01em;
  margin-top: 1px;
}

.board-count {
  font-family: var(--font-round);
  font-size: 22px;
  font-weight: 800;
  color: var(--blue-600);
  background: #f3fbff;
  border: 1.5px solid #dff3ff;
  border-radius: 14px;
  padding: 2px 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.board-count i {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: #9cc7dd;
}

.board-count {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.slot {
  position: relative;
  aspect-ratio: 0.9;
  border-radius: 17px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.slot.earned {
  background: linear-gradient(180deg, #f4fcff, #ddf3ff);
  border: 1.5px solid #c3eaff;
  box-shadow: 0 6px 13px -8px rgba(70, 160, 210, 0.65), inset 0 1px 0 #fff;
  animation: slotPop 0.55s cubic-bezier(0.22, 1.3, 0.4, 1) both;
  animation-delay: var(--d, 0ms);
}

.slot.locked {
  background: #f9fdff;
  border: 1.5px dashed #d9eefb;
}

.slot .cinna {
  width: 98%;
  height: 98%;
  transform: translateY(3%);
  filter: drop-shadow(0 3px 4px rgba(90, 160, 200, 0.15));
}

.slot.locked .cinna {
  opacity: 0.1;
  filter: grayscale(1);
}

.slot-no {
  position: absolute;
  top: 4px;
  left: 6px;
  z-index: 2;
  font-family: var(--font-round);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #8cc3e0;
}

.slot-sparkle {
  position: absolute;
  top: 2px;
  right: 5px;
  z-index: 2;
  font-size: 9px;
  color: var(--gold);
  text-shadow: 0 0 5px rgba(255, 200, 79, 0.8);
  animation: twinkle 2.6s ease-in-out infinite;
}

.slot.locked .slot-sparkle {
  display: none;
}

.slot .qmark {
  position: absolute;
  font-family: var(--font-round);
  font-size: 15px;
  font-weight: 800;
  color: #a8d3e9;
  text-shadow: 0 1px 0 #fff, 0 0 8px #fff;
}

@keyframes slotPop {
  0% {
    opacity: 0;
    transform: scale(0.6) rotate(-6deg);
  }
  70% {
    transform: scale(1.06) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.board-progress {
  margin-top: 13px;
}

.bar {
  height: 9px;
  border-radius: 999px;
  background: #edf9ff;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(80, 150, 190, 0.1);
}

.bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ccdf7 0%, #a9c6ff 55%, #ff9fc4 100%);
  box-shadow: 0 0 8px rgba(124, 205, 247, 0.6);
  transition: width 0.9s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.board-progress p {
  margin-top: 7px;
  text-align: center;
  font-size: 10.5px;
  color: #7fa3b8;
  min-height: 15px;
}

/* reward */

.reward-card {
  position: relative;
  margin: 13px 16px 0;
  padding: 15px 16px 14px;
  border-radius: 26px;
  background: linear-gradient(135deg, #fffaf5 0%, #fff2f8 60%, #ffeaf3 100%);
  border: 1.5px solid #ffd9e6;
  overflow: hidden;
  box-shadow: 0 14px 28px -24px rgba(219, 74, 126, 0.4);
}

.reward-card::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -46px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 68%);
  pointer-events: none;
}

.reward-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.reward-kicker {
  font-size: 10px;
  font-weight: 800;
  color: #b06a85;
  letter-spacing: 0.01em;
}

.reward-badge {
  font-family: var(--font-round);
  font-size: 10.5px;
  font-weight: 800;
  background: #fff;
  border: 1px solid #ffd3e2;
  color: var(--pink-600);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.reward-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  position: relative;
  z-index: 2;
}

.gift-wrap {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffe7a8, #ffcf5c);
  display: grid;
  place-items: center;
  color: #a56a00;
  box-shadow: inset 0 1px 0 #fff8d8, 0 7px 14px -8px #d9a52e;
  transform: rotate(-4deg);
}

.gift-wrap svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.reward-text h3 {
  font-size: 16.5px;
  font-weight: 800;
  color: #5b2a3c;
  letter-spacing: -0.01em;
}

.reward-text p {
  margin-top: 2px;
  font-size: 11px;
  color: #a4788a;
}

.reward-dots {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}

.reward-dot {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #ffe1ec;
  transition: background 0.4s ease;
}

.reward-dot.on {
  background: linear-gradient(90deg, #ffb3cc, var(--pink-500));
}

.reward-card.unlocked {
  border-color: #ffd06b;
  box-shadow: 0 0 0 4px rgba(255, 207, 92, 0.16), 0 18px 32px -24px rgba(230, 150, 40, 0.55);
  animation: glow 2.8s ease-in-out infinite;
}

.reward-card.unlocked .gift-wrap {
  animation: giftWiggle 2.4s ease-in-out infinite;
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 0 4px rgba(255, 207, 92, 0.14), 0 18px 32px -24px rgba(230, 150, 40, 0.5);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(255, 207, 92, 0.08), 0 18px 34px -22px rgba(230, 150, 40, 0.65);
  }
}

@keyframes giftWiggle {
  0%,
  86%,
  100% {
    transform: rotate(-4deg);
  }
  90% {
    transform: rotate(6deg) scale(1.05);
  }
  94% {
    transform: rotate(-8deg) scale(1.05);
  }
}

.reward-stamp {
  position: absolute;
  top: 40px;
  right: 14px;
  z-index: 3;
  border: 2.5px double var(--pink-600);
  color: var(--pink-600);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 8px;
  transform: rotate(-12deg);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  background: rgba(255, 250, 245, 0.55);
  backdrop-filter: blur(2px);
}

.reward-card.redeemed .reward-stamp {
  opacity: 0.88;
}

.reward-card.redeemed .reward-badge {
  opacity: 0;
}

.reward-card.redeemed .reward-dots {
  padding-right: 92px;
}

.redeem-area {
  margin: 14px 16px 0;
}

.redeem-btn {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ffc35e 0%, #ff9fae 45%, #f65d91 100%);
  box-shadow: 0 16px 26px -14px rgba(240, 120, 150, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.18s ease;
  animation: pulseGlow 2.4s ease-in-out infinite;
}

.redeem-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.redeem-btn:active {
  transform: scale(0.98);
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 16px 26px -14px rgba(240, 120, 150, 0.65);
  }
  50% {
    box-shadow: 0 16px 32px -10px rgba(255, 170, 90, 0.75);
  }
}

.round-done {
  background: #fff;
  border: 1.5px solid #e7f6ee;
  border-radius: 22px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 14px 28px -24px rgba(60, 160, 120, 0.5);
}

.round-done .done-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #3aa979;
  background: #eafaf2;
  border-radius: 999px;
  padding: 5px 11px;
}

.round-done .done-title svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.round-done p {
  margin: 9px 0 11px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.ghost-btn {
  border: 1.5px solid var(--pink-200);
  background: #fff;
  color: var(--pink-600);
  border-radius: 15px;
  padding: 11px 18px;
  font-size: 12.5px;
  font-weight: 800;
  transition: background 0.18s ease, transform 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.ghost-btn:active {
  transform: scale(0.97);
  background: var(--pink-50);
}

/* ---------------- records ---------------- */

.records-hero {
  position: relative;
  margin: 8px 16px 0;
  min-height: 172px;
  padding: 20px 18px 18px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(120% 130% at 90% 110%, #ffd9e8 0%, transparent 62%),
    linear-gradient(135deg, #ffeaf2 0%, #ffdbe9 55%, #ffcfe2 100%);
  box-shadow: 0 20px 38px -26px rgba(219, 74, 126, 0.55), inset 0 1px 0 #fff;
}

.records-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.85) 1.6px, transparent 1.7px);
  background-size: 17px 17px;
  opacity: 0.6;
}

.records-copy {
  position: relative;
  z-index: 3;
  width: 66%;
}

.records-copy h2 {
  margin-top: 8px;
  font-size: clamp(24px, 6.9vw, 30px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #52283a;
}

.records-copy p {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.65;
  color: #8a5568;
}

.records-art {
  position: absolute;
  right: 6px;
  bottom: -26px;
  width: 150px;
  z-index: 2;
  filter: drop-shadow(0 14px 16px rgba(190, 60, 110, 0.18));
  animation: float 7s ease-in-out infinite;
}

.records-art svg {
  width: 100%;
  height: auto;
}

.hero-spark.r1 {
  top: 18px;
  right: 118px;
  font-size: 11px;
}

.hero-spark.r2 {
  bottom: 24px;
  right: 26px;
  font-size: 12px;
  color: #ff7ba5;
  animation-delay: 1s;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 16px 0;
}

.stat-card {
  background: #fff;
  border: 1.5px solid var(--pink-100);
  border-radius: 19px;
  padding: 11px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  box-shadow: 0 12px 24px -22px rgba(219, 74, 126, 0.45);
}

.stat-ico {
  width: 27px;
  height: 27px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
}

.stat-ico svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-ico.pink {
  background: #fff0f5;
  color: var(--pink-500);
}

.stat-ico.blue {
  background: #eefaff;
  color: var(--blue-500);
}

.stat-ico.gold {
  background: #fff8e6;
  color: #f0a92e;
}

.stat-card b {
  font-family: var(--font-round);
  font-size: 20px;
  font-weight: 800;
  color: #4b2b39;
  line-height: 1.15;
}

.stat-card span:last-child {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.record-list {
  margin: 18px 16px 0;
}

.record-group + .record-group {
  margin-top: 18px;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 2px 8px;
}

.group-head h4 {
  font-size: 11.5px;
  font-weight: 800;
  color: #8a5d70;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.group-head .line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, #ffd3e2 0 5px, transparent 5px 10px);
}

.group-head span {
  font-family: var(--font-round);
  font-size: 9.5px;
  color: #c095a6;
  white-space: nowrap;
}

.record {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid #ffe7ef;
  border-radius: 20px;
  padding: 9px 11px 9px 9px;
  box-shadow: 0 12px 24px -22px rgba(219, 74, 126, 0.45);
}

.record + .record {
  margin-top: 9px;
}

.record-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 2px 0;
}

.record-date b {
  font-family: var(--font-round);
  font-size: 21px;
  font-weight: 800;
  color: var(--pink-600);
  line-height: 1.05;
}

.record-date span {
  font-size: 8.5px;
  color: #bb94a5;
  letter-spacing: 0.02em;
}

.record-photo {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #ffe9f1;
  box-shadow: 0 4px 10px rgba(120, 50, 80, 0.12);
  position: relative;
}

.record-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.record-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  border-radius: inherit;
}

.record-info {
  min-width: 0;
}

.record-note {
  font-size: 12.5px;
  font-weight: 700;
  color: #4b2b39;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-meta {
  margin-top: 3px;
  font-size: 9.5px;
  color: #b08d9c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-plus {
  font-family: var(--font-round);
  font-size: 11px;
  font-weight: 800;
  color: var(--pink-600);
  background: var(--pink-50);
  border: 1px solid #ffe0eb;
  border-radius: 999px;
  padding: 2px 6px;
}

.record-round {
  display: inline-block;
  margin-left: 4px;
  color: #c3a5b2;
}

.empty {
  text-align: center;
  background: #fff;
  border: 1.5px dashed #ffd3e2;
  border-radius: 26px;
  padding: 26px 18px 22px;
  margin-top: 6px;
}

.empty > svg {
  width: 118px;
  height: auto;
  margin: 0 auto 2px;
  display: block;
  filter: drop-shadow(0 10px 12px rgba(190, 60, 110, 0.12));
}

.empty .ghost-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty h3 {
  font-size: 16px;
  font-weight: 800;
  color: #5b2a3c;
}

.empty p {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.6;
}

.empty .ghost-btn {
  margin-top: 12px;
}

.free-note {
  margin: 18px 20px 0;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.6;
  color: #c0a4b0;
}

/* ---------------- tabbar ---------------- */

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 252, 253, 0.92);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid #ffe4ee;
  box-shadow: 0 -10px 30px -20px rgba(180, 80, 120, 0.3);
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 0 2px;
  color: #b58a9b;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.tab-ico {
  display: grid;
  place-items: center;
  width: 44px;
  height: 27px;
  border-radius: 999px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.tab-ico svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab.active {
  color: var(--pink-600);
}

.tab.active .tab-ico {
  background: linear-gradient(135deg, #ff97b8, #f65d91);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 7px 14px -8px rgba(230, 63, 120, 0.8);
}

/* ---------------- modal ---------------- */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}

.modal-root.open {
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 43, 56, 0.34);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeIn 0.25s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fffafc;
  border-radius: 30px 30px 0 0;
  padding: 22px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -20px 60px -20px rgba(90, 30, 55, 0.4);
  animation: sheetUp 0.36s cubic-bezier(0.22, 0.9, 0.3, 1) both;
}

@keyframes sheetUp {
  from {
    transform: translate(-50%, 40px);
    opacity: 0.4;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.sheet-kicker {
  font-family: var(--font-round);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #c98aa2;
}

.sheet-head h3 {
  margin-top: 2px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #52283a;
}

.sheet-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #a98392;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 10px rgba(120, 50, 80, 0.1);
  transition: transform 0.18s ease;
}

.sheet-close:active {
  transform: scale(0.9);
}

.sheet-close svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.sheet-sub {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}

.upload-box {
  position: relative;
  display: block;
  width: 100%;
  margin-top: 16px;
  min-height: 170px;
  border: 2px dashed #ffc9dd;
  border-radius: 22px;
  background: #fff5f9;
  padding: 0;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.upload-box:active {
  background: #fff0f6;
}

.upload-empty {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px;
}

.upload-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #fff;
  color: var(--pink-500);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 16px -8px rgba(230, 63, 120, 0.35);
  margin-bottom: 5px;
}

.upload-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.upload-empty b {
  font-size: 14px;
  font-weight: 800;
  color: #6b3a4d;
}

.upload-empty small {
  font-size: 10px;
  color: #b58c9e;
  line-height: 1.5;
}

.upload-preview {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.upload-change {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(40, 20, 30, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.upload-box.has-photo {
  border-style: solid;
  border-color: #ffd3e2;
  background: #fff;
}

.upload-box.has-photo .upload-empty {
  display: none;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 15px;
  font-size: 11.5px;
  font-weight: 800;
  color: #75485a;
}

.field-label span {
  font-size: 9.5px;
  font-weight: 500;
  color: #bb9aa9;
}

.note-input {
  width: 100%;
  height: 86px;
  margin-top: 6px;
  padding: 12px 13px;
  border-radius: 17px;
  border: 1.5px solid #ffe0eb;
  background: #fff;
  resize: none;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.note-input::placeholder {
  color: #c8abb7;
}

.note-input:focus {
  border-color: #ffb3cc;
  box-shadow: 0 0 0 4px rgba(255, 179, 204, 0.2);
}

.char-count {
  margin-top: 4px;
  text-align: right;
  font-family: var(--font-round);
  font-size: 9px;
  color: #c3a5b2;
}

.primary-btn {
  width: 100%;
  margin-top: 16px;
  border: none;
  border-radius: 19px;
  padding: 15px 18px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #ff8db4 0%, #f65d91 48%, #e94b82 100%);
  box-shadow: 0 14px 24px -12px rgba(230, 63, 120, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: opacity 0.2s ease, transform 0.18s ease;
}

.primary-btn:active {
  transform: scale(0.985);
}

.primary-btn:disabled {
  opacity: 0.42;
  box-shadow: none;
  cursor: not-allowed;
}

.primary-btn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-note {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 9px;
  color: #c3a5b2;
}

.privacy-note svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------- success screen ---------------- */

.success-screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 26px calc(30px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 0%, #fff6fa 0%, #ffe4ef 46%, #d9f3ff 100%);
  overflow: hidden;
  animation: fadeIn 0.3s ease both;
}

.success-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.9) 1.6px, transparent 1.7px);
  background-size: 20px 20px;
  opacity: 0.55;
  pointer-events: none;
}

.success-cinna {
  position: relative;
  width: 172px;
  margin-bottom: 4px;
  filter: drop-shadow(0 18px 20px rgba(60, 130, 180, 0.2));
  animation: successPop 0.8s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.success-cinna svg {
  width: 100%;
  height: auto;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: translateY(26px) scale(0.7) rotate(-8deg);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.success-kicker {
  position: relative;
  font-family: var(--font-round);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  color: #b06a85;
}

.success-screen h2 {
  position: relative;
  margin-top: 2px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #c22e63;
  text-shadow: 0 3px 0 #fff;
}

.success-plus {
  position: relative;
  margin: 2px 0 1px;
  font-family: var(--font-round);
  font-size: 30px;
  font-weight: 800;
  color: #3f8fd6;
  animation: plusPop 0.6s 0.15s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes plusPop {
  0% {
    opacity: 0;
    transform: scale(0.4) rotate(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.success-line {
  position: relative;
  margin-top: 2px;
  font-size: 14px;
  font-weight: 700;
  color: #5b3a49;
}

.success-line b {
  font-family: var(--font-round);
  font-size: 18px;
  color: #2f8cc4;
}

.success-sub {
  position: relative;
  margin-top: 4px;
  font-size: 10.5px;
  color: #a4788a;
}

.success-screen .primary-btn {
  position: relative;
  max-width: 260px;
  margin-top: 20px;
}

.success-screen .ghost-btn {
  position: relative;
  margin-top: 8px;
  border: none;
  background: transparent;
  color: #a4788a;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.success-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: #ffc84f;
  font-size: 16px;
}

.success-stars span {
  position: absolute;
  animation: twinkle 2.4s ease-in-out infinite;
}

.success-stars span:nth-child(1) {
  top: 14%;
  left: 16%;
  font-size: 20px;
}

.success-stars span:nth-child(2) {
  top: 24%;
  right: 14%;
  font-size: 13px;
  animation-delay: 0.6s;
}

.success-stars span:nth-child(3) {
  bottom: 26%;
  left: 12%;
  font-size: 12px;
  color: #ff8db4;
  animation-delay: 1.2s;
}

/* ---------------- certificate ---------------- */

.sheet-cert {
  background: linear-gradient(180deg, #fff8fb, #fff4f8);
}

.cert-card {
  position: relative;
  margin-top: 8px;
  padding: 24px 18px 20px;
  border-radius: 24px;
  background: #fffdf9;
  border: 2px solid #ffd9e6;
  box-shadow: 0 18px 40px -30px rgba(200, 70, 120, 0.55), inset 0 0 0 5px #fff;
  overflow: hidden;
  text-align: center;
}

.cert-card::before,
.cert-card::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff4f8;
  border: 2px solid #ffd9e6;
  top: 52%;
}

.cert-card::before {
  left: -14px;
}

.cert-card::after {
  right: -14px;
}

.cert-card .cert-inner-line {
  position: absolute;
  inset: 9px;
  border: 1px dashed #ffd3e2;
  border-radius: 17px;
  pointer-events: none;
}

.cert-kicker {
  font-family: var(--font-round);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.24em;
  color: #c98aa2;
}

.cert-card h2 {
  margin-top: 3px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #5b2a3c;
  position: relative;
  display: inline-block;
}

.cert-card h2::before,
.cert-card h2::after {
  content: "✦";
  position: absolute;
  top: 8px;
  font-size: 10px;
  color: #ffc84f;
}

.cert-card h2::before {
  left: -16px;
}

.cert-card h2::after {
  right: -16px;
}

.cert-gift {
  width: 60px;
  height: 60px;
  margin: 10px auto 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3cd, #ffcf5c 75%);
  display: grid;
  place-items: center;
  color: #9d6400;
  box-shadow: 0 8px 18px -8px rgba(200, 150, 40, 0.6), inset 0 1px 0 #fff8d8;
}

.cert-gift svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cert-reward {
  font-size: 20px;
  line-height: 1.4;
  font-weight: 800;
  color: #8f2e56;
  letter-spacing: 0.01em;
}

.cert-reward b {
  color: var(--pink-600);
  background: linear-gradient(transparent 62%, #ffe0eb 62%);
  padding: 0 3px;
}

.cert-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: #a4788a;
  font-weight: 600;
}

.cert-for {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 14px;
  font-size: 10px;
  color: #b58c9e;
  border-top: 1px dashed #ffd9e6;
  padding-top: 11px;
  width: 78%;
  justify-content: center;
}

.cert-for b {
  font-size: 15px;
  color: #5b2a3c;
  letter-spacing: 0.02em;
}

.cert-date {
  margin-top: 3px;
  font-family: var(--font-round);
  font-size: 9px;
  color: #c3a5b2;
  letter-spacing: 0.08em;
}

.cert-message {
  margin-top: 10px;
  font-size: 10px;
  line-height: 1.7;
  color: #a4788a;
}

.cert-stamp {
  position: absolute;
  right: 16px;
  bottom: 18px;
  border: 3px double var(--pink-600);
  color: var(--pink-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 8px;
  transform: rotate(-14deg);
  opacity: 0;
  pointer-events: none;
}

.sheet-cert.redeemed .cert-stamp {
  opacity: 0.9;
  animation: stampIn 0.4s 0.15s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

@keyframes stampIn {
  0% {
    opacity: 0;
    transform: rotate(-14deg) scale(1.8);
  }
  100% {
    opacity: 0.9;
    transform: rotate(-14deg) scale(1);
  }
}

.cert-hint {
  margin-top: 10px;
  text-align: center;
  font-size: 9.5px;
  color: #bda0ad;
  line-height: 1.5;
}

/* ---------------- lightbox ---------------- */

.lightbox {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(38, 20, 28, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  animation: fadeIn 0.2s ease both;
}

.lightbox-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.lightbox-close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.lb-img-wrap {
  width: 100%;
  max-height: 64dvh;
  border-radius: 22px;
  overflow: hidden;
  background: #1c0f14;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-img-wrap img {
  width: 100%;
  max-height: 64dvh;
  object-fit: contain;
}

.lb-info {
  margin-top: 16px;
  color: #fff;
  text-align: center;
}

.lb-date {
  font-size: 11px;
  color: #ffb3cc;
  letter-spacing: 0.06em;
}

.lb-note {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.lb-time {
  margin-top: 4px;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
}

.danger-link {
  margin-top: 16px;
  border: 1px solid rgba(255, 140, 160, 0.35);
  background: rgba(255, 90, 120, 0.12);
  color: #ffb3c0;
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.danger-link svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------- confirm ---------------- */

.confirm-wrap {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(38, 20, 28, 0.55);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease both;
}

.confirm-card {
  width: 100%;
  max-width: 320px;
  background: #fffafc;
  border-radius: 24px;
  padding: 20px 18px 16px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  animation: confirmIn 0.3s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

@keyframes confirmIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirm-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: #52283a;
}

.confirm-card p {
  margin-top: 6px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.confirm-actions button {
  flex: 1;
  border-radius: 14px;
  padding: 11px;
  font-size: 12px;
  font-weight: 800;
  border: none;
}

.confirm-actions .cancel {
  background: #fff0f5;
  color: #a4788a;
  border: 1px solid #ffe0eb;
}

.confirm-actions .danger {
  background: linear-gradient(135deg, #ff7b8f, #e63e63);
  color: #fff;
  box-shadow: 0 8px 16px -8px rgba(230, 62, 99, 0.7);
}

/* ---------------- toast ---------------- */

.toast {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top));
  left: 50%;
  transform: translate(-50%, -12px);
  z-index: 200;
  max-width: min(86vw, 360px);
  background: rgba(75, 43, 57, 0.94);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

/* ---------------- confetti ---------------- */

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 150;
}

/* ---------------- misc ---------------- */

.noscript {
  position: fixed;
  inset: 0;
  background: #fff5f9;
  color: #c22e63;
  display: grid;
  place-items: center;
  font-weight: 700;
  z-index: 999;
}

.fatal {
  margin: 40px 20px;
  background: #fff;
  border: 1.5px solid #ffd3e2;
  border-radius: 24px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-pink);
}

.fatal h2 {
  font-size: 18px;
  color: #c22e63;
  margin-bottom: 8px;
}

.fatal p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}

.fatal code {
  display: inline-block;
  margin-top: 10px;
  background: #fff5f9;
  border: 1px dashed #ffc9dd;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 11px;
  color: #75485a;
}

:focus-visible {
  outline: 3px solid rgba(255, 140, 174, 0.6);
  outline-offset: 2px;
}

/* ---------------- responsive ---------------- */

@media (min-width: 720px) {
  body {
    padding: 18px 0;
  }

  .app {
    min-height: calc(100dvh - 36px);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 40px 90px -40px rgba(150, 60, 100, 0.45), 0 0 0 1px rgba(255, 220, 235, 0.5);
  }

  .tabbar {
    bottom: 18px;
    border-radius: 0 0 34px 34px;
    max-width: 480px;
  }

  .sheet {
    border-radius: 30px;
    bottom: 0;
  }
}

@media (min-width: 1180px) {
  .bg-char {
    display: block;
  }
}

@media (max-width: 380px) {
  .hero-art {
    width: 156px;
    right: 4px;
    bottom: -16px;
  }

  .points-art {
    width: 158px;
    right: 4px;
    bottom: -6px;
  }

  .records-art {
    width: 136px;
  }

  .hero-copy {
    width: 67%;
  }

  .hero-copy h2 {
    font-size: 25px;
  }

  .points-copy h2 {
    font-size: 25px;
  }

  .points-copy {
    width: 64%;
  }

  .points-copy .eyebrow {
    font-size: 7px;
    letter-spacing: 0.1em;
    padding: 3px 7px;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .checkin-btn b {
    font-size: 16.5px;
  }

  .checkin-btn small {
    font-size: 9.5px;
  }

  .cam {
    width: 42px;
    height: 42px;
  }

  .slot-grid {
    gap: 6px;
  }

  .record {
    grid-template-columns: 38px 52px minmax(0, 1fr) auto;
    gap: 8px;
  }

  .record-photo {
    width: 52px;
    height: 52px;
  }
}

@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;
  }
}
