/* 슈퍼랭 링크 페이지: 기존 창 레이아웃과 Blue Hour 배경 */
:root {
  --ink: #17161c;
  --muted: #6c6a78;
  --line: rgba(23, 22, 28, 0.09);
  --win: rgba(255, 255, 255, 0.86);
  --accent: #ff4f9a;
  --accent-soft: #ffe3ef;
  --blue: #3b5bff;
  --blue-soft: #e6ebff;
  --bar: 30px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + 12px); }
body {
  font-family: 'Pretendard', -apple-system, sans-serif;
  color: var(--ink); min-height: 100vh; -webkit-font-smoothing: antialiased;
  background: #1E2A5A;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── 메뉴바 ── */
.menubar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar); z-index: 100;
  display: flex; align-items: center; justify-content: space-between; padding: 0 10px;
  font-size: 13px; color: #fff;
  background: rgba(30, 42, 90, 0.48); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
.menubar-left { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.menubar-left > * { padding: 3px 9px; border-radius: 5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16); }
.menubar-left > a:hover { background: rgba(255, 255, 255, 0.22); }
.menubar-brand { font-weight: 800; }
.menubar-right { font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.16); padding-right: 4px; }

/* ── 뒤 배경 ── */
.stage {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, #1E2A5A 0%, #3E5A9A 33%, #8FA6CF 67%, #D7C3D3 100%);
}
.sparkles i {
  position: absolute; width: var(--s); height: var(--s); opacity: 0;
  background: #fff; clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  animation: twinkle var(--d) ease-in-out var(--delay) infinite;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.9));
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: .95; transform: scale(1) rotate(45deg); } }

/* ── 창 ── */
.page { width: min(460px, 100% - 32px); margin: 0 auto; padding: calc(var(--bar) + 18px) 0 calc(104px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.win {
  background: rgba(255, 255, 255, 0.97); border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 36px -18px rgba(50, 40, 120, 0.4), 0 1px 3px rgba(50, 40, 120, 0.08);
}
.win[hidden] { display: none; }
.win-bar {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  font-size: 12px; font-weight: 700; color: #4a4857;
  background: #f6f5fa; border-bottom: 1px solid var(--line);
}
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; flex: none; }
.win-bar i:nth-child(2) { background: #febc2e; }
.win-bar i:nth-child(3) { background: #28c840; }
.win-bar span { flex: 1; text-align: center; padding-right: 44px; }
.win-bar:has(.live) span { padding-right: 0; }
.win-bar .live { font-style: normal; font-size: 11px; font-weight: 700; color: #1f9d55; display: flex; align-items: center; gap: 4px; }
.win-bar .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #28c840; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.win-body { padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* 프로필 — 가로로 짧게 */
.profile { grid-template-columns: auto 1fr; align-items: center; gap: 14px; padding: 16px; }
.avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; box-shadow: 0 4px 14px rgba(60, 50, 140, 0.22); }
.profile h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.bio { font-size: 14px; color: #55535f; margin-top: 2px; }
.socials { display: flex; gap: 6px; margin-top: 10px; }
.socials > * {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #f4f3f8; transition: transform .15s, background .15s;
}
.socials > *:hover { transform: translateY(-2px); background: var(--accent-soft); }
.socials svg { width: 19px; height: 19px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.socials svg .fill { fill: var(--ink); stroke: none; }

/* 클럽 — 인스타 그리드 + 가입 */
.ig-head { display: flex; align-items: center; gap: 10px; }
.ig-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid #ff4f9a; }
.ig-head div { flex: 1; min-width: 0; line-height: 1.25; }
.ig-head b { display: block; font-size: 15px; font-weight: 800; }
.ig-head small { font-size: 12.5px; color: #6a6876; }
.follow { flex: none; font-size: 13px; font-weight: 800; color: #fff; padding: 8px 14px; border-radius: 99px; background: linear-gradient(135deg, #8b5cf6, #a855f7); box-shadow: 0 6px 14px -6px rgba(139, 92, 246, .8); }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 12px; overflow: hidden; }
.ig { position: relative; aspect-ratio: 4 / 5; background: #eceaf3; overflow: hidden; display: block; }
.ig img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ig:hover img { transform: scale(1.04); }
.ig.ph { animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { 50% { opacity: .55; } }
.reel { position: absolute; top: 6px; right: 6px; font-size: 10.5px; font-weight: 700; color: #fff; padding: 3px 7px; border-radius: 99px; background: rgba(0, 0, 0, .45); }

.cta {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 18px; border-radius: 14px; color: #fff;
  background: linear-gradient(135deg, #ff4f9a, #ff7a6b); box-shadow: 0 10px 22px -10px rgba(255, 79, 154, 0.7);
  font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em; transition: transform .12s;
}
.cta small { display: block; font-size: 12.5px; font-weight: 600; opacity: .9; margin-top: 2px; }
.cta b { font-size: 22px; }
.cta:hover { transform: translateY(-1px); }
/* 최근 아티클 — 인스타 그리드와 같은 3칸, 이미지 아래 제목 */
.art-head { margin-top: 6px; }
.ig-head img.contain { object-fit: contain; background: #fff; border-color: var(--ink); padding: 4px; }
.follow.dark { background: var(--ink); box-shadow: none; }
.art-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.art { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.art .art-img { position: relative; aspect-ratio: 4 / 5; border-radius: 10px; overflow: hidden; background: linear-gradient(150deg, #c9d3ff, #e9d5ff 55%, #ffd9e6); display: block; }
.art .art-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.art:hover .art-img img { transform: scale(1.04); }
.art b { font-size: 12.5px; font-weight: 700; line-height: 1.35; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art.none .art-img { display: flex; align-items: flex-end; padding: 9px; }
.art.none .art-img b { -webkit-line-clamp: 5; font-size: 13px; font-weight: 800; }
.art.ph { aspect-ratio: 4 / 5; border-radius: 10px; background: #eceaf3; animation: shimmer 1.4s ease-in-out infinite; }

/* 화면 아래 늘 떠 있는 메인 CTA */
.sticky-cta {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40;
  width: min(460px, 100% - 32px); display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-radius: 16px; color: #fff;
  background: linear-gradient(135deg, #ff4f9a, #ff7a6b); box-shadow: 0 14px 30px -10px rgba(255, 79, 154, 0.75), 0 2px 0 rgba(255, 255, 255, .35) inset;
  font-size: 16.5px; font-weight: 800; letter-spacing: -0.01em;
}
.sticky-cta small { display: block; font-size: 12px; font-weight: 600; opacity: .9; margin-top: 1px; }
.sticky-cta b { font-size: 22px; }
.sticky-cta:active { transform: translateX(-50%) scale(.985); }
.tile-row {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line); transition: border-color .12s, transform .12s;
}
.tile-row:hover { border-color: rgba(59, 91, 255, 0.4); transform: translateY(-1px); }
.tile-row img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.tile-row img.contain { object-fit: contain; background: #f6f5fa; padding: 6px; }
.t { flex: 1; min-width: 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.t small { display: block; font-size: 12.5px; font-weight: 500; color: #6a6876; margin-top: 2px; }
.go { color: #9a98a6; }

/* 멤버 회사 띠배너 */
.logos-band { background: rgba(255, 255, 255, .97); border-radius: 16px; padding: 14px 0 16px; box-shadow: 0 16px 36px -18px rgba(50, 40, 120, 0.4); }
.logos-band p { text-align: center; font-size: 12.5px; font-weight: 700; color: #6a6876; margin-bottom: 12px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 40px), transparent); }
.track { display: flex; width: max-content; align-items: center; gap: 40px; padding: 0 20px; animation: roll 24s linear infinite; }
.logo { flex: none; height: 28px; display: flex; align-items: center; }
.logo img { height: 100%; width: auto; max-width: 110px; object-fit: contain; }
@keyframes roll { to { transform: translateX(-50%); } }
@media (hover: hover) { .marquee:hover .track { animation-play-state: paused; } }

/* 다가오는 모임 — 캐러셀 */
.carousel { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.carousel::-webkit-scrollbar { display: none; }
.ev-card { flex: 0 0 100%; scroll-snap-align: start; border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; }
.ev-card.ph { aspect-ratio: 4 / 3.6; animation: shimmer 1.4s ease-in-out infinite; background: #eceaf3; }
.ev-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #c9d3ff, #ffd9e6); display: block; }
.ev-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-img .ev-date { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
/* 이미지가 없으면 납작하게 — 옆 카드에 이미지가 있으면 그 높이만큼 늘어난다 */
.ev-img.none { aspect-ratio: auto; min-height: 96px; flex: 1; background: linear-gradient(135deg, #c9d3ff 0%, #e9d5ff 50%, #ffd9e6 100%); }
.ev-img .tag.hot { position: absolute; top: 10px; right: 10px; }
.ev-body { padding: 11px 13px 13px; }
.ev-body b { display: block; font-size: 15.5px; font-weight: 800; line-height: 1.35; }
.ev-body small { display: block; font-size: 12.5px; color: #6a6876; margin-top: 3px; }
.ev-date {
  width: 58px; padding: 7px 0; border-radius: 10px; display: grid; place-content: center; text-align: center;
  background: #fff; color: var(--blue); line-height: 1.1;
}
.ev-date b { display: block; font-size: 18px; font-weight: 800; }
.ev-date b.long { font-size: 13px; letter-spacing: -0.02em; }
.ev-date small { font-size: 11px; font-weight: 700; white-space: nowrap; margin-top: 2px; }
.ev-date.ext { color: #b26a00; }
.ev-empty { font-size: 14px; color: var(--muted); text-align: center; padding: 18px 8px; width: 100%; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #f1f0f6; color: var(--muted); }
.tag.hot { background: var(--accent); color: #fff; }
.dots { display: flex; justify-content: center; gap: 6px; min-height: 6px; }
.dots i { width: 6px; height: 6px; border-radius: 99px; background: #d6d4e2; transition: width .2s, background .2s; }
.dots i.on { width: 18px; background: var(--blue); }

/* 캘린더 */
.cal { display: block; border-radius: 14px; padding: 12px 12px 10px; background: #f8f7fc; border: 1px solid var(--line); transition: border-color .12s; }
.cal:hover { border-color: rgba(59, 91, 255, 0.4); }
.cal-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cal-head b { font-size: 15px; font-weight: 800; }
.cal-head span { font-size: 12.5px; font-weight: 700; color: var(--blue); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cal-grid em { font-style: normal; font-size: 11px; font-weight: 700; color: #9a98a6; padding-bottom: 3px; }
.cal-grid span { position: relative; padding: 5px 0 8px; border-radius: 8px; color: var(--ink); font-weight: 600; }
.cal-grid span.past { color: #b9b7c4; }
.cal-grid span.today { background: var(--ink); color: #fff; }
.cal-grid span i { position: absolute; left: 50%; bottom: 2px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); }
.cal-grid span i.ext { background: #f0a020; }

/* 자료 — 바탕화면 아이콘 */
.icons { grid-template-columns: repeat(5, 1fr); gap: 6px 4px; padding: 16px 10px 14px; }
.icon { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 4px 2px; border-radius: 10px; }
.icon:hover { background: rgba(59, 91, 255, .07); }
.ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; filter: drop-shadow(0 4px 8px rgba(40, 30, 90, .18)); transition: transform .15s; }
.icon:hover .ico { transform: translateY(-2px) scale(1.04); }
.ico img { width: 100%; height: 100%; object-fit: contain; }
.lbl { font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--ink); word-break: keep-all; }
.note { font-size: 10.5px; color: #8a8898; margin-top: -3px; }
.code {
  font-size: 10px; font-weight: 800; padding: 3px 6px; border-radius: 6px; cursor: pointer; margin-top: -2px;
  background: var(--blue-soft); color: var(--blue); border: 1px dashed rgba(59, 91, 255, 0.45);
}
.code:hover { background: var(--blue); color: #fff; }
@media (max-width: 380px) { .icons { grid-template-columns: repeat(3, 1fr); } }

.foot { text-align: center; font-size: 12.5px; color: rgba(23, 22, 28, 0.65); padding: 6px 0 10px; }
.foot button { text-decoration: underline; font-size: inherit; color: inherit; }

.toast {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(23, 22, 28, 0.88); color: #fff; font-size: 13px; padding: 10px 16px; border-radius: 99px; transition: .25s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) { .sparkles, .win-bar .live::before { animation: none; display: none; } }

@font-face { font-family: Pretendard; src: url('assets/Pretendard-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Pretendard; src: url('assets/Pretendard-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Pretendard; src: url('assets/Pretendard-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Pretendard; src: url('assets/Pretendard-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Pretendard; src: url('assets/Pretendard-ExtraBold.woff2') format('woff2'); font-weight: 800; font-display: swap; }
