/* 아우로라 아카데미아 홍보 사이트 — 남색 · 금 · 크림 (별의 방 보고서만 보라 · 검정) */
:root {
  --bg: #0c0e18; --panel: #161a2e; --panel2: #1d2340; --line: #2c3354;
  --gold: #c9a252; --cream: #eee4cd; --text: #e6e2d8; --muted: #a8a6b4;
  --night: #120c1e; --violet: #6b4fa0; --red: #b3263a;
  --serif: "Noto Serif KR", serif; --sans: "Noto Sans KR", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.7; overflow-x: hidden; }
body.night { background: var(--night); }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
h1, h2, h3 { font-family: var(--serif); color: var(--cream); line-height: 1.35; margin: 0 0 .6em; }
h1 { font-size: clamp(26px, 6vw, 40px); }
h2 { font-size: clamp(22px, 5vw, 30px); }
h3 { font-size: 19px; }
main > section { max-width: 1040px; margin: 0 auto; padding: 48px 16px; }
main > section.band { max-width: none; background: var(--panel); }
main > section.band > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.lead { color: var(--muted); max-width: 680px; }
.center { text-align: center; }
.center .lead, .center p { margin-left: auto; margin-right: auto; }

/* 머리 · 바닥 */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 8px 16px;
  background: rgba(12, 14, 24, .92); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--cream); font-family: var(--serif); font-weight: 700; }
.brand img { width: 30px; height: 30px; object-fit: contain; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.tabs a.on, .tabs a:hover { color: var(--cream); background: var(--panel2); }
@media (max-width: 640px) { .tabs { margin-left: 0; width: 100%; } }
.foot { border-top: 1px solid var(--line); padding: 32px 16px 48px; text-align: center; color: var(--muted); font-size: 14px; }
.crests { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.crests img { width: 44px; height: 44px; object-fit: contain; opacity: .85; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 12px 20px; border-radius: 8px; border: 1px solid var(--gold);
  color: var(--cream); background: transparent; font: 700 16px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: rgba(201, 162, 82, .12); }
.btn-gold { background: var(--gold); color: #1a1408; }
.btn-gold:hover { background: #d8b468; }
.btn[aria-disabled] { opacity: .55; cursor: default; }
.btn-adult { border-color: #8a3a4a; color: #f2c4cc; }
.btn-adult:hover { background: rgba(179, 38, 58, .15); }
.btn-sm { padding: 8px 12px; font-size: 14px; }
.cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.cta.center { justify-content: center; }
.link { background: none; border: 0; color: var(--muted); font: 14px var(--sans); cursor: pointer; padding: 8px 0; }

/* 첫 화면 */
.hero { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: center; }
.hero-art img { width: 100%; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.hero-text .logo { width: 100%; max-width: 560px; }
.hook { font-family: var(--serif); font-size: clamp(20px, 5vw, 28px); color: var(--cream); margin: 0; }
.sub-hook { color: var(--muted); margin: 10px 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .hero-art { max-width: 300px; margin: 0 auto; }
  .hero-text { text-align: center; } .hero-text .logo { margin: 0 auto; } .hero-text .cta { justify-content: center; }
}
.why p { font-family: var(--serif); font-size: 18px; color: var(--cream); margin: 0 0 .7em; max-width: 720px; }

/* 학부 */
.facs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 18px; }
.fac { background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--fc); border-radius: 10px; padding: 16px; text-align: center; }
.fac img { width: 84px; height: 84px; object-fit: contain; margin: 0 auto 8px; }
.fac h3 { margin-bottom: 2px; }
.fac .door { font-size: 13px; color: var(--fc); filter: brightness(1.4); }
.fac p { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.points { padding-left: 1.2em; margin: 0; }
.points li { margin: .35em 0; }
h3.sub { margin-top: 28px; }
.starts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.start { background: var(--panel2); border-radius: 10px; padding: 14px 16px; }
.start b { color: var(--gold); }
.start p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.toon { max-width: 640px; margin: 0 auto; }
.toon img { width: 100%; }

/* 시험 */
.exam-wrap { max-width: 760px !important; }
.sheet { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px 20px; }
.crest-big { width: 120px; height: 120px; object-fit: contain; margin: 0 auto 10px; }
.name { display: block; margin: 18px auto; color: var(--muted); }
.name input { margin-left: 8px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 16px var(--sans); width: 190px; }
.exam, .doors, .result, #intro { scroll-margin-top: 112px; }
.exam { position: relative; border-radius: 14px; overflow: hidden; min-height: 560px; border: 1px solid var(--line); }
.q-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(.45); transition: background-image .3s; }
.q-box { position: relative; padding: 22px 18px; }
.q-top { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--cream); }
.bar { flex: 1; height: 4px; background: rgba(255, 255, 255, .2); border-radius: 2px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .3s; }
.q-text { font-family: var(--serif); font-size: clamp(19px, 4.6vw, 24px); color: #fff; margin: 22px 0 18px; text-shadow: 0 2px 8px #000; }
.q-opts { display: grid; gap: 10px; }
.q-opts button { text-align: left; padding: 14px 16px; border-radius: 10px; border: 1px solid rgba(238, 228, 205, .35); background: rgba(12, 14, 24, .78);
  color: var(--text); font: 16px var(--sans); cursor: pointer; }
.q-opts button:hover, .q-opts button.picked { border-color: var(--gold); background: rgba(40, 34, 20, .88); }
.doors { min-height: 420px; display: grid; place-items: center; position: relative; overflow: hidden; border-radius: 14px; background: #05060c; }
.door-light { position: absolute; inset: 0; background: radial-gradient(ellipse at center, var(--dc, #c9a252) 0%, transparent 65%); opacity: 0; transform: scale(.3);
  transition: opacity 1.1s ease, transform 1.4s ease; }
.doors.open .door-light { opacity: .9; transform: scale(1.4); }
.doors p { position: relative; font-family: var(--serif); font-size: 24px; color: #fff; text-shadow: 0 2px 10px #000; }
.result { display: grid; gap: 16px; }
.result canvas, .result .cardimg { width: 100%; max-width: 480px; margin: 0 auto; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); }
.copybox { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.copybox .label { font-size: 13px; color: var(--muted); }
.copybox p { font-family: var(--serif); color: var(--cream); margin: 4px 0 10px; }

/* 학적부 */
.head-sec { padding-bottom: 8px !important; }
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-bottom: 3px solid var(--fc); border-radius: 10px; padding: 0; overflow: hidden;
  text-align: left; color: var(--text); font: 14px/1.6 var(--sans); cursor: pointer; }
.pcard img { width: 100%; aspect-ratio: 1216 / 832; object-fit: cover; }
.pcard span { display: block; padding: 10px 12px 12px; color: var(--muted); }
.pcard:hover { border-color: var(--gold); }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .78); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-in { position: relative; max-width: 760px; width: 100%; background: var(--panel); border-radius: 12px; padding: 12px; }
.modal-in img { width: 100%; border-radius: 8px; }
.x { position: absolute; top: 4px; right: 8px; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff; border: 0; font-size: 26px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.faces { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.faces button { padding: 6px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 14px var(--sans); cursor: pointer; }
.faces button.on { border-color: var(--gold); color: var(--gold); }
#pmLine { margin: 6px 4px 4px; color: var(--muted); }

/* 습격 시계 */
.bgimg { position: relative; isolation: isolate; }
.bgimg::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg) center / cover; background-image: linear-gradient(rgba(12, 14, 24, .55), rgba(12, 14, 24, .92)), var(--bg); }
.head-sec.bgimg { max-width: none !important; padding: 72px 16px 40px !important; }
.head-sec.bgimg > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.cal { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.cal li { position: relative; padding: 10px 0 14px 20px; }
.cal li::before { content: ""; position: absolute; left: -7px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.cal li.r1::before { background: var(--gold); }
.cal li.r2::before { background: var(--red); box-shadow: 0 0 0 4px rgba(179, 38, 58, .3); }
.cal .mon { display: block; font-size: 13px; color: var(--muted); }
.cal b { font-family: var(--serif); color: var(--cream); font-size: 18px; }
.cal .risk, .cal .threat { white-space: nowrap; }
.cal .risk { margin-left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(201, 162, 82, .18); color: var(--gold); }
.cal li.r2 .risk { background: rgba(179, 38, 58, .25); color: #ff8b9a; }
.cal p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.cal .threat { display: inline-block; margin-left: 8px; font-size: 12px; padding: 2px 8px; border-radius: 10px; background: rgba(107, 79, 160, .3); color: #d4c2f2; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.heat { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 3px; }
.heat th { font: 500 11px var(--sans); color: var(--muted); padding: 0; }
.heat thead th:first-child, .heat tbody th { width: 52px; }
.heat tbody th button { width: 100%; padding: 6px 0; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--cream); font: 700 12px var(--sans); cursor: pointer; }
.heat tr.on th button { border-color: var(--gold); color: var(--gold); }
.heat td { padding: 0; height: 30px; cursor: pointer; }
.heat td i, .legend i { background: #232a45; }
.heat td i { display: block; height: 100%; border-radius: 4px; }
.heat .r1 i, .legend .r1 i { background: rgba(201, 162, 82, .75); }
.heat .r2 i, .legend .r2 i { background: var(--red); }
.heat tr.on td i { outline: 1px solid rgba(238, 228, 205, .35); }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.ytabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ytab { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 700 15px var(--sans); cursor: pointer; }
.ytab.on { border-color: var(--gold); color: var(--gold); }
.locks { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lock { background: var(--panel2); border: 1px dashed var(--line); border-radius: 10px; padding: 16px; }
.lock b { color: var(--gold); font-family: var(--serif); }
.lock p { margin: 4px 0 0; font-family: var(--serif); color: var(--cream); }

/* 별의 방 보고서 */
.report.bgimg { max-width: none !important; padding: 56px 16px !important; }
.report .paper { position: relative; max-width: 680px; margin: 0 auto; background: rgba(28, 18, 40, .9); border: 1px solid #4a3470; border-radius: 6px;
  padding: 32px 22px; box-shadow: 0 16px 50px rgba(0, 0, 0, .6); }
.report .stamp { position: absolute; top: 18px; right: 18px; transform: rotate(-12deg); border: 3px solid #c0435a; color: #c0435a; padding: 2px 10px;
  font: 900 20px var(--serif); border-radius: 4px; opacity: .85; }
.report .from { color: #b9a4d8; font-size: 14px; margin-top: -6px; }
.report .lines p { font-family: var(--serif); color: var(--cream); font-size: 18px; margin: .6em 0; }
.ents { display: grid; gap: 14px; }
.ent { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; background: #1b1430; border: 1px solid #3a2a5a; border-radius: 10px; padding: 12px; align-items: center; }
.ent img { border-radius: 8px; }
.ent .way { font-size: 13px; color: #b9a4d8; }
.ent h3 { margin: 0 0 4px; }
.ent p { margin: 0 0 6px; color: var(--muted); font-size: 15px; }
.ent q { font-family: var(--serif); color: var(--cream); }
@media (max-width: 640px) { .ent { grid-template-columns: 1fr; } }

/* 알림 */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--gold); color: #1a1408; padding: 10px 18px; border-radius: 20px;
  font-weight: 700; z-index: 60; opacity: 0; transition: opacity .25s; pointer-events: none; }
.toast.on { opacity: 1; }
