/* ============================================================
   고기예 — 낚시 커뮤니티 · 클래식 BBS 스타일
   ============================================================ */
:root {
  --red: #d81f26;
  --red-dark: #b5161c;
  --ink: #1c1c1c;
  --gnb: #1f1f1f;
  --line: #e1e1e1;
  --line-strong: #cfcfcf;
  --muted: #888;
  --link: #2a2a2a;
  --blue: #1f6fb2;
  --blue-soft: #eaf3fb;
  --notice: #fff8e6;
  --notice-line: #f1d98a;
  --page-bg: #ededed;
  --box: #fff;
  --thumb-bg: #f2f2f2;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", Dotum, "돋움", sans-serif;
  background: var(--page-bg);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; vertical-align: middle; }
ul { list-style: none; }

.container { width: 1160px; max-width: 100%; margin: 0 auto; }

/* ---------- 최상단 유틸 바 ---------- */
.utilbar { background: #f6f6f6; border-bottom: 1px solid var(--line); font-size: 11.5px; color: #666; }
.utilbar .container { display: flex; align-items: center; height: 30px; }
.utilbar .u-left { display: flex; gap: 14px; }
.utilbar .u-right { margin-left: auto; display: flex; gap: 12px; }
.utilbar a { color: #666; }
.utilbar .date { color: #999; }

/* ---------- 헤더(로고 + 배너) ---------- */
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header .container { display: flex; align-items: center; gap: 22px; height: 92px; }
.logo { display: flex; align-items: center; gap: 2px; font-size: 30px; font-weight: 800; letter-spacing: -1px; }
.logo .mark { background: var(--red); color: #fff; border-radius: 7px; padding: 2px 9px; font-style: italic; }
.logo .word { color: #111; }
.header-banners { margin-left: auto; display: flex; gap: 8px; }
.hbanner { width: 150px; height: 56px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; text-align: center; line-height: 1.25; }

/* ---------- GNB ---------- */
.gnb { background: var(--gnb); }
.gnb .container { display: flex; align-items: center; height: 46px; }
.gnb ul { display: flex; height: 100%; }
.gnb li { height: 100%; }
.gnb li a { display: flex; align-items: center; height: 100%; padding: 0 16px; color: #e7e7e7; font-size: 14.5px; font-weight: 600; }
.gnb li a:hover { background: #2e2e2e; text-decoration: none; }
.gnb li.active a { color: #fff; background: var(--red); }
.gnb .gnb-icons { margin-left: auto; display: flex; gap: 14px; padding-right: 6px; color: #bbb; font-size: 14px; }

/* ---------- 본문 3단 레이아웃 ---------- */
.layout { display: grid; grid-template-columns: 158px 1fr 182px; gap: 16px; padding: 16px 0 40px; align-items: start; }
.col-main { min-width: 0; }

/* ---------- 공용 박스 ---------- */
.box { background: var(--box); border: 1px solid var(--line); margin-bottom: 14px; }
.box-h { background: #fafafa; border-bottom: 1px solid var(--line); padding: 8px 11px; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: space-between; }
.box-h .more { font-size: 11px; color: var(--muted); font-weight: 400; }
.box-b { padding: 10px 11px; }
.box-red .box-h { background: var(--red); color: #fff; border-bottom: none; }

/* ---------- 좌측 사이드바 ---------- */
.login-box { border: 1px solid var(--line); background: #fff; padding: 11px; margin-bottom: 14px; }
.login-box input[type=text], .login-box input[type=password], .login-box input[type=email] {
  width: 100%; height: 28px; border: 1px solid var(--line-strong); padding: 0 7px; margin-bottom: 5px; font-size: 12px; }
.login-box .btn-login { width: 100%; height: 60px; background: var(--red); color: #fff; border: none; font-weight: 700; font-size: 14px; cursor: pointer; border-radius: 2px; }
.login-box .btn-login.tall { height: 34px; }
.login-box .login-links { display: flex; justify-content: center; gap: 8px; font-size: 11.5px; color: #999; margin-top: 8px; }
.login-box .login-links a { color: #777; }
.login-box .me { font-size: 12.5px; line-height: 1.7; }
.login-box .me b { color: var(--red); }
.login-box .me-actions { display: flex; gap: 6px; margin-top: 9px; }
.login-box .me-actions a, .login-box .me-actions button {
  flex: 1; text-align: center; border: 1px solid var(--line-strong); background: #f7f7f7; padding: 6px 0; font-size: 12px; cursor: pointer; color: #333; border-radius: 2px; }
.login-box .me-actions .primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }

/* 좌측 메뉴 리스트 */
.lmenu { border: 1px solid var(--line); border-top: none; }
.lmenu li a { display: flex; justify-content: space-between; align-items: center; padding: 9px 11px; border-top: 1px solid var(--line); font-size: 12.5px; color: #444; background: #fff; }
.lmenu li a:hover { background: #fafafa; text-decoration: none; }
.lmenu li.on a { background: #fff7e6; color: var(--red); font-weight: 700; }
.lmenu li a .arr { color: #ccc; }

/* 랭킹 */
.rank li { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 12px; border-bottom: 1px dashed #eee; }
.rank li:last-child { border-bottom: none; }
.rank .n { width: 16px; height: 16px; border-radius: 3px; background: #b9b9b9; color: #fff; font-size: 11px; text-align: center; line-height: 16px; font-weight: 700; flex: none; }
.rank li:nth-child(1) .n { background: #e8b021; }
.rank li:nth-child(2) .n { background: #9aa3ad; }
.rank li:nth-child(3) .n { background: #cf8a5a; }
.rank .nm { flex: 1; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .ct { color: #aaa; font-size: 11px; }

/* 공지/리스트형 박스 */
.dotlist li { display: flex; gap: 6px; padding: 4px 0; font-size: 12px; border-bottom: 1px dashed #eee; }
.dotlist li:last-child { border-bottom: none; }
.dotlist li:before { content: "·"; color: var(--red); }
.dotlist a { color: #555; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dotlist .t { color: #b3b3b3; font-size: 11px; }

/* ---------- 우측 사이드바 ---------- */
.rbanner { width: 100%; border-radius: 4px; margin-bottom: 12px; color: #fff; text-align: center; padding: 22px 10px; font-weight: 800; font-size: 14px; line-height: 1.35; }

/* ---------- 광고 placeholder 공통 ---------- */
.ph { display: flex; align-items: center; justify-content: center; text-align: center; color: #fff; font-weight: 700; }
.ph small { display: block; font-weight: 400; opacity: .85; font-size: 11px; margin-top: 3px; }

/* ---------- 페이지 안내 배너(파랑) ---------- */
.page-banner { background: #2b4a7a; color: #fff; padding: 12px 16px; font-size: 14px; font-weight: 700; border-radius: 3px 3px 0 0; }
.page-info { background: #fff; border: 1px solid var(--line); border-top: none; padding: 11px 16px; font-size: 12px; color: #666; line-height: 1.9; margin-bottom: 14px; }
.page-info .warn { color: var(--red); }

/* 가로 광고 */
.ad-row { display: flex; gap: 10px; margin-bottom: 14px; }
.ad-row .ph { flex: 1; height: 60px; border-radius: 3px; font-size: 13px; }

/* ---------- 카테고리 탭 ---------- */
.tabs { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-bottom: 2px solid var(--ink); background: #fafafa; }
.tabs a { padding: 9px 16px; font-size: 13px; color: #555; border-right: 1px solid var(--line); }
.tabs a:hover { background: #fff; text-decoration: none; }
.tabs a.on { background: var(--ink); color: #fff; font-weight: 700; }

/* ---------- 글 목록 테이블 ---------- */
.list-tools { display: flex; align-items: center; padding: 8px 2px; font-size: 12px; color: #777; }
.list-tools .total b { color: var(--red); }
.list-tools .right { margin-left: auto; display: flex; gap: 6px; }
.btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-strong); background: #f7f7f7; color: #333; padding: 6px 12px; font-size: 12.5px; cursor: pointer; border-radius: 2px; }
.btn:hover { background: #f0f0f0; text-decoration: none; }
.btn-write { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.btn-write:hover { background: var(--red-dark); }

table.plist { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
table.plist th { background: #f7f7f7; border-bottom: 1px solid var(--line-strong); font-size: 12px; color: #666; font-weight: 600; padding: 9px 4px; }
table.plist td { border-bottom: 1px solid var(--line); padding: 8px 4px; font-size: 12.5px; vertical-align: middle; }
table.plist .c-no { width: 58px; text-align: center; color: #999; }
table.plist .c-thumb { width: 56px; text-align: center; }
table.plist .c-author { width: 120px; text-align: center; color: #555; }
table.plist .c-date { width: 78px; text-align: center; color: #999; font-size: 11.5px; }
table.plist tr:hover td { background: #fafcff; }
.list-thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid var(--line); background: var(--thumb-bg); border-radius: 3px; }
.no-thumb { width: 44px; height: 44px; display: inline-block; background: var(--thumb-bg); border: 1px solid var(--line); border-radius: 3px; }
.c-title a { color: #2a2a2a; }
.c-title .cat { color: var(--red); font-weight: 700; margin-right: 4px; }
.c-title .cmt { color: var(--red); font-weight: 700; font-size: 11.5px; margin-left: 4px; }
.c-title .price { color: #1565c0; font-weight: 700; margin-left: 6px; }
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }
.badge.notice { background: var(--red); }
.badge.must { background: #2b6cb0; }
.row-notice td { background: #fffdf3; }

/* ---------- 페이지네이션 ---------- */
.pager { display: flex; justify-content: center; gap: 4px; margin: 18px 0; }
.pager a, .pager span { min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-strong); font-size: 12.5px; color: #555; padding: 0 6px; border-radius: 2px; background: #fff; }
.pager a:hover { background: #f3f3f3; text-decoration: none; }
.pager .cur { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 700; }

/* ---------- 검색 바 ---------- */
.searchbar { display: flex; justify-content: center; gap: 6px; margin: 14px 0 4px; }
.searchbar select, .searchbar input { height: 32px; border: 1px solid var(--line-strong); padding: 0 8px; font-size: 12.5px; }
.searchbar input[type=text] { width: 230px; }
.searchbar .btn { height: 32px; }

/* ---------- 상세 페이지 ---------- */
.detail-head { border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); padding: 14px 6px; background: #fcfcfc; }
.detail-head .cat { color: var(--red); font-weight: 700; }
.detail-head h1 { font-size: 19px; font-weight: 700; margin: 4px 0 8px; line-height: 1.35; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: #888; }
.detail-meta b { color: #555; font-weight: 600; }
.spec-table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 13px; }
.spec-table th { width: 92px; background: #f7f7f7; border: 1px solid var(--line); text-align: left; padding: 8px 12px; color: #666; font-weight: 600; }
.spec-table td { border: 1px solid var(--line); padding: 8px 12px; }
.spec-table .price { color: var(--red); font-size: 17px; font-weight: 800; }
.detail-body { padding: 22px 6px; font-size: 14px; line-height: 1.85; color: #333; white-space: pre-wrap; word-break: break-word; min-height: 80px; }
.detail-photos { text-align: center; padding: 10px 0; }
.detail-photos img { display: block; max-width: 600px; width: 100%; margin: 0 auto 8px; border: 1px solid var(--line); }
.detail-actions { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.btn-like { background: #fff; border: 1px solid var(--red); color: var(--red); padding: 9px 22px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 13px; }
.btn-like b { color: var(--red); }

/* 이전/다음 글 */
.adjacent { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 18px 0; }
.adjacent div { display: flex; gap: 12px; padding: 9px 8px; font-size: 12.5px; border-bottom: 1px solid #f0f0f0; }
.adjacent div:last-child { border-bottom: none; }
.adjacent .lbl { width: 70px; color: #999; }
.adjacent a { color: #444; }

/* 댓글 */
.comments { margin-top: 22px; }
.comments h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; border-bottom: 2px solid var(--ink); padding-bottom: 7px; }
.comments h3 b { color: var(--red); }
.comment { border-bottom: 1px solid #f0f0f0; padding: 10px 2px; font-size: 13px; }
.comment .who { font-weight: 700; color: #444; margin-right: 8px; }
.comment .when { color: #aaa; font-size: 11.5px; }
.comment .ct { margin-top: 4px; color: #333; white-space: pre-wrap; }
.comment-form { display: flex; gap: 8px; margin-top: 12px; }
.comment-form textarea { flex: 1; height: 56px; border: 1px solid var(--line-strong); padding: 8px; font-size: 13px; resize: vertical; font-family: inherit; }
.comment-form button { width: 92px; background: var(--ink); color: #fff; border: none; cursor: pointer; font-weight: 700; border-radius: 2px; }
.comment-login { font-size: 12.5px; color: #888; padding: 10px 0; }

/* ---------- 등록 폼 ---------- */
.form-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); font-size: 13px; }
.form-table th { width: 120px; background: #f7f7f7; border: 1px solid var(--line); text-align: left; padding: 11px 14px; color: #555; font-weight: 600; }
.form-table td { border: 1px solid var(--line); padding: 9px 12px; }
.form-table input[type=text], .form-table input[type=number], .form-table textarea, .form-table select {
  border: 1px solid var(--line-strong); padding: 7px 9px; font-size: 13px; font-family: inherit; }
.form-table input[type=text], .form-table textarea { width: 100%; }
.form-table textarea { height: 220px; resize: vertical; }
.form-actions { display: flex; justify-content: center; gap: 8px; margin: 18px 0; }
.form-actions .btn { padding: 10px 30px; font-size: 14px; }

/* ---------- 홈 ---------- */
.home-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.home-grid3 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mini-list li { display: flex; align-items: center; gap: 6px; padding: 5px 2px; font-size: 12.5px; border-bottom: 1px dashed #eee; }
.mini-list li:last-child { border-bottom: none; }
.mini-list .rk { width: 16px; text-align: center; color: #bbb; font-weight: 700; flex: none; }
.mini-list a { flex: 1; color: #444; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-list .pr { color: #1565c0; font-weight: 700; font-size: 12px; }
.mini-list .cm { color: var(--red); font-size: 11px; }
.home-banner { width: 100%; border-radius: 4px; margin-bottom: 14px; color: #fff; text-align: center; padding: 26px 12px; font-weight: 800; font-size: 20px; letter-spacing: -.5px; }

/* ---------- 알림/에러 ---------- */
.alert { padding: 11px 14px; border-radius: 3px; margin-bottom: 14px; font-size: 13px; }
.alert-error { background: #fdecec; border: 1px solid #f3b6b6; color: #b5161c; }
.alert ul { list-style: disc; padding-left: 18px; }

/* ---------- 인증 페이지 ---------- */
.auth-wrap { max-width: 420px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--red); padding: 30px 28px; }
.auth-wrap h2 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.auth-wrap .sub { text-align: center; color: #999; font-size: 12.5px; margin-bottom: 22px; }
.auth-wrap label { display: block; font-size: 12.5px; color: #666; margin: 12px 0 4px; }
.auth-wrap input { width: 100%; height: 40px; border: 1px solid var(--line-strong); padding: 0 11px; font-size: 14px; }
.auth-wrap .btn-primary { width: 100%; height: 44px; background: var(--red); color: #fff; border: none; font-weight: 700; font-size: 15px; cursor: pointer; margin-top: 20px; border-radius: 3px; }
.auth-wrap .alt { text-align: center; margin-top: 16px; font-size: 12.5px; color: #888; }
.auth-wrap .alt a { color: var(--red); font-weight: 600; }

/* ---------- 푸터 ---------- */
.footer { background: #fff; border-top: 1px solid var(--line); margin-top: 20px; }
.footer-nav { background: #2a2a2a; }
.footer-nav .container { display: flex; gap: 18px; height: 42px; align-items: center; }
.footer-nav a { color: #ccc; font-size: 12.5px; }
.footer-info { padding: 20px 0 36px; color: #999; font-size: 11.5px; line-height: 1.9; }
.footer-info .flogo { font-size: 20px; font-weight: 800; color: #555; margin-bottom: 8px; }
.footer-info .flogo .mark { background: #999; color: #fff; border-radius: 5px; padding: 1px 7px; font-style: italic; }

@media (max-width: 1180px) {
  .container { width: 100%; padding: 0 10px; }
  .layout { grid-template-columns: 1fr; }
  .col-left, .col-right { display: none; }
  .header-banners { display: none; }
}
