/*
 * 마인스타그램 공개 페이지 공통 스타일.
 *
 * 페이지마다 CSS 를 복사해 두면 색과 여백이 조금씩 갈라진다. 실제로 그랬다.
 * 색은 전부 토큰으로 두고, 다크 모드는 토큰만 다시 정의한다.
 */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-subtle: #fafafa;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-muted: #6b6b70;
  --border: #e3e3e6;
  --accent: #c13584;
  --accent-text: #ffffff;
  --accent-soft: #fdf2f8;
  --warn-bg: #fff8e6;
  --warn-border: #f0c96b;
  --warn-text: #6b4e00;

  /* 브랜드 상수. 앱 아이콘 배경과 같은 값이라 테마별로 바뀌지 않는다. */
  --brand-surface: #101014;
  /* 짙은 브랜드 면의 테두리. 라이트에서는 필요 없고, 다크에서 검은 배경과 구분해 준다. */
  --glyph-edge: transparent;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-subtle: #0d0d0f;
    --surface: #121214;
    --text: #f2f2f4;
    --text-muted: #9a9aa0;
    --border: #2a2a2e;
    --accent: #e879b9;
    --accent-text: #1c1c1e;
    --accent-soft: #1e1119;
    --warn-bg: #241d08;
    --warn-border: #5c4a12;
    --warn-text: #f0d68a;
    --glyph-edge: #2a2a2e;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 96px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* ---- 타이포그래피 ---- */

h1 {
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1rem;
  margin: 28px 0 8px;
  color: var(--text);
}

p { margin: 0 0 12px; }

.lead {
  color: var(--text-muted);
  margin: 0 0 32px;
  font-size: 1rem;
}

ul, ol { padding-left: 22px; margin: 0 0 12px; }
li { margin: 6px 0; }
li > ul, li > ol { margin-top: 6px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

code {
  background: color-mix(in srgb, var(--text) 10%, transparent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---- 구성 요소 ---- */

/* Play 스토어 피처 그래픽과 같은 구성의 히어로.
   배경이 브랜드 색으로 고정이라 안쪽 색은 테마를 따르지 않는다. 대신 짙은 면이 다크 모드의
   검은 배경에 묻히지 않게 테두리만 토큰(--glyph-edge)을 쓴다. */
.store-hero {
  background: var(--brand-surface);
  border: 1px solid var(--glyph-edge);
  border-radius: var(--radius);
  padding: 58px 28px 62px;
  margin: 0 0 36px;
  text-align: center;
}

/* 아래 크기는 1024×500 피처 그래픽을 이 단(760px)에 비례시킨 값이다.
   최소값은 좁은 화면에서 문구가 읽히는 선으로 따로 잡았다. */
.store-hero-glyph {
  display: block;
  width: clamp(76px, 14vw, 108px);
  height: clamp(76px, 14vw, 108px);
  margin: 0 auto 24px;
}

.store-hero h1 {
  color: #ffffff;
  font-size: clamp(2.1rem, 8vw, 3.35rem);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.store-hero-tagline {
  color: #d8d8de;
  font-weight: 600;
  font-size: clamp(1.05rem, 4vw, 1.55rem);
  line-height: 1.5;
  margin: 0 0 12px;
}

.store-hero-origin {
  color: #9a9aa2;
  font-size: clamp(0.9rem, 2.9vw, 1.2rem);
  line-height: 1.5;
  margin: 0;
}

/* "Mine" 네 글자 안에서 스펙트럼이 다 지나가게 스탑을 압축한다.
   (앱의 BrandMark.kt, store/masters/feature_graphic.svg 와 같은 값) */
.brand-mine {
  background: linear-gradient(100deg, #833AB4 0%, #E1306C 18%, #F9A03F 36%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}

.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

/* 사용자가 반드시 읽어야 하는 제약. 프로페셔널 계정 요구사항 같은 것. */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0;
}

.notice > :first-child { margin-top: 0; }
.notice > :last-child { margin-bottom: 0; }
.notice a { color: inherit; text-decoration: underline; }

.hero {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  margin: 0 0 32px;
}

.hero > :first-child { margin-top: 0; }
.hero > :last-child { margin-bottom: 0; }

.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin: 16px 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.table-wrap { overflow-x: auto; margin: 20px 0; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 0.94rem;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.86rem;
  white-space: nowrap;
}

.button {
  display: inline-block;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-decoration: none;
}

.button:hover { text-decoration: none; opacity: 0.9; }

.effective-date {
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.86rem;
}

footer a { color: var(--text-muted); }

/* 화면 전체를 쓰는 상태 페이지(로그인 처리 중 등) */
body.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background: var(--bg-subtle);
  padding: 24px;
}

body.centered .lead { margin-bottom: 20px; }
