/* 윤사무엘777 — 모바일 1화면 · 증시일정 랜딩 */

:root {
  --bg-top: #f2f2f2;
  --bg-info: #3e3e52;
  --bg-header: var(--bg-top);
  --text-main: #111111;
  --text-sub: #6b6b6b;
  --text-on-dark: #ffffff;
  --kakao: #fee500;
  --kakao-press: #f5d800;
  --max-width: 480px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --photo-w: min(40vw, 152px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg-top);
  color: var(--text-main);
  line-height: 1.45;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

.page {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg-top);
  overflow: hidden;
}

/* —— 헤더 —— */
.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: calc(2px + var(--safe-top)) 12px 0;
  background: var(--bg-header);
}

.site-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.site-header__logo {
  height: 36px;
  width: auto;
  max-width: min(58vw, 220px);
  object-fit: contain;
  object-position: left center;
}

.site-header__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border-radius: 8px;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.site-header__cta:active {
  transform: scale(0.95);
  opacity: 0.9;
}

.site-header__cta-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

/* —— 상단: 사진(좌) + 카톡(우) —— */
.hero {
  flex: 0 0 auto;
  padding: 4px 12px 4px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero__row {
  display: flex;
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.hero__photo {
  flex: 0 0 var(--photo-w);
  width: var(--photo-w);
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  background: transparent;
}

.hero__meta {
  margin-top: 8px;
  text-align: left;
}

.hero__name {
  margin: 0;
  font-size: clamp(1.05rem, 4.2vw, 1.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.2;
}

.hero__tagline {
  margin: 4px 0 0;
  font-size: clamp(0.78rem, 3vw, 0.9rem);
  font-weight: 500;
  color: var(--text-sub);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* —— CTA: 사진과 동일 높이, 오른쪽 —— */
.kakao-btn {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  padding: 14px 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  gap: 6px;
  background: var(--kakao);
  border-radius: 8px;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.06);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.15s ease;
}

.kakao-btn:active {
  background: var(--kakao-press);
  transform: scale(0.985);
}

.kakao-btn__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
}

.kakao-btn__icon img {
  width: min(22vw, 72px);
  height: min(22vw, 72px);
  object-fit: contain;
  border-radius: 14px;
}

.kakao-btn__label {
  flex: 0 0 auto;
  font-size: clamp(1.15rem, 5vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.2;
  color: #191919;
  word-break: keep-all;
  max-width: 6.2em;
}

/* —— 증시일정 (위로 올림) —— */
.schedule {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  background: var(--bg-info);
  border-radius: 16px 16px 0 0;
  color: var(--text-on-dark);
  display: flex;
  flex-direction: column;
  padding-bottom: calc(12px + var(--safe-bottom));
}

.schedule__inner {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 6px;
}

.schedule__title {
  flex: 0 0 auto;
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 4.4vw, 1.3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.schedule__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.schedule__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule__list li {
  font-size: clamp(1rem, 3.8vw, 1.12rem);
  font-weight: 700;
  line-height: 1.7;
  color: #ffffff;
  opacity: 1;
  -webkit-font-smoothing: antialiased;
  white-space: pre-wrap;
  word-break: keep-all;
}

.schedule__list li + li {
  margin-top: 12px;
}

.schedule__empty {
  margin: 0;
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  font-weight: 600;
  line-height: 1.65;
  color: #ffffff;
  opacity: 1;
}

@media (min-width: 481px) {
  body {
    background: #e8e8e8;
  }

  .page {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.08);
    height: min(100dvh, 900px);
    max-height: min(100dvh, 900px);
    margin-top: max(0px, calc((100dvh - min(100dvh, 900px)) / 2));
    border-radius: 0;
  }
}

@media (max-height: 700px) {
  .site-header {
    min-height: 40px;
  }

  .site-header__logo {
    height: 32px;
  }

  .hero {
    padding: 2px 10px 2px;
  }

  :root {
    --photo-w: min(34vw, 120px);
  }

  .hero__meta {
    margin-top: 6px;
  }

  .kakao-btn {
    padding: 10px 8px 12px;
    gap: 4px;
  }

  .kakao-btn__icon img {
    width: min(18vw, 56px);
    height: min(18vw, 56px);
    border-radius: 12px;
  }

  .kakao-btn__label {
    font-size: clamp(1rem, 4.2vw, 1.2rem);
  }

  .schedule__inner {
    padding: 12px 14px 4px;
  }
}

@media (max-height: 600px) {
  :root {
    --photo-w: min(30vw, 100px);
  }

  .hero__tagline {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .kakao-btn {
    padding: 8px 6px 10px;
    gap: 2px;
  }

  .kakao-btn__icon img {
    width: min(16vw, 44px);
    height: min(16vw, 44px);
    border-radius: 10px;
  }

  .kakao-btn__label {
    font-size: clamp(0.92rem, 3.8vw, 1.08rem);
  }
}
