/* ============================================================
   포스 사용설명서 - 스타일
   색상 등 브랜드 요소는 아래 :root 변수만 바꾸면 전체 반영됩니다.
   ============================================================ */
:root{
  --bg:#f4f5f7;
  --card:#ffffff;
  --ink:#141820;
  --ink-2:#5a6270;
  --ink-3:#8d95a3;
  --line:#e3e6eb;
  --brand:#2f6bff;
  --hdr:#141820;


  --radius:14px;
  --shadow:0 1px 2px rgba(16,22,35,.06), 0 6px 20px rgba(16,22,35,.06);
  --font:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans KR","Noto Sans SC","Noto Sans",sans-serif;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  background:var(--bg); color:var(--ink); font-family:var(--font);
  -webkit-font-smoothing:antialiased; line-height:1.5;
  padding-bottom:env(safe-area-inset-bottom);
}
h1,h2,h3,p{margin:0}
button{font-family:inherit}

/* ---------- 헤더 ---------- */
.hdr{background:var(--hdr); color:#fff; position:sticky; top:0; z-index:30}
.hdr-inner{
  max-width:1080px; margin:0 auto; padding:16px 18px;
  display:flex; align-items:flex-start; gap:16px; flex-wrap:wrap;
}
.hdr-title{flex:1 1 240px; min-width:0}
.hdr h1{font-size:19px; font-weight:700; letter-spacing:-.02em}
.hdr .sub{font-size:13px; color:#9aa3b2; margin-top:3px}
.hdr-tools{display:flex; align-items:center; gap:8px; flex-wrap:wrap}

.langbar{display:flex; background:rgba(255,255,255,.09); border-radius:10px; padding:3px; gap:2px}
.langbar button{
  border:0; background:transparent; color:#c3cad6; cursor:pointer;
  padding:7px 11px; border-radius:8px; font-size:13px; font-weight:600;
  display:flex; align-items:center; gap:5px; white-space:nowrap; transition:.12s;
}
.langbar button:hover{color:#fff}
.langbar button[aria-pressed="true"]{background:#fff; color:var(--ink)}
.langbar .fl{font-size:14px; line-height:1}

/* ---------- 검색 ---------- */
.wrap{max-width:1080px; margin:0 auto; padding:20px 18px 40px}
.searchbox{position:relative; margin-bottom:20px}
.searchbox svg{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:17px; height:17px; fill:var(--ink-3); pointer-events:none;
}
.searchbox input{
  width:100%; border:1px solid var(--line); background:var(--card); border-radius:12px;
  padding:13px 40px; font-size:15px; color:var(--ink); outline:none; transition:.12s;
  font-family:inherit;
}
.searchbox input:focus{border-color:var(--brand); box-shadow:0 0 0 3px rgba(47,107,255,.13)}
.s-clear{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  width:28px; height:28px; border:0; background:transparent; color:var(--ink-3);
  font-size:21px; line-height:1; cursor:pointer; border-radius:7px;
}
.s-clear:hover{background:#eef0f4; color:var(--ink)}

/* ---------- 목록 ---------- */
.cat{margin-bottom:26px}
.cat-h{
  display:flex; align-items:center; gap:9px; margin:0 2px 11px;
  font-size:13px; font-weight:700; color:var(--ink-2); letter-spacing:.01em;
}
.cat-h .cnt{
  font-size:11.5px; font-weight:600; color:var(--ink-3);
  background:#e8eaef; padding:2px 7px; border-radius:99px; font-variant-numeric:tabular-nums;
}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(248px,1fr)); gap:12px}

.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; cursor:pointer; text-align:left; padding:0; width:100%;
  display:flex; flex-direction:column; transition:.14s; font-family:inherit;
}
.card:hover{border-color:#c9d0db; box-shadow:var(--shadow); transform:translateY(-1px)}
.card:focus-visible{outline:2px solid var(--brand); outline-offset:2px}

.thumb{
  position:relative; aspect-ratio:4/3; background:#e9ecf1;
  display:flex; align-items:center; justify-content:center; overflow:hidden;
}
.thumb img{width:100%; height:100%; object-fit:cover; display:block}
.thumb .ph{width:34px; height:34px; fill:#98a1ae; opacity:.55}
.thumb .play{
  width:44px; height:44px; border-radius:50%; background:rgba(20,24,32,.72);
  display:flex; align-items:center; justify-content:center;
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
}
.thumb .play::after{
  content:""; border-left:12px solid #fff; border-top:7.5px solid transparent;
  border-bottom:7.5px solid transparent; margin-left:3px;
}
.thumb .dur{
  position:absolute; right:8px; bottom:8px; background:rgba(20,24,32,.8); color:#fff;
  font-size:11.5px; font-weight:600; padding:2px 6px; border-radius:5px; font-variant-numeric:tabular-nums;
}

.card-b{padding:12px 13px 13px; display:flex; flex-direction:column; gap:7px; flex:1}
.card-t{font-size:14.5px; font-weight:600; letter-spacing:-.01em; line-height:1.35}
.card-sub{font-size:12px; color:var(--ink-3)}
.card-d{font-size:12.5px; color:var(--ink-2); line-height:1.5}

/* ---------- 빈 상태 ---------- */
.empty{text-align:center; padding:70px 20px; color:var(--ink-2)}
.empty-ico{margin-bottom:14px}
.empty-ico .ph{width:40px; height:40px; fill:var(--ink-3); opacity:.6}
.empty p{font-size:15px; font-weight:600}
.empty .empty-sub{font-size:13px; font-weight:400; color:var(--ink-3); margin-top:6px}

.ftr{max-width:1080px; margin:0 auto; padding:0 18px 30px; font-size:12px; color:var(--ink-3)}

/* ---------- 모달 ---------- */
.modal{position:fixed; inset:0; z-index:100; display:flex; align-items:center; justify-content:center; padding:20px}
.modal[hidden]{display:none}
.modal-back{position:absolute; inset:0; background:rgba(10,14,22,.66)}
.modal-box{
  position:relative; background:var(--card); border-radius:16px; width:100%; max-width:840px;
  max-height:92vh; overflow:auto; box-shadow:0 20px 60px rgba(10,14,22,.35);
  animation:pop .16s ease-out;
}
@keyframes pop{from{opacity:0; transform:translateY(8px)}to{opacity:1; transform:none}}
.modal-head{
  display:flex; align-items:center; gap:12px; padding:16px 18px;
  border-bottom:1px solid var(--line); position:sticky; top:0; background:var(--card); z-index:2;
}
.modal-head h2{font-size:16px; font-weight:700; flex:1; letter-spacing:-.01em}
.modal-head .x{
  border:0; background:#f0f2f5; color:var(--ink-2); width:32px; height:32px; border-radius:9px;
  font-size:21px; line-height:1; cursor:pointer; flex:none;
}
.modal-head .x:hover{background:#e4e7ec; color:var(--ink)}

/* 높이가 낮은 화면(포스 1024×768 등)에서도 언어·음성 버튼까지 한눈에 보이도록 영상 칸 높이를 제한.
   영상은 비율을 유지한 채 칸 안에 맞춰집니다. */
.stage{background:#000; aspect-ratio:4/3; width:100%; max-height:calc(92vh - 130px); display:flex; align-items:center; justify-content:center}
.stage video{width:100%; height:100%; display:block; background:#000}
.stage .soon-box{color:#8b93a1; text-align:center; padding:30px; font-size:14px; line-height:1.7}
.stage .soon-box .big{display:block; margin-bottom:12px}
.stage .soon-box .ph{width:38px; height:38px; fill:#8b93a1; opacity:.7}

.modal-foot{padding:15px 18px 20px}
.m-langs{display:flex; flex-wrap:wrap; gap:6px}
.m-langs button{
  border:1px solid var(--line); background:var(--card); color:var(--ink-2); cursor:pointer;
  padding:7px 12px; border-radius:9px; font-size:13px; font-weight:600;
  display:flex; align-items:center; gap:6px; transition:.12s;
}
.m-langs button:hover:not(:disabled){border-color:#b9c1cd}
.m-langs button[aria-pressed="true"]{background:var(--ink); color:#fff; border-color:var(--ink)}
.m-langs button:disabled{opacity:.4; cursor:not-allowed}
.m-desc{font-size:13.5px; color:var(--ink-2); line-height:1.65; margin-top:12px; white-space:pre-line}

video::cue{
  font-family:var(--font); font-size:.85em; line-height:1.45;
  background:rgba(10,14,22,.78); text-shadow:none;
}

/* ---------- 모바일 ---------- */
@media (max-width:560px){
  .hdr-inner{padding:13px 14px; gap:12px}
  .hdr-tools{width:100%; justify-content:space-between}
  .wrap{padding:16px 14px 34px}
  .grid{grid-template-columns:1fr 1fr; gap:10px}
  .card-t{font-size:13.5px}
  .modal{padding:0; align-items:flex-end}
  .modal-box{max-width:none; max-height:100vh; height:100%; border-radius:0}
  .stage{aspect-ratio:auto; min-height:34vh}
}
@media (max-width:340px){ .grid{grid-template-columns:1fr} }

/* ---------- 참고사항 (자막에 넣지 않는 주의/예외) ---------- */
.m-notes{
  margin-top:14px; padding:12px 14px; background:#fff8ea;
  border:1px solid #f0dfbe; border-radius:10px;
}
.m-notes[hidden]{display:none}
.notes-h{font-size:12px; font-weight:700; color:#8a5a00; margin-bottom:6px; letter-spacing:.02em}
.m-notes ul{margin:0; padding-left:17px}
.m-notes li{font-size:13px; color:#6b5326; line-height:1.6; margin-bottom:4px}
.m-notes li:last-child{margin-bottom:0}

/* ---------- 빈 화면에서 다른 언어로 넘어가기 ---------- */
.other-langs{margin-top:22px}
.other-langs:empty{display:none}
.ol-h{font-size:12.5px; color:var(--ink-3); margin-bottom:10px}
.other-langs button{
  display:inline-flex; align-items:center; gap:8px; margin:0 4px 8px;
  border:1px solid var(--line); background:var(--card); color:var(--ink);
  padding:9px 14px; border-radius:10px; font-size:14px; font-weight:600;
  cursor:pointer; transition:.12s; font-family:inherit;
}
.other-langs button:hover{border-color:var(--brand); box-shadow:var(--shadow)}
.other-langs button b{
  font-size:12px; font-weight:700; color:#0f7a48; background:#e6f5ee;
  padding:2px 7px; border-radius:99px; font-variant-numeric:tabular-nums;
}

/* ---------- 음성 켜기/끄기 ---------- */
.m-controls{display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap; justify-content:space-between}
.m-controls .m-langs{flex:1 1 auto}
.voice-btn{
  display:inline-flex; align-items:center; gap:6px; flex:none;
  border:1px solid var(--line); background:var(--card); color:var(--ink-3);
  padding:7px 12px; border-radius:9px; font-size:13px; font-weight:600;
  cursor:pointer; transition:.12s; font-family:inherit;
}
.voice-btn[hidden]{display:none}
.voice-btn svg{width:15px; height:15px; fill:currentColor}
.voice-btn:hover{border-color:#b9c1cd}
.voice-btn[aria-pressed="true"]{background:#e6f5ee; border-color:#bfe3d0; color:#0f7a48}
