/* ---------- IPO section common ---------- */
.ipo-header {
  background: #fff;
  border-bottom: 1px solid var(--border-light);
}

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

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

.ipo-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;
}

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

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

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

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

/* ---------- Tabs ---------- */
.ipo-tabs {
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.ipo-tabs-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 24px;
}

.ipo-tab {
  padding: 14px 2px;
  font-size: 15px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.ipo-tab:hover {
  color: var(--text-sub);
}

.ipo-tab-active {
  color: var(--text);
  font-weight: 700;
  border-bottom-color: #191f28;
}

/* ---------- Footer ---------- */
.ipo-footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--border-light);
  padding: 36px 0 44px;
  margin-top: 64px;
}

.ipo-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

.ipo-footer-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.ipo-footer-logo .ipo-logo-badge {
  width: 22px;
  height: 22px;
  font-size: 13px;
}

.ipo-footer-logo em {
  font-style: normal;
  color: var(--green);
}

.ipo-footer-desc {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.ipo-footer-copy {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ipo-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 28px 20px 0;
}

/* ---------- Calendar page ---------- */
.ipo-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ipo-cal-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 20px;
  font-weight: 700;
}

.ipo-cal-nav {
  display: flex;
  align-items: center;
}

.ipo-cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12px;
  color: var(--text-sub);
}

.ipo-cal-nav-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.ipo-cal-nav-btn:last-child {
  border-radius: 0 6px 6px 0;
}

.ipo-cal-nav-btn + .ipo-cal-nav-btn {
  border-left: none;
}

.ipo-cal-nav-btn:hover {
  background: var(--bg-gray);
}

.ipo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.ipo-legend-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-sub);
  background: #fff;
}

.ipo-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.ipo-cal-grid {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  overflow: hidden;
}

.ipo-cal-loading {
  opacity: 0.55;
  transition: opacity 0.15s;
}

.ipo-cal-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.ipo-cal-dow {
  padding: 10px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-sub);
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border-light);
}

.ipo-cal-dow:last-child {
  border-right: none;
}

.ipo-cal-week {
  position: relative;
  border-bottom: 1px solid var(--border);
}

.ipo-cal-week-cols {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  pointer-events: none;
}

.ipo-cal-week-cols span {
  border-right: 1px solid var(--border-light);
}

.ipo-cal-week-cols span:last-child {
  border-right: none;
}

.ipo-cal-days {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.ipo-cal-daycell {
  min-height: 24px;
  padding: 6px 6px 0;
}

.ipo-cal-day {
  display: block;
  text-align: right;
  font-size: 12px;
  color: var(--text-sub);
}

.ipo-cal-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  row-gap: 3px;
  padding-bottom: 8px;
}

.ipo-cal-week-pad {
  height: 44px;
}

.ipo-cal-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px 0 2px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
}

.ipo-cal-bar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  font-size: 8px;
  font-weight: 800;
  flex-shrink: 0;
}

.ipo-cal-bar-img {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.ipo-cal-bar-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 유의사항 ---------- */
.ipo-notice {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.ipo-notice-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
}

.ipo-notice-list {
  margin-top: 10px;
  list-style: none;
}

.ipo-notice-list li {
  position: relative;
  padding-left: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.ipo-notice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
}

/* ---------- Pre-trade page ---------- */
.ipo-pretrade {
  background: var(--bg-gray);
  margin: -28px -20px 0;
  padding: 28px 20px 48px;
}

.ipo-pretrade-title {
  font-size: 20px;
  font-weight: 700;
}

.ipo-pretrade-grid {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

.ipo-top5-card {
  flex: 1 1 0;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 22px 24px;
}

.ipo-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.ipo-card-title {
  font-size: 16px;
  font-weight: 700;
}

.ipo-card-time {
  font-size: 12px;
  color: var(--muted);
}

.ipo-top5-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.ipo-top5-rank {
  width: 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.ipo-stock-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ipo-top5-info {
  min-width: 0;
}

.ipo-top5-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
}

.ipo-badge-outline {
  padding: 1px 5px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 700;
}

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

.ipo-top5-sub .ipo-price-down {
  color: var(--down);
}

.ipo-top5-side {
  margin-left: auto;
  text-align: right;
}

.ipo-buy-now {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--green);
}

.ipo-deal-time {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

.ipo-if-card {
  flex: 0 0 340px;
  background: #fff;
  border: 1.5px solid var(--green);
  border-radius: 14px;
  padding: 22px 24px;
}

.ipo-pager {
  display: flex;
  gap: 6px;
}

.ipo-pager-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
}

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

.ipo-if-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.ipo-if-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
}

.ipo-if-date {
  font-size: 12px;
  color: var(--muted);
}

.ipo-if-center {
  margin-top: 26px;
  text-align: center;
}

.ipo-if-label {
  font-size: 13px;
  color: var(--text-sub);
}

.ipo-if-rate {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 800;
  color: var(--green);
}

.ipo-if-cheaper {
  margin-top: 2px;
  font-size: 14px;
  color: var(--text);
}

.ipo-if-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  margin-top: 30px;
  padding: 0 8px;
}

.ipo-if-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ipo-if-bar {
  width: 44px;
  border-radius: 4px 4px 0 0;
}

.ipo-if-bar-label {
  font-size: 12px;
  color: var(--text-sub);
}

.ipo-if-bar-value {
  font-size: 14px;
  font-weight: 800;
  color: var(--green);
}

.ipo-if-note {
  margin-top: 22px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Carousel ---------- */
.ipo-carousel {
  margin-top: 40px;
}

.ipo-carousel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.ipo-carousel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ipo-carousel-title {
  font-size: 17px;
  font-weight: 700;
}

.ipo-carousel-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.ipo-carousel-card {
  flex: 0 0 148px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px 12px 16px;
  text-align: center;
}

.ipo-carousel-card .ipo-stock-logo {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.ipo-badge-pill {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 11px;
  font-weight: 600;
}

.ipo-carousel-name {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
}

.ipo-carousel-sub {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- FAQ page ---------- */
.ipo-faq-title {
  font-size: 20px;
  font-weight: 700;
}

.ipo-faq-grid {
  display: flex;
  gap: 56px;
  margin-top: 24px;
}

.ipo-faq-left {
  flex: 1 1 0;
  min-width: 0;
}

.ipo-faq-right {
  flex: 0 0 420px;
  min-width: 0;
}

.ipo-faq-subtitle {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
}

.ipo-news-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
}

.ipo-news-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--border-light);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.ipo-news-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.ipo-news-meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .ipo-pretrade-grid,
  .ipo-faq-grid {
    flex-direction: column;
  }

  .ipo-if-card,
  .ipo-faq-right {
    flex: 1 1 auto;
  }
}
