/* 홈 */

/* ---------- 지금 할 일: 남색 카드 + OMR 무늬 + 형광펜 ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  border-radius: var(--r-xl); color: var(--on-navy);
  background:
    radial-gradient(120% 140% at 100% 0%, var(--navy-2) 0%, transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, color-mix(in srgb, var(--navy) 80%, #000) 100%);
  box-shadow: var(--shadow-2), inset 0 1px 0 rgba(255, 255, 255, .08);
}
/* OMR 답안지 칸 무늬(오른쪽으로 갈수록 진해짐) */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(ellipse 4px 6.5px at 50% 50%, transparent 74%, rgba(255, 120, 144, .55) 78%, rgba(255, 120, 144, .55) 92%, transparent 96%);
  background-size: 22px 26px;
  -webkit-mask-image: linear-gradient(100deg, transparent 35%, rgba(0, 0, 0, .55) 100%);
  mask-image: linear-gradient(100deg, transparent 35%, rgba(0, 0, 0, .55) 100%);
  opacity: .55;
}
.hero-main { padding: 32px 34px 26px; min-width: 0; }
.hero .eyebrow { color: var(--hi); display: inline-flex; align-items: center; gap: 8px; }
.hero .eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--hi); box-shadow: 0 0 0 4px rgba(255, 217, 59, .2); }
.hero-title { font-family: var(--f-serif); font-size: var(--fs-3xl); font-weight: 700; line-height: 1.3; letter-spacing: var(--ls-display); margin-top: 12px; color: #fff; }
.hero-title .hl { color: inherit; background: linear-gradient(transparent 70%, var(--hi) 70%, var(--hi) 90%, transparent 90%) no-repeat 0 0 / 100% 100%; padding: 0 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
#view.enter .hero-title .hl { animation: sweep 700ms 120ms var(--ease) backwards; }
@keyframes sweep { from { background-size: 0% 100%; } }
.hero-sub { color: var(--on-navy-2); margin-top: 10px; max-width: 36em; font-size: var(--fs-md); line-height: 1.6; }
.hero-cta { margin-top: 24px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.hero-cta .hint { font-size: 12.5px; color: var(--on-navy-2); }
.next-list { list-style: none; margin: 26px 0 0; padding: 16px 0 0; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-direction: column; gap: 2px; }
.next-list button { display: flex; align-items: center; gap: 12px; border: 0; background: none; text-align: left; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; color: var(--on-navy); width: calc(100% + 20px); transition: background var(--dur); }
.next-list button:hover { background: rgba(255, 255, 255, .07); }
.next-list button:focus-visible { outline-color: var(--hi); }
.nl-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 255, 255, .09); color: var(--on-navy); flex: none; border: 1px solid rgba(255, 255, 255, .08); }
.nl-t { flex: 1; font-size: var(--fs-base); min-width: 0; }
.nl-go { color: var(--on-navy-2); transition: transform var(--dur) var(--ease), color var(--dur); }
.next-list button:hover .nl-go { color: var(--hi); transform: translateX(3px); }

.hero-side {
  margin: 14px 14px 14px 0; padding: 22px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  display: flex; flex-direction: column; gap: 20px; justify-content: center;
}
.hero-side .eyebrow { color: var(--on-navy-2); }
.hero-side .faint { color: var(--on-navy-2); }
.hero-side .ring-bg { stroke: rgba(255, 255, 255, .12); }
.hero-side .ring-fg { stroke: url(#g-hi); }
.hero-side .ring-in small { color: var(--on-navy-2); }
.today { display: flex; align-items: center; gap: 18px; }
.today-txt p.num { font-size: 20px; font-weight: 500; margin-top: 2px; color: #fff; }
.dday { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); }
.dday-num { font-size: 40px; font-weight: 500; line-height: 1; margin-top: 6px; color: #fff; letter-spacing: -.04em; }
.dday-date input { font-size: 12.5px; min-height: 32px; padding: 4px 8px; color: var(--on-navy); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color-scheme: dark; }
.hero .faint { color: var(--on-navy-2); }

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-side { margin: 0 14px 14px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .dday { border-top: 0; padding-top: 0; flex-direction: column; align-items: flex-end; gap: 8px; }
}
@media (max-width: 520px) {
  .hero-main { padding: 24px 20px 18px; }
  .hero-title { font-size: 26px; }
  .hero-cta .btn { width: 100%; }
  .hero-side { margin: 0 10px 10px; padding: 16px; flex-direction: column; align-items: stretch; gap: 14px; }
  .dday { flex-direction: row; align-items: flex-end; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 14px; }
  .dday-num { font-size: 34px; }
  .today .ring { width: 84px !important; height: 84px !important; }
  .today .ring-in b { font-size: 20px; }
}

/* ---------- 공부 타이머 ---------- */
.goal { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); }
.goal input { width: 70px; min-height: 30px; padding: 3px 8px; font-size: 13px; }
.timer { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.clock { position: relative; font-size: 46px; font-weight: 500; letter-spacing: -.04em; line-height: 1; min-width: 4.2ch; }
.clock.running { color: var(--ok); }
.clock.running::after { content: ""; position: absolute; right: -14px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.7); } }
.timer-ctl { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 220px; }
.stackbar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--rule-2); margin-top: 22px; gap: 2px; }
.stackbar span { min-width: 0; }
.stackbar .rest { background: transparent; }

/* ---------- 최근 7일 ---------- */
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; }
.chart-box { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--ink-3); font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 11px; }
.chart .t-today { fill: var(--ink); font-weight: 600; }
.chart .t-val { fill: var(--ink-2); }
.chart .grid { stroke: var(--rule-2); stroke-width: 1; }
.chart .goal-line { stroke: var(--hi-2); stroke-width: 1.5; stroke-dasharray: 4 5; }
.chart .goal-t { fill: var(--warn); font-family: var(--f-ui); font-size: 11px; font-weight: 600; }
.chart rect { transition: opacity var(--dur); }
.chart rect:hover { opacity: .8; }
.chart-empty { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 13px; color: var(--ink-3); }

/* ---------- 정답률과 속도 ---------- */
.acc-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.acc-area { position: relative; overflow: hidden; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--rule-2); display: flex; flex-direction: column; gap: 4px; }
.acc-area.a-verbal { background: linear-gradient(155deg, color-mix(in srgb, var(--verbal) 11%, var(--sheet)) 0%, var(--sheet) 70%); }
.acc-area.a-reasoning { background: linear-gradient(155deg, color-mix(in srgb, var(--reason) 11%, var(--sheet)) 0%, var(--sheet) 70%); }
.acc-area .glyph { position: absolute; right: 8px; bottom: -14px; font-family: var(--f-serif); font-weight: 700; font-size: 72px; line-height: 1; opacity: .07; pointer-events: none; }
.aa-top { display: flex; justify-content: space-between; align-items: center; }
.aa-big { font-family: var(--f-num); font-variant-numeric: tabular-nums; font-size: 38px; font-weight: 500; line-height: 1.15; margin-top: 6px; letter-spacing: -.04em; }
.aa-big small { font-size: 16px; color: var(--ink-3); }
.aa-pace { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

/* ---------- 시험 구성 · 백업 ---------- */
.tbl-wrap { overflow-x: auto; }
table.exam { width: 100%; border-collapse: collapse; font-size: 14px; }
table.exam th, table.exam td { padding: 11px 8px; border-bottom: 1px solid var(--rule-2); text-align: left; white-space: nowrap; }
table.exam tr:last-child td { border-bottom: 0; }
table.exam th { font-size: 12px; color: var(--ink-3); font-weight: 600; }
table.exam tbody tr { transition: background var(--dur); }
table.exam tbody tr:hover { background: var(--sheet-2); }
table.exam .r { text-align: right; }
.file-btn { position: relative; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.fallback { margin-top: 16px; font-size: 13.5px; }
.fallback summary { cursor: pointer; color: var(--ink-3); }
#importBox .banner { margin-top: 14px; }

/* ---------- 유형별 숙련도 ---------- */
.ml-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-3); margin: -2px 0 10px; }
.ml-legend span { display: inline-flex; align-items: center; gap: 5px; }
.ml-legend i { width: 14px; height: 6px; border-radius: 3px; }
.mastery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 20px; }
.ml-row { display: grid; grid-template-columns: minmax(0, 1fr) 76px 52px; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--rule-2); font-size: var(--fs-sm); }
.ml-t { display: flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.ml-dot.verbal { background: var(--verbal); } .ml-dot.reasoning { background: var(--reason); }
.ml-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; }
.ml-bar i { height: 6px; border-radius: 3px; background: var(--rule-2); }
.l1, .ml-bar i.l1 { background: var(--other-2); }
.ml-bar i.l2, .ml-legend .l2 { background: color-mix(in srgb, var(--accent) 45%, var(--sheet)); }
.ml-bar i.l3, .ml-legend .l3 { background: var(--accent); }
.ml-bar i.l4, .ml-legend .l4 { background: linear-gradient(90deg, var(--ok), color-mix(in srgb, var(--ok) 60%, var(--hi))); }
.ml-legend .l1 { background: var(--other-2); }
.ml-l { font-size: var(--fs-xs); text-align: right; color: var(--ink-3); font-weight: 600; background: none !important; }
.ml-l.l3 { color: var(--accent-2); } .ml-l.l4 { color: var(--ok); }
@media (max-width: 560px) { .mastery { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 최근 12주 공부 달력 ---------- */
.heat { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule-2); }
.heat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.heat-grid { display: grid; grid-template-rows: repeat(7, 15px); grid-auto-flow: column; grid-auto-columns: 15px; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
.heat-grid i, .heat-legend i { display: block; width: 15px; height: 15px; border-radius: 4px; background: var(--rule-2); transition: transform var(--dur) var(--ease); }
.heat-grid i:hover { transform: scale(1.25); }
.heat-legend { display: flex; align-items: center; gap: 4px; margin-top: 10px; }
.heat-legend i { width: 11px; height: 11px; border-radius: 3px; }
.heat-legend .faint { font-size: var(--fs-2xs); margin: 0 4px; }
.hm-1 { background: color-mix(in srgb, var(--accent) 22%, var(--sheet)) !important; }
.hm-2 { background: color-mix(in srgb, var(--accent) 48%, var(--sheet)) !important; }
.hm-3 { background: var(--accent) !important; }
.hm-4 { background: var(--hi-2) !important; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hi-2) 60%, #000); }

.dday-num, .aa-big { font-variant-numeric: proportional-nums; }

/* ---------- 맨 위 문구: it's leet ---------- */
.slogan { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 28px; margin: 2px 0 22px; }
.catch { font-family: var(--f-serif); font-weight: 900; font-size: clamp(38px, 6.2vw, 60px); line-height: 1; letter-spacing: -.035em; color: var(--ink); }
.catch .dot { color: var(--omr); }
.tagline { font-family: var(--f-serif); font-weight: 700; font-size: clamp(17px, 2.2vw, 23px); line-height: 1.4; color: var(--ink-2); }
/* '만점'에 빨간 펜 동그라미 */
.tagline .full { position: relative; display: inline-block; color: var(--ink); padding: 0 3px; margin: 0 8px; }
.tagline .full::after { content: ""; position: absolute; inset: -7px -8px -5px; border: 2px solid var(--omr); border-radius: 50%; transform: rotate(-7deg); pointer-events: none; }
#view.enter .tagline .full::after { animation: pen-circle 420ms 280ms cubic-bezier(.34, 1.4, .64, 1) backwards; }
@keyframes pen-circle { from { opacity: 0; transform: rotate(-20deg) scale(1.35); } }
@media (max-width: 520px) { .slogan { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 18px; } }
