/* ====== Reset & Base ====== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: 'Noto Sans KR', 'Inter', sans-serif;
  background: #0d0d14
}

body {
  display: flex;
  align-items: center;
  justify-content: center
}

/* ====== 배경 브랜딩 ====== */
.bg-brand {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0
}

.bg-logo {
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #c084fc, #f472b6, #fb923c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: .18
}

.bg-logo span {
  font-weight: 400;
  font-size: 2.4rem
}

.bg-sub {
  font-size: .95rem;
  color: rgba(255, 255, 255, .1);
  margin-top: 6px;
  letter-spacing: 2px
}

/* ====== Mock 패널 (폰 밖) ====== */
.mock-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  width: 320px;
  font-size: .85rem
}

.mock-panel-toggle {
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
  color: #e2b4ff;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
  transition: .2s
}

.mock-panel-toggle:hover {
  background: rgba(255, 255, 255, .13)
}

.mock-panel-body {
  display: none;
  margin-top: 8px;
  background: rgba(20, 16, 30, .95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(192, 132, 252, .2);
  border-radius: 16px;
  padding: 20px;
  color: #d4bfff
}

.mock-panel-body.open {
  display: block
}

.mock-panel-body h3 {
  font-size: .95rem;
  margin-bottom: 6px;
  color: #e9d5ff
}

.mock-panel-body p {
  font-size: .78rem;
  color: #a78bfa;
  margin-bottom: 10px
}

.mock-msg-list {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, .3) transparent
}

.mock-msg-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(192, 132, 252, .15);
  border-radius: 10px;
  padding: 8px 10px;
  animation: bubbleIn .2s ease-out
}

.mock-msg-num {
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(167, 139, 250, .25);
  color: #e9d5ff;
  font-size: .68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  flex-shrink: 0
}

.mock-msg-item textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: #f3e8ff;
  font-size: .78rem;
  font-family: inherit;
  outline: none;
  resize: none;
  line-height: 1.5;
  min-height: 32px;
  padding: 2px 0
}

.mock-msg-del {
  background: none;
  border: none;
  color: rgba(248, 113, 113, .6);
  font-size: .9rem;
  cursor: pointer;
  padding: 2px 4px;
  margin-top: 2px;
  transition: .2s;
  flex-shrink: 0
}

.mock-msg-del:hover {
  color: #f87171
}

.mock-btn-row {
  display: flex;
  gap: 8px
}

.mock-add-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px dashed rgba(167, 139, 250, .3);
  border-radius: 10px;
  background: transparent;
  color: #c4b5fd;
  font-weight: 600;
  cursor: pointer;
  font-size: .82rem;
  transition: .2s;
  font-family: inherit
}

.mock-add-btn:hover {
  border-color: #a78bfa;
  background: rgba(167, 139, 250, .08);
  color: #e9d5ff
}

.mock-save-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #a78bfa, #c084fc);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: .85rem;
  transition: .2s;
  font-family: inherit
}

.mock-save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(167, 139, 250, .4)
}

.mock-back-btn {
  padding: 10px 16px;
  border: 1px solid rgba(167, 139, 250, .3);
  border-radius: 10px;
  background: rgba(30, 20, 50, .3);
  color: #c4b5fd;
  font-weight: 600;
  cursor: pointer;
  font-size: .82rem;
  transition: .2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px
}

.mock-back-btn:hover {
  background: rgba(167, 139, 250, .12);
  border-color: #a78bfa
}

/* Mock 페이지 선택 카드 */
.mock-page-card {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(167, 139, 250, .15);
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 6px
}

.mock-page-card:hover {
  background: rgba(167, 139, 250, .1);
  border-color: #a78bfa;
  transform: translateY(-1px)
}

.mock-page-num {
  font-weight: 800;
  color: #c4b5fd;
  font-size: .85rem;
  margin-bottom: 4px
}

.mock-page-info {
  font-size: .72rem;
  color: #9ca3af;
  margin-bottom: 2px
}

.mock-page-count {
  font-size: .68rem;
  color: #7c3aed
}

/* ====== iPhone 프레임 ====== */
.iphone-frame {
  position: relative;
  z-index: 10;
  width: 375px;
  height: 812px;
  border-radius: 54px;
  background: #1a1a1a;
  box-shadow: 0 0 0 3px #333, 0 0 0 6px #1a1a1a, 0 30px 80px rgba(0, 0, 0, .6), 0 0 120px rgba(168, 85, 247, .08);
  padding: 12px;
  overflow: hidden;
  isolation: isolate
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 34px;
  background: #1a1a1a;
  border-radius: 0 0 24px 24px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center
}

.iphone-notch-cam {
  width: 12px;
  height: 12px;
  background: #2a2a2a;
  border-radius: 50%;
  border: 2px solid #333
}

.iphone-screen {
  width: 100%;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #fdf2f8, #faf5ff, #f5f3ff)
}

/* ====== 페이지 공통 ====== */
.page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 72px);
  padding-top: 46px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  -ms-overflow-style: none;
  scrollbar-width: none
}

.page::-webkit-scrollbar {
  display: none
}

.page.active {
  opacity: 1;
  visibility: visible
}

.page-header {
  padding: 24px 20px 12px;
  text-align: center
}

.page-header h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #581c87;
  letter-spacing: -.5px
}

.page-desc {
  font-size: .78rem;
  color: #a855f7;
  margin-top: 4px
}

/* 뒤로가기 버튼 */
.back-btn {
  position: absolute;
  left: 16px;
  top: 24px;
  background: none;
  border: none;
  color: #a855f7;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit
}

/* ====== 캐릭터 그리드 (공용) ====== */
.char-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 8px 20px 20px
}

.char-card {
  background: rgba(255, 255, 255, .7);
  border-radius: 20px;
  padding: 16px 12px;
  text-align: center;
  border: 1px solid rgba(168, 85, 247, .1);
  box-shadow: 0 4px 16px rgba(168, 85, 247, .05);
  cursor: pointer;
  transition: .2s
}

.char-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(168, 85, 247, .12)
}

.char-card:active {
  transform: scale(.97)
}

.char-card-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 10px;
  display: block;
  border: 3px solid rgba(168, 85, 247, .15);
  background: rgba(168, 85, 247, .05)
}

.char-card-name {
  font-size: .82rem;
  font-weight: 700;
  color: #581c87
}

/* ====== 하단 네비게이션 ====== */
.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 72px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(168, 85, 247, .1);
  display: flex;
  z-index: 50;
  padding-bottom: 8px;
  border-bottom-left-radius: 44px;
  border-bottom-right-radius: 44px;
  overflow: hidden
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: .65rem;
  font-weight: 600;
  transition: .2s;
  font-family: inherit
}

.nav-tab svg {
  transition: .2s
}

.nav-tab.active {
  color: #a855f7
}

.nav-tab.active svg {
  filter: drop-shadow(0 0 6px rgba(168, 85, 247, .4))
}

/* ====== 1. 페르소나 설정 ====== */
.persona-content {
  padding: 12px 20px 20px
}

.persona-media-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px
}

.persona-profile-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  border: 3px solid rgba(168, 85, 247, .2);
  box-shadow: 0 4px 16px rgba(168, 85, 247, .1)
}

.persona-profile-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover
}

.persona-profile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 32px;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  color: #fff;
  opacity: 0;
  transition: .2s
}

.persona-profile-wrap:hover .persona-profile-overlay {
  opacity: 1
}

.persona-add-photo {
  width: 90px;
  height: 90px;
  border-radius: 18px;
  border: 2.5px dashed rgba(168, 85, 247, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: .2s;
  background: rgba(255, 255, 255, .5)
}

.persona-add-photo:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, .06)
}

.persona-add-photo span {
  font-size: 2rem;
  color: #a855f7;
  font-weight: 300;
  line-height: 1
}

.persona-card {
  background: rgba(255, 255, 255, .7);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(168, 85, 247, .1);
  box-shadow: 0 4px 20px rgba(168, 85, 247, .06)
}

.persona-card label {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 8px
}

.persona-card textarea {
  width: 100%;
  height: 150px;
  border: 1.5px solid rgba(168, 85, 247, .15);
  border-radius: 14px;
  padding: 14px;
  font-size: .82rem;
  color: #4c1d95;
  background: rgba(250, 245, 255, .6);
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.6
}

.persona-card textarea:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .1)
}

.persona-save-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168, 85, 247, .3);
  transition: .2s;
  font-family: inherit
}

.persona-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, .4)
}

.persona-save-btn:active {
  transform: translateY(0)
}

/* ====== 2. 아이돌 챗 ====== */

/* 상단 상태바 */
.chat-status-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(236, 72, 153, .04));
  border-bottom: 1px solid rgba(168, 85, 247, .1);
  font-size: .62rem;
  color: #6b21a8;
  flex-shrink: 0
}

.status-divider {
  color: rgba(168, 85, 247, .2);
  font-size: .55rem
}

.affinity-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 8px 10px 6px;
  background: linear-gradient(180deg, rgba(253, 242, 248, .98), rgba(253, 242, 248, .85));
  backdrop-filter: blur(8px);
  flex-shrink: 0
}

.affinity-nav-row {
  display: flex;
  align-items: center;
  gap: 6px
}

.affinity-center {
  flex: 1;
  min-width: 0
}

.page-nav-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(168, 85, 247, .2);
  background: rgba(255, 255, 255, .6);
  color: #a855f7;
  font-size: .7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0
}

.page-nav-btn:disabled {
  opacity: .3;
  cursor: default
}

.page-nav-btn:not(:disabled):hover {
  background: #a855f7;
  color: #fff;
  border-color: #a855f7;
  box-shadow: 0 2px 8px rgba(168, 85, 247, .3)
}

.page-nav-btn.active {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border-color: transparent;
  animation: pulseNav 1.5s infinite
}

@keyframes pulseNav {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(168, 85, 247, .3)
  }

  50% {
    box-shadow: 0 0 0 6px rgba(168, 85, 247, 0)
  }
}

.affinity-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .68rem;
  font-weight: 700;
  color: #a855f7;
  margin-bottom: 4px
}

.affinity-left {
  display: flex;
  align-items: center;
  gap: 5px
}

.affinity-profile {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, .2);
  cursor: pointer;
  transition: .2s
}

.affinity-profile:hover {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .15)
}

.affinity-track {
  height: 10px;
  background: rgba(168, 85, 247, .1);
  border-radius: 10px;
  overflow: hidden;
  position: relative
}

.affinity-fill {
  height: 100%;
  width: 0;
  border-radius: 10px;
  background: linear-gradient(90deg, #c084fc, #f472b6, #fb923c);
  transition: width .6s cubic-bezier(.4, 0, .2, 1);
  position: relative
}

.affinity-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .4) 50%, transparent 100%);
  animation: shimmer 2s infinite
}

.affinity-ticks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-evenly;
  pointer-events: none
}

.affinity-ticks span {
  width: 1px;
  height: 100%;
  background: rgba(168, 85, 247, .15)
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%)
  }

  100% {
    transform: translateX(100%)
  }
}

.chat-area {
  flex: 1;
  padding: 8px 14px 14px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  min-height: 0;
  height: calc(100% - 92px)
}

.chat-area::-webkit-scrollbar {
  display: none
}

.chat-start-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 12px;
  opacity: .8
}

.chat-start-icon {
  font-size: 3rem;
  animation: float 3s ease-in-out infinite
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(-10px)
  }
}

.chat-start-wrap p {
  font-size: .85rem;
  color: #7c3aed;
  font-weight: 600
}

.chat-start-btn {
  padding: 12px 32px;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168, 85, 247, .35);
  transition: .2s;
  font-family: inherit
}

.chat-start-btn:hover {
  transform: scale(1.05)
}

/* 채팅 말풍선 */
.chat-bubble {
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: .82rem;
  line-height: 1.55;
  animation: bubbleIn .3s ease-out;
  word-break: break-word;
  margin-bottom: 8px
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.95)
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1)
  }
}

.chat-bubble.ai {
  background: rgba(255, 255, 255, .85);
  color: #4c1d95;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid rgba(168, 85, 247, .1);
  max-width: 92%
}

/* 지문 (상황설명) - 프레임 없이 중앙 정렬 */
.chat-action-text {
  font-style: italic;
  color: #9ca3af;
  font-size: .82rem;
  text-align: center;
  padding: 10px 16px;
  line-height: 1.55;
  animation: bubbleIn .3s ease-out
}

/* 매니저 미션 팝업 - 입력창 바로 위 고정 */
.mission-popup {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin: 0 8px 6px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(236, 72, 153, .06));
  border: 1.5px solid rgba(168, 85, 247, .2);
  border-radius: 14px;
  backdrop-filter: blur(8px);
  animation: missionSlideUp .4s ease-out
}

.mission-label {
  font-size: .68rem;
  font-weight: 800;
  color: #7c3aed;
  margin-bottom: 6px;
  letter-spacing: .5px
}

.mission-text {
  font-size: .75rem;
  color: #4c1d95;
  line-height: 1.6;
  text-align: left
}

@keyframes missionSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

.chat-bubble.user {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  margin-left: auto
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 2px
}

/* 채팅 이미지 */
.chat-image {
  max-width: 70%;
  border-radius: 14px;
  margin-bottom: 8px;
  animation: bubbleIn .3s ease-out;
  align-self: flex-start;
  border: 1px solid rgba(168, 85, 247, .1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08)
}

/* 타이핑 인디케이터 */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, .85);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  width: fit-content;
  border: 1px solid rgba(168, 85, 247, .1);
  margin-bottom: 8px
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c084fc;
  animation: typingBounce 1.4s ease-in-out infinite
}

.typing-dot:nth-child(2) {
  animation-delay: .2s
}

.typing-dot:nth-child(3) {
  animation-delay: .4s
}

@keyframes typingBounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: .4
  }

  30% {
    transform: translateY(-8px);
    opacity: 1
  }
}

/* 입력 영역 */
.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  background: rgba(253, 242, 248, .95);
  backdrop-filter: blur(8px)
}

.chat-input-wrap input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid rgba(168, 85, 247, .15);
  border-radius: 50px;
  font-size: .82rem;
  color: #4c1d95;
  background: rgba(255, 255, 255, .7);
  outline: none;
  font-family: inherit
}

.chat-input-wrap input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .1)
}

.chat-send-btn {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s;
  flex-shrink: 0
}

.chat-send-btn:hover {
  transform: scale(1.08)
}

/* ====== 3. 내 보관함 ====== */
.rewards-content {
  padding: 12px 20px 20px
}

.reward-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-radius: 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(168, 85, 247, .1)
}

.sign-card {
  background: linear-gradient(135deg, rgba(168, 85, 247, .08), rgba(236, 72, 153, .06));
  box-shadow: 0 4px 20px rgba(168, 85, 247, .06)
}

.consult-card {
  background: linear-gradient(135deg, rgba(251, 146, 60, .08), rgba(168, 85, 247, .06));
  box-shadow: 0 4px 20px rgba(251, 146, 60, .06)
}

.reward-icon {
  font-size: 2.2rem
}

.reward-info {
  flex: 1
}

.reward-title {
  font-size: .75rem;
  color: #7c3aed;
  font-weight: 600;
  margin-bottom: 2px
}

.reward-count {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent
}

.reward-unit {
  font-size: .7rem;
  color: #a78bfa;
  font-weight: 500;
  margin-top: -2px
}

.reward-use-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #a855f7, #c084fc);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: .2s;
  font-family: inherit;
  flex-shrink: 0
}

.reward-use-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, .3)
}

.reward-history {
  margin-top: 8px;
  background: rgba(255, 255, 255, .5);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(168, 85, 247, .08)
}

.reward-history h3 {
  font-size: .85rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 12px
}

.history-list {
  max-height: 220px;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none
}

.history-list::-webkit-scrollbar {
  display: none
}

.history-empty {
  font-size: .78rem;
  color: #c4b5fd;
  text-align: center;
  padding: 20px 0
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(168, 85, 247, .06);
  font-size: .78rem;
  color: #6d28d9;
  animation: bubbleIn .3s ease-out
}

.history-item:last-child {
  border-bottom: none
}

.history-item .h-icon {
  font-size: 1.1rem
}

.history-item .h-text {
  flex: 1
}

.history-item .h-time {
  font-size: .68rem;
  color: #a78bfa
}

/* ====== 모달 ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(4px)
}

.modal-overlay.open {
  display: flex
}

.modal-box {
  background: #faf5ff;
  border-radius: 24px;
  width: 320px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
  animation: bubbleIn .3s ease-out;
  -ms-overflow-style: none;
  scrollbar-width: none
}

.modal-box::-webkit-scrollbar {
  display: none
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 10px
}

.modal-header h3 {
  font-size: .95rem;
  font-weight: 800;
  color: #581c87
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #a78bfa;
  cursor: pointer
}

.modal-body {
  padding: 0 20px 20px
}

.modal-desc {
  font-size: .75rem;
  color: #7c3aed;
  margin-bottom: 12px
}

.upload-zone {
  border: 2.5px dashed rgba(168, 85, 247, .2);
  border-radius: 16px;
  padding: 32px 16px;
  text-align: center;
  cursor: pointer;
  transition: .2s;
  background: rgba(255, 255, 255, .5)
}

.upload-zone:hover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, .04)
}

.upload-zone span {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px
}

.upload-zone p {
  font-size: .78rem;
  color: #a78bfa
}

.upload-preview {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 12px
}

.modal-confirm-btn {
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: .2s
}

.modal-confirm-btn:hover {
  transform: translateY(-1px)
}

.uploaded-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px
}

.uploaded-thumb {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(168, 85, 247, .15)
}

/* ====== 리워드 사용 팝업 ====== */
.reward-use-box {
  width: 260px
}

.reward-use-body {
  display: flex;
  flex-direction: column;
  gap: 12px
}

.platform-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1.5px solid rgba(168, 85, 247, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: .2s;
  font-family: inherit
}

.platform-btn:hover {
  background: rgba(168, 85, 247, .06);
  border-color: #a855f7;
  transform: translateY(-1px)
}

.platform-btn span {
  font-size: .88rem;
  font-weight: 700;
  color: #4c1d95
}

/* ====== Toast ====== */
.toast {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%) translateY(-40px);
  padding: 12px 22px;
  border-radius: 14px;
  font-size: .78rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  box-shadow: 0 6px 20px rgba(168, 85, 247, .35);
  z-index: 9999;
  transition: .4s cubic-bezier(.4, 0, .2, 1);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  max-width: 85%
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1
}

/* ====== 리워드 이펙트 ====== */
.reward-effect {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .3s
}

.reward-effect.show {
  opacity: 1
}

.reward-effect-text {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 30px rgba(168, 85, 247, .8);
  animation: rewardPop .6s ease-out
}

@keyframes rewardPop {
  0% {
    transform: scale(0);
    opacity: 0
  }

  50% {
    transform: scale(1.2)
  }

  100% {
    transform: scale(1);
    opacity: 1
  }
}

/* ====== 반응형 ====== */
@media(max-width:500px) {
  .iphone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
    padding: 0
  }

  .iphone-screen {
    border-radius: 0
  }

  .iphone-notch {
    border-radius: 0 0 18px 18px
  }

  .mock-panel {
    display: none
  }
}