/* 회원·콘텐츠·운영 화면 전용 스타일.
   기존 style.css의 색 토큰(--bg, --panel, --card, --ink, --steel, --line, --safety, --radius, --shadow)만 쓴다.
   소개 페이지(index)의 기존 레이아웃은 건드리지 않는다. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--steel); }

/* 헤더 계정 영역 */
.nav-auth { display: none; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; color: var(--ink); border: 2px solid var(--ink); border-radius: var(--radius);
  text-decoration: none;
}
.icon-btn:hover { background: var(--safety); color: #1B2733; }
.icon-btn .dot {
  position: absolute; top: -8px; right: -8px; min-width: 18px; height: 18px; padding: 0 5px;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  background: var(--safety); color: #1B2733; border: 2px solid var(--ink); border-radius: 999px;
}
.account-menu { position: relative; }
.account-menu summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 3px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 700;
}
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:focus-visible { outline: 3px solid var(--safety); outline-offset: 3px; }
.account-menu .avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--safety); color: #1B2733; font-size: 13px;
}
.account-menu .who { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu .menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lift);
  padding: 6px 0; font-size: 15px;
}
.account-menu .menu a, .account-menu .menu button {
  display: block; width: 100%; text-align: left; padding: 9px 16px; color: var(--ink); text-decoration: none;
  background: none; border: 0; font: inherit; cursor: pointer;
}
.account-menu .menu a:hover, .account-menu .menu button:hover { background: var(--panel); }
.account-menu .menu form { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.account-menu .menu-email { padding: 6px 16px 10px; font-size: 13px; color: var(--steel); border-bottom: 1px solid var(--line); margin-bottom: 6px; word-break: break-all; }
.account-menu .menu-email a { display: inline; padding: 0; color: var(--ink); text-decoration: underline; }
@media (max-width: 880px) {
  .nav-auth { display: block; }
  .header-login { display: none; }
  .account-menu .who { display: none; }
  .account-menu summary { padding: 3px; }
}

/* 공통 */
.app-main { min-height: 60vh; padding-bottom: 80px; }
.page-head { padding-top: 48px; padding-bottom: 20px; }
.page-head h1, .admin-body h1, .auth-box h1, .prose h1 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.25; letter-spacing: -0.02em; }
.page-head.row, .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 20px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 24px; margin-top: 20px; box-shadow: var(--shadow); }
.panel h2 { font-size: 18px; margin-bottom: 12px; }
.panel.danger { border-color: #C2410C; }
.section-title { font-size: 18px; margin-top: 32px; }
.btn.small { font-size: 14px; padding: 7px 14px; }
.btn.block { display: block; width: 100%; text-align: center; margin-top: 20px; }
.btn.danger { background: #C2410C; color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-row form { display: inline; }
.cta.tight { margin-top: 0; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }
.nowrap { white-space: nowrap; }
code { font-size: .92em; background: var(--panel); padding: 1px 5px; border-radius: 3px; }

/* 알림 메시지 */
.flashes { padding-top: 16px; }
.flash { padding: 12px 16px; border-radius: var(--radius); border-left: 4px solid var(--steel); background: var(--panel); font-size: 15px; margin-top: 10px; }
.flash.success { border-left-color: #15803D; }
.flash.error { border-left-color: #C2410C; background: var(--highlight); }
.flash.info { border-left-color: var(--safety); }

/* 배지 */
.badge { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.5; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); vertical-align: middle; white-space: nowrap; }
.badge.ok, .review-approved { background: #DCFCE7; border-color: #86EFAC; color: #14532D; }
.badge.warn, .review-pending { background: var(--safety-soft); border-color: var(--safety); color: #5B4300; }
.review-in_review { background: #DBEAFE; border-color: #93C5FD; color: #1E3A8A; }
.review-rejected { background: #FEE2E2; border-color: #FCA5A5; color: #7F1D1D; }
.badge.muted, .review-none { color: var(--steel); }
:root[data-theme="dark"] .badge.ok, :root[data-theme="dark"] .review-approved { background: #14321F; color: #BBF7D0; border-color: #166534; }
:root[data-theme="dark"] .badge.warn, :root[data-theme="dark"] .review-pending { color: #FDE68A; }
:root[data-theme="dark"] .review-in_review { background: #172554; color: #BFDBFE; border-color: #1E40AF; }
:root[data-theme="dark"] .review-rejected { background: #3B1414; color: #FECACA; border-color: #991B1B; }
.edited { font-size: 12px; color: var(--steel); }

/* 폼 */
form label:not(.check):not(.inline) { display: block; font-size: 14px; font-weight: 700; margin-top: 16px; margin-bottom: 6px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--safety-soft); }
[aria-invalid="true"] { border-color: #C2410C !important; }
textarea { resize: vertical; line-height: 1.6; }
.field-error { color: #C2410C; font-size: 14px; margin-top: 6px; }
:root[data-theme="dark"] .field-error { color: #FDBA74; }
.help { font-size: 13px; color: var(--steel); margin-top: 6px; }
.check { display: block; padding-left: 26px; text-indent: -26px; font-size: 15px; margin-top: 10px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0 10px 0 0; vertical-align: -2px; accent-color: var(--safety); }
fieldset { border: 0; margin-top: 18px; }
fieldset legend { font-size: 14px; font-weight: 700; }
.choice { display: flex; gap: 24px; }
.choice .check { margin-top: 0; }
.code-input { letter-spacing: .4em; font-size: 22px !important; text-align: center; font-weight: 700; }
.prefix-input { display: flex; align-items: stretch; }
.prefix-input span { display: flex; align-items: center; padding: 0 10px; background: var(--panel); border: 2px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 14px; color: var(--steel); }
.prefix-input input { border-radius: 0 var(--radius) var(--radius) 0 !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.row-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.row-form .check { margin-top: 0; }
.inline-form { margin-top: 16px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0; }
.toolbar input, .toolbar select { width: auto !important; min-width: 140px; flex: 1 1 140px; padding: 7px 10px !important; font-size: 14px !important; }
.toolbar label.inline { font-size: 13px; color: var(--steel); display: flex; align-items: center; gap: 6px; }
.toolbar .btn { flex: none; }

/* 로그인·가입 상자 */
.auth-box { max-width: 440px; margin: 56px auto 0; padding: 32px 28px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.auth-box > p { margin-top: 10px; }
.auth-box .alt-link { margin-top: 20px; text-align: center; font-size: 15px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 12px; color: var(--steel); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.social-buttons .btn { margin-top: 8px; }
.resend-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 18px; font-size: 14px; }
.resend-row .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; background: none; color: var(--ink); }
.resend-row > .muted { flex-basis: 100%; }
.resend-row .cooldown { white-space: nowrap; font-size: 14px; font-weight: 700; color: var(--steel); font-variant-numeric: tabular-nums; }
.code-timer { font-variant-numeric: tabular-nums; }
.code-timer.urgent { color: #C2410C; font-weight: 700; }
@media (max-width: 560px) { .auth-box { margin: 24px 16px 0; padding: 24px 20px; } }

/* 분류 칩·탭 */
.chips, .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.chip-link, .tabs a { font-size: 14px; text-decoration: none; padding: 5px 14px; border: 2px solid var(--line); border-radius: 999px; color: var(--steel); }
.chip-link:hover, .tabs a:hover { border-color: var(--ink); color: var(--ink); }
.chip-link[aria-current], .tabs a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; color: var(--steel); letter-spacing: .02em; }

/* 소식 카드 */
.news .wrap { padding-top: 72px; padding-bottom: 88px; }
.news-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.news-head .more { font-size: 15px; font-weight: 700; }
.news .lede { margin-top: 8px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.content-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); transition: transform .16s ease, box-shadow .16s ease; }
.content-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.content-card a { display: block; text-decoration: none; color: inherit; height: 100%; }
.content-card .cover { aspect-ratio: 16 / 9; background: var(--panel); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.content-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.content-card .cover.placeholder span { font-weight: 700; color: var(--steel); font-size: 15px; border: 2px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.content-card .card-body { padding: 16px 18px 18px; }
.content-card h3 { font-size: 17px; line-height: 1.45; margin-top: 4px; }
.content-card .summary { font-size: 14px; color: var(--steel); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.content-card .meta { font-size: 13px; color: var(--steel); margin-top: 10px; }
@media (max-width: 880px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }
.result-count { font-size: 14px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; font-size: 15px; }
.pager a { font-weight: 700; }
.pager .off { color: var(--line); }
.empty { text-align: center; padding: 48px 20px; border: 2px dashed var(--line); border-radius: 10px; margin-top: 20px; }
.empty-title { font-weight: 700; }
.empty .btn { margin-top: 14px; }

/* 상세 글 */
.article { max-width: 760px; padding-top: 32px; }
.crumbs { font-size: 14px; color: var(--steel); padding-top: 28px; }
.crumbs a { color: var(--steel); }
.article .crumbs { padding-top: 0; }
.article-head { margin-top: 16px; }
.article-head h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.25; letter-spacing: -0.025em; margin-top: 6px; }
.article-head .meta { font-size: 14px; margin-top: 10px; }
.tags { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--steel); }
.article-cover { margin-top: 28px; }
.article-cover img, .article-cover video, .body-media img, .body-media video { width: 100%; height: auto; border-radius: 10px; display: block; }
.article-body { margin-top: 28px; }
.article-body p { margin-top: 16px; line-height: 1.85; }
.article-body .body-media { margin: 24px 0; }
.article-body.boxed { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; background: var(--bg); white-space: pre-wrap; margin-top: 12px; }
.media-missing { color: var(--steel); font-size: 14px; border: 1px dashed var(--line); padding: 12px; text-align: center; }
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 48px 0 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.article-nav a { text-decoration: none; display: flex; flex-direction: column; font-weight: 700; }
.article-nav a span { font-size: 13px; font-weight: 400; }
.article-nav .next { text-align: right; }
.prose { max-width: 760px; padding-top: 48px; }
.prose h2 { font-size: 18px; margin-top: 28px; }
.prose p { margin-top: 8px; }

/* 목록 */
.list { list-style: none; margin-top: 16px; border-top: 1px solid var(--line); }
.list li { border-bottom: 1px solid var(--line); }
.list li > a, .list.compact li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 4px; text-decoration: none; color: inherit; }
.list li > a:hover { background: var(--panel); }
.list .meta { font-size: 13px; margin-left: auto; }
.list li.unread strong { font-weight: 700; }
.list li:not(.unread) strong { font-weight: 500; }
.list.compact li > a, .list.compact li { padding: 9px 2px; font-size: 14px; }
.kv { display: grid; grid-template-columns: 9em 1fr; gap: 8px 16px; font-size: 15px; }
.kv dt { color: var(--steel); }
.qna header h1 { font-size: 24px; margin-top: 8px; }
.qna .meta, .answer .meta { font-size: 14px; margin-top: 6px; }
.qna-body { white-space: pre-wrap; margin-top: 16px; line-height: 1.8; }
.answer { border-left: 4px solid var(--safety); }

/* 운영 화면 */
.admin { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding-top: 32px; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: var(--header-offset, 92px); align-self: start; }
.admin-nav a { padding: 9px 12px; border-radius: var(--radius); text-decoration: none; color: var(--steel); font-size: 15px; }
.admin-nav a:hover { background: var(--panel); color: var(--ink); }
.admin-nav a[aria-current] { background: var(--ink); color: var(--bg); font-weight: 700; }
.admin-body { min-width: 0; }
.admin-body > .muted { margin-top: 6px; }
@media (max-width: 880px) {
  .admin { grid-template-columns: 1fr; gap: 12px; }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
  .admin-nav a { white-space: nowrap; }
  .grid-2 { grid-template-columns: 1fr; }
}
.stat-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat .label { font-size: 13px; color: var(--steel); }
.stat .num { font-size: 28px; font-weight: 700; line-height: 1.2; margin-top: 4px; }
@media (max-width: 880px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 880px) { .dash-grid { grid-template-columns: 1fr; } }
.table-wrap { overflow-x: auto; margin-top: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { font-size: 13px; color: var(--steel); border-bottom: 2px solid var(--ink); }
table.data .meta { font-size: 12px; }
.media-preview { display: grid; grid-template-columns: minmax(0, 280px) 1fr; gap: 20px; align-items: start; }
.media-preview img, .media-preview video, .preview-img { width: 100%; max-width: 480px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 560px) { .media-preview { grid-template-columns: 1fr; } .kv { grid-template-columns: 1fr; } }
.media-picker { margin-top: 12px; font-size: 14px; }
.media-picker ul { list-style: none; margin-top: 8px; max-height: 220px; overflow: auto; }
.media-picker li { padding: 4px 0; }
.perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
@media (max-width: 560px) { .perm-grid { grid-template-columns: 1fr; } }
.perm-form .btn { margin-top: 12px; }
.op-item { border-top: 1px solid var(--line); padding: 12px 0; }
.op-item summary { cursor: pointer; }
.op-item .perm-form { margin-top: 12px; }
.found { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
pre.diff { background: var(--panel); border-radius: var(--radius); padding: 12px; font-size: 13px; overflow: auto; white-space: pre-wrap; word-break: break-all; }

@media print {
  .account-menu, .icon-btn, .admin-nav, .flashes { display: none !important; }
}


/* ── v2: 매니패스트 와이어프레임 화면 구성 ───────────────────────── */

/* 칩(상태·분류 표시) */
.chip-tag { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.5; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.chip-tag.ok { background: #DCFCE7; border-color: #86EFAC; color: #14532D; }
.chip-tag.warn { background: var(--safety-soft); border-color: var(--safety); color: #5B4300; }
.chip-tag.muted { color: var(--steel); }
.chip-tag.danger { background: #FEE2E2; border-color: #FCA5A5; color: #7F1D1D; }
.chip-tag.info { background: #DBEAFE; border-color: #93C5FD; color: #1E3A8A; }
:root[data-theme="dark"] .chip-tag.ok { background: #14321F; color: #BBF7D0; border-color: #166534; }
:root[data-theme="dark"] .chip-tag.warn { color: #FDE68A; }
:root[data-theme="dark"] .chip-tag.danger { background: #3B1414; color: #FECACA; border-color: #991B1B; }
:root[data-theme="dark"] .chip-tag.info { background: #172554; color: #BFDBFE; border-color: #1E40AF; }

/* 상자·두 칸 배치 */
.box { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; box-shadow: var(--shadow); }
.box + .box { margin-top: 16px; }
.box > h2, .box > h3 { font-size: 17px; margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols.side-left { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.cols > div { min-width: 0; }
@media (max-width: 880px) { .cols, .cols.even, .cols.side-left { grid-template-columns: 1fr; } }
.page-title { font-size: clamp(26px, 3.4vw, 34px); line-height: 1.25; letter-spacing: -0.02em; }
.title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 40px; }
.title-row .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: 14px; color: var(--steel); padding-top: 28px; display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--steel); }
.bottom-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.bottom-actions.left { justify-content: flex-start; }
.desc { color: var(--steel); margin-top: 6px; font-size: 15px; }
.note { font-size: 13px; color: var(--steel); margin-top: 8px; }
.note.strong { color: var(--ink); font-weight: 700; }

/* 필터 줄과 칩 버튼 */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.filters input, .filters select { width: auto !important; flex: 1 1 160px; min-width: 140px; padding: 8px 10px !important; font-size: 14px !important; }
.filters input[type="search"] { flex: 2 1 240px; }
.filters .btn { flex: none; }
.filters .count { align-self: center; margin-left: auto; font-size: 14px; color: var(--steel); white-space: nowrap; }

/* 번호 페이지 이동 */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 28px; flex-wrap: wrap; }
.pager .pg { min-width: 36px; height: 36px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--ink); }
.pager .pg:hover { border-color: var(--ink); }
.pager .pg.now { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager.compact .now-text { font-size: 14px; color: var(--steel); padding: 0 8px; }

/* 모달(오버레이) */
dialog.modal { border: 0; padding: 0; background: transparent; max-width: min(560px, calc(100vw - 32px)); width: 100%; color: var(--ink); }
dialog.modal.wide { max-width: min(820px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(11, 16, 22, .55); }
.modal-box { background: var(--card); border: 2px solid var(--ink); border-radius: 12px; padding: 26px 26px 22px; box-shadow: var(--shadow-lift); max-height: calc(100vh - 64px); overflow: auto; }
.modal-title { font-size: 20px; line-height: 1.35; }
.modal-box > p { margin-top: 10px; color: var(--steel); font-size: 15px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.modal-box .kv { margin-top: 14px; }
.modal-box .detail-box { margin-top: 12px; background: var(--panel); border-radius: 8px; padding: 12px 14px; font-size: 14px; }

/* 홈 */
.home-hero .wrap { padding-top: 24px; padding-bottom: 72px; }
.home-hero h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.14; letter-spacing: -0.04em; max-width: 13em; }
.home-hero .lead { margin-top: 22px; font-size: 19px; color: var(--steel); max-width: 36em; }
.home-hero .cta { align-items: center; }
.home-hero .profile-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 2px solid var(--ink); border-radius: 999px; background: none; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.home-hero .profile-chip .avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--safety); color: #1B2733; }
.home-section .wrap { padding-top: 64px; padding-bottom: 72px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; }
.section-head select { width: auto !important; min-width: 160px; }
.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.value-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.value-card img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: var(--panel); }
.value-card .vc-body { padding: 18px 20px 20px; }
.value-card h3 { font-size: 18px; }
.value-card p { font-size: 15px; color: var(--steel); margin-top: 8px; line-height: 1.75; }
@media (max-width: 880px) { .value-grid { grid-template-columns: 1fr; } }
.home-cta { text-align: center; }
.home-cta .wrap { padding-top: 64px; padding-bottom: 72px; }
.home-cta h2 { font-size: clamp(26px, 3.4vw, 36px); }
.home-cta p { color: var(--steel); margin-top: 10px; }
.home-cta .cta { justify-content: center; }

/* 목록 상자형 항목(내 Q&A, 알림) */
.item-list { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; text-decoration: none; color: inherit; }
a.item:hover { border-color: var(--ink); }
.item .main { min-width: 0; }
.item .main strong { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; }
.item .sub { font-size: 13px; color: var(--steel); margin-top: 4px; }
.item .side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.item .dot { color: var(--safety); font-size: 14px; }
.item.read .dot { visibility: hidden; }
.item .kind { font-size: 13px; font-weight: 700; }
.item .state { font-size: 12px; color: var(--steel); margin-left: 6px; }
.item.unread .state { color: #C2410C; font-weight: 700; }
@media (max-width: 560px) { .item { flex-direction: column; align-items: flex-start; } }

/* 대시보드 */
.stat-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.menu-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.menu-card h3 { font-size: 16px; }
.menu-card p { font-size: 14px; color: var(--steel); flex: 1; }
.menu-card .btn { align-self: flex-start; margin-top: 8px; }
@media (max-width: 880px) { .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .menu-grid { grid-template-columns: 1fr; } }
.mini-item { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; text-decoration: none; color: inherit; margin-top: 8px; font-size: 14px; }
.mini-item:hover { border-color: var(--ink); }
.mini-item .sub { display: block; font-size: 12px; color: var(--steel); margin-top: 2px; }
.sub-head { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; }
.sub-head h2 { font-size: 18px; }
.sub-head a { font-size: 14px; font-weight: 700; }

/* 정보 표(라벨+값 격자) */
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; }
.info-grid .label { font-size: 12px; color: var(--steel); }
.info-grid .value { font-size: 15px; font-weight: 700; margin-top: 2px; word-break: break-all; }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr 1fr; } }

/* 업로드 영역 */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border: 2px dashed var(--line); border-radius: 10px; background: var(--panel); text-align: center; padding: 20px; cursor: pointer; }
.dropzone:hover, .dropzone.drag { border-color: var(--ink); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone .dz-title { font-weight: 700; }
.upload-status { font-size: 15px; font-weight: 700; }
.upload-status.bad { color: #C2410C; }
.cover-preview { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; justify-content: center; color: var(--steel); font-size: 14px; }
img.cover-preview { display: block; }

/* 프로필 */
.profile-card { text-align: center; }
.profile-card .big-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--safety); color: #1B2733; display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; }
.profile-card .name { font-size: 20px; font-weight: 700; margin-top: 10px; }
.profile-card .email { font-size: 14px; color: var(--steel); word-break: break-all; }
.profile-card .rows { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; text-align: left; }
.profile-card .rows div { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.switch { position: relative; width: 48px; height: 28px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: 999px; background: var(--bg); cursor: pointer; transition: background .16s; }
.switch span::before { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .16s; }
.switch input:checked + span { background: var(--safety); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--safety); outline-offset: 2px; }

/* Q&A 상세 */
.qa-card .qa-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qa-card .qa-head h2 { font-size: 20px; margin-right: auto; }
.qa-card .meta { font-size: 13px; color: var(--steel); margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.qa-card .qna-body { margin-top: 14px; }
.qa-card .qa-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.answer-card { border-left: 4px solid var(--safety); }

/* 상세 글 하단 */
.article-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 40px 0 24px; border-top: 1px solid var(--line); padding-top: 20px; flex-wrap: wrap; }
.article-foot .pn { display: flex; gap: 8px; }
.article-head .top { display: flex; align-items: center; gap: 10px; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }

.profile-menu .menu-email { color: var(--steel); font-size: 14px; margin-top: 4px; word-break: break-all; }
.profile-menu .menu-list { display: flex; flex-direction: column; margin-top: 14px; border-top: 1px solid var(--line); }
.profile-menu .menu-list a { padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-weight: 700; }
.profile-menu .menu-list a:hover { color: var(--steel); }
.home-hero + .home-section { border-top: 1px solid var(--line); }
.contact-line { font-size: 14px; margin-top: 22px !important; }
.box.soft { background: var(--panel); box-shadow: none; padding: 16px 18px; margin-top: 16px; }
.box.soft p + p { margin-top: 4px; }
.auth-box .box.soft + .btn.block, .auth-box .box.soft + form { margin-top: 16px; }
.resend-row.split { justify-content: space-between; }
.resend-row.split form { display: flex; align-items: center; gap: 10px; }
.social-buttons.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-buttons.row .btn { margin-top: 0; font-size: 14px; padding: 11px 10px; }
.narrow-wide { max-width: 880px; }
.big-avatar { border-radius: 50%; background: var(--safety); color: #1B2733; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.label { font-size: 12px; color: var(--steel); }
.admin-page { padding-bottom: 40px; }
.data .btn-row form { display: inline; }
[hidden] { display: none !important; }
dialog.modal { margin: auto; }
dialog.modal[open] { display: block; }
form label.dropzone, label.dropzone { display: flex !important; position: relative; }
.dropzone .note { margin-top: 0; }


/* ── 공통 규칙(화면 통일) ───────────────────────────────
   1) 모든 화면 머리: 위치 → 제목(+작은 버튼) → 설명
   2) 상자 안 버튼·표 안 버튼·검색 버튼·모달 버튼: 작은 버튼(btn small)
   3) 화면 맨 아래 확정 버튼: 보통 버튼(btn), 순서는 [취소][확정]
   4) 로그인·가입 계열: 가운데 상자, 확정 버튼은 가로 꽉 차게, 소셜 버튼은 가로 2칸 */
.page-header { padding-top: 28px; }
.page-header .breadcrumb { padding-top: 0; }
.page-header .breadcrumb .sep { color: var(--line); }
.page-header .breadcrumb [aria-current] { color: var(--ink); }
.page-header .title-row { padding-top: 10px; }
.page-header + * { margin-top: 20px; }
.page-header + .filters, .page-header + .chips { margin-top: 20px; }
.box-title { font-size: 20px; line-height: 1.35; }
.title-row .actions form { display: inline; }
.auth-box .btn.block + .btn.block { margin-top: 10px; }
.auth-box .resend-row { margin-top: 14px; }
.page-header + .prose, .prose { padding-top: 0; }
.main.grow { flex: 1; }
.item .time { font-size: 13px; color: var(--steel); white-space: nowrap; }
.box-text { margin-top: 14px; }
.qa-card .qa-head .box-title { margin-right: auto; }
.empty { margin-top: 16px; }
.spaced { margin-top: 12px; }
.cols.tight { margin-top: 6px; }
.box-actions { margin-top: 12px; }
.note.flush { margin: 0; }
.dropzone.compact { min-height: 90px; margin-top: 12px; }
.big-avatar.small { width: 40px; height: 40px; font-size: 18px; }
.user-row { display: flex; align-items: center; gap: 12px; }
.sub-head .count { font-size: 14px; color: var(--steel); }
.dropzone .note { margin: 0; }
.social-buttons, .social-buttons.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.social-buttons .btn { margin-top: 0 !important; text-align: center; font-size: 15px; padding: 11px 10px; }
@media (max-width: 380px) { .social-buttons, .social-buttons.row { grid-template-columns: 1fr; } }
.auth-box > p.muted { margin-top: 8px; }
.sub-head + .box, .sub-head + .empty { margin-top: 12px; }
.auth-box .alt-link.tight { margin-top: 6px; }
.inline-field { display: flex; gap: 8px; align-items: stretch; }
.inline-field input { flex: 1; min-width: 0; }
.inline-field .btn { flex: none; white-space: nowrap; }
.verified-ok { margin-top: 10px; font-size: 14px; font-weight: 700; color: #15803D; }
:root[data-theme="dark"] .verified-ok { color: #86EFAC; }
.status-msg { margin-top: 8px; font-size: 14px; color: var(--steel); }
.help.center { text-align: center; }
.btn.block[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
input[readonly] { background: var(--panel); color: var(--steel); }
.btn[disabled], .btn[disabled]:hover { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.ghost[disabled], .btn.ghost[disabled]:hover { background: none; color: var(--ink); }
.inline-field input[readonly] { background: var(--panel) !important; color: var(--steel) !important; }

/* 회사소개(/about) */
.about-quote { margin: 28px 0; padding: 22px 26px; border-left: 4px solid var(--safety); background: var(--card, var(--bg)); border-radius: 0 12px 12px 0; }
.about-quote p { font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: var(--ink); line-height: 1.4; margin: 0; }
section.alt .about-quote { background: var(--bg); }
.about-logo { background: #F3F3EF; border-radius: 12px; padding: 40px 48px; }
.about-logo img { display: block; width: 100%; height: auto; }
:root[data-theme="dark"] .about-logo { background: var(--panel); }
:root[data-theme="dark"] .about-logo img { content: url("/assets/dnrobotics-logo-dark.svg"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about-logo { background: var(--panel); }
  :root:not([data-theme="light"]) .about-logo img { content: url("/assets/dnrobotics-logo-dark.svg"); }
}
.about-section .body > p + p { margin-top: 14px; }
.section-illustration.about-logo img { border: 0; background: none; box-shadow: none; border-radius: 0; aspect-ratio: auto; object-fit: contain; }
/* 영어 헤더는 메뉴가 많아(섹션 앵커 + About + News) 한 줄에 들어가도록 간격을 조금 줄인다 */
@media (min-width: 1100px) { html[lang="en"] header nav { gap: 13px; font-size: 14px; } }
