/* ============================================================
   CoreMemo Theme — Apple Design System 적용
   ============================================================ */

/* ── 폰트 ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700&display=swap');

/* ── CSS 변수 ── */
:root {
  /* Apple Color System */
  --apple-blue:       #0071e3;
  --apple-blue-dark:  #0077ed;
  --apple-blue-link:  #0066cc;
  --apple-blue-dark-bg: #2997ff;
  --apple-black:      #000000;
  --apple-near-black: #1d1d1f;
  --apple-gray:       #f5f5f7;
  --apple-white:      #ffffff;
  --apple-text-80:    rgba(0,0,0,0.80);
  --apple-text-48:    rgba(0,0,0,0.48);
  --apple-dark-surf:  #272729;

  /* Shadow */
  --apple-shadow:     rgba(0,0,0,0.22) 3px 5px 30px 0px;

  /* Legacy vars (내부 컴포넌트 호환) */
  --primary:      #0071e3;
  --primary-dark: #0077ed;
  --primary-light:#e8f0fb;
  --bg:           #f5f5f7;
  --surface:      #ffffff;
  --border:       #d2d2d7;
  --border-light: #e8e8ed;
  --text:         #1d1d1f;
  --text-2:       rgba(0,0,0,0.80);
  --muted:        rgba(0,0,0,0.48);
  --danger:       #ef4444;
  --success:      #34c759;
  --radius:       8px;
  --radius-lg:    12px;
  --shadow:       rgba(0,0,0,0.22) 3px 5px 30px 0px;
}

/* ── 기본 리셋 ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont,
               'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  color: var(--apple-near-black);
  background: var(--apple-white);
  line-height: 1.47;
  letter-spacing: -0.374px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--apple-blue-link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* ── 레이아웃 헬퍼 ── */
.inner { max-width: 980px; margin: 0 auto; padding: 0 24px; }
.sound_only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ════════════════════════════════════════
   상단 헤더 — Apple Glass Nav
   ════════════════════════════════════════ */
#hd {
  background: rgba(0,0,0,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  position: sticky;
  top: 0;
  z-index: 200;
  height: 48px;
}
.hd-inner {
  max-width: 1020px;
  margin: 0 auto;
  padding: 0 22px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0;
}

/* 로고 */
#logo { flex-shrink: 0; margin-right: 20px; }
#logo a {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
  letter-spacing: -0.3px;
}
.logo-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-text { color: #ffffff; }

/* 검색 숨김 */
.hd_sch_wr { display: none; }

/* GNB */
#gnb { flex: 1; }
#gnb_1dul {
  display: flex;
  list-style: none;
  gap: 0;
  padding: 0;
  margin: 0;
}
.gnb_1dli { position: relative; }
.gnb_1da {
  display: block;
  padding: 0 12px;
  height: 48px;
  line-height: 48px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s;
}
.gnb_1da:hover { color: #ffffff; text-decoration: none; }
.gnb_empty { color: rgba(255,255,255,0.4); font-size: .8rem; padding: 0 12px; line-height: 48px; }

/* 서브메뉴 */
.gnb_2dul {
  display: none;
  position: absolute;
  top: 48px;
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: rgba(29,29,31,0.95);
  backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  padding: 8px;
  z-index: 300;
}
.gnb_1dli.has-sub:hover .gnb_2dul,
.gnb_1dli:hover .gnb_2dul { display: block; }
.gnb_2dli a {
  display: block;
  padding: 9px 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  border-radius: 7px;
  transition: background 0.12s;
}
.gnb_2dli a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.gnb_2dul .bg, #gnb_all, #gnb_all_bg, #tnb { display: none; }

/* 헤더 액션 */
.hd-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
}
.hd-member-name {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  margin-right: 4px;
}
.sub-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.sub-badge.pro  { background: var(--apple-blue); color: #fff; }
.sub-badge.free { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }

.btn-hd {
  padding: 5px 12px;
  border-radius: 980px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  background: transparent;
  border: none;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.btn-hd:hover { color: #ffffff; text-decoration: none; }
.btn-hd.btn-primary {
  background: var(--apple-blue) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
}
.btn-hd.btn-primary:hover { opacity: 0.88; text-decoration: none; }
.btn-hd.btn-admin { color: #ff9f0a; }

.hd-mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: rgba(255,255,255,0.85);
  padding: 4px 8px;
}

/* ════════════════════════════════════════
   콘텐츠 래퍼
   ════════════════════════════════════════ */
hr { display: none; }
#wrapper {
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  overflow-x: clip;
}
#container_wr { display: flex; }
#container { flex: 1; min-width: 0; }
#aside { display: none; }

#container_title {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--apple-near-black);
  letter-spacing: -0.4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 24px;
}

/* 일반 내부 페이지 콘텐츠 여백 */
body:not(.is-home) #container > *:not(.cm-hero):not(.cm-features):not(.cm-pricing-preview):not(.cm-notices):not(.cm-download) {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* ════════════════════════════════════════
   홈페이지 섹션 공통
   ════════════════════════════════════════ */
.cm-hero,
.cm-features,
.cm-pricing-preview,
.cm-notices,
.cm-download {
  width: 100%;
}
.cm-section-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}
.cm-section-title {
  font-size: 40px;
  font-weight: 600;
  color: inherit;
  line-height: 1.10;
  letter-spacing: -0.5px;
  text-align: center;
  margin-bottom: 12px;
}
.cm-section-sub {
  font-size: 17px;
  color: rgba(0,0,0,0.56);
  text-align: center;
  margin-bottom: 56px;
  font-weight: 400;
}

/* ── Hero ── */
.cm-hero {
  background: #000000;
  color: #ffffff;
  padding: 0;
}
.cm-hero-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 100px 24px 90px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.cm-hero-title {
  font-size: 56px;
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -0.28px;
  margin-bottom: 16px;
  color: #ffffff;
}
.cm-hero-accent {
  color: #2997ff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  background-clip: unset;
}
.cm-hero-desc {
  font-size: 21px;
  line-height: 1.47;
  color: rgba(255,255,255,0.72);
  margin-bottom: 36px;
  font-weight: 400;
  letter-spacing: normal;
}
.cm-hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.btn-hero-primary {
  background: var(--apple-blue);
  color: #ffffff;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-hero-primary:hover { opacity: 0.88; color: #fff; text-decoration: none; }
.btn-hero-secondary {
  color: #2997ff;
  font-size: 17px;
  font-weight: 400;
  text-decoration: none;
  border: 1px solid rgba(41,151,255,0.5);
  padding: 7px 17px;
  border-radius: 980px;
  transition: border-color 0.15s;
}
.btn-hero-secondary:hover { border-color: #2997ff; text-decoration: none; }
.cm-hero-note {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 18px;
  letter-spacing: 0;
}

/* Mock Window */
.cm-hero-image { display: flex; justify-content: center; }
.cm-mock-window {
  background: #1c1c1e;
  border-radius: 12px;
  overflow: hidden;
  width: 100%;
  max-width: 400px;
  box-shadow: rgba(0,0,0,0.22) 3px 5px 30px 0px;
}
.cm-mock-titlebar {
  background: #2c2c2e;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cm-mock-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.cm-mock-title { font-size: 13px; color: rgba(255,255,255,0.6); margin-left: 10px; }
.cm-mock-body {
  padding: 20px 22px;
  color: #ffffff;
  font-size: 15px;
  line-height: 2;
}

/* ── Features ── */
.cm-features {
  background: #f5f5f7;
  padding: 100px 0;
}
.cm-features .cm-section-title { color: var(--apple-near-black); }
.cm-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.cm-feature-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: rgba(0,0,0,0.06) 0 2px 12px;
}
.cm-feature-icon { font-size: 2rem; margin-bottom: 14px; }
.cm-feature-card h3 {
  font-size: 21px;
  font-weight: 600;
  color: var(--apple-near-black);
  margin-bottom: 10px;
  letter-spacing: 0.231px;
  line-height: 1.19;
}
.cm-feature-card p { font-size: 14px; color: rgba(0,0,0,0.56); line-height: 1.57; letter-spacing: -0.224px; }

/* ── Pricing ── */
.cm-pricing-preview {
  background: #000000;
  padding: 100px 0;
  color: #ffffff;
}
.cm-pricing-preview .cm-section-title { color: #ffffff; }
.cm-pricing-preview .cm-section-sub   { color: rgba(255,255,255,0.56); }
.cm-plans-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 680px;
  margin: 0 auto;
}
.cm-plan-preview {
  background: #1c1c1e;
  border-radius: 12px;
  padding: 36px 32px;
  position: relative;
}
.cm-plan-preview.featured { border: 1px solid rgba(0,113,227,0.5); }
.cm-plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--apple-blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 980px;
  white-space: nowrap;
}
.cm-plan-preview h3 {
  font-size: 28px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: 0.196px;
  line-height: 1.14;
}
.cm-plan-price { margin-bottom: 24px; }
.cm-price-amount { font-size: 40px; font-weight: 600; color: #ffffff; line-height: 1.1; letter-spacing: -0.5px; }
.cm-price-period { font-size: 17px; color: rgba(255,255,255,0.48); }
.cm-plan-preview ul { list-style: none; padding: 0; margin-bottom: 28px; }
.cm-plan-preview li { font-size: 14px; color: rgba(255,255,255,0.72); padding: 5px 0; letter-spacing: -0.224px; }
.btn-plan {
  display: block;
  text-align: center;
  padding: 8px 15px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 400;
  border: 1px solid rgba(255,255,255,0.25);
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s;
}
.btn-plan:hover { opacity: 0.8; text-decoration: none; color: #fff; }
.btn-plan-primary {
  background: var(--apple-blue) !important;
  border-color: var(--apple-blue) !important;
  color: #ffffff !important;
}

/* ── Notices ── */
.cm-notices {
  background: #f5f5f7;
  padding: 80px 0;
}
.cm-notices .cm-section-title { color: var(--apple-near-black); }
.cm-notices-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.cm-notices-header .cm-section-title { margin-bottom: 0; text-align: left; }
.cm-more-link {
  font-size: 14px;
  color: var(--apple-blue-link);
  text-decoration: none;
  letter-spacing: -0.224px;
}
.cm-more-link:hover { text-decoration: underline; }

/* ── Download CTA ── */
.cm-download {
  background: #000000;
  padding: 100px 0;
  text-align: center;
  color: #ffffff;
}
.cm-download h2 {
  font-size: 40px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  line-height: 1.10;
}
.cm-download p {
  font-size: 17px;
  color: rgba(255,255,255,0.56);
  margin-bottom: 36px;
}
.cm-download .btn-hero-primary { font-size: 18px; padding: 10px 22px; }

/* ════════════════════════════════════════
   Latest 스킨 (공지사항 목록)
   ════════════════════════════════════════ */
.cm-latest-list { list-style: none; padding: 0; }
.cm-latest-list li {
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cm-latest-list li:last-child { border-bottom: none; }
.cm-latest-list a {
  font-size: 15px;
  color: var(--apple-near-black);
  text-decoration: none;
  flex: 1;
  font-weight: 400;
}
.cm-latest-list a:hover { color: var(--apple-blue-link); text-decoration: none; }
.cm-latest-date { font-size: 12px; color: var(--apple-text-48); flex-shrink: 0; letter-spacing: 0; }

/* ════════════════════════════════════════
   하단 푸터
   ════════════════════════════════════════ */
#ft {
  background: #000000;
  color: rgba(255,255,255,0.56);
  padding: 60px 0 40px;
  position: relative;
}
.ft-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.ft-brand {}
.ft-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}
.ft-logo .logo-icon { display: flex; align-items: center; }
.ft-logo .logo-text { color: #ffffff; }
.ft-tagline { font-size: 13px; color: rgba(255,255,255,0.4); margin-bottom: 20px; letter-spacing: -0.12px; }
.ft-download a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: background 0.15s;
}
.ft-download a:hover { background: rgba(255,255,255,0.18); text-decoration: none; }
.ft-link-group h4 {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  letter-spacing: 0;
}
.ft-link-group ul { list-style: none; padding: 0; }
.ft-link-group li { margin-bottom: 10px; }
.ft-link-group a {
  font-size: 13px;
  color: rgba(255,255,255,0.48);
  text-decoration: none;
  transition: color 0.15s;
  letter-spacing: -0.12px;
}
.ft-link-group a:hover { color: #ffffff; text-decoration: none; }

.ft-bottom {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.ft-copy {
  font-size: 12px;
  color: rgba(255,255,255,0.28);
  margin-bottom: 6px;
  letter-spacing: -0.12px;
}
.ft-company-info { font-size: 11px; color: rgba(255,255,255,0.2); letter-spacing: -0.08px; }

#top_btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(29,29,31,0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 0.85rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.2s;
}
#top_btn.visible { display: flex; }
#top_btn:hover { opacity: 0.8; }

/* ════════════════════════════════════════
   내부 게시판·폼 공통
   ════════════════════════════════════════ */
.inner-page-wrap {
  max-width: 860px;
  margin: 48px auto;
  padding: 0 24px;
}

/* 게시판 목록 */
.bo_list table, .wr_list table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.bo_list th, .wr_list th {
  background: #f5f5f7;
  color: var(--apple-near-black);
  font-weight: 600;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
  font-size: 12px;
}
.bo_list td, .wr_list td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  color: rgba(0,0,0,0.72);
}
.bo_list tr:hover td, .wr_list tr:hover td { background: #f5f5f7; }

/* 버튼 공통 */
.btn_submit, .btn-primary-apple, input[type=submit], button[type=submit] {
  background: var(--apple-blue);
  color: #ffffff;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity 0.15s;
  font-family: inherit;
}
.btn_submit:hover, input[type=submit]:hover, button[type=submit]:hover { opacity: 0.88; }
.btn_cancel, .btn-outline-apple {
  background: transparent;
  color: var(--apple-blue-link);
  padding: 7px 17px;
  border: 1px solid var(--apple-blue-link);
  border-radius: 980px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
  font-family: inherit;
}
.btn_cancel:hover, .btn-outline-apple:hover { opacity: 0.8; text-decoration: none; }

/* 폼 인풋 */
.frm_input, input[type=text], input[type=email], input[type=password],
input[type=number], textarea, select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--apple-near-black);
  background: #ffffff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.frm_input:focus, input[type=text]:focus, input[type=email]:focus,
input[type=password]:focus, input[type=number]:focus, textarea:focus, select:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

/* QA 문의 */
#bo_w { max-width: 720px; margin: 48px auto; padding: 0 24px; }
#bo_w h2 { font-size: 28px; font-weight: 600; color: var(--apple-near-black); margin-bottom: 32px; letter-spacing: 0.196px; }
.form_01 ul { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.form_01 li label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(0,0,0,0.56);
  margin-bottom: 6px;
  letter-spacing: 0;
}
.form_01 .hint { font-size: 12px; color: rgba(0,0,0,0.4); margin-top: 4px; }
.btn_confirm { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-direction: row-reverse; }

/* 마이페이지 내부 여백 */
.wrap { max-width: 900px; margin: 40px auto; padding: 0 24px; }

/* ════════════════════════════════════════
   반응형
   ════════════════════════════════════════ */
@media (max-width: 1024px) {
  .cm-features-grid { grid-template-columns: repeat(2,1fr); }
  .ft-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  #hd { height: 48px; }
  .hd-inner { padding: 0 16px; }
  #gnb { display: none; }
  #gnb.open { display: block; position: fixed; inset: 48px 0 0 0; background: rgba(0,0,0,0.96); overflow-y: auto; padding: 20px; z-index: 199; }
  #gnb.open #gnb_1dul { flex-direction: column; }
  #gnb.open .gnb_1da { height: auto; line-height: 1.5; padding: 12px 16px; font-size: 17px; color: #fff; }
  .hd-actions { gap: 2px; }
  .hd-actions .btn-hd:not(.btn-primary) { display: none; }
  .hd-mobile-toggle { display: flex; }

  .cm-hero-inner { grid-template-columns: 1fr; gap: 40px; padding: 70px 20px 60px; }
  .cm-hero-title { font-size: 36px; }
  .cm-hero-desc { font-size: 17px; }
  .cm-hero-image { display: none; }

  .cm-features { padding: 70px 0; }
  .cm-features-grid { grid-template-columns: 1fr; gap: 12px; }
  .cm-section-title { font-size: 28px; }
  .cm-plans-preview { grid-template-columns: 1fr; }
  .cm-pricing-preview { padding: 70px 0; }
  .cm-download { padding: 70px 0; }

  .ft-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 480px) {
  .cm-hero-title { font-size: 28px; }
  .cm-hero-actions { flex-direction: column; align-items: flex-start; }
  .ft-inner { grid-template-columns: 1fr; }
}
