@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
  --navy: #0E1C3A; --navy2: #1A2C55; --gold: #E8B03A; --gold-soft: #FBF1DA; --gold-ink: #8A5F00;
  --red: #E5484D; --ink: #18213A; --muted: #5E6780; --line: #E2E6EE; --paper: #F5F6FA; --white: #fff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Pretendard', 'Malgun Gothic', sans-serif; color: var(--ink); background: var(--paper); letter-spacing: -0.02em; word-break: keep-all; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px; }

/* 상단 */
.top { background: var(--navy); color: var(--white); }
.top .bar { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.top .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; }
.top .brand .lg { background: #fff; border-radius: 9px; padding: 4px 7px; display: flex; }
.top .brand img { height: 22px; display: block; }
.top .brand small { color: var(--gold); font-weight: 800; font-size: 13px; border: 1.5px solid var(--gold); border-radius: 999px; padding: 1px 8px; }
.top .tel { font-size: 13px; color: rgba(255,255,255,.75); font-weight: 600; }

/* 목록 첫 화면 */
.hero { background: var(--navy); color: #fff; padding: 22px 0 34px; }
.hero h1 { font-size: 30px; font-weight: 900; line-height: 1.25; letter-spacing: -0.04em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p { margin-top: 10px; font-size: 15px; color: rgba(255,255,255,.75); }
.list { margin-top: -18px; display: grid; gap: 14px; padding-bottom: 8px; }
.item { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 6px 18px rgba(14,28,58,.06); }
.item .th { flex: none; width: 96px; height: 128px; border-radius: 10px; background: var(--navy) center top / cover no-repeat; }
.item .meta { display: flex; flex-direction: column; min-width: 0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-ink); }
.chip.dark { background: var(--navy); color: var(--gold); }
.chip.off { background: #ECEEF3; color: var(--muted); }
.item h3 { font-size: 18px; font-weight: 900; margin-top: 8px; line-height: 1.3; color: var(--navy); }
.item p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.item .go { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 800; color: var(--navy); }
.item.closed { opacity: .65; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* 자료 페이지 */
.rhero { background: radial-gradient(ellipse at 50% 30%, #1D3570 0%, var(--navy) 70%); color: #fff; padding: 22px 0 30px; }
.rhero h1 { font-size: 32px; font-weight: 900; line-height: 1.2; letter-spacing: -0.045em; margin-top: 12px; }
.rhero h1 em { font-style: normal; color: var(--gold); }
.rhero .sub { font-size: 16px; color: rgba(255,255,255,.82); margin-top: 8px; font-weight: 600; }
.free { display: inline-block; margin-top: 16px; background: var(--red); color: #fff; font-weight: 900; font-size: 15px; padding: 7px 14px; border-radius: 10px; }
.sec { margin-top: 22px; }
.sec h2 { font-size: 15px; font-weight: 900; color: var(--gold-ink); margin-bottom: 10px; letter-spacing: .02em; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.points li { list-style: none; position: relative; padding-left: 16px; font-size: 15px; margin: 4px 0; }
.points li::before { content: ''; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

.group + .group { margin-top: 14px; }
.ghead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.ghead b { font-size: 20px; font-weight: 900; color: var(--navy); }
.ghead span { font-size: 13px; color: var(--muted); font-weight: 600; }
.dl { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; margin-top: 8px; cursor: pointer; transition: transform .08s; }
.dl:active { transform: scale(.985); }
.dl .ic { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--gold-soft); color: var(--gold-ink); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; }
.dl .t { flex: 1; min-width: 0; }
.dl .t b { display: block; font-size: 16px; font-weight: 800; }
.dl .t small { display: block; font-size: 12.5px; color: var(--muted); }
.dl .ar { flex: none; font-weight: 900; color: var(--navy); font-size: 18px; }
.dl.all { background: var(--navy); border-color: var(--navy); color: #fff; }
.dl.all .ic { background: var(--gold); color: var(--navy); }
.dl.all .t small { color: rgba(255,255,255,.7); }
.dl.all .ar { color: var(--gold); }
.dl.off { pointer-events: none; opacity: .5; }

.help { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
.tips { display: grid; gap: 8px; }
.tip { display: flex; gap: 12px; align-items: center; }
.tip b { flex: none; width: 58px; text-align: center; font-size: 13px; font-weight: 900; background: var(--gold-soft); color: var(--gold-ink); border-radius: 8px; padding: 5px 0; }
.tip span { font-size: 14.5px; }
.notice { font-size: 12.5px; color: var(--muted); background: #ECEEF3; border-radius: 12px; padding: 12px 14px; margin-top: 18px; }
.closedbox { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px 16px; text-align: center; }
.closedbox b { font-size: 18px; color: var(--navy); }
.closedbox p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* 학원 안내 */
.academy { margin-top: 26px; background: var(--navy); color: #fff; border-radius: 20px; padding: 20px; }
.academy b { font-size: 19px; font-weight: 900; display: block; line-height: 1.35; }
.academy p { font-size: 14px; color: rgba(255,255,255,.75); margin-top: 6px; }
.academy .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.btn { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 12px; font-weight: 800; font-size: 15px; }
.btn.gold { background: var(--gold); color: var(--navy); }
.btn.line { border: 1.5px solid rgba(255,255,255,.4); color: #fff; }
.foot { text-align: center; font-size: 12px; color: var(--muted); padding: 26px 0 40px; line-height: 1.8; }
.foot a { text-decoration: underline; }

/* 관리 화면 */
.admin h1 { font-size: 22px; font-weight: 900; margin: 20px 0 12px; }
.admin input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font-size: 16px; font-family: inherit; }
.admin button { margin-top: 8px; width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 800; font-size: 15px; font-family: inherit; cursor: pointer; }
.admin table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; margin-top: 10px; font-size: 14px; }
.admin th, .admin td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.admin th { background: var(--navy); color: #fff; font-weight: 700; font-size: 13px; }
.admin td.n { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.admin .kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.admin .kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.admin .kpi small { font-size: 12px; color: var(--muted); font-weight: 700; }
.admin .kpi b { display: block; font-size: 24px; font-weight: 900; color: var(--navy); }
.admin h2 { font-size: 16px; margin-top: 20px; }
.err { color: var(--red); font-size: 14px; margin-top: 8px; }
