/* 깊은생각 조윤형 학생 사이트 — 남색 바탕 + 네 색 포인트 */
:root {
  --navy: #14234a; --navy2: #1d3163; --ink: #1d2433; --sub: #5d6678; --line: #e3e6ee; --bg: #f4f6fa;
  --or: #EE5A24; --yl: #F5921E; --bl: #1C6EC0; --tl: #0E8282; --red: #d63031; --ok: #0E8282;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 16px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
a { color: var(--bl); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }

/* 머리띠 */
header.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
header.top .in { max-width: 860px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.logo .dots { display: grid; grid-template-columns: 8px 8px; gap: 2px; }
.logo .dots i { width: 8px; height: 8px; border-radius: 2px; display: block; }
.logo small { font-weight: 500; opacity: .7; font-size: 12px; }
header.top .who { margin-left: auto; font-size: 13px; opacity: .85; }
nav.tabs { background: var(--navy2); }
nav.tabs .in { max-width: 860px; margin: 0 auto; display: flex; overflow-x: auto; }
nav.tabs a { color: #c9d3ea; padding: 10px 14px; white-space: nowrap; font-size: 15px; border-bottom: 3px solid transparent; position: relative; }
nav.tabs a.on { color: #fff; border-bottom-color: var(--yl); font-weight: 700; }
nav.tabs a .badge { padding: 0 6px; font-size: 11px; vertical-align: 2px; }

main { max-width: 860px; margin: 0 auto; padding: 18px 16px 80px; }
h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: -0.02em; }
h2 { font-size: 18px; margin: 22px 0 10px; }
.muted { color: var(--sub); font-size: 14px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.card.pin { border-left: 4px solid var(--or); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #eef1f7; color: var(--sub); }
.badge.or { background: #fde7df; color: var(--or); }
.badge.bl { background: #e1edf9; color: var(--bl); }
.badge.tl { background: #dcf0f0; color: var(--tl); }
.badge.yl { background: #fdeedb; color: #b8650b; }
.badge.red { background: var(--red); color: #fff; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* 폼 */
label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=date], input[type=datetime-local], input[type=number], select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cdd3df; border-radius: 9px; background: #fff; font-size: 16px; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--bl); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 18px; border-radius: 9px; border: 0; background: var(--navy); color: #fff; font-weight: 700; cursor: pointer; font-size: 15px; }
.btn.or { background: var(--or); } .btn.bl { background: var(--bl); } .btn.tl { background: var(--tl); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #cdd3df; }
.btn.sm { padding: 6px 12px; font-size: 14px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.msg { margin-top: 10px; font-size: 14px; }
.msg.err { color: var(--red); } .msg.ok { color: var(--ok); }
.seg { display: flex; border: 1px solid #cdd3df; border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: #fff; padding: 10px; cursor: pointer; font-weight: 600; color: var(--sub); }
.seg button.on { background: var(--navy); color: #fff; }

/* 로그인 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 20px; }
.login-box { background: #fff; border-radius: 16px; padding: 28px 24px; width: 100%; max-width: 380px; }
.login-box .logo { color: var(--navy); font-size: 20px; margin-bottom: 4px; }
.login-box .logo small { color: var(--sub); }

/* 영상 */
.vlist .card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.vlist .num { width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex: none; }
.player { position: relative; background: #000; border-radius: 12px; overflow: hidden; }
.player video { width: 100%; display: block; max-height: 70vh; background: #000; }
.player .cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; background: rgba(10,18,40,.82); text-align: center; padding: 20px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.bar .track { flex: 1; height: 6px; background: #dfe3ec; border-radius: 3px; position: relative; overflow: hidden; }
.bar .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--or); }
.bar .track b { position: absolute; left: 0; top: 0; bottom: 0; background: #b9c3d6; }
.ans-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.ans-row span { width: 80px; font-weight: 700; flex: none; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.thumbs .x { position: relative; }
.thumbs .x button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--red); color: #fff; font-size: 13px; cursor: pointer; }

/* 질문 */
.qitem .head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.qitem .line { font-weight: 700; }
.qitem .answer { margin-top: 12px; padding: 12px; border-radius: 10px; background: #f0f7f7; border-left: 4px solid var(--tl); }
.qitem .hold { margin-top: 12px; padding: 12px; border-radius: 10px; background: #fff6ea; border-left: 4px solid var(--yl); }
.qitem.unread { border-color: var(--tl); box-shadow: 0 0 0 2px #0e828233; }

/* 관리자 */
table.t { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
table.t th, table.t td { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; vertical-align: top; }
table.t th { background: #f0f2f7; font-weight: 700; white-space: nowrap; }
.o { color: var(--tl); font-weight: 800; } .xx { color: var(--red); font-weight: 800; }
.scroll { overflow-x: auto; }
.wide-main { max-width: 1100px; }
.split { display: grid; grid-template-columns: 340px 1fr; gap: 14px; }
.split .list { max-height: 75vh; overflow-y: auto; }
.split .list .card { cursor: pointer; padding: 12px; }
.split .list .card.sel { border-color: var(--bl); box-shadow: 0 0 0 2px #1c6ec033; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split .list { max-height: none; } }

.zoom { position: fixed; inset: 0; background: rgba(0,0,0,.85); display: flex; align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; }
.zoom img { max-width: 96vw; max-height: 94vh; }
.empty { text-align: center; color: var(--sub); padding: 40px 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 99px; font-size: 14px; z-index: 60; }
.ico { display: none; width: 22px; height: 22px; }
/* 홈: 오늘 할 일 */
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.todo a { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 12px; color: var(--ink); display: block; }
.todo a b { display: block; font-size: 28px; line-height: 1.1; color: var(--navy); }
.todo a span { font-size: 13px; color: var(--sub); }
.todo a.hot b { color: var(--or); }
.next { display: flex; align-items: center; gap: 12px; }

.idbox { display: flex; align-items: stretch; }
.idbox span { display: flex; align-items: center; padding: 0 10px; background: #eef1f7; border: 1px solid #ccd3e0; border-right: 0; border-radius: 10px 0 0 10px; font-weight: 700; color: var(--navy); font-size: 16px; }
.idbox input { border-radius: 0 10px 10px 0 !important; flex: 1; min-width: 0; }
.idbox span.hidden { display: none; }
.idbox span.hidden + input { border-radius: 10px !important; }

.aimemo { margin-top: 12px; padding: 10px 12px; background: #fff6e0; border-left: 4px solid #F5921E; border-radius: 8px; font-size: 14px; }
