/* ══ 나비효과 에스테틱 — 쇼츠 피드 ══ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overscroll-behavior: none; }
body {
  background: #0b0b0f; color: #fff;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ── 상단 로고 ── */
.top-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 10px;
  background: linear-gradient(to bottom, rgba(0,0,0,.55), transparent);
  pointer-events: none;
}
.brand {
  pointer-events: auto;
  font-size: 17px; font-weight: 700; letter-spacing: -.2px;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  display: inline-flex; align-items: center; gap: 8px;
}
.brand img { width: 32px; height: 32px; border-radius: 50%; display: block;
  box-shadow: 0 1px 4px rgba(0,0,0,.4); background: #fff; }
.sheet-logo { width: 64px; height: 64px; border-radius: 50%; display: block; margin-bottom: 10px; }

/* ── 피드 ── */
.feed {
  height: 100vh; height: 100dvh; width: 100vw;
  overflow-y: scroll; scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
.feed::-webkit-scrollbar { display: none; }

.card {
  position: relative; height: 100vh; height: 100dvh; width: 100%;
  scroll-snap-align: start; scroll-snap-stop: always;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: #0b0b0f;
}

/* 플레이어 스테이지: 쇼츠 = 세로 꽉 채움 */
.stage { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.card[data-type="shorts"] .player-box {
  position: absolute; top: 50%; left: 50%;
  /* 9:16 영상이 화면을 덮도록 (cover) */
  width: max(100vw, calc(100vh * 9 / 16));
  width: max(100vw, calc(100dvh * 9 / 16));
  height: max(100vh, calc(100vw * 16 / 9));
  height: max(100dvh, calc(100vw * 16 / 9));
  transform: translate(-50%, -50%);
}
/* PC: 쇼츠는 중앙 9:16 기둥 */
@media (min-width: 768px) and (orientation: landscape) {
  .card[data-type="shorts"] .player-box {
    width: calc(100vh * 9 / 16); width: calc(100dvh * 9 / 16);
    height: 100vh; height: 100dvh;
  }
}

/* 롱폼: 기본(가로 화면/PC) 뷰포트 안 최대 16:9 */
.card[data-type="long"] .player-box {
  width: min(100vw, calc(100vh * 16 / 9));
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  height: min(100dvh, calc(100vw * 9 / 16));
}
/* 롱폼 + 모바일 세로: 90° 회전해 화면 전체 사용 */
@media (orientation: portrait) {
  .card[data-type="long"] .player-box {
    width: 100vh; width: 100dvh; height: 100vw;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    transform-origin: center center;
  }
  .card[data-type="long"] .rotate-hint { display: flex; }
}
.rotate-hint {
  display: none; position: absolute; top: calc(env(safe-area-inset-top, 0px) + 54px); right: 14px; z-index: 5;
  align-items: center; gap: 6px; font-size: 12px; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.45); border-radius: 20px; padding: 6px 12px;
  pointer-events: none; animation: fadeout 5s forwards;
}
@keyframes fadeout { 0%,70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }

.player-box iframe, .player-box .yt-holder { width: 100%; height: 100%; border: 0; }

/* 썸네일 플레이스홀더 */
.thumb-ph {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(.75); display: flex; align-items: center; justify-content: center;
}
.thumb-ph::after { content: '▶'; font-size: 44px; opacity: .85; text-shadow: 0 2px 10px rgba(0,0,0,.6); }

/* 탭 영역 (재생/일시정지) */
.tap-layer { position: absolute; inset: 0; z-index: 2; }
.pause-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 56px; opacity: 0; pointer-events: none; transition: opacity .15s;
  text-shadow: 0 2px 14px rgba(0,0,0,.7); z-index: 3;
}
.card.paused .pause-badge { opacity: .9; }

/* ── 우측 버튼열 ── */
.rail {
  position: absolute; right: 8px; bottom: 120px; z-index: 10;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 26px; line-height: 1;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.55));
  transition: transform .12s;
}
.rail-btn:active { transform: scale(1.25); }
.rail-btn small { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.92); }
.rail-btn.liked { color: #ff4d6d; }

/* ── 하단 정보 ── */
.info {
  position: absolute; left: 14px; right: 70px; bottom: 108px; z-index: 10;
  text-shadow: 0 1px 4px rgba(0,0,0,.65);
}
.info .badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; color: #d9f4f0;
  background: rgba(0,0,0,.35); padding: 4px 10px 4px 5px; border-radius: 14px; margin-bottom: 8px;
}
.info .badge img { width: 20px; height: 20px; border-radius: 50%; display: block; }
.info h2 { font-size: 15px; font-weight: 600; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.info .tags { margin-top: 5px; font-size: 13px; color: rgba(255,255,255,.8); }

/* ── 고정 CTA 바 ── */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; gap: 8px;
  padding: 10px 12px calc(env(safe-area-inset-bottom, 0px) + 10px);
  background: linear-gradient(to top, rgba(8,8,12,.92), rgba(8,8,12,.55) 75%, transparent);
}
.cta-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; border-radius: 24px; font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,.14); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
}
.cta-primary { background: linear-gradient(135deg, #59C2B7, #3AA192); border: 0; }

/* ── 소리 안내 ── */
.sound-hint {
  position: fixed; top: calc(env(safe-area-inset-top, 0px) + 56px); left: 50%; transform: translateX(-50%);
  z-index: 40; background: rgba(0,0,0,.65); border-radius: 22px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; animation: hintpulse 1.6s infinite;
}
@keyframes hintpulse { 50% { transform: translateX(-50%) scale(1.05); } }

/* ── 바텀시트 ── */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5);
  opacity: 0; transition: opacity .25s;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-height: 78vh; max-height: 78dvh; overflow-y: auto;
  background: #17171e; border-radius: 20px 20px 0 0;
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 24px);
  transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.25,1);
  overscroll-behavior: contain;
}
.sheet.show { transform: translateY(0); }
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.25); margin: 6px auto 14px; }
.sheet h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.sheet-sub { color: #59C2B7; font-size: 14px; margin-bottom: 14px; }
.sheet-body { font-size: 15px; line-height: 1.65; color: rgba(255,255,255,.88); }
.sheet-body p { margin-bottom: 10px; }
@media (min-width: 768px) { .sheet { max-width: 560px; left: 50%; right: auto; transform: translate(-50%, 100%); } .sheet.show { transform: translate(-50%, 0); } }

.about-director { margin: 16px 0; padding: 14px 16px; background: rgba(89,194,183,.1); border-radius: 12px; }
.about-director strong { color: #7fd6cb; }
.about-director p { margin: 4px 0 0; font-size: 14px; }
.about-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.about-links a { font-size: 13px; font-weight: 600; background: rgba(255,255,255,.1); padding: 8px 14px; border-radius: 18px; }
.sheet-menu { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sheet-menu button { text-align: left; padding: 13px 16px; background: rgba(255,255,255,.06); border-radius: 12px; font-weight: 600; }

.program-card { padding: 16px; background: rgba(255,255,255,.05); border-radius: 14px; margin-bottom: 12px; }
.program-card h3 { font-size: 16px; color: #7fd6cb; margin-bottom: 6px; }
.program-price { font-weight: 700; color: #e8b35f; }

.sheet-cta {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px; margin-top: 10px; border-radius: 24px;
  background: linear-gradient(135deg, #59C2B7, #3AA192);
  font-size: 15px; font-weight: 700;
}
.sheet-cta.ghost { background: rgba(255,255,255,.1); }

.loc-address, .loc-hours, .loc-subway { font-size: 15px; margin-bottom: 10px; }

.contact-quick { display: flex; gap: 8px; margin-bottom: 18px; }
.quick-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  height: 46px; border-radius: 12px; background: rgba(255,255,255,.08); font-size: 14px; font-weight: 700; }
.form-title { font-weight: 700; margin-bottom: 10px; }
.inquiry-form input, .inquiry-form textarea {
  width: 100%; margin-bottom: 10px; padding: 13px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06);
  color: #fff; font: inherit; font-size: 15px;
}
.inquiry-form input::placeholder, .inquiry-form textarea::placeholder { color: rgba(255,255,255,.4); }
.inquiry-form button {
  width: 100%; height: 48px; border-radius: 24px;
  background: linear-gradient(135deg, #59C2B7, #3AA192); font-weight: 700; font-size: 15px;
}
.hp-field { position: absolute !important; left: -9999px !important; height: 0 !important; opacity: 0; }
.form-result { margin-top: 10px; font-size: 14px; text-align: center; color: #9be29b; }
.form-result.err { color: #ff8d8d; }

.blog-item { display: flex; justify-content: space-between; gap: 12px; padding: 13px 4px;
  border-bottom: 1px solid rgba(255,255,255,.08); }
.blog-title { font-size: 14px; line-height: 1.4; }
.blog-date { font-size: 12px; color: rgba(255,255,255,.45); white-space: nowrap; }

/* 빈 피드 안내 */
.feed-empty {
  height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 24px;
  color: rgba(255,255,255,.7); font-size: 15px;
}

.noscript-info { padding: 80px 24px; text-align: center; }
.noscript-info h1 { margin-bottom: 12px; }
.noscript-info a { text-decoration: underline; }
