/* 카달로그 — 원본 「2027학년도 수능 응원 선물 카탈로그」 7쪽 배치를 그대로 옮긴 것(960×540, 단위 = 원본 pt).
   색·글꼴은 원본에서 뽑은 값: 배경 #EEF4EF · 진녹색 #163B2D · 파랑 #1D6FA8 · 회색 #6B7A72 / #9AA6A0 · Noto Sans KR.
   다크 모드와 무관하게 늘 이 색이다(인쇄물). */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap");

.cat-toolbar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.cat-toolbar .field { margin: 0; }
.cat-toolbar label.cat-check { font-size: 13px; color: var(--ink-secondary); display: flex; gap: 4px; align-items: center; }
.cat-items-scroll { max-height: 300px; overflow: auto; margin-bottom: 14px; }
.cat-items td input { width: 100%; min-width: 60px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-s); padding: 4px 6px; color: var(--ink); font: inherit; font-size: 12.5px; }
.cat-items td.nowrap { white-space: nowrap; }

/* 저장 상태·웹 링크·저장 목록(앱 화면 — 앱 색 토큰을 따른다) */
.cat-save-state { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.cat-save-state.ok { background: var(--good-soft); color: var(--good-ink); }
.cat-save-state.warn { background: var(--warning-soft); color: var(--ink); }
.cat-share { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 0 0 10px; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-m); font-size: 13px; }
.cat-share .hint { margin: 0; }
.cat-share .hint.warn { color: var(--warning); }
.cat-share label.cat-check { display: flex; gap: 4px; align-items: center; color: var(--ink-secondary); }
.cat-share input[type="date"] { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s); color: var(--ink); padding: 2px 4px; font: inherit; }
.cat-link-url { flex: 1 1 260px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-s);
  padding: 4px 6px; color: var(--ink); font: inherit; font-size: 12.5px; }
.cat-link-state { font-size: 12px; white-space: nowrap; }
.cat-link-state.ok { color: var(--good-ink); }
.cat-link-state.off { color: var(--ink-muted); }
.cat-saved td.nowrap { white-space: nowrap; }
.cat-saved tr.cat-row-current td { background: var(--accent-soft); }

#catPagesWrap { overflow: hidden; }
#catPages { --cat-scale: 1; display: flex; flex-direction: column; gap: calc(16px / var(--cat-scale)); transform-origin: top left; transform: scale(var(--cat-scale)); width: 960px; }
#catPagesWrap { height: auto; }

.cat-page { position: relative; width: 960px; height: 540px; overflow: hidden; background: #EEF4EF; color: #163B2D;
  font-family: "Noto Sans KR", "Pretendard", sans-serif; box-shadow: 0 2px 10px rgba(0,0,0,.15); flex: none; }
.cat-fixed img { position: absolute; inset: 0; width: 100%; height: 100%; }
.cat-cover-company { position: absolute; left: 462px; top: 158px; font-size: 22px; font-weight: 700; color: #163B2D; letter-spacing: -.01em; }

.cat-title { position: absolute; left: 50px; top: 14px; margin: 0; font-size: 19px; font-weight: 700; color: #163B2D; }
.cat-logo { position: absolute; left: 836px; top: 0; width: 120px; height: 62px; }
.cat-grid { position: absolute; left: 50px; top: 62px; width: 860px; display: grid; grid-template-columns: 423px 423px; column-gap: 14px; row-gap: 14px; }
.cat-card { position: relative; height: 143px; background: #fff; border-radius: 12px; }
.cat-photo { position: absolute; left: 10px; top: 10px; width: 129px; height: 122px; border-radius: 8px; border: 1px solid #DDE5E0; background: #F5F8F6;
  display: flex; align-items: center; justify-content: center; }
.cat-photo span { font-size: 40px; opacity: .35; }
.cat-photo { overflow: hidden; background: #fff; }
.cat-photo img { width: 100%; height: 100%; object-fit: contain; }
/* 카테고리 태그 — 원본 7쪽: 연두 바탕 · #3F6B14 · 12px bold, 사진 왼쪽 위 */
.cat-tag { position: absolute; left: 4px; top: 4px; font-style: normal; font-size: 12px; font-weight: 700; color: #3F6B14;
  background: #DCEFC4; border-radius: 6px; padding: 2px 9px; }
.cat-text { position: absolute; left: 154px; right: 10px; top: 8px; bottom: 10px; }
/* 이름(최대 2줄)·설명(최대 2줄)이 구분선(63px) 위 칸 안에 들어가게 — 넘치면 설명 쪽이 잘린다 */
.cat-head { max-height: 58px; overflow: hidden; }
.cat-name { font-size: 14.5px; font-weight: 700; line-height: 1.35; color: #163B2D; max-height: 40px; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cat-comp { font-size: 10px; color: #6B7A72; margin-top: 3px; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cat-sep { position: absolute; left: 0; right: 0; top: 63px; border-top: 1px solid #DDE5E0; }
.cat-bottom { position: absolute; left: 0; right: 0; top: 69px; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; }
.cat-market { display: flex; flex-direction: column; font-size: 12px; line-height: 1.65; }
.cat-market s { color: #9AA6A0; }
.cat-market b { color: #1D6FA8; }
.cat-price { text-align: right; display: flex; flex-direction: column; line-height: 1.6; }
.cat-price span { font-size: 12px; color: #6B7A72; }
.cat-price b { font-size: 16px; font-weight: 700; color: #163B2D; }

/* 인쇄 = 카달로그만, 한 쪽에 한 장(16:9) */
@media print {
  @page { size: 960px 540px; margin: 0; }
  body.printing-catalog > *:not(main) { display: none !important; }
  body.printing-catalog main > *:not(#view-catalog) { display: none !important; }
  body.printing-catalog #view-catalog > *:not(#catPreviewCard) { display: none !important; }
  body.printing-catalog #catPreviewCard > *:not(#catPagesWrap) { display: none !important; }
  body.printing-catalog, body.printing-catalog main, body.printing-catalog #view-catalog, body.printing-catalog #catPreviewCard {
    margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; max-width: none !important; }
  body.printing-catalog #catPages { transform: none !important; gap: 0 !important; }
  body.printing-catalog .cat-page { box-shadow: none; break-after: page; page-break-after: always; }
  body.printing-catalog .cat-page, body.printing-catalog .cat-page * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
