:root {
  --ink: #23262d;
  --muted: #737b88;
  --line: #e3e6eb;
  --panel: #ffffff;
  --wash: #f5f6f8;
  --accent: #48515e;
  --accent-soft: #eef0f3;
  --danger: #c64c55;
  --notice: #ff626d;
  --shadow: 0 14px 38px rgba(31, 38, 49, .08);
  font-family: Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--wash);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--wash); }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.header-inner { width: min(1180px, calc(100% - 36px)); margin: 0 auto; }
.site-header .header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { display: block; width: 46px; height: 46px; object-fit: contain; }
.brand strong { display: block; }
.brand strong { font-size: 16px; letter-spacing: -.03em; }
.header-actions { display: flex; gap: 8px; }
.button { min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 12px; font-weight: 750; cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.button:hover { transform: translateY(-1px); border-color: #bdc3cb; }
.button-primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.button-ghost { background: #fff; }
.button-danger { border-color: #f0cbd0; color: var(--danger); background: #fff8f8; }

.community-nav { border-bottom: 1px solid #dfe3e8; background: #fff; }
.nav-inner { display: flex; align-items: center; min-height: 45px; gap: 2px; }
.nav-item { align-self: stretch; padding: 0 18px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-size: 12px; font-weight: 750; cursor: pointer; }
.nav-item:hover, .nav-item.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.page-shell { display: grid; grid-template-columns: 215px minmax(0, 1fr); gap: 24px; width: min(1180px, calc(100% - 36px)); margin: 28px auto 50px; align-items: start; }
.sidebar { display: grid; gap: 14px; position: sticky; top: 142px; }
.sidebar-card, .board-card, .hero-card { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 8px 26px rgba(31,38,49,.04); }
.sidebar-card { overflow: hidden; border-radius: 14px; }
.sidebar-title { display: flex; justify-content: space-between; align-items: center; min-height: 45px; padding: 0 15px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.sidebar-title button { display: none; border: 0; color: var(--muted); background: transparent; font-size: 10px; cursor: pointer; }
.category-list { padding: 8px; }
.category-button { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 39px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; font-size: 12px; cursor: pointer; }
.category-button::before { content: "□"; margin-right: 8px; color: #a5acb6; }
.category-button span:first-child { display: inline-flex; align-items: center; min-width: 0; }
.category-button em { color: #a0a7b1; font-size: 10px; font-style: normal; }
.category-button:hover, .category-button.is-active { color: #fff; background: var(--accent); }
.category-button:hover::before, .category-button.is-active::before, .category-button:hover em, .category-button.is-active em { color: rgba(255,255,255,.8); }
.compact-card { padding: 15px; }
.compact-card strong { font-size: 12px; }
.compact-card p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.shortcut-link { display: flex; align-items: center; justify-content: space-between; min-height: 43px; margin: 8px; padding: 0 11px; border-radius: 9px; color: #59616d; background: #f4f5f7; font-size: 11px; font-weight: 750; transition: color .15s ease, background .15s ease; }
.shortcut-link b { color: #9aa1ab; font-size: 12px; }
.shortcut-link:hover { color: #fff; background: var(--accent); }
.shortcut-link:hover b { color: rgba(255,255,255,.78); }

.content { min-width: 0; }
.hero-card { display: flex; align-items: flex-end; justify-content: space-between; min-height: 175px; padding: 28px 31px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #3b424c, #1f2329); box-shadow: var(--shadow); }
.eyebrow { display: block; margin-bottom: 7px; color: #9fa6b0; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.hero-card .eyebrow { color: #bcc2ca; }
.hero-card h1 { margin: 0; font-size: clamp(24px, 3vw, 36px); letter-spacing: -.05em; }
.hero-card p { margin: 10px 0 0; color: #c7cbd1; font-size: 12px; }
.hero-stats { display: flex; gap: 8px; }
.hero-stats div { min-width: 74px; padding: 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 12px; background: rgba(255,255,255,.06); text-align: center; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-size: 18px; }
.hero-stats span { margin-top: 3px; color: #bfc4cb; font-size: 9px; }

.board-card { margin-top: 0; padding: 23px 25px 20px; border-radius: 18px; }
.board-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.board-toolbar h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.board-controls { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; }
.view-toggle { display: inline-flex; flex: 0 0 auto; height: 39px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #f5f6f8; }
.view-toggle button { min-width: 54px; padding: 0 9px; border: 0; border-radius: 7px; color: #8a929d; background: transparent; font-size: 9px; font-weight: 800; cursor: pointer; }
.view-toggle button.is-active { color: #fff; background: var(--accent); box-shadow: 0 2px 7px rgba(31,38,49,.16); }
.search-form { display: flex; width: min(330px, 48%); height: 39px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.board-controls .search-form { width: 300px; }
.search-form:focus-within { border-color: #a4abb5; box-shadow: 0 0 0 3px #f0f1f3; }
.search-form input { min-width: 0; flex: 1; padding: 0 12px; border: 0; outline: 0; font-size: 11px; }
.search-form button { width: 58px; border: 0; color: #fff; background: var(--accent); font-size: 11px; font-weight: 800; cursor: pointer; }
.notice-strip { margin-bottom: 11px; padding: 12px 14px; border-radius: 10px; color: #974048; background: #fff1f2; font-size: 11px; }
.notice-strip button { display: block; width: 100%; padding: 4px 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.notice-strip button + button { margin-top: 4px; padding-top: 8px; border-top: 1px solid #f4d9dc; }
.notice-strip b { display: inline-flex; margin-right: 7px; padding: 2px 6px; border-radius: 5px; color: #fff; background: var(--notice); font-size: 9px; }

.post-row { display: grid; grid-template-columns: 88px minmax(0, 1fr) 90px 80px 52px; align-items: center; min-height: 54px; padding: 6px 10px; border-bottom: 1px solid #edf0f3; gap: 8px; font-size: 11px; }
.post-head { min-height: 35px; color: #9aa1ab; background: #fafbfc; font-size: 9px; text-align: center; }
.post-head span:nth-child(2) { text-align: left; }
.post-item { cursor: pointer; }
.post-item:hover { background: #fafbfc; }
.post-category { display: inline-flex; justify-self: start; padding: 4px 7px; border-radius: 6px; color: #6f7783; background: #f0f2f4; font-size: 9px; white-space: nowrap; }
.post-item.is-notice .post-category { color: #d84853; background: #fff0f1; }
.post-title { display: grid; min-width: 0; gap: 4px; overflow: hidden; font-weight: 700; }
.post-title-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-title .pin { margin-right: 6px; color: var(--notice); font-size: 9px; }
.image-indicator { margin-right: 6px; color: #8a929e; font-size: 10px; }
.post-tags, .viewer-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag-chip { display: inline-flex; align-items: center; max-width: 130px; padding: 2px 6px; overflow: hidden; border-radius: 999px; color: #69717c; background: #eef0f3; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.post-author, .post-date, .post-views { overflow: hidden; color: var(--muted); text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.post-table.is-gallery .post-head { display: none; }
.post-table.is-gallery #postList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.gallery-card:hover, .gallery-card:focus-visible { transform: translateY(-2px); border-color: #c6cbd2; box-shadow: 0 10px 24px rgba(31,38,49,.09); outline: none; }
.gallery-thumb { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: #eef0f3; }
.gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.gallery-card:hover .gallery-thumb img { transform: scale(1.025); }
.gallery-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: linear-gradient(135deg, #eef0f3, #dfe3e8); }
.gallery-placeholder span { color: #abb1ba; font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.gallery-category { position: absolute; left: 9px; bottom: 9px; max-width: calc(100% - 18px); padding: 4px 7px; overflow: hidden; border-radius: 6px; color: #fff; background: rgba(35,38,45,.82); font-size: 8px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(4px); }
.gallery-card.is-notice .gallery-category { background: rgba(216,72,83,.9); }
.gallery-body { display: grid; gap: 8px; padding: 13px; }
.gallery-body h3 { display: -webkit-box; min-height: 35px; margin: 0; overflow: hidden; font-size: 12px; line-height: 1.5; letter-spacing: -.02em; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.gallery-body > p { display: -webkit-box; min-height: 42px; margin: 0; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.gallery-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 1px solid #edf0f3; color: #8b929d; font-size: 8px; }
.gallery-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-meta span:last-child { flex: 0 0 auto; }
.empty-state { display: grid; place-items: center; min-height: 210px; color: #9aa1aa; text-align: center; }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: #737b87; font-size: 13px; }
.empty-state span { margin-top: 5px; font-size: 10px; }
.pagination { display: flex; justify-content: center; gap: 5px; margin-top: 20px; }
.page-button { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 10px; cursor: pointer; }
.page-button.is-active { border-color: var(--accent); color: #fff; background: var(--accent); }

.site-footer { display: flex; justify-content: space-between; width: min(1180px, calc(100% - 36px)); margin: 0 auto; padding: 22px 0 38px; border-top: 1px solid var(--line); color: #9ba2ac; font-size: 9px; }

.modal { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 18px; border: 0; background: transparent; }
.modal::backdrop { background: rgba(25,29,35,.58); backdrop-filter: blur(4px); }
.modal[open] { display: grid; place-items: center; }
.modal-panel { width: min(680px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 24px 80px rgba(10,13,18,.28); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.modal-header h2 { margin: 0; font-size: 19px; line-height: 1.35; }
.icon-button { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; color: #79818d; background: #fff; font-size: 19px; cursor: pointer; }
.editor-form label, .login-form label, .profile-form label { display: grid; gap: 7px; margin-top: 14px; color: #69717c; font-size: 10px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { margin-top: 0; }
.editor-form input, .editor-form textarea, .editor-form select, .login-form input, .profile-form input { width: 100%; padding: 11px 12px; border: 1px solid #dce0e5; border-radius: 10px; outline: 0; color: var(--ink); background: #fff; font-size: 12px; font-weight: 500; }
.profile-form input[readonly] { color: #8b929c; background: #f5f6f8; }
.editor-form textarea { resize: vertical; line-height: 1.75; }
.editor-form input[type="file"] { padding: 8px; background: #fafbfc; }
.upload-help { margin: 6px 0 0; color: #9299a3; font-size: 9px; }
.image-editor-list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.image-editor-item { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #f6f7f8; aspect-ratio: 1; }
.image-editor-item img { width: 100%; height: 100%; object-fit: cover; }
.image-editor-item button { position: absolute; top: 5px; right: 5px; padding: 3px 6px; border: 0; border-radius: 5px; color: #fff; background: rgba(30,34,40,.78); font-size: 8px; cursor: pointer; }
.image-editor-item.is-pending { display: flex; align-items: center; min-height: 72px; padding: 9px; aspect-ratio: auto; }
.image-editor-item.is-pending span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.editor-form input:focus, .editor-form textarea:focus, .editor-form select:focus, .login-form input:focus, .profile-form input:focus { border-color: #969eaa; box-shadow: 0 0 0 3px #f0f1f3; }
.check-label { display: flex !important; grid-template-columns: auto 1fr; align-items: center; justify-content: flex-start; }
.check-label input { width: 15px; }
.form-message { min-height: 18px; margin-top: 10px; color: var(--danger); font-size: 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.viewer-meta { padding-bottom: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.viewer-tags { margin-top: 13px; }
.viewer-tags .tag-chip { padding: 4px 8px; font-size: 9px; }
.viewer-images { display: grid; gap: 10px; margin-top: 18px; }
.viewer-images img { display: block; width: 100%; max-height: 760px; border-radius: 12px; object-fit: contain; background: #f3f4f6; }
.viewer-content { min-height: 200px; padding: 24px 3px; color: #3d434c; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.category-chip { display: inline-flex; margin-bottom: 9px; padding: 4px 7px; border-radius: 6px; color: #666f7b; background: #eef0f3; font-size: 9px; }
.login-form { width: min(450px, 100%); }
.login-form > p, .profile-form > p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.profile-form { width: min(450px, 100%); }
.profile-role { margin-top: 14px; padding: 11px 12px; border-radius: 10px; color: var(--muted); background: #f5f6f8; font-size: 10px; }
.profile-role strong { margin-left: 6px; color: var(--ink); }
.profile-actions { align-items: center; }
.profile-actions span { flex: 1; }

@media (max-width: 800px) {
  .post-table.is-gallery #postList { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .image-editor-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-shell { grid-template-columns: 1fr; margin-top: 16px; }
  .sidebar { position: static; }
  .sidebar-title button { display: block; }
  .compact-card { display: none; }
  .category-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-list.is-collapsed { display: none; }
  .hero-card { min-height: 145px; padding: 23px; }
}
@media (max-width: 600px) {
  .header-inner, .page-shell, .site-footer { width: min(100% - 24px, 1180px); }
  .brand small { display: none; }
  .header-actions .button { min-height: 35px; padding: 0 11px; }
  .nav-item { flex: 1; padding: 0 6px; }
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card { display: block; }
  .hero-stats { margin-top: 20px; }
  .hero-stats div { flex: 1; }
  .board-card { padding: 18px 13px; }
  .board-toolbar { display: grid; }
  .board-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); }
  .board-controls .search-form, .search-form { width: 100%; }
  .post-head { display: none; }
  .post-row { grid-template-columns: auto minmax(0, 1fr) auto; min-height: 61px; padding: 8px 4px; }
  .post-title { grid-column: 2 / 4; grid-row: 1; }
  .post-category { grid-column: 1; grid-row: 1 / 3; align-self: center; }
  .post-author { grid-column: 2; grid-row: 2; text-align: left; }
  .post-date { grid-column: 3; grid-row: 2; }
  .post-views { display: none; }
  .post-table.is-gallery #postList { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { padding: 10px; }
  .modal-panel { max-height: calc(100vh - 20px); padding: 19px 16px; border-radius: 14px; }
  .viewer-actions .button { flex: 1; padding: 0 8px; }
}

