:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1e293b;
  --text-hero: #ffffff;
  --muted: #64748b;
  --td: #ffffff;
  --modal-bg: #ffffff;
  --desk: #ffffff;

  --cloud: #3b82f6;
  --youtube: #ef4444;
  --blog: #8b5cf6;
  --stream: #10b981;
  --manual: #f97316;

  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.05);
  --shadow-hover: 0 10px 25px rgba(0,0,0,0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f19;
    --card: rgba(255,255,255,0.04);
    --line: rgba(255,255,255,0.1);
    --text: rgba(255,255,255,0.92);
    --text-hero: rgba(255,255,255,0.92);
    --muted: rgba(255,255,255,0.55);
    --td: #04060A;
    --modal-bg: #0f1423;
    --desk: #111827;

    --cloud: #4da3ff;
    --youtube: #ff4d4d;
    --blog: #a98bff;
    --stream: #3cff8f;
    --manual: #ff7f00;

    --shadow: 0 10px 30px rgba(0,0,0,0.35);
    --shadow-hover: 0 15px 35px rgba(0,0,0,0.5);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  width: min(1000px, calc(100% - 40px));
  margin: auto;
}

.hero-section {
  margin: 0;
}

.desk-section {
  margin: 28px 0 48px;
}

.desk {
  background: var(--desk);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  border: 1px solid var(--line);
}

.desk-columns {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 0 24px;
}

.desk-col-sep {
  background: var(--line);
}

.desk-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.desk-col-label {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 599px) {
  .desk-columns {
    grid-template-columns: 1fr;
    gap: 24px 0;
  }
  .desk-col-sep {
    height: 1px;
    width: 100%;
  }
}

.hero-card {
  background: linear-gradient(135deg, #2b1055 0%, #7597de 100%);
  border-radius: 0;
  padding: 28px min(60px, 5vw) 40px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  text-align: center;
  transition: background 0.5s ease;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero-brand-left {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hero-brand-name {
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.hero-brand-url {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}

.hero-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.hero-dot.active {
  background: #ffffff;
  transform: scale(1.25);
}

.hero-content {
  position: relative;
  z-index: 2;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content.fading {
  opacity: 0;
  transform: translateY(6px);
}

.hero-timer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
}

.hero-timer-bar {
  height: 100%;
  width: 100%;
  background: rgba(255,255,255,0.6);
  transform-origin: left;
  transform: scaleX(1);
}

.hero-timer-bar.running {
  animation: heroTimerShrink 6s linear forwards;
}

.hero-card:hover .hero-timer-bar {
  animation-play-state: paused;
}

@keyframes heroTimerShrink {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

.hero-title {
  font-size: 28px;
  margin: 16px 0 12px;
  font-weight: 800;
  color: var(--text-hero);
}

.hero-desc {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 24px;
  color: rgba(255,255,255,0.85);
}

.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn-primary {
  display: inline-block;
  background: #ffffff;
  color: #2b1055;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  text-decoration: none;
  font-size: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.category-section {
  margin-bottom: 48px;
}

.category-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--line);
}

.grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .grid-2col { grid-template-columns: repeat(2, 1fr); }
}

.card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-hover);
}

.card.cloud:hover { border-color: var(--cloud); }
.card.youtube:hover { border-color: var(--youtube); }
.card.blog:hover { border-color: var(--blog); }
.card.stream:hover { border-color: var(--stream); }
.card.manual:hover { border-color: var(--manual); }

@keyframes live-glow {
  0%, 100% { box-shadow: 0 0 0 1px var(--stream), 0 4px 24px rgba(16, 185, 129, 0.3); }
  50%       { box-shadow: 0 0 0 2px var(--stream), 0 4px 32px rgba(16, 185, 129, 0.6); }
}
@keyframes live-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.75); }
}
.card.stream.is-live {
  border-color: var(--stream);
  background: rgba(16, 185, 129, 0.12);
  animation: live-glow 2s ease-in-out infinite;
}
.live-badge {
  display: none;
  align-items: center;
  gap: 4px;
  background: #e53e3e;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 6px 2px 4px;
  border-radius: 4px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1.4;
}
.live-badge::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  animation: live-dot 1.2s ease-in-out infinite;
}
.card.stream.is-live .live-badge {
  display: inline-flex;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(128,128,128,0.1);
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta { flex: 1; min-width: 0; }
.name { margin: 0; font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.desc { margin: 4px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 뱃지 */
.badge-new {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: #ff4d4d;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  text-align: left;
  color: var(--muted);
  background: var(--bg);
}

body.modal-open { overflow: hidden; }

.modal[hidden], .modal-overlay[hidden] { display: none !important; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 999;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-inner {
  position: relative;
  width: min(700px, 100%);
  background: var(--modal-bg);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
}

.modal-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-title { margin: 0 0 6px; font-size: 20px; }
.modal-sub { margin: 0; color: var(--muted); font-size: 14px; }

.modal-body {
  padding: 24px;
  max-height: 65vh;
  overflow-y: auto;
  line-height: 1.7;
}

.modal-body h3.sec {
  margin-top: 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 800;
}

.modal-body h3.sec:first-of-type { margin-top: 0; }
.modal-body p { margin: 12px 0; }
.modal-body ul { margin: 12px 0 12px 20px; padding-left: 0; }
.modal-body li { margin: 8px 0; }

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: var(--line);
  color: var(--text);
  border: none;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-close:hover { background: #ff4d4d; color: #fff; }

/* ── Manual Modal v2 ── */
.manual-wrap .manual-header { border-bottom: 0.5px solid var(--line); padding-bottom: 1.5rem; margin-bottom: 2rem; }
.manual-header .subtitle { font-size: 12px; color: #888; margin-bottom: 0.5rem; letter-spacing: 0.04em; }
.manual-header h1 { font-size: 22px; font-weight: 500; margin-bottom: 0.4rem; }
.manual-header .tagline { font-size: 14px; color: var(--muted); }
.meta-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1rem; }
.meta-chip { font-size: 12px; background: var(--card); border: 0.5px solid var(--line); border-radius: 999px; padding: 3px 12px; color: var(--muted); }
.manual-wrap .meta-chip { background: var(--modal-bg); color: var(--modal-bg); border-color: var(--modal-bg); user-select: none; }
.manual-header .subtitle { color: var(--modal-bg); }
.manual-wrap .section { margin-bottom: 2.5rem; }
.section-label { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; margin-bottom: 0.4rem; }
.manual-wrap .section h2 { font-size: 16px; font-weight: 500; margin-bottom: 1rem; }
.manual-wrap .section p { font-size: 15px; margin-bottom: 1rem; color: var(--text); }
.manual-wrap .section p:last-child { margin-bottom: 0; }
.callout { background: var(--card); border-left: 2px solid var(--line); border-radius: 0 8px 8px 0; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.callout p { font-size: 14px; color: var(--muted); margin: 0; }
.manual-wrap .divider { border: none; border-top: 0.5px solid var(--line); margin: 2rem 0; }
.mbti-row { display: flex; flex-direction: column; gap: 18px; margin: 1.25rem 0; }
.mbti-item { display: flex; flex-direction: column; gap: 6px; }
.mbti-top { display: flex; align-items: baseline; justify-content: space-between; }
.mbti-type { font-size: 15px; font-weight: 500; letter-spacing: 0.06em; }
.mbti-pct { font-size: 13px; color: var(--muted); }
.mbti-bar-bg { width: 100%; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.mbti-bar-fill { height: 100%; border-radius: 3px; background: var(--muted); }
.mbti-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin: 0; }
.mbti-note { font-size: 12px; color: var(--muted); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 0.5px solid var(--line); }
.egogram-row { display: flex; flex-direction: column; gap: 12px; margin: 1rem 0; }
.ego-item { display: flex; align-items: center; gap: 12px; }
.ego-label { font-size: 13px; color: var(--muted); min-width: 150px; }
.ego-bar-bg { flex: 1; height: 5px; background: var(--line); border-radius: 3px; overflow: hidden; }
.ego-bar-fill { height: 100%; border-radius: 3px; background: var(--muted); }
.ego-score { font-size: 13px; font-weight: 500; min-width: 36px; text-align: right; }
.sub-heading { font-size: 14px; font-weight: 500; margin: 1.5rem 0 0.5rem; color: var(--muted); }
.warning-box { border: 0.5px solid var(--line); border-radius: 12px; padding: 1.25rem 1.5rem; margin-top: 1.5rem; }
.warning-box .wb-label { font-size: 11px; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.75rem; }
.warning-box p { font-size: 14px; line-height: 1.9; color: var(--muted); }
.name-journey { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 1rem 0; }
.name-tag { font-size: 15px; font-weight: 500; background: var(--card); border: 0.5px solid var(--line); border-radius: 8px; padding: 6px 14px; color: var(--text); }
.name-tag.current { border-color: var(--muted); }
.name-arrow { color: var(--muted); font-size: 14px; }
.manual-wrap .footer-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 0.5px solid var(--line); }
@media (max-width: 480px) { .ego-label { min-width: 120px; font-size: 12px; } }