/* 준마이 필드 커뮤니티 — 구성은 memditor.com/community(카페형: 왼쪽 카드+게시판 메뉴, 오른쪽 글 표), 색은 랜딩(tokens.css)
 * 글꼴은 인스타 캐러셀과 같게(사용자 요청 11-25): 제목 Black Han Sans, 본문 Noto Sans KR, 숫자 Oswald */
@import url("/tokens.css");
:root { --f-title: "Black Han Sans", "Noto Sans KR", sans-serif; --f-num: "Oswald", "Noto Sans KR", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; min-height: 100svh; display: flex; flex-direction: column; background: var(--color-paper); color: var(--color-ink); font-family: "Noto Sans KR", ui-sans-serif, sans-serif; font-size: 15px; line-height: 1.6; word-break: keep-all; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--color-accent) 30%, transparent); }
.skip { position: absolute; left: 12px; top: -80px; z-index: 900; padding: 8px 14px; background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: 12px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--color-ink); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .12s; }
.btn:hover { background: oklch(30% 0.005 270); }
.btn--accent { background: var(--color-accent); }
.btn--accent:hover { background: var(--color-accent-deep); }
.btn--line { background: #fff; color: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-rule); }
.btn--line:hover { background: var(--color-paper-2); }
.btn--kakao { background: #FEE500; color: #191600; }
.btn--kakao:hover { background: #F5DC00; }
.btn--block { width: 100%; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: default; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--color-muted); font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--color-ink); }

/* 머리 */
.top { position: sticky; top: 0; z-index: 300; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 20px; background: color-mix(in oklab, #fff 92%, transparent); backdrop-filter: blur(8px); border-bottom: 3px solid var(--color-accent); }
.top__menu { display: none; flex-direction: column; justify-content: center; gap: 4px; width: 40px; height: 40px; padding: 0 9px; border: 0; background: none; cursor: pointer; }
.top__menu span { display: block; height: 2px; background: var(--color-ink); }
.top__name { display: inline-flex; align-items: center; gap: 10px; font: 400 24px/1 var(--f-title); text-decoration: none; letter-spacing: -0.01em; }
.top__name img { width: 36px; height: 36px; border-radius: 50%; }
.top__right { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.top__nick { font-weight: 700; }

/* 틀 */
.shell { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); width: 100%; max-width: 1280px; margin: 0 auto; }
.side { position: sticky; top: 64px; align-self: start; height: calc(100svh - 64px); overflow-y: auto; padding: 22px 20px 40px; border-right: 1px solid var(--color-rule); }
.main { min-width: 0; padding: 44px 52px 80px; outline: none; }
.loading, .empty { padding: 40px 0; text-align: center; color: var(--color-muted); }

/* 커뮤니티 카드 */
.card { padding: 18px; background: #fff; border: 1px solid var(--color-rule); border-radius: 14px; }
.card__name { font: 400 22px/1.2 var(--f-title); }
.card__tag { margin-top: 4px; font-size: 12.5px; color: var(--color-muted); }
.card__meta { margin: 14px 0 0; padding-bottom: 14px; border-bottom: 1px solid var(--color-rule); font-size: 13px; }
.card__meta div { display: flex; justify-content: space-between; padding: 2px 0; }
.card__meta dt { color: var(--color-muted); }
.card__meta dd { margin: 0; font-weight: 700; }
.card__me { margin-top: 14px; font-size: 13px; color: var(--color-ink-2); }
.card__me p + .btn, .card__me p + p { margin-top: 10px; }
.grade { display: inline-block; padding: 1px 8px; border-radius: 99px; background: color-mix(in oklab, var(--color-accent) 14%, #fff); color: var(--color-accent-deep); font-size: 12px; font-weight: 700; }

/* 게시판 메뉴 */
.menu { margin-top: 26px; }
.menu a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 14.5px; color: var(--color-ink-2); }
.menu a:hover { background: var(--color-paper-2); }
.menu a[aria-current="page"] { background: #fff; color: var(--color-ink); font-weight: 700; box-shadow: inset 3px 0 0 var(--color-accent); }
.menu__all { font-weight: 700; color: var(--color-ink) !important; }
.menu details { margin-top: 14px; }
.menu summary { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; font-size: 13px; font-weight: 700; color: var(--color-muted); cursor: pointer; list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.menu details:not([open]) summary::after { transform: rotate(-45deg); }
.menu details a { padding-left: 18px; }
.menu details a::before { content: "·"; color: var(--color-muted); }
.menu .lock { margin-left: auto; font-size: 11px; color: var(--color-muted); }
.side__links { list-style: none; margin: 28px 0 0; padding: 18px 10px 0; border-top: 1px solid var(--color-rule); display: grid; gap: 8px; font-size: 13px; color: var(--color-muted); }
.side__links a { text-decoration: none; }
.side__links a:hover { color: var(--color-accent-deep); }

/* 게시판 머리 */
.bhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--color-ink); }
.bhead h1 { font: 400 30px/1.2 var(--f-title); }
.bhead p { margin-top: 6px; color: var(--color-muted); font-size: 14px; }

/* 글 표 */
.list { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { padding: 14px 8px; font-size: 13px; font-weight: 500; color: var(--color-muted); border-bottom: 1px solid var(--color-rule); }
.list td { padding: 13px 8px; border-bottom: 1px solid var(--color-rule); text-align: center; color: var(--color-muted); font-variant-numeric: tabular-nums; }
.list td.no, .list td.dt, .list td.vw, .pager, .card__meta dd, .list .cc { font-family: var(--f-num); font-weight: 500; letter-spacing: .01em; }
.list td.t { text-align: left; color: var(--color-ink); }
.list td.t a { text-decoration: none; }
.list td.t a:hover { text-decoration: underline; }
.list tr.pin td { background: color-mix(in oklab, var(--color-accent) 5%, #fff); }
.list tr.pin td.no { color: var(--color-accent-deep); font-weight: 700; }
.list .cc { margin-left: 6px; color: var(--color-accent-deep); font-weight: 700; font-size: 12.5px; }
.list .clip { margin-left: 6px; font-size: 12px; }
.list .bd { margin-right: 6px; font-size: 12.5px; color: var(--color-muted); }
.list .no { width: 70px; } .list .au { width: 130px; } .list .dt { width: 100px; } .list .vw { width: 60px; }
.list tr.empty td { padding: 44px 8px; }
.m-meta { display: none; }

.pager { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.pager a, .pager span { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 8px; font-size: 14px; text-decoration: none; }
.pager a:hover { background: var(--color-paper-2); }
.pager span { background: var(--color-ink); color: #fff; font-weight: 700; }
.search { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.search input { width: min(360px, 100%); height: 44px; padding: 0 14px; border: 1px solid var(--color-rule); border-radius: 10px; background: #fff; }

.notice-box { margin-top: 24px; padding: 22px; border-radius: 12px; background: #fff; border: 1px solid var(--color-rule); text-align: center; }
.notice-box p + p, .notice-box p + .btn { margin-top: 12px; }

/* 글 보기 */
.post__board { font-size: 13px; font-weight: 700; color: var(--color-accent-deep); text-decoration: none; }
.post h1 { margin-top: 8px; font: 400 28px/1.35 var(--f-title); }
.post__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--color-rule); font-size: 13px; color: var(--color-muted); }
.post__meta b { color: var(--color-ink); }
.post__body { padding: 28px 0 36px; font-size: 16px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.post__body a { color: var(--color-accent-deep); }
.files { display: grid; gap: 8px; margin-bottom: 30px; }
.file { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--color-rule); border-radius: 12px; background: #fff; }
.file__ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: var(--color-accent); color: #fff; font-size: 11px; font-weight: 700; }
.file__name { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.post__tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 16px 0; border-top: 2px solid var(--color-ink); }
.post__tools div { display: flex; gap: 8px; }

/* 댓글 */
.cmts h2 { font: 400 19px/1.3 var(--f-title); margin: 26px 0 6px; }
.cmts h2 span { color: var(--color-accent-deep); }
.cmt { padding: 16px 0; border-bottom: 1px solid var(--color-rule); }
.cmt__head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-muted); }
.cmt__head b { color: var(--color-ink); font-size: 14px; }
.cmt__head .linkbtn { margin-left: auto; }
.cmt__body { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.cmt-form { margin-top: 18px; padding: 14px; border: 1px solid var(--color-rule); border-radius: 12px; background: #fff; }
.cmt-form textarea { width: 100%; min-height: 80px; border: 0; resize: vertical; outline: none; background: none; }
.cmt-form div { display: flex; justify-content: flex-end; }

/* 폼 (글쓰기·가입·로그인) */
.form { display: grid; gap: 18px; max-width: 760px; margin-top: 24px; }
.form label { display: grid; gap: 7px; font-size: 14px; font-weight: 700; }
.form label small { font-weight: 400; color: var(--color-muted); }
.form input[type=text], .form input[type=email], .form select, .form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--color-rule); border-radius: 10px; background: #fff; font-weight: 400; }
.form textarea { min-height: 360px; resize: vertical; line-height: 1.7; }
.form .short textarea { min-height: 90px; }
.form__row { display: flex; gap: 10px; justify-content: flex-end; }
.form .check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.form .check input { margin-top: 5px; accent-color: var(--color-accent); }
.err { color: var(--color-error); font-size: 14px; }
.ok { color: var(--color-success); font-size: 14px; }

.auth { max-width: 420px; margin: 20px auto 0; text-align: center; }
.auth h1 { font: 400 30px/1.25 var(--f-title); }
.auth > p { margin-top: 10px; color: var(--color-muted); }
.auth .stack { display: grid; gap: 10px; margin-top: 28px; }
.auth .or { display: flex; align-items: center; gap: 10px; margin: 8px 0; color: var(--color-muted); font-size: 13px; }
.auth .or::before, .auth .or::after { content: ""; flex: 1; height: 1px; background: var(--color-rule); }
.auth input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--color-rule); border-radius: 10px; background: #fff; }
.rules { margin-top: 6px; padding: 16px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--color-rule); font-size: 14px; font-weight: 400; line-height: 1.7; }
.rules ul { margin: 6px 0 0; padding-left: 18px; }

/* 전체글 첫 화면 띠 */
.hello { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; padding: 22px 24px; border-radius: 14px; background: var(--color-accent); color: #fff; }
.hello b { display: block; font: 400 24px/1.25 var(--f-title); }
.hello p { margin-top: 4px; font-size: 14px; opacity: .95; }
.hello .btn { background: #fff; color: var(--color-accent-deep); }

/* 관리자 */
.admin-tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 18px; }
.admin-tbl th, .admin-tbl td { padding: 10px 8px; border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
.admin-tbl select { padding: 4px; }
.tbl-wrap { overflow-x: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 800; padding: 12px 18px; border-radius: 10px; background: var(--color-ink); color: #fff; font-size: 14px; }

/* 바닥 */
.foot { padding: 30px 20px 40px; border-top: 1px solid var(--color-rule); background: #fff; font-size: 13px; color: var(--color-muted); }
.foot p { max-width: 1240px; margin: 0 auto; }
.foot p + p { margin-top: 4px; }
.foot b { color: var(--color-ink); }

/* 휴대폰 */
@media (max-width: 900px) {
  .top { height: 56px; padding: 0 10px; gap: 6px; }
  .top__menu { display: flex; }
  .top__name { font-size: 19px; }
  .top__name img { width: 30px; height: 30px; }
  .top__nick { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 500; width: min(300px, 86vw); height: 100svh; background: var(--color-paper); border-right: 0; box-shadow: 8px 0 30px rgb(0 0 0 / .15); translate: -105% 0; transition: translate .22s var(--ease-out); }
  body.menu-open .side { translate: 0 0; }
  .scrim { position: fixed; inset: 0; z-index: 400; background: rgb(0 0 0 / .35); }
  .main { padding: 26px 16px 60px; }
  .bhead { flex-direction: column; align-items: stretch; }
  .bhead .btn { width: 100%; }
  .list thead { display: none; }
  .list td.no, .list td.au, .list td.dt, .list td.vw { display: none; }
  .list td.t { padding: 14px 2px; }
  .m-meta { display: block; margin-top: 4px; font-size: 12.5px; color: var(--color-muted); }
  .hello { flex-direction: column; align-items: stretch; }
  .post h1 { font-size: 23px; }
  .search input { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }
