/* Happy birthday, I love you! */

/* ==========================================================================
   PINK NUB CAT BIRTHDAY QUEST - NUB CAT EDITION STYLING
   Aesthetic: Chunky 3D Outline, Soft Pink Palette (#FFE5EC, #FFB7C5, #5E303A, #B4EBD5)
   ========================================================================== */

:root {
  --bg-canvas: #FFE5EC;
  --bg-window: #FFF7FA;
  --color-border-outer: #FFAEC0;
  --color-stroke: #5E303A;
  --color-stroke-light: #FFB7C5;
  --color-dark: #371B26;
  --color-pink-primary: #FF8FAB;
  --color-pink-accent: #FFAEC0;
  --color-mint-green: #B4EBD5;
  --color-mint-dark: #2D5A46;
  --color-text-main: #5E303A;
  --color-text-muted: #854756;
  --color-check-green: #38B000;

  --shadow-3d-lg: 0 6px 0 #5E303A;
  --shadow-3d-md: 0 4px 0 #5E303A;
  --shadow-3d-sm: 0 2px 0 #5E303A;
  --shadow-window: 0 16px 40px -10px rgba(255, 143, 171, 0.35);

  --font-main: 'Nunito', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Nunito', system-ui, sans-serif;
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-canvas);
  color: var(--color-text-main);
  font-family: var(--font-main);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px 16px;
  position: relative;
}

/* Confetti Canvas Overlay */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ==========================================================================
   CORNER STICKERS (Cherry Blossom, Ribbon, Sparkle, Star)
   ========================================================================== */
.corner-sticker {
  position: fixed;
  width: 54px;
  height: 54px;
  pointer-events: none;
  z-index: 10;
  opacity: 0.85;
  transition: transform 0.3s ease;
}

.sticker-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(94, 48, 58, 0.15));
}

.corner-top-left {
  top: 14px;
  left: 14px;
}

.corner-top-right {
  top: 14px;
  right: 14px;
}

.corner-bottom-left {
  bottom: 14px;
  left: 14px;
}

.corner-bottom-right {
  bottom: 14px;
  right: 14px;
}

/* ==========================================================================
   APP WINDOW FRAME
   ========================================================================== */
.app-window-frame {
  width: 100%;
  max-width: 1060px;
  min-height: 82vh;
  background-color: var(--bg-window);
  border: 4px solid var(--color-border-outer);
  border-radius: 36px;
  box-shadow: var(--shadow-window);
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  margin: auto;
}

/* ==========================================================================
   WINDOW HEADER PILL
   ========================================================================== */
.window-header-pill {
  background: #FFFFFF;
  border: 3.5px solid var(--color-border-outer);
  border-radius: 9999px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(255, 174, 192, 0.25);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.header-brand-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cat-avatar-bubble {
  width: 44px;
  height: 44px;
  background: #FFF0F4;
  border: 2.5px solid var(--color-stroke);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cat-avatar-bubble:hover {
  transform: scale(1.1) rotate(-6deg);
}

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

.avatar-cat-svg {
  width: 36px;
  height: 36px;
}

.header-titles {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-main);
  font-weight: 900;
  font-size: 19px;
  color: var(--color-stroke);
  letter-spacing: 0.5px;
  line-height: 1.1;
}

.brand-subtitle {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 11px;
  color: var(--color-text-muted);
  letter-spacing: 0.8px;
}

.header-right-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-tiny-label {
  font-size: 10px;
  font-weight: 900;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
}

.progress-track-pill {
  width: 140px;
  height: 18px;
  background: #FFE4E9;
  border: 2.5px solid var(--color-stroke);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-fill-pill {
  height: 100%;
  background: var(--color-pink-primary);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.score-pill-badge {
  background: var(--color-pink-accent);
  border: 2px solid var(--color-stroke);
  border-radius: 9999px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 900;
  color: var(--color-stroke);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 0 var(--color-stroke);
}

.score-text strong {
  font-family: monospace, var(--font-main);
  font-size: 14px;
}

.header-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-mini-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--color-stroke);
  box-shadow: 0 2px 0 var(--color-stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-stroke);
  cursor: pointer;
  transition: all 0.12s ease;
}

.pill-mini-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.mini-ui-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   SCREEN MANAGEMENT & TRANSITIONS
   ========================================================================== */
.app-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  min-height: 480px;
}

.screen {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: screenFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
  display: flex;
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ==========================================================================
   3D BUTTON STYLING (Chunky Border & Offset Shadow)
   ========================================================================== */
.btn-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 3.5px solid var(--color-stroke);
  border-radius: 20px;
  font-family: var(--font-main);
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.btn-3d:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--color-stroke) !important;
}

.btn-3d-pink {
  background: var(--color-pink-primary);
  color: var(--color-stroke);
  box-shadow: var(--shadow-3d-lg);
  padding: 14px 34px;
  font-size: 18px;
}

.btn-3d-pink:hover {
  background: #FF7597;
}

.btn-3d-white {
  background: #FFFFFF;
  color: var(--color-stroke);
  box-shadow: var(--shadow-3d-lg);
  padding: 12px 26px;
  font-size: 16px;
}

.btn-3d-white:hover {
  background: #FFF5F7;
}

.btn-back {
  padding: 8px 18px;
  font-size: 14px;
  border-radius: 14px;
  box-shadow: var(--shadow-3d-md);
}

/* ==========================================================================
   SCREEN 1: INTRO / CAT & GIFT SCREEN
   ========================================================================== */
.intro-screen-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 600px;
  width: 100%;
}

/* Speech bubbles cluster */
.speech-bubbles-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.floating-badge {
  padding: 6px 14px;
  border: 2.5px solid var(--color-stroke);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: var(--shadow-3d-sm);
  white-space: nowrap;
}

.badge-surprise {
  background: #FFAEC0;
  color: var(--color-stroke);
}

.badge-delivery {
  background: var(--color-mint-green);
  color: var(--color-mint-dark);
}

.floating-speech-bubble {
  background: #FFFFFF;
  border: 2.5px solid var(--color-stroke);
  border-radius: 16px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 900;
  color: var(--color-stroke);
  box-shadow: var(--shadow-3d-sm);
  position: relative;
  white-space: nowrap;
  animation: gentleBob 2.5s ease-in-out infinite;
}

.speech-tail {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--color-stroke);
}

.speech-tail::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: -4px;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #FFFFFF;
}

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

/* Cat Gift Display Box */
.cat-gift-display-box {
  width: 220px;
  height: 220px;
  background: #FFFFFF;
  border: 3.5px solid var(--color-stroke);
  border-radius: 32px;
  box-shadow: var(--shadow-3d-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.cat-gift-display-box:hover {
  transform: scale(1.03);
}

.cat-gift-display-box:active {
  transform: scale(0.98);
}

.square-gif-container {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.square-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.cat-interaction-tip {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.intro-main-question {
  font-family: var(--font-main);
  font-size: 26px;
  font-weight: 900;
  color: var(--color-stroke);
  letter-spacing: 0.5px;
  margin: 6px 0;
}

.feedback-msg-text {
  font-size: 14px;
  font-weight: 800;
  font-style: italic;
  color: var(--color-text-muted);
  min-height: 24px;
  margin-bottom: 14px;
}

.intro-buttons-arena {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 80px;
  width: 100%;
  margin-bottom: 12px;
}

.btn-yes {
  min-width: 180px;
  z-index: 5;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-no {
  min-width: 110px;
  z-index: 20;
  opacity: 1 !important;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dodge-counter-text {
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text-muted);
}

/* ==========================================================================
   SCREEN 2: QUEST DASHBOARD (2-Column Layout)
   ========================================================================== */
.quest-dashboard-grid {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 24px;
  width: 100%;
  align-items: stretch;
}

/* Left Column: Companion Cat */
.companion-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.companion-speech-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.companion-speech {
  font-size: 12px;
  padding: 6px 14px;
}

.badge-ready {
  background: #FFFFFF;
  color: var(--color-stroke);
}

.companion-card {
  width: 100%;
  flex: 1;
  background: #FFFFFF;
  border: 3.5px solid var(--color-stroke);
  border-radius: 32px;
  box-shadow: var(--shadow-3d-lg);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.companion-card:hover {
  transform: scale(1.02);
}

.companion-img-wrap {
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.companion-cat-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.companion-caption {
  font-size: 13px;
  font-weight: 900;
  color: var(--color-stroke);
  line-height: 1.3;
  margin-bottom: 4px;
}

.companion-subtip {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-muted);
}

.btn-reset-small {
  padding: 8px 20px;
  font-size: 13px;
  border-radius: 9999px;
  box-shadow: var(--shadow-3d-sm);
}

/* Right Column: 2x2 Chunky Game Cards */
.quest-cards-2x2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.chunky-quest-card {
  background: #FAF0F2;
  border: 3.5px solid var(--color-stroke);
  border-radius: 26px;
  box-shadow: var(--shadow-3d-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
  user-select: none;
}

.chunky-quest-card:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 var(--color-stroke);
}

.chunky-quest-card:active:not(:disabled) {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--color-stroke);
}

/* Completed State -> Pastel Mint Green */
.chunky-quest-card.completed {
  background: var(--color-mint-green) !important;
}

/* Cake Card -> Pastel Pink */
.chunky-quest-card.card-cake {
  background: #FFB7C5;
}

.chunky-quest-card.card-cake.card-locked {
  background: #F2E4E8;
  opacity: 0.85;
  cursor: not-allowed;
}

.card-icon-square {
  width: 48px;
  height: 48px;
  background: #FFFFFF;
  border: 2.5px solid var(--color-stroke);
  border-radius: 14px;
  box-shadow: var(--shadow-3d-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-stroke);
  margin-bottom: 10px;
}

.card-icon-square svg {
  width: 24px;
  height: 24px;
}

.chunky-card-title {
  font-family: var(--font-main);
  font-size: 16px;
  font-weight: 900;
  color: var(--color-stroke);
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.chunky-card-points {
  font-size: 11px;
  font-weight: 900;
  color: var(--color-stroke);
  opacity: 0.85;
}

.card-check-corner {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  background: var(--color-check-green);
  border: 2.5px solid var(--color-stroke);
  border-radius: 7px;
  box-shadow: 0 2px 0 var(--color-stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.card-check-corner svg {
  width: 16px;
  height: 16px;
}

.cake-badge-pill {
  margin-top: 4px;
  background: #FFFFFF;
  border: 2px solid var(--color-stroke);
  border-radius: 9999px;
  padding: 3px 12px;
  font-size: 10px;
  font-weight: 900;
  color: var(--color-stroke);
  box-shadow: 0 2px 0 var(--color-stroke);
}

/* ==========================================================================
   GAME SUB-SCREENS (Puzzle, Memory, Quiz, Wish)
   ========================================================================== */
.game-subscreen {
  max-width: 680px;
  width: 100%;
}

.game-top-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-bottom: 16px;
}

.subscreen-title {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 900;
  color: var(--color-stroke);
}

.game-hint-text {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 14px;
}

/* Puzzle Grid */
.puzzle-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.puzzle-board-container {
  width: 320px;
  height: 320px;
  background: #FFFFFF;
  border: 3.5px solid var(--color-stroke);
  border-radius: 24px;
  box-shadow: var(--shadow-3d-lg);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  width: 100%;
  height: 100%;
}

.puzzle-tile {
  background-size: 300% 300%;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid var(--color-stroke);
  box-shadow: 0 2px 0 var(--color-stroke);
  transition: transform 0.15s ease, border-color 0.15s ease;
  user-select: none;
}

.puzzle-tile.selected {
  outline: 3px solid var(--color-pink-primary);
  transform: scale(0.95);
}

.puzzle-tile.drag-over {
  border-color: var(--color-pink-primary);
  transform: scale(1.05);
}

/* Memory Grid */
.memory-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 460px;
}

.memory-card {
  aspect-ratio: 1 / 1;
  perspective: 800px;
  cursor: pointer;
  position: relative;
}

.memory-card-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border: 3px solid var(--color-stroke);
  border-radius: 18px;
  box-shadow: var(--shadow-3d-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.memory-card-back {
  background: #FFB7C5;
  color: var(--color-stroke);
}

.card-pattern-icon {
  width: 28px;
  height: 28px;
}

.memory-card-front {
  background: #FFFFFF;
  transform: rotateY(180deg);
}

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

.memory-card.flipped .memory-card-back {
  transform: rotateY(-180deg);
}

.memory-card.flipped .memory-card-front {
  transform: rotateY(0deg);
}

.memory-card.matched .memory-card-front {
  border-color: var(--color-check-green);
  box-shadow: 0 4px 0 var(--color-check-green);
}

/* Quiz Content */
.quiz-view-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.quiz-card-box {
  background: #FFFFFF;
  border: 3.5px solid var(--color-stroke);
  border-radius: 32px;
  box-shadow: var(--shadow-3d-lg);
  padding: 24px 28px;
  width: 100%;
  max-width: 540px;
}

.quiz-question-text {
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 900;
  color: var(--color-stroke);
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.3;
}

.quiz-options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz-option-btn {
  background: #FAF0F2;
  border: 3px solid var(--color-stroke);
  border-radius: 18px;
  box-shadow: var(--shadow-3d-md);
  padding: 14px 20px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 800;
  color: var(--color-stroke);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s ease;
  user-select: none;
}

.quiz-option-btn:hover:not(:disabled) {
  background: #FFE9EF;
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--color-stroke);
}

.quiz-option-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--color-stroke);
}

.quiz-option-btn.correct {
  background: var(--color-mint-green) !important;
  border-color: var(--color-stroke) !important;
  animation: pulseCorrect 0.4s ease;
}

.quiz-option-btn.wrong {
  background: #FFCDD2 !important;
  border-color: #D32F2F !important;
  animation: shakeWrong 0.4s ease;
}

@keyframes shakeWrong {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

@keyframes pulseCorrect {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

.quiz-feedback-box {
  font-size: 14px;
  font-weight: 900;
  font-style: italic;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 14px;
  min-height: 22px;
}

/* ==========================================================================
   SCREEN 6: MAKE A WISH / FINAL REVEAL
   ========================================================================== */
.wish-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 580px;
  width: 100%;
}

.square-gif-wrapper {
  margin-bottom: 20px;
}

.cake-reveal-container {
  width: 280px;
  height: 280px;
  background: #FFFFFF;
  border: 3.5px solid var(--color-stroke);
  border-radius: 36px;
  box-shadow: var(--shadow-3d-lg);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.5s ease;
}

.cake-reveal-container.revealed {
  width: 320px;
  height: 320px;
  background: #FFF5F7;
  border-color: var(--color-pink-primary);
}

.final-message-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.final-message-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 14px;
  text-align: center;
}

.final-msg-headline {
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 900;
  color: var(--color-pink-primary);
  line-height: 1.35;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

.final-msg-body.compact-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-stroke);
  line-height: 1.45;
  margin: 0;
}

.final-msg-signature {
  font-size: 16px;
  font-weight: 900;
  color: var(--color-pink-primary);
  margin-top: 4px;
}

.blowing-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.blowing-prompt-text {
  font-size: 16px;
  font-weight: 900;
  color: var(--color-stroke);
}

.blow-meter-container {
  width: 240px;
  height: 18px;
  background: #FFE4E9;
  border: 2.5px solid var(--color-stroke);
  border-radius: 9999px;
  overflow: hidden;
  box-shadow: var(--shadow-3d-sm);
}

.blow-progress-fill {
  height: 100%;
  background: var(--color-pink-primary);
  border-radius: 9999px;
  transition: width 0.15s ease;
}

.blow-detected-tag {
  font-size: 12px;
  font-weight: 900;
  color: var(--color-mint-dark);
  background: var(--color-mint-green);
  border: 2px solid var(--color-stroke);
  border-radius: 9999px;
  padding: 3px 12px;
}

.final-buttons-container {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
}

/* ==========================================================================
   BOTTOM WINDOW FOOTER / LEGEND
   ========================================================================== */
.window-footer-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px dashed #FFAEC0;
  padding-top: 14px;
  margin-top: 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-muted);
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-completed {
  background: var(--color-check-green);
}

.dot-progress {
  background: var(--color-pink-primary);
}

.dot-locked {
  background: #A0B4C8;
}

.footer-window-tag {
  letter-spacing: 0.5px;
  opacity: 0.75;
}

/* ==========================================================================
   PHOTO CUSTOMIZER MODAL STYLES
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 27, 43, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: fadeInModal 0.25s ease-out;
}

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

.modal-card {
  background: #FFF5F7;
  border: 3.5px solid var(--color-border-dark);
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(94, 48, 58, 0.3), 0 8px 0 var(--color-border-dark);
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px dashed #FFAEC0;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--color-text-main);
  margin: 0;
}

.modal-close-btn {
  background: #FFFFFF;
  border: 2px solid var(--color-border-dark);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  color: var(--color-text-main);
  cursor: pointer;
  box-shadow: 0 2px 0 var(--color-border-dark);
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: #FFE3EA;
  transform: scale(1.05);
}

.modal-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.modal-body-scroll {
  overflow-y: auto;
  padding-right: 6px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-section-box {
  background: #FFFFFF;
  border: 2.5px solid var(--color-border-dark);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 4px 0 rgba(94, 48, 58, 0.1);
}

.section-badge-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--color-pink-primary);
  margin-bottom: 10px;
  display: inline-block;
  background: #FFE3EA;
  padding: 4px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--color-border-dark);
}

.photo-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-thumb-box {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 2px solid var(--color-border-dark);
  overflow: hidden;
  background: #FFE3EA;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.btn-upload-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 8px 16px;
  font-size: 13px;
  max-width: 220px;
}

.hidden-file-input {
  display: none !important;
}

.modal-url-input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  border: 2px solid var(--color-border-dark);
  font-size: 13px;
  font-weight: 600;
  background: #FFF9FA;
}

.app-boxes-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.box-upload-slot {
  background: #FFF0F4;
  border: 2px solid var(--color-border-dark);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.preview-thumb-box.circle-preview {
  border-radius: 50%;
}

.memory-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.memory-upload-slot {
  background: #FFF0F4;
  border: 2px solid var(--color-border-dark);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.slot-number {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 10px;
  font-weight: 900;
  color: var(--color-text-main);
  background: #FFFFFF;
  border: 1.5px solid var(--color-border-dark);
  padding: 1px 6px;
  border-radius: 8px;
}

.slot-upload-btn {
  background: #FF8FAB;
  border: 2px solid var(--color-border-dark);
  border-radius: 10px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 900;
  color: #5E303A;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--color-border-dark);
  transition: all 0.1s ease;
}

.slot-upload-btn:hover {
  background: #FFB7C5;
}

.slot-url-input {
  width: 100%;
  font-size: 11px;
  padding: 4px 6px;
  border: 1.5px solid var(--color-border-dark);
  border-radius: 8px;
  background: #FFFFFF;
}

.modal-footer-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: 2px dashed #FFAEC0;
  padding-top: 14px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.hidden {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 820px) {
  .app-boxes-upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-window-frame {
    padding: 16px;
    border-radius: 28px;
    border-width: 3.5px;
  }

  .window-header-pill {
    padding: 8px 14px;
    border-radius: 20px;
  }

  .quest-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .companion-column {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .companion-card {
    max-width: 280px;
  }

  .intro-main-question {
    font-size: 22px;
  }

  .cat-gift-display-box {
    width: 200px;
    height: 200px;
  }

  .corner-sticker {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 520px) {
  .quest-cards-2x2 {
    grid-template-columns: 1fr;
  }

  .progress-section {
    width: 100%;
    justify-content: space-between;
  }

  .window-footer-legend {
    flex-direction: column;
    gap: 8px;
    align-items: center;
  }
}
