/* ════════════════════════════════════════════
   포스트몽 스타일시트
   컬러: 오렌지 #FF6B35 / 배경 #FFF3EE
   ════════════════════════════════════════════ */

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

:root {
  --orange:     #FF6B35;
  --orange-dk:  #E55A2B;
  --orange-lt:  #FFF3EE;
  --orange-mid: #FFD5C2;
  --text:       #1A1A1A;
  --text-muted: #6B7280;
  --border:     #E5E7EB;
  --white:      #FFFFFF;
  --success:    #10B981;
  --danger:     #EF4444;
  --radius:     14px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --shadow-md:  0 4px 24px rgba(0,0,0,.12);
}

html { font-size: 16px; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--orange-lt);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

/* ── 앱 컨테이너 ── */
.screen {
  display: none;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--white);
  position: relative;
}
.screen.active { display: flex; flex-direction: column; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 80px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1A1A1A; color: #fff;
  padding: 10px 20px; border-radius: 99px;
  font-size: .875rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: all .3s; z-index: 9999;
  max-width: 320px; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--success); }
.toast.warning { background: #F59E0B; }
.toast.error   { background: var(--danger); }

/* ── LOADING ── */
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
}
.loading-overlay.hidden { display: none; }
.loading-box { text-align: center; }
.spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid var(--orange-mid);
  border-top-color: var(--orange);
  animation: spin .8s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loading-text { color: var(--text-muted); font-size: .95rem; }

/* ═══════════════════════════
   LANDING
═══════════════════════════ */
#screen-landing { overflow-y: auto; }
.landing-hero {
  padding: 60px 24px 40px;
  background: linear-gradient(160deg, #fff5f0 0%, #ffffff 60%);
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: var(--orange-lt);
  color: var(--orange);
  font-size: .8rem; font-weight: 700;
  padding: 4px 14px; border-radius: 99px;
  margin-bottom: 16px;
}
.hero-title {
  font-size: 2rem; font-weight: 800; line-height: 1.25;
  margin-bottom: 14px;
}
.hero-title .highlight { color: var(--orange); }
.hero-sub { color: var(--text-muted); line-height: 1.7; margin-bottom: 32px; }
.hero-sub strong { color: var(--text); }

.feature-cards {
  display: flex; gap: 10px; margin-bottom: 32px;
  overflow-x: auto; padding-bottom: 4px;
}
.feature-card {
  flex: 1; min-width: 100px;
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 14px 10px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: .78rem; text-align: center;
}
.feature-icon { font-size: 1.4rem; }
.feature-card strong { font-weight: 700; color: var(--text); font-size: .82rem; }
.feature-card span   { color: var(--text-muted); }

.landing-note { font-size: .8rem; color: var(--text-muted); margin-top: 10px; }

/* 요금제 */
.pricing-section { padding: 40px 24px 60px; }
.section-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 20px; text-align: center; }
.pricing-cards { display: flex; flex-direction: column; gap: 14px; }
.pricing-card {
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: relative;
}
.pricing-card.featured { border-color: var(--orange); box-shadow: var(--shadow-md); }
.plan-badge {
  position: absolute; top: -10px; right: 16px;
  background: var(--orange); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 2px 10px;
  border-radius: 99px;
}
.plan-name  { font-size: .8rem; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
.plan-price { font-size: 1.6rem; font-weight: 800; margin-bottom: 4px; }
.plan-price span { font-size: .9rem; font-weight: 500; color: var(--text-muted); }
.plan-desc  { font-size: .85rem; color: var(--text-muted); margin-bottom: 14px; }
.plan-features { list-style: none; font-size: .88rem; margin-bottom: 18px; }
.plan-features li { padding: 4px 0; }

/* ═══════════════════════════
   AUTH
═══════════════════════════ */
#screen-auth {
  padding: 0;
  align-items: center;
  justify-content: center;
}
.auth-wrap {
  width: 100%; padding: 32px 24px;
}
.auth-logo {
  font-size: 1.4rem; font-weight: 800;
  color: var(--orange); text-align: center;
  margin-bottom: 28px; cursor: pointer;
}
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.auth-tab {
  flex: 1; padding: 10px; background: none; border: none;
  font-size: .95rem; font-weight: 600; cursor: pointer;
  color: var(--text-muted); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: all .2s;
}
.auth-tab.active { color: var(--orange); border-bottom-color: var(--orange); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form.hidden { display: none; }

/* ═══════════════════════════
   PROFILE SETUP
═══════════════════════════ */
#screen-profile { overflow-y: auto; }
.page-wrap { padding: 32px 24px 60px; }
.page-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
.page-sub   { font-size: .88rem; color: var(--text-muted); margin-bottom: 28px; }

/* ═══════════════════════════
   MAIN APP
═══════════════════════════ */
#screen-app { background: #F8F9FA; }

.app-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; box-shadow: var(--shadow);
}
.header-store { font-size: 1rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.usage-badge {
  font-size: .75rem; font-weight: 600;
  background: var(--orange-lt); color: var(--orange);
  padding: 3px 10px; border-radius: 99px;
}
.icon-btn { background: none; border: none; font-size: 1.2rem; cursor: pointer; padding: 4px; }

.app-main { flex: 1; overflow-y: auto; padding-bottom: 70px; }

/* 탭 컨텐츠 */
.tab-content { display: none; padding: 20px; }
.tab-content.active { display: block; }
.tab-header { margin-bottom: 20px; }
.tab-header h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: 6px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; color: var(--text-muted);
  background: var(--orange-lt); padding: 4px 10px;
  border-radius: 99px;
}

/* 하단 탭바 */
.bottom-nav {
  position: sticky; bottom: 0; z-index: 100;
  background: var(--white); border-top: 1px solid var(--border);
  display: flex; height: 62px;
}
.nav-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: .72rem; font-weight: 600;
  transition: color .2s;
}
.nav-btn.active { color: var(--orange); }
.nav-icon { font-size: 1.3rem; }

/* ── 폼 공통 ── */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.label-hint { font-weight: 400; color: var(--text-muted); }

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%; padding: 12px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: inherit; font-size: .93rem; color: var(--text);
  background: var(--white); outline: none; transition: border .2s;
  resize: vertical;
}
input:focus, textarea:focus { border-color: var(--orange); }

/* ── Chip ── */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 14px; border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--white); font-size: .83rem; font-weight: 500;
  cursor: pointer; transition: all .15s; color: var(--text);
}
.chip.active { background: var(--orange); border-color: var(--orange); color: #fff; }

/* ── 플랫폼 토글 ── */
.platform-toggles { display: flex; gap: 10px; flex-wrap: wrap; }
.toggle-label { cursor: pointer; }
.toggle-label input { display: none; }
.toggle-chip {
  display: inline-block; padding: 8px 16px; border-radius: 99px;
  border: 1.5px solid var(--border); font-size: .85rem; font-weight: 600;
  transition: all .15s;
}
.toggle-label input:checked + .toggle-chip {
  background: var(--orange); border-color: var(--orange); color: #fff;
}

/* ── 메뉴 입력 ── */
.menu-inputs { display: flex; flex-direction: column; gap: 8px; }
.menu-input { margin: 0 !important; }

/* ── 버튼 ── */
.btn-primary {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dk) 100%);
  color: #fff; border: none; border-radius: var(--radius);
  padding: 14px 24px; font-size: .95rem; font-weight: 700;
  cursor: pointer; transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(255,107,53,.35);
}
.btn-primary:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(255,107,53,.45); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  background: var(--white); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 12px 20px; font-size: .9rem; font-weight: 600;
  cursor: pointer; transition: border .2s;
}
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }
.btn-outline.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-full { width: 100%; }
.btn-lg   { padding: 16px 32px; font-size: 1rem; }
.btn-sm   {
  padding: 5px 10px; border-radius: 8px; font-size: .78rem; font-weight: 600;
  background: var(--orange-lt); color: var(--orange); border: none; cursor: pointer;
}
.btn-generate { margin-top: 4px; }

/* ── 결과 카드 ── */
.results-area { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.results-area.hidden { display: none; }
.result-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--border); box-shadow: var(--shadow); overflow: hidden;
}
.result-card.hidden { display: none; }
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: .9rem;
}
.result-actions { display: flex; gap: 6px; }
.result-body { padding: 16px; }
.result-text { font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }
.hashtag-wrap { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.hashtag-wrap .tag {
  font-size: .78rem; font-weight: 600;
  background: var(--orange-lt); color: var(--orange);
  padding: 3px 10px; border-radius: 99px;
}
.blog-title { display: block; font-size: 1rem; font-weight: 700; margin-bottom: 10px; }
.blog-content { color: var(--text-muted); }

/* ── 리뷰 결과 ── */
.reply-cards { display: flex; flex-direction: column; gap: 12px; }
.reply-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--border); padding: 16px;
}
.reply-card:nth-child(2) { border-color: var(--orange-mid); }
.reply-num  { font-size: .78rem; font-weight: 700; color: var(--orange); margin-bottom: 8px; }
.reply-text { font-size: .9rem; line-height: 1.65; margin-bottom: 10px; }

/* ── 감성 뱃지 ── */
.sentiment-badge {
  display: inline-block; margin-top: 8px;
  font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 99px;
}
.sentiment-badge.positive { background: #D1FAE5; color: #065F46; }
.sentiment-badge.negative { background: #FEE2E2; color: #991B1B; }
.sentiment-badge.neutral  { background: #F3F4F6; color: #374151; }
.sentiment-badge.hidden   { display: none; }

/* ── 리포트 ── */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: var(--white); border-radius: var(--radius);
  border: 1.5px solid var(--border); padding: 18px; text-align: center;
}
.stat-num   { font-size: 1.8rem; font-weight: 800; color: var(--orange); }
.stat-label { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }

.upgrade-banner {
  background: linear-gradient(135deg, #FFF3EE, #FFD5C2);
  border: 1.5px solid var(--orange-mid); border-radius: var(--radius);
  padding: 20px; text-align: center;
}
.upgrade-banner p { font-weight: 700; margin-bottom: 12px; }

/* ── 모달 ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 5000;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--white); border-radius: 24px 24px 0 0;
  padding: 28px 24px 40px; width: 100%; max-width: 480px;
  display: flex; flex-direction: column; gap: 12px;
}
.modal-box h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 4px; }
.modal-close {
  background: none; border: none; color: var(--text-muted);
  font-size: .9rem; cursor: pointer; text-align: center; padding: 8px;
}

/* ═══════════════════════════
   CALENDAR GRID
═══════════════════════════ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
}
.cal-header {
  background: var(--orange);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  padding: 8px 0;
}
.cal-day {
  background: var(--white);
  min-height: 48px;
  padding: 6px 4px;
  font-size: .78rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}
.cal-day:hover { background: var(--orange-lt); }
.cal-day.empty { background: #FAFAFA; cursor: default; }
.cal-day.today {
  background: var(--orange-lt);
  color: var(--orange);
  font-weight: 800;
  box-shadow: inset 0 -3px 0 var(--orange);
}
.cal-dots {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 4px;
}
.cal-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
.cal-dot.seasonal { background: #10B981; }
.cal-dot.event    { background: #F59E0B; }
.cal-dot.menu     { background: #3B82F6; }
.cal-dot.promo    { background: #EF4444; }
.cal-dot.custom   { background: var(--orange); }

/* 캘린더 아이템 리스트 */
.cal-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  margin-bottom: 8px;
  transition: box-shadow .2s;
}
.cal-item:hover { box-shadow: var(--shadow); }
.cal-item-date {
  min-width: 52px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--orange);
  background: var(--orange-lt);
  padding: 6px 10px;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
}
.cal-item-body { flex: 1; }
.cal-item-body strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.cal-item-body p { font-size: .82rem; color: var(--text-muted); line-height: 1.5; }
.cal-type-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--orange-lt);
  color: var(--orange);
  margin-bottom: 4px;
}

/* ═══════════════════════════
   REVIEW CARDS
═══════════════════════════ */
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 16px;
  margin-bottom: 10px;
  transition: box-shadow .2s;
}
.review-card:hover { box-shadow: var(--shadow); }
.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: .85rem;
  font-weight: 600;
}
.review-date { font-size: .75rem; color: var(--text-muted); font-weight: 400; }
.review-content {
  font-size: .88rem;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 10px;
}
.review-reply {
  background: var(--orange-lt);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .85rem;
  line-height: 1.6;
  color: var(--text);
  margin-top: 8px;
}
.review-reply strong {
  display: block;
  font-size: .78rem;
  color: var(--orange);
  margin-bottom: 4px;
}
.review-actions {
  display: flex; gap: 6px; margin-top: 6px;
}
.reply-option {
  background: var(--orange-lt);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: .85rem;
  line-height: 1.55;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.reply-option span { font-weight: 700; color: var(--orange); white-space: nowrap; }
.reply-option .btn-sm { margin-left: auto; flex-shrink: 0; }

/* ═══════════════════════════
   COMPETITOR SECTION
═══════════════════════════ */
.comp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: .85rem;
  font-weight: 600;
  margin: 0 6px 6px 0;
  transition: border-color .2s;
}
.comp-chip:hover { border-color: var(--orange); }

/* 리포트 섹션 */
.report-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.report-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.report-section h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.report-section p  { font-size: .88rem; line-height: 1.7; color: var(--text-muted); }
.report-section ul { list-style: none; padding: 0; }
.report-section ul li {
  font-size: .88rem;
  line-height: 1.7;
  padding: 3px 0;
}
.report-section ol { padding-left: 20px; }
.report-section ol li {
  font-size: .88rem;
  line-height: 1.7;
  padding: 3px 0;
}

/* ═══════════════════════════
   SCHEDULE / POST CARDS
═══════════════════════════ */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 16px;
  margin-bottom: 10px;
  transition: box-shadow .2s;
}
.post-card:hover { box-shadow: var(--shadow); }
.post-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: .85rem;
  font-weight: 600;
}
.post-preview {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 6px;
  margin-bottom: 0;
}

/* ═══════════════════════════
   RESPONSIVE + ANIMATIONS
═══════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.tab-content.active { animation: fadeIn .3s ease-out; }
.result-card { animation: fadeIn .35s ease-out; }
.cal-item    { animation: fadeIn .25s ease-out; }
.review-card { animation: fadeIn .25s ease-out; }
.post-card   { animation: fadeIn .25s ease-out; }

/* 모바일 최적화 */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .feature-cards { gap: 8px; }
  .feature-card  { min-width: 85px; padding: 10px 6px; }
  .cal-day { min-height: 40px; font-size: .72rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 14px 10px; }
  .stat-num { font-size: 1.4rem; }
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--orange-mid); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* 빈 상태 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; line-height: 1.6; }

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