/* 공감숲 — 포털 대시보드형(C안). 주색은 공감스튜디오 로고 초록 */
:root {
  --green: #2E7D32;
  --green-dark: #1B5E20;
  --green-bg: #E8F5E9;
  --green-line: #C8E6C9;
  --red: #D32F2F; --yellow: #F9A825; --blue: #1565C0;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --line-2: #f0f2f0;
  --bg: #f5f7f5;
  --card: #ffffff;
  --radius: 10px;
  --wrap: 1120px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  word-break: keep-all; overflow-wrap: anywhere;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.35; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 99; background: #fff; padding: 8px 12px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }

/* ── 머리글 ── */
.brand-bar { display: flex; height: 4px; }
.brand-bar i { flex: 1; }
.brand-bar i:nth-child(1) { background: var(--red); }
.brand-bar i:nth-child(2) { background: var(--yellow); }
.brand-bar i:nth-child(3) { background: var(--blue); }
.brand-bar i:nth-child(4) { background: var(--green); }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { height: 42px; width: auto; display: block; }
.logo-word { font-weight: 700; font-size: 1.3rem; color: var(--green-dark); letter-spacing: -.02em; }
.cat-nav { display: flex; gap: 4px; }
.cat-nav a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; font-size: .95rem; }
.cat-nav a:hover { background: var(--green-bg); color: var(--green-dark); }
/* 공감스튜디오 (패밀리 사이트, 새 탭) */
.studio-link { display: flex; align-items: center; flex-shrink: 0; padding: 5px 8px; border-radius: 8px; position: relative; margin-left: 4px; }
.studio-link::before { content: ''; position: absolute; left: -9px; top: 50%; width: 1px; height: 22px; margin-top: -11px; background: var(--line); }
.studio-link img { height: 24px; width: auto; display: block; }
.studio-link:hover { background: #f1f5fb; }
.hdr-break { display: none; }
.search { flex: 1; display: flex; max-width: 320px; margin-left: auto; border: 1px solid var(--line); border-radius: 999px; background: #fafbfa; overflow: hidden; }
.search:focus-within { border-color: var(--green); }
.search input { flex: 1; border: 0; background: transparent; padding: 7px 14px; min-width: 0; outline: none; }
.search button { border: 0; background: transparent; padding: 0 12px; color: var(--muted); cursor: pointer; }
.account { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-line, .btn-fill, .btn-admin, .btn-danger, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px; font-weight: 500; font-size: .92rem; cursor: pointer;
  border: 1px solid var(--line); background: #fff; line-height: 1.3; white-space: nowrap;
}
.btn-line:hover { border-color: var(--green); color: var(--green-dark); }
.btn-fill { background: var(--green); border-color: var(--green); color: #fff; }
.btn-fill:hover { background: var(--green-dark); color: #fff; }
.btn-admin { border-color: #111827; background: #111827; color: #fff; padding: 5px 10px; font-size: .82rem; }
.btn-admin:hover { color: #fff; opacity: .85; }
.btn-danger { color: var(--red); }
.btn-danger:hover { border-color: var(--red); color: var(--red); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); padding: 4px 8px; font-size: .85rem; }
.btn-quiet:hover { color: var(--text); background: var(--line-2); }
.me { position: relative; }
.me summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.me summary::-webkit-details-marker { display: none; }
.me summary:hover { background: var(--line-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--green-bg); color: var(--green-dark); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.me-name { font-weight: 500; font-size: .92rem; }
.me-menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px; min-width: 180px; padding: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.me-menu a, .me-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer; font-size: .92rem; }
.me-menu a:hover, .me-menu button:hover { background: var(--line-2); }
.me-menu form { margin: 0; }
.menu-btn { display: inline-flex; flex-direction: column; gap: 4px; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 9px 8px; cursor: pointer; }
.menu-btn span { width: 16px; height: 2px; background: var(--text-2); border-radius: 2px; }
/* 숲 메뉴 — 머리글 아래로 떠서 열림 (분류별 칸 · 아이콘 타일) */
.drawer { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; background: var(--bg); border-top: 1px solid var(--line);
          box-shadow: 0 12px 28px rgba(0,0,0,.14); max-height: calc(100vh - 70px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 0 18px; }
.drawer-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.drawer-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.drawer-top strong { font-size: 1rem; }
.drawer-close { border: 1px solid var(--line); background: #fff; border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 1rem; color: var(--text-2); }
.drawer-group { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.drawer-cat { display: flex; align-items: center; gap: 6px; margin: 0; padding: 9px 14px; font-size: .88rem; font-weight: 700;
              color: var(--green-dark); background: var(--green-bg); border-bottom: 1px solid var(--green-line); }
.drawer-cat span { font-size: .75rem; font-weight: 500; color: var(--green-dark); background: #fff; border-radius: 999px; padding: 0 7px; }
.drawer-game .drawer-cat { background: #e8f0fb; color: #174ea6; border-color: #cddcf3; }
.drawer-game .drawer-cat span { color: #174ea6; }
.drawer-pass .drawer-cat { background: #fdf3e2; color: #8a5a00; border-color: #f1ddb5; }
.drawer-pass .drawer-cat span { color: #8a5a00; }
.drawer-app .drawer-cat { background: #f1ecfb; color: #5b3aa8; border-color: #ddd2f3; }
.drawer-app .drawer-cat span { color: #5b3aa8; }
.drawer-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 8px; }
.drawer-items a { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 8px; font-size: .92rem; min-width: 0; }
.drawer-items a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-items a:hover { background: var(--line-2); color: var(--text); }
.drawer-items a[aria-current] { background: var(--green); color: #fff; font-weight: 700; }
.dicon { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; object-fit: cover; }
.dicon.gicon-letter { display: grid; place-items: center; background: var(--green-bg); color: var(--green-dark); font-weight: 700; font-size: .8rem; }
.drawer-all { grid-column: 1 / -1; justify-self: center; font-size: .88rem; color: var(--text-2); padding: 4px 8px; }
.site-header { position: sticky; }
.site-notice { background: #fffbea; border-bottom: 1px solid #f5e6a8; font-size: .9rem; padding: 8px 0; color: #6b4e00; }
.flash { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--green-bg); color: var(--green-dark); font-size: .93rem; }
.flash-error { background: #fdecea; color: #8a1c1c; }

.main { padding-top: 20px; padding-bottom: 48px; min-height: 60vh; }

/* ── 공통 상자 ── */
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.box-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.box-head h2 { font-size: 1rem; }
.box-head a.more { font-size: .85rem; color: var(--muted); }
.cmt-count { color: var(--green); font-size: .85em; font-weight: 500; margin-left: 2px; }
.pic-mark { display: inline-block; width: 14px; height: 11px; margin-left: 4px; border: 1.5px solid var(--muted); border-radius: 2px; vertical-align: -1px; position: relative; }
.pic-mark::after { content: ''; position: absolute; left: 2px; bottom: 1px; width: 5px; height: 4px; background: var(--muted); clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.head-chip { display: inline-block; font-size: .78rem; padding: 1px 7px; border-radius: 5px; background: var(--green-bg); color: var(--green-dark); white-space: nowrap; }
.notice-chip { background: #1f2937; color: #fff; }
.badge-staff { display: inline-block; margin-left: 4px; font-size: .7rem; padding: 0 5px; border-radius: 4px; background: var(--green); color: #fff; vertical-align: 1px; }

/* ── 첫 화면 (숲 지도) ── */
.notice-strip { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: var(--radius); background: var(--green-bg); color: var(--green-dark); margin-bottom: 16px; }
.notice-strip strong { flex-shrink: 0; font-size: .85rem; background: var(--green); color: #fff; padding: 1px 8px; border-radius: 5px; }
.notice-strip a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-strip .when { font-size: .85rem; opacity: .75; flex-shrink: 0; }
.home-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-bottom: 28px; }
.rank-list, .line-list { list-style: none; margin: 0; padding: 6px 16px 10px; }
.rank-list li, .line-list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line-2); font-size: .94rem; }
.rank-list li:last-child, .line-list li:last-child { border-bottom: 0; }
.rank-no { width: 20px; flex-shrink: 0; font-weight: 700; color: var(--green); text-align: center; }
.rank-list li:nth-child(n+4) .rank-no { color: var(--muted); font-weight: 500; }
.li-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-meta { flex-shrink: 0; font-size: .8rem; color: var(--muted); }
.empty-line { color: var(--muted); font-size: .9rem; padding: 14px 0; }
.cat-section { margin-bottom: 28px; scroll-margin-top: 80px; }
.cat-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; font-size: 1.15rem; }
.cat-title small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.gbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gbox .box-head { justify-content: flex-start; gap: 10px; }
.gbox .box-head h3 { font-size: 1rem; }
.gbox .box-head p { margin: 0; font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gbox .box-head div { min-width: 0; flex: 1; }
.gicon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; }
.gicon-letter { display: grid; place-items: center; background: var(--green-bg); color: var(--green-dark); font-weight: 700; font-size: 1.1rem; }

/* ── 갤러리 (글 목록) ── */
.g-head { display: flex; align-items: center; gap: 14px; padding: 16px; margin-bottom: 12px; }
.g-head .gicon { width: 52px; height: 52px; border-radius: 12px; }
.g-head h1 { font-size: 1.35rem; }
.g-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.g-head .g-title { flex: 1; min-width: 0; }
.heads { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.heads a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .88rem; color: var(--text-2); }
.heads a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.plist { width: 100%; border-collapse: collapse; font-size: .93rem; table-layout: fixed; }
.plist th { font-weight: 500; font-size: .82rem; color: var(--muted); padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: center; }
.plist td { padding: 9px 6px; border-bottom: 1px solid var(--line-2); text-align: center; color: var(--text-2); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plist td.t { text-align: left; color: var(--text); font-size: .94rem; }
.plist td.t a { display: inline; }
.plist tr.is-notice td { background: #fafbfa; }
.plist tr.is-notice td.t a { font-weight: 700; }
.plist tr:hover td { background: #fbfcfb; }
.plist .c-no { width: 70px; } .plist .c-head { width: 84px; } .plist .c-author { width: 120px; } .plist .c-date { width: 70px; } .plist .c-n { width: 54px; }
.plist .m-meta { display: none; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; flex-wrap: wrap; }
.list-search { display: flex; gap: 6px; }
.list-search select, .list-search input { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; }
.list-search input { width: 180px; }
.pager { display: flex; justify-content: center; gap: 4px; padding: 16px 0 4px; flex-wrap: wrap; }
.pager a, .pager strong { min-width: 34px; padding: 5px 8px; text-align: center; border-radius: 8px; font-size: .9rem; }
.pager a:hover { background: var(--line-2); }
.pager strong { background: var(--green); color: #fff; }
.empty-list { padding: 48px 16px; text-align: center; color: var(--muted); }

/* ── 글 보기 ── */
.post { padding: 22px 24px; }
.post-top { border-bottom: 1px solid var(--line-2); padding-bottom: 14px; margin-bottom: 18px; }
.post-top .crumb { font-size: .85rem; color: var(--muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.post-top h1 { font-size: 1.35rem; }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .86rem; color: var(--muted); }
.post-meta .author { color: var(--text); font-weight: 500; }
.post-body { font-size: 1rem; line-height: 1.8; min-height: 80px; }
.post-body a, .cmt-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.post-img { margin: 14px 0; }
.post-img img { border-radius: 6px; display: block; max-height: 1280px; width: auto; }
.hidden-note { padding: 12px 14px; border-radius: 8px; background: #fff7e6; color: #7a4d00; font-size: .9rem; margin-bottom: 16px; }
.vote-box { display: flex; justify-content: center; gap: 12px; margin: 28px 0 10px; }
.vote-box button { display: flex; flex-direction: column; align-items: center; min-width: 88px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.vote-box button b { font-size: 1.2rem; }
.vote-box button span { font-size: .8rem; color: var(--muted); }
.vote-box .up:hover, .vote-box .up.on { border-color: var(--green); color: var(--green-dark); background: var(--green-bg); }
.vote-box .down:hover, .vote-box .down.on { border-color: #9ca3af; background: var(--line-2); }
.vote-msg { text-align: center; font-size: .85rem; color: var(--muted); min-height: 1.4em; margin: 0; }
.post-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 18px; }
.post-actions form { display: inline; margin: 0; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #111827; color: #fff; font-size: .85rem; }
.admin-bar form { margin: 0; display: inline; }
.admin-bar button, .admin-bar a { border: 1px solid #374151; background: #1f2937; color: #fff; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: .82rem; }
.admin-bar button:hover, .admin-bar a:hover { background: #374151; color: #fff; }

/* 댓글 */
.cmts { margin-top: 16px; padding: 18px 24px; }
.cmts h2 { font-size: 1rem; margin-bottom: 10px; }
.cmt { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cmt.reply { padding-left: 28px; position: relative; background: #fbfcfb; }
.cmt.reply::before { content: '└'; position: absolute; left: 10px; top: 12px; color: var(--muted); }
.cmt-head { display: flex; gap: 10px; align-items: baseline; font-size: .86rem; }
.cmt-head .author { font-weight: 500; }
.cmt-head time { color: var(--muted); font-size: .8rem; }
.cmt-tools { margin-left: auto; display: flex; gap: 2px; }
.cmt-tools form { margin: 0; display: inline; }
.cmt-body { margin-top: 4px; font-size: .95rem; }
.cmt-gone { color: var(--muted); font-size: .9rem; }
.cmt-form { margin-top: 14px; }
.cmt-form textarea { width: 100%; min-height: 84px; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; resize: vertical; }
.cmt-form textarea:focus { border-color: var(--green); outline: none; }
.cmt-form .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 8px; }
.cmt-form .reply-to { font-size: .85rem; color: var(--green-dark); }
.login-hint { padding: 14px; border-radius: 8px; background: var(--line-2); text-align: center; font-size: .92rem; color: var(--text-2); }
.login-hint a { color: var(--green-dark); font-weight: 700; }

/* ── 글쓰기 ── */
.form-box { padding: 22px 24px; }
.form-box h1 { font-size: 1.25rem; margin-bottom: 16px; }
.field { margin-bottom: 14px; }
.field label, .field .label { display: block; font-weight: 500; font-size: .9rem; margin-bottom: 6px; }
.field input[type=text], .field input[type=email], .field input[type=password], .field input[type=number], .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); outline: none; }
.field textarea { min-height: 360px; resize: vertical; line-height: 1.7; }
.field .help { font-size: .82rem; color: var(--muted); margin-top: 4px; }
.field-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 10px; }
.editor-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.editor-tools .status { font-size: .85rem; color: var(--muted); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumbs figure { margin: 0; position: relative; width: 84px; }
.thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.thumbs figcaption { font-size: .72rem; color: var(--muted); text-align: center; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.check { display: flex; gap: 8px; align-items: center; font-size: .92rem; }
.error-box { padding: 10px 14px; border-radius: 8px; background: #fdecea; color: #8a1c1c; margin-bottom: 14px; font-size: .92rem; }

/* ── 검색 · 내 활동 ── */
.result-list { list-style: none; margin: 0; padding: 0; }
.result-list li { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.result-list .r-title { font-weight: 500; }
.result-list .r-body { font-size: .88rem; color: var(--text-2); margin: 3px 0; }
.result-list .r-meta { font-size: .8rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.search-big { display: flex; gap: 8px; padding: 16px; flex-wrap: wrap; }
.search-big select, .search-big input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; }
.search-big input { flex: 1; min-width: 160px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 12px; }
.tabs a { padding: 12px 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--green-dark); border-color: var(--green); }

/* ── 문서 (약관 · 방침) · 안내 ── */
.doc { padding: 28px 32px; line-height: 1.85; }
.doc h1 { font-size: 1.5rem; margin-bottom: 6px; }
.doc .updated { color: var(--muted); font-size: .88rem; margin: 0 0 20px; }
.doc h2 { font-size: 1.08rem; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--text-2); font-size: .95rem; }
.doc ul, .doc ol { padding-left: 22px; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 8px 0; }
.doc th, .doc td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.doc th { background: #fafbfa; font-weight: 500; }
.doc a { color: var(--blue); text-decoration: underline; }
.empty-page { text-align: center; padding: 72px 16px; }
.empty-page h1 { font-size: 1.35rem; margin-bottom: 10px; }
.empty-page p { color: var(--text-2); }
.empty-links { margin-top: 20px; }

/* ── 바닥글 ── */
.site-footer { font-size: .85rem; color: var(--muted); }
/* 하단바 하나에 로고 · 약관 링크 · 안내 · 저작권 */
.studio-bar { border-top: 1px solid var(--line); background: #fafbfa; padding: 18px 0 calc(18px + env(safe-area-inset-bottom)); }
.studio-bar .wrap { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.studio-logo { flex-shrink: 0; }
.studio-bar img { height: 28px; width: auto; display: block; }
.studio-info { flex: 1; min-width: 240px; }
.studio-info p { margin: 2px 0 0; }
.studio-bar .copy { font-size: .8rem; color: var(--muted); margin-left: auto; white-space: nowrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.footer-links a { color: var(--text-2); }
.footer-links strong { font-weight: 700; }

/* ── 좁은 화면 ── */
@media (max-width: 900px) {
  .cat-nav { display: none; }
  .gbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  /* 머리글 한 줄: 로고 · 검색 · 내 정보 · 메뉴 (공감스튜디오 로고는 맨 아래 하단바에만) */
  .header-inner { gap: 8px; flex-wrap: nowrap; min-height: 54px; padding-top: 6px; padding-bottom: 6px; }
  .logo img { height: 30px; }
  .logo-word { font-size: 1.05rem; }
  .studio-link, .hdr-break { display: none; }
  .search { order: 2; flex: 1 1 auto; min-width: 0; max-width: none; margin-left: 4px; }
  .search input { padding: 6px 10px; font-size: .9rem; }
  .search button { padding: 0 9px; }
  .account { order: 3; margin-left: 0; gap: 6px; }
  .account .btn-fill { display: none; }              /* 가입은 로그인 화면에서 */
  .account .btn-line { padding: 6px 10px; font-size: .85rem; }
  .btn-admin { padding: 4px 7px; }
  .me-name { display: none; }
  .me summary { padding: 2px; }
  .menu-btn { padding: 8px 7px; }
  .main { padding-top: 10px; }

  .home-top { grid-template-columns: minmax(0, 1fr); }
  .gbox-grid { grid-template-columns: minmax(0, 1fr); }

  /* 숲 제목 한 줄: 작은 아이콘 + 이름 + 글쓰기 (설명은 숨김) */
  .g-head { padding: 8px 10px; gap: 10px; margin-bottom: 8px; }
  .g-head .gicon { width: 32px; height: 32px; border-radius: 8px; }
  .g-head h1 { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .g-head p { display: none; }
  .g-head .btn-fill { padding: 6px 12px; font-size: .85rem; }

  /* 말머리: 가로로 밀어 보는 한 줄 탭 */
  .heads { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
           margin: 0 -16px 8px; padding: 0 16px 2px; gap: 6px; }
  .heads::-webkit-scrollbar { display: none; }
  .heads a { flex: 0 0 auto; padding: 4px 12px; font-size: .85rem; }

  .plist thead { display: none; }
  .plist, .plist tbody, .plist tr { display: block; width: 100%; }
  .plist tr { padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
  .plist td { display: none; padding: 0; border: 0; }
  .plist td.t { display: block; white-space: normal; }
  .plist .m-meta { display: flex; gap: 8px; font-size: .78rem; color: var(--muted); margin-top: 3px; flex-wrap: wrap; }
  .list-foot { padding: 10px 12px; }
  .list-foot > .btn-fill { display: none; }          /* 글쓰기는 숲 제목 줄에 있음 */
  .list-search { width: 100%; }
  .list-search select { padding: 6px 6px; }
  .list-search input { flex: 1; width: auto; min-width: 0; }
  .post, .cmts, .form-box { padding: 16px; }
  .post-top h1 { font-size: 1.2rem; }
  .vote-box { margin: 18px 0 6px; }
  .vote-box button { min-width: 76px; padding: 8px 12px; }
  .post-actions { margin-top: 12px; padding-top: 12px; }
  .doc { padding: 20px 18px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .studio-bar .wrap { flex-direction: column; align-items: flex-start; }
  .studio-bar .copy { margin-left: 0; }
}
/* 대댓글 */
.cmt-body a.mention, .mention { color: var(--green-dark); font-weight: 500; text-decoration: none; margin-right: 2px; }
.cmt-body a.mention:hover, .mention:hover { text-decoration: underline; }
.cmt-form.as-reply { margin: 8px 0 12px 28px; padding: 10px; border-radius: 8px; background: #f6f8f6; border: 1px solid var(--green-line); }
.cmt-form.as-reply textarea { min-height: 70px; }
.cmt:target { background: #fffbea; transition: background 1s; }
.cmt.reply2 { padding-left: 56px; }
.cmt.reply2::before { left: 38px; }
.cmt-form.as-reply.at2 { margin-left: 56px; }
