@charset "utf-8";
/* SolCMS 기본 테마 — mublo 프론트 디자인 시스템
   토큰: Tailwind v4 primitive(OKLCH) + shadcn/ui new-york · zinc semantic
   원본: /home/mublo/public/assets/css/tokens.css
        /home/mublo/views/Front/frame/basic/_assets/css/front.css */

/* ═══════════ TIER 1 — PRIMITIVE (Tailwind v4 OKLCH) ═══════════ */

:root {
  --color-white: #fff;

  --color-zinc-50:  oklch(0.985 0 0);
  --color-zinc-100: oklch(0.967 0.001 286.375);
  --color-zinc-200: oklch(0.92 0.004 286.32);
  --color-zinc-300: oklch(0.871 0.006 286.286);
  --color-zinc-400: oklch(0.705 0.015 286.067);
  --color-zinc-500: oklch(0.552 0.016 285.938);
  --color-zinc-600: oklch(0.442 0.017 285.786);
  --color-zinc-700: oklch(0.37 0.013 285.805);
  --color-zinc-800: oklch(0.274 0.006 286.033);
  --color-zinc-900: oklch(0.21 0.006 285.885);
  --color-zinc-950: oklch(0.141 0.005 285.823);

  --color-red-50:  oklch(0.971 0.013 17.38);
  --color-red-200: oklch(0.885 0.062 18.334);
  --color-red-600: oklch(0.577 0.245 27.325);
  --color-red-700: oklch(0.505 0.213 27.518);

  --color-green-50:  oklch(0.982 0.018 155.826);
  --color-green-200: oklch(0.925 0.084 155.995);
  --color-green-600: oklch(0.627 0.194 149.214);
  --color-green-700: oklch(0.527 0.154 150.069);

  --color-amber-50:  oklch(0.987 0.022 95.277);
  --color-amber-200: oklch(0.924 0.12 95.746);
  --color-amber-500: oklch(0.769 0.188 70.08);
  --color-amber-800: oklch(0.473 0.137 46.201);

  --color-blue-50:  oklch(0.97 0.014 254.604);
  --color-blue-200: oklch(0.882 0.059 254.128);
  --color-blue-600: oklch(0.546 0.245 262.881);
  --color-blue-700: oklch(0.488 0.243 264.376);

  /* 반경 · 타이포 스케일 */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  --font-sans: "Plus Jakarta Sans", "Noto Sans KR", ui-sans-serif, system-ui,
               -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco,
               Consolas, "Liberation Mono", monospace;

  --text-xs: 0.75rem;    --text-xs-lh: 1rem;
  --text-sm: 0.875rem;   --text-sm-lh: 1.25rem;
  --text-base: 1rem;     --text-base-lh: 1.5rem;
  --text-lg: 1.125rem;   --text-lg-lh: 1.75rem;
  --text-xl: 1.25rem;    --text-xl-lh: 1.75rem;
  --text-2xl: 1.5rem;    --text-2xl-lh: 2rem;
  --text-3xl: 1.875rem;  --text-3xl-lh: 2.25rem;

  --tracking-tight: -0.025em;
  --tracking-tighter: -0.05em;
}

/* ═══════════ TIER 2 — SEMANTIC (shadcn/ui new-york · zinc) ═══════════ */

:root {
  color-scheme: light;

  --background:           var(--color-white);
  --foreground:           var(--color-zinc-950);
  --card:                 var(--color-white);
  --card-foreground:      var(--color-zinc-950);

  --primary:              var(--color-zinc-900);
  --primary-foreground:   var(--color-zinc-50);

  --secondary:            var(--color-zinc-100);
  --secondary-foreground: var(--color-zinc-900);
  --muted:                var(--color-zinc-100);
  --muted-foreground:     var(--color-zinc-500);
  --accent:               var(--color-zinc-100);
  --accent-foreground:    var(--color-zinc-900);

  --destructive:            var(--color-red-600);
  --destructive-foreground: var(--color-zinc-50);
  --success:                var(--color-green-600);
  --info:                   var(--color-blue-600);

  --success-subtle:            var(--color-green-50);
  --success-subtle-foreground: var(--color-green-700);
  --success-subtle-border:     var(--color-green-200);
  --warning-subtle:            var(--color-amber-50);
  --warning-subtle-foreground: var(--color-amber-800);
  --warning-subtle-border:     var(--color-amber-200);
  --danger-subtle:             var(--color-red-50);
  --danger-subtle-foreground:  var(--color-red-700);
  --danger-subtle-border:      var(--color-red-200);
  --info-subtle:               var(--color-blue-50);
  --info-subtle-foreground:    var(--color-blue-700);
  --info-subtle-border:        var(--color-blue-200);

  --border:        var(--color-zinc-200);
  --border-subtle: var(--color-zinc-100);
  --input:         var(--color-zinc-200);
  --ring:          var(--color-zinc-400);

  --radius: 0.625rem;

  /* 레이아웃 */
  --site-max-width:    1280px;
  --content-max-width: 1280px;
  --header-height:     64px;
  --content-gutter-x:  16px;
  --content-gutter-y:  16px;
}

/* 다크 — Tier 2 만 remap */
:root[data-theme="dark"] {
  color-scheme: dark;

  --background:           var(--color-zinc-950);
  --foreground:           var(--color-zinc-50);
  --card:                 var(--color-zinc-900);
  --card-foreground:      var(--color-zinc-50);

  --primary:              var(--color-zinc-200);
  --primary-foreground:   var(--color-zinc-900);

  --secondary:            var(--color-zinc-800);
  --secondary-foreground: var(--color-zinc-50);
  --muted:                var(--color-zinc-800);
  --muted-foreground:     var(--color-zinc-400);
  --accent:               var(--color-zinc-800);
  --accent-foreground:    var(--color-zinc-50);

  --border:        var(--color-zinc-800);
  --border-subtle: var(--color-zinc-800);
  --input:         var(--color-zinc-800);
  --ring:          var(--color-zinc-600);

  --success-subtle:            oklch(0.26 0.06 152);
  --success-subtle-foreground: oklch(0.85 0.11 152);
  --success-subtle-border:     oklch(0.35 0.08 152);
  --warning-subtle:            oklch(0.27 0.06 60);
  --warning-subtle-foreground: oklch(0.87 0.13 88);
  --warning-subtle-border:     oklch(0.36 0.08 60);
  --danger-subtle:             oklch(0.26 0.08 26);
  --danger-subtle-foreground:  oklch(0.83 0.10 20);
  --danger-subtle-border:      oklch(0.35 0.11 26);
  --info-subtle:               oklch(0.26 0.08 264);
  --info-subtle-foreground:    oklch(0.84 0.09 258);
  --info-subtle-border:        oklch(0.35 0.11 264);
}

/* 테마를 "시스템" 으로 두면 data-theme 속성이 없다 —
   그때는 OS 설정을 따라야 하므로 같은 remap 을 한 번 더 낸다.
   [data-theme="light"] 를 명시한 경우에는 적용되지 않도록 제외한다. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    color-scheme: dark;

    --background:           var(--color-zinc-950);
    --foreground:           var(--color-zinc-50);
    --card:                 var(--color-zinc-900);
    --card-foreground:      var(--color-zinc-50);

    --primary:              var(--color-zinc-200);
    --primary-foreground:   var(--color-zinc-900);

    --secondary:            var(--color-zinc-800);
    --secondary-foreground: var(--color-zinc-50);
    --muted:                var(--color-zinc-800);
    --muted-foreground:     var(--color-zinc-400);
    --accent:               var(--color-zinc-800);
    --accent-foreground:    var(--color-zinc-50);

    --border:        var(--color-zinc-800);
    --border-subtle: var(--color-zinc-800);
    --input:         var(--color-zinc-800);
    --ring:          var(--color-zinc-600);

    --success-subtle:            oklch(0.26 0.06 152);
    --success-subtle-foreground: oklch(0.85 0.11 152);
    --success-subtle-border:     oklch(0.35 0.08 152);
    --warning-subtle:            oklch(0.27 0.06 60);
    --warning-subtle-foreground: oklch(0.87 0.13 88);
    --warning-subtle-border:     oklch(0.36 0.08 60);
    --danger-subtle:             oklch(0.26 0.08 26);
    --danger-subtle-foreground:  oklch(0.83 0.10 20);
    --danger-subtle-border:      oklch(0.35 0.11 26);
    --info-subtle:               oklch(0.26 0.08 264);
    --info-subtle-foreground:    oklch(0.84 0.09 258);
    --info-subtle-border:        oklch(0.35 0.11 264);
  }
}

/* ═══════════ 기본 ═══════════ */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--foreground);
  background: var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  word-break: break-word;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; letter-spacing: var(--tracking-tight); }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
img, video { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }

a { color: inherit; text-decoration: none; transition: color .2s ease, background-color .2s ease; }
a:hover { color: var(--muted-foreground); }

code, .mono { font-family: var(--font-mono); font-size: .875em; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: .6rem 1rem; background: var(--primary); color: var(--primary-foreground);
  border-radius: var(--radius-md);
}
.skip:focus { left: .5rem; top: .5rem; }

/* ═══════════ 레이아웃 ═══════════ */

.container {
  width: 100%; max-width: var(--site-max-width); margin: 0 auto;
  padding-inline: var(--content-gutter-x);
}

.site-main { flex: 1; padding: 1.5rem 0 4rem; }

.narrow { max-width: 48rem; margin-inline: auto; }

.page-head {
  display: flex; align-items: baseline; gap: .75rem;
  flex-wrap: wrap; margin-bottom: 1.5rem;
}
.page-head h1 { margin: 0; font-size: var(--text-2xl); line-height: var(--text-2xl-lh); letter-spacing: var(--tracking-tight); }
.page-head .count { color: var(--muted-foreground); font-size: var(--text-sm); }

.breadcrumb { font-size: var(--text-sm); color: var(--muted-foreground); margin-bottom: .75rem; }
.breadcrumb a { color: var(--muted-foreground); }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb span { margin: 0 .35rem; opacity: .6; }

/* ═══════════ 헤더 ═══════════ */



.header-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: var(--radius-md);
  background: transparent; color: var(--muted-foreground);
  cursor: pointer; font-size: .95rem; line-height: 1;
}
.icon-btn:hover { background: var(--muted); color: var(--foreground); }


/* ═══════════ 내비게이션 ═══════════ */



/* ═══════════ 카드 ═══════════ */

.card {
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card + .card { margin-top: 1rem; }
.card-head {
  display: flex; align-items: center; gap: .625rem;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { margin: 0; font-size: var(--text-base); font-weight: 600; }
.card-head .more { margin-left: auto; font-size: var(--text-sm); color: var(--muted-foreground); }
.card-body { padding: 1.25rem; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ═══════════ 버튼 ═══════════ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem 1rem;
  font-size: var(--text-sm); font-weight: 500; line-height: 1.25rem;
  border: 1px solid transparent; border-radius: var(--radius-md);
  background: var(--secondary); color: var(--secondary-foreground);
  font-family: inherit; cursor: pointer; white-space: nowrap;
  transition: opacity .2s ease, background-color .2s ease, color .2s ease;
}
.btn:hover { color: var(--foreground); }

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: .9; color: var(--primary-foreground); }

.btn-outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.btn-outline:hover { background: var(--muted); }

.btn-ghost { background: transparent; color: var(--foreground); }
.btn-ghost:hover { background: var(--muted); }

.btn-danger { background: var(--destructive); color: var(--destructive-foreground); }
.btn-danger:hover { opacity: .9; color: var(--destructive-foreground); }

.btn-sm { padding: .3rem .75rem; font-size: .8125rem; }
.btn-lg { padding: .65rem 1.5rem; font-size: var(--text-base); }

/* 취소 같은 보통 버튼과 나란히 놓일 때는 높이를 맞춘다.
   (혼자 서는 .btn-block 큰 버튼은 그대로 크게 둔다) */
.btn-row .btn-lg:not(.btn-block) { padding-top: .5rem; padding-bottom: .5rem; }
.btn-block { display: flex; width: 100%; }

/* sir .sir-btn--bch — 헤더의 로그인·회원가입처럼 "밝은 면 + 헤어라인" 버튼.
   원본: /home/project1/www/theme/sir/css/sir.css
     .sir-btn      font-size:14px; font-weight:500; padding:8px 14px; min-height:40px; gap:8px
     .sir-btn--bch background:s1; color:ink; border-color:hair; border-radius:r-lg; font-weight:600
   btn-sm 과 겹칠 때 padding·font-size 가 덮이지 않도록 조합 선택자로 특정도를 올린다. */
.btn.btn-sm.btn-primary,
.btn.btn-sm.btn-bch {
  gap: 8px; padding: 8px 14px; min-height: 40px;
  font-size: 14px; font-weight: 600; line-height: 1.2;
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  transition: background-color .16s cubic-bezier(.4,0,.2,1),
              border-color .16s cubic-bezier(.4,0,.2,1),
              color .16s cubic-bezier(.4,0,.2,1);
  opacity: 1;
}
.btn.btn-sm.btn-primary:hover,
.btn.btn-sm.btn-bch:hover {
  background: var(--muted); color: var(--foreground);
  border-color: var(--border); opacity: 1;
}
/* sir .sir-btn--bch .fa { color: ink-subtle; font-size: 14px } */
.btn.btn-sm.btn-primary svg,
.btn.btn-sm.btn-bch svg { color: var(--muted-foreground); flex: none; }

/* sir .sir-btn--primary — 채워진 브랜드 버튼 (헤더 로그아웃 등).
   .sir-btn 기본값(14px/500/8px 14px/min-height 40/radius --r-md=8px)에
   --primary 배경을 얹은 형태다. bch 와 달리 radius 는 8px 이다. */
.btn.btn-sm.btn-brand {
  gap: 8px; padding: 8px 14px; min-height: 40px;
  font-size: 14px; font-weight: 500; line-height: 1.2;
  background: var(--brand); color: var(--brand-foreground);
  border: 1px solid transparent; border-radius: var(--radius-lg);
  transition: background-color .16s cubic-bezier(.4,0,.2,1),
              border-color .16s cubic-bezier(.4,0,.2,1),
              color .16s cubic-bezier(.4,0,.2,1);
  opacity: 1;
}
.btn.btn-sm.btn-brand:hover  { background: var(--brand-hover);  color: var(--brand-foreground); opacity: 1; }
.btn.btn-sm.btn-brand:active { background: var(--brand-active); color: var(--brand-foreground); }
/* 채워진 버튼이라 아이콘도 글자와 같은 색이어야 한다 */
.btn.btn-sm.btn-brand svg { color: currentColor; flex: none; }

/* sir .sir-btn--secondary / --tertiary — 로그인 상태 헤더의 나머지 버튼.
   bch 와 달리 .sir-btn 기본 radius(--r-md = 8px)와 weight 500 을 그대로 쓴다.
   토큰 대응: sir --s1 → --card, --s2 → --muted, --canvas → --background */
.btn.btn-sm.btn-sec,
.btn.btn-sm.btn-ter {
  gap: 8px; padding: 8px 14px; min-height: 40px;
  font-size: 14px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; border-radius: var(--radius-lg);
  transition: background-color .16s cubic-bezier(.4,0,.2,1),
              border-color .16s cubic-bezier(.4,0,.2,1),
              color .16s cubic-bezier(.4,0,.2,1);
  opacity: 1;
}
.btn.btn-sm.btn-sec { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn.btn-sm.btn-sec:hover { background: var(--muted); color: var(--foreground); border-color: var(--ring); opacity: 1; }

/* sir tertiary 는 테두리가 없지만 여기서는 헤더에서 버튼으로 읽히도록 헤어라인을 넣는다 */
.btn.btn-sm.btn-ter { background: var(--background); color: var(--foreground); border-color: var(--border); }
.btn.btn-sm.btn-ter:hover { background: var(--card); color: var(--foreground); border-color: var(--ring); opacity: 1; }

.btn.btn-sm.btn-sec svg,
.btn.btn-sm.btn-ter svg { color: var(--muted-foreground); flex: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.btn-row .right { margin-left: auto; }

/* ═══════════ 폼 ═══════════ */

.form-row { margin-bottom: 1rem; }
.form-row > label, .form-label {
  display: block; margin-bottom: .375rem;
  font-size: var(--text-sm); font-weight: 500; color: var(--foreground);
}
.required::after { content: " *"; color: var(--destructive); }

.input, input[type=text], input[type=password], input[type=email], input[type=url],
input[type=tel], input[type=number], input[type=date], input[type=datetime-local],
input[type=search], select, textarea {
  display: block; width: 100%;
  padding: .5rem .75rem;
  font-size: var(--text-sm); line-height: 1.25rem;
  color: var(--foreground); background: var(--background);
  border: 1px solid var(--input); border-radius: var(--radius-md);
  font-family: inherit; outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 25%, transparent);
}
input:disabled, textarea:disabled, select:disabled {
  background: var(--muted); color: var(--muted-foreground);
}
textarea { min-height: 80px; resize: vertical; }
select { cursor: pointer; }

input[type=checkbox], input[type=radio] {
  display: inline-block; width: 1rem; height: 1rem;
  accent-color: var(--primary); cursor: pointer; vertical-align: -2px;
  padding: 0; margin-right: .25rem;
}

.check-label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--text-sm); color: var(--foreground);
  cursor: pointer; margin-right: 1rem;
}

.hint { font-size: .8125rem; color: var(--muted-foreground); margin-top: .375rem; }
.error-text { font-size: .8125rem; color: var(--destructive); margin-top: .375rem; }

.inline-group { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline-group .input { flex: 1; min-width: 0; }

fieldset {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1rem 1.25rem; margin: 0 0 1rem;
}
legend { padding: 0 .375rem; font-size: var(--text-sm); font-weight: 600; color: var(--muted-foreground); }

/* ═══════════ 테이블 ═══════════ */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.list {
  width: 100%; border-collapse: collapse;
  font-size: var(--text-sm); background: var(--card);
}
table.list thead th {
  padding: .75rem 1rem; text-align: left; white-space: nowrap;
  font-size: var(--text-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}
table.list tbody td {
  padding: .875rem 1rem; border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
table.list tbody tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: var(--muted); }
table.list .num, table.list .center { text-align: center; white-space: nowrap; }
table.list .right { text-align: right; white-space: nowrap; }
table.list th.center { text-align: center; }
table.list th.right { text-align: right; }
table.list .subject { width: 100%; }
table.list .muted { color: var(--muted-foreground); font-size: .8125rem; white-space: nowrap; }

.empty { padding: 4rem 1rem; text-align: center; color: var(--muted-foreground); font-size: var(--text-sm); }

/* ═══════════ 배지 ═══════════ */

.badge {
  display: inline-flex; align-items: center;
  padding: .125rem .5rem; border-radius: var(--radius-full);
  font-size: var(--text-xs); font-weight: 600; line-height: 1.5;
  background: var(--secondary); color: var(--secondary-foreground);
  vertical-align: 1px;
}
.badge-new     { background: var(--primary); color: var(--primary-foreground); }
.badge-notice  { background: var(--danger-subtle); color: var(--danger-subtle-foreground); }
.badge-hot     { background: var(--warning-subtle); color: var(--warning-subtle-foreground); }
.badge-cat     { background: var(--secondary); color: var(--secondary-foreground); }
.badge-secret  { background: var(--muted); color: var(--muted-foreground); }
.badge-level   { background: var(--muted); color: var(--muted-foreground); }
.comment-count { color: var(--muted-foreground); font-weight: 600; font-size: .8125rem; }

/* ═══════════ 페이지네이션 ═══════════ */

.pagination { margin: 1.5rem 0; display: flex; justify-content: center; }
.pagination ul { display: flex; gap: .25rem; flex-wrap: wrap; }
.pagination a, .pagination strong {
  display: grid; place-items: center;
  min-width: 36px; height: 36px; padding: 0 .625rem;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--background); color: var(--muted-foreground);
  font-size: var(--text-sm); font-weight: 500;
}
.pagination a:hover { background: var(--muted); color: var(--foreground); }
.pagination strong { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

/* ═══════════ 검색 · 분류 ═══════════ */

.searchbar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  margin: 1.25rem 0; justify-content: center;
}
.searchbar select { width: auto; min-width: 7rem; }
.searchbar input[type=search], .searchbar input[type=text] { width: auto; flex: 0 1 20rem; }

.category-tabs { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.category-tabs a {
  padding: .375rem .875rem; border-radius: var(--radius-full);
  border: 1px solid var(--border); background: var(--background);
  color: var(--muted-foreground); font-size: var(--text-sm); font-weight: 500;
}
.category-tabs a:hover { background: var(--muted); color: var(--foreground); }
.category-tabs a.on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }

/* 내가 작성한 글 — 유형 버튼 + 검색을 한 줄에 좌측 정렬 */
.posts-filter {
  display: flex; align-items: center; gap: .75rem .5rem;
  flex-wrap: wrap; margin: 1.25rem 0;
}
.posts-filter .category-tabs { margin-bottom: 0; }

/* 탭·입력칸·버튼 세로 크기를 똑같이 (padding .5rem + line-height 1.25rem + 테두리) */
.posts-filter .category-tabs a {
  padding: .5rem .875rem; line-height: 1.25rem;
  border-radius: 6px;
}

/* 안쪽 줄바꿈을 막아야 '검색' 버튼이 입력칸 아래로 떨어지지 않는다 */
.searchbar-left {
  margin: 0; justify-content: flex-start; flex-wrap: nowrap;
  flex: 0 1 auto; min-width: 0;
}
.searchbar-left input[type=search] { flex: 1 1 16rem; min-width: 7rem; }

/* 내가 작성한 글 — 행 높이 50px 고정 (세로 여백 대신 높이로 잡아야 값이 그대로 나온다) */
table.list.posts-list tbody td {
  height: 50px; padding-top: 0; padding-bottom: 0;
}

@media (max-width: 640px) {
  .searchbar-left { flex: 1 1 100%; }
}

/* ═══════════ 게시물 ═══════════ */

.post-head { padding: 1.5rem 1.25rem; border-bottom: 1px solid var(--border); }
.post-head h1 { margin: 0 0 .625rem; font-size: var(--text-xl); line-height: var(--text-xl-lh); }
.post-meta {
  display: flex; flex-wrap: wrap; gap: .25rem 1rem;
  font-size: .8125rem; color: var(--muted-foreground);
}
.post-meta strong { color: var(--foreground); font-weight: 600; }

.post-body {
  padding: 2rem 1.25rem; min-height: 8rem;
  font-size: var(--text-base); line-height: 1.75;
}
.post-body img { border-radius: var(--radius-lg); }
.post-body blockquote {
  margin: 1.25rem 0; padding: .5rem 0 .5rem 1.25rem;
  border-left: 3px solid var(--border); color: var(--muted-foreground);
}
.post-body pre {
  background: var(--muted); padding: 1rem; border-radius: var(--radius-lg);
  overflow-x: auto; font-size: var(--text-sm);
}
.post-body code { background: var(--muted); padding: .125rem .375rem; border-radius: var(--radius-sm); }
.post-body pre code { background: none; padding: 0; }
.post-body table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; }
.post-body th, .post-body td { border: 1px solid var(--border); padding: .625rem; }

.post-files { padding: 1.125rem 1.25rem; border-top: 1px solid var(--border); background: var(--muted); }
.post-files ul { display: grid; gap: .5rem; }
.post-files li { font-size: var(--text-sm); }
.post-files .size { color: var(--muted-foreground); font-size: var(--text-xs); margin-left: .375rem; }

.post-actions {
  display: flex; gap: .5rem; flex-wrap: wrap; align-items: center;
  padding: 1.125rem 1.25rem; border-top: 1px solid var(--border);
}

.vote-row { display: flex; gap: .625rem; justify-content: center; padding: 1.5rem 0; }
.vote-btn {
  display: inline-flex; flex-direction: column; align-items: center; gap: .125rem;
  min-width: 5.5rem; padding: .75rem 1.25rem;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--background); color: var(--muted-foreground);
  cursor: pointer; font-family: inherit; font-size: .8125rem; font-weight: 500;
}
.vote-btn:hover { background: var(--muted); }
.vote-btn .n { font-size: var(--text-lg); font-weight: 700; color: var(--foreground); }
.vote-btn.on { border-color: var(--primary); color: var(--foreground); }

.sibling-nav { border-top: 1px solid var(--border); font-size: var(--text-sm); }
.sibling-nav > div {
  display: flex; gap: .75rem; padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}
.sibling-nav > div:last-child { border-bottom: 0; }
.sibling-nav .dir { color: var(--muted-foreground); flex: none; width: 3.5rem; }
.sibling-nav a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══════════ 댓글 ═══════════ */

.comments { margin-top: 1.25rem; }
.comment { padding: 1.125rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
.comment:last-child { border-bottom: 0; }
.comment.depth-1 { padding-left: 2.75rem; background: var(--muted); }
.comment.depth-2 { padding-left: 4.25rem; background: var(--muted); }
.comment.depth-3 { padding-left: 5.75rem; background: var(--muted); }
.comment.depth-4 { padding-left: 7.25rem; background: var(--muted); }
.comment-head {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  font-size: .8125rem; margin-bottom: .375rem;
}
.comment-head .who { font-weight: 600; color: var(--foreground); }
.comment-head .when { color: var(--muted-foreground); }
.comment-head .acts { margin-left: auto; display: flex; gap: .5rem; }
.comment-head .acts button, .comment-head .acts a {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--muted-foreground); font-size: var(--text-xs); font-family: inherit;
}
.comment-head .acts button:hover, .comment-head .acts a:hover { color: var(--foreground); }
.comment-body { font-size: var(--text-sm); line-height: 1.7; white-space: pre-wrap; }
.comment-form { padding: 1.25rem; border-top: 1px solid var(--border); }

/* ═══════════ 갤러리 ═══════════ */

.gallery-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.gallery-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.gallery-item:hover { box-shadow: 0 10px 30px rgb(0 0 0 / .08); transform: translateY(-2px); }

/* 관리 모드 — 갤러리 카드 위 선택 체크박스 */
.gallery-item { position: relative; }
.gallery-pick {
  position: absolute; top: .5rem; left: .5rem; z-index: 2;
  display: flex; padding: .25rem; border-radius: 5px;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgb(0 0 0 / .2); cursor: pointer;
}
.gallery-pick input { margin: 0; cursor: pointer; }
.gallery-thumb { display: block; aspect-ratio: 4/3; overflow: hidden; background: var(--muted); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb .noimg { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted-foreground); font-size: var(--text-xs); }
.gallery-info { padding: .875rem 1rem; flex: 1; display: flex; flex-direction: column; gap: .375rem; }
.gallery-info .t {
  font-weight: 600; font-size: var(--text-sm); color: var(--foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gallery-info .m { margin-top: auto; font-size: var(--text-xs); color: var(--muted-foreground); display: flex; gap: .625rem; flex-wrap: wrap; }

/* ═══════════ 메인 ═══════════ */


.latest-list li {
  display: flex; align-items: center; gap: .625rem;
  padding: .625rem 0; border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.latest-list li:last-child { border-bottom: 0; }
.latest-list .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.latest-list .d { color: var(--muted-foreground); font-size: var(--text-xs); flex: none; }

/* ═══════════ 인증 화면 ═══════════ */


/* ═══════════ 알림 ═══════════ */

.alert {
  padding: .75rem 1rem; border: 1px solid transparent;
  border-radius: var(--radius-md); font-size: var(--text-sm); margin-bottom: 1.25rem;
  background: var(--muted); color: var(--foreground); border-color: var(--border);
}
.alert-info    { background: var(--info-subtle);    color: var(--info-subtle-foreground);    border-color: var(--info-subtle-border); }
.alert-danger  { background: var(--danger-subtle);  color: var(--danger-subtle-foreground);  border-color: var(--danger-subtle-border); }
.alert-success { background: var(--success-subtle); color: var(--success-subtle-foreground); border-color: var(--success-subtle-border); }

/* 약관 스크롤 박스 — sir .sir-auth-terms 값 */
.terms-box {
  max-height: 160px; overflow-y: auto; margin-bottom: 8px;
  padding: 16px; background: var(--muted);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-size: 13px; line-height: 1.6; color: var(--muted-foreground);
}

.terms-box:focus { outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.terms-box h3 { font-size: var(--text-sm); margin-top: 1rem; color: var(--foreground); }
.terms-box h3:first-child { margin-top: 0; }

.dl { display: grid; grid-template-columns: 7rem 1fr; gap: .5rem 1rem; font-size: var(--text-sm); }
.dl dt { color: var(--muted-foreground); font-weight: 500; }
.dl dd { margin: 0; }

.stat-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.125rem 1.25rem;
}
.stat .k { font-size: var(--text-xs); color: var(--muted-foreground); font-weight: 500; }
.stat .v { font-size: var(--text-2xl); font-weight: 700; letter-spacing: var(--tracking-tight); margin-top: .25rem; }

/* ═══════════ 설문 · FAQ · Q&A ═══════════ */

.poll-result { display: grid; gap: .875rem; }
.poll-bar .poll-label {
  display: flex; justify-content: space-between; gap: .5rem;
  font-size: var(--text-sm); margin-bottom: .375rem;
}
.poll-track { height: 8px; border-radius: var(--radius-full); background: var(--muted); overflow: hidden; }
.poll-track i { display: block; height: 100%; border-radius: var(--radius-full); background: var(--primary); transition: width .3s; }

.poll-choices { display: grid; gap: .5rem; }
.poll-choice {
  display: flex; align-items: center; gap: .625rem;
  padding: .875rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius-lg); cursor: pointer; font-size: var(--text-sm);
}
.poll-choice:hover { background: var(--muted); }
.poll-choice:has(input:checked) { border-color: var(--primary); background: var(--muted); font-weight: 600; }

.faq-list { display: grid; gap: .5rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.faq-q {
  display: flex; align-items: flex-start; gap: .625rem; width: 100%;
  padding: 1rem 1.125rem; border: 0; background: none; cursor: pointer;
  font-family: inherit; font-size: var(--text-sm); font-weight: 600; text-align: left;
  color: var(--foreground); line-height: 1.6;
}
.faq-q:hover { background: var(--muted); }
.faq-q .mark { color: var(--muted-foreground); font-weight: 700; flex: none; }
.faq-q .arrow { margin-left: auto; color: var(--muted-foreground); transition: transform .2s; flex: none; }
.faq-item.open .faq-q .arrow { transform: rotate(180deg); }
.faq-a {
  padding: 1rem 1.125rem 1.25rem 2.5rem; font-size: var(--text-sm); line-height: 1.8;
  border-top: 1px solid var(--border-subtle);
}

.qa-answer {
  border-left: 3px solid var(--primary); background: var(--muted);
  padding: 1.125rem 1.25rem; margin-top: 1.25rem;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.qa-answer .head {
  font-size: .8125rem; color: var(--muted-foreground); margin-bottom: .5rem;
  display: flex; gap: .625rem; flex-wrap: wrap;
}

/* ═══════════ 소셜 로그인 ═══════════ */

.social-login { margin-top: 1.25rem; display: grid; gap: .5rem; }
.social-divider {
  display: flex; align-items: center; gap: .75rem;
  color: var(--muted-foreground); font-size: var(--text-xs); margin-bottom: .375rem;
}
.social-divider::before, .social-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.social-btn {
  display: block; padding: .625rem 1rem; border-radius: var(--radius-md);
  text-align: center; font-size: var(--text-sm); font-weight: 600;
  border: 1px solid transparent;
}
.social-btn:hover { opacity: .9; }
.social-naver  { background: #03c75a; color: #fff; }
.social-kakao  { background: #fee500; color: #191600; }
.social-google { background: #fff; color: #1f1f1f; border-color: var(--border); }
:root[data-theme="dark"] .social-google { background: var(--color-zinc-100); }

/* ═══════════ 언어 · 쪽지 ═══════════ */


.memo-badge {
  display: inline-block; min-width: 1.125rem; padding: 0 .25rem;
  border-radius: var(--radius-full); background: var(--destructive); color: var(--destructive-foreground);
  font-size: .6875rem; font-weight: 700; line-height: 1.5; text-align: center; vertical-align: 2px;
}

/* ═══════════ 푸터 ═══════════ */


/* ═══════════ 팝업 ═══════════ */

.popup-layer {
  position: fixed; z-index: 200;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 20px 50px rgb(0 0 0 / .18);
  overflow: hidden; max-width: calc(100vw - 2rem);
}
.popup-layer .p-body { padding: 1.25rem; overflow: auto; }
.popup-layer .p-foot {
  display: flex; align-items: center; gap: .5rem;
  padding: .625rem .875rem; border-top: 1px solid var(--border);
  background: var(--muted); font-size: var(--text-xs);
}
.popup-layer .p-foot button {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  color: var(--muted-foreground); font-family: inherit; font-size: var(--text-xs);
}

/* ═══════════ 반응형 ═══════════ */

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { --cols: 3 !important; }
}

@media (max-width: 768px) {

  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .gallery-grid { --cols: 2 !important; }

  .page-head h1 { font-size: var(--text-xl); }
  .post-head h1 { font-size: var(--text-lg); }

  .dl { grid-template-columns: 5.5rem 1fr; }
  table.list .hide-sm { display: none; }
  table.list thead th, table.list tbody td { padding: .75rem .625rem; }
  .searchbar input[type=search], .searchbar input[type=text] { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  .gallery-grid { --cols: 1 !important; }
  .comment.depth-1 { padding-left: 1.75rem; }
  .comment.depth-2 { padding-left: 2.5rem; }
  .comment.depth-3, .comment.depth-4 { padding-left: 3.25rem; }
}

@media print {
  .site-header, .site-footer, .sol-tabbar, #top-btn, .post-actions, .comment-form,
  .vote-row, .pagination, .searchbar { display: none !important; }
  body { background: #fff; }
}

/* ═══════════ 글쓰기 첨부파일 목록 ═══════════ */

.file-list { display: flex; flex-direction: column; gap: .5rem; }
.file-list:empty { display: none; }

.file-item {
  display: flex; align-items: center; gap: .625rem; flex-wrap: wrap;
  padding: .5rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm, .375rem);
  background: var(--card);
}
.file-item.is-deleted { opacity: .45; text-decoration: line-through; }

.file-item .file-name {
  flex: 1 1 10rem; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .875rem; font-weight: 500;
}
.file-item .file-size { flex: none; font-size: .75rem; color: var(--muted-foreground); }
.file-item .file-caption { flex: 1 1 12rem; min-width: 0; max-width: 18rem; }

.file-item .file-remove {
  flex: none; display: inline-flex; align-items: center; gap: .25rem;
  padding: .25rem .5rem; border: 0; border-radius: .375rem;
  background: transparent; color: var(--muted-foreground);
  font: inherit; font-size: .8125rem; cursor: pointer;
}
.file-item .file-remove:hover { background: var(--muted); color: var(--destructive); }

.file-add { display: flex; align-items: center; gap: .625rem; margin-top: .5rem; }

/* 에디터가 붙은 자리 — 라이브러리 CSS 위에 테마 경계만 맞춘다 */
.mublo-editor-container {
  border: 1px solid var(--input); border-radius: var(--radius-sm, .375rem); overflow: hidden;
}

/* ═══════════ 사이트 헤더 (project1 sir-hdmain 이식) ═══════════
   원본: /home/project1/www/theme/sir/css/sir.css
   sir 는 다크 우선이라 --canvas/--hair/--ink 를 여기서는 SolCMS 의
   --background/--border/--foreground 로 대응시켰다. 로고 마크의 인디고만
   sir 고유값이라 별도 토큰(--brand)으로 들여왔다. */

:root {
  --brand: #5e6ad2;
  --brand-foreground: #ffffff;
  --brand-hover: #828fff;    /* sir --primary-hover */
  --brand-active: #5e69d1;   /* sir --primary-focus */
  --header-height: 68px;
}

.site-header {
  position: sticky; top: 0; z-index: 900;
  background: color-mix(in srgb, var(--background) 84%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.site-header .hd-main {
  display: flex; align-items: center;
  height: var(--header-height); gap: 1.5rem;
}

/* ── 로고 ── */
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand .mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-lg);   /* sir --r-md = 8px */
  background: var(--brand); color: var(--brand-foreground);
  font-weight: 700; font-size: 16px; line-height: 1;
}
.brand .wordmark {
  font-size: 22px; font-weight: 600;
  letter-spacing: -.4px; color: var(--foreground); line-height: 1;
}
.brand:hover { color: var(--foreground); }

/* ── GNB (헤더 안에 들어간다) ── */
.gnb { flex: 1 1 auto; min-width: 0; }
.gnb-1d { display: flex; align-items: center; gap: 2px; }
.gnb-1li { position: relative; }
.gnb-1a {
  display: block; padding: 8px 13px; border-radius: var(--radius-lg);   /* sir --r-md = 8px */
  font-size: 14px; font-weight: 500; color: var(--muted-foreground); white-space: nowrap;
  transition: background-color .16s cubic-bezier(.4,0,.2,1), color .16s cubic-bezier(.4,0,.2,1);
}
.gnb-1li:hover > .gnb-1a { color: var(--foreground); background: var(--muted); }
.gnb-1li.is-active > .gnb-1a { color: var(--foreground); font-weight: 600; }

.gnb-2d {
  position: absolute; top: 100%; left: -14px; z-index: 50;
  min-width: 208px; padding: 10px; margin-top: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); box-shadow: 0 10px 30px rgb(0 0 0 / .08);   /* sir --r-lg = 12px */
  opacity: 0; visibility: hidden; transform: translateY(-2px);
  transition: opacity .16s cubic-bezier(.4,0,.2,1), transform .16s cubic-bezier(.4,0,.2,1), visibility .16s;
}
.gnb-1li:hover > .gnb-2d, .gnb-1li:focus-within > .gnb-2d {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.gnb-2d a {
  display: block; padding: 10px 12px; font-size: 14px;
  color: var(--muted-foreground); border-radius: var(--radius-lg);
}
.gnb-2d a:hover, .gnb-2d a:focus { background: var(--muted); color: var(--foreground); }

/* ── 도구줄 ── */
.hd-tools { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; margin-left: auto; }

/* sir .sir-search-btn 그대로 — 값 하나까지 원본과 맞춘다 */
.hd-search {
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 14px;
  background: var(--card); color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);   /* sir --r-lg = 12px */
  font-family: var(--font-sans); font-size: 14px; cursor: pointer;
  transition: border-color .16s cubic-bezier(.4,0,.2,1);
}
.hd-search:hover, .hd-search:focus-visible { border-color: var(--ring); color: var(--muted-foreground); }
.hd-search svg { flex: none; }
.hd-search .kbd {
  margin-left: 14px; flex: none;
  font-family: var(--font-mono); background: var(--muted); color: var(--muted-foreground);
  border-radius: 4px; padding: 3px 6px; font-size: 11px; font-weight: 600; line-height: 1.3;
}
/* 드로어 안에서는 전체 폭 (sir .drawer-search .sir-search-btn) */
.drawer-search .hd-search { justify-content: flex-start; }

/* 도구줄 버튼 높이는 35px 로 통일한다 (.btn.btn-sm.btn-* 의 min-height:40px 을 덮는다) */
.hd-tools .hd-search,
.hd-tools .btn.btn-sm {
  height: 35px; min-height: 35px;
  padding-top: 0; padding-bottom: 0;
}
.hd-tools .theme-group { height: 35px; }
.hd-tools .theme-opt { height: 27px; }

.hd-user { display: flex; align-items: center; gap: 10px; }
.hd-user .btn { font-size: 12px; font-weight: 500; }

/* ── 테마 세그먼트 (시스템 / 라이트 / 다크) ── */
.theme-group {
  display: flex; align-items: center; gap: 2px; padding: 3px; flex: 0 0 auto;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-xl);
}
.theme-opt {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; border-radius: var(--radius-lg);
  color: var(--muted-foreground); cursor: pointer;
  transition: background-color .16s cubic-bezier(.4,0,.2,1), color .16s cubic-bezier(.4,0,.2,1);
}
.theme-opt:hover { color: var(--foreground); }
.theme-opt[aria-pressed="true"] { background: var(--card); color: var(--foreground); }

/* ── 좁은 화면 ── */



/* ═══════════ 모바일 (sir sir-drawer / sir-modal / sir-chips 이식) ═══════════ */

/* 화면에서만 숨기고 스크린리더에는 남긴다 */
.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;
}

/* 헤더의 아이콘 버튼 — sir .mhd-btn */
.mhd-btn {
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted-foreground);
  border-radius: var(--radius-lg); cursor: pointer;
  transition: background-color .16s cubic-bezier(.4,0,.2,1), color .16s cubic-bezier(.4,0,.2,1);
}
.mhd-btn:hover, .mhd-btn:focus { background: var(--muted); color: var(--foreground); }

/* 좁은 화면 전용 — .mhd-btn 의 display:flex 를 덮어야 하므로 반드시 뒤에 온다 */
.mob-only { display: none; }

/* 배경 스크롤 잠금 */
body.drawer-open { overflow: hidden; }

/* ── 드로어 ── */
.sol-drawer { position: fixed; inset: 0; z-index: 1000; display: none; }
.sol-drawer.is-open { display: block; }

.drawer-backdrop {
  position: absolute; inset: 0; background: #000;
  opacity: 0; transition: opacity .16s cubic-bezier(.4,0,.2,1);
}
.sol-drawer.is-open .drawer-backdrop { opacity: .6; }

.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--card); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
  padding-top: calc(16px + env(safe-area-inset-top));
  transform: translateX(100%);
  transition: transform .16s cubic-bezier(.4,0,.2,1);
  box-shadow: -16px 0 40px rgb(0 0 0 / .4);
}
.sol-drawer.is-open .drawer-panel { transform: translateX(0); }

.drawer-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--border); flex: 0 0 auto;
}
.drawer-hd .brand { margin-right: auto; }
.drawer-hd .mhd-btn { width: 34px; height: 34px; }

.drawer-body {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px;
}
.drawer-auth { display: flex; gap: 8px; }
.drawer-auth .btn { flex: 1 1 0; min-height: 44px; }
.drawer-search .hd-search { width: 100%; height: 44px; background: var(--muted); }

.drawer-nav { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.drawer-row { display: flex; align-items: center; min-height: 48px; border-radius: var(--radius-xl); }
.drawer-row > a {
  flex: 1 1 auto; min-height: 48px; display: flex; align-items: center;
  padding: 0 12px; font-size: 15px; font-weight: 500; color: var(--foreground);
}
.drawer-nav > li.is-open > .drawer-row, .drawer-row:hover { background: var(--muted); }
.drawer-nav > li.is-open > .drawer-row > a { color: var(--brand); font-weight: 600; }

.drawer-toggle {
  flex: 0 0 auto; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; color: var(--muted-foreground); cursor: pointer;
  transition: transform .16s cubic-bezier(.4,0,.2,1), color .16s cubic-bezier(.4,0,.2,1);
}
.drawer-nav > li.is-open .drawer-toggle { color: var(--brand); transform: rotate(180deg); }

.drawer-sub { display: none; padding: 2px 0 4px; }
.drawer-nav > li.is-open .drawer-sub { display: block; }
.drawer-sub a {
  display: flex; align-items: center; min-height: 40px;
  padding: 8px 12px 8px 30px; border-radius: var(--radius-xl);
  font-size: 14px; color: var(--muted-foreground);
}
.drawer-sub a:hover, .drawer-sub a:focus { color: var(--foreground); background: var(--muted); }

.drawer-util {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.drawer-util-label { font-size: 13px; font-weight: 500; color: var(--muted-foreground); }

/* ── 검색 모달 ── */
.sol-modal { position: fixed; inset: 0; z-index: 1100; display: none; }
.sol-modal.is-open { display: block; }

.modal-backdrop {
  position: absolute; inset: 0; background: #000;
  opacity: 0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: opacity .16s cubic-bezier(.4,0,.2,1);
}
.sol-modal.is-open .modal-backdrop { opacity: .6; }

/* 한 장의 카드 안에 줄을 나눠 쌓는다 — 안쪽 여백 대신 구역마다 경계선 */
.modal-panel {
  position: relative; margin: 13vh auto 0;
  max-width: 600px; width: calc(100% - 32px);
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 0; overflow: hidden;
  box-shadow: 0 20px 60px rgb(0 0 0 / .4);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .16s cubic-bezier(.4,0,.2,1), transform .16s cubic-bezier(.4,0,.2,1);
}
.sol-modal.is-open .modal-panel { opacity: 1; transform: translateY(0); }

/* 입력줄 */
.modal-field {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: transparent; border-radius: 0;
}
.modal-field > svg { flex: 0 0 auto; color: var(--muted-foreground); }
.modal-field:focus-within > svg { color: var(--brand); }
.modal-field input[type=text] {
  flex: 1 1 auto; min-width: 0; height: auto; padding: 0;
  border: 0; background: transparent; outline: 0; box-shadow: none;
  color: var(--foreground); font-size: 15px; font-weight: 500; line-height: 1.6;
}
.modal-field input:focus { border: 0; box-shadow: none; }

.modal-clear, .modal-x {
  flex: 0 0 auto; display: none; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  background: none; border: 0; color: var(--muted-foreground);
  border-radius: 6px; cursor: pointer;
  transition: color .16s, background-color .16s;
}
.modal-x { display: flex; width: 30px; height: 30px; }
.modal-clear:hover, .modal-x:hover { color: var(--foreground); background: var(--muted); }
.modal-field input:not(:placeholder-shown) ~ .modal-clear { display: flex; }

/* 고급 검색 */
.modal-adv { padding: 10px 20px; border-bottom: 1px solid var(--border); }
.modal-adv-t {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; background: none; border: 0;
  font-size: 12px; color: var(--muted-foreground); cursor: pointer;
}
.modal-adv-t:hover { color: var(--foreground); }
.modal-adv-caret { display: inline-block; transition: transform .16s cubic-bezier(.4,0,.2,1); }
.modal-adv.is-open .modal-adv-caret { transform: rotate(90deg); }
.modal-adv-body { margin-top: 10px; }
.modal-adv-body .modal-sec-t { margin: 0 0 6px; }
.modal-adv-body .modal-chips + .modal-sec-t { margin-top: 12px; }

.modal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-chip {
  padding: 4px 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted-foreground); font-size: 12px; font-weight: 400; line-height: 1.6;
  font-family: inherit; cursor: pointer;
  transition: background-color .16s, border-color .16s, color .16s;
}
.modal-chip:hover { background: var(--muted); color: var(--foreground); }
.modal-chip.on {
  background: var(--brand); border-color: var(--brand); color: var(--brand-foreground);
}
.modal-chip:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }

/* 구역 (최근 검색 · 추천 검색어) */
.modal-sec { padding: 10px 20px 14px; border-bottom: 1px solid var(--border); }
.modal-sec-t {
  margin-bottom: 6px;
  font-size: 11px; font-weight: 400; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted-foreground);
}
.modal-sec ul { list-style: none; margin: 0; padding: 0; }

/* 최근 검색 — 한 줄씩, 오른쪽에 지우기 */
.modal-recent-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 6px;
}
.modal-recent-list li:hover { background: var(--muted); }
.modal-recent-list a {
  flex: 1 1 auto; min-width: 0; padding: 6px 8px;
  font-size: 13px; color: var(--muted-foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.modal-recent-list li:hover a { color: var(--foreground); }
.modal-recent-del {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; margin-right: 4px; padding: 0;
  font-size: 14px; line-height: 1;
  background: none; border: 0; border-radius: 4px;
  color: var(--muted-foreground); cursor: pointer;
}
.modal-recent-del:hover { color: var(--foreground); background: var(--background); }

/* 추천 검색어 — 칩 */
.modal-pop ul { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-pop a {
  display: inline-flex; align-items: center; padding: 4px 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 6px;
  color: var(--muted-foreground); font-size: 12px; font-weight: 400; line-height: 1.6;
}
.modal-pop a:hover, .modal-pop a:focus {
  background: var(--muted); border-color: var(--ring); color: var(--foreground);
}

/* 아래 안내 */
.modal-hint {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  margin: 0; padding: 10px 20px;
  font-size: 12px; line-height: 1.4; color: var(--muted-foreground);
}
.modal-hint kbd {
  display: inline-block; padding: 2px 6px;
  font-family: inherit; font-size: 11px; line-height: 1.4;
  background: var(--muted); border: 1px solid var(--border);
  border-radius: 4px; color: var(--foreground);
}
.modal-hint b { color: var(--foreground); font-weight: 500; }

@media (max-width: 768px) {
  .mob-only { display: flex; }
  .gnb, .hd-tools { display: none; }
  .site-header .hd-main { height: 56px; gap: 4px; }
  .site-header .brand { margin-right: auto; }
  .site-header { border-bottom: 0; }
  .brand .wordmark { font-size: 19px; }
  .modal-field input[type=text] { font-size: 16px; }
  .modal-hint { justify-content: flex-start; }
}

/* ═══════════ 푸터 (sir sir_footer.php 이식) ═══════════
   sir 푸터는 가운데 정렬된 링크 한 줄이 전부다.
   저작권·통계·언어는 sir 가 사업자정보용으로 남겨 둔 보조 줄에 얹었다. */

.site-footer {
  background: var(--background); border-top: 1px solid var(--border);
  margin-top: 48px; position: relative;
}
.ft-links {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px 16px; padding: 24px 0;
}
.ft-links a { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }
.ft-links a:hover, .ft-links a:focus { color: var(--foreground); text-decoration: underline; }
.ft-links .sep { color: var(--muted-foreground); opacity: .5; font-size: 14px; line-height: 1.5; user-select: none; }

.ft-biz {
  margin: 0 0 24px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 12px; line-height: 1.6; color: var(--muted-foreground); text-align: center;
}
.ft-biz p { margin: 0; }
.ft-biz .ft-stats { margin-left: 8px; opacity: .8; }

.ft-biz .lang-switch {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-bottom: 6px;
}
.ft-biz .lang-switch a { padding: 2px 8px; border-radius: 4px; color: var(--muted-foreground); }
.ft-biz .lang-switch a.on { background: var(--primary); color: var(--primary-foreground); }

/* ── 상단으로 ── */
#top-btn {
  position: fixed; right: 24px; bottom: 24px; z-index: 800;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--radius-lg);
  background: var(--muted); color: var(--foreground);
  border: 1px solid var(--ring); cursor: pointer;
  opacity: 0; visibility: hidden;
  transition: opacity .16s cubic-bezier(.4,0,.2,1), visibility .16s;
}
#top-btn.is-on { opacity: 1; visibility: visible; }
#top-btn:hover { background: var(--card); }

/* ── 모바일 하단 탭바 ── */
.sol-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 850;
  display: none; grid-template-columns: repeat(5, 1fr);
  background: var(--card); border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.sol-tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; font-size: 11px; color: var(--muted-foreground);
}
.sol-tabbar a.is-active { color: var(--foreground); font-weight: 500; }
.sol-tabbar a.is-active svg { color: var(--brand); }

@media (max-width: 768px) {
  .sol-tabbar { display: grid; }
  body.has-tabbar { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  /* 탭바에 가리지 않도록 상단버튼을 올린다 */
  #top-btn { bottom: calc(56px + 16px + env(safe-area-inset-bottom)); right: 16px; }
}
@media (max-width: 400px) {
  .sol-tabbar a { font-size: 10px; }
}

/* 나머지 인증 계열 화면(비밀번호 찾기·확인·탈퇴 등)이 쓰는 기존 레이아웃.
   로그인만 sir 구조로 바꿨으므로 이 규칙은 그대로 남겨 둔다. */
.auth-wrap { max-width: 26rem; margin: 3rem auto; }
.auth-wrap .card-body { padding: 2rem; }
.auth-wrap h1 { font-size: var(--text-xl); text-align: center; margin-bottom: 1.5rem; }
.auth-links {
  display: flex; justify-content: center; gap: .75rem;
  margin-top: 1.25rem; font-size: var(--text-sm); color: var(--muted-foreground);
}

/* ═══════════ 로그인·회원 인증 카드 (sir login.skin.php 이식) ═══════════ */

.auth { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 48px 0; }

.auth-card {
  width: 100%; max-width: 420px; position: relative;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 32px;
}
/* sir 카드 상단의 얇은 하이라이트 선 */
.auth-card::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: 0;
  height: 1px; background: var(--ring); opacity: .5;
}

.auth-brand { justify-content: center; margin-bottom: 24px; }

.auth-title {
  margin: 0; font-size: 20px; font-weight: 600; line-height: 1.4;
  letter-spacing: -.2px; color: var(--foreground); text-align: center;
}
.auth-lead {
  margin: 8px 0 24px; font-size: 14px; line-height: 1.5;
  color: var(--muted-foreground); text-align: center;
}

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.field input[type=text], .field input[type=password], .field input[type=email] {
  width: 100%; height: 44px; padding: 8px 12px;
  background: var(--muted); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  font-size: 16px; letter-spacing: -.05px;
}
.field input::placeholder { color: var(--muted-foreground); opacity: .7; }
.field input:focus {
  border-color: var(--ring);
  outline: 2px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 0;
  box-shadow: none;
}

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 0 0 24px;
}
.check {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  font-size: 14px; color: var(--muted-foreground); cursor: pointer;
}
.check input { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }

.auth-find { font-size: 13px; color: var(--muted-foreground); }
.auth-find:hover { color: var(--foreground); text-decoration: underline; }

.auth-submit { width: 100%; min-height: 44px; }

.auth-foot {
  margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 14px; color: var(--muted-foreground); text-align: center;
}
.auth-foot a { color: var(--brand); font-weight: 500; margin-left: 4px; }
.auth-foot a:hover { color: var(--brand); text-decoration: underline; }

/* 소셜 로그인 — sir 는 카드 안에서 세로로 쌓는다 */
.auth-card .social-login { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.auth-card .social-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 500;
}

/* 회원가입 — 단계 표시 · 약관 블록 · 전체 동의 (sir register.skin.php) */
.auth-wide { max-width: 480px; }

.steps {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  margin: 0 0 24px; padding: 0; list-style: none;
}
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); }
.steps li span {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: var(--radius-full);
  background: var(--muted); color: var(--muted-foreground);
  font-size: 12px; font-weight: 600;
}
.steps li.is-on { color: var(--foreground); }
.steps li.is-on span { background: var(--brand); color: var(--brand-foreground); }

.terms-block { margin-bottom: 24px; }
.terms-block h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--foreground); }
.terms-block h2 em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--brand); }

.check-all {
  width: 100%; justify-content: center; margin-bottom: 16px; padding: 8px;
  background: var(--muted); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.check-all span { font-weight: 500; color: var(--foreground); }

@media (max-width: 480px) {
  .auth { padding: 24px 0; }
  .auth-card { padding: 24px; }
}

/* ═══════════ 프로모션 캐러셀 (sir home-promo 이식) ═══════════
   원본: /home/project1/www/theme/sir/css/sir.css (.home-promo 계열)
   sir --r-xl 은 16px 로 SolCMS 반경 스케일에 없는 값이라 숫자로 적는다. */

.promo { --promo-dur: 260ms; padding-top: 32px; margin-bottom: 32px; }

.promo-viewport {
  position: relative; overflow: hidden;
  border-radius: 16px;                        /* sir --r-xl */
  background: var(--card); border: 1px solid var(--border);
}
.promo-viewport::before {
  content: ""; position: absolute; left: 16px; right: 16px; top: 0;
  height: 1px; background: var(--ring); opacity: .5; z-index: 1;
}

.promo-track {
  display: flex; margin: 0; padding: 0;
  transition: transform var(--promo-dur) cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.promo-slide {
  flex: 0 0 100%; min-width: 0;
  display: flex; align-items: center; gap: 32px;
  padding: 32px 48px;
}
.promo.has-dots .promo-slide { padding-bottom: 64px; }

.promo-media {
  flex: 0 0 240px; display: block; overflow: hidden;
  border-radius: var(--radius-xl); background: var(--muted); border: 1px solid var(--border);
}
.promo-media img { display: block; width: 100%; height: auto; }

/* 좌우로 30px 씩 들여 폭을 줄인다 — 화살표와 겹치던 첫 글자도 함께 비켜난다 */
.promo-body { flex: 1 1 auto; min-width: 0; margin-left: 30px; margin-right: 30px; }

.promo-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 10px; margin-bottom: 12px;
  border-radius: var(--radius-full); background: var(--muted); border: 1px solid var(--ring);
  color: var(--muted-foreground); font-size: 11px; font-weight: 500;
}
.promo-title {
  margin: 0 0 8px; font-size: 28px; font-weight: 600;
  line-height: 1.2; letter-spacing: -.6px; color: var(--foreground);
}
.promo-desc {
  margin: 0 0 24px; font-size: 16px; line-height: 1.5;
  color: var(--muted-foreground); max-width: 52ch;
}
.promo-cta { min-height: 44px; }

.promo-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  background: var(--muted); color: var(--muted-foreground);
  border: 1px solid var(--ring); border-radius: var(--radius-full); cursor: pointer;
  transition: background-color .16s cubic-bezier(.4,0,.2,1), color .16s cubic-bezier(.4,0,.2,1);
}
.promo-nav:hover { background: var(--card); color: var(--foreground); }
.promo-prev { left: 16px; }
.promo-next { right: 16px; }

.promo-dots {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 4px 6px; background: var(--muted);
  border: 1px solid var(--ring); border-radius: var(--radius-full);
}
.promo-dots button {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; border-radius: var(--radius-full);
}
.promo-dots button::after {
  content: ""; width: 6px; height: 6px; border-radius: var(--radius-full);
  background: var(--ring); transition: background-color .16s cubic-bezier(.4,0,.2,1);
}
.promo-dots button:hover::after { background: var(--muted-foreground); }
.promo-dots button.is-active::after { background: var(--brand); }

@media (max-width: 1024px) {
  .promo-slide { padding: 24px 32px; gap: 24px; }
  .promo.has-dots .promo-slide { padding-bottom: 48px; }
  .promo-media { flex-basis: 180px; }
  .promo-title { font-size: 24px; letter-spacing: -.4px; }
}
@media (max-width: 768px) {
  .promo-slide { flex-direction: column; align-items: flex-start; padding: 24px 16px; }
  .promo.has-dots .promo-slide { padding-bottom: 56px; }
  .promo-media { flex-basis: auto; width: 100%; }
  .promo-title { font-size: 20px; letter-spacing: -.2px; }
  .promo-desc { font-size: 15px; margin-bottom: 16px; }
  .promo-body { margin-left: 0; margin-right: 0; }   /* 좁은 화면은 원래 여백 유지 */
  .promo-nav { display: none; }   /* 모바일은 스와이프 + 점으로 */
  .promo-cta { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .promo-track { transition: none; }
}

/* ── 주소 검색 (카카오 우편번호) ──────────────────────────
   위젯이 흰 배경으로 그려지므로 다크 테마에서도 바탕을 흰색으로 둔다. */
.addr-box {
  position: relative;
  height: 420px; margin: 0 0 .4rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: #fff;
}
.addr-box-embed { width: 100%; height: 100%; }
.addr-box-close {
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 28px; height: 28px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #d4d4d8; border-radius: 6px;
  background: #fff; color: #52525b; cursor: pointer; line-height: 1;
}
.addr-box-close:hover { background: #f4f4f5; color: #18181b; }

/* ── 자동등록방지 (캡챠) ──────────────────────────────── */
.captcha-box { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.captcha-img {
  display: block; width: 160px; height: 50px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: #f5f5f7;
}
.captcha-input { flex: 1 1 8rem; min-width: 0; max-width: 12rem; letter-spacing: .12em; text-transform: uppercase; }
.captcha-row .g-recaptcha { margin-top: .25rem; }

/* 목록 하단 작업줄 — 새글모음 선택 삭제 */
.list-foot {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding: .875rem 1rem; border-top: 1px solid var(--border);
}
.list-foot .hint { margin: 0; }

/* ═══════════ 본문 원본이미지 ═══════════ */

.img-original { display: inline-block; cursor: zoom-in; }

.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 3.5rem;
  background: rgb(0 0 0 / .82);
}
/* display:flex 가 브라우저 기본 [hidden] 규칙을 이겨서 닫아도 사라지지 않는다.
   숨김을 여기서 다시 못박는다. */
.lightbox[hidden] { display: none; }
.lightbox-body { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox-body img {
  max-width: 100%; max-height: calc(100vh - 6rem);
  object-fit: contain; border-radius: var(--radius);
}
.lightbox-body figcaption {
  margin-top: .6rem; color: #e5e7eb; font-size: var(--text-sm);
}
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; line-height: 1;
  color: #fff; background: rgb(255 255 255 / .12);
  border: 0; border-radius: var(--radius-full); cursor: pointer;
}
.lightbox-close:hover { background: rgb(255 255 255 / .24); }
.lightbox-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 이전 / 다음 */
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 3rem; height: 3rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1;
  color: #fff; background: rgb(255 255 255 / .12);
  border: 0; border-radius: 6px; cursor: pointer;
}
.lightbox-nav:hover { background: rgb(255 255 255 / .24); }
.lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox-prev { left: .5rem; }
.lightbox-next { right: .5rem; }

.lightbox-count {
  margin: .35rem 0 0; color: #9ca3af; font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}

/* 좁은 화면에서는 화살표가 사진을 덮는다. 아래쪽으로 내려 사진을 가리지 않게 한다. */
@media (max-width: 640px) {
  .lightbox { padding: 3.5rem .75rem 4.5rem; }
  .lightbox-nav {
    top: auto; bottom: .75rem; transform: none;
    width: 2.75rem; height: 2.75rem; font-size: 1.5rem;
  }
  .lightbox-prev { left: 25%; }
  .lightbox-next { right: 25%; }
}

/* 비밀번호 찾기 — 방법 선택 탭 */
.auth-tabs { justify-content: center; margin-bottom: 1.1rem; }
.auth-tabs a { border-radius: 6px; }

/* ═══════════ 태그 ═══════════ */

.post-tags {
  display: flex; flex-wrap: wrap; gap: .4rem;
  list-style: none; margin: 0; padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.post-tags a {
  display: inline-flex; align-items: center; padding: .25rem .6rem;
  background: var(--muted); color: var(--muted-foreground);
  border-radius: 6px; font-size: var(--text-sm);
}
.post-tags a:hover { background: var(--secondary); color: var(--foreground); }

/* 글쓰기 태그 입력 */
.tag-field {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
  padding: .35rem .5rem;
  background: var(--background); border: 1px solid var(--input);
  border-radius: var(--radius-md);
}
.tag-field:focus-within { border-color: var(--ring); }
.tag-list { display: contents; list-style: none; margin: 0; padding: 0; }
.tag-chip {
  display: inline-flex; align-items: center; gap: .15rem;
  padding: .15rem .2rem .15rem .5rem;
  background: var(--muted); border-radius: 6px;
  font-size: var(--text-sm); color: var(--foreground);
}
.tag-chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; padding: 0;
  font-size: 1rem; line-height: 1;
  background: none; border: 0; border-radius: 4px;
  color: var(--muted-foreground); cursor: pointer;
}
.tag-chip-x:hover { color: var(--destructive); background: var(--background); }
.tag-field input[data-tag-input] {
  flex: 1 1 8rem; min-width: 6rem; width: auto;
  padding: .25rem 0; border: 0; background: transparent; box-shadow: none;
}
.tag-field input[data-tag-input]:focus { border: 0; box-shadow: none; }
.tag-field input[data-tag-input]:disabled { background: transparent; }

/* ═══════════ 통합검색 ═══════════ */

.search-page { width: 100%; margin: 0 auto; }

/* 큰 입력칸 하나. 버튼 없이 Enter 로 실행한다 */
.search-hero { margin-bottom: 1rem; }
/* 전역 input 규칙(input[type=search])보다 특정도가 높아야 여백이 먹는다 */
input[type=search].search-hero-input {
  /* 높이를 값으로 못박는다 — 글꼴이 바뀌어도 56px 를 유지한다 */
  box-sizing: border-box;
  width: 100%; height: 56px; padding: 0 20px;
  font-size: 16px; line-height: 1.6;
  color: var(--foreground); background: var(--card);
  border: 1px solid var(--border); border-radius: 12px;
}
input[type=search].search-hero-input:focus { border-color: var(--ring); box-shadow: none; }

.search-info {
  margin: 1rem 0; text-align: center;
  font-size: var(--text-sm); color: var(--muted-foreground);
}
.search-info b { color: var(--brand); font-weight: 600; }

/* 게시판 · 정렬 칩 */
.search-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 60px 0 .5rem; }
/* 이어지는 줄(정렬)은 첫 줄만큼 띄우지 않고 20px 만 둔다 */
.search-tabs + .search-tabs { margin-top: 20px; }
.search-sorts { margin-bottom: 1.25rem; }
.search-tab {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: 6px 14px;
  font-size: 13px; font-weight: 600; line-height: 1.7;
  color: var(--muted-foreground); background: transparent;
  border: 1px solid var(--border); border-radius: 8px;
}
.search-tab span { font-weight: 400; opacity: .8; }
.search-tab:hover { background: var(--muted); color: var(--foreground); }
.search-tab.on {
  background: var(--brand); border-color: var(--brand); color: var(--brand-foreground);
}
.search-tab.on:hover { color: var(--brand-foreground); }
/* 결과가 없는 게시판 — 눌러 볼 수는 있지만 한눈에 구분되게 흐리게 */
.search-tab.is-empty { opacity: .5; }
.search-tab.is-empty:hover { opacity: 1; }

/* 결과 0건 — 카드 없이 가운데로 (youngsam.net search-empty) */
.search-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted-foreground);
}
.search-empty h3 {
  margin: 0 0 8px;
  font-size: 18px; font-weight: 400; line-height: 1.7;
  color: var(--foreground);
}
.search-empty p { margin: 0; font-size: 14px; line-height: 1.7; }
.search-empty p.search-empty-hint { margin-top: 8px; font-size: 13px; }
/* 눌러 볼 만한 다른 검색어 */
.search-suggestions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-top: 16px;
}

/* 결과 한 건 = 카드 하나 (제목만이 아니라 카드 전체가 링크다) */
.search-hit {
  display: block; padding: 16px 20px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  color: inherit;
  transition: border-color .16s ease, background-color .16s ease;
}
.search-hit:hover { border-color: var(--ring); background: var(--muted); color: inherit; }

.search-hit-meta {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px; font-size: 12px; color: var(--muted-foreground);
}
.search-hit-badge {
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 700;
  color: var(--foreground); background: var(--muted);
}
.search-hit-date { margin-left: auto; }

.search-hit-title {
  margin-bottom: 4px;
  font-size: 15px; font-weight: 700; line-height: 1.45; color: var(--foreground);
}
.search-hit-excerpt {
  font-size: 13px; line-height: 1.6; color: var(--muted-foreground);
  overflow-wrap: anywhere;
}
.search-hit-excerpt mark {
  padding: 0 1px; border-radius: 2px;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  color: var(--brand); font-weight: 600;
}

@media (max-width: 640px) {
  .search-hit-date { margin-left: 0; }
}

/* ═══════════ 게시판 카드형 목록 (youngsam.net /news · /community) ═══════════
   news · community 두 스킨이 함께 쓴다. 값은 원본 페이지에서 실측해 옮겼다. */

/* ── 머리말: 영문 라벨 · 제목 · 한 줄 설명 ── */
.bd-head { padding: 56px 0 24px; text-align: center; }
.bd-label {
  margin: 0 0 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--brand); text-transform: uppercase;
}
.bd-title { margin: 0 0 8px; font-size: 30px; font-weight: 700; line-height: 1.7; }
.bd-desc  { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.7; color: var(--muted-foreground); }

/* ── 분류 칩 ── */
.bd-filters {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; margin: 0 0 20px;
}
.bd-filter {
  display: inline-flex; align-items: center;
  padding: 6px 14px;
  font-size: 13px; font-weight: 600; line-height: 1.7;
  color: var(--muted-foreground); background: transparent;
  border: 1px solid var(--border); border-radius: 7px;
}
.bd-filter:hover { background: var(--muted); color: var(--foreground); }
.bd-filter.on {
  background: var(--brand); border-color: var(--brand); color: var(--brand-foreground);
}
.bd-filter.on:hover { color: var(--brand-foreground); }

/* ── 건수 · 정렬 · 검색 줄 ── */
.bd-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; margin: 0 0 16px;
}
.bd-toolbar-l, .bd-toolbar-r { display: flex; align-items: center; gap: 8px; }
.bd-count { font-size: 13px; color: var(--muted-foreground); }
.bd-count strong { font-weight: 700; color: var(--foreground); }

.bd-sorts { display: flex; gap: 2px; }
.bd-sort {
  padding: 3px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 600; line-height: 1.7;
  color: var(--muted-foreground); background: transparent;
}
.bd-sort:hover { color: var(--foreground); }
.bd-sort.on {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}

/* 아이콘 하나 + 입력칸 하나짜리 검색 상자 */
.bd-search {
  display: flex; align-items: center; gap: 6px;
  width: 220px; padding: 7px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
}
.bd-search > svg { flex: none; color: var(--muted-foreground); }
.bd-search:focus-within { border-color: var(--ring); }
/* 전역 input[type=search] 규칙보다 특정도가 높아야 테두리가 사라진다 */
.bd-search input[type=search] {
  flex: 1 1 auto; min-width: 0; height: auto; padding: 0;
  font-size: 13px; line-height: 1.7; color: var(--foreground);
  background: transparent; border: 0; box-shadow: none; outline: 0;
}
.bd-write { flex: none; }

/* ── 분류·상태 꼬리표 ── */
.bd-tag {
  display: inline-block; flex: none;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11px; font-weight: 700; line-height: 1.7;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.bd-tag-green  { color: #22c08a; background: color-mix(in srgb, #22c08a 12%, transparent); }
.bd-tag-orange { color: #d98315; background: color-mix(in srgb, #d98315 12%, transparent); }
.bd-tag-red    { color: #ef4444; background: color-mix(in srgb, #ef4444 12%, transparent); }
:root:not([data-theme=light]) .bd-tag-green { color: #63e6be; }
:root:not([data-theme=light]) .bd-tag-orange { color: #ffa94d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .bd-tag-green  { color: #63e6be; }
  :root:not([data-theme=light]) .bd-tag-orange { color: #ffa94d; }
}
:root[data-theme=dark] .bd-tag-green  { color: #63e6be; }
:root[data-theme=dark] .bd-tag-orange { color: #ffa94d; }

/* ── 카드 목록 공통 ── */
.bd-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }

.bd-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 18px 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  color: inherit;
  transition: border-color .18s cubic-bezier(.4,0,.2,1), background-color .18s cubic-bezier(.4,0,.2,1);
}
.bd-item:hover { border-color: var(--ring); background: var(--muted); color: inherit; }
/* 카드 테두리 안에서 링크가 차지하는 영역. 체크박스는 이 밖에 있어야 눌러도 글로 안 넘어간다 */
.bd-item-body {
  flex: 1 1 auto; min-width: 0;
  display: flex; align-items: flex-start; gap: 16px;
  color: inherit;
}
.bd-item-body:hover { color: inherit; }
/* 관리 모드 체크박스 — 첫 줄 높이에 맞춰 세운다 */
.bd-row-check { flex: none; margin-top: 3px; }
.bd-item.is-notice { background: color-mix(in srgb, var(--brand) 5%, var(--card)); }
.bd-info { flex: 1 1 auto; min-width: 0; }
.bd-item-title {
  margin-bottom: 4px;
  font-size: 15px; font-weight: 700; line-height: 1.7; color: var(--foreground);
  overflow-wrap: anywhere;
}
.bd-item-desc {
  font-size: 13px; font-weight: 300; line-height: 1.6; color: var(--muted-foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ── news 스킨: 왼쪽 날짜 + 분류 + 제목 + 발췌 ── */
/* 날짜는 카드 오른쪽 끝 (bd-info 가 남는 폭을 다 먹고 날짜가 밀려난다) */
.bd-news-date {
  flex: none; padding-top: 2px; white-space: nowrap; text-align: right;
  font-size: 12px; font-weight: 600; line-height: 1.7; color: var(--muted-foreground);
}
.bd-news-cat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px; }

/* ── community 스킨: 번호칸 + 분류줄 + 제목 + 메타, 오른쪽 날짜 ── */
.bd-notes-num {
  flex: none; display: grid; place-items: center;
  width: 24px; height: 24px; margin-top: 2px; border-radius: 6px;
  font-size: 11px; font-weight: 700; color: var(--muted-foreground);
  background: color-mix(in srgb, var(--muted) 70%, transparent);
}
/* community 카드는 원본이 위아래 2px 더 넉넉하다 */
.bd-list-notes .bd-item { padding: 20px 22px; }
.bd-notes-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.bd-notes-meta { font-size: 13px; font-weight: 300; line-height: 1.6; color: var(--muted-foreground); }
.bd-notes-side { flex: none; display: flex; align-items: flex-start; }
.bd-notes-date { font-size: 12px; line-height: 1.7; color: var(--muted-foreground); }

/* ── 글이 하나도 없을 때 ── */
.bd-empty { padding: 60px 20px; text-align: center; color: var(--muted-foreground); font-size: 14px; }

/* ── 관리 모드 일괄 작업 줄 ── */
.bd-manage-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 12px; padding: 10px 14px;
  background: var(--muted); border: 1px solid var(--border); border-radius: 10px;
}
.bd-manage-bar select { width: auto; }

@media (max-width: 640px) {
  .bd-head { padding: 32px 0 20px; }
  .bd-title { font-size: 24px; }
  .bd-toolbar-r { width: 100%; }
  .bd-search { width: auto; flex: 1 1 auto; }
  .bd-item { padding: 16px; gap: 12px; }
  .bd-notes-side { display: none; }
}

/* ═══════════ 게시물 읽기 — 카드 없는 문서형 (youngsam.net /community/{글}) ═══════════
   news 스킨이 쓴다. 값은 원본 페이지에서 실측해 옮겼다. */

/* 목록의 .bd-head 와 첫 여백을 맞춘다 (레이아웃이 이미 24px 을 준다) */
.view-page { padding: 56px 0 40px; }

.view-page > .breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-bottom: 24px; font-size: 13px; line-height: 1.7;
}
.view-page > .breadcrumb span { margin: 0; opacity: .6; }

.view-header { margin-bottom: 32px; }
.view-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.view-title {
  margin: 0 0 16px;
  font-size: 28px; font-weight: 700; line-height: 1.4; color: var(--foreground);
  overflow-wrap: anywhere;
}

/* 글쓴이 줄 — 위아래 실선 사이에 아바타·이름·날짜, 오른쪽에 조회/댓글 */
.view-author {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.view-author-avatar {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--brand-foreground);
  font-size: 15px; font-weight: 700;
}
.view-author-info { min-width: 0; }
.view-author-name { display: block; font-size: 14px; font-weight: 700; line-height: 1.7; color: var(--foreground); }
.view-author-name a { color: inherit; }
.view-author-date { display: block; font-size: 12px; line-height: 1.7; color: var(--muted-foreground); }
.view-stats {
  margin-left: auto; display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; line-height: 1.7; color: var(--muted-foreground);
}

/* 본문 — 읽기 폭을 760px 로 묶는다 */
.article-content {
  max-width: 760px;
  font-size: 15px; font-weight: 300; line-height: 2; color: var(--foreground);
  overflow-wrap: anywhere;
}
.article-content p { margin: 0 0 16px; }
.article-content h2 { font-size: 20px; font-weight: 700; line-height: 2; margin: 28px 0 14px; }
.article-content h3 { font-size: 17px; font-weight: 700; line-height: 1.9; margin: 24px 0 12px; }
.article-content img { border-radius: 8px; }
.article-content hr { margin: 24px 0; border: 0; border-top: 1px solid var(--border); }

/* 태그 — 본문과 실선으로 나눈다 */
.view-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border);
}

/* 목록·스크랩·수정 같은 조작 버튼 (원본에는 없다 — 우리 기능이라 태그 아래에 둔다) */
.view-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.view-actions .right { margin-left: auto; }
.view-actions form { display: inline; }

/* 이전 글 · 다음 글 */
.view-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.view-nav-item {
  padding: 16px 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  color: inherit;
  transition: border-color .18s cubic-bezier(.4,0,.2,1), background-color .18s cubic-bezier(.4,0,.2,1);
}
.view-nav-item:hover { border-color: var(--ring); background: var(--muted); color: inherit; }
.view-nav-next { text-align: right; grid-column: 2; }
.view-nav-label { margin-bottom: 6px; font-size: 11px; line-height: 1.7; color: var(--muted-foreground); }
.view-nav-title {
  font-size: 14px; font-weight: 600; line-height: 1.7; color: var(--foreground);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ── 댓글 ── */
.comments-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { margin: 0 0 20px; font-size: 16px; font-weight: 700; line-height: 1.7; }
.comments-list { display: flex; flex-direction: column; }
.comments-section .comment-item {
  padding: 16px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
}
.comments-section .comment-item:last-child { border-bottom: 0; }
.comments-section .comment-item.depth-1 { padding-left: 32px; }
.comments-section .comment-item.depth-2 { padding-left: 64px; }
.comments-section .comment-item.depth-3 { padding-left: 96px; }
.comments-section .comment-item.depth-4 { padding-left: 128px; }
.comments-section .comment-header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px;
}
.comments-section .comment-author {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; line-height: 1.7; color: var(--foreground);
}
.comments-section .comment-author a { color: inherit; }
.comment-avatar-placeholder {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: var(--brand-foreground);
  font-size: 11px; font-weight: 700;
}
.comments-section .comment-date {
  margin-left: auto; font-size: 12px; line-height: 1.7; color: var(--muted-foreground);
}
.comments-section .comment-body {
  font-size: 14px; line-height: 1.7; color: var(--muted-foreground); white-space: pre-wrap;
}
.comments-section .comment-actions {
  display: flex; gap: 8px; margin-top: 8px;
  font-size: 12px; color: var(--muted-foreground);
}
.comments-section .comment-actions button {
  padding: 0; background: none; border: 0; cursor: pointer;
  font-size: 12px; color: var(--muted-foreground);
}
.comments-section .comment-actions button:hover { color: var(--foreground); }
.comments-section .comment-form {
  margin-top: 20px; padding: 0; border-top: 0;
}
.comments-section .comment-empty { padding: 32px 0; color: var(--muted-foreground); font-size: 14px; }

@media (max-width: 768px) {
  .view-page { padding: 32px 0 32px; }
  .view-title { font-size: 22px; }
  .view-stats { width: 100%; margin-left: 0; }
  .view-nav { grid-template-columns: 1fr; }
  .view-nav-next { grid-column: 1; text-align: left; }
  .comments-section .comment-item.depth-1 { padding-left: 16px; }
  .comments-section .comment-item.depth-2 { padding-left: 32px; }
  .comments-section .comment-item.depth-3 { padding-left: 48px; }
  .comments-section .comment-item.depth-4 { padding-left: 64px; }
}

/* ═══════════ 자료실 카드 목록 (youngsam.net /programs) ═══════════
   download 스킨이 쓴다. 값은 원본 스타일시트에서 그대로 옮겼다.
   머리말·분류칩·툴바는 위의 .bd-* 를 함께 쓴다. */

.prog-list { display: flex; flex-direction: column; gap: 16px; }

.prog-card {
  display: flex; align-items: stretch;
  height: 230px; overflow: hidden;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  color: inherit; cursor: pointer;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.prog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .2);
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  color: inherit;
}

/* 왼쪽 그림칸 — 썸네일이 있으면 채우고, 없으면 점무늬 바탕에 아이콘 하나 */
.prog-img {
  display: block; flex: none; width: 280px; aspect-ratio: 16 / 10;
  overflow: hidden; background: var(--background);
}
.prog-img img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.prog-card:hover .prog-img img { transform: scale(1.03); }

.prog-noimg {
  flex: none; width: 280px; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--muted),
              color-mix(in srgb, var(--brand) 5%, var(--background)));
}
.prog-noimg::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--border) 40%, transparent) 1px, transparent 1px);
  background-size: 14px 14px;
}
.prog-noimg-icon {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 14px;
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent);
  backdrop-filter: blur(4px);
}
.prog-noimg-icon svg { color: var(--brand); opacity: .7; }

.prog-body { flex: 1; min-width: 0; display: flex; flex-direction: column; padding: 22px 26px; color: inherit; }
.prog-body:hover { color: inherit; }
.prog-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.prog-name {
  font-size: 18px; font-weight: 700; color: var(--foreground);
  transition: color .15s; overflow-wrap: anywhere;
}
.prog-card:hover .prog-name { color: var(--brand); }
.prog-sub {
  margin-left: 6px; font-size: 13px; font-weight: 500; letter-spacing: -.2px;
  color: var(--muted-foreground);
}
.prog-meta { margin-bottom: 8px; font-size: 12px; color: var(--muted-foreground); }
.prog-desc {
  flex: 1;
  font-size: 14px; font-weight: 300; line-height: 1.7; color: var(--muted-foreground);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.prog-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
}
/* 태그는 넘쳐도 줄바꿈하지 않고 잘라 낸다 (카드 높이를 고정으로 두려고) */
.prog-tags { display: flex; flex-wrap: nowrap; gap: 5px; overflow: hidden; }
.prog-tags span {
  flex: none; white-space: nowrap;
  padding: 3px 10px; border-radius: 6px;
  font-size: 11px; color: var(--muted-foreground);
  background: color-mix(in srgb, var(--border) 40%, transparent);
  transition: color .15s;
}
.prog-card:hover .prog-tags span { color: var(--foreground); }
.prog-dl {
  flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted-foreground);
}
.prog-dl span { display: inline-flex; align-items: center; gap: 4px; }
.prog-dl svg { color: var(--brand); }

/* 관리 모드 체크박스는 카드 테두리 안, 그림칸 왼쪽에 */
.prog-card > .bd-row-check { margin: 22px 0 0 18px; }

@media (max-width: 768px) {
  .prog-card { flex-direction: column; height: auto; }
  .prog-img, .prog-img img { width: 100%; height: 160px; }
  .prog-img { border-radius: 12px 12px 0 0; }
  .prog-noimg { display: none; }
  .prog-body { width: 100%; padding: 16px 18px; }
  .prog-name { font-size: 16px; }
  .prog-desc { font-size: 13px; }
  .prog-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .prog-tags { flex-wrap: wrap; overflow: visible; }
  .prog-card > .bd-row-check { margin: 16px 0 0 18px; }
}

/* ═══════════ 자료실 글 읽기 (youngsam.net /programs/{글}) ═══════════
   download 스킨이 쓴다. 값은 원본 스타일시트에서 그대로 옮겼다.
   빵부스러기·조작버튼·댓글은 위의 .view-* / .comments-* 를 함께 쓴다. */

/* ── 머리 카드: 분류 · 제목 · 정보 · 태그 · 첨부 ── */
.prog-hero {
  margin-bottom: 32px; padding: 32px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
}
.prog-hero-name {
  margin: 8px 0 4px;
  font-size: 26px; font-weight: 700; line-height: 1.4; color: var(--foreground);
  overflow-wrap: anywhere;
}
.prog-hero-subname {
  margin: 0 0 12px;
  font-size: 15px; font-weight: 500; letter-spacing: -.3px; color: var(--muted-foreground);
}
.prog-hero-desc {
  margin-bottom: 12px;
  font-size: 15px; line-height: 1.8; color: var(--muted-foreground);
}
.prog-hero-meta {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px;
  font-size: 13px; color: var(--muted-foreground);
}
.prog-hero-sep { opacity: .4; }
.prog-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; }
.prog-tag {
  padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent);
}
a.prog-tag:hover { color: var(--brand); background: color-mix(in srgb, var(--brand) 18%, transparent); }

/* ── 첨부파일 ── */
.prog-dl-section { padding-top: 20px; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.prog-dl-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.prog-dl-title { font-size: 15px; font-weight: 700; color: var(--foreground); }
.prog-dl-ver {
  padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.prog-dl-files { display: flex; flex-direction: column; gap: 8px; }
.prog-dl-file-btn {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 18px;
  background: var(--background); border: 1px solid var(--border); border-radius: 12px;
  color: inherit; text-align: left; transition: border-color .15s, background-color .15s;
}
.prog-dl-file-btn:hover {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  color: inherit;
}
.prog-dl-file-btn.is-off { cursor: not-allowed; opacity: .6; }
.prog-dl-file-btn.is-off:hover { border-color: var(--border); background: var(--background); }
.prog-dl-file-info { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--foreground); }
.prog-dl-file-info > svg { flex: none; color: var(--brand); }
.prog-dl-file-label { font-size: 14px; font-weight: 600; color: var(--foreground); overflow-wrap: anywhere; }
.prog-dl-file-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; font-size: 12px; color: var(--muted-foreground); }
.prog-dl-file-action {
  flex: none; padding: 6px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent);
}
.prog-dl-empty {
  padding: 16px; border-radius: 10px; text-align: center;
  font-size: 13px; color: var(--muted-foreground); background: var(--background);
}

/* ── 이미지 갤러리 ── */
.prog-gallery-frame {
  margin-bottom: 24px; padding: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 12px 30px rgba(0,0,0,.07);
}
/* 한 장짜리 */
.prog-gallery-solo {
  overflow: hidden; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: var(--muted); box-shadow: inset 0 0 40px rgba(0,0,0,.05);
}
.prog-gallery-solo img {
  display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 468px; object-fit: contain;
}
/* 여러 장 — 왼쪽 썸네일 줄 + 오른쪽 큰 그림 */
.prog-gallery { display: flex; gap: 12px; }
.prog-gallery-side-wrap { display: flex; flex-direction: column; flex: none; align-items: center; gap: 6px; }
.prog-gallery-side {
  display: flex; flex-direction: column; flex: none; gap: 8px;
  max-height: 468px; padding: 2px; overflow-y: auto; scrollbar-width: none;
}
.prog-gallery-side::-webkit-scrollbar { display: none; }
.prog-gallery-thumb {
  flex: none; width: 96px; height: 68px; padding: 0; overflow: hidden;
  border: 2px solid var(--border); border-radius: 10px;
  background: var(--background); opacity: .5; cursor: pointer;
  transition: transform .16s cubic-bezier(.4,0,.2,1), border-color .16s, opacity .16s, box-shadow .16s;
}
.prog-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.prog-gallery-thumb:hover {
  opacity: 1; transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.prog-gallery-thumb.active {
  opacity: 1; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent);
}
.prog-gallery-counter {
  margin-top: 2px; padding: 3px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center;
  color: var(--muted-foreground); background: var(--card); border: 1px solid var(--border);
}
.prog-gallery-main {
  position: relative; flex: 1; min-width: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: 12px;
  background: var(--muted); box-shadow: inset 0 0 40px rgba(0,0,0,.05);
}
.prog-gallery-main img {
  display: block; width: 100%; aspect-ratio: 16 / 10; max-height: 468px; object-fit: contain;
}
.prog-gallery-main::after {
  content: "⤢ 확대"; position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 5px 11px; border-radius: 8px;
  font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px); pointer-events: none; opacity: 0; transition: opacity .2s;
}
.prog-gallery-main:hover::after { opacity: 1; }
.prog-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 0; border-radius: 50%;
  color: #fff; background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  cursor: pointer; opacity: 0; transition: opacity .2s, background-color .2s;
}
.prog-gallery-main:hover .prog-gallery-nav { opacity: 1; }
.prog-gallery-nav:hover { background: var(--brand); }
.prog-gallery-nav.prev { left: 10px; }
.prog-gallery-nav.next { right: 10px; }

/* ── 본문 카드 ── */
.prog-article {
  margin-bottom: 24px; padding: 26px 30px;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
}
.prog-article .article-content { max-width: 100%; margin: 0; }
.prog-article .article-content table { margin-left: auto; margin-right: auto; }

/* ── 관련 글 ── */
.view-related { margin-top: 40px; }
.view-related-title { margin-bottom: 16px; font-size: 16px; font-weight: 700; color: var(--foreground); }
.view-related-list { display: flex; flex-direction: column; gap: 8px; }
.view-related-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  color: inherit; box-shadow: 0 1px 2px rgba(0,0,0,.03);
  transition: transform .18s cubic-bezier(.4,0,.2,1), box-shadow .18s, border-color .18s, background-color .18s;
}
.view-related-item:hover {
  transform: translateY(-2px); background: var(--muted); color: inherit;
  border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.view-related-item .vr-title {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; font-weight: 600; color: var(--foreground); transition: color .15s;
}
.view-related-item:hover .vr-title { color: var(--brand); }
.vr-subname { margin-left: 2px; font-size: 11px; font-weight: 400; color: var(--muted-foreground); }
.view-related-item .vr-date { flex: none; font-size: 12px; color: var(--muted-foreground); }

@media (max-width: 768px) {
  .prog-hero { padding: 20px; margin-bottom: 20px; }
  .prog-hero-name { font-size: 21px; }
  .prog-article { padding: 18px 16px; }
  .prog-gallery { flex-direction: column; }
  .prog-gallery-side { flex-direction: row; max-height: none; overflow-x: auto; }
  .prog-gallery-side-wrap { order: 2; align-items: stretch; }
  .prog-dl-file-btn { padding: 12px 14px; }
}

/* ── 본문 아래 추천 · 스크랩 · URL복사 (youngsam.net /programs/{글}) ── */
.prog-acts {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px;
  margin: 24px 0; padding: 20px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.prog-act {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: transparent; color: var(--muted-foreground);
  font-family: inherit; font-size: 14px; cursor: pointer; outline: none;
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.prog-act > span { font-weight: 700; }
.prog-act > svg { flex: none; }
.prog-act:hover {
  border-color: var(--brand); color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, transparent);
}
/* 이미 누른 상태 — 추천·스크랩이 켜지면 브랜드색으로 굳는다 */
.prog-act.on {
  border-color: var(--brand); color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.prog-act.on > svg { fill: currentColor; }
.prog-act[disabled] { cursor: default; }
.prog-act[disabled]:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 10%, transparent); }
/* 복사했다고 잠깐 알려 준다 */
.prog-act.is-done { border-color: var(--brand); color: var(--brand); }

/* ── 접었다 펴는 댓글 (youngsam.net /programs/{글} prog-reviews) ── */
.prog-reviews { margin: 32px 0; }
.prog-reviews-head {
  display: flex; align-items: center; width: 100%;
  padding: 14px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--foreground);
  text-align: left; cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease;
}
.prog-reviews-head:hover { border-color: var(--ring); background: var(--muted); }
.prog-reviews-count {
  margin-left: 12px; font-size: 14px; font-weight: 400; color: var(--muted-foreground);
}
.prog-reviews-count b { font-weight: 700; color: var(--foreground); }
.prog-reviews-caret {
  margin-left: auto; font-size: 12px; color: var(--muted-foreground);
  transform: rotate(0); transition: transform .2s;
}
.prog-reviews-head[aria-expanded="true"] .prog-reviews-caret { transform: rotate(180deg); }
/* 펼친 뒤에는 머리와 몸이 한 덩어리로 보이게 모서리를 맞춘다 */
.prog-reviews-head[aria-expanded="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.prog-reviews-body {
  padding: 4px 16px 16px;
  background: var(--card);
  border: 1px solid var(--border); border-top: 0;
  border-radius: 0 0 10px 10px;
}
/* 접이식 안에서는 댓글 영역이 스스로 실선·여백을 그리지 않는다 */
.prog-reviews-body .comments-section { margin-top: 0; padding-top: 12px; border-top: 0; }
/* 건수는 머리줄이 이미 보여 준다 */
.prog-reviews-body .comments-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── 사용자 리뷰 펼친 화면 (youngsam.net /programs/{글} 리뷰 컴포넌트) ──
   값은 원본 컴포넌트의 인라인 스타일에서 그대로 옮겼다. */

.rv-body { margin-top: 12px; }

/* 공용 버튼 — 원본의 base/primary/ghost */
.rv-btn {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 18px; border-radius: 8px;
  font-family: inherit; font-size: 13px; line-height: 1; white-space: nowrap; cursor: pointer;
}
.rv-btn-primary { background: var(--brand); border: 1px solid var(--brand); color: var(--brand-foreground); }
.rv-btn-primary:hover { background: var(--brand-hover, var(--brand)); color: var(--brand-foreground); }
.rv-btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--muted-foreground); }
.rv-btn-ghost:hover { background: var(--muted); color: var(--foreground); }

/* '리뷰 작성하기' 는 조금 작은 버튼이다 */
.rv-open {
  padding: 8px 14px; border-radius: 8px;
  background: var(--brand); border: 1px solid var(--brand); color: var(--brand-foreground);
  font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.rv-open-wrap { margin-bottom: 12px; }

/* 쓰기 상자 */
.rv-form {
  margin-bottom: 16px; padding: 14px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.rv-input {
  box-sizing: border-box; flex: 1;
  padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--background); color: var(--foreground);
  font-family: inherit; font-size: 13px;
}
.rv-input:focus { border-color: var(--ring); box-shadow: none; outline: 0; }
textarea.rv-input { width: 100%; min-height: 80px; resize: vertical; margin-bottom: 8px; }
.rv-guest { display: flex; gap: 8px; margin-bottom: 8px; }

/* 별점 고르기 */
.rv-stars-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
/* display 를 지정한 규칙이 브라우저 기본 [hidden] 을 이겨 버린다.
   답글을 쓸 때 별점 줄이 사라지지 않던 원인이라 따로 눌러 준다. */
.rv-stars-row[hidden] { display: none; }
.rv-btn[hidden] { display: none; }
.rv-stars-label { font-size: 13px; color: var(--muted-foreground); }
.rv-stars { display: inline-flex; gap: 2px; }
.rv-star {
  padding: 0 2px; background: none; border: 0; cursor: pointer;
  font-size: 20px; line-height: 1; color: var(--border);
}
.rv-star.on { color: #f5a623; }
.rv-stars-num { margin-left: 4px; font-size: 13px; color: var(--muted-foreground); }

.rv-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.rv-actions .check-label { margin-right: auto; }
.rv-note { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--muted-foreground); }

/* 리뷰 목록 */
.rv-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rv-item {
  padding: 14px 16px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
}
/* 답글은 원본의 '운영자 답변' 처럼 왼쪽에 굵은 선을 두른 얕은 상자로 (원본 값 그대로).
   테두리는 왼쪽만 남긴다 — 원본 블록에는 나머지 세 변이 없다. */
.rv-item.depth-1,
.rv-item.depth-2,
.rv-item.depth-3,
.rv-item.depth-4 {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--background);
  border: 0;
  border-left: 3px solid var(--brand);
}
.rv-item.depth-1 { margin-left: 24px; }
.rv-item.depth-2 { margin-left: 48px; }
.rv-item.depth-3 { margin-left: 72px; }
.rv-item.depth-4 { margin-left: 96px; }
.rv-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }
.rv-author { font-size: 14px; color: var(--foreground); }
.rv-score { font-size: 13px; letter-spacing: 1px; color: #f5a623; }
.rv-score i { font-style: normal; color: var(--border); }
.rv-text { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted-foreground); white-space: pre-wrap; }
.rv-acts { display: flex; gap: 8px; margin-top: 10px; font-size: 12px; }
.rv-acts button {
  padding: 0; background: none; border: 0; cursor: pointer;
  font-size: 12px; color: var(--muted-foreground);
}
.rv-acts button:hover { color: var(--foreground); }
.rv-acts form { display: inline; }
.rv-empty { padding: 24px 0; text-align: center; font-size: 13px; color: var(--muted-foreground); }
.rv-more { margin-top: 16px; text-align: center; }

/* 리뷰가 아직 없을 때의 머리줄 — 건수 대신 안내를 오른쪽에 둔다 */
.prog-reviews-invite { margin-left: auto; font-size: 13px; font-weight: 400; color: var(--muted-foreground); }

@media (max-width: 640px) {
  .rv-guest { flex-direction: column; }
  .rv-item.depth-1, .rv-item.depth-2, .rv-item.depth-3, .rv-item.depth-4 { margin-left: 12px; }
}
.rv-star-mark { color: #f5a623; }
.prog-reviews-sub { margin-left: 6px; color: var(--muted-foreground); }
/* 답글을 쓰는 동안에는 폼이 그 리뷰 카드 안으로 들어온다 */
.rv-item > .comment-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
