/*
 * 팝골프 관리자 새 단장 (A안) — 2026-10-28
 * - 기존 Bootstrap 3 화면 위에 덮어쓰는 디자인 층입니다. 모든 규칙은 body.pg-ui 아래에서만 적용됩니다.
 * - 되돌리기: views/_layout/bootstrap/layout.php 의 <body class="pg-ui"> 에서 pg-ui 를 지우면 원래 모습.
 * - 색·글꼴은 프론트 사이트(popgolf.kr)와 맞춤: 초록 #00B34A, 남색 #0b2944, Pretendard.
 */
body.pg-ui {
  --pg-green: #00b34a;
  --pg-green-dark: #009a3f;
  --pg-green-soft: #e8f7ee;
  --pg-navy: #0b2944;
  --pg-text: #1d2026;
  --pg-sub: #6b7079;
  --pg-line: #e6e8eb;
  --pg-bg: #f5f6f8;
  --pg-radius: 12px;
  --pg-orange: #f0a030;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--pg-text);
  background: var(--pg-bg);
  font-size: 14px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
body.pg-ui a { color: inherit; }
body.pg-ui a:hover, body.pg-ui a:focus { color: var(--pg-green-dark); text-decoration: none; }

/* ───────── 상단 바 · 메뉴 ───────── */
body.pg-ui .header { background: var(--pg-navy); border: 0; }
body.pg-ui .header .header-top-menu { display: flex; justify-content: flex-end; align-items: center; gap: 18px; height: 40px; margin: 0; }
body.pg-ui .header .header-top-menu li { float: none; padding: 0; margin: 0; color: rgba(255,255,255,.8); font-size: 13px; }
body.pg-ui .header .header-top-menu li a { color: rgba(255,255,255,.85); }
body.pg-ui .header .header-top-menu li a:hover { color: #fff; }
body.pg-ui .header .header-top-menu li .fa { margin-right: 4px; opacity: .8; }

body.pg-ui .navbar-default {
  background: #fff; background-image: none; border: 0; border-bottom: 1px solid var(--pg-line);
  border-radius: 0; box-shadow: none; margin-bottom: 0; min-height: 64px;
}
body.pg-ui .navbar-default .navbar-header img { height: 34px; width: auto; margin-top: 15px; }
body.pg-ui .navbar-default .navbar-nav > li > a {
  color: var(--pg-text); font-size: 15px; font-weight: 600; padding-top: 22px; padding-bottom: 22px; background: none !important;
}
body.pg-ui .navbar-default .navbar-nav > li > a:hover,
body.pg-ui .navbar-default .navbar-nav > .open > a { color: var(--pg-green); }
body.pg-ui .navbar-default .navbar-nav > .open > a, body.pg-ui .navbar-default .navbar-nav > .active > a { background-image: none; box-shadow: none; }
/* 하위 메뉴(PC 마우스 올림): 흰 카드 + 진한 글자. 기존 레이아웃의 짙은 회색(#444) 배경을 덮어씀 */
body.pg-ui .dropdown-menu,
body.pg-ui .navbar .dropdown-menu {
  background: #fff !important; border: 1px solid var(--pg-line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(16,24,40,.12); padding: 8px; min-width: 200px; margin-top: 6px;
}
/* 메뉴와 하위 메뉴 사이 틈을 지나도 닫히지 않게 */
body.pg-ui .navbar .dropdown-menu:before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
body.pg-ui .dropdown-menu > li > a,
body.pg-ui .navbar .dropdown-menu li a {
  background: transparent !important; color: var(--pg-text) !important; border-radius: 8px; padding: 10px 14px;
  font-size: 14px; font-weight: 500; text-transform: none; letter-spacing: -0.01em; line-height: 1.4;
}
body.pg-ui .dropdown-menu > li > a:hover, body.pg-ui .dropdown-menu > li > a:focus,
body.pg-ui .navbar .dropdown-menu li a:hover, body.pg-ui .navbar .dropdown-menu li a:focus {
  background: var(--pg-green-soft) !important; color: var(--pg-green-dark) !important;
}
body.pg-ui .navbar .dropdown-menu li a.is-current { color: var(--pg-green-dark) !important; font-weight: 700; }
body.pg-ui .navbar .dropdown-menu li a.is-current:after { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--pg-green); margin-left: 8px; vertical-align: middle; }
body.pg-ui .navbar-default .navbar-nav > li.has-current > a { color: var(--pg-green); }
body.pg-ui .navbar-form { margin-top: 14px; margin-bottom: 14px; }
body.pg-ui .navbar-form .form-group { display: flex; gap: 6px; }

/* ───────── 본문 카드 ───────── */
body.pg-ui .main { padding: 28px 0 48px; }
body.pg-ui .main .board {
  background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius);
  padding: 28px 28px 24px; box-shadow: 0 1px 2px rgba(16,24,40,.04);
  margin: 0 15px;
}
body.pg-ui .main .board > h3 {
  font-size: 22px; font-weight: 700; margin: 0 0 20px; padding: 0; border: 0; color: var(--pg-text);
}

/* ───────── 입력 요소 · 버튼 ───────── */
body.pg-ui .form-control {
  height: 40px; border: 1px solid #d5d7da; border-radius: 8px; box-shadow: none; font-size: 14px; color: var(--pg-text);
}
body.pg-ui .form-control:focus { border-color: var(--pg-green); box-shadow: 0 0 0 3px rgba(0,179,74,.15); }
/* select: 브라우저 기본 화살표는 오른쪽 끝에 붙어 여백이 없음 → 숨기고 안쪽 12px 에 V 아이콘, 글자와 아이콘 사이도 띄움 */
body.pg-ui select.form-control:not([multiple]):not([size]) {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-left: 12px; padding-right: 34px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
}
body.pg-ui select.form-control::-ms-expand { display: none; }
body.pg-ui select.form-control.input-sm:not([multiple]):not([size]) { padding-left: 10px; padding-right: 28px; background-position: right 9px center; }
body.pg-ui .btn {
  border-radius: 8px; background-image: none; text-shadow: none; box-shadow: none; font-weight: 600;
  height: 36px; line-height: 22px; padding: 6px 14px; font-size: 13px;
}
body.pg-ui .btn-sm { height: 36px; }
body.pg-ui .btn-default { background: #fff; border-color: #d5d7da; color: var(--pg-text); }
body.pg-ui .btn-default:hover { background: #f6f7f8; }
body.pg-ui .btn-primary, body.pg-ui .btn-success { background: var(--pg-green); border-color: var(--pg-green); color: #fff; }
body.pg-ui .btn-primary:hover, body.pg-ui .btn-success:hover { background: var(--pg-green-dark); border-color: var(--pg-green-dark); color: #fff; }
body.pg-ui .btn-danger { background: #fff; border-color: #f3c4c4; color: #d33; }
body.pg-ui .btn-danger:hover { background: #fdf1f1; color: #c22; }
body.pg-ui .form-group .btn-primary[type=submit] { height: 40px; width: 40px; padding: 0; }

/* ───────── 목록 상단: 정렬 · 검색 ───────── */
body.pg-ui .board > .row.mb20 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; }
body.pg-ui .board > .row.mb20 > [class*="col-"] { float: none; width: auto; padding: 0; }
body.pg-ui .board > .row.mb20 > .col-md-6 { margin-left: auto; }
body.pg-ui .board .searchbox .navbar-form { margin: 0; padding: 0; border: 0; box-shadow: none; float: none !important; }
body.pg-ui .board .searchbox .form-group { display: flex; gap: 6px; margin: 0; }
body.pg-ui .board .searchbox .form-control.px100 { width: 120px; }
body.pg-ui .board .searchbox .form-control.px150 { width: 220px; }

/* ───────── 분류 탭 → 칩 ───────── */
body.pg-ui .board .nav-tabs { border: 0; display: flex; gap: 8px; margin: 0 0 16px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
body.pg-ui .board .nav-tabs::-webkit-scrollbar { display: none; }
body.pg-ui .board .nav-tabs:before, body.pg-ui .board .nav-tabs:after { display: none; }
body.pg-ui .board .nav-tabs > li { float: none; margin: 0; flex: 0 0 auto; }
body.pg-ui .board .nav-tabs > li > a {
  border: 1px solid var(--pg-line); border-radius: 999px; margin: 0; padding: 7px 16px; font-size: 13px; font-weight: 600;
  color: var(--pg-sub); background: #fff; line-height: 1.4;
}
body.pg-ui .board .nav-tabs > li > a:hover { border-color: var(--pg-green); color: var(--pg-green-dark); background: #fff; }
body.pg-ui .board .nav-tabs > li.active > a,
body.pg-ui .board .nav-tabs > li.active > a:hover,
body.pg-ui .board .nav-tabs > li.active > a:focus { background: var(--pg-text); border-color: var(--pg-text); color: #fff; }

/* ───────── 목록 표 ───────── */
body.pg-ui .board .table { margin-bottom: 20px; border-top: 1px solid var(--pg-text); }
body.pg-ui .board .table > thead > tr > th {
  background: #f8f9fa; color: var(--pg-sub); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--pg-line);
  padding: 12px 10px; white-space: nowrap;
}
body.pg-ui .board .table > tbody > tr > td, body.pg-ui .board .table > tbody > tr > th {
  padding: 14px 10px; border-top: 1px solid var(--pg-line); vertical-align: middle; font-size: 14px;
}
body.pg-ui .board .table-hover > tbody > tr:hover { background: #f6fbf8; }
body.pg-ui .board .table .col-num, body.pg-ui .board .table .col-date, body.pg-ui .board .table .col-hit,
body.pg-ui .board .table .col-author { color: var(--pg-sub); white-space: nowrap; font-size: 13px; }
body.pg-ui .board .table .col-num { width: 70px; }
body.pg-ui .board .table .col-author { width: 140px; }
body.pg-ui .board .table .col-date { width: 90px; }
body.pg-ui .board .table .col-hit { width: 70px; text-align: right; }
body.pg-ui .board .table .col-chk { width: 40px; }
body.pg-ui .board .table .col-title a { font-weight: 500; color: var(--pg-text); }
body.pg-ui .board .table .col-title a:hover { color: var(--pg-green-dark); }
body.pg-ui .board .table .nopost { text-align: center; color: var(--pg-sub); padding: 48px 0; }
/* 체크박스: 색만 바꾸고 위치는 그대로(부트스트랩 checkbox-inline 이 음수 여백으로 배치하므로 여백을 건드리지 않음) */
body.pg-ui input[type=checkbox] { accent-color: var(--pg-green); }
body.pg-ui .board .table input[type=checkbox] { width: 16px; height: 16px; vertical-align: middle; margin: 0; }

/* 본문 이미지·표가 카드 밖으로 나가지 않게 */
body.pg-ui .main .board img { max-width: 100%; height: auto; }
body.pg-ui .main .board iframe, body.pg-ui .main .board video { max-width: 100%; }
/* 글 상세: 템플릿이 이미지 영역을 Bootstrap .container(1170/970/750px 고정 폭)로 감싸 좁은 본문 칸 오른쪽으로 넘침 → 폭 풀기 */
body.pg-ui .board .contents-view { padding: 20px 0; }
body.pg-ui .board .contents-view > .container { width: auto; max-width: 100%; padding-left: 0; padding-right: 0; }
body.pg-ui .board .contents-view-img img { max-width: 100% !important; height: auto; border-radius: 8px; }
body.pg-ui .board #post-content, body.pg-ui .board .list-group-item-text { overflow-wrap: anywhere; word-break: break-word; }
body.pg-ui .board #post-content table, body.pg-ui .board .list-group-item-text table { max-width: 100%; }

/* 라벨(분류·공지·New 등) → 작은 칩 */
body.pg-ui .label { display: inline-block; border-radius: 6px; padding: 3px 7px; font-size: 11px; font-weight: 600; line-height: 1.2; vertical-align: 1px; }
body.pg-ui .label-default { background: #eef0f2; color: #4b5059; }
body.pg-ui .label-primary { background: var(--pg-green-soft); color: var(--pg-green-dark); }
body.pg-ui .label-warning { background: #fff3e0; color: #b86e00; }
body.pg-ui .label-danger { background: #fdeaea; color: #c22; }
body.pg-ui .col-title .label { margin-right: 6px; }

/* ───────── 하단 버튼 · 페이지 ───────── */
body.pg-ui .board .border_button { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 20px; }
body.pg-ui .board .border_button > .pull-left { float: none !important; display: flex; gap: 8px; margin: 0; }
body.pg-ui .board .border_button > .pull-right { float: none !important; margin-left: auto; }
body.pg-ui .pagination { display: flex; justify-content: center; gap: 6px; margin: 8px 0 0; width: 100%; }
body.pg-ui .board nav { text-align: center; }
body.pg-ui .pagination > li > a, body.pg-ui .pagination > li > span {
  float: none; display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--pg-line); border-radius: 8px !important; margin: 0; color: var(--pg-text); font-weight: 600;
}
body.pg-ui .pagination > .active > a, body.pg-ui .pagination > .active > span,
body.pg-ui .pagination > .active > a:hover { background: var(--pg-green); border-color: var(--pg-green); color: #fff; }

/* ───────── 바닥 ───────── */
body.pg-ui footer { background: transparent; border-top: 1px solid var(--pg-line); color: var(--pg-sub); font-size: 12px; padding: 20px 0; }

/* ───────── 태블릿 (768~991) ───────── */
@media (max-width: 991px) {
  body.pg-ui .board .table .col-author { display: none; }
}

/* ───────── 휴대폰 (~767): 표 → 카드 목록 ───────── */
@media (max-width: 767px) {
  body.pg-ui { font-size: 15px; }
  body.pg-ui .header .header-top-menu { gap: 12px; height: 40px; padding-right: 4px; }
  body.pg-ui .navbar-default { min-height: 56px; }
  body.pg-ui .navbar-default .navbar-header img { height: 30px; margin: 13px 0 0 4px; }
  body.pg-ui .navbar-default .navbar-toggle { border: 0; margin-top: 11px; background: none; }
  body.pg-ui .navbar-default .navbar-toggle .icon-bar { background: var(--pg-text); width: 22px; height: 2px; border-radius: 2px; }
  body.pg-ui .navbar-default .navbar-collapse { border-top: 1px solid var(--pg-line); box-shadow: none; }
  body.pg-ui .navbar-default .navbar-nav > li > a { padding: 14px 8px; border-bottom: 1px solid var(--pg-line); text-align: left; }
  body.pg-ui .navbar-form { padding: 12px 8px; margin: 0; border: 0; box-shadow: none; }
  body.pg-ui .navbar-form .form-control.px150 { width: 100%; flex: 1; }

  body.pg-ui .main { padding: 12px 0 32px; }
  body.pg-ui .main > .container { padding: 0 12px; }
  body.pg-ui .main > .container > .row { margin-left: 0; margin-right: 0; }
  body.pg-ui .main .board { margin: 0; padding: 18px 16px 16px; border-radius: 10px; }
  body.pg-ui .main .board > h3 { font-size: 19px; margin-bottom: 14px; }

  /* 검색 한 줄(분류 선택 + 입력 + 버튼), 정렬은 그 아래 */
  body.pg-ui .board > .row.mb20 { flex-direction: column-reverse; align-items: stretch; }
  body.pg-ui .board > .row.mb20 > .col-md-6 { margin-left: 0; }
  body.pg-ui .board > .row.mb20 > [class*="col-"] { width: 100%; min-width: 0; }
  body.pg-ui .board .searchbox, body.pg-ui .board .searchbox .navbar-form, body.pg-ui .board .searchbox .form-group { width: 100%; min-width: 0; }
  body.pg-ui .board .searchbox .form-control.px100 { width: 120px; flex: 0 0 120px; padding-left: 10px; font-size: 13px; }
  body.pg-ui .board .searchbox .form-control.px150 { width: auto; flex: 1; min-width: 0; }
  body.pg-ui .board > .row.mb20 > .col-xs-6 select { width: 100%; }

  /* 아래 '표 → 카드' 규칙은 목록 표(머리줄 첫 칸이 전체선택 체크박스)에만 — 스코어 입력표 등 다른 표는 그대로 */
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) { border-top: 0; display: block; }
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > thead, body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > tbody { display: block; }
  /* 머리줄은 '전체 선택' 한 줄로 */
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > thead > tr { display: flex; align-items: center; gap: 10px; background: #f8f9fa; border-radius: 8px; padding: 0 12px; }
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > thead > tr > th { display: none; background: none; border: 0; }
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > thead > tr > th.col-chk { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > thead > tr > th.col-chk:after { content: "전체 선택"; font-size: 13px; color: var(--pg-sub); font-weight: 600; }
  /* 글 한 개 = 카드: 1줄 [체크] 제목 / 2줄 번호(공지)·날짜·조회 */
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > tbody > tr {
    display: grid; grid-template-columns: auto auto auto 1fr;
    grid-template-areas: "chk title title title" "chk num date hit";
    column-gap: 10px; row-gap: 6px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--pg-line);
  }
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > tbody > tr > td, body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > tbody > tr > th { display: block; padding: 0; border: 0; text-align: left; }
  body.pg-ui .board .table .col-chk, body.pg-ui .board .table .col-num, body.pg-ui .board .table .col-date,
  body.pg-ui .board .table .col-hit, body.pg-ui .board .table .col-title { width: auto; }
  body.pg-ui .board .table .col-chk { grid-area: chk; align-self: start; padding-top: 3px !important; }
  body.pg-ui .board .table .col-title { grid-area: title; font-size: 15px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
  body.pg-ui .board .table .col-num { grid-area: num; font-size: 12px; }
  body.pg-ui .board .table .col-author { display: none; }
  body.pg-ui .board .table .col-date { grid-area: date; font-size: 12px; }
  body.pg-ui .board .table .col-hit { grid-area: hit; justify-self: start; font-size: 12px; text-align: left; }
  body.pg-ui .board .table .col-hit:before { content: "조회 "; }  body.pg-ui .board .table .nopost { grid-column: 1 / -1; }

  /* 하단 버튼: 글쓰기는 오른쪽, 손가락 크기 */
  body.pg-ui .btn, body.pg-ui .btn-sm { height: 40px; padding: 8px 14px; }
  body.pg-ui .board .border_button > .pull-right { width: 100%; margin: 4px 0 0; order: 9; }
  body.pg-ui .board .border_button > .pull-right .btn { width: 100%; height: 46px; font-size: 15px; }
}

/* ═════════ 2단계: 글보기 · 글쓰기 ═════════ */
/* 글보기 정보표(브랜드 노출·해시태그) */
body.pg-ui .board .list-group { border: 1px solid var(--pg-line); border-radius: 10px; overflow: hidden; margin-bottom: 24px; }
body.pg-ui .board .list-group-item { border: 0; border-top: 1px solid var(--pg-line); border-radius: 0 !important; padding: 12px 16px; }
body.pg-ui .board .list-group-item:first-child { border-top: 0; }
body.pg-ui .board .list-group-item strong { color: var(--pg-sub); font-weight: 600; font-size: 13px; }
body.pg-ui .board .list-group-item a { color: var(--pg-green-dark); }
/* 글 상세 이름표(col-sm-2, 폭 16.7% float): 태블릿에서 80px 로 좁아져 꺾이고, float 이라 줄 높이가 안 늘어 다음 줄과 겹침 → 고정 폭 + 줄 높이 따라 늘게 */
body.pg-ui .board .list-group-item::after { content: ''; display: table; clear: both; }
body.pg-ui .board .list-group-item:has(> .col-sm-2) { display: flex; gap: 16px; align-items: baseline; }
body.pg-ui .board .list-group-item:has(> .col-sm-2)::after { content: none; }
body.pg-ui .board .list-group-item > .col-sm-2 { flex: 0 0 160px; width: auto; float: none; padding: 0; }
body.pg-ui .board .list-group-item > .col-sm-2 + .list-group-item-text { flex: 1 1 auto; min-width: 0; min-height: 0 !important; }
@media (max-width: 767px) {
  body.pg-ui .board .list-group-item:has(> .col-sm-2) { flex-direction: column; align-items: stretch; gap: 4px; }
  body.pg-ui .board .list-group-item > .col-sm-2 { flex: none; }
}
/* 글보기 하단 버튼 묶음 */
body.pg-ui .board .border_button .btn-group { display: flex; flex-wrap: wrap; gap: 6px; float: none !important; }
body.pg-ui .board .border_button .btn-group > .btn { border-radius: 8px !important; margin: 0; float: none; }
/* 글쓰기 */
body.pg-ui .board .form-horizontal .form-group { margin-left: 0; margin-right: 0; margin-bottom: 18px; }
body.pg-ui .board .form-horizontal .control-label { font-weight: 600; color: var(--pg-text); font-size: 14px; }
body.pg-ui .board .form-horizontal [class*="col-sm-"][style*="display:table"] { display: block !important; }
body.pg-ui .board .form-horizontal .form-control { width: 100%; }
body.pg-ui .board .form-horizontal .form-inline .form-control { width: auto; min-width: 220px; }
body.pg-ui .board input[type=file].form-control { height: auto; padding: 7px 10px; }
body.pg-ui .board .help-block { font-size: 12px; color: var(--pg-sub); margin-top: 6px; }
/* 체크박스 → 칩 (누르기 쉬운 크기, 선택되면 초록) */
body.pg-ui .board .checkbox { margin: 0; padding-top: 2px; }
body.pg-ui .board .checkbox label, body.pg-ui .board label.checkbox-inline {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px 7px 12px; margin: 0 6px 8px 0;
  border: 1px solid #d5d7da; border-radius: 999px; font-weight: 500; font-size: 14px; line-height: 1.3; cursor: pointer; background: #fff;
  vertical-align: top; min-height: 0;
}
body.pg-ui .board .checkbox-inline + .checkbox-inline { margin-left: 0; }
body.pg-ui .board .checkbox input[type=checkbox], body.pg-ui .board .checkbox-inline input[type=checkbox] { position: static; margin: 0; width: 16px; height: 16px; }
body.pg-ui .board .checkbox label:has(input:checked), body.pg-ui .board label.checkbox-inline:has(input:checked) {
  border-color: var(--pg-green); background: var(--pg-green-soft); color: var(--pg-green-dark);
}
body.pg-ui .board .form-horizontal iframe { border: 1px solid var(--pg-line) !important; border-radius: 8px; }
body.pg-ui .board .border_button.text-center { justify-content: center; }
body.pg-ui .board .border_button.text-center .btn { min-width: 110px; height: 44px; font-size: 15px; }

/* ═════════ 3단계: 홈(요약 상자) ═════════ */
body.pg-ui .main .container > .row > h3 { font-size: 18px; font-weight: 700; margin: 8px 15px 14px; padding: 0; border: 0; color: var(--pg-text); }
body.pg-ui .main .container > .row > h3:not(:first-of-type) { margin-top: 28px; }
body.pg-ui .panel {
  border: 1px solid var(--pg-line); border-radius: var(--pg-radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); overflow: hidden; margin-bottom: 20px; background: #fff;
}
body.pg-ui .panel > .panel-heading {
  background: #fff !important; background-image: none !important; border-bottom: 1px solid var(--pg-line); color: var(--pg-text) !important;
  font-weight: 700; font-size: 15px; padding: 14px 16px; display: flex; align-items: center; gap: 8px;
}
body.pg-ui .panel > .panel-heading:before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pg-navy); flex: 0 0 8px; }
body.pg-ui .panel-success > .panel-heading:before { background: var(--pg-green); }
body.pg-ui .panel-primary > .panel-heading:before { background: var(--pg-orange); }
body.pg-ui .panel > .panel-heading .view-all { margin: 0 0 0 auto !important; float: none !important; position: static; line-height: 1.4; align-self: center; font-weight: 500; font-size: 13px; }
body.pg-ui .panel > .panel-heading .view-all a { color: var(--pg-sub); }
body.pg-ui .panel > .panel-heading .view-all a:hover { color: var(--pg-green-dark); }
body.pg-ui .panel .table-responsive { border: 0; margin: 0; }
body.pg-ui .panel .table { margin: 0; table-layout: fixed; width: 100%; }
body.pg-ui .panel .table > tbody > tr > td { border-top: 1px solid #f0f1f3; padding: 11px 16px; font-size: 14px; vertical-align: middle; }
body.pg-ui .panel .table > tbody > tr:first-child > td { border-top: 0; }
body.pg-ui .panel .table > tbody > tr > td:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pg-ui .panel .table > tbody > tr > td.px80 { width: 72px; text-align: right; color: var(--pg-sub); font-size: 13px; white-space: nowrap; }
body.pg-ui .panel .table-hover > tbody > tr:hover { background: #f6fbf8; }

/* ═════════ 4단계: 상품 목록(카드) ═════════ */
body.pg-ui .board .cmall-list > ul.row { display: flex; flex-wrap: wrap; margin: 0 -8px; padding: 0; list-style: none; }
body.pg-ui .board .cmall-list .cmall-list-col { float: none; padding: 0 8px; margin-bottom: 16px; display: flex; }
body.pg-ui .board .cmall-list .thumbnail {
  position: relative; width: 100%; margin: 0; padding: 14px; border: 1px solid var(--pg-line); border-radius: 12px; box-shadow: none;
  display: flex; flex-direction: column; gap: 6px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
body.pg-ui .board .cmall-list .thumbnail:hover { border-color: var(--pg-green); box-shadow: 0 4px 14px rgba(16,24,40,.06); }
body.pg-ui .board .cmall-list .thumbnail > input[type=checkbox] { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; margin: 0; }
body.pg-ui .board .cmall-list .thumbnail > .label { align-self: flex-start; }
/* 실제 이미지가 있으면 카드 위쪽에 꽉 차게, 대체 이미지(no-img)는 숨겨 간결한 카드로 */
body.pg-ui .board .cmall-list .thumbnail img { width: 100% !important; height: auto !important; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; display: block; }
body.pg-ui .board .cmall-list .thumbnail a:has(> img[src$="no-img.png"]) { display: none; }
body.pg-ui .board .cmall-list .cmall-tit { margin: 4px 0 0; font-size: 15px; font-weight: 600; line-height: 1.4; padding-right: 24px; }
body.pg-ui .board .cmall-list .cmall-tit a { color: var(--pg-text); }
body.pg-ui .board .cmall-list .cmall-txt { margin: 0; color: var(--pg-sub); font-size: 13px; }
body.pg-ui .board .cmall-list .cmall-txt:empty { display: none; }
body.pg-ui .board .cmall-list .cmall-detail { margin: auto 0 0; padding: 8px 0 0; list-style: none; border-top: 1px solid #f0f1f3; display: flex; justify-content: flex-end; }
body.pg-ui .board .cmall-list .cmall-sale-price { float: none !important; color: var(--pg-green-dark); font-weight: 700; font-size: 15px; }

/* ═════════ 1단계: 휴대폰 메뉴 → 오른쪽 서랍 ═════════ */
.pg-nav-backdrop, body.pg-ui .pg-nav-head { display: none; }
@media (max-width: 767px) {
  body.pg-ui .navbar-default .navbar-collapse {
    display: block !important; position: fixed; top: 0; right: 0; bottom: 0; width: min(84vw, 320px); height: 100vh !important; max-height: none !important;
    margin: 0; padding: 18px 16px 28px; background: #fff; z-index: 1060; overflow-y: auto; border: 0;
    transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; box-shadow: -8px 0 24px rgba(16,24,40,.14);
  }
  body.pg-ui.pg-nav-open .navbar-default .navbar-collapse { transform: none; visibility: visible; }
  .pg-nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 1055; opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
  body.pg-ui.pg-nav-open .pg-nav-backdrop { opacity: 1; visibility: visible; }
  body.pg-ui.pg-nav-open { overflow: hidden; }
  body.pg-ui .pg-nav-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; font-size: 18px; font-weight: 700; }
  body.pg-ui .pg-nav-close { border: 0; background: none; font-size: 28px; line-height: 1; padding: 4px 8px; color: var(--pg-text); }
  body.pg-ui .navbar-default .navbar-collapse .navbar-nav { float: none !important; margin: 0; }
  body.pg-ui .navbar-default .navbar-collapse .navbar-nav > li { float: none; }
  body.pg-ui .navbar-default .navbar-collapse .navbar-nav > li > a { padding: 14px 8px; font-size: 16px; border-bottom: 1px solid var(--pg-line); }
  body.pg-ui .navbar-default .navbar-collapse .dropdown-menu {
    display: block; position: static; float: none; box-shadow: none; border: 0; padding: 4px 0 10px 10px; margin: 0; min-width: 0; background: transparent;
  }
  body.pg-ui .navbar-default .navbar-collapse .dropdown-menu > li > a,
  body.pg-ui .navbar-default .navbar-nav .open .dropdown-menu > li > a { padding: 9px 10px; font-size: 15px; color: var(--pg-sub) !important; background: transparent !important; border-radius: 6px; }
  body.pg-ui .navbar-default .navbar-collapse a.is-current { color: var(--pg-green-dark) !important; background: var(--pg-green-soft); font-weight: 700; border-radius: 6px; }
  body.pg-ui .navbar-default .navbar-collapse .has-current > a { color: var(--pg-green-dark); }
  body.pg-ui .navbar-default .navbar-collapse .navbar-form { margin: 16px 0 0; padding: 0; }

  body.pg-ui .board .form-horizontal .form-inline .form-control { width: 100%; min-width: 0; }
  body.pg-ui .board .border_button.text-center .btn { flex: 1; }
  body.pg-ui .board .cmall-list .cmall-list-col { width: 50%; }
  body.pg-ui .board .cmall-list .thumbnail { padding: 12px; }
  body.pg-ui .main .container > .row > h3 { margin-left: 3px; }
}

/* ═════════ 휴대폰 상단 KO | EN · 서랍 계정 줄 ═════════ */
body.pg-ui .pg-nav-lang, body.pg-ui .pg-nav-account { display: none; }
@media (max-width: 767px) {
  /* 상단 남색 바(로그아웃·언어)는 휴대폰에서 숨기고 로고 줄·서랍으로 옮김 — 실제 휴대폰 화면과 같은 구성 */
  body.pg-ui header.header { display: none; }
  body.pg-ui .header_line { height: 4px; background: var(--pg-navy); }
  body.pg-ui .navbar-default .navbar-header { position: relative; }
  body.pg-ui .pg-nav-lang {
    display: inline-flex; position: absolute; right: 56px; top: 13px; z-index: 2;
    border: 1px solid #d5d7da; border-radius: 999px; overflow: hidden; background: #fff;
  }
  body.pg-ui .pg-nav-lang a { min-width: 40px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; font-size: 13px; font-weight: 700; color: #9b9ea3; letter-spacing: .02em; }
  body.pg-ui .pg-nav-lang a.is-active { background: var(--pg-text); color: #fff; }
  body.pg-ui .pg-nav-lang a[data-lang="en"].is-active { background: var(--pg-orange); }
  /* 서랍 아래 계정 줄 */
  body.pg-ui .pg-nav-account { display: block; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--pg-line); }
  body.pg-ui .pg-nav-account-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  body.pg-ui .pg-nav-account-label { font-size: 14px; font-weight: 600; color: var(--pg-sub); }
  body.pg-ui .pg-nav-lang-lg { display: inline-flex; border: 1px solid #d5d7da; border-radius: 999px; overflow: hidden; }
  body.pg-ui .pg-nav-lang-lg a { padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--pg-sub); }
  body.pg-ui .pg-nav-lang-lg a.is-active { background: var(--pg-text); color: #fff; }
  body.pg-ui .pg-nav-lang-lg a[data-lang="en"].is-active { background: var(--pg-orange); }
  body.pg-ui .pg-nav-logout {
    display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 0; height: 44px;
    border: 1px solid #d5d7da; border-radius: 10px; font-weight: 600; color: var(--pg-text);
  }
  /* 서랍 하위 메뉴: 글자 키우고 들여쓰기 + 왼쪽 선으로 묶음 구분 */
  body.pg-ui .navbar-default .navbar-collapse .dropdown-menu { margin: 4px 0 12px 8px !important; padding: 0 0 0 10px !important; border-left: 2px solid var(--pg-line) !important; }
  body.pg-ui .navbar-default .navbar-collapse .dropdown-menu > li > a { color: #434852 !important; font-size: 15px; padding: 10px 12px; }
  body.pg-ui .navbar-default .navbar-collapse a.is-current:after { display: none; }
}

/* 휴대폰 KO|EN 색: 상단 남색 바용 스타일(흰 글자, layout.php 인라인 !important)을 밝은 배경용으로 덮어씀 */
@media (max-width: 767px) {
  body.pg-ui .navbar-default .navbar-header { text-align: left; min-height: 56px; }
  body.pg-ui .navbar-default .navbar-header > a { display: inline-block; float: left; }
  body.pg-ui .pg-nav-lang a, body.pg-ui .pg-nav-lang-lg a { color: #8a8f98 !important; border-left: 0 !important; background: transparent; }
  body.pg-ui .pg-nav-lang a + a, body.pg-ui .pg-nav-lang-lg a + a { border-left: 1px solid #d5d7da !important; }
  body.pg-ui .pg-nav-lang a.is-active, body.pg-ui .pg-nav-lang-lg a.is-active { background: var(--pg-text) !important; color: #fff !important; }
  body.pg-ui .pg-nav-lang a[data-lang="en"].is-active, body.pg-ui .pg-nav-lang-lg a[data-lang="en"].is-active { background: var(--pg-orange) !important; color: #fff !important; border-left-color: var(--pg-orange) !important; }
  body.pg-ui .pg-nav-lang a:hover, body.pg-ui .pg-nav-lang-lg a:hover { background: #f3f4f6; }
  body.pg-ui .navbar-default .navbar-collapse .dropdown-menu { border-radius: 0 !important; }
}

/* ═════════ 정렬 보정 ═════════ */
/* 부트스트랩 clearfix(:before/:after)가 flex 안에서 빈 칸이 되어 양끝에 간격이 생기던 것 제거 → 제목·검색줄·분류·표가 같은 선 */
body.pg-ui .board > .row.mb20:before, body.pg-ui .board > .row.mb20:after,
body.pg-ui .board .cmall-list > ul.row:before, body.pg-ui .board .cmall-list > ul.row:after,
body.pg-ui .board .border_button:before, body.pg-ui .board .border_button:after,
body.pg-ui .board .searchbox .form-group:before, body.pg-ui .board .searchbox .form-group:after { display: none; content: none; }
/* 검색줄 높이 맞춤: 정렬·분류 선택, 입력, 버튼 모두 40px · 세로 가운데 */
body.pg-ui .board > .row.mb20 select.form-control, body.pg-ui .board .searchbox .form-control { height: 40px; margin: 0; }
body.pg-ui .board .searchbox .form-group > * { float: none !important; }
/* 분류 칩: 높이 고정·글자 세로 가운데, 줄바꿈 없이 가로 정렬 */
body.pg-ui .board .nav-tabs > li > a { display: inline-flex; align-items: center; height: 34px; padding: 0 16px; }
/* 표: 칸 세로 가운데, 체크박스 칸 가운데 */
body.pg-ui .board .table > thead > tr > th, body.pg-ui .board .table > tbody > tr > td, body.pg-ui .board .table > tbody > tr > th { vertical-align: middle; }
body.pg-ui .board .table .col-chk { text-align: center; }
body.pg-ui .board .table .col-num { text-align: left; }
/* 하단 버튼 줄: 같은 높이, 세로 가운데 */
body.pg-ui .board .border_button { align-items: center; }
body.pg-ui .board .border_button .btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
/* 홈 카드: 같은 줄 두 카드의 머리 높이 통일 */
body.pg-ui .panel > .panel-heading { min-height: 50px; }
@media (max-width: 767px) {
  body.pg-ui .board .table .col-chk { text-align: left; }
}
@media (max-width: 767px) {
  /* 휴대폰 기기용 목록은 정렬·카테고리 선택이 세로로 쌓임 → 간격 */
  body.pg-ui .board > .row.mb20 select.form-control + select.form-control, body.pg-ui .board > .row.mb20 .form-inline select + select { margin-top: 8px; }
}

/* ═════════ 공통: 버튼·입력칸 간격 (어느 화면이든 서로 붙지 않게) ═════════ */
/* 붙여 놓은 버튼 묶음(btn-group) → 6px 간격, 각자 둥근 모서리 */
body.pg-ui .btn-group { display: inline-flex; flex-wrap: wrap; gap: 6px; float: none; vertical-align: middle; }
body.pg-ui .btn-group.pull-right { float: right !important; }
body.pg-ui .btn-group > .btn, body.pg-ui .btn-group > .btn-group { float: none; margin: 0 !important; border-radius: 8px !important; position: relative; }
/* 나란히 놓인 버튼: 앞 버튼과 6px (flex 묶음 안에서는 gap 이 처리) */
body.pg-ui .btn + .btn { margin-left: 6px; }
body.pg-ui .btn-group > .btn + .btn, body.pg-ui .border_button > .btn + .btn, body.pg-ui .searchbox .btn { margin-left: 0; }
/* 한 줄 입력 묶음(form-inline): 입력칸·선택·버튼 사이 6px, 세로 가운데 */
body.pg-ui .form-inline .form-control + .form-control,
body.pg-ui .form-inline .form-control + .btn,
body.pg-ui .form-inline .btn + .form-control { margin-left: 6px; }
body.pg-ui .form-inline .form-control, body.pg-ui .form-inline .btn { vertical-align: middle; }
body.pg-ui .input-group { display: flex; gap: 6px; }
body.pg-ui .input-group > .form-control, body.pg-ui .input-group > .input-group-btn > .btn { border-radius: 8px !important; float: none; }
body.pg-ui .input-group > .input-group-btn { width: auto; display: block; }
body.pg-ui .input-group-btn > .btn { margin-left: 0 !important; height: 40px; }
body.pg-ui .btn-xs { height: 32px; min-width: 32px; padding: 4px 9px; font-size: 12px; line-height: 22px; display: inline-flex; align-items: center; justify-content: center; }

/* ═════════ 게시판 설정 화면(board_admin: 기본정보·카테고리·FAQ) — .box 구조를 카드로 ═════════ */
body.pg-ui .main .box {
  background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); box-shadow: 0 1px 2px rgba(16,24,40,.04);
  padding: 28px 28px 24px; margin: 0 15px;
}
body.pg-ui .main .box > .box-header { border: 0; padding: 0; margin: 0 0 20px; background: none; }
body.pg-ui .main .box > .box-header h4 { float: none !important; font-size: 22px; font-weight: 700; margin: 0 0 16px; padding: 0 !important; color: var(--pg-text); }
body.pg-ui .main .box > .box-header .nav-tabs { border: 0; display: flex; gap: 8px; margin: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.pg-ui .main .box > .box-header .nav-tabs:before, body.pg-ui .main .box > .box-header .nav-tabs:after { display: none; }
body.pg-ui .main .box > .box-header .nav-tabs > li { float: none; margin: 0; flex: 0 0 auto; }
body.pg-ui .main .box > .box-header .nav-tabs > li > a {
  display: inline-flex; align-items: center; height: 36px; padding: 0 18px; margin: 0; border: 1px solid var(--pg-line); border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--pg-sub); background: #fff;
}
body.pg-ui .main .box > .box-header .nav-tabs > li > a:hover { border-color: var(--pg-green); color: var(--pg-green-dark); }
body.pg-ui .main .box > .box-header .nav-tabs > li.active > a,
body.pg-ui .main .box > .box-header .nav-tabs > li.active > a:hover,
body.pg-ui .main .box > .box-header .nav-tabs > li.active > a:focus { background: var(--pg-text); border-color: var(--pg-text); color: #fff; }
body.pg-ui .main .box .box-table { border: 0; padding: 0; background: none; }
body.pg-ui .main .box .alert { border-radius: 10px; border: 1px solid #f3e2b3; background: #fff8e6; background-image: none; color: #8a6200; box-shadow: none; font-size: 13px; padding: 12px 16px; }
body.pg-ui .main .box .list-group { border: 1px solid var(--pg-line); border-radius: 10px; overflow: hidden; margin-bottom: 24px; box-shadow: none; }
body.pg-ui .main .box .list-group-item { border: 0; border-top: 1px solid var(--pg-line); border-radius: 0 !important; padding: 12px 16px; }
body.pg-ui .main .box .list-group-item:first-child { border-top: 0; }
body.pg-ui .main .box .list-group-item .form-group { margin: 0 !important; }
body.pg-ui .main .box .list-group-item .pl10 { padding-left: 0; }
/* 카테고리 한 줄: 이름(개수) … 오른쪽에 수정·삭제 */
body.pg-ui .main .box [class^="cat-bca-id-"], body.pg-ui .main .box [class*=" cat-bca-id-"] { display: flex; align-items: center; gap: 6px; min-height: 34px; font-weight: 500; }
body.pg-ui .main .box [class^="cat-bca-id-"] > .btn:first-of-type { margin-left: auto; }
body.pg-ui .main .box [class^="cat-bca-id-"] > .btn + .btn { margin-left: 0; }
body.pg-ui .main .box .form-inline .form-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
body.pg-ui .main .box .form-inline .form-group > .form-control, body.pg-ui .main .box .form-inline .form-group > .btn { margin-left: 0; }
/* 설정 폼(가로 라벨형) */
body.pg-ui .main .box .form-horizontal .form-group { margin-left: 0; margin-right: 0; margin-bottom: 18px; }
body.pg-ui .main .box .form-horizontal .control-label { font-weight: 600; color: var(--pg-text); }
body.pg-ui .main .box .form-horizontal .form-control { width: 100%; }
body.pg-ui .main .box .form-horizontal .form-inline .form-control { width: auto; }
body.pg-ui .main .box .help-block, body.pg-ui .main .box .help-inline { font-size: 12px; color: var(--pg-sub); margin-top: 6px; display: block; }
body.pg-ui .main .box .checkbox-inline { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 10px; margin: 0 6px 6px 0; border: 1px solid #d5d7da; border-radius: 999px; font-weight: 500; }
body.pg-ui .main .box .checkbox-inline input[type=checkbox] { position: static; margin: 0; }
body.pg-ui .main .box .checkbox-inline + .checkbox-inline { margin-left: 0; }
body.pg-ui .main .box .checkbox-inline:has(input:checked) { border-color: var(--pg-green); background: var(--pg-green-soft); color: var(--pg-green-dark); }
body.pg-ui .main .box form > .btn-group.pull-right, body.pg-ui .main .box .form-horizontal > .btn-group.pull-right { margin-top: 8px; }
body.pg-ui .main .box iframe { border: 1px solid var(--pg-line) !important; border-radius: 8px; }
/* FAQ 목록 */
body.pg-ui .main .box .box-table-header { display: flex; justify-content: flex-end; padding: 0 0 14px; margin: 0 0 14px; border-bottom: 1px solid var(--pg-line); }
body.pg-ui .main .box .box-table-header .btn-group { float: none !important; }
body.pg-ui .main .box .box-table > form > .row { margin: 0 0 8px; color: var(--pg-sub); font-size: 13px; }
body.pg-ui .main .box .table-bordered { border: 0; border-top: 1px solid var(--pg-text); }
body.pg-ui .main .box .table-bordered > thead > tr > th, body.pg-ui .main .box .table-bordered > tbody > tr > td { border: 0; border-bottom: 1px solid var(--pg-line); padding: 12px 10px; vertical-align: middle; }
body.pg-ui .main .box .table-bordered > thead > tr > th { background: #f8f9fa; color: var(--pg-sub); font-size: 13px; font-weight: 600; }
body.pg-ui .main .box .table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
body.pg-ui .main .box .table .nopost { text-align: center; color: var(--pg-sub); padding: 48px 0; background: #fff; }
body.pg-ui .main .box .box-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
body.pg-ui .main .box .box-info > .pull-left, body.pg-ui .main .box .box-info > .pull-right { float: none !important; margin: 0 !important; display: flex; align-items: center; gap: 8px; color: var(--pg-sub); font-size: 13px; }
body.pg-ui .main .box .box-info select.form-control { width: 90px; }
body.pg-ui .main .box .box-search, body.pg-ui .main .box form[name=fsearch] { display: flex; justify-content: center; }
body.pg-ui .main .box .box-search .row, body.pg-ui .main .box form[name=fsearch] .row { display: flex; gap: 6px; margin: 0; }

/* ═════════ 태그 목록 ═════════ */
body.pg-ui .main .container > .row > h3 + .media-box { margin-top: 0; }
body.pg-ui .main .media-box { background: #fff; border: 1px solid var(--pg-line); border-radius: var(--pg-radius); padding: 8px 24px; margin: 0 15px 20px; }
body.pg-ui .main .media-box .media { display: flex; gap: 16px; padding: 16px 0; margin: 0; border-top: 1px solid #f0f1f3; }
body.pg-ui .main .media-box .media:first-child { border-top: 0; }
body.pg-ui .main .media-box .media-left, body.pg-ui .main .media-box .media-body { display: block; padding: 0; width: auto; }
body.pg-ui .main .media-box .media-left img, body.pg-ui .main .media-box .media-object { width: 96px !important; height: 72px !important; object-fit: cover; border-radius: 8px; border: 0 !important; }
body.pg-ui .main .media-box .media-heading { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
body.pg-ui .main .media-box .media-body { flex: 1; min-width: 0; color: var(--pg-sub); font-size: 13px; }

@media (max-width: 767px) {
  body.pg-ui .main .box { margin: 0; padding: 18px 16px 16px; border-radius: 10px; }
  body.pg-ui .main .box > .box-header h4 { font-size: 19px; }
  body.pg-ui .main .box .form-horizontal .control-label { text-align: left; margin-bottom: 6px; padding-top: 0; }
  body.pg-ui .main .box .form-inline .form-group > .form-control, body.pg-ui .main .box .form-inline .form-control { width: 100% !important; margin: 0 0 8px !important; }
  body.pg-ui .main .box .form-inline .form-group > .btn { width: 100%; height: 44px; }
  body.pg-ui .main .box form > .form-group > .btn-group.pull-right, body.pg-ui .main .box .btn-group.pull-right { float: none !important; display: flex; width: 100%; margin-top: 8px; }
  body.pg-ui .main .box .btn-group.pull-right > .btn { flex: 1; height: 44px; }
  body.pg-ui .main .box .table-responsive { border: 0; }
  body.pg-ui .main .media-box { margin: 0 0 16px; padding: 4px 14px; }
  body.pg-ui .main .media-box .media-left img, body.pg-ui .main .media-box .media-object { width: 72px !important; height: 56px !important; }
}

/* ═════════ 줄바꿈 ═════════ */
/* 한국어는 단어 중간에서 끊지 않음(예: "브랜드 소식 노/출" 방지). 아주 긴 영문·주소만 필요할 때 끊음 */
body.pg-ui { word-break: keep-all; overflow-wrap: anywhere; }
/* 짧은 글자 요소는 한 줄 유지: 버튼·탭·칩·표 머리·숫자 칸·메뉴 */
body.pg-ui .btn, body.pg-ui .nav-tabs > li > a, body.pg-ui .label, body.pg-ui .table > thead > tr > th,
body.pg-ui .navbar-nav > li > a, body.pg-ui .header-top-menu a, body.pg-ui .pagination > li > a, body.pg-ui .lang-seg a { white-space: nowrap; }
/* 글보기 정보표: 라벨 칸 고정 폭 + 한 줄, 값은 나머지 */
body.pg-ui .list-group-item > .row { display: flex; gap: 12px; margin: 0; align-items: baseline; }
body.pg-ui .list-group-item > .row > .col-sm-2 { flex: 0 0 120px; width: auto; padding: 0; white-space: nowrap; float: none; }
body.pg-ui .list-group-item > .row > .col-sm-10 { flex: 1; width: auto; padding: 0; float: none; min-width: 0; }
/* 설정·글쓰기 폼 라벨: 한 줄 */
body.pg-ui .form-horizontal .control-label { white-space: nowrap; }
@media (min-width: 768px) and (max-width: 991px) {
  /* 태블릿: 라벨이 좁은 2칸에 끼면 꺾이므로 라벨을 3칸으로 넓힘 */
  body.pg-ui .form-horizontal .form-group > .col-sm-2.control-label { width: 22%; }
  body.pg-ui .form-horizontal .form-group > .col-sm-2.control-label + .col-sm-10 { width: 78%; }
}
@media (max-width: 767px) {
  body.pg-ui .list-group-item > .row { flex-direction: column; gap: 4px; }
  body.pg-ui .list-group-item > .row > .col-sm-2 { flex: none; }
}

/* ═════════ 설정 화면 세부 정렬 ═════════ */
/* 카테고리 추가: [상위 선택][이름][정렬순서][추가하기] 한 줄, 넓이는 나눠 가짐 */
body.pg-ui .main .box .form-group > .col-sm-8.form-inline { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
body.pg-ui .main .box .form-group > .col-sm-8.form-inline > .form-control { flex: 1 1 0; min-width: 0; width: auto !important; margin: 0 !important; }
body.pg-ui .main .box .form-group > .col-sm-8.form-inline > select.form-control { flex: 0 0 180px; }
body.pg-ui .main .box .form-group > .col-sm-8.form-inline > .btn { flex: 0 0 auto; height: 40px; margin: 0 !important; }
/* FAQ 목록 아래: "20 개씩 보기" 한 줄 */
body.pg-ui .main .box .box-info > .pull-left { white-space: nowrap; }
/* FAQ 검색: [분류][검색어][검색] 한 줄, 가운데 */
body.pg-ui .main .box .box-search { width: 100%; }
body.pg-ui .main .box .box-search .row > [class*="col-"] { display: flex; gap: 6px; float: none; width: 100%; max-width: 520px; margin: 0 auto; padding: 0; }
body.pg-ui .main .box .box-search select.form-control { flex: 0 0 110px; width: 110px; }
body.pg-ui .main .box .box-search .input-group { flex: 1; min-width: 0; }
@media (max-width: 767px) {
  body.pg-ui .main .box .form-group > .col-sm-8.form-inline { flex-wrap: wrap; }
  body.pg-ui .main .box .form-group > .col-sm-8.form-inline > .form-control,
  body.pg-ui .main .box .form-group > .col-sm-8.form-inline > select.form-control { flex: 1 1 100%; }
  body.pg-ui .main .box .form-group > .col-sm-8.form-inline > .btn { flex: 1 1 100%; height: 44px; }
  body.pg-ui .main .box .box-search select.form-control { flex: 0 0 96px; width: 96px; }
}
/* 설정 화면: 폼 칸 안쪽 여백(부트스트랩 col 15px) 제거 → 목록·버튼과 같은 선 / 검색줄 전체 폭 */
body.pg-ui .main .box .box-search, body.pg-ui .main .box .box-search form, body.pg-ui .main .box .box-search .row { width: 100%; }
@media (max-width: 767px) {
  body.pg-ui .main .box .form-horizontal .form-group > [class*="col-"] { padding-left: 0; padding-right: 0; float: none; width: 100%; }
  body.pg-ui .main .box .box-search .row > [class*="col-"] { max-width: none; }
}
body.pg-ui .main .box .box-search { padding: 0; margin-top: 8px; }
body.pg-ui .main .box .box-search .row { display: block; margin: 0; }
body.pg-ui .main .box .box-search select.form-control { margin: 0; }

/* ═════════ 이름표(col-*) 없는 목록 템플릿(product·score·popup·basic·mobile)도 같은 모양 ═════════ */
/* 칸 순서: 1 체크 / 2 번호 / 3 제목 / 4 글쓴이(참가자) / 5 날짜 / 6 조회수 — 첫 칸이 체크박스인 줄에만 적용 */
body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(1) { width: 40px; text-align: center; }
body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(2) { width: 70px; color: var(--pg-sub); white-space: nowrap; font-size: 13px; }
body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(4) { width: 140px; color: var(--pg-sub); white-space: nowrap; font-size: 13px; }
body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(5) { width: 90px; color: var(--pg-sub); white-space: nowrap; font-size: 13px; }
body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(6) { width: 70px; color: var(--pg-sub); white-space: nowrap; font-size: 13px; text-align: right; }
body.pg-ui .board .table tbody tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(3) a { font-weight: 500; color: var(--pg-text); }
@media (max-width: 991px) {
  body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(4) { display: none; }
}
@media (max-width: 767px) {
  /* 머리줄: '전체 선택' 한 줄 */
  body.pg-ui .board .table > thead > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :first-child { display: flex; align-items: center; gap: 8px; padding: 10px 0; width: auto; }
  body.pg-ui .board .table > thead > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :first-child:after { content: "전체 선택"; font-size: 13px; color: var(--pg-sub); font-weight: 600; }
  /* 글 한 개 = 카드: 1줄 [체크] 제목 / 2줄 번호·날짜·조회 */
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) {
    display: grid; grid-template-columns: auto auto auto 1fr; grid-template-areas: "chk title title title" "chk num date hit";
    column-gap: 10px; row-gap: 6px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--pg-line);
  }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > * { display: block; padding: 0; border: 0; width: auto; text-align: left; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(1) { grid-area: chk; align-self: start; padding-top: 3px; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(2) { grid-area: num; font-size: 12px; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(3) { grid-area: title; font-size: 15px; line-height: 1.45; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(4) { display: none; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(5) { grid-area: date; font-size: 12px; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(6) { grid-area: hit; font-size: 12px; justify-self: start; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(6):before { content: "조회 "; }
  /* 제목 칸 안의 분류 칩은 한 줄로, 제목은 그 뒤에 이어서(필요하면 칩 아래로) */
  body.pg-ui .board .table .label { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: 2px; }
}
@media (max-width: 767px) {
  /* 휴대폰 카드: PC 용 칸 너비·정렬을 풀어 둘째 줄을 [번호 날짜 조회] 로 붙여 정렬 */
  body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(1),
  body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(2),
  body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(5),
  body.pg-ui .board .table tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(6) { width: auto; text-align: left; }
  body.pg-ui .board .table > thead > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :first-child { width: auto; }
  body.pg-ui .board .table > tbody > tr:has(> :first-child input[type=checkbox]):not(:has(.col-title)) > :nth-child(3) .label { margin-right: 6px; }
}
/* 표 안의 짧은 머리 칸(예: 스코어카드 "1 홀", "합계")은 한 줄 */
body.pg-ui .board .table > tbody > tr > th { white-space: nowrap; }

@media (max-width: 767px) {
  /* 목록 카드: 글쓴이 칸 숨김을 표 범위 규칙보다 우선 */
  body.pg-ui .board .table:has(> thead > tr > :first-child input[type=checkbox]) > tbody > tr > td.col-author { display: none; }
}
/* 스코어카드 입력표: 첫 칸(이름·N 홀·합계) 한 줄, 폭 확보 */
body.pg-ui .board .table:not(:has(> thead > tr > :first-child input[type=checkbox])) tr > :first-child { white-space: nowrap; width: 1%; padding-left: 8px; padding-right: 8px; }
@media (max-width: 767px) {
  /* 게시판 글쓰기 폼도 칸 안쪽 여백 제거 → 카드 안쪽 선과 맞춤 */
  body.pg-ui .board .form-horizontal .form-group > [class*="col-"] { padding-left: 0; padding-right: 0; }
}

/* ═════════ 로그인 화면 (views/login 의 login.php, body.pg-login) ═════════ */
/* 로그아웃 상태라 쓸 수 없는 상단 메뉴·검색·바닥은 숨기고 가운데 카드만 */
body.pg-ui.pg-login header.header, body.pg-ui.pg-login .navbar, body.pg-ui.pg-login footer, body.pg-ui.pg-login .header_line { display: none !important; }
body.pg-ui.pg-login {
  background: radial-gradient(1200px 600px at 10% -10%, #e3f6ea 0%, rgba(227,246,234,0) 60%),
              radial-gradient(900px 500px at 110% 110%, #dfe8f3 0%, rgba(223,232,243,0) 60%), #f5f6f8;
  min-height: 100vh;
}
body.pg-ui.pg-login .main { padding: 0; }
body.pg-ui.pg-login .main > .container > .row { margin: 0; }
body.pg-ui .pg-login-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
body.pg-ui .pg-login-card {
  width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--pg-line); border-radius: 16px;
  box-shadow: 0 20px 48px rgba(16,24,40,.10), 0 2px 6px rgba(16,24,40,.04); padding: 36px 32px 28px;
}
body.pg-ui .pg-login-brand { text-align: center; margin-bottom: 26px; }
body.pg-ui .pg-login-brand img { height: 40px; width: auto; }
body.pg-ui .pg-login-brand h1 { font-size: 22px; font-weight: 700; margin: 18px 0 4px; color: var(--pg-text); letter-spacing: -0.02em; }
body.pg-ui .pg-login-brand p { margin: 0; font-size: 13px; color: var(--pg-sub); }
body.pg-ui .pg-login-field { margin-bottom: 16px; }
body.pg-ui .pg-login-field label { display: block; font-size: 13px; font-weight: 600; color: var(--pg-text); margin-bottom: 6px; }
body.pg-ui .pg-login-field .form-control { height: 48px; font-size: 15px; padding: 0 14px; border-radius: 10px; }
body.pg-ui .pg-login-field label.error { color: #d33; font-weight: 500; font-size: 12px; margin: 6px 0 0; }
body.pg-ui .pg-login-field .form-control.error { border-color: #e5a3a3; }
body.pg-ui .pg-login-pw { position: relative; }
body.pg-ui .pg-login-pw .form-control { padding-right: 48px; }
body.pg-ui .pg-login-eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: none; color: #9b9ea3; border-radius: 8px; }
body.pg-ui .pg-login-eye:hover, body.pg-ui .pg-login-eye.is-on { color: var(--pg-green-dark); background: var(--pg-green-soft); }
body.pg-ui .pg-login-auto { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 16px; font-size: 14px; font-weight: 500; color: var(--pg-sub); cursor: pointer; }
body.pg-ui .pg-login-auto input { width: 18px; height: 18px; margin: 0; }
body.pg-ui .pg-login-card .autologinalert { font-size: 12px; line-height: 1.6; border-radius: 10px; border: 1px solid #cfe3f6; background: #f1f7fd; background-image: none; color: #2f5d8a; margin: -6px 0 16px; padding: 10px 12px; }
body.pg-ui .pg-login-card .alert { border-radius: 10px; font-size: 13px; }
body.pg-ui .pg-login-submit { width: 100%; height: 50px !important; font-size: 16px !important; border-radius: 10px !important; letter-spacing: .02em; }
body.pg-ui .pg-login-social { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; font-size: 13px; color: var(--pg-sub); }
body.pg-ui .pg-login-help { text-align: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--pg-line); }
body.pg-ui .pg-login-help a { font-size: 13px; color: var(--pg-sub); }
body.pg-ui .pg-login-help a:hover { color: var(--pg-green-dark); }
body.pg-ui .pg-login-foot { margin: 22px 0 0; font-size: 12px; color: #9b9ea3; }
@media (max-width: 767px) {
  body.pg-ui .pg-login-wrap { justify-content: flex-start; padding-top: 48px; }
  body.pg-ui .pg-login-card { padding: 28px 20px 22px; border-radius: 14px; }
}
/* 로그인 카드 안내 상자(로그인 후 이용 가능 등): 그라데이션 없이 옅은 파랑 */
body.pg-ui .pg-login-card > .alert { background: #f1f7fd; background-image: none; border: 1px solid #cfe3f6; color: #2f5d8a; box-shadow: none; text-shadow: none; padding: 12px 40px 12px 14px; margin-bottom: 18px; position: relative; }
body.pg-ui .pg-login-card > .alert .close { position: absolute; right: 12px; top: 10px; opacity: .5; }
body.pg-ui .pg-login-card > .alert-warning { background: #fff8e6; border-color: #f3e2b3; color: #8a6200; }
body.pg-ui .tooltip-inner { border-radius: 6px; padding: 6px 10px; font-size: 12px; }
body.pg-ui .pg-login-help { color: var(--pg-sub); font-size: 13px; }
