/* 홍씨스터 메인 화면 (로그인 게이트 / 승인 대기 / 메인) — 낮·밤 모두 변수로 동작 */
.m-body a { text-decoration: none; }
.m-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.m-float-right { position: fixed; top: 16px; right: 16px; z-index: 20; }

/* ---------- 로고 ---------- */
.m-logo { display: flex; align-items: center; gap: 12px; }
.m-logo-mark { width: 48px; height: 48px; flex: none; filter: drop-shadow(0 8px 18px rgba(240, 138, 44, .35)); }
.m-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.m-logo-text b { font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.m-logo-text small { font-size: 10.5px; letter-spacing: .14em; color: var(--muted); margin-top: 4px; }
.m-logo-xl { flex-direction: column; gap: 14px; text-align: center; }
.m-logo-xl .m-logo-mark { width: 88px; height: 88px; }
.m-logo-xl .m-logo-text b { font-size: 34px; }
.m-logo-xl .m-logo-text { align-items: center; }
/* 얼굴 로고: 라운드 정사각형, 테두리 없음 */
.m-logo-face { width: 48px; height: 48px; flex: none; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 24px rgba(229, 57, 53, .18); }
.m-logo-face img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 30%; display: block; border: 0; }
.m-logo-xl .m-logo-face { width: 128px; height: 128px; border-radius: 30px; }

/* ---------- 비로그인: 로그인 게이트 ---------- */
.m-gate { min-height: calc(100vh - 90px); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 40px; }
.m-orbit { position: relative; width: min(360px, 82vw); aspect-ratio: 1; display: grid; place-items: center; margin: 32px 0 56px; }
.m-orbit-glow { position: absolute; inset: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 154, 31, .32), rgba(229, 57, 53, .12) 45%, transparent 70%); filter: blur(6px); animation: mGlow 5s ease-in-out infinite alternate; }
@keyframes mGlow { from { transform: scale(.94); opacity: .8; } to { transform: scale(1.06); opacity: 1; } }
.m-orbit-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(217, 84, 26, .38); animation: mSpin 60s linear infinite; }
html[data-theme="dark"] .m-orbit-ring { border-color: rgba(255, 170, 120, .42); }
.m-orbit-item { position: absolute; left: 50%; top: 50%; width: 0; height: 0;
  transform: rotate(calc(360deg / var(--n) * var(--i))) translateY(calc(min(360px, 82vw) / -2)); }
.m-orbit-item em { position: absolute; left: -28px; top: -28px; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-style: normal; font-size: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transform: rotate(calc(360deg / var(--n) * var(--i) * -1)); animation: mSpinBack 60s linear infinite; }
/* 아이콘 아래 과목 이름 (아이콘과 함께 돌지 않고 항상 똑바로) */
.m-orbit-item em small {
  position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: var(--fs-tag); font-weight: 800; line-height: 1; color: var(--text); letter-spacing: -.02em;
  /* 글씨만 보이게 — 배경색 그림자로 점선·빛 번짐과 겹쳐도 또렷하게 */
  text-shadow: 0 0 3px var(--bg), 0 0 6px var(--bg), 0 0 10px var(--bg);
}
@keyframes mSpin { to { transform: rotate(360deg); } }
@keyframes mSpinBack { from { rotate: 0deg; } to { rotate: -360deg; } }
.m-orbit-center { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .m-orbit-ring, .m-orbit-item em, .m-orbit-glow { animation: none; } }

.m-gate-copy { font-size: 18px; color: var(--muted); margin: 12px 0 18px; text-align: center; }
.m-gate-copy b { color: var(--label); }
.m-login { width: min(380px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 24px; box-shadow: var(--shadow); }
.m-auto { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--fs-sub); margin: 2px 0 4px; cursor: pointer; }
.m-login-links { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: var(--fs-sub); margin-top: 6px; }
.m-login-links a:hover { color: var(--accent-strong); }
.m-login-btn { align-self: center; width: 34%; min-width: 120px; padding: 9px 16px; font-size: var(--fs-btn); margin-top: 4px; }
.m-gate-note { color: #1d4f91; font-size: 15px; font-weight: 700; margin-top: 18px; text-align: center; padding: 9px 20px; border-radius: 999px; background: #e3f0ff; border: 1px solid #c7ddf7; }
html[data-theme="dark"] .m-gate-note { color: #9cc6ff; background: #16263a; border-color: #24405f; }

/* ---------- 승인 대기 ---------- */
.m-pending { min-height: calc(100vh - 160px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; gap: 14px; }
.m-pending-icon { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; color: var(--label);
  background: radial-gradient(circle, var(--warn-soft), transparent 70%); border: 1px solid var(--line); }
.m-pending-icon svg { width: 60px; height: 60px; animation: mFlip 3s ease-in-out infinite; }
@keyframes mFlip { 0%, 70% { transform: rotate(0); } 85%, 100% { transform: rotate(180deg); } }
.m-pending h1 { font-size: clamp(24px, 4vw, 34px); letter-spacing: -.03em; margin: 4px 0 0; line-height: 1.35; }
.m-pending p { margin: 0 0 10px; }

/* ---------- 승인 회원: 메인 ---------- */

.m-wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.m-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: clamp(40px, 8vw, 96px) 0 56px; }
.m-hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.12; letter-spacing: -.04em; margin: 16px 0 18px; }
.m-hero h1 em { font-style: normal; color: var(--label); }
.m-hero p { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
@media (max-width: 860px) { .m-hero { grid-template-columns: 1fr; } }

.m-demo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 18px 20px 22px; box-shadow: var(--shadow); transform: rotate(1.5deg); }
.m-demo-head { display: flex; gap: 6px; align-items: center; margin-bottom: 16px; }
.m-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.m-demo-title { margin-left: 8px; color: var(--muted); font-size: var(--fs-tag); }
.m-demo-chord { font-size: 88px; font-weight: 800; letter-spacing: -.05em; line-height: 1; text-align: center; color: var(--accent-strong); }
.m-demo-meter { height: 10px; border-radius: 10px; background: var(--bg-2); margin: 18px 0; overflow: hidden; }
.m-demo-meter i { display: block; height: 100%; width: 72%; background: var(--good); border-radius: 10px; animation: mMeter 2.6s ease-in-out infinite alternate; }
@keyframes mMeter { from { width: 48%; } to { width: 88%; } }
.m-demo-bubble { display: flex; gap: 12px; align-items: flex-start; background: var(--surface-2); border-radius: 14px; padding: 14px; }
.m-demo-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-strong); color: var(--btn-ink); font-weight: 800; }
.m-demo-bubble b { color: var(--accent-strong); font-size: var(--fs-tag); }
.m-demo-bubble p { margin: 2px 0 0; font-size: var(--fs-sub); }

.m-section { padding: 56px 0 24px; }
.m-section h2 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -.03em; margin: 0 0 8px; }
.m-cat { margin-top: 28px; }
.m-cat-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.m-cat-head h3 { margin: 0; font-size: 19px; color: var(--label); }
.m-cat-head span { color: var(--muted); font-size: var(--fs-sub); }
.m-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.m-subject { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.m-subject.open { opacity: 1; border-color: var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); transition: transform .12s ease; }
.m-subject.open:hover { transform: translateY(-3px); }
.m-subject-icon { font-size: 30px; }
.m-subject b { font-size: 17px; }
.m-subject small { color: var(--muted); font-size: var(--fs-tag); margin-bottom: 8px; }
.m-subject .hs-tag { align-self: flex-start; }

/* 이렇게 배워요: PC 4개 한 줄 · 태블릿 2×2 · 휴대폰 1개씩, 카드 높이는 모두 같게(grid-auto-rows: 1fr) */
.m-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 14px; margin-top: 20px; }
@media (max-width: 1024px) { .m-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .m-steps { grid-template-columns: 1fr; } }
.m-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.m-step span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-strong); color: var(--btn-ink); font-weight: 800; }
.m-step h3 { margin: 12px 0 6px; }
.m-step p { color: var(--muted); margin: 0; }

.m-cta { text-align: center; padding: 64px 20px; margin: 48px 0; border-radius: 24px; border: 1px solid var(--line); background: radial-gradient(600px 240px at 50% 0%, var(--accent-soft), var(--surface)); }
.m-cta h2 { margin: 0 0 20px; font-size: clamp(22px, 3vw, 30px); }

/* 내 코칭 이어하기 */
.m-my { padding: 40px 0 8px; }
.m-my h2 { font-size: clamp(22px, 3vw, 28px); letter-spacing: -.03em; margin: 0 0 16px; }
.m-my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; }
.m-my-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--accent); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); text-decoration: none; color: var(--text); transition: transform .12s ease; }
.m-my-card:hover { transform: translateY(-3px); }
.m-my-top { display: flex; align-items: center; gap: 10px; }
.m-my-top b { font-size: 19px; }
.m-my-prog { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.m-my-prog i { display: block; height: 100%; background: var(--good); border-radius: 8px; }
.m-my-card small { color: var(--muted); font-size: var(--fs-sub); }
.m-my-card p { margin: 0; font-weight: 600; font-size: var(--fs-body); }
.m-my-go { align-self: flex-start; margin-top: 4px; padding: 9px 18px; border-radius: 999px; background: var(--btn-grad); color: var(--btn-ink); font-weight: 800; font-size: var(--fs-btn-sm); }
.m-my-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 22px; border-radius: var(--radius); border: 1px dashed var(--accent); background: var(--surface); }
.m-my-empty p { margin: 0; color: var(--muted); font-size: var(--fs-body); }

/* 카테고리 바로가기 칩 */
.m-cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 8px; }
.m-cat-chips a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 700; font-size: 15px; text-decoration: none; }
.m-cat-chips a:hover { border-color: var(--accent); color: var(--accent-strong); }
.m-cat { scroll-margin-top: 80px; }
@media (max-width: 600px) {
  .m-cat-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .m-cat-chips a { flex: none; font-size: var(--fs-sub); padding: 7px 13px; }
}

/* 수강 가능 배지: 빨강 + 흰 글씨 + 반짝이는 점 */
.m-badge-open {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; font-size: var(--fs-tag); font-weight: 800; color: #ffffff;
  background: linear-gradient(135deg, #c62828, #a61b1b); box-shadow: 0 6px 16px rgba(166, 27, 27, .38);
}
.m-badge-open i { width: 8px; height: 8px; border-radius: 50%; background: #ffffff; animation: mBlink 1.4s ease-in-out infinite; }
@keyframes mBlink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
.m-subject.open { border-color: #f03e3e; box-shadow: 0 10px 26px rgba(240, 62, 62, .14); }
.m-subject.open:hover { box-shadow: 0 14px 32px rgba(240, 62, 62, .24); }
@media (prefers-reduced-motion: reduce) { .m-badge-open i { animation: none; } }

/* 가독성 보강 */
.m-subject b { font-size: 18px; }
.m-subject small { font-size: var(--fs-sub); color: var(--muted); font-weight: 500; }
.m-subject:not(.open) .m-subject-icon { filter: saturate(.7); }
.m-cat-head h3 { font-size: 21px; }
.m-cat-head span { font-size: var(--fs-body); color: var(--muted); }
.m-hero p { font-size: 18px; color: var(--muted); }
.m-step p { font-size: var(--fs-body); }
.m-demo-title { font-size: var(--fs-sub); }
.m-demo-bubble p { font-size: var(--fs-body); }
.m-logo-text small { font-size: 11.5px; color: var(--muted); }
.m-login-links, .m-auto { font-size: 15px; }
.m-gate-copy { font-size: 19px; color: var(--muted); font-weight: 600; }
.m-pending p { font-size: 17px; }

/* 모바일: 과목 카드 한 줄에 2개 */
@media (max-width: 600px) {
  .m-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .m-subject { padding: 14px 12px; }
  .m-subject-icon { font-size: 26px; }
  .m-subject b { font-size: var(--fs-body); }
  .m-subject small { font-size: var(--fs-tag); }
  .m-badge-open { font-size: var(--fs-tag); padding: 5px 10px; gap: 5px; }
  .m-cat-head { flex-wrap: wrap; gap: 4px 10px; }
  .m-wrap { padding: 0 14px; }
  .m-gate { padding-left: 14px; padding-right: 14px; overflow: hidden; }
  .m-orbit-item em small { font-size: var(--fs-tag); }
}

.m-foot { max-width: 1120px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 48px; border-top: 1px solid var(--line); display: flex; justify-content: center; text-align: center; font-size: var(--fs-sub); }

/* 내 코칭 카드: 하던 연습 있음 (이어하기) */
.m-my-resume { padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--accent); background: var(--surface); font-size: var(--fs-sub); line-height: 1.5; }
.m-my-resume small { color: var(--muted); font-size: var(--fs-tag); }

/* 소개 카드의 초록 막대 — 실제 기타 코드 연습의 "일치도" 막대(맞으면 오른쪽 끝 ✓)와 같은 모양 (2026-10-08) */
.m-demo-meter { position: relative; overflow: visible; margin-right: 30px; }
.m-demo-meter::after { content: "✓"; position: absolute; right: -26px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 900; line-height: 1; color: var(--good-ink); }

/* 첫 화면 소개 문구 — 세 줄이 한 덩어리로 읽히게 줄 간격만(문단 간격 없음), 마지막 줄만 강조 (2026-10-08) */
.m-hero-lines span { display: block; }
.m-hero-lines .m-hero-em { color: var(--text); font-weight: 700; }

/* 첫 화면 섹션 사이 간격 하나로 (2026-10-08): PC 80px · 휴대폰 48px — 코칭 상자→소개, 소개→과목, 과목→이렇게 배워요, 이렇게 배워요→오늘 3분 상담
   (제목↔설명·카드끼리·"이렇게 배워요" 제목↔카드 간격은 그대로) */
:root { --m-gap: 80px; }
@media (max-width: 860px) { :root { --m-gap: 48px; } }
.m-hero { padding: var(--m-gap) 0 0; }
.m-section { padding: var(--m-gap) 0 0; }
.m-cta { margin: var(--m-gap) 0 48px; }
.m-my { padding: 40px 0 0; }
@media (max-width: 860px) { .m-hero { padding-bottom: 4px; } }   /* 기울어진 데모 카드 아래 모서리 몫 — 휴대폰에서 소개→과목도 48px로 보이게 */

/* 밤 모드 색 정리 (2026-10-08) — 낮의 따뜻한 분위기를 밤에도: 빨강·노랑 경고 느낌 빼고 밝은 주황 + 따뜻한 회갈색 */
html[data-theme="dark"] .m-badge-open { background: var(--btn-grad); color: var(--btn-ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .m-badge-open i { background: var(--btn-ink); }
html[data-theme="dark"] .m-subject.open { border-color: var(--accent); box-shadow: 0 10px 26px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .m-subject.open:hover { box-shadow: 0 14px 32px rgba(0, 0, 0, .38); }
html[data-theme="dark"] .m-subject:not(.open) { background: var(--surface-2); border-color: var(--line); }   /* 준비 중 카드: 배경보다 밝게 떠 보이게 */
html[data-theme="dark"] .m-logo-face { box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .m-orbit-glow { background: radial-gradient(circle, rgba(242, 166, 90, .28), rgba(238, 138, 82, .1) 45%, transparent 70%); }
