:root {
  --green: #00c471;
  --green-dark: #03a861;
  --text: #191f28;
  --text-sub: #4e5968;
  --muted: #8b95a1;
  --border: #e5e8eb;
  --border-light: #f2f4f6;
  --bg-gray: #f7f8fa;
  --up: #f04452;
  --down: #1b64da;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: "Pretendard Variable", Pretendard, -apple-system,
    BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    sans-serif;
  color: var(--text);
  background: #fff;
  font-size: 14px;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: #191f28;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.logo-text {
  font-size: 17px;
  color: var(--text);
}

.logo-text strong {
  font-weight: 800;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 340px;
  height: 38px;
  padding: 0 14px;
  background: var(--bg-gray);
  border-radius: 8px;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
}

.gnb {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
}

.gnb a:hover {
  color: var(--text);
}

.gnb-mypage {
  padding: 7px 14px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  color: var(--green-dark) !important;
  font-weight: 600;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.icon-btn:hover {
  background: var(--bg-gray);
}

.header-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  height: 32px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.header-login-btn:hover {
  background: var(--green-dark);
}

.header-signup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
  height: 32px;
  padding: 0 14px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  background: #fff;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.header-signup-btn:hover {
  background: #f0fdf7;
}

/* ---------- 사이드바 로그인 유도 카드 ---------- */
.side-login-card {
  padding: 28px 18px;
  text-align: center;
}

.side-login-desc {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
}

.side-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  height: 40px;
  padding: 0 28px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
}

.side-login-btn:hover {
  background: var(--green-dark);
}

/* ---------- Layout ---------- */
.main-grid {
  display: flex;
  gap: 48px;
  padding-top: 28px;
  padding-bottom: 80px;
}

.content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 340px;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */
.section {
  margin-bottom: 44px;
}

.side-section {
  margin-bottom: 36px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
}

.section-sub {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: #22c55e;
  vertical-align: middle;
  animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

.parsed-label {
  color: #22c55e;
  font-weight: 500;
}

/* 등락 반짝 효과 */
.flash-up {
  animation: flash-up-bg 1.3s ease-out;
}

.flash-down {
  animation: flash-down-bg 1.3s ease-out;
}

@keyframes flash-up-bg {
  0% { background-color: rgba(240, 68, 82, 0.28); }
  100% { background-color: transparent; }
}

@keyframes flash-down-bg {
  0% { background-color: rgba(27, 100, 218, 0.22); }
  100% { background-color: transparent; }
}

.more-link {
  font-size: 12px;
  color: var(--muted);
}

.more-link.green {
  color: var(--green-dark);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
  overflow-x: auto;
}

.tab {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-gray);
  white-space: nowrap;
}

.tab-active {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}

/* ---------- Stock table ---------- */
.stock-table {
  width: 100%;
  border-collapse: collapse;
}

.stock-table th {
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-align: right;
}

.stock-table th.col-name {
  text-align: left;
}

.sort-arrow {
  font-size: 9px;
}

.stock-table td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
  text-align: right;
}

.stock-table .col-name {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.rank {
  width: 14px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.stock-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  flex-shrink: 0;
  letter-spacing: -0.3px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.stock-name {
  font-weight: 600;
  font-size: 14px;
}

.ipo-badge {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.price {
  font-weight: 600;
}

.up {
  color: var(--up);
}

.down {
  color: var(--down);
}

.orders {
  color: var(--text-sub);
}

.type-tag {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-gray);
  font-size: 11px;
  color: var(--text-sub);
}

/* ---------- News ---------- */
.news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.news-item:last-child {
  border-bottom: none;
}

.news-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.news-title {
  display: block;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
}

.news-title:hover {
  text-decoration: underline;
}

span.news-title {
  cursor: default;
}

span.news-title:hover {
  text-decoration: none;
}

.ext-icon {
  margin-left: 4px;
  vertical-align: -1px;
}

.news-meta {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Cards (sidebar) ---------- */
.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}

.holdings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.holdings-label {
  font-size: 12px;
  color: var(--muted);
}

.holdings-rate {
  font-size: 12px;
  color: var(--text-sub);
}

.holdings-total {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
}

.holdings-diff {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.holdings-list {
  margin-top: 16px;
}

.holding-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border-light);
}

.holding-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.holding-name {
  font-size: 14px;
  font-weight: 600;
}

.holding-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.holding-value {
  margin-left: auto;
  text-align: right;
}

.holding-price {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.holding-change {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--muted);
}

.detail-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-sub);
}

.detail-btn:hover {
  background: var(--bg-gray);
}

/* ---------- Tips ---------- */
.tip-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.tip-list li {
  border-bottom: 1px solid var(--border-light);
}

.tip-list li:last-child {
  border-bottom: none;
}

.tip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
}

.tip-chevron {
  color: var(--muted);
  font-size: 13px;
  transition: transform 0.2s;
}

.tip-chevron-open {
  transform: rotate(90deg);
}

.tip-content {
  padding: 2px 16px 14px 48px;
  background: var(--bg-gray);
}

.tip-step {
  padding: 8px 0;
}

.tip-step-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.tip-step-detail {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
}

.tip-item:hover {
  background: var(--bg-gray);
}

.tip-icon {
  font-size: 20px;
}

.tip-body {
  display: flex;
  flex-direction: column;
}

.tip-title {
  font-size: 14px;
  font-weight: 600;
}

.tip-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.tip-chevron {
  margin-left: auto;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- HOT 토론방 ---------- */
.pager {
  display: flex;
  gap: 4px;
}

.pager-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: 10px;
  color: var(--muted);
}

.hot-cards {
  display: flex;
  gap: 12px;
}

.hot-card {
  flex: 1;
  padding: 16px;
}

.hot-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hot-tags {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  color: var(--green-dark);
}

.hot-comments {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .gnb a:not(.gnb-mypage) {
    display: none;
  }

  .main-grid {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}

/* 등락률 0% */
.flat {
  color: var(--muted);
}

/* 종목 로고 이미지 */
img.stock-logo {
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

img.news-avatar {
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

a.hot-card {
  display: block;
}

/* ---------- 모바일 메뉴 (기본: 숨김) ---------- */
.mobile-menu {
  display: none;
}

.stock-list-mobile {
  display: none;
}

/* ---------- 모바일 (≤768px) ---------- */
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }

  /* 헤더: 로고 + 햄버거만 */
  .header-inner {
    gap: 12px;
    height: 56px;
  }

  .search-box,
  .gnb,
  .header-icons {
    display: none;
  }

  .mobile-menu {
    display: block;
    margin-left: auto;
    position: relative;
  }

  .mobile-menu summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-menu summary:hover {
    background: var(--bg-gray);
  }

  .mobile-menu-panel {
    position: absolute;
    right: 0;
    top: 46px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    min-width: 200px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu-panel a {
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-sub);
  }

  .mobile-menu-panel a:hover {
    background: var(--bg-gray);
    color: var(--text);
  }

  .mobile-menu-mypage {
    color: var(--green-dark) !important;
    font-weight: 600;
  }

  /* 본문 여백 */
  .main-grid {
    gap: 32px;
    padding-top: 20px;
  }

  .section {
    margin-bottom: 32px;
  }

  .side-section {
    margin-bottom: 28px;
  }

  /* 종목 순위: 테이블 숨기고 리스트 표시 */
  .stock-table {
    display: none;
  }

  .stock-list-mobile {
    display: block;
  }

  .stock-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 2px;
    border-bottom: 1px solid var(--border-light);
  }

  .stock-row:last-child {
    border-bottom: none;
  }

  .stock-row .rank {
    width: 16px;
    font-size: 13px;
    color: var(--muted);
    text-align: center;
    flex-shrink: 0;
  }

  .stock-row-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .stock-row-name {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 15px;
    font-weight: 600;
  }

  .stock-row-sub {
    margin-top: 3px;
    font-size: 12px;
    color: var(--muted);
  }

  .stock-row-price {
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .stock-row-price .price {
    font-size: 15px;
  }

  .stock-row-price .up,
  .stock-row-price .down,
  .stock-row-price .flat {
    margin-top: 2px;
    font-size: 13px;
  }

  /* 탭 가로 스크롤 여유 (부모 패딩과 정렬해 화면 밖 넘침 방지)
     - .container(홈): 모바일 패딩 16px
     - .sub-main(/stocks 등): 패딩 20px */
  .tabs {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .sub-main .tabs {
    margin: 0 -20px;
    padding: 0 20px;
  }

  .hot-cards {
    flex-direction: column;
  }
}

/* ---------- 섹션 앵커 스크롤 ---------- */
html {
  scroll-behavior: smooth;
}

.section,
#ranking,
#news,
#report {
  scroll-margin-top: 72px;
}

/* ---------- 테마별 종목 ---------- */
.theme-desc {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.theme-stock-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
}

.theme-stock-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
}

.theme-stock-item:hover {
  background: var(--bg-gray);
}

.theme-stock-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-stock-price {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 13px;
  flex-shrink: 0;
}

.theme-stock-price .price {
  font-weight: 700;
}

@media (max-width: 768px) {
  .theme-stock-list {
    grid-template-columns: 1fr;
  }
}

/* ---------- 인기 토론 ---------- */
.discuss-list {
  list-style: none;
  border-top: 1px solid var(--border-light);
}

.discuss-item {
  display: block;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border-light);
}

.discuss-item:hover .discuss-subject {
  text-decoration: underline;
}

.discuss-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.discuss-stock {
  font-weight: 700;
  color: var(--text-sub);
}

.discuss-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.discuss-subject {
  margin-top: 6px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.discuss-meta {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.discuss-nick {
  font-weight: 600;
  color: var(--text-sub);
}

/* ---------- 리포트 전체 페이지 ---------- */
.sub-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.sub-title {
  font-size: 20px;
  font-weight: 800;
}

.report-list {
  margin-top: 18px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.report-item {
  display: block;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
}

.report-item:hover {
  background: var(--bg-gray);
}

.report-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.report-item-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #191f28;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.report-item-title {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.report-item-preview {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.report-item-date {
  margin-left: auto;
}

/* ---------- 종목 토론방 ---------- */
.stock-head {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
}

.stock-head-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  background: #4e5968;
  overflow: hidden;
  flex-shrink: 0;
}

.stock-head-name {
  font-size: 18px;
  font-weight: 800;
}

.stock-head-price {
  margin-left: auto;
  text-align: right;
}

.stock-head-price .price {
  font-size: 17px;
  font-weight: 800;
}

.stock-head-price .up,
.stock-head-price .down,
.stock-head-price .flat {
  font-size: 13px;
}

.post-list {
  margin-top: 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-item {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 18px 20px;
}

.post-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.post-nick {
  font-weight: 700;
  color: var(--text-sub);
}

.post-time {
  margin-left: auto;
}

.post-subject {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.post-body {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--text-sub);
  line-height: 1.7;
  white-space: pre-wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.post-counts {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.sub-empty {
  margin-top: 16px;
  padding: 48px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
}

/* ---------- 서브 페이지 헤더 ---------- */
.sub-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}

.sub-header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sub-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sub-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #191f28;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}

.sub-logo-text {
  font-size: 16px;
  color: var(--text);
}

.sub-logo-text strong {
  font-weight: 800;
}

.sub-header-title {
  padding-left: 12px;
  border-left: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sub);
}

.sub-home-link {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.sub-home-link:hover {
  color: var(--text);
}

/* ---------- 아코디언 (FAQ/가이드 공통) ---------- */
.ipo-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.ipo-accordion-item + .ipo-accordion-item {
  border-top: 1px solid var(--border-light);
}

.ipo-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  background: #fff;
}

.ipo-accordion-btn svg {
  flex-shrink: 0;
  transition: transform 0.2s;
}

.ipo-accordion-item.open .ipo-accordion-btn svg {
  transform: rotate(180deg);
}

.ipo-accordion-body {
  padding: 0 20px 18px;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
}

.holdings-empty {
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: #8b95a1;
}

.header-username {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

/* ---------- 전체 종목 페이지 ---------- */
.stocks-page {
  padding-bottom: 60px;
}

.stocks-count {
  margin-left: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.stocks-toolbar {
  display: flex;
  gap: 8px;
  margin: 20px 0 16px;
  flex-wrap: wrap;
}

.stocks-search {
  flex: 1 1 240px;
  min-width: 180px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.stocks-search:focus {
  border-color: var(--green);
}

.stocks-select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
}

.stocks-btn {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.stocks-sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.stocks-sort-link:hover {
  color: var(--green-dark);
}

.stocks-table .stock-name {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.stock-code {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.stocks-mobile-list .stock-row-name {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.stock-row-code {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.stocks-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.page-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
  background: #fff;
}

.page-btn:hover:not(.disabled) {
  border-color: var(--green);
  color: var(--green-dark);
}

.page-btn.disabled {
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.page-info {
  font-size: 14px;
  color: var(--text-sub);
}

@media (max-width: 768px) {
  .stocks-toolbar {
    margin: 16px 0 12px;
  }

  .stocks-search {
    flex: 1 1 100%;
    min-width: 0;
    font-size: 16px; /* iOS 포커스 시 자동 줌 방지 */
  }

  .stocks-btn {
    flex: 1 1 100%;
  }
}

