/* 모바일 반응형 / 헤더 풀폭 / 뒤로가기 */
.header-leading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f3f5f9;
  color: #222;
  font-size: 20px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.header-back:active {
  background: #e8ebf2;
}

.share-button {
  width: 100%;
  justify-content: center;
  color: #3157ff !important;
  border: 1.5px solid #3157ff !important;
  background: #fff !important;
  font-weight: 800;
}

.share-button:hover {
  background: #f3f6ff !important;
}

.saju-summary {
  white-space: pre-line;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  body,
  button,
  input,
  select,
  textarea,
  a {
    font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }

  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .playground {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: calc(56px + env(safe-area-inset-top, 0px)) 0 48px !important;
  }

  .playground-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    margin: 0 !important;
    padding: env(safe-area-inset-top, 0px) 14px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #eee !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
    box-sizing: border-box;
  }

  .playground-header .primary-nav,
  .playground-header .header-actions {
    display: none !important;
  }

  .header-leading {
    width: 100%;
  }

  .brand {
    gap: 8px !important;
    min-width: 0;
  }

  .brand img {
    width: 84px !important;
    height: auto !important;
  }

  .brand strong {
    font-size: 11px !important;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .home-screen,
  .quiz-screen,
  .result-screen,
  .saju-screen {
    padding-right: 16px;
    padding-left: 16px;
  }

  .playground-hero {
    display: none !important;
  }

  .home-screen .intro {
    padding-top: 28px !important;
  }

  .intro {
    padding: 28px 0 22px;
  }

  .intro h1,
  .playground-hero h2,
  .game-card h2,
  .saju-panel h1,
  .quiz-panel h1,
  .result-card h1 {
    letter-spacing: -0.03em;
    line-height: 1.35;
    word-break: keep-all;
    overflow-wrap: anywhere;
  }

  .intro h1 {
    font-size: clamp(22px, 6.2vw, 28px) !important;
  }

  .game-card h2 {
    font-size: clamp(17px, 4.8vw, 20px) !important;
  }

  .game-card p,
  .saju-lead,
  .saju-summary,
  .notice {
    font-size: clamp(13px, 3.6vw, 15px) !important;
    line-height: 1.65 !important;
  }

  .saju-panel {
    margin-top: 12px;
  }

  .saju-panel h1 {
    font-size: clamp(22px, 6vw, 28px) !important;
  }

  .saju-summary {
    max-width: none;
    font-size: clamp(14px, 3.8vw, 15px) !important;
  }

  .primary-button,
  .secondary-button {
    min-height: 48px;
    font-size: 15px !important;
    letter-spacing: -0.02em;
  }

  .result-actions {
    grid-template-columns: 1fr !important;
  }

  .hero-copy h2 {
    font-size: clamp(24px, 7vw, 30px) !important;
  }
}

/* PC에서도 운세 결과 액션은 세로 정렬 */
.saju-result-panel .result-actions {
  grid-template-columns: 1fr;
}
