/* ===== 공용 홈/랜딩 스타일 (landing.html + PageHome) ===== */
.land-page { position: relative; z-index: 0; }

/* 앱(PageHome) 안에서는 fixed 배경이 다른 페이지 위로 남지 않도록 클리핑 */
#app-content .land-page { min-height: 100%; }

/* 좌우 대칭: 가로 오버플로 차단 — 어떤 자식도 뷰포트를 넘지 않게 */
body.land-standalone { overflow-x: hidden; }
#app-content .land-page { overflow-x: hidden; }
.land-bg { position: fixed; inset: 0; background: url('/assets/login-bg.jpg') center center / cover no-repeat; z-index: 0; }
.land-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(240,247,255,0.82) 0%, rgba(219,233,251,0.7) 40%, rgba(190,214,245,0.6) 100%); }

/* 상단바 (비로그인 랜딩용) */
.land-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: 58px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid #dde8f5;
}
.land-brand { display: flex; align-items: center; }
.land-brand img { height: 24px; display: block; }
.land-search { flex: 1; max-width: 420px; position: relative; height: 40px; background: #f1f5fb; border: 1px solid #dde6f2; border-radius: 10px; display: flex; align-items: center; padding: 0 14px; }
.land-search:focus-within { border-color: #0f73e9; background: #fff; box-shadow: 0 0 0 3px rgba(15,115,233,0.1); }
.land-search svg { width: 14px; height: 14px; color: #8aa3bc; flex: none; align-self: center; }
.land-search input {
  flex: 1; min-width: 0; height: 100%; padding: 0 0 0 8px; margin: 0;
  background: transparent; border: none; align-self: center;
  font-size: 13px; color: #12293f; outline: none; font-family: inherit;
}
.land-search-result {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid #dde8f5; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,88,162,0.15); overflow: hidden; display: none; z-index: 20;
}
.land-search-result a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 14px; font-size: 13px; color: #1d3b57; text-decoration: none;
}
.land-search-result a:hover { background: #f2f8ff; color: #005DA1; }
.land-search-result a i { font-style: normal; font-size: 11px; color: #93a9c0; }
.land-login-btn {
  margin-left: auto; display: inline-flex; align-items: center;
  padding: 8px 20px; background: linear-gradient(135deg, #0f73e9, #005DA1);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none;
  border-radius: 8px; box-shadow: 0 3px 10px rgba(0,93,161,0.25); white-space: nowrap;
}
.land-login-btn:hover { box-shadow: 0 6px 16px rgba(0,93,161,0.35); }

/* 앱 내 홈: 검색바 (헤더 아래 콘텐츠 상단) */
.land-home-search { display: none; }

/* 티커바 (비로그인 랜딩용 — 앱은 index-ticker 사용) */
.ticker-bar { position: relative; z-index: 2; background: rgba(9,48,105,0.94); color: #fff; overflow: hidden; white-space: nowrap; }
.ticker-track { display: inline-block; padding: 7px 0; animation: ticker 40s linear infinite; will-change: transform; }
.ticker-item { display: inline-flex; align-items: baseline; gap: 5px; margin: 0 18px; font-size: 12px; }
.ticker-item b { font-weight: 700; }
.ticker-item .up { color: #ff8a8a; }
.ticker-item .down { color: #8ec2ff; }
/* 24배 반복 복제 기준 — 한 사이클(1/24)만큼 이동하면 끊김 없이 무한 반복 */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-4.1666667%); } }

.land-wrap { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 22px 24px 60px; }

/* 지수 카드 행 */
.idx-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.idx-card {
  background: rgba(255,255,255,0.94); border: 1px solid #dce8f7; border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 4px 18px rgba(0,88,162,0.07); min-width: 0;
  display: flex; flex-direction: column; min-height: 128px;
}
.idx-card .idx-name { font-size: 11px; color: #6b8cae; font-weight: 700; letter-spacing: 0.5px; display: flex; justify-content: space-between; }
.idx-card .idx-name em { font-style: normal; font-size: 10px; color: #9db2c6; font-weight: 400; min-height: 14px; }
.idx-card .idx-price { font-size: 22px; font-weight: 800; color: #12293f; margin: 3px 0 2px; }
.idx-card .idx-chg { font-size: 12px; font-weight: 700; }
.idx-card .idx-chg.up { color: #d0342c; }
.idx-card .idx-chg.down { color: #0f73e9; }
.idx-spark { height: 36px; display: block; width: 100%; }
.idx-skel { height: 128px; background: linear-gradient(100deg, rgba(255,255,255,0.7) 40%, rgba(240,246,253,0.9) 50%, rgba(255,255,255,0.7) 60%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 메인 그리드: 좌(차트+뉴스) 우(사이드) */
.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.main-grid > div { min-width: 0; }

.land-panel {
  background: rgba(255,255,255,0.94); border: 1px solid #dce8f7; border-radius: 14px;
  box-shadow: 0 4px 18px rgba(0,88,162,0.07); overflow: hidden; margin-bottom: 18px;
  min-width: 0;
}
.land-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 10px; border-bottom: 1px solid #e8f0fa; }
.land-panel-head b { font-size: 14px; color: #12293f; font-weight: 800; }
.land-panel-head span { font-size: 11px; color: #8aa3bc; }

/* 코스피 차트 패널 */
.land-chart-title { display: flex; align-items: center; gap: 10px; padding: 14px 18px 4px; }
.land-chart-title h2 { font-size: 16px; font-weight: 800; color: #12293f; margin: 0; }
.land-chart-title .live { font-size: 10px; color: #0a8a4a; font-weight: 700; }
.land-chart-title .live::before { content: '●'; margin-right: 3px; }
.land-main-chart { height: 240px; width: 100%; max-width: 100%; overflow: hidden; }
.land-main-chart a[href*="tradingview"], .land-main-chart .tv-lightweight-charts__logo { display: none !important; }

/* 시장현황 */
.land-breadth { padding: 14px 18px; border-top: 1px solid #e8f0fa; }
.land-breadth-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 8px; color: #6b8cae; }
.land-breadth-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; }
.land-breadth-bar i { display: block; height: 100%; }
.land-breadth-bar .b-up { background: #d0342c; }
.land-breadth-bar .b-flat { background: #c3cfdc; }
.land-breadth-bar .b-down { background: #0f73e9; }
.land-breadth-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 11.5px; color: #6b8cae; }
.land-breadth-labels b { font-weight: 700; }

/* 랭킹 탭 */
.land-rank-tabs { display: flex; gap: 4px; padding: 10px 18px 0; }
.land-rank-tab { padding: 6px 12px; font-size: 12px; font-weight: 700; color: #6b8cae; background: none; border: none; cursor: pointer; border-bottom: 2px solid transparent; font-family: inherit; }
.land-rank-tab.on { color: #005DA1; border-bottom-color: #0f73e9; }
.land-stock-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; border-top: 1px solid #eef3fa; font-size: 13px; text-decoration: none; cursor: pointer; }
.land-stock-row:hover { background: #f2f8ff; }
.land-stock-name { color: #1d3b57; font-weight: 600; }
.land-stock-name i { font-style: normal; font-size: 10px; color: #93a9c0; margin-left: 6px; font-weight: 400; }
.land-stock-price { text-align: right; white-space: nowrap; }
.land-stock-price b { color: #12293f; font-weight: 700; }
.land-stock-chg { font-size: 11.5px; font-weight: 700; margin-left: 8px; display: inline-block; min-width: 48px; text-align: right; }
.land-stock-chg.up { color: #d0342c; }
.land-stock-chg.down { color: #0f73e9; }

/* 인기종목 (우측) */
.land-pop-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-top: 1px solid #eef3fa; text-decoration: none; font-size: 13px; cursor: pointer; }
.land-pop-row:first-of-type { border-top: none; }
.land-pop-row:hover { background: #f2f8ff; }
.land-pop-name { color: #1d3b57; font-weight: 600; }
.land-pop-name i { font-style: normal; font-size: 10px; color: #93a9c0; margin-left: 5px; font-weight: 400; }
.land-pop-price { text-align: right; white-space: nowrap; }
.land-pop-price b { color: #12293f; font-weight: 700; }
.land-pop-chg { font-size: 11px; font-weight: 700; margin-left: 8px; }
.land-pop-chg.up { color: #d0342c; }
.land-pop-chg.down { color: #0f73e9; }

/* 뉴스 그리드 */
.land-news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.land-news-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 10px 18px; border-top: 1px solid #eef3fa; font-size: 12.5px; color: #24445f; text-decoration: none; }
.land-news-row:hover { color: #005DA1; background: #f2f8ff; }
.land-news-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.land-news-row time { flex-shrink: 0; font-size: 11px; color: #93a9c0; }

.land-foot { text-align: center; margin-top: 28px; color: #8aa3bc; font-size: 11px; letter-spacing: 1px; }

/* SBI 선택 이유 카드뉴스 + 계좌 개설 CTA */
.land-cta-wrap { max-width: 720px; margin: 8px auto 0; padding: 0 4px; text-align: center; }
.land-cta-img { width: 100%; display: block; border-radius: 18px; box-shadow: 0 8px 32px rgba(0,88,162,0.12); }
.land-cta-btn {
  margin-top: 18px; width: 100%; max-width: 420px; padding: 17px 24px;
  background: linear-gradient(135deg, #0f73e9, #005DA1); color: #fff;
  font-size: 17px; font-weight: 800; font-family: inherit; letter-spacing: -0.3px;
  border: none; border-radius: 14px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,93,161,0.32); transition: transform 0.15s, box-shadow 0.15s;
}
.land-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,93,161,0.42); }
.land-cta-btn:active { transform: translateY(0); }

/* 비로그인 가입 유도 팝업 */
.land-modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(8,22,40,0.55); backdrop-filter: blur(6px);
  align-items: center; justify-content: center; padding: 20px;
}
.land-modal-overlay.show { display: flex; }
.land-modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 380px;
  padding: 28px 26px 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,40,80,0.35); animation: landModalIn 0.22s ease;
}
@keyframes landModalIn { from { transform: translateY(14px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.land-modal-logo { height: 26px; margin-bottom: 14px; }
.land-modal h3 { font-size: 19px; font-weight: 800; color: #12293f; margin-bottom: 8px; letter-spacing: -0.3px; }
.land-modal p { font-size: 13.5px; color: #5a7a9a; line-height: 1.7; margin-bottom: 20px; }
.land-modal-join {
  display: block; width: 100%; padding: 14px; margin-bottom: 10px;
  background: linear-gradient(135deg, #0f73e9, #005DA1); color: #fff;
  font-size: 15px; font-weight: 800; text-decoration: none; border-radius: 11px;
  box-shadow: 0 4px 14px rgba(0,93,161,0.28);
}
.land-modal-login {
  display: block; width: 100%; padding: 13px;
  background: #f1f5fb; color: #1d3b57; font-size: 14px; font-weight: 700;
  text-decoration: none; border-radius: 11px; border: 1px solid #dde6f2;
}
.land-modal-close { margin-top: 14px; background: none; border: none; color: #93a9c0; font-size: 12px; cursor: pointer; font-family: inherit; text-decoration: underline; }

/* 프로모 팝업 (카드뉴스 이미지형) */
.land-modal-promo { max-width: 640px; padding: 0; overflow: hidden; }
.land-modal-img { width: 100%; display: block; max-height: 60vh; object-fit: contain; background: #f2f7fe; }
.land-modal-promo .land-modal-join { margin: 18px 18px 10px; width: calc(100% - 36px); }
.land-modal-promo .land-modal-login { margin: 0 18px; width: calc(100% - 36px); }
.land-modal-actions { display: flex; gap: 8px; padding: 14px 18px 18px; justify-content: center; }
.land-modal-actions .land-modal-hide24,
.land-modal-actions .land-modal-close {
  flex: 1; margin: 0; padding: 11px 10px; border-radius: 9px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.land-modal-actions .land-modal-hide24 { background: #f0f2f7; border: 1px solid #dfe3ed; color: #5a6275; }
.land-modal-actions .land-modal-close { background: #0f73e9; border: 1px solid #0f73e9; color: #fff; }

/* 모바일: 팝업이 화면을 넘지 않도록 */
@media (max-width: 480px) {
  .land-modal-promo { max-width: 100%; max-height: 92vh; overflow-y: auto; }
  .land-modal-img { max-height: 42vh; }
  .land-modal-promo .land-modal-join { padding: 13px; font-size: 14px; }
  .land-modal-promo .land-modal-login { padding: 12px; font-size: 13px; }
}

/* 하단 탭바 (비로그인 랜딩용) */
.land-tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; background: rgba(255,255,255,0.96); backdrop-filter: blur(14px);
  border-top: 1px solid #dde8f5; padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
.land-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; font-size: 11px; color: #6b8cae; text-decoration: none;
  font-weight: 600;
}
.land-tab svg { width: 20px; height: 20px; }
.land-tab:active { color: #0f73e9; }
.land-tab.home { color: #0f73e9; }
body.land-standalone { padding-bottom: 70px; }

/* 앱(PageHome) 안에서는 탭바 대신 콘텐츠 하단 여백 */
.land-page-inapp .land-tabs { display: none; }

/* 홈 토스트 */
.land-toast {
  position: fixed; top: 56px; left: 50%; transform: translateX(-50%);
  background: #12293f; color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 10px 18px; border-radius: 10px; z-index: 999; opacity: 0;
  transition: opacity 0.25s; pointer-events: none; max-width: 90vw; text-align: center;
}
.land-toast.show { opacity: 1; }

/* 반응형 */
@media (max-width: 640px) {
  .ticker-item { margin: 0 12px; font-size: 11px; }
}
@media (max-width: 900px) {
  .main-grid { grid-template-columns: minmax(0, 1fr); }
  .idx-row { grid-template-columns: repeat(2, 1fr); }
  .land-news-grid { grid-template-columns: 1fr; }
  .land-top .land-search { display: none; }
  .land-home-search { display: block; max-width: none; padding: 0 0 14px; margin: 0; }
  .land-wrap { padding: 16px 14px 44px; }
  .idx-card .idx-price { font-size: 19px; }
}
@media (max-width: 480px) {
  .idx-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .idx-card { padding: 10px 12px; }
  .idx-card .idx-price { font-size: 17px; }
  .land-main-chart { height: 180px; }
}

