/* ==========================================================================
   Modern Service — Modrinth 스타일 참고 테마 (다크 기본 / 라이트 지원)
   ========================================================================== */
:root {
  --bg: #16181c;
  --raised: #26292f;
  --raised-2: #1f2126;
  --button: #33363d;
  --button-hover: #3d414a;
  --divider: #34373e;
  --text: #b0bac5;
  --text-strong: #ecf9fb;
  --text-muted: #8a939d;
  --brand: #1bd96a;
  --brand-hover: #3ee083;
  --brand-ink: #0b2615;
  --brand-soft: rgba(27, 217, 106, .12);
  --red: #ff496e;
  --red-soft: rgba(255, 73, 110, .12);
  --orange: #ffa347;
  --orange-soft: rgba(255, 163, 71, .12);
  --blue: #4f9cff;
  --blue-soft: rgba(79, 156, 255, .12);
  --purple: #c78aff;
  --purple-soft: rgba(199, 138, 255, .12);
  --shadow: 0 2px 8px rgba(0, 0, 0, .25);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, .45);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 64px;
  --max: 1280px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1f3f6;
  --raised: #ffffff;
  --raised-2: #f7f8fa;
  --button: #e9ecf0;
  --button-hover: #dfe3e8;
  --divider: #e2e5ea;
  --text: #4b535c;
  --text-strong: #15181c;
  --text-muted: #7b848e;
  --brand: #00af5c;
  --brand-hover: #009950;
  --brand-ink: #ffffff;
  --brand-soft: rgba(0, 175, 92, .1);
  --red: #e0284d;
  --red-soft: rgba(224, 40, 77, .08);
  --orange: #d97706;
  --orange-soft: rgba(217, 119, 6, .1);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, .08);
  --purple: #8b3fd9;
  --purple-soft: rgba(139, 63, 217, .08);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, .14);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, Inter, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { color: var(--text-strong); line-height: 1.3; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--divider); margin: 1.5rem 0; }
code, pre { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
code { background: var(--button); padding: .1em .4em; border-radius: 6px; color: var(--text-strong); }
pre { background: var(--raised-2); border: 1px solid var(--divider); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex-shrink: 0; vertical-align: -.2em; }
.muted { color: var(--text-muted); }
.strong { color: var(--text-strong); font-weight: 700; }
.text-brand { color: var(--brand); }
.text-red { color: var(--red); }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.small { font-size: .85rem; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: clamp(16px, 3vw, 32px); }
.page { padding-block: 28px 56px; }

/* ───────── Header ───────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--raised) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--divider);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text-strong); font-weight: 800; font-size: 1.12rem; letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 900; font-size: 1.05rem; box-shadow: 0 0 0 4px var(--brand-soft); }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--text); font-weight: 600; padding: 8px 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { background: var(--button); color: var(--text-strong); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand); }
.header-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.header-search input { width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px; background: var(--button); border: 1px solid transparent; color: var(--text-strong); font: inherit; }
.header-search input:focus { outline: none; border-color: var(--brand); background: var(--raised-2); }
.header-search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.points-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.points-chip:hover { text-decoration: none; filter: brightness(1.1); }
.icon-btn { width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--button); color: var(--text-strong); border: 0; cursor: pointer; }
.icon-btn:hover { background: var(--button-hover); }
.menu-toggle { display: none; }

.dropdown { position: relative; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.avatar { width: 40px; height: 40px; border-radius: 999px; background: linear-gradient(135deg, var(--brand), #0ea5e9); color: #fff; display: grid; place-items: center; font-weight: 800; text-transform: uppercase; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--raised); border: 1px solid var(--divider); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
details.dropdown[open] > .dropdown-menu { animation: dd-in .18s cubic-bezier(.2, .8, .2, 1); transform-origin: top right; }
details.dropdown.closing > .dropdown-menu { animation: dd-out .14s ease-in forwards; transform-origin: top right; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-6px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dd-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(.96); } }
.dropdown-menu .dm-head { padding: 10px 12px; border-bottom: 1px solid var(--divider); margin-bottom: 6px; }
.dropdown-menu a, .dropdown-menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--button); color: var(--text-strong); text-decoration: none; }
.dropdown-menu .danger { color: var(--red); }
.dropdown-menu hr { margin: 6px 0; }

/* ───────── Buttons ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 700; cursor: pointer; background: var(--button); color: var(--text-strong); white-space: nowrap; transition: background .15s, transform .05s, filter .15s; text-decoration: none !important; line-height: 1.3; }
.btn:hover { background: var(--button-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--button); }
.btn-outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--divider); }
.btn-sm { padding: 6px 12px; border-radius: 9px; font-size: .86rem; }
.btn-lg { padding: 13px 24px; font-size: 1.04rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ───────── Cards / Surfaces ───────── */
.card { background: var(--raised); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-title h2, .card-title h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .card-title { padding: 20px 22px 4px; margin-bottom: 8px; }
/* 카드 바로 아래 버튼 묶음 간격 (예: 상품 등록 화면 등록하기/취소) */
.card + .btn-group, .card + form { margin-top: 16px; }

/* ───────── Forms ───────── */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; color: var(--text-strong); font-weight: 700; margin-bottom: 6px; font-size: .93rem; }
.field .hint { font-size: .82rem; color: var(--text-muted); margin-top: 6px; }
.input, .select, .textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid transparent; background: var(--button); color: var(--text-strong); font: inherit; transition: border-color .15s, background .15s; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); background: var(--raised-2); }
.textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238a939d' stroke-width='2'%3E%3Cpath d='m2 4 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
/* 체크박스 + 글자: 세로 가운데 정렬 (.field > label 의 블록·굵은 글씨 규칙보다 우선) */
.check, .field > label.check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 5px 0; margin-bottom: 0; user-select: none; font-weight: 500; font-size: .95rem; line-height: 1.5; color: var(--text); }
.check input, .field > label.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; flex-shrink: 0; }
.check.small { font-size: .85rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.verified-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; font-size: .9rem; }
.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select label { position: relative; }
.chip-select input { position: absolute; opacity: 0; pointer-events: none; }
.chip-select span { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--button); font-weight: 600; font-size: .9rem; cursor: pointer; border: 1.5px solid transparent; color: var(--text); }
.chip-select input:checked + span { background: var(--brand-soft); color: var(--brand); border-color: var(--brand); }
.chip-select input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ───────── Alerts ───────── */
.flash-wrap { display: grid; gap: 10px; margin-bottom: 20px; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 12px; font-weight: 600; font-size: .94rem; background: var(--blue-soft); color: var(--blue); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.alert-success { background: var(--brand-soft); color: var(--brand); }
.alert-error { background: var(--red-soft); color: var(--red); }
.alert-warning { background: var(--orange-soft); color: var(--orange); }
.alert .icon { margin-top: 2px; }
.alert-close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; font-size: 1.2rem; line-height: 1; padding: 0 2px; }

/* ───────── Badges & tags ───────── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--button); color: var(--text); white-space: nowrap; }
.badge-green { background: var(--brand-soft); color: var(--brand); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.tag + .tag::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); margin-right: 4px; opacity: .6; }
.price { font-weight: 800; color: var(--text-strong); }
.price.free { color: var(--brand); }

/* ───────── Hero ───────── */
.hero { position: relative; overflow: hidden; z-index: 1; padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 80px); text-align: center; }
.hero::before { content: ''; position: absolute; inset: 0 -10% auto; height: 100%; background: radial-gradient(closest-side, var(--brand-soft), transparent 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); font-weight: 900; letter-spacing: -.035em; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.lead { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 640px; margin: 0 auto 28px; }
.hero-search { max-width: 620px; margin: 0 auto 22px; position: relative; }
.hero-search-field { position: relative; }
/* 자동완성 목록이 잘리지 않도록 세로 방향은 넘침 허용 */
@supports (overflow: clip) { .hero { overflow-x: clip; overflow-y: visible; } }
.hero-search { z-index: 20; }

/* ───────── 검색 자동완성 ───────── */
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70; background: var(--raised); border: 1px solid var(--divider); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; max-height: min(60vh, 440px); overflow-y: auto; text-align: left; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--text); }
.suggest-item:hover, .suggest-item.active { background: var(--button); text-decoration: none; }
.suggest-icon { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; object-fit: cover; background: var(--button); display: grid; place-items: center; font-weight: 900; color: var(--text-muted); }
.suggest-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.suggest-title { color: var(--text-strong); font-weight: 700; display: flex; align-items: center; gap: 6px; font-size: .95rem; }
.suggest-title .badge { font-size: .7rem; padding: 1px 8px; }
.suggest-summary { font-size: .82rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-item .price { font-size: .88rem; white-space: nowrap; }
.suggest-more { display: block; padding: 10px; margin-top: 4px; border-top: 1px solid var(--divider); text-align: center; font-weight: 700; font-size: .9rem; border-radius: 0 0 10px 10px; }
.suggest-more:hover, .suggest-more.active { background: var(--button); text-decoration: none; }
.suggest-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: .9rem; }
.hero-search input { width: 100%; display: block; text-align: left; text-overflow: ellipsis; padding: 16px 130px 16px 50px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--divider); color: var(--text-strong); font: inherit; font-size: 1.05rem; box-shadow: var(--shadow-lg); }
.hero-search input:focus { outline: none; border-color: var(--brand); }
.hero-search-field > .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); width: 20px; height: 20px; pointer-events: none; }
.hero-search .btn { position: absolute; right: 7px; top: 7px; bottom: 7px; }
.hero-stats { display: flex; justify-content: center; gap: clamp(20px, 5vw, 56px); margin-top: 36px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.6rem; color: var(--text-strong); font-weight: 900; }
.hero-stats span { font-size: .88rem; color: var(--text-muted); }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { background: var(--raised); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; font-size: .94rem; }

/* ───────── Project cards ───────── */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.pcard { display: grid; grid-template-columns: 76px 1fr; gap: 6px 16px; background: var(--raised); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: inherit; transition: transform .15s, box-shadow .15s; position: relative; }
.pcard:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.pcard-icon, .picon { width: 76px; height: 76px; border-radius: 16px; background: var(--button); object-fit: cover; display: grid; place-items: center; color: var(--text-muted); font-size: 1.8rem; font-weight: 900; overflow: hidden; }
.pcard-body { min-width: 0; }
.pcard-title { color: var(--text-strong); font-weight: 800; font-size: 1.08rem; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pcard-summary { margin: 4px 0 8px; font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--divider); font-size: .86rem; flex-wrap: wrap; }
.pcard-foot .stats { display: flex; gap: 14px; color: var(--text-muted); }
.pcard-foot .stats span { display: inline-flex; align-items: center; gap: 5px; }

/* 목록형 (둘러보기) */
.plist { display: grid; gap: 12px; }
.prow { display: grid; grid-template-columns: 96px 1fr auto; gap: 18px; background: var(--raised); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: inherit; align-items: start; transition: box-shadow .15s; }
.prow:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.prow .picon { width: 96px; height: 96px; border-radius: 18px; font-size: 2.2rem; }
.prow-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin-bottom: 4px; }
.prow-title strong { color: var(--text-strong); font-size: 1.2rem; font-weight: 800; }
.prow-title .by { font-size: .88rem; color: var(--text-muted); }
.prow p { margin: 0 0 10px; }
.prow-side { text-align: right; display: grid; gap: 6px; justify-items: end; font-size: .88rem; color: var(--text-muted); white-space: nowrap; }
.prow-side .big { font-size: 1.05rem; color: var(--text-strong); font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }

/* ───────── Browse layout ───────── */
.browse { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-right: 2px; }
.filters .card { padding: 18px; }
.filters h3 { font-size: .95rem; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.filter-list { display: grid; gap: 2px; }
.filter-list a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: .92rem; }
.filter-list a:hover { background: var(--button); text-decoration: none; color: var(--text-strong); }
.filter-list a.on { color: var(--brand); background: var(--brand-soft); }
.filter-list .box { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--divider); display: grid; place-items: center; flex-shrink: 0; }
.filter-list a.on .box { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.browse-toolbar { display: flex; gap: 10px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.browse-toolbar .search { flex: 1; min-width: 200px; position: relative; }
.browse-toolbar .search input { padding-left: 40px; }
.browse-toolbar .search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.browse-toolbar .select { width: auto; min-width: 150px; }
.filter-toggle { display: none; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.active-filters a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .84rem; }
.empty { text-align: center; padding: 56px 20px; color: var(--text-muted); }
.empty .icon { width: 44px; height: 44px; margin: 0 auto 12px; opacity: .6; display: block; }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--raised); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.pagination a:hover { background: var(--button-hover); text-decoration: none; }
.pagination .current { background: var(--brand); color: var(--brand-ink); }
.pagination .gap { background: none; box-shadow: none; }

/* ───────── Product detail ───────── */
.phead { display: grid; grid-template-columns: 112px 1fr auto; gap: 22px; align-items: center; margin-bottom: 22px; }
.phead .picon { width: 112px; height: 112px; border-radius: 22px; font-size: 2.6rem; box-shadow: var(--shadow); }
.phead h1 { margin-bottom: 6px; }
.phead p { margin: 0 0 10px; font-size: 1.04rem; }
.phead-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: .9rem; }
.phead-meta span { display: inline-flex; align-items: center; gap: 6px; }
.phead-actions { display: grid; gap: 8px; justify-items: end; }
.pdetail { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.pside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.pside h3 { font-size: .98rem; margin-bottom: 10px; }
.buy-box .price-big { font-size: 1.9rem; font-weight: 900; color: var(--text-strong); letter-spacing: -.02em; }
.buy-box .price-big.free { color: var(--brand); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; color: var(--text-strong); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 4px 11px; border-radius: 999px; background: var(--button); font-size: .82rem; font-weight: 700; color: var(--text); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--divider); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 16px; font-weight: 700; color: var(--text-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--text-strong); text-decoration: none; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.tabs .count { background: var(--button); color: var(--text); padding: 0 8px; border-radius: 999px; font-size: .76rem; }

.prose { color: var(--text); line-height: 1.75; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4, .prose h5 { margin: 1.4em 0 .5em; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1em 0; padding: .6em 1em; border-left: 4px solid var(--brand); background: var(--raised-2); border-radius: 0 10px 10px 0; }
.legal h2 { font-size: 1.15rem; margin-top: 2em; }
.legal table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem; }
.legal th, .legal td { border: 1px solid var(--divider); padding: 8px 12px; text-align: left; vertical-align: top; }
.legal th { background: var(--raised-2); color: var(--text-strong); }

/* ───────── Auth pages ───────── */
.auth-wrap { min-height: calc(100vh - var(--header-h) - 200px); display: grid; place-items: center; padding: 40px 16px 64px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card.wide { max-width: 560px; }
.auth-card .card { padding: clamp(22px, 5vw, 36px); }
.auth-card h1 { font-size: 1.6rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: .94rem; }
.steps { display: grid; gap: 14px; }
.step { border: 1.5px solid var(--divider); border-radius: 14px; padding: 16px 18px; transition: border-color .2s, background .2s; }
.step.done { border-color: var(--brand); background: var(--brand-soft); }
.step-head { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text-strong); margin-bottom: 12px; }
.step.done .step-head { margin-bottom: 0; }
.step-num { width: 26px; height: 26px; border-radius: 50%; background: var(--button); display: grid; place-items: center; font-size: .82rem; }
.step.done .step-num { background: var(--brand); color: var(--brand-ink); }
.step-msg { font-size: .86rem; margin-top: 8px; line-height: 1.45; }
/* 메시지가 없을 땐 공간을 차지하지 않음 → 카드 위아래 여백이 같아짐 */
.step-msg:empty { display: none; }
.step-body > .input-group + .input-group { margin-top: 8px; }
.step-msg.ok { color: var(--brand); }
.step-msg.err { color: var(--red); }
.sms-box { background: var(--raised-2); border: 1px dashed var(--divider); border-radius: 12px; padding: 14px; margin-top: 12px; display: grid; gap: 6px; }
.sms-box .code { font-size: 1.7rem; letter-spacing: .3em; font-weight: 900; color: var(--brand); font-family: ui-monospace, monospace; }
.otp-input { text-align: center; font-size: 1.5rem; letter-spacing: .4em; font-weight: 800; }

/* ───────── Account layout ───────── */
.layout-side { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.side-nav { position: sticky; top: calc(var(--header-h) + 20px); background: var(--raised); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 700; font-size: .94rem; }
.side-nav a:hover { background: var(--button); color: var(--text-strong); text-decoration: none; }
.side-nav a.active { background: var(--brand-soft); color: var(--brand); }
.side-nav .sep { height: 1px; background: var(--divider); margin: 6px 4px; }
.side-nav .nav-count { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; padding: 0 7px; border-radius: 999px; line-height: 1.6; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title h1 { margin: 0; font-size: 1.6rem; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--raised); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); display: block; color: inherit; }
a.stat:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.stat .label { font-size: .84rem; color: var(--text-muted); font-weight: 600; display: flex; align-items: center; gap: 6px; margin: 0 0 6px; }
.stat .value { font-size: 1.65rem; font-weight: 900; color: var(--text-strong); letter-spacing: -.02em; line-height: 1.2; }
.stat .delta { font-size: .82rem; margin-top: 4px; color: var(--text-muted); }
.stat.accent .value { color: var(--brand); }
.stat.warn .value { color: var(--orange); }
.stat.danger .value { color: var(--red); }

/* ───────── Tables ───────── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--divider); white-space: nowrap; background: var(--raised-2); }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--button) 40%, transparent); }
/* 한글이 글자 단위로 쪼개져 세로로 늘어서지 않도록: 띄어쓰기 단위 줄바꿈 + 설명 칸 최소 폭 */
.table td { word-break: keep-all; overflow-wrap: break-word; }
.table td.cell-text { min-width: 180px; }
.table .note { display: block; min-width: 200px; max-width: 340px; margin-top: 6px; line-height: 1.45; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .prod { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.table .prod .picon { width: 42px; height: 42px; border-radius: 10px; font-size: 1rem; }
.table a.strong { color: var(--text-strong); }
.plus { color: var(--brand); font-weight: 700; }
.minus { color: var(--red); font-weight: 700; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; flex: 0 1 auto; }
.toolbar .grow { flex: 1 1 220px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-form .input { padding: 7px 10px; border-radius: 9px; font-size: .88rem; width: 140px; }
/* 표 안 처리 버튼 묶음: 세로로 쌓고 칸 폭을 확보해 카드 밖으로 넘치지 않게 */
.action-stack { display: grid; gap: 6px; width: 260px; margin-left: auto; text-align: left; white-space: normal; }
.action-stack { grid-template-columns: minmax(0, 1fr); }
.action-stack > * { min-width: 0; }
.action-stack .inline-form { display: flex; flex-wrap: nowrap; width: 100%; min-width: 0; }
/* width:0 → 입력칸 기본 폭(약 20글자)이 칸 폭 계산에 끼어들지 않고 남는 공간만 채움 */
.action-stack .inline-form .input { flex: 1 1 0; width: 0; min-width: 0; }
.action-stack .inline-form .btn { flex-shrink: 0; }
.action-stack .inline-form:not(:has(.input)) .btn { width: 100%; }

details.expand > summary { cursor: pointer; list-style: none; }
details.expand > summary::-webkit-details-marker { display: none; }
.panel { background: var(--raised-2); border: 1px solid var(--divider); border-radius: 12px; padding: 14px; margin-top: 10px; }

.backup-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font-family: ui-monospace, monospace; font-weight: 700; color: var(--text-strong); }
.backup-codes span { background: var(--raised-2); padding: 8px 12px; border-radius: 8px; text-align: center; letter-spacing: .1em; }
.qr-box { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 180px; height: 180px; border-radius: 12px; background: #fff; padding: 8px; }

.thread { display: grid; gap: 14px; }
.msg { background: var(--raised-2); border-radius: 14px; padding: 16px 18px; border: 1px solid var(--divider); }
.msg.answer { border-color: var(--brand); background: var(--brand-soft); }
.msg-head { display: flex; justify-content: space-between; gap: 10px; font-size: .86rem; color: var(--text-muted); margin-bottom: 8px; flex-wrap: wrap; }
.msg-head strong { color: var(--text-strong); }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-strong); }

/* ───────── Modal (dialog) ───────── */
dialog.modal { border: 0; padding: 0; border-radius: 18px; background: var(--raised); color: var(--text); width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
.modal-body { padding: 24px; }
.modal-body h3 { margin-bottom: 8px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }

/* ───────── Footer ───────── */
.site-footer { border-top: 1px solid var(--divider); background: var(--raised); margin-top: 40px; padding: 36px 0 28px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 28px; }
.footer-grid h4 { font-size: .9rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.footer-grid a { color: var(--text); }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--divider); margin-top: 28px; padding-top: 20px; color: var(--text-muted); font-size: .85rem; }
.github-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-strong) !important; font-weight: 700; }

/* ───────── Admin ───────── */
.admin-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { background: var(--raised); border-right: 1px solid var(--divider); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.admin-side .logo { padding: 4px 8px 18px; }
.admin-side .side-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); padding: 10px 12px 4px; font-weight: 800; }
.admin-side a.nav-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; color: var(--text); font-weight: 700; }
.admin-side a.nav-item:hover { background: var(--button); text-decoration: none; color: var(--text-strong); }
.admin-side a.nav-item.active { background: var(--brand-soft); color: var(--brand); }
.admin-side .nav-count { margin-left: auto; background: var(--red); color: #fff; font-size: .72rem; padding: 0 7px; border-radius: 999px; line-height: 1.6; }
.admin-side .side-bottom { margin-top: auto; display: grid; gap: 4px; border-top: 1px solid var(--divider); padding-top: 12px; }
.admin-main { min-width: 0; }
.admin-top { position: sticky; top: 0; z-index: 40; height: var(--header-h); display: flex; align-items: center; gap: 12px; padding: 0 clamp(16px, 3vw, 32px); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--divider); }
.admin-top h1 { margin: 0; font-size: 1.2rem; }
.admin-top .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.admin-content { padding: 24px clamp(16px, 3vw, 32px) 56px; }
.admin-menu-toggle { display: none; }
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 10px; }
.bar-chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.bar-chart .bar i { display: block; width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--brand), color-mix(in srgb, var(--brand) 55%, transparent)); min-height: 3px; transition: filter .15s; }
.bar-chart .bar:hover i { filter: brightness(1.2); }
.bar-chart .bar span { font-size: .7rem; color: var(--text-muted); white-space: nowrap; }
.todo-list { display: grid; gap: 8px; }
.todo-list a { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--raised-2); color: var(--text-strong); font-weight: 700; border: 1px solid var(--divider); }
.todo-list a:hover { border-color: var(--brand); text-decoration: none; }
.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.upload-box { border: 2px dashed var(--divider); border-radius: 14px; padding: 16px; text-align: center; background: var(--raised-2); }
.upload-box input { width: 100%; font: inherit; color: var(--text); }
.upload-box input::file-selector-button { font: inherit; font-weight: 700; border: 0; padding: 8px 14px; border-radius: 9px; background: var(--button); color: var(--text-strong); margin-right: 10px; cursor: pointer; }
/* ───────── 갤러리 ───────── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.gallery-item { padding: 0; border: 0; background: var(--raised); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; text-align: left; color: inherit; font: inherit; display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.gallery-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--button); }
.gallery-caption { padding: 10px 14px; font-weight: 600; color: var(--text-strong); font-size: .92rem; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(0, 0, 0, .88); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(1200px, 92vw); }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 12px; object-fit: contain; }
.lightbox figcaption { color: #fff; font-weight: 600; text-align: center; }
.lb-btn { position: fixed; z-index: 2; width: 48px; height: 48px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; font-size: 1.2rem; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .8); font-size: .9rem; }
.gallery-edit { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.gallery-edit-item { display: grid; gap: 6px; background: var(--raised-2); border-radius: 12px; padding: 8px; }
.gallery-edit-item img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
.gallery-edit-item .input { padding: 7px 10px; font-size: .85rem; border-radius: 8px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); transform: none; } .lb-count { bottom: calc(28px + env(safe-area-inset-bottom, 0px)); } }
.version-groups { display: grid; gap: 10px; }
.version-group { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: start; }
.version-group-label { font-size: .8rem; font-weight: 800; color: var(--text-muted); padding-top: 8px; }
@media (max-width: 640px) { .version-group { grid-template-columns: 1fr; gap: 4px; } .version-group-label { padding-top: 0; } }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .86rem; border: 1.5px solid var(--brand); }
.tag-chip-del { width: 22px; height: 22px; border-radius: 999px; border: 0; background: transparent; color: inherit; font-size: 1.05rem; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.tag-chip-del:hover { background: var(--brand); color: var(--brand-ink); }
.tag-error { color: var(--red); }
.amount-input .input:disabled { opacity: .45; cursor: not-allowed; }
.amount-unit, .slug-prefix { pointer-events: none; }
.icon-preview { width: 96px; height: 96px; border-radius: 18px; margin: 0 auto 12px; }

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .header-search { max-width: 260px; }
  .pdetail { grid-template-columns: 1fr 280px; }
  .dash-grid, .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .nav, .header-search { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header.open .mobile-menu { display: grid; }
  /* 로고는 왼쪽, 버튼 묶음은 오른쪽 */
  .header-actions { margin-left: auto; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: grid; }
  .filter-toggle { display: inline-flex; }
  .pdetail { grid-template-columns: 1fr; }
  .pside { position: static; }
  .layout-side { grid-template-columns: 1fr; }
  .side-nav { position: static; display: flex; overflow-x: auto; padding: 6px; gap: 4px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a { white-space: nowrap; flex-shrink: 0; }
  .side-nav .sep { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; inset: 0 auto 0 0; width: 268px; z-index: 80; transform: translateX(-100%); visibility: hidden; transition: transform .3s cubic-bezier(.32, .72, 0, 1), visibility 0s linear .3s; box-shadow: var(--shadow-lg); }
  .admin-shell.open .admin-side { transform: none; visibility: visible; transition: transform .3s cubic-bezier(.32, .72, 0, 1), visibility 0s; }
  .admin-shell::after { content: ''; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  .admin-shell.open::after { opacity: 1; pointer-events: auto; }
  .admin-menu-toggle { display: inline-grid; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .header-inner { gap: 10px; }
  .logo-text { display: none; }
  .points-chip { padding: 6px 10px; font-size: .84rem; }
  .card { padding: 18px; border-radius: 14px; }
  .form-row { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 64px 1fr; gap: 12px; }
  .prow .picon { width: 64px; height: 64px; border-radius: 14px; font-size: 1.5rem; }
  .prow-side { grid-column: 1 / -1; display: flex; justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--divider); padding-top: 10px; }
  .pcard { grid-template-columns: 60px 1fr; }
  .pcard-icon { width: 60px; height: 60px; border-radius: 13px; }
  .phead { grid-template-columns: 76px 1fr; gap: 14px; }
  .phead .picon { width: 76px; height: 76px; border-radius: 16px; font-size: 1.8rem; }
  .phead-actions { grid-column: 1 / -1; justify-items: stretch; }
  .phead-actions .btn { width: 100%; }
  .hero-search input { padding: 14px 84px 14px 44px; font-size: 1rem; }
  .hero-search-field > .icon { left: 15px; width: 18px; height: 18px; }
  .hero-search .btn { right: 6px; top: 6px; bottom: 6px; padding: 0 16px; border-radius: 11px; }
  .browse-toolbar .select { flex: 1; }
  .table th, .table td { padding: 11px 12px; }
  .stat .value { font-size: 1.35rem; }
  .bar-chart span { display: none; }
  .backup-codes { grid-template-columns: 1fr 1fr; font-size: .85rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .toolbar .input, .toolbar .select, .toolbar .btn { flex: 1 1 100%; width: 100%; }
}

/* 모바일 메뉴 */
.mobile-menu { display: none; padding-block: 12px 16px; border-top: 1px solid var(--divider); gap: 6px; }
.mobile-menu form { position: relative; margin-bottom: 6px; }
.mobile-menu form .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.mobile-menu form input { padding-left: 40px; }
.mobile-menu a { padding: 11px 12px; border-radius: 10px; color: var(--text-strong); font-weight: 700; display: flex; gap: 10px; align-items: center; }
.mobile-menu a:hover { background: var(--button); text-decoration: none; }
@media (min-width: 961px) { .mobile-menu { display: none !important; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* ───────── 메뉴 열기/닫기 애니메이션 ───────── */
.menu-toggle { position: relative; }
.menu-toggle .mt-icon { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s ease, transform .3s cubic-bezier(.32, .72, 0, 1); }
.menu-toggle .mt-close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.site-header.open .menu-toggle .mt-open { opacity: 0; transform: rotate(90deg) scale(.6); }
.site-header.open .menu-toggle .mt-close { opacity: 1; transform: none; }
@media (max-width: 960px) {
  /* 닫힌 상태: 높이 0 + 투명. 열면 위에서부터 부드럽게 펼쳐짐 */
  .mobile-menu {
    display: grid; max-height: 0; opacity: 0; transform: translateY(-8px);
    padding-block: 0; overflow: hidden; visibility: hidden; border-top-color: transparent;
    transition: max-height .3s cubic-bezier(.32, .72, 0, 1), opacity .2s ease, transform .3s cubic-bezier(.32, .72, 0, 1), padding .3s cubic-bezier(.32, .72, 0, 1), border-color .3s, visibility 0s linear .3s;
  }
  .site-header.open .mobile-menu {
    max-height: calc(100vh - var(--header-h)); opacity: 1; transform: none;
    padding-block: 12px 16px; visibility: visible; border-top-color: var(--divider);
    transition: max-height .4s cubic-bezier(.32, .72, 0, 1), opacity .25s ease .05s, transform .35s cubic-bezier(.32, .72, 0, 1), padding .3s cubic-bezier(.32, .72, 0, 1), border-color .3s, visibility 0s;
  }
  /* 다 열린 뒤에는 검색 자동완성 목록이 잘리지 않도록 */
  .site-header.opened .mobile-menu { overflow: visible; }
  /* 메뉴 항목이 차례로 나타남 */
  .mobile-menu > * { opacity: 0; transform: translateY(-4px); transition: opacity .2s ease, transform .25s ease; }
  .site-header.open .mobile-menu > * { opacity: 1; transform: none; }
  .site-header.open .mobile-menu > :nth-child(1) { transition-delay: .04s; }
  .site-header.open .mobile-menu > :nth-child(2) { transition-delay: .07s; }
  .site-header.open .mobile-menu > :nth-child(3) { transition-delay: .1s; }
  .site-header.open .mobile-menu > :nth-child(4) { transition-delay: .13s; }
  .site-header.open .mobile-menu > :nth-child(5) { transition-delay: .16s; }
  .site-header.open .mobile-menu > :nth-child(6) { transition-delay: .19s; }
}
@media (prefers-reduced-motion: reduce) {
  .mobile-menu, .mobile-menu > *, .menu-toggle .mt-icon, .admin-side, .admin-shell::after { transition: none !important; }
  details.dropdown[open] > .dropdown-menu, details.dropdown.closing > .dropdown-menu { animation: none !important; }
}

/* ───────── 표 ⋯ 처리 메뉴 (아래로 펼쳐지는 카드) ───────── */
.action-menu { display: inline-block; }
.more-btn { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--button); color: var(--text-strong); transition: background .15s; }
.more-btn:hover, .action-menu[open] > .more-btn { background: var(--button-hover); }
.action-menu[open] > .more-btn { box-shadow: 0 0 0 2px var(--brand); }
.pop-card { position: fixed; z-index: 90; width: 300px; max-width: calc(100vw - 16px); background: var(--raised); border: 1px solid var(--divider); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 12px; text-align: left; white-space: normal; transform-origin: top right; }
.pop-card.up { transform-origin: bottom right; }
.pop-head { display: grid; gap: 2px; padding: 2px 4px 10px; margin-bottom: 10px; border-bottom: 1px solid var(--divider); }
.pop-head strong { color: var(--text-strong); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-card .action-stack { width: 100%; margin: 0; }
.pop-card, .pop-card * { box-sizing: border-box; }
.pop-card { overflow-wrap: anywhere; }
.pop-list { display: grid; gap: 2px; }
.pop-list a, .pop-list button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.pop-list a:hover, .pop-list button:hover { background: var(--button); color: var(--text-strong); text-decoration: none; }
.pop-list .danger { color: var(--red); }
.pop-list .danger:hover { background: var(--red-soft); color: var(--red); }
details.dropdown[open] > .pop-card { animation: pop-in .2s cubic-bezier(.2, .8, .2, 1); }
details.dropdown.closing > .pop-card { animation: pop-out .14s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px) scale(.96); } }
details.dropdown[open] > .pop-card.up { animation-name: pop-in-up; }
details.dropdown.closing > .pop-card.up { animation-name: pop-out-up; }
@keyframes pop-in-up { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes pop-out-up { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { details.dropdown > .pop-card { animation: none !important; } }

/* ───────── 테마 전환 애니메이션 ───────── */
.theme-btn { position: relative; overflow: hidden; }
.theme-btn .ti { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .3s ease, transform .5s cubic-bezier(.32, .72, 0, 1); }
.theme-btn .ti-moon { opacity: 0; transform: rotate(-90deg) scale(.4); }
:root[data-theme="light"] .theme-btn .ti-sun { opacity: 0; transform: rotate(90deg) scale(.4); }
:root[data-theme="light"] .theme-btn .ti-moon { opacity: 1; transform: none; }
/* View Transitions: 새 테마가 원형으로 퍼짐 */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
/* 대체 방식: 색상 부드럽게 전환 */
:root.theme-fade, :root.theme-fade *, :root.theme-fade *::before, :root.theme-fade *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease, box-shadow .4s ease !important;
}
@media (prefers-reduced-motion: reduce) { .theme-btn .ti { transition: none; } }

/* ───────── 테마 버튼: 화면 오른쪽 아래 고정 ───────── */
.theme-fab {
  position: fixed; z-index: 60;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--divider);
  background: var(--raised); color: var(--text-strong); cursor: pointer;
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.theme-fab:hover { background: var(--button-hover); transform: translateY(-2px); }
.theme-fab:active { transform: scale(.94); }
.theme-fab .icon { width: 20px; height: 20px; }
/* 맨 아래 내용(푸터 등)이 버튼에 가리지 않도록 */
.site-footer, .admin-content { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
@media (prefers-reduced-motion: reduce) { .theme-fab { transition: none; } }

/* ───────── 검색 결과창 애니메이션 ───────── */
.suggest { transform-origin: top center; }
.suggest.anim-in { animation: suggest-in .22s cubic-bezier(.2, .8, .2, 1); }
.suggest.closing { animation: suggest-out .15s ease-in forwards; pointer-events: none; }
@keyframes suggest-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes suggest-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-6px) scale(.98); } }
/* 결과 항목이 위에서부터 차례로 나타남 */
.suggest.anim-in > * { animation: suggest-item-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.suggest.anim-in > :nth-child(1) { animation-delay: .03s; }
.suggest.anim-in > :nth-child(2) { animation-delay: .06s; }
.suggest.anim-in > :nth-child(3) { animation-delay: .09s; }
.suggest.anim-in > :nth-child(4) { animation-delay: .12s; }
.suggest.anim-in > :nth-child(5) { animation-delay: .15s; }
.suggest.anim-in > :nth-child(6) { animation-delay: .18s; }
.suggest.anim-in > :nth-child(7) { animation-delay: .21s; }
@keyframes suggest-item-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .suggest.anim-in, .suggest.anim-in > *, .suggest.closing { animation: none !important; } }

/* ───────── 버전 목록 (Modrinth 스타일) ───────── */
.version-list { padding: 4px 0; }
.vrow { display: grid; grid-template-columns: 52px minmax(0, 2.2fr) minmax(0, 1.3fr) minmax(0, 1.4fr) minmax(0, .9fr) minmax(0, .8fr); gap: 4px 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--divider); }
.vrow:first-child { border-top: 0; }
.vrow.vhead { padding-block: 10px; font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; background: var(--raised-2); }
.vrow:not(.vhead):hover { background: color-mix(in srgb, var(--button) 35%, transparent); }
.vdl-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); border: 0; cursor: pointer; transition: filter .15s, transform .1s; }
.vdl-btn:hover { filter: brightness(1.1); text-decoration: none; }
.vdl-btn:active { transform: scale(.94); }
.vdl-btn.locked { background: var(--button); color: var(--text-muted); }
.vname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vname-text { min-width: 0; }
.vname-text strong { color: var(--text-strong); font-size: 1.02rem; }
.vname-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 900; font-size: .8rem; flex-shrink: 0; }
.ch.ch-release { background: var(--brand-soft); color: var(--brand); }
.ch.ch-beta { background: var(--orange-soft); color: var(--orange); }
.ch.ch-alpha { background: var(--red-soft); color: var(--red); }
.vgame, .vdate, .vcount { font-size: .9rem; color: var(--text); }
.vcount { font-weight: 700; color: var(--text-strong); }
.vload { display: flex; flex-wrap: wrap; gap: 4px; }
.vload .pill { font-size: .74rem; padding: 2px 9px; }
.vchangelog { grid-column: 2 / -1; margin-top: 4px; }
.vchangelog > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; font-weight: 700; color: var(--brand); list-style: none; }
.vchangelog > summary::-webkit-details-marker { display: none; }
.vchangelog[open] > summary { margin-bottom: 8px; }
.vchangelog .prose { background: var(--raised-2); border-radius: 10px; padding: 12px 14px; font-size: .92rem; }
.vchangelog[open] .prose { animation: suggest-in .2s cubic-bezier(.2, .8, .2, 1); }
.pop-form { display: grid; gap: 6px; }
.pop-form-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px; gap: 6px; }
.pop-form .input, .pop-form .select { padding: 7px 10px; font-size: .88rem; border-radius: 9px; min-width: 0; }
.pop-form .select { padding-right: 28px; background-position: right 10px center; }
.pop-form .textarea { min-height: 80px; font-size: .86rem; padding: 8px 10px; border-radius: 9px; }
@media (max-width: 760px) {
  .vrow.vhead { display: none; }
  .vrow { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "dl name count" "dl game game" "dl load load"; gap: 6px 12px; align-items: start; }
  .vdl { grid-area: dl; } .vname { grid-area: name; } .vcount { grid-area: count; text-align: right; }
  .vgame { grid-area: game; font-size: .84rem; color: var(--text-muted); }
  .vload { grid-area: load; }
  .vdate { display: none; }
  .vcount::after { content: ' 다운로드'; font-weight: 500; color: var(--text-muted); font-size: .8rem; }
  .vchangelog { grid-column: 1 / -1; }
}

/* ───────── 비밀번호 표시 버튼 (입력칸 안쪽 오른쪽) ───────── */
.pw-wrap { position: relative; display: block; }
.pw-wrap > .input { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--text-muted); display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s; }
.pw-toggle:hover { background: var(--button-hover); color: var(--text-strong); }
.pw-toggle[aria-pressed="true"] { color: var(--brand); }
.pw-toggle .icon { width: 18px; height: 18px; }
/* 브라우저 기본 비밀번호 표시 아이콘(Edge 등) 숨김 → 버튼 중복 방지 */
.pw-wrap > input::-ms-reveal, .pw-wrap > input::-ms-clear { display: none; }

/* ───────── 프로필 (아바타 · 닉네임) ───────── */
.avatar { overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-sm { width: 28px; height: 28px; font-size: .8rem; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 44px; height: 44px; font-size: 1.1rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 2.6rem; box-shadow: 0 0 0 4px var(--raised), 0 0 0 6px var(--divider); }
.dm-head { display: flex; align-items: center; gap: 10px; }
.dm-name { min-width: 0; }
.dm-name .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title h1.hello { display: flex; align-items: center; gap: 12px; }
.user-cell { display: inline-flex; align-items: center; gap: 8px; }
.profile-grid { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
.profile-avatar { display: grid; justify-items: center; gap: 8px; text-align: center; }
.profile-avatar .avatar-xl { margin-bottom: 6px; }
.profile-avatar label.btn { cursor: pointer; }
.nick-status { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; font-size: .88rem; font-weight: 600; }
.nick-status .icon { margin-top: 2px; }
.nick-status.ok { background: var(--brand-soft); color: var(--brand); }
.nick-status.wait { background: var(--orange-soft); color: var(--orange); }
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } }

/* ───────── 역할 뱃지 ───────── */
:root { --pink: #ff5ca8; --pink-soft: rgba(255, 92, 168, .13); }
:root[data-theme="light"] { --pink: #d6337f; --pink-soft: rgba(214, 51, 127, .1); }
.badge-pink { background: var(--pink-soft); color: var(--pink); }
.role-badges { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.role-badges .badge .icon { width: 12px; height: 12px; }
.kv dd .role-badges { justify-content: flex-end; }

/* 회원 목록: 아바타 | (아이디 (닉네임) / 이메일) — 아이디·닉네임은 같은 글자 기준선 */
.member-cell { display: flex; align-items: center; gap: 10px; color: inherit; min-width: 200px; }
.member-cell:hover { text-decoration: none; }
.member-cell:hover .member-name strong { color: var(--brand); }
.member-cell .avatar-sm { width: 34px; height: 34px; font-size: .9rem; }
.member-text { display: grid; gap: 1px; min-width: 0; }
.member-name { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; line-height: 1.35; }
.member-email { line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ───────── 상품 머리말 (Modrinth 스타일) ───────── */
.phead2 { display: grid; gap: 14px; margin-bottom: 22px; }
.phead-top { display: flex; align-items: center; gap: 18px; min-width: 0; }
.phead-top .picon { width: 96px; height: 96px; border-radius: 20px; font-size: 2.4rem; box-shadow: var(--shadow); flex-shrink: 0; }
.phead-text { min-width: 0; }
.phead-text h1 { margin: 0 0 4px; line-height: 1.2; }
.phead-text p { margin: 0; color: var(--text); font-size: 1.02rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.phead-btns { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.phead-btns form { margin: 0; display: contents; }
.circle-btn { width: 48px; height: 48px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--button); color: var(--text-strong); border: 0; cursor: pointer; position: relative; transition: background .15s, transform .1s, color .15s; list-style: none; }
.circle-btn::-webkit-details-marker { display: none; }
.circle-btn:hover { background: var(--button-hover); text-decoration: none; }
.circle-btn:active { transform: scale(.94); }
.circle-btn .icon { width: 22px; height: 22px; }
.circle-btn.primary { background: var(--brand); color: var(--brand-ink); }
.circle-btn.primary:hover { filter: brightness(1.08); }
.circle-btn.on { color: var(--brand); }
.circle-btn.on .icon { fill: currentColor; }
.circle-btn.on[data-toggle-kind="follow"] .icon, form[data-toggle="follow"] .circle-btn.on { color: var(--pink); }
.action-menu[open] > .circle-btn { background: var(--button-hover); box-shadow: 0 0 0 2px var(--brand); }
.phead-stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-muted); font-size: .95rem; padding-bottom: 16px; border-bottom: 1px solid var(--divider); }
.phead-stats span, .phead-stats a { display: inline-flex; align-items: center; gap: 6px; color: inherit; }
.phead-stats strong { color: var(--text-strong); }
.stat-rating .star { font-size: 1rem; }
/* 말풍선 (Modrinth "Save" 툴팁) */
[data-tip] { position: relative; }
@media (hover: hover) {
  [data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translate(-50%, 4px); background: var(--raised); color: var(--text-strong); border: 1px solid var(--divider); box-shadow: var(--shadow-lg); padding: 6px 10px; border-radius: 10px; font-size: .82rem; font-weight: 700; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s, transform .15s; z-index: 30; }
  [data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }
  .action-menu[open] > [data-tip]::after { display: none; }
}
/* ⋮ 메뉴 카드: 버튼을 가리키는 꼬리 */
.pop-menu { width: 240px; padding: 8px; }
.pop-menu::before { content: ''; position: absolute; top: -7px; left: var(--caret-x, 24px); width: 12px; height: 12px; background: var(--raised); border-left: 1px solid var(--divider); border-top: 1px solid var(--divider); transform: translateX(-50%) rotate(45deg); }
.pop-menu.up::before { top: auto; bottom: -7px; transform: translateX(-50%) rotate(225deg); }
.pop-menu .pop-list button[disabled] { opacity: .55; cursor: not-allowed; }

/* ───────── 버전 필터 + 페이지 ───────── */
.vfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.vfilter .select { width: auto; min-width: 150px; padding-block: 8px; }
.vfilter-pages { margin-left: auto; }
.vfilter-pages .pagination { margin: 0; }
.vfilter-pages .pagination a, .vfilter-pages .pagination span { min-width: 36px; height: 36px; }

/* ───────── 버전 카드 (Modrinth 스타일) ───────── */
.vcards { display: grid; gap: 10px; }
.vcard { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1.6fr) minmax(0, 1.6fr) auto; gap: 6px 16px; align-items: center; background: var(--raised); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.vcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.vcard-link { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.vcard-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.vcard-dl { position: relative; z-index: 2; }
.vcard-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vcard-title strong { color: var(--text-strong); font-size: 1.05rem; }
.vcard-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.vcard-tags { display: grid; gap: 6px; min-width: 0; }
.vcard-tags .small { display: flex; align-items: center; gap: 6px; color: var(--text); }
.vcard-tags .pill { font-size: .74rem; padding: 2px 9px; }
.vcard-meta { display: grid; gap: 4px; justify-items: end; white-space: nowrap; }
.vcard-meta span { display: inline-flex; align-items: center; gap: 5px; }
.ch-pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.ch-pill.ch-release { background: var(--brand-soft); color: var(--brand); }
.ch-pill.ch-beta { background: var(--orange-soft); color: var(--orange); }
.ch-pill.ch-alpha { background: var(--red-soft); color: var(--red); }
@media (max-width: 760px) {
  .vcard { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "dl main meta" "dl tags tags"; align-items: start; }
  .vcard-dl { grid-area: dl; } .vcard-main { grid-area: main; } .vcard-meta { grid-area: meta; } .vcard-tags { grid-area: tags; }
  .vfilter .select { flex: 1 1 140px; }
  .vfilter-pages { margin-left: 0; width: 100%; }
}

/* ───────── 변경 사항 타임라인 ───────── */
.clog { position: relative; display: grid; gap: 14px; padding-left: 26px; }
.clog::before { content: ''; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--divider); border-radius: 2px; }
.clog-item { position: relative; padding: 14px 16px 16px; border-radius: var(--radius); background: var(--brand-soft); }
.clog-item.ch-beta { background: var(--orange-soft); }
.clog-item.ch-alpha { background: var(--red-soft); }
.clog-dot { position: absolute; left: -26px; top: 18px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--bg); background: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.clog-item.ch-beta .clog-dot { background: var(--orange); box-shadow: 0 0 0 2px var(--orange-soft); }
.clog-item.ch-alpha .clog-dot { background: var(--red); box-shadow: 0 0 0 2px var(--red-soft); }
.clog-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.clog-title { color: var(--text-strong); font-weight: 800; font-size: 1.12rem; }
.clog-dl { margin-left: auto; }
.clog-body { background: var(--raised); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); margin: 0; }
.clog-empty { font-style: italic; }

/* ───────── 버전 상세 ───────── */
.vdetail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.vfile { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--raised-2); border: 1px solid var(--divider); }
.vfile > .icon { width: 22px; height: 22px; color: var(--brand); }

/* ───────── 리뷰 ───────── */
.star { color: var(--divider); }
.star.on { color: #ffb800; }
.star.half { background: linear-gradient(90deg, #ffb800 50%, var(--divider) 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars { letter-spacing: 1px; font-size: 1.1rem; line-height: 1; }
.stars.small { font-size: .9rem; margin-top: 2px; }
.rv-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.rv-avg { display: grid; justify-items: center; gap: 4px; }
.rv-avg strong { font-size: 2.6rem; color: var(--text-strong); line-height: 1; }
.rv-dist { display: grid; gap: 5px; }
.rv-bar { display: grid; grid-template-columns: 32px 1fr 28px; align-items: center; gap: 8px; font-size: .84rem; }
.rv-bar i { height: 8px; border-radius: 99px; background: var(--button); overflow: hidden; }
.rv-bar b { display: block; height: 100%; background: #ffb800; border-radius: inherit; }
.rv-cta { display: grid; gap: 6px; justify-items: center; text-align: center; }
.rv-list { display: grid; gap: 12px; margin-top: 16px; }
.rv-item.mine { box-shadow: 0 0 0 2px var(--brand-soft), var(--shadow); }
.rv-head { display: flex; align-items: center; gap: 10px; }
.rv-date { margin-left: auto; }
.rv-body { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text-strong); }
.star-input { border: 0; padding: 0; margin: 0; display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 2px; }
.star-input legend { margin-bottom: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { font-size: 2rem; color: var(--divider); cursor: pointer; transition: color .1s, transform .1s; line-height: 1; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #ffb800; }
.star-input label:active { transform: scale(.9); }
.star-input input:focus-visible + label { outline: 2px solid var(--brand); border-radius: 4px; }
@media (max-width: 640px) { .rv-summary { grid-template-columns: 1fr; justify-items: stretch; } .rv-avg, .rv-cta { justify-items: center; } }

/* ───────── 지원 환경 / 링크 ───────── */
.env-list { display: flex; gap: 8px; flex-wrap: wrap; }
.env { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: var(--button); color: var(--text-strong); font-weight: 700; font-size: .88rem; }
.link-list { display: grid; gap: 8px; }
.link-btn { justify-content: flex-start; }
.link-btn .ext { margin-left: auto; width: 14px; height: 14px; opacity: .6; }

@media (max-width: 640px) {
  .phead-top .picon { width: 76px; height: 76px; border-radius: 16px; font-size: 1.8rem; }
  .circle-btn { width: 46px; height: 46px; }
}

.phead-stats .stat-price strong { color: var(--text-strong); }
.phead-stats .stat-price.free strong { color: var(--brand); }
.phead-stats .badge { align-self: center; }

/* ───────── 테마 맞춤 선택 드롭다운 (버전 필터) ───────── */
.msel { position: relative; }
.msel-btn { display: inline-flex; align-items: center; gap: 8px; min-width: 150px; max-width: 240px; padding: 9px 12px 9px 14px; border-radius: 12px; background: var(--button); color: var(--text-strong); font-weight: 600; font-size: .92rem; cursor: pointer; list-style: none; border: 1.5px solid transparent; transition: background .15s, border-color .15s; user-select: none; }
.msel-btn::-webkit-details-marker { display: none; }
.msel-btn:hover { background: var(--button-hover); }
.msel[open] > .msel-btn { border-color: var(--brand); background: var(--raised-2); }
.msel.has-value > .msel-btn { color: var(--brand); background: var(--brand-soft); }
.msel-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: .74rem; font-weight: 800; display: inline-grid; place-items: center; }
.msel-chev { width: 16px; height: 16px; flex-shrink: 0; transition: transform .2s; opacity: .8; }
.msel[open] .msel-chev { transform: rotate(180deg); }
.msel-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; width: max(100%, 230px); background: var(--raised); border: 1px solid var(--divider); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 6px; transform-origin: top left; }
details.dropdown.msel[open] > .msel-panel { animation: pop-in .18s cubic-bezier(.2, .8, .2, 1); }
details.dropdown.msel.closing > .msel-panel { animation: pop-out .14s ease-in forwards; }
.msel-search { width: 100%; padding: 8px 10px; border-radius: 9px; border: 1.5px solid transparent; background: var(--button); color: var(--text-strong); font: inherit; font-size: .88rem; }
.msel-search:focus { outline: none; border-color: var(--brand); }
.msel-options { max-height: 260px; overflow-y: auto; display: grid; gap: 1px; overscroll-behavior: contain; }
.msel-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; color: var(--text); font-weight: 600; font-size: .9rem; }
.msel-opt:hover { background: var(--button); color: var(--text-strong); }
.msel-opt input { position: absolute; opacity: 0; pointer-events: none; }
.msel-mark { width: 18px; height: 18px; border-radius: 5px; border: 2px solid var(--divider); display: grid; place-items: center; flex-shrink: 0; transition: background .12s, border-color .12s; }
.msel-mark.radio { border-radius: 50%; }
.msel-opt input:checked + .msel-mark { background: var(--brand); border-color: var(--brand); }
.msel-opt input:checked + .msel-mark::after { content: ''; width: 9px; height: 5px; border: 2.2px solid var(--brand-ink); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.msel-opt input:checked + .msel-mark.radio::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: var(--brand-ink); transform: none; }
.msel-opt input:checked ~ span:last-child { color: var(--text-strong); }
.msel-opt input:focus-visible + .msel-mark { outline: 2px solid var(--brand); outline-offset: 2px; }
.msel-empty { padding: 10px; text-align: center; color: var(--text-muted); font-size: .86rem; }
.msel-foot { display: flex; justify-content: flex-end; gap: 6px; border-top: 1px solid var(--divider); padding-top: 8px; }
.msel-foot .btn-primary { min-width: 64px; }
@media (max-width: 760px) {
  .vfilter .msel { flex: 1 1 140px; }
  .msel-btn { width: 100%; max-width: none; min-width: 0; }
  .msel-panel { width: max(100%, 220px); }
  .vfilter .msel:nth-child(even) .msel-panel { left: auto; right: 0; transform-origin: top right; }
}
@media (prefers-reduced-motion: reduce) { details.dropdown.msel > .msel-panel { animation: none !important; } .msel-chev { transition: none; } }

/* 버전 카드: 구매 전(유료) 구매 버튼 */
.vdl-btn.buy { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.vdl-btn.buy:hover { background: var(--brand); color: var(--brand-ink); }

/* 가격: 유료 = 포인트(동전) 아이콘, 무료 = 선물 아이콘(초록) */
.phead-stats .stat-price .icon { color: #ffb800; }
.phead-stats .stat-price.free .icon, .phead-stats .stat-price.free strong { color: var(--brand); }

/* 촘촘한 표 (버전 관리 · 등록된 버전): 한 버전 = 한 줄 */
.table-compact th { padding: 9px 14px; }
.table-compact td { padding: 8px 14px; line-height: 1.35; }
.table-compact .vrow-name { display: inline-flex; align-items: center; gap: 6px; }
.table-compact .clip { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-compact .more-btn { width: 32px; height: 32px; }

/* 상품 수정 화면 ⋮ (위로 열리는 통계 초기화 메뉴) */
.more-btn-lg { width: 48px; height: 48px; border-radius: 14px; }
.more-btn-lg .icon { width: 20px; height: 20px; }
.pop-menu .pop-head { padding-top: 4px; }
.pop-count { margin-left: auto; font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--button); color: var(--text-muted); }
.pop-list .danger:hover .pop-count { background: transparent; color: inherit; }

/* ───────── 상품 카드 (Modrinth 검색 결과 스타일) ───────── */
.mlist { display: grid; gap: 12px; }
.mcard { display: grid; gap: 4px 18px; background: var(--raised); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s, outline-color .15s; outline: 1.5px solid transparent; min-width: 0; }
.mcard:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); outline-color: var(--divider); }
.mcard:focus-visible { outline: 2px solid var(--brand); }
.mcard-icon { grid-area: icon; width: 96px; height: 96px; border-radius: 18px; object-fit: cover; background: var(--button); display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; color: var(--text-muted); border: 1px solid var(--divider); }
.mcard-head { grid-area: head; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mcard-title { margin: 0; font-size: 1.22rem; font-weight: 800; color: var(--text-strong); line-height: 1.25; min-width: 0; }
.mcard:hover .mcard-title { color: var(--brand); }
.mcard-by { font-size: .88rem; color: var(--text-muted); }
.mcard-desc { grid-area: desc; margin: 0; font-size: .95rem; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-tags { grid-area: tags; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; }
.mtag { display: inline-flex; align-items: center; gap: 5px; font-size: .84rem; font-weight: 600; color: var(--text-muted); }
.mtag .icon { width: 14px; height: 14px; }
.mtag-loader { padding: 1px 8px; border-radius: 6px; background: var(--button); color: var(--text); font-size: .78rem; }
.mcard-stats { grid-area: stats; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: .9rem; color: var(--text-muted); white-space: nowrap; }
.ms { display: inline-flex; align-items: center; gap: 6px; }
.ms .icon { width: 16px; height: 16px; }
.ms strong { color: var(--text-strong); font-size: 1rem; }
.ms-dl strong { font-size: 1.08rem; }
.ms-price .icon { color: #ffb800; }
.ms-price.free .icon, .ms-price.free strong { color: var(--brand); }
.ms-upd { margin-top: auto; font-size: .84rem; }
/* 목록형: 아이콘 | 제목·설명·태그 | 통계 */
.mcard-row { grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "icon head stats" "icon desc stats" "icon tags stats"; align-items: start; }
/* 격자형 (홈 · 저장·팔로우 · 비슷한 상품) */
.mcard-grid { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "icon head" "icon desc" "tags tags" "stats stats"; align-content: start; }
.mcard-grid .mcard-icon { width: 64px; height: 64px; border-radius: 14px; font-size: 1.6rem; }
.mcard-grid .mcard-title { font-size: 1.08rem; }
.mcard-grid .mcard-head { flex-direction: column; gap: 0; }
.mcard-grid .mcard-desc { font-size: .9rem; }
.mcard-grid .mcard-stats { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; border-top: 1px solid var(--divider); padding-top: 10px; margin-top: 8px; font-size: .84rem; }
.mcard-grid .ms .ms-label { display: none; }
.mcard-grid .ms strong { font-size: .92rem; }
.mcard-grid .ms-upd { margin: 0 0 0 auto; }
@media (max-width: 760px) {
  .mcard-row { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "icon head" "icon desc" "tags tags" "stats stats"; }
  .mcard-row .mcard-icon { width: 64px; height: 64px; border-radius: 14px; font-size: 1.6rem; }
  .mcard-row .mcard-head { flex-direction: column; gap: 0; }
  .mcard-row .mcard-title { font-size: 1.08rem; }
  .mcard-row .mcard-stats { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 14px; border-top: 1px solid var(--divider); padding-top: 10px; margin-top: 8px; font-size: .84rem; }
  .mcard-row .ms .ms-label { display: none; }
  .mcard-row .ms-upd { margin: 0 0 0 auto; }
}

/* ───────── 테마 맞춤 확인/알림 모달 ───────── */
dialog.ui-dialog { width: min(420px, calc(100vw - 32px)); text-align: center; }
dialog.ui-dialog[open] { animation: pop-in .2s cubic-bezier(.2, .8, .2, 1); }
dialog.ui-dialog[open]::backdrop { animation: backdrop-in .2s ease; }
dialog.ui-dialog.closing { animation: pop-out .14s ease-in forwards; }
dialog.ui-dialog.closing::backdrop { animation: backdrop-out .14s ease-in forwards; }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.ui-dialog .modal-body { padding: 26px 24px 20px; }
.ui-dialog-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); }
.ui-dialog-icon svg { width: 26px; height: 26px; }
.ui-dialog.tone-danger .ui-dialog-icon { background: var(--red-soft); color: var(--red); }
.ui-dialog.tone-default .ui-dialog-icon { background: var(--brand-soft); color: var(--brand); }
.ui-dialog h3 { margin: 0 0 8px; font-size: 1.15rem; }
.ui-dialog-msg { margin: 0; color: var(--text); white-space: pre-line; overflow-wrap: anywhere; line-height: 1.6; }
.ui-dialog .modal-actions { justify-content: stretch; margin-top: 22px; }
.ui-dialog .modal-actions .btn { flex: 1; }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.08); background: var(--red); }
@media (prefers-reduced-motion: reduce) { dialog.ui-dialog, dialog.ui-dialog::backdrop { animation: none !important; } }

/* 변경 사항 카드 안 본문 */
.clog-item .clog-body { box-shadow: none; }

/* 제목 왼쪽 유료/무료 태그 */
.price-tag { display: inline-flex; align-items: center; vertical-align: middle; padding: 2px 9px; margin-right: 8px; border-radius: 8px; font-size: .72rem; font-weight: 800; letter-spacing: .02em; line-height: 1.5; position: relative; top: -.12em; white-space: nowrap; }
.price-tag.paid { background: rgba(255, 184, 0, .14); color: #e0a100; box-shadow: inset 0 0 0 1px rgba(255, 184, 0, .35); }
.price-tag.free { background: var(--brand-soft); color: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent); }
:root[data-theme="light"] .price-tag.paid { color: #a26f00; }
.phead-text h1 .price-tag { font-size: .8rem; top: -.2em; }
.mcard-title { display: flex; align-items: center; flex-wrap: wrap; row-gap: 2px; }
.mcard-title .price-tag { top: 0; }

/* 둘러보기: 결과 수 + 위쪽 페이지 (Modrinth 처럼 목록 위 오른쪽 / 아래) */
.browse-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; min-height: 36px; }
.browse-pages .pagination { margin: 0; }
.browse-pages .pagination a, .browse-pages .pagination span { min-width: 36px; height: 36px; }
@media (max-width: 640px) { .browse-pages { width: 100%; } .browse-pages .pagination { justify-content: flex-start; } }

/* API 관리 */
.api-newkey { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.api-create { padding: 14px 20px 18px; border-top: 1px solid var(--divider); }
.api-docs h4 { margin: 1.4em 0 .4em; font-size: .98rem; }
.api-docs pre { margin: 0 0 .6em; font-size: .84rem; white-space: pre; }
.api-docs p { margin-bottom: .5em; }

/* ───────── 문서 사이트 (docs.mservice.kr) ───────── */
.docs-pill { margin-left: 4px; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .74rem; font-weight: 800; }
.docs-header .header-actions { margin-left: auto; }
.docs-user { display: inline-flex; align-items: center; gap: 8px; color: var(--text-strong); font-weight: 700; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--button); }
.docs-user:hover { text-decoration: none; background: var(--button-hover); }
.docs-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; padding-block: 28px 40px; align-items: start; }
.docs-side { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.docs-nav-toggle { display: none; list-style: none; }
.docs-nav-toggle::-webkit-details-marker { display: none; }
.docs-search { position: relative; margin-bottom: 12px; }
.docs-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.docs-search .input { padding: 9px 12px 9px 36px; font-size: .9rem; }
.docs-nav { display: grid; gap: 2px; }
.docs-nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: .92rem; }
.docs-nav a:hover { background: var(--button); color: var(--text-strong); text-decoration: none; }
.docs-nav a.active { background: var(--brand-soft); color: var(--brand); }
.docs-nav .docs-lock { width: 13px; height: 13px; margin-left: auto; opacity: .6; }
.docs-nav-group { margin-top: 12px; display: grid; gap: 2px; }
.docs-nav-label { font-size: .74rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); padding: 4px 10px; }
.docs-main { min-width: 0; }
.docs-hero h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 6px; }
.docs-cat { font-size: 1.05rem; margin: 26px 0 10px; }
.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.docs-card { display: grid; gap: 6px; background: var(--raised); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s; }
.docs-card:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.docs-card-title { display: flex; align-items: center; gap: 8px; color: var(--text-strong); }
.docs-card-title .icon { color: var(--brand); }
.docs-card p { margin: 0; }
.docs-badge { justify-self: start; display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 8px; font-size: .76rem; font-weight: 700; }
.docs-badge.paid { background: rgba(255, 184, 0, .14); color: #e0a100; }
.docs-badge.free { background: var(--brand-soft); color: var(--brand); }
a.docs-badge:hover { text-decoration: none; filter: brightness(1.1); }
.docs-page { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 32px; align-items: start; }
.docs-article { min-width: 0; }
.docs-crumb a { color: var(--text-muted); }
.docs-title { margin: 6px 0 6px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.docs-summary { font-size: 1.05rem; color: var(--text); margin-bottom: 14px; }
.docs-prose { font-size: 1rem; }
.docs-prose h2 { font-size: 1.4rem; margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--divider); scroll-margin-top: calc(var(--header-h) + 16px); }
.docs-prose h3 { font-size: 1.12rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.docs-prose pre { position: relative; }
.docs-prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 6px; right: 10px; font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.md-table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .92rem; }
.md-table th, .md-table td { border: 1px solid var(--divider); padding: 8px 12px; text-align: left; vertical-align: top; word-break: keep-all; }
.md-table th { background: var(--raised-2); color: var(--text-strong); }
.docs-pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; }
.docs-pager-link { display: grid; gap: 2px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--divider); color: var(--text-strong); min-width: 0; max-width: 48%; }
.docs-pager-link.next { text-align: right; margin-left: auto; }
.docs-pager-link:hover { text-decoration: none; border-color: var(--brand); }
.docs-toc { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 2px; font-size: .86rem; border-left: 2px solid var(--divider); padding-left: 12px; max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; }
.docs-toc .docs-nav-label { padding-left: 0; }
.docs-toc a { color: var(--text-muted); padding: 3px 0; }
.docs-toc a.lv3 { padding-left: 12px; }
.docs-toc a:hover, .docs-toc a.active { color: var(--brand); text-decoration: none; }
.docs-locked { text-align: center; padding: 40px 24px; max-width: 560px; margin: 20px auto; }
.docs-locked-icon { width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 184, 0, .14); color: #e0a100; }
.docs-locked-icon .icon { width: 28px; height: 28px; }
.docs-404 h1 { margin-top: 8px; }
.docs-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 20px calc(80px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--divider); color: var(--text-muted); font-size: .85rem; }
.docs-footer a { color: var(--text-muted); }
@media (max-width: 1100px) { .docs-page { grid-template-columns: 1fr; } .docs-toc { display: none; } }
@media (max-width: 860px) {
  .docs-shell { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .docs-side { position: static; max-height: none; background: var(--raised); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); }
  .docs-nav-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--text-strong); padding: 6px; }
  .docs-nav-box:not([open]) > :not(summary) { display: none; }
  .docs-nav-box[open] .docs-nav-toggle { margin-bottom: 8px; }
  .hide-sm { display: none; }
}

/* ───────── 공지 ───────── */
.notice-page { max-width: 900px; }
.notice-h-icon { color: var(--brand); width: 26px; height: 26px; margin-right: 8px; vertical-align: -4px; }
.notice-list { display: grid; gap: 10px; }
.notice-item { display: grid; gap: 6px; background: var(--raised); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: inherit; transition: box-shadow .15s, transform .15s; }
.notice-item:hover { text-decoration: none; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.notice-item.pinned { box-shadow: inset 3px 0 0 var(--brand), var(--shadow); }
.notice-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notice-head .badge .icon { width: 12px; height: 12px; }
.notice-title { color: var(--text-strong); font-size: 1.05rem; }
.notice-item:hover .notice-title { color: var(--brand); }
.notice-excerpt { margin: 0; color: var(--text-muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.notice-meta span { display: inline-flex; align-items: center; gap: 5px; }
.notice-meta .icon { width: 14px; height: 14px; }
.notice-h1 { margin: 8px 0 8px; }

/* ───────── 상품 탭: 초록 글자 + 아래 막대가 미끄러지듯 이동 ───────── */
.tabs-anim { position: relative; }
.tabs-anim a { transition: color .25s ease; border-bottom-color: transparent !important; }
.tabs-anim .tab-ink { position: absolute; bottom: -1px; left: 0; height: 3px; width: 0; border-radius: 3px 3px 0 0; background: var(--brand); pointer-events: none; transition: transform .32s cubic-bezier(.32, .72, 0, 1), width .32s cubic-bezier(.32, .72, 0, 1); }
.tabs-anim .tab-ink.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .tabs-anim .tab-ink, .tabs-anim a { transition: none !important; } }

/* 문서 사이트 프로필 버튼: 닉네임이 숨겨지는 좁은 화면에서는 사방 여백을 같게 (오른쪽만 길어 보이던 문제) */
@media (max-width: 860px) { .docs-user { padding: 4px; gap: 0; } }
/* 탭 막대 이동 속도를 페이지 이동 전에 끝나도록 맞춤 */
.tabs-anim .tab-ink { transition-duration: .28s, .28s; }

/* 관리자 문서관리 표: 제목·주소·연결 상품을 한 줄로 (좁은 화면에서 세로로 쌓이던 문제) */
.table .clip { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .clip-title { max-width: 260px; }
.table .clip-product { max-width: 200px; }

/* 분류 선택 드롭다운 (문서 작성) — 폼 너비에 맞춤 + 맨 아래 직접 입력칸 */
.csel { display: block; }
.csel > .msel-btn { width: 100%; max-width: none; padding: 11px 14px; border-radius: 12px; font-size: .95rem; }
.csel .msel-panel { width: 100%; }
.csel-custom { border-top: 1px solid var(--divider); padding-top: 8px; display: grid; gap: 6px; }
.csel-custom label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 0 4px; }
.csel-custom label .icon { width: 14px; height: 14px; }
.csel-custom .input { padding: 9px 12px; font-size: .9rem; }
.csel-custom .input:not(:placeholder-shown) { border-color: var(--brand); }
