/* SlotIn PWA — Mobile App Style */
:root {
  --red: #E71335;
  --red-dark: #c0102c;
  --red-light: #fde8ec;
  --bg: #f7f5f3;
  --surface: #ffffff;
  --border: #e8e3de;
  --text: #111111;
  --text-2: #444444;
  --text-3: #888888;
  --text-4: #bbbbbb;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --info: #2563eb;
  --info-light: #dbeafe;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,.08);
  --shadow-red: 0 4px 16px rgba(231,19,53,.28);
  --font: 'Noto Sans KR','Inter',-apple-system,sans-serif;
  --font-num: 'Inter','Noto Sans KR',sans-serif;
  --header-h: 56px;
  --nav-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ── 화면 전환 ── */
.screen { display: none; min-height: 100dvh; }
.screen.is-active { display: flex; flex-direction: column; }

/* ── 로그인 ── */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: var(--bg);
}
.login-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}
.login-logo__mark {
  width: 64px;
  height: 64px;
  background: var(--red);
  color: #fff;
  font-family: var(--font-num);
  font-size: 2rem;
  font-weight: 900;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  box-shadow: var(--shadow-red);
}
.login-logo__text {
  font-family: var(--font-num);
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
}
.login-logo__text span { color: var(--red); }
.login-logo__sub {
  font-size: 0.85rem;
  color: var(--text-3);
  margin-top: 0.25rem;
}
.login-card {
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.8rem; font-weight: 600; color: var(--text-2); }
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
}
.form-control:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(231,19,53,.1); }
.login-hint { font-size: 0.75rem; color: var(--text-4); text-align: center; }

/* ── 버튼 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  border: none;
}
.btn--primary { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn--primary:active { background: var(--red-dark); }
.btn--ghost { background: transparent; color: var(--text-2); border: 1.5px solid var(--border); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.4rem 0.85rem; font-size: 0.8rem; border-radius: var(--radius-xs); }

/* ── 앱 레이아웃 ── */
#screen-app {
  display: none;
  flex-direction: column;
  height: 100dvh;
}
#screen-app.is-active { display: flex; }

.app-header {
  height: var(--header-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}
.app-header__logo {
  font-family: var(--font-num);
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
}
.app-header__logo span { color: var(--red); }
.header-avatar {
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  background: var(--red-light);
  color: var(--red);
  font-size: 0.82rem;
  font-weight: 800;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1;
  letter-spacing: -0.02em;
}

.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 0.5rem);
}

.tab-section { display: none; }
.tab-section.is-active { display: block; }
.section-inner { padding: 1.25rem 1.25rem 0; }

/* ── 하단 탭바 ── */
.bottom-nav {
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 100;
}
.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 0.5rem 0;
  color: var(--text-4);
  font-size: 0.68rem;
  font-weight: 600;
  transition: color 0.15s;
  cursor: pointer;
}
.bottom-nav__item svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bottom-nav__item.is-active { color: var(--red); }
.bottom-nav__item.is-active svg { stroke-width: 2.2; }

/* ── 홈 탭 ── */
.home-greeting { margin-bottom: 1.25rem; }
.home-greeting__sub { font-size: 0.85rem; color: var(--text-3); }
.home-greeting__name { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; }

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.summary-card__icon { font-size: 1.4rem; margin-bottom: 0.4rem; }
.summary-card__val {
  font-family: var(--font-num);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}
.summary-card__label { font-size: 0.72rem; color: var(--text-3); margin-top: 0.3rem; font-weight: 500; }

.home-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.today-class-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 0.6rem;
}
.today-class-card__info { flex: 1; }
.today-class-card__name { font-size: 0.95rem; font-weight: 700; }
.today-class-card__meta { font-size: 0.78rem; color: var(--text-3); margin-top: 0.15rem; }

.week-attendance {
  display: flex;
  gap: 0.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.week-day span { font-size: 0.72rem; font-weight: 600; color: var(--text-3); }
.week-day .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}
.week-day.attended .dot { background: var(--red); }
.week-day.today span { color: var(--red); font-weight: 800; }
.week-day.today .dot { background: var(--red); box-shadow: 0 0 0 3px var(--red-light); }

/* ── 배지 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge--success { background: var(--success-light); color: var(--success); }
.badge--warning { background: var(--warning-light); color: var(--warning); }
.badge--info { background: var(--info-light); color: var(--info); }
.badge--yoga { background: #ede9fe; color: #7c3aed; }
.badge--pilates { background: #e0f2fe; color: #0891b2; }
.badge--health { background: var(--red-light); color: var(--red); }
.badge--gray { background: #f3f4f6; color: #6b7280; }

/* ── 스케줄 탭 ── */
.page-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.date-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 52px;
}
.date-chip.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.date-chip__day { font-size: 0.68rem; font-weight: 600; color: inherit; opacity: 0.7; }
.date-chip__num { font-family: var(--font-num); font-size: 1.1rem; font-weight: 800; color: inherit; }
.date-chip.is-active .date-chip__day { opacity: 0.85; }

.class-list { display: flex; flex-direction: column; gap: 0.75rem; }
.class-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.class-item__time {
  font-family: var(--font-num);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-2);
  min-width: 52px;
  text-align: center;
  line-height: 1.3;
}
.class-item__time small { font-size: 0.7rem; font-weight: 400; color: var(--text-3); display: block; }
.class-item__divider { width: 2px; height: 44px; border-radius: 2px; background: var(--border); flex-shrink: 0; }
.class-item__divider.yoga { background: #7c3aed; }
.class-item__divider.pilates { background: #0891b2; }
.class-item__divider.health { background: var(--red); }
.class-item__info { flex: 1; }
.class-item__name { font-size: 0.95rem; font-weight: 700; }
.class-item__meta { font-size: 0.78rem; color: var(--text-3); margin-top: 0.15rem; }
.class-item__right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.class-item__slots { font-size: 0.72rem; color: var(--text-3); }

/* ── 내 예약 탭 ── */
.booking-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.filter-btn {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-3);
  background: var(--surface);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
}
.filter-btn.is-active { background: var(--red); color: #fff; border-color: var(--red); }

.booking-list { display: flex; flex-direction: column; gap: 0.75rem; }
.booking-item {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.booking-item__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.booking-item__name { font-size: 0.95rem; font-weight: 700; }
.booking-item__meta { font-size: 0.8rem; color: var(--text-3); }
.booking-item__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; }
.booking-item.past { opacity: 0.65; }

/* ── 마이페이지 ── */
.my-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}
.my-avatar {
  width: 52px;
  height: 52px;
  background: var(--red);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.my-info__name { font-size: 1.05rem; font-weight: 800; }
.my-info__email { font-size: 0.82rem; color: var(--text-3); margin-top: 0.15rem; }

.my-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.membership-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.membership-card__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1rem; }
.membership-card__name { font-size: 1rem; font-weight: 800; }
.membership-card__type { font-size: 0.78rem; color: rgba(255,255,255,.6); margin-top: 0.2rem; }
.membership-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,.7);
  margin-bottom: 0.5rem;
}
.membership-card__row strong { color: #fff; font-weight: 700; }
.membership-card__progress {
  height: 4px;
  background: rgba(255,255,255,.2);
  border-radius: 2px;
  margin-top: 0.75rem;
  overflow: hidden;
}
.membership-card__progress-bar {
  height: 100%;
  background: var(--red);
  border-radius: 2px;
  transition: width 0.6s ease;
}
.membership-card__progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: rgba(255,255,255,.5);
  margin-top: 0.4rem;
}

.package-list { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1.5rem; }
.package-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.package-item__name { font-size: 0.9rem; font-weight: 700; }
.package-item__desc { font-size: 0.75rem; color: var(--text-3); margin-top: 0.1rem; }
.package-item__right { display: flex; align-items: center; gap: 0.75rem; }
.package-item__price { font-family: var(--font-num); font-size: 0.9rem; font-weight: 700; color: var(--red); }

.my-menu-list { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
.my-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  text-align: left;
}
.my-menu-item:last-child { border-bottom: none; }
.chevron { color: var(--text-4); font-size: 1.2rem; }

.demo-badge {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-4);
  padding: 1rem 0 2rem;
}

/* ── 모달 ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  align-items: flex-end;
}
.modal-overlay.is-open { display: flex; }
.modal-sheet {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1rem 1.5rem calc(1.5rem + var(--safe-bottom));
  animation: slideUp 0.25s ease;
}
.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-class-name { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.25rem; }
.modal-class-meta { font-size: 0.85rem; color: var(--text-3); margin-bottom: 1.25rem; }
.modal-info-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.modal-info-row:last-of-type { border-bottom: none; }
.modal-info-row span:first-child { color: var(--text-3); }
.modal-info-row span:last-child { font-weight: 600; }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; }

/* ── 유틸 ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-4);
}
.empty-state__icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state__text { font-size: 0.9rem; }
