/* GymPick 웹 폴백 페이지 — 앱과 동일한 톤(미니멀, 흰 배경, 정보 중심, 모바일 기준)
   브랜드 컬러: #0A0A0A(블랙) + #C6FF00(라임그린) */

:root {
  --ink: #0a0a0a;
  --ink-sub: #6b6b6b;
  --line: #e7e7e7;
  --lime: #c6ff00;
  --bg: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo',
    'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

#root {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 120px;
  min-height: 100vh;
}

/* ── 헤더 ───────────────────────────────────────────── */

.gym-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}

.wordmark-logo {
  display: block;
  height: 14px;
  width: auto;
  margin: 0 0 14px;
}

/* GYMPICK 로고 + 안내 문구를 한 줄에 배치 */
.brand-line {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
}

.brand-line .wordmark-logo {
  margin: 0;
}

.brand-line-text {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-sub);
  white-space: nowrap;
}

.gym-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.3;
}

.gym-location {
  font-size: 13px;
  color: var(--ink-sub);
  margin: 0;
}

.gym-total-row {
  margin-top: 10px;
}

.gym-total {
  font-size: 13px;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 600;
}

.gym-disclaimer {
  font-size: 11px;
  color: var(--ink-sub);
  margin: 10px 0 0;
}

.brand-logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.brand-logo-chip {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.brand-logo-chip img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

/* 하단 고정 앱스토어 연결 바 — 항상 화면 하단에 표시되어, 콘텐츠를 끝까지
   스크롤해도 그 아래로 더 스크롤되지 않고 버튼이 그 자리에 고정되어 보인다. */
#store-cta-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  background: linear-gradient(to top, var(--bg) 60%, rgba(255, 255, 255, 0));
  padding: 20px 20px calc(16px + env(safe-area-inset-bottom));
}

.store-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  max-width: 440px;
  padding: 17px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.store-cta-logo {
  display: block;
  height: 15px;
  width: auto;
}

/* ── 부위별 바로가기 버튼 ───────────────────────────────── */
/* 부위 섹션들 바로 위에 위치, 가로로 스크롤 가능한 한 줄의 알약형 버튼.
   탭하면 app.js에서 해당 부위 섹션(#muscle-section-*)으로 스무스 스크롤. */

.muscle-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 22px;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.muscle-filter-row::-webkit-scrollbar {
  display: none;
}

.muscle-filter-btn {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.muscle-filter-btn:active {
  background: #f0f0f0;
}

/* ── 부위 섹션 ──────────────────────────────────────── */

.muscle-section {
  margin-bottom: 28px;
}

.muscle-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px;
}

.muscle-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-sub);
}

.machine-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.machine-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.machine-card:active {
  background: #fafafa;
}

.machine-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.machine-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 8px;
  background: #f4f4f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.machine-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.machine-thumb--empty {
  background: #f4f4f4;
}

.machine-info {
  min-width: 0;
  flex: 1;
}

.machine-name {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.machine-brand-row {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 6px;
}

.machine-brand-logo {
  width: 14px;
  height: 14px;
  object-fit: contain;
  flex: none;
}

.machine-brand {
  font-size: 12px;
  color: var(--ink-sub);
  margin: 0;
}

.machine-brand-row--clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin: 0 -4px 6px;
  padding: 2px 4px;
  border-radius: 6px;
  width: fit-content;
}

.machine-brand-row--clickable:active {
  background: #f0f0f0;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--lime);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 999px;
}

/* ── 상태 화면 (로딩/에러/빈 상태) ─────────────────────── */

.state {
  padding: 80px 12px;
  text-align: center;
  color: var(--ink-sub);
}

.state-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 6px;
}

.state-sub {
  font-size: 13px;
  margin: 0;
}

.spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── 푸터 ───────────────────────────────────────────── */

.page-footer {
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.page-footer p {
  font-size: 11px;
  color: var(--ink-sub);
  margin: 0;
}

/* ── 머신 상세보기 유도 모달 (바텀시트) ─────────────────── */

.app-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  background: rgba(10, 10, 10, 0.5);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-modal-overlay[hidden] {
  display: none;
}

.app-modal-overlay--open {
  opacity: 1;
}

.app-modal-sheet {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 34px 24px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.app-modal-overlay--open .app-modal-sheet {
  transform: translateY(0);
}

.app-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-sub);
  cursor: pointer;
}

.app-modal-machine-row {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin: 0 0 22px;
}

.app-modal-machine-thumb {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 12px;
  background: #f4f4f4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-modal-machine-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-modal-machine-thumb--empty {
  background: #f4f4f4;
}

.app-modal-machine-info {
  flex: 1;
  min-width: 0;
}

.app-modal-machine {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.app-modal-machine-brand-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.app-modal-machine-brand-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex: none;
}

.app-modal-machine-brand {
  font-size: 13px;
  color: var(--ink-sub);
  margin: 0;
}

.app-modal-desc {
  font-size: 13px;
  color: var(--ink-sub);
  line-height: 1.5;
  margin: 0 0 24px;
}

.app-modal-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.app-modal-cta-logo {
  display: block;
  height: 15px;
  width: auto;
}

/* ── 머신 상세보기 화면 ─────────────────────────────────── */

.detail-screen {
  position: relative;
  padding-top: 46px;
}

.detail-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--ink-sub);
  cursor: pointer;
}

.detail-close:active {
  color: var(--ink);
}

.detail-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 320px;
  border-radius: 16px;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 20px;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-thumb--empty {
  background: #f4f4f4;
}

.detail-name {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.detail-brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
}

.detail-brand-row--clickable {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  margin: 0 -4px 16px;
  padding: 2px 4px;
  border-radius: 8px;
  width: fit-content;
}

.detail-brand-row--clickable:active {
  background: #f0f0f0;
}

.detail-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex: none;
}

.detail-brand {
  font-size: 13px;
  color: var(--ink-sub);
  font-weight: 500;
}

.detail-screen .badge-row {
  margin-bottom: 28px;
}

/* 잠금(paywall) 섹션 — 실제 콘텐츠 없이 블러 처리된 자리표시자 위에
   자물쇠 아이콘과 안내문구, "앱에서 확인하기" 버튼을 올려 보여준다. */

.locked-section {
  margin-bottom: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.locked-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 10px;
}

.locked-body {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  padding: 20px;
  min-height: 120px;
}

.locked-blur {
  display: flex;
  flex-direction: column;
  gap: 10px;
  filter: blur(6px);
  opacity: 0.6;
}

.locked-blur-line {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: #e7e7e7;
  width: 100%;
}

.locked-blur-line--short {
  width: 60%;
}

.locked-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  gap: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.locked-icon {
  font-size: 20px;
}

.locked-desc {
  font-size: 12px;
  color: var(--ink-sub);
  line-height: 1.5;
  margin: 0;
}

/* ── 제조사(브랜드) 머신 목록 잠금 화면 ─────────────────── */
/* 헤더의 브랜드 로고 칩, 머신 카드의 브랜드명을 탭하면 이동하는 화면.
   전체 화면을 블러 처리하고 중앙에 잠금 안내를 띄운다. */

.brand-screen {
  position: relative;
  padding-top: 46px;
  min-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.brand-screen-body {
  position: relative;
  flex: 1;
  min-height: 420px;
  border-radius: 16px;
  overflow: hidden;
}

.brand-blur {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 4px;
  filter: blur(10px);
  opacity: 0.55;
}

.brand-blur-card {
  display: block;
  border-radius: 14px;
  background: #ebebeb;
  aspect-ratio: 3 / 4;
}

.brand-screen-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
}

.brand-screen-logo-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-screen-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.brand-screen-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
  max-width: 260px;
}

/* ── 헬스장 보유 머신 목록 화면: 스크롤 최하단 잠금 ────────────── */
/* 목록을 끝까지 스크롤해서 다 확인한 시점에 전체 화면을 덮는 오버레이가
   나타나 앱 다운로드를 유도한다. 목록 콘텐츠 자체는 계속 완전히 공개. */

.list-scroll-sentinel {
  height: 1px;
  width: 100%;
}

.scroll-lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.scroll-lock-overlay[hidden] {
  display: none;
}

.scroll-lock-overlay--open {
  opacity: 1;
}

.scroll-lock-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.scroll-lock-icon {
  font-size: 28px;
}

.scroll-lock-desc {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.6;
  margin: 0;
}

.scroll-lock-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.scroll-lock-cta-logo {
  display: block;
  height: 15px;
  width: auto;
}

.scroll-lock-back {
  background: none;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-sub);
  padding: 4px 8px;
  cursor: pointer;
}
