/* 팝업 공용 + 사용법 + OOC */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(5, 6, 14, .7); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; width: min(640px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.modal.wide { width: min(920px, 100%); }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.modal-head h2 { flex: 1; margin: 0; font-size: 16px; }
.modal-body { overflow: auto; min-height: 0; flex: 1; }
body.modal-open { overflow: hidden; }

.help { display: grid; grid-template-columns: 190px 1fr; min-height: 420px; height: 100%; }
.help-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-right: 1px solid var(--line); overflow: auto; }
.help-tab { background: none; border: 0; color: var(--dim); text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; white-space: nowrap; }
.help-tab.on { background: var(--panel2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.help-content { padding: 14px 20px 20px; overflow: auto; line-height: 1.7; font-size: 14px; }
.help-content h3 { margin: 4px 0 10px; font-size: 17px; }
.help-content p { margin: 0 0 10px; }
.help-content ul { margin: 0 0 10px; padding-left: 20px; }
.help-content li { margin-bottom: 4px; }
.help-pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; }

.ooc { display: flex; flex-direction: column; }
.ooc-tabs { display: flex; gap: 4px; padding: 10px 12px 0; border-bottom: 1px solid var(--line); }
.ooc-tabs .help-tab.on { box-shadow: inset 0 -3px 0 var(--accent); }
.ooc-list { padding: 12px 16px 18px; display: flex; flex-direction: column; gap: 16px; }
.ooc-note { font-size: 13px; }
.ooc-item { display: flex; flex-direction: column; gap: 8px; }
.ooc-row { display: flex; align-items: center; gap: 8px; }
.ooc-row h3 { flex: 1; margin: 0; font-size: 15px; }
.ooc-text { width: 100%; font-size: 13px; line-height: 1.55; resize: vertical; background: #12131a; }
.ooc-copy.done { background: #2f9e5a; border-color: #2f9e5a; }

@media (max-width: 760px), (max-height: 500px) and (max-width: 1000px) {
  .modal-back { padding: 0; align-items: stretch; }
  .modal, .modal.wide { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; }
  .help { display: flex; flex-direction: column; min-height: 0; }
  .help-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); flex: none; }
  .help-tab.on { box-shadow: inset 0 -3px 0 var(--accent); }
  .help-content { padding: 14px 16px 24px; font-size: 15px; }
  .help-pager .btn { font-size: 12.5px; }
  .ooc-row { flex-wrap: wrap; }
  .ooc-row .btn { width: 100%; padding: 10px; }
  .ooc-text { font-size: 14px; }
}

.gif-panel { padding: 16px; }
.gif-bar { display: none; height: 10px; border-radius: 5px; background: #12131a; overflow: hidden; border: 1px solid var(--line); }
.gif-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .15s; }

.crop { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 18px; }
.crop-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.crop-ratio.on { border-color: var(--accent2); color: var(--accent2); }
.crop-stage { display: flex; justify-content: center; background: repeating-conic-gradient(#2a2c3a 0% 25%, #22242f 0% 50%) 0 0 / 16px 16px; border-radius: 8px; padding: 8px; }
.crop-canvas { touch-action: none; cursor: move; max-width: 100%; }
.crop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
