/* 조교실 대시보드·교재 내지와 같은 결: 연회색 바탕 + 흰 종이 면, 검은 머리, 빨간 짧은 막대, 모서리 4px */
:root {
  --bg: #F2F3F5; --surface: #FFFFFF; --surface-2: #F7F8FA; --line: #E1E3E8; --line-2: #C9CCD4;
  --fg: #1F2024; --fg-2: #4A4D57; --fg-3: #8A8D99;
  --accent: #EF4D4D; --accent-soft: #FDECEC; --accent-ink: #C93636;
  --ok: #2B8A5E; --ok-soft: #E4F3EB; --wait: #B07A0E; --wait-soft: #FBF1DC;
  --f-display: "Paperlogy 7 Bold", "페이퍼로지 7 Bold", "Paperlogy", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --f-body: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --f-paper: "Nanum Myeongjo", "HCR Batang", "Batang", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 28px; padding: 0 28px; height: 56px; background: #000; color: #fff; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.brand .mark { width: 4px; height: 16px; background: var(--accent); align-self: center; }
.brand .sub { font-family: var(--f-body); font-weight: 400; font-size: 12px; color: #A9ACB6; }
nav { display: flex; gap: 4px; }
nav a { text-decoration: none; padding: 6px 12px; border-radius: 4px; color: #C9CCD4; font-size: 14px; }
nav a.on, nav a:hover { color: #fff; background: #1E1F23; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 28px 80px; }
.loading, .empty { color: var(--fg-3); padding: 24px 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px solid var(--line-2); position: relative; flex-wrap: wrap; }
.page-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 40px; height: 3px; background: var(--accent); }
.page-head h1 { margin: 0; font-family: var(--f-display); font-size: 26px; font-weight: 700; line-height: 1.25; }
.head-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--fg-2); }
.panel { background: var(--surface); border-radius: 4px; padding: 20px 22px; margin-bottom: 16px; }
.panel h2 { margin: 0 0 14px; font-family: var(--f-display); font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel h3 { font-size: 14px; margin: 16px 0 6px; }
.mute { color: var(--fg-3); } .small { font-size: 12px; font-weight: 400; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--fg); padding: 8px 14px; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: var(--fg-2); }
.btn.primary { background: #000; color: #fff; border-color: #000; }
.btn.primary:hover { background: #26272C; }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.big { padding: 12px 20px; font-size: 15px; width: 100%; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--fg-2); white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--accent-soft); color: var(--accent-ink); }
.pill.wait { background: var(--wait-soft); color: var(--wait); }
.pill.mute { color: var(--fg-3); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; color: var(--fg-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.list tr[data-id] { cursor: pointer; } table.list tr[data-id]:hover td { background: var(--surface-2); }
table.list td.t { font-weight: 600; }
.form label { display: block; margin: 0 0 14px; font-weight: 600; font-size: 13px; color: var(--fg-2); }
.form input, .form select, .form textarea, textarea { display: block; width: 100%; margin-top: 6px; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 4px; font: inherit; font-weight: 400; color: var(--fg); background: #fff; }
textarea { resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.seg button { border: 0; background: #fff; padding: 8px 18px; font: inherit; font-weight: 600; cursor: pointer; color: var(--fg-2); }
.seg button.on { background: #000; color: #fff; }
.drop { border: 1.5px dashed var(--line-2); border-radius: 4px; padding: 28px; text-align: center; color: var(--fg-2); cursor: pointer; background: var(--surface-2); margin-bottom: 10px; }
.drop:hover, .drop:focus { border-color: var(--fg-2); outline: none; }
.src-img { max-width: 100%; border: 1px solid var(--line); border-radius: 4px; display: block; }
.warn { color: var(--wait); font-size: 12px; margin: 6px 0 14px; }
.check-row { display: flex !important; align-items: center; gap: 8px; } .check-row input { width: auto; margin: 0; }
.progress { position: sticky; top: 64px; z-index: 4; display: flex; align-items: center; gap: 12px; background: #000; color: #fff; padding: 12px 18px; border-radius: 4px; margin-bottom: 16px; }
.progress .mute { color: #A9ACB6; } .progress .btn { margin-left: auto; }
.spin { width: 14px; height: 14px; border: 2px solid #555; border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.errbox { border-left: 3px solid var(--accent); display: flex; gap: 12px; align-items: center; }
.memo { color: var(--fg-2); margin: -6px 0 14px; }
.two { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.meta { font-size: 13px; color: var(--fg-2); margin-bottom: 8px; }
.note { background: var(--surface-2); border-radius: 4px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.note p { margin: 4px 0 0; }
.warn-text { color: var(--wait); } .bad-text { color: var(--accent-ink); font-weight: 600; }
details { margin: 10px 0; } summary { cursor: pointer; color: var(--fg-2); font-weight: 600; font-size: 13px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; margin-bottom: 12px; }
.card { border: 1px solid var(--line); border-radius: 4px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.card.chosen { border-color: #000; box-shadow: inset 3px 0 0 var(--accent); }
.card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.card dl { display: grid; grid-template-columns: 70px 1fr; gap: 4px 8px; margin: 0; font-size: 13px; }
.card dt { color: var(--fg-3); } .card dd { margin: 0; }
.card p { margin: 0; font-size: 13px; color: var(--fg-2); flex: 1; }
.card .btn { align-self: flex-start; }
.facts > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts span { display: block; font-size: 12px; color: var(--fg-3); margin-bottom: 2px; }
.facts p { margin: 2px 0; }
.inner { padding: 6px 2px; } .inner p { margin: 6px 0; }
ul.check { list-style: none; padding: 0; margin: 0; } ul.check li.no { color: var(--accent-ink); }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; } .grow { flex: 1; }
.revise { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; }
.revise textarea { margin: 0; } .revise .btn { white-space: nowrap; }
ul.fb { list-style: none; padding: 0; margin: 0; } ul.fb li { padding: 8px 0; border-bottom: 1px solid var(--line); } ul.fb li.off { opacity: .45; }
ul.fb label { display: flex; gap: 8px; align-items: baseline; font-weight: 400; } ul.fb input { width: auto; }

/* 수능 시험지 캡처풍 문항 */
.q-paper { background: #fff; border: 1px solid var(--line); padding: 22px 24px 20px; display: flex; gap: 10px; font-family: var(--f-paper); font-size: 15.5px; line-height: 2.0; color: #000; }
.q-no { font-family: "Times New Roman", serif; font-weight: 700; font-size: 17px; line-height: 1.85; }
.q-body { flex: 1; min-width: 0; }
.q-body p { margin: 0 0 6px; }
.q-display { text-align: center; margin: 6px 0; }
.q-box { border: 1px solid #000; padding: 10px 14px; margin: 8px 0 10px; position: relative; }
.q-box.bogi { padding-top: 16px; }
.q-bogi { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #fff; padding: 0 8px; font-size: 14px; }
.q-item { display: flex; gap: 6px; } .q-tag { flex: none; }
.q-choices { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 6px 14px; margin-top: 12px; }
.q-choices.long { grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px 36px; }
.q-choices b { font-weight: 400; }
.katex { font-size: 1.02em; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #000; color: #fff; padding: 10px 16px; border-radius: 4px; opacity: 0; pointer-events: none; transition: .2s; max-width: 90vw; z-index: 10; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.bad { background: var(--accent-ink); }

@media (max-width: 820px) {
  .top { gap: 12px; padding: 0 14px; overflow-x: auto; } .brand .sub { display: none; }
  main { padding: 18px 14px 60px; }
  .two, .row { grid-template-columns: 1fr; }
  .revise { flex-direction: column; }
  table.list th:nth-child(2), table.list td:nth-child(2), table.list th:nth-child(6), table.list td:nth-child(6) { display: none; }
  .q-paper { padding: 16px; font-size: 14.5px; }
}
