@charset "utf-8";
/* SUB/text_set — 텍스트 세트 (2026-10-28)
   글자 크기·색·굵기는 칸 안 생성기 클래스(COM_tit · COM_li)가 맡고, 여기선 배치·포인트 장식만 그린다 */

.text_set { width: 100%; float: left; }
.text_set .wg_side { width: 100%; float: left; }

/* 포인트 색 (컬러 시스템 변수) */
.text_set .ts_ac_primary   { --ts-ac: var(--primary, #2563eb);   --ts-ac-soft: var(--primary-op10, rgba(37,99,235,.1)); }
.text_set .ts_ac_secondary { --ts-ac: var(--secondary, #4f8ae8); --ts-ac-soft: var(--secondary-op10, rgba(79,138,232,.1)); }
.text_set .ts_ac_tertiary  { --ts-ac: var(--tertiary, #ff9238);  --ts-ac-soft: var(--tertiary-op10, rgba(255,146,56,.1)); }
.text_set .ts_ac_deep      { --ts-ac: var(--deep, #111827);      --ts-ac-soft: rgba(17,24,39,.06); }

/* 항목 배열 — 한 줄에 N개 */
.text_set .ts_wrap { width: 100%; float: left; display: grid; grid-template-columns: repeat(var(--ts-cols, 1), minmax(0, 1fr)); gap: var(--ts-gap, 40px); }
.text_set .ts_item { position: relative; min-width: 0; }
.text_set .ts_main { min-width: 0; }
.text_set .ts_head { display: flex; flex-direction: column; min-width: 0; }
.text_set .ts_label, .text_set .ts_title, .text_set .ts_sub, .text_set .ts_body, .text_set .ts_more { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.text_set .ts_trow { display: flex; align-items: center; gap: .5em; min-width: 0; }
.text_set .ts_trow .ts_title { flex: 1 1 auto; }
.text_set .ts_trow:not(:has(.ts_title:not(.ts_blank))) { display: none; }   /* 제목이 비면 아이콘 줄도 숨김 */
body.ts-show-blank .text_set .ts_can .ts_trow:has(.ts_title) { display: flex; }

/* 기본은 번호·아이콘 숨김 — 해당 배치에서만 보임 */
.text_set .ts_num, .text_set .ts_ico { display: none; }

/* ── icon : 제목 앞 동그란 아이콘 ── */
.text_set .ts_pre_icon .ts_ico { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--ts-ac); color: #fff; font-size: clamp(16px, calc(0.31vw + 15px), 20px); line-height: 1; }
.text_set .ts_pre_icon .ts_trow { align-items: center; }

/* ── bar : 왼쪽 세로 막대 ── */
.text_set .ts_pre_bar .ts_item { padding-left: clamp(16px, calc(0.63vw + 14px), 24px); border-left: 4px solid var(--ts-ac); }

/* ── line : 제목 아래 짧은 포인트 선 ── */
.text_set .ts_pre_line .ts_head::after { content: ""; display: block; width: 36px; height: 3px; margin: 14px 0 18px; background: var(--ts-ac); border-radius: 2px; }

/* ── center : 가운데 ── */
.text_set .ts_pre_center .ts_item { text-align: center; }
.text_set .ts_pre_center .ts_head { align-items: center; }
.text_set .ts_pre_center .ts_trow { justify-content: center; }
.text_set .ts_pre_center .ts_head::after { content: ""; display: block; width: 36px; height: 3px; margin: 14px auto 18px; background: var(--ts-ac); border-radius: 2px; }
.text_set .ts_pre_center .ts_body .COM_li { display: inline-block; text-align: left; }

/* ── lr : 왼쪽 제목 / 오른쪽 본문 ── */
.text_set .ts_pre_lr .ts_main { display: grid; grid-template-columns: var(--ts-lw, 35%) minmax(0, 1fr); gap: clamp(20px, calc(1.56vw + 15px), 40px); align-items: start; }
.text_set .ts_pre_lr .ts_main > .ts_body, .text_set .ts_pre_lr .ts_main > .ts_more { grid-column: 2; }   /* 본문·추가 글 = 오른쪽 */
.text_set .ts_pre_lr .ts_main { row-gap: 0; }
.text_set .ts_pre_lr .ts_main > .ts_head { grid-row: 1 / span 10; }   /* 빈 줄은 높이 0 (row-gap 0) */
.text_set .ts_more { margin-top: 12px; }
.text_set .ts_pre_lr .ts_item + .ts_item { padding-top: var(--ts-gap, 40px); border-top: 1px solid #e5e7eb; }
.text_set .ts_pre_lr.ts_wrap { gap: var(--ts-gap, 40px) 0; grid-template-columns: minmax(0, 1fr); }

/* ── num : 큰 번호 ── */
.text_set .ts_pre_num .ts_item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(14px, calc(0.78vw + 11.5px), 24px); align-items: start; }
.text_set .ts_pre_num .ts_num { display: block; font-size: clamp(30px, calc(1.88vw + 24px), 54px); font-weight: 800; line-height: 1; color: var(--ts-ac); letter-spacing: -.02em; font-family: "Roboto", "Pretendard", sans-serif; }

/* ── card : 카드 박스 ── */
.text_set .ts_pre_card .ts_item { padding: clamp(20px, calc(1.56vw + 15px), 40px); background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 16px; }
.text_set .ts_pre_card .ts_item::before { content: ""; position: absolute; left: clamp(20px, calc(1.56vw + 15px), 40px); top: 0; width: 36px; height: 3px; background: var(--ts-ac); }

/* ── quote · quotec : 명언 · 인용 (★1124) — 제목 칸 = 인용 글, 본문 칸 = 말한 사람 (앞에 짧은 선) ── */
.text_set .ts_pre_quote .ts_item { padding: clamp(44px, calc(2.19vw + 37px), 72px) clamp(22px, calc(2.19vw + 15px), 50px) clamp(22px, calc(1.72vw + 16.5px), 44px); background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 16px; }
.text_set .ts_pre_quote .ts_item::before,
.text_set .ts_pre_quotec .ts_item::before { content: "\201C"; position: absolute; left: clamp(18px, calc(2.19vw + 11px), 46px); top: clamp(6px, calc(0.47vw + 4.5px), 12px); font: 700 clamp(54px, calc(2.5vw + 46px), 86px)/1 Georgia, "Times New Roman", serif; color: var(--ts-ac); pointer-events: none; }
.text_set .ts_pre_quote .ts_body,
.text_set .ts_pre_quotec .ts_body { display: flex; align-items: center; gap: .6em; margin-top: clamp(14px, calc(0.78vw + 11.5px), 24px); }
.text_set .ts_pre_quote .ts_body { justify-content: flex-end; text-align: right; }
.text_set .ts_pre_quote .ts_item { display: flex; flex-direction: column; }   /* 여러 칸일 때 말한 사람 줄을 카드 바닥에 맞춤 */
.text_set .ts_pre_quote .ts_main { flex: 1 1 auto; display: flex; flex-direction: column; }
.text_set .ts_pre_quote .ts_main > .ts_body { margin-top: auto; padding-top: clamp(14px, calc(0.78vw + 11.5px), 24px); }
.text_set .ts_pre_quote .ts_body > *, .text_set .ts_pre_quotec .ts_body > * { margin: 0 !important; }
.text_set .ts_pre_quotec .ts_item { padding-top: clamp(52px, calc(2.5vw + 44px), 84px); text-align: center; }
.text_set .ts_pre_quotec .ts_item::before { left: 50%; transform: translateX(-50%); }
.text_set .ts_pre_quotec .ts_head { align-items: center; }
.text_set .ts_pre_quotec .ts_trow { justify-content: center; }
.text_set .ts_pre_quotec .ts_body { justify-content: center; }

/* 편집 권한자 — 빈 칸은 기본 숨김(글이 빈틈없이 쌓이게), [빈 칸 보기] 켜면 점선 자리 표시 (★1029) */
.text_set .ts_blank { display: none; }
body.ts-show-blank .text_set .ts_can .ts_blank { display: block; min-height: 22px; border: 1px dashed #cbd5e1; border-radius: 6px; margin: 2px 0; }
body.ts-show-blank .text_set .ts_can .ts_blank::before { content: attr(data-ph) " — Shift+클릭으로 입력 (비워 두면 방문자에겐 안 보임)"; display: block; padding: 2px 8px; font-size: 12px; color: #94a3b8; }
.text_set .ts_set_bar { width: 100%; float: left; display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin: 0 0 8px; }
.text_set .ts_blank_tg { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; color: #64748b; font-size: 12px; font-weight: 600; cursor: pointer; user-select: none; }
.text_set .ts_blank_tg input { margin: 0; }
body.ts-show-blank .text_set .ts_blank_tg { border-color: #c7d2fe; background: #eef2ff; color: #4338ca; }
.text_set .ts_set_btn { height: 28px; padding: 0 12px; border: 1px solid #c7d2fe; border-radius: 6px; background: #eef2ff; color: #4338ca; font-size: 12px; font-weight: 700; cursor: pointer; }
.text_set .ts_set_btn:hover { background: #e0e7ff; }
.text_set .empty_li { padding: 30px 0; color: #94a3b8; text-align: center; }

@media screen and (max-width: 1024px) {
  .text_set .ts_wrap:not(.ts_pre_lr) { grid-template-columns: repeat(min(var(--ts-cols, 1), 2), minmax(0, 1fr)); }
}
@media screen and (max-width: 768px) {
  .text_set .ts_wrap:not(.ts_pre_lr) { grid-template-columns: minmax(0, 1fr); gap: calc(var(--ts-gap, 40px) * .6); }
  .text_set .ts_pre_lr .ts_main { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .text_set .ts_pre_lr .ts_main > .ts_body, .text_set .ts_pre_lr .ts_main > .ts_more { grid-column: auto; }
  .text_set .ts_pre_lr .ts_main > .ts_head { grid-row: auto; }
}

/* ============ 관리자 [텍스트 설정] 창 ============ */
.tsset { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 10000010; width: 980px; max-width: 96vw; max-height: 92vh; background: #fff; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.3); display: flex; flex-direction: column; overflow: hidden; font-size: 13px; color: #1e293b; }
.tsset-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; background: linear-gradient(135deg, #4338ca, #6366f1); color: #fff; cursor: move; user-select: none; }
.tsset-head b { font-size: 15px; }
.tsset-head small { opacity: .8; }
.tsset-x { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 6px; background: rgba(255,255,255,.2); color: #fff; font-size: 20px; cursor: pointer; }
.tsset-tabs { display: flex; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.tsset-tabs button { flex: 0 0 auto; padding: 10px 18px; border: 0; border-bottom: 2px solid transparent; background: none; font-size: 13px; font-weight: 600; color: #64748b; cursor: pointer; }
.tsset-tabs button.on { color: #4338ca; border-bottom-color: #4338ca; background: #fff; }
.tsset-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.tsset-pane { display: none; }
.tsset-pane.on { display: block; }
.tsset-sec { margin-bottom: 14px; }
.tsset-lb { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.tsset-hint { font-size: 11px; color: #94a3b8; margin-top: 4px; line-height: 1.5; }
.tsset-row { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.tsset-row + .tsset-row { margin-top: 8px; }
.tsset-row > span { flex: 0 0 auto; min-width: 70px; font-size: 12px; color: #475569; }
.tsset .tsset-num { width: 70px !important; flex: 0 0 70px; height: 30px; padding: 0 6px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; margin: 0; }
.tsset .tsset-txt { width: 220px !important; flex: 0 0 220px; height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; box-sizing: border-box; margin: 0; }
.tsset-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid #cbd5e1; border-radius: 7px; overflow: hidden; }
.tsset-seg button { padding: 6px 12px; border: 0; border-right: 1px solid #cbd5e1; background: #fff; cursor: pointer; font-size: 12px; color: #334155; }
.tsset-seg button:last-child { border-right: 0; }
.tsset-seg button.on { background: #4338ca; color: #fff; }
.tsset-icos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.tsset-icos button { width: 34px; height: 34px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; font-size: 18px; color: #334155; cursor: pointer; }
.tsset-icos button.on { border-color: #4338ca; background: #eef2ff; color: #4338ca; }

/* 샘플 고르기 — 카드마다 실제 모양 미리보기 */
.tsset-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tsset-filter button { padding: 5px 12px; border: 1px solid #cbd5e1; border-radius: 20px; background: #fff; font-size: 12px; color: #475569; cursor: pointer; }
.tsset-filter button.on { border-color: #4338ca; background: #4338ca; color: #fff; }
.tsset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tsset-card { display: flex; flex-direction: column; border: 2px solid #e2e8f0; border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; text-align: left; padding: 0; transition: border-color .15s, box-shadow .15s; }
.tsset-card:hover { border-color: #818cf8; box-shadow: 0 6px 18px rgba(67,56,202,.12); }
.tsset-card.on { border-color: #4338ca; box-shadow: 0 0 0 3px rgba(67,56,202,.15); }
.tsset-pv { position: relative; height: 190px; overflow: hidden; background: #fff; border-bottom: 1px solid #f1f5f9; pointer-events: none; }
.tsset-pv-in { position: absolute; left: 0; top: 0; width: 900px; padding: 30px 34px; transform: scale(.31); transform-origin: 0 0; }
.tsset-pv::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: linear-gradient(rgba(255,255,255,0), #fff); }
.tsset-cap { padding: 9px 12px; }
.tsset-cap b { display: block; font-size: 13px; color: #1e293b; }
.tsset-cap small { display: block; margin-top: 2px; font-size: 11px; color: #94a3b8; line-height: 1.4; }
.tsset-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.tsset-foot .msg { margin-right: auto; font-size: 12px; color: #4338ca; }
.tsset-foot button { height: 34px; padding: 0 18px; border: 0; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; }
.tsset-cancel { background: #e2e8f0; color: #334155; }
.tsset-save { background: #4338ca; color: #fff; }
.tsset-save:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) { .tsset-grid { grid-template-columns: minmax(0, 1fr); } .tsset .tsset-txt { width: 150px !important; flex-basis: 150px; } }

/* ★1124 텍스트 박스(.ts_item) — [텍스트 설정] 모양 탭 "텍스트 박스" · 넣은 값만 클래스(ts_bx_*) + 변수 → 배치 기본(카드·인용 등)보다 우선 */
.text_set .ts_wrap.ts_bx_pad .ts_item { --ts-qp: var(--ts-bpad); padding: var(--ts-bpad); }
.text_set .ts_wrap.ts_bx_pt .ts_item { --ts-qp: var(--ts-bpt); padding-top: var(--ts-bpt); }   /* ★1125 위·아래 여백 따로 (전체보다 우선) */
.text_set .ts_wrap.ts_bx_pb .ts_item { padding-bottom: var(--ts-bpb); }
/* ★1125 인용 따옴표 — 위 여백을 넣으면 박스 맨 위에 붙어 있지 않고 글 바로 위로 같이 내려옴 (--ts-qp = 실제 위 여백) */
.text_set .ts_pre_quote.ts_bx_qp .ts_item::before,
.text_set .ts_pre_quotec.ts_bx_qp .ts_item::before { top: max(6px, calc(var(--ts-qp) - clamp(54px, calc(2.5vw + 46px), 86px) * .95)); }
.text_set .ts_pre_quote.ts_bx_pad .ts_item::before { left: max(10px, calc(var(--ts-bpad) - 4px)); }
.text_set .ts_wrap.ts_bx_rad .ts_item { border-radius: var(--ts-brad); }
.text_set .ts_wrap.ts_bx_bg .ts_item { background: var(--ts-bbg); }
.text_set .ts_wrap.ts_bx_bt .ts_item { border-top: var(--ts-btw, 1px) var(--ts-bts, solid) var(--ts-btc, #e5e7eb); }
.text_set .ts_wrap.ts_bx_bb .ts_item { border-bottom: var(--ts-bbw, 1px) var(--ts-bbs, solid) var(--ts-bbc, #e5e7eb); }
@media screen and (max-width: 768px) {
  .text_set .ts_wrap.ts_bx_pad .ts_item { --ts-qp: calc(var(--ts-bpad) * .6); padding: calc(var(--ts-bpad) * .6); }
  .text_set .ts_wrap.ts_bx_pt .ts_item { --ts-qp: calc(var(--ts-bpt) * .6); padding-top: calc(var(--ts-bpt) * .6); }
  .text_set .ts_wrap.ts_bx_pb .ts_item { padding-bottom: calc(var(--ts-bpb) * .6); }
}
