/* 사진을 PDF 로 (2026-10-01). /css/common.css 다음에 불러옵니다.
   색은 common.css 토큰만(다크 모드 자동). 🔴 CSP style-src 'self' — style="" 속성 금지. 터치 대상 44px 이상. */

.ip-crumbs a {
  min-width: 44px;
  justify-content: center;
}

/* --- 사진 넣는 칸 ----------------------------------------------------------- */
.ip-drop {
  position: relative; /* 숨긴 파일 칸이 이 상자 안에 머물게 */
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  margin-bottom: var(--space-5);
  padding: var(--space-6) var(--space-4);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface-soft);
  text-align: center;
}

.ip-drop.is-over {
  border-color: var(--color-primary);
  border-style: solid;
}

.ip-drop__text {
  margin: 0;
  font-weight: var(--weight-bold);
}

.ip-file {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ip-pick {
  min-width: 200px;
  cursor: pointer;
}

.ip-file:focus + .ip-pick {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* --- 쪽 목록 ---------------------------------------------------------------- */
.ip-pages {
  margin-bottom: var(--space-5);
}

.ip-pages__head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
}

.ip-subhead {
  margin: 0;
  font-size: var(--text-lg);
}

.ip-list {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.ip-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.ip-thumb {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  background: var(--color-preview);
  object-fit: contain;
}

.ip-meta {
  min-width: 0;
}

.ip-page {
  display: inline-block;
  margin-bottom: var(--space-1);
  padding: 0 var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-surface-soft);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
}

.ip-name {
  display: block;
  overflow-wrap: anywhere;
}

.ip-sub,
.ip-warn {
  margin: var(--space-1) 0 0;
  font-size: var(--text-sm);
}

.ip-sub {
  color: var(--color-text-muted);
}

.ip-warn {
  color: var(--color-warning);
  font-weight: var(--weight-bold);
}

.ip-item__actions {
  display: flex;
  gap: var(--space-1);
}

.ip-icon {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: var(--text-lg);
}

.ip-icon:disabled {
  opacity: 0.35;
}

/* --- 설정 ------------------------------------------------------------------ */
.ip-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* 좁은 화면에서 긴 이름(사진 비율 그대로) 옆 라디오가 눌려 찌그러지지 않게 */
.ip-grid-4 .option-card input {
  flex-shrink: 0;
}

.ip-filename {
  max-width: 420px;
}

.ip-actions {
  flex-wrap: wrap;
}

.ip-status {
  min-height: 24px;
  margin: var(--space-4) 0 0;
  color: var(--color-text-muted);
  font-weight: var(--weight-bold);
}

@media (max-width: 760px) {
  .ip-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ip-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .ip-item__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

/* --- 체리영어 한 줄·관련 도구 ------------------------------------------------ */
.ip-cherry {
  margin: var(--space-5) 0 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.ip-cherry a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.ip-links {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  padding: 0;
  list-style: none;
}

.ip-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-right: var(--space-2);
  font-weight: var(--weight-bold);
}
