/* =================================================================
   논술 기출 찾기 (2026-11-19 새로) — 홈(hub.css)과 같은 흰 바탕 + 파스텔
   계열 4버튼 → 학교(접기) → 학교별 수시/모의 연도 칸 → 아래 막대에서 PDF
   ================================================================= */
:root { --lav-g: #C9BCFF; --sky-g: #B3D1FF; --pink-g: #FFB8D0; --peach-g: #FFC9A3; --mint-g: #A8E6CF; --soft: #F6F7FB; }
body { background: #fff; font-size: 17px; }
.top { background: rgba(255, 255, 255, .95); }
main { padding-bottom: 150px; }
.views { margin: 4px 0 14px; }

/* 계열 4버튼 */
.find .cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 8px; margin: 6px -8px 18px; }
.cat { display: flex; align-items: center; justify-content: center; gap: 12px; border: 1.5px solid var(--line); border-radius: 22px; padding: 12px; background: #fff;
  font: inherit; font-size: 19px; font-weight: 800; color: var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s; }
.cat img { width: 52px; height: 52px; border-radius: 16px; background: var(--c); padding: 4px; object-fit: contain; }
.cat:hover { transform: translateY(-2px); }
.cat[aria-pressed="true"] { border-color: var(--ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--g) 40%, transparent), 0 12px 26px -12px var(--g); }

/* 학교 */
.uni-box { border: 1.5px solid var(--line); border-radius: 22px; padding: 12px; }
.uni-head { display: flex; gap: 8px; }
.q { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 16px; padding: 13px 18px; font: inherit; font-size: 18px; outline: none; background: #fff; }
.q:focus { border-color: var(--lav-g); box-shadow: 0 0 0 5px color-mix(in srgb, var(--lav-g) 30%, transparent); }
.fold { flex: none; width: 52px; border: 0; border-radius: 16px; background: var(--soft); cursor: pointer; display: grid; place-items: center; }
.fold svg { width: 24px; height: 24px; fill: none; stroke: var(--ink-2); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.fold[aria-expanded="false"] svg { transform: rotate(180deg); }
.unis { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.unis:empty { display: none; }
.uni { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 16px; font: inherit; font-size: 16px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.uni:hover { border-color: var(--ink-3); }
.uni[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.uni .d { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--mint-ink); margin-left: 6px; vertical-align: middle; }
.unis .none { color: var(--ink-3); padding: 4px 6px; }

/* 학교별 연도 칸 */
.mx { border: 1.5px solid var(--line); border-radius: 22px; padding: 6px 18px 12px; margin-top: 16px; }
.mx h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; margin: 12px 0 6px; }
.mx h3 .sp { flex: 1; }
.mx .x { border: 0; background: var(--soft); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; line-height: 1; color: var(--ink-3); cursor: pointer; }
.ln { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; }
.ln .t { width: 44px; flex: none; font-weight: 800; padding-top: 9px; color: var(--ink-2); }
.ys { display: flex; flex-wrap: wrap; gap: 8px; }
.cell { min-width: 60px; border: 0; border-radius: 12px; padding: 10px 8px; font: inherit; font-weight: 800; cursor: pointer; background: var(--soft); color: var(--ink-2); }
.cell:hover { background: #ECEBF3; }
.cell small { font-weight: 600; color: var(--ink-3); margin-left: 3px; font-size: 13px; }
.cell.open { box-shadow: 0 0 0 2px var(--ink-3) inset; }
.cell.on, .sub.on { background: var(--mint); color: var(--mint-ink); box-shadow: 0 0 0 3px var(--mint-g) inset; }
.subs { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 8px 56px; padding: 10px; border-radius: 14px; background: var(--soft); }
.sub { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 15px; font-weight: 800; color: var(--ink-2); cursor: pointer; }
.mx-empty { text-align: center; color: var(--ink-3); padding: 30px 0; }

/* 아래 막대 */
.pbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); }
.pbar .wrap { display: flex; align-items: center; gap: 10px; }
.picked { flex: 1; min-width: 0; font-weight: 800; font-size: 17px; }
.picked i { display: block; font-style: normal; font-weight: 600; font-size: 14px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picked .ph { color: var(--ink-3); font-weight: 700; }
.dl { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 16px; padding: 10px 18px 10px 12px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
  background: var(--c); color: var(--i); box-shadow: 0 0 0 5px color-mix(in srgb, var(--g) 30%, transparent); }
.dl img { width: 30px; height: 30px; object-fit: contain; }
.dl:disabled { opacity: .4; cursor: default; box-shadow: none; }
.pbar .status:empty { display: none; }
.pbar .status { flex: 1; margin-top: 8px; }
.pbar .status .note, .pbar .status .working { margin: 0; }

@media (max-width: 720px) {
  .find .cats { gap: 10px; margin: 4px -4px 14px; padding: 4px; }
  .cat { flex-direction: column; gap: 6px; font-size: 16px; padding: 10px 4px; border-radius: 18px; }
  .cat img { width: 46px; height: 46px; }
  .mx { padding: 4px 12px 10px; }
  .ln { gap: 8px; }
  .ln .t { width: 36px; }
  .cell { min-width: 52px; padding: 9px 6px; }
  .subs { margin-left: 0; }
  .dl { padding: 10px; }
  .dl span { display: none; }
  .picked { font-size: 15px; }
}

/* 예전에 풀었던 문제 띠 (2026-11-19) */
.cell.done, .sub.done { box-shadow: inset 0 -4px 0 #FFE08A; }
.cell.on.done, .sub.on.done { box-shadow: 0 0 0 3px var(--mint-g) inset, inset 0 -5px 0 #FFE08A; }
.picked .was { display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 800; color: var(--yellow-ink); background: var(--yellow); border-radius: 999px; padding: 2px 9px; vertical-align: middle; }
