/* 같이 공부하는 방 — 소개 페이지 (scrolls; the bar comes from shared/brand.css). Night palette like the room. */
:root {
  --ink: #f3efe6;
  --dim: rgba(243, 239, 230, 0.72);
  --faint: rgba(243, 239, 230, 0.48);
  --line: rgba(243, 239, 230, 0.14);
  --bg: #07080f;
  --panel: rgba(255, 255, 255, 0.035);
  --accent: #ffcf8a;
  --font: "Pretendard Variable", Pretendard, "Pretendard Fallback", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", "Malgun Gothic", "Noto Sans", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; padding-top: calc(var(--bar-h) + env(safe-area-inset-top, 0px)); }
a { color: inherit; }
main { width: min(1080px, 100%); margin: 0 auto; padding: 0 20px; }
html:not(:is(:lang(zh), :lang(ja), :lang(th), :lang(km), :lang(my))) :is(p, li, h1, h2, h3, summary) { word-break: keep-all; overflow-wrap: anywhere; }
html:is(:lang(th), :lang(km), :lang(my), :lang(si), :lang(bn), :lang(ne)) * { letter-spacing: 0 !important; }

.ai-note { margin: 12px 0 0; padding: 8px 14px; border-radius: 12px; background: rgba(255, 207, 138, 0.08); border: 1px solid rgba(255, 207, 138, 0.3); font-size: 13px; color: #ffe7c2; }
.ai-note[hidden] { display: none; }
.ai-note a { color: #fff; margin-left: 6px; display: inline-flex; align-items: center; min-height: 32px; }

/* hero: the hall picture on the right (top on phones), text on the left. Fixed aspect boxes: nothing moves when it draws. */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; padding: 34px 0 30px; }
.hero__art { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: #06070d; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 60px rgba(255, 190, 120, 0.06); order: 2; }
.hero__art canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__text { order: 1; display: flex; flex-direction: column; gap: 14px; }
.kicker { font-size: 13px; color: var(--accent); letter-spacing: 0.06em; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 300; letter-spacing: 0.04em; line-height: 1.12; text-shadow: 0 0 40px rgba(255, 207, 138, 0.25); }
.lede { font-size: 17px; line-height: 1.75; color: var(--dim); }
.live { font-size: 15px; color: var(--accent); min-height: 1.6em; font-variant-numeric: tabular-nums; }
.live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 9px; vertical-align: 2px; box-shadow: 0 0 8px var(--accent); animation: live-dot 1.6s ease-in-out infinite; }
@keyframes live-dot { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
.enter { margin-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 220px; padding: 0 30px; border-radius: 999px;
  font: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background 0.2s, transform 0.1s;
}
.btn.primary { background: var(--accent); color: #1d1408; box-shadow: 0 0 34px rgba(255, 207, 138, 0.35); }
.btn.primary:hover { background: #ffe0b0; }
.btn:active { transform: scale(0.98); }
.now { font-size: 13px; color: var(--faint); min-height: 1.5em; font-variant-numeric: tabular-nums; }

section { padding: 34px 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; }
h2 { font-size: 22px; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 18px; }
h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
section p, section li { font-size: 15px; line-height: 1.75; color: var(--dim); }
.muted { color: var(--faint) !important; font-size: 14px !important; margin-top: 10px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 20px; }
.steps .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 207, 138, 0.14); color: var(--accent); font-size: 14px; margin-bottom: 10px; }
.plain { list-style: none; display: grid; gap: 8px; }
.plain li { padding-left: 18px; position: relative; }
.plain li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); opacity: 0.7; }

/* the timer track: two 30-minute cycles; the marker moves by transform only */
.track { position: relative; display: grid; grid-template-columns: 25fr 5fr 25fr 5fr; gap: 3px; height: 34px; margin: 6px 0 30px; }
.track .seg { border-radius: 8px; }
.track .f { background: linear-gradient(90deg, rgba(255, 207, 138, 0.28), rgba(255, 207, 138, 0.5)); }
.track .b { background: rgba(150, 185, 255, 0.35); }
.track .mark { position: absolute; left: 0; top: -6px; bottom: -6px; width: 3px; border-radius: 2px; background: #fff; box-shadow: 0 0 10px #fff; transform: translateX(0); opacity: 0; transition: opacity 0.4s; will-change: transform; }
.track .tick { position: absolute; top: calc(100% + 6px); font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.track .t0 { left: 0; }
.track .t1 { left: 50%; transform: translateX(-50%); }
.track .t2 { right: 0; }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cols > div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 14px 0; font-size: 15.5px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 48px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--accent); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding: 0 0 16px; }

.ad-slot { margin: 28px 0; text-align: center; }
.ad-slot[hidden] { display: none; }

.tiles { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tiles a { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 14.5px; color: var(--ink); }
.tiles a:hover { background: rgba(255, 255, 255, 0.05); }

.foot { width: min(1080px, 100%); margin: 20px auto 0; padding: 24px 20px calc(30px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 6px; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .hero__art { order: 1; aspect-ratio: 16 / 10; }
  .hero__text { order: 2; }
  .steps, .cols { grid-template-columns: 1fr; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .live::before { animation: none; }
  .track .mark { transition: none; }
}
@media print { .ad-slot, .lab-bar { display: none !important; } }

/* 특별한 밤 (shared/special.js, 실험실 specials.json): 따뜻한 한 줄 */
.special-line { margin: 10px 0 0; padding: 8px 14px; border-radius: 12px; background: rgba(255, 205, 90, 0.12); border: 1px solid rgba(255, 205, 90, 0.5);
  color: #ffe6a3; font-weight: 600; line-height: 1.5; }
.special-line[hidden] { display: none; }

/* before landing.js draws the hall (slow network): a dim room instead of an empty box — wall, window glow, floor with desk rows */
.hero__art {
  background:
    radial-gradient(ellipse 34% 20% at 50% 24%, rgba(140, 150, 230, 0.16), transparent 70%),
    repeating-linear-gradient(180deg, transparent 0 7%, rgba(255, 200, 140, 0.05) 7% 9%) 0 62% / 100% 38% no-repeat,
    linear-gradient(180deg, #0c0d18 0%, #0e0e17 54%, #17120f 54%, #1c1512 100%);
}

/* 설명 글 구역 (tool-editorial-content): reuses .cols / .plain; only the numbered walk and spacing are new */
.ed h2:not(:first-child) { margin-top: 38px; }
.ed .walk { list-style: none; counter-reset: walk; display: grid; gap: 10px; margin-top: 14px; }
.ed .walk li { counter-increment: walk; position: relative; padding-left: 40px; }
.ed .walk li::before { content: counter(walk); position: absolute; left: 0; top: 0.1em; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 207, 138, 0.14); color: var(--accent); font-size: 14px; }
.ed .cols--ed p { font-size: 14.5px; }
.ed .tools a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; margin-right: 4px; }
.ed .tools a:hover { color: var(--accent); }

/* 정각 퀴즈 입구 (quiz/): 한 줄 링크 + 다음 판까지 남은 시간. 둘째 줄은 자리를 미리 잡아 둬서 숫자가 들어와도 아무것도 안 밀림 */
.quizline { font-size: 13.5px; line-height: 1.6; color: var(--dim); }
.quizline a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; margin-right: 6px; display: inline-flex; align-items: center; min-height: 32px; }
.quizline a:hover { color: var(--accent); }
.quizline__next { display: block; min-height: 1.6em; color: var(--faint); font-variant-numeric: tabular-nums; }
