/* 상생 정책 페이지 셸(shell) 스타일
   - 로딩/에러 등 페이지 골격만 담당한다.
   - 실제 본문은 iframe 내부에서 렌더링되며 자체 스타일을 가진다. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --fg: #e6e6e6;
    --muted: #9ca3af;
    --accent: #7aa7ff;
    --border: #2a2a2a;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Pretendard", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  /* 노치/홈 인디케이터 영역 대응 */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.content {
  display: block;
  min-height: 100vh;
}

/* 본문 iframe: 경계 없이 페이지에 녹아들도록, 높이는 JS가 콘텐츠에 맞춰 설정 */
.frame {
  display: block;
  width: 100%;
  border: 0;
  margin: 0;
}

/* 로딩 / 에러 공통 상태 박스 */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 70vh;
  padding: 32px 24px;
  text-align: center;
}

.state p {
  margin: 0;
}

.state--loading p {
  color: var(--muted);
  font-size: 15px;
}

/* 스피너 */
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
}

/* 에러 화면 */
.error-title {
  font-size: 17px;
  font-weight: 600;
}

.error-desc {
  color: var(--muted);
  font-size: 14px;
  word-break: keep-all;
}

.retry-btn {
  appearance: none;
  margin-top: 4px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.retry-btn:active {
  opacity: 0.85;
}

[hidden] {
  display: none !important;
}
