/* tree. — 미니멀 화이트 테마 */
:root {
  --ink: #111827;
  --muted: #6B7280;
  --soft: #9CA3AF;
  --line: #E5E7EB;
  --line-strong: #D1D5DB;
  --bg: var(--surface);
  --panel: #FAFAFA;
  --hover: #F3F4F6;
  --danger: #DC2626;
  --danger-bg: #FEF2F2;
  --focus: #6366F1;
  --ok: #059669;
  --radius: 12px;
  --max: 1120px;
  --surface: #FFFFFF;        /* 카드·패널·입력창 바탕 */
  --surface-glass: rgba(255,255,255,.96); /* 반투명 헤더 */
  --ink-strong: #000;        /* 주 버튼 hover */
  --ink-2: #374151;          /* 긴 본문 글자 */
  --ink-3: #4B5563;          /* 보조 글자·선택된 세그먼트 */
  --ink-a75: rgba(17,24,39,.75); --ink-a60: rgba(17,24,39,.6); --ink-a45: rgba(17,24,39,.45); --ink-a40: rgba(17,24,39,.4); /* 어두운 덮개 */
  --brand: #0B0F89;          /* 로고 */
  --danger-line: #FECACA; --danger-ink: #B91C1C;
  --warn-bg: #FFFBEB; --warn-line: #FDE68A; --warn-ink: #B45309; --mark: #FEF3C7;
  --ok-bg: #F0FDF4; --ok-line: #BBF7D0; --ok-ink: #166534;
  --like: #E11D48;
  --link: #2563EB;           /* 글·댓글 안의 링크 */
  --kakao: #FEE500; --kakao-hover: #F5DC00; --kakao-ink: #191919; /* 카카오 로그인 버튼 (브랜드 색) */
  --chart-1: #2a78d6; --chart-1-strong: #1c5cab;                  /* 통계 차트 */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.3; }
p { margin: 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mobile-only { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 헤더 ---------- */
/* 페이지 전환: 페이지를 열 때 메인 콘텐츠만 Fade In + 12px Slide Up (헤더·로고는 고정).
   CSS 가 먼저 적용되어 첫 화면부터 투명하게 시작하므로 깜빡임이 없고, transform 이라 레이아웃도 움직이지 않는다 */
main { animation: page-in .45s ease-out backwards; } /* 끝난 뒤에는 transform 이 none 으로 돌아가 fixed 요소의 기준이 되지 않는다 */
@keyframes page-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { main { animation: none; } }

.hdr { border-bottom: 1px solid var(--line); background: var(--surface-glass); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30; }
.hdr .hdr-in { position: relative; }
.hdr-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 27px; letter-spacing: -0.03em; line-height: 1; color: var(--brand); }
.beta { font-size: 10px; font-weight: 700; letter-spacing: .1em; padding: 2px 7px; border: 1px solid var(--ink); border-radius: 999px; line-height: 1.5; }
.nav { display: flex; gap: 2px; }
.nav-head, .nav-backdrop { display: none; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--ink); background: var(--hover); }
.nav a.active { color: var(--ink); font-weight: 600; }
.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 0; }
.hdr-right .btn-text { padding: 0 8px; font-size: 13px; }
.hdr-right .icon-btn { width: 36px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: var(--ink); background: var(--hover); }
.hdr-menu-btn { display: none; }
.search-bar { display: none; border-top: 1px solid var(--line); background: var(--surface); }
.search-bar.show { display: block; }
.search-form { display: flex; align-items: center; gap: 10px; height: 56px; color: var(--soft); }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }

/* 언어 전환: KOR | ENG (모바일 KO | EN). 선택된 언어만 연한 배경 + 굵게 */
.lang-switch { display: inline-flex; align-items: center; gap: 1px; font-size: 12px; color: var(--line-strong); margin-left: 4px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font-weight: 500; font-size: 12px; letter-spacing: .02em; padding: 0 7px; height: 26px; border-radius: 6px; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { color: var(--ink); font-weight: 700; background: var(--hover); }
.lang-switch .short { display: none; }
.lang-switch.in-menu { display: none; }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s; }
.btn:hover { background: var(--hover); }
.btn-primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-strong); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-text { border-color: transparent; background: transparent; color: var(--muted); }
.btn-text:hover { color: var(--ink); background: var(--hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 히어로 ---------- */
.hero { padding: 64px 0 40px; }
.hero h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.035em; }
.hero p { margin-top: 12px; font-size: 17px; color: var(--muted); max-width: 720px; }
.hero-desc .line { display: inline; }
.hero h1 .lead { display: inline; }
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: 32px; font-weight: 700; }
.page-head p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* ---------- 생성기 레이아웃 ---------- */
.gen { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: start; padding-bottom: 96px; }
.gen-form { display: flex; flex-direction: column; gap: 48px; min-width: 0; }
.gen-side { position: sticky; top: 88px; min-width: 0; padding-top: 8px; } /* 프롬프트 종류 박스와 같은 높이에서 시작 */
.sec { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
.sec-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
#desc-title { padding-top: 9px; }
.sec-title small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 4px; }
.sec-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* 반영 안 함: 섹션 제목 아래 작은 토글. 켜면 섹션이 흐려지고 프롬프트에서 빠진다 */
.skip-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.skip-toggle::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.skip-toggle:hover { border-color: var(--line-strong); color: var(--ink); }
/* 선택하면 글자는 그대로 두고 동그라미만 진회색으로 채운다 */
.skip-toggle[aria-pressed="true"] { border-color: var(--soft); color: var(--ink-2); background: var(--surface); }
.skip-toggle[aria-pressed="true"]::before { border-color: var(--ink-3); background: var(--ink-3); }
.sec.off .sec-body { opacity: .38; pointer-events: none; user-select: none; filter: grayscale(.4); transition: opacity .15s; }
.preview-meta .tag.off, #preview-size.off { text-decoration: line-through; opacity: .55; }
:root { --control-h: 42px; --gap-x: 16px; --gap-y: 12px; }
.row { display: flex; gap: var(--gap-y) var(--gap-x); align-items: flex-end; flex-wrap: wrap; }
.row > * { min-width: 0; }
.col { display: flex; flex-direction: column; gap: 6px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > .input, .field > select.input, .field > .unit-wrap, .field > .color-field, .field > .seg { height: var(--control-h); }
.sep { display: inline-flex; align-items: center; justify-content: center; height: var(--control-h); color: var(--soft); width: 16px; }
label.lbl, .lbl { font-size: 13px; color: var(--muted); line-height: 18px; display: block; }

/* 입력 */
.input, textarea.input, select.input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; height: var(--control-h); background: var(--surface); outline: 0; transition: border-color .15s; }
.input:focus, textarea.input:focus, select.input:focus { border-color: var(--ink); }
textarea.input { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.6; }
.input.invalid { border-color: var(--danger); background: var(--danger-bg); }
.input-num { width: 96px; text-align: right; padding-right: 32px; }
.unit-wrap { position: relative; display: inline-flex; align-items: center; }
.unit-wrap .unit { position: absolute; right: 12px; font-size: 12px; color: var(--soft); pointer-events: none; }
.err { font-size: 13px; color: var(--danger); display: none; }
.err.show { display: block; }
.hint { font-size: 13px; color: var(--soft); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239CA3AF' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

/* 탭 */

/* 세그먼트 */
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--panel); gap: 2px; min-height: var(--control-h); max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 0 14px; height: 34px; flex: 1 0 auto; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }
.seg button:hover:not(.on) { color: var(--ink); }
/* 프롬프트 종류 탭(새 화면 · 디자인 수정 · 화면 흐름 추가): 화면 크기 선택과 같은 박스형 */
.seg-tabs { display: flex; width: 100%; margin-top: 8px; } /* 왼쪽 섹션 제목 글자 윗선에 박스 윗선을 맞춘다 */
.seg-tabs [role=tab] { flex: 1 1 auto; font-size: 13.5px; padding: 0 10px; white-space: nowrap; }
.seg-tabs [role=tab][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

/* 스타일 선택 */
.style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.style-card { text-align: left; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, box-shadow .15s; }
.style-card:hover { border-color: var(--line-strong); }
.style-card.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.style-card strong { font-size: 14px; font-weight: 600; }
.style-card span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.style-card .chip { width: 100%; height: 28px; border-radius: 6px; margin-bottom: 6px; border: 1px solid rgba(0,0,0,.06); }
.chip[data-s="minimal"], .mix-chip i[data-s="minimal"] { background: linear-gradient(90deg, #fff 60%, #F3F4F6 60%); }
.chip[data-s="glass"], .mix-chip i[data-s="glass"] { background: linear-gradient(120deg, #c7d2fe, #fbcfe8); position: relative; }
.chip[data-s="glass"]::after, .mix-chip i[data-s="glass"]::after { content: ""; position: absolute; inset: 5px 30% 5px 8px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); border-radius: 4px; }
.chip[data-s="neumorphism"], .mix-chip i[data-s="neumorphism"] { background: #E6E9F0; box-shadow: inset 3px 3px 6px rgba(0,0,0,.1), inset -3px -3px 6px #fff; }
.chip[data-s="dark"], .mix-chip i[data-s="dark"] { background: #0F172A; }
.chip[data-s="flat"], .mix-chip i[data-s="flat"] { background: linear-gradient(90deg, #F97316 33%, #0EA5E9 33% 66%, #10B981 66%); }
.chip[data-s="brutalism"], .mix-chip i[data-s="brutalism"] { background: #FFFDF5; border: 2px solid #000 !important; box-shadow: 3px 3px 0 #000; }
.chip[data-s="maximalism"], .mix-chip i[data-s="maximalism"] { background: repeating-linear-gradient(45deg, #F43F5E 0 6px, #FDE68A 6px 12px, #7C3AED 12px 18px); }

/* 스타일 혼합 */
.style-mix { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--panel); display: flex; flex-direction: column; gap: 12px; }
.style-mix-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.style-mix-label { font-size: 14px; font-weight: 600; }
.style-mix-row { display: grid; grid-template-columns: 1fr; gap: 14px; }
.style-mix-row > .field { max-width: 240px; }
.style-mix-row .field select.input { height: 38px; }
.ratio { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ratio .side { display: flex; flex-direction: column; gap: 4px; min-width: 0; align-items: flex-start; } /* 좁은 화면에서 입력칸이 늘어나 %가 떨어지지 않도록 */
.ratio .side .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.ratio .side .unit-wrap .input-num { width: 76px; height: 36px; padding-right: 26px; }
.ratio .side.right { text-align: right; align-items: flex-end; }
.ratio .track { min-width: 0; }
.ratio input[type="range"] { width: 100%; accent-color: var(--ink); margin: 0; height: 28px; display: block; }
.style-mix .hint { font-size: 12px; }
.style-card.second { border-color: var(--ink); border-style: dashed; }
/* 비율 조정 카드: 스타일 그리드의 마지막 칸. 혼합 중이면 두 스타일의 비율을 색 막대로 보여 준다 */
.style-card-add { border-style: dashed; background: var(--panel); }
.style-card-add:hover { background: var(--surface); }
.style-card-add .mix-chip { display: flex; overflow: hidden; gap: 2px; background: #fff; }
.style-card-add .mix-chip i { display: block; height: 100%; flex: 0 0 100%; border-radius: 4px; transition: flex-basis .15s; }
.style-card-add .mix-chip i[data-s="none"] { background: repeating-linear-gradient(135deg, var(--line) 0 4px, transparent 4px 10px); }
.style-card-add.mixing { border-style: solid; background: var(--surface); }
.style-card-add.mixing .mix-chip i { border-radius: 4px; }
.style-card-add .mix-chip i[data-s=""] { display: none; }
.mix-chip i[data-s="glass"] { position: relative; }

/* 컬러 */
.color-field { display: flex; align-items: center; gap: 10px; min-width: 0; }
.swatch { width: var(--control-h); height: var(--control-h); }
.swatch { width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(0,0,0,.08); position: relative; overflow: hidden; flex: none; }
.swatch input[type="color"] { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; opacity: 0; }
.hex { width: 120px; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; }
.palette { display: flex; gap: 8px; flex-wrap: wrap; }
.pal { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 10px 4px 4px; display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); transition: border-color .15s; }
.pal:hover { border-color: var(--ink); color: var(--ink); }
.pal .dots { display: inline-flex; }
.pal .dots i { width: 18px; height: 18px; border-radius: 50%; display: block; border: 2px solid var(--surface); }
.pal .dots i + i { margin-left: -6px; }
.pal.single .dots i { width: 20px; height: 20px; }
.pal.on { border-color: var(--ink); color: var(--ink); }

/* 미리보기 패널 */
.preview-panel { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--panel); }
.preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-head strong { font-size: 15px; display: block; }
.preview-head small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.preview-head span { font-size: 12px; color: var(--muted); }
#preview.zoomable { cursor: zoom-in; }
.pv-modal { position: fixed; inset: 0; z-index: 45; display: none; align-items: center; justify-content: center; padding: 24px; background: var(--ink-a60); }
.pv-modal.show { display: flex; }
.pv-modal-box { position: relative; width: min(100%, 1480px); background: var(--surface); border-radius: 16px; padding: 16px; }
.pv-modal-box .modal-close { top: -14px; right: -14px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.pv-modal-box .pv-frame { border-radius: 10px; }
.pv-modal-cap { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.preview-tools { display: inline-flex; align-items: center; gap: 8px; flex: none; margin-top: 2px; }
.preview-tools .btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.preview-tools .btn-sm[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.preview-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 2px 8px; }

/* 생성 버튼 영역 */
.format-sec { border-top: 1px solid var(--line); padding-top: 28px; }
.format-sec .seg { align-self: flex-start; }
.format-sec .hint { font-size: 13px; color: var(--muted); line-height: 1.6; }
.gen-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 32px; flex-wrap: wrap; }
.gen-actions-btns { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.gen-note { flex-basis: 100%; text-align: right; font-size: 13px; color: var(--muted); margin-top: -4px; }

/* 결과 */
.result { display: none; border: 1px solid var(--line); border-radius: 16px; padding: 24px; background: var(--surface); }
.result.show { display: block; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.result-head h2 { font-size: 18px; }
.result textarea { width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; line-height: 1.7; resize: vertical; outline: 0; background: var(--panel); }
.result textarea:focus { border-color: var(--ink); background: var(--surface); }
.stale { display: none; font-size: 13px; color: var(--warn-ink); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; }
.stale.show { display: block; }
.stale.info { color: #1E40AF; background: #EFF6FF; border-color: #BFDBFE; }

/* 토스트 */
.toast { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%) translateY(16px); background: var(--ink); color: var(--surface); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 50; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 미리보기 (샘플 UI) ----------
   설계 원칙: 설정 하나 = 그것을 보여 주는 요소 하나.
   주컬러 → CTA·활성 탭·링크·칩1 / 서브컬러 → 태그·칩2 / 카드 설정 → 카드(배경·높이·반경·내부 여백)
   버튼 설정 → 하단 버튼 / 입력창 높이 → 검색창 / 글자 크기 → 제목·섹션 제목·본문·보조 / 간격·여백 → 요소 간격·화면 가장자리 */
.pv-frame { width: 100%; margin: 0 auto; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #fff; position: relative; }
.pv { position: absolute; top: 0; left: 0; width: var(--w); height: var(--h); transform-origin: top left; background: var(--bg); color: var(--text); font-size: var(--fs); line-height: 1.4; display: flex; flex-direction: column; overflow: hidden; }
.pv-ic { display: inline-flex; width: 1.3em; height: 1.3em; flex: none; }
.pv-ic svg { width: 100%; height: 100%; }
.pv-status { display: flex; justify-content: space-between; padding: 14px var(--pad) 0; font-size: 14px; font-weight: 600; flex: none; }
.pv-status-icons { display: inline-flex; gap: 4px; align-items: center; }
.pv-status-icons i { display: block; width: 14px; height: 10px; border-radius: 2px; background: currentColor; opacity: .85; }
.pv-shell { flex: 1; display: flex; min-height: 0; }
.pv-side { width: 220px; flex: none; border-right: 1px solid color-mix(in srgb, var(--text) 10%, transparent); padding: var(--pad); display: flex; flex-direction: column; gap: var(--gap-s); }
.pv-logo { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--secondary)); margin-bottom: var(--gap); }
.pv-side-item { padding: 10px 12px; border-radius: calc(var(--btn-r) * .7); color: var(--sub); font-size: var(--fs); display: flex; align-items: center; gap: 10px; }
.pv-side-item.on { background: var(--primary-soft); color: var(--text); font-weight: 600; }
.pv-body { flex: 1; min-width: 0; padding: var(--gap-l) var(--pad); display: flex; flex-direction: column; gap: var(--gap); overflow: hidden; position: relative; }
.pv[data-device="desktop"] .pv-body { max-width: 1040px; }
/* 상단 */
.pv-head { display: flex; align-items: center; gap: var(--gap); }
.pv-head-text { flex: 1; min-width: 0; }
.pv-sub { color: var(--sub); font-size: var(--fs-cap); margin-bottom: 2px; }
.pv-h1 { font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.pv-h2 { font-size: var(--fs-h2); font-weight: 600; }
.pv-avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; position: relative; overflow: hidden; }
/* 실제 사진 (앨범 커버·썸네일·프로필): 스타일별 모서리·테두리는 바깥 요소가 결정한다 */
.pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* 검색 (입력창 높이·버튼 반경·카드 배경) */
.pv-input { height: var(--input-h); border-radius: var(--btn-r); background: var(--card); color: var(--sub); display: flex; align-items: center; gap: 10px; padding: 0 var(--card-pad); font-size: var(--fs); flex: none; }
.pv-input-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-section { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--gap-s); }
.pv-link { color: var(--primary); font-size: var(--fs-cap); font-weight: 600; }
/* 칩: 주컬러 / 서브컬러 / 외곽선 */
.pv-chips { display: flex; gap: var(--gap-s); overflow: hidden; }
.pv-chip { flex: 0 0 auto; height: calc(var(--btn-h) * .72); padding: 0 calc(var(--gap) * .9); border-radius: calc(var(--btn-r) * .8); display: inline-flex; align-items: center; font-weight: 600; font-size: var(--fs-cap); white-space: nowrap; }
.pv-chip.chip0 { background: var(--primary); color: var(--on-primary); }
.pv-chip.chip1 { background: var(--secondary); color: var(--on-secondary); }
.pv-chip.chip2 { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 22%, transparent); }
/* 카드: 배경·높이·반경·내부 여백 */
.pv-row { display: flex; gap: var(--gap); overflow: hidden; position: relative; }
.pv-card { flex: 1 1 0; min-width: 0; height: var(--card-h); border-radius: var(--card-r); background: var(--card); padding: var(--card-pad); display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; position: relative; overflow: hidden; color: #fff; }
/* 앨범 커버: 카드 전체에 사진을 깔고 아래쪽 스크림 위에 제목을 올린다 (카드 높이가 낮아도 사진이 보이도록) */
.pv-cover { position: absolute; inset: 0; overflow: hidden; }
.pv-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.72) 100%); pointer-events: none; }
.pv-card .pv-card-title, .pv-card .pv-card-sub { position: relative; z-index: 1; }
.pv-card .pv-card-sub { color: rgba(255,255,255,.78); }
.c0 { background: linear-gradient(160deg, var(--primary), color-mix(in srgb, var(--primary) 45%, #000)); }
.c1 { background: linear-gradient(160deg, var(--secondary), color-mix(in srgb, var(--secondary) 45%, #000)); }
.c2 { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.pv-card-title { font-size: var(--fs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-card-sub { font-size: var(--fs-cap); color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv .pv-gap[data-spec] { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }
/* 리스트: 카드 배경·반경, 본문/보조 글자, 서브컬러 태그 */
.pv-list { display: flex; flex-direction: column; gap: var(--gap-s); flex: 1; min-height: 0; overflow: hidden; -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent); mask-image: linear-gradient(#000 calc(100% - 28px), transparent); }
.pv-item { display: flex; align-items: center; gap: var(--gap); padding: calc(var(--card-pad) * .75) var(--card-pad); border-radius: var(--card-r); background: var(--card); flex: none; }
.pv-thumb { width: 44px; height: 44px; border-radius: calc(var(--card-r) * .5); flex: none; display: block; position: relative; overflow: hidden; }
.pv-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pv-item-title { font-weight: 600; font-size: var(--fs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-item-sub { font-size: var(--fs-cap); color: var(--sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-tag { font-size: var(--fs-cap); font-weight: 700; color: var(--secondary); border: 1.5px solid var(--secondary); border-radius: calc(var(--btn-r) * .5); padding: 2px 8px; flex: none; }
/* 버튼: 높이·반경, 주컬러 */
.pv-actions { display: flex; gap: var(--gap-s); margin-top: auto; padding-top: var(--gap-s); flex: none; }
.pv-btn { height: var(--btn-h); border-radius: var(--btn-r); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: var(--fs); flex: 1; }
.pv-btn.primary { background: var(--primary); color: var(--on-primary); }
.pv-btn.ghost { flex: 0 0 34%; border: 1.5px solid var(--primary); color: var(--primary); }
/* 탭 바: 주컬러 활성, 보조 글자 */
.pv-tabbar { flex: none; display: flex; justify-content: space-around; align-items: center; padding: 10px var(--pad) 26px; background: var(--card); color: var(--sub); border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent); }
.pv-tabbar span { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 56px; padding: 6px 0; border-radius: calc(var(--btn-r) * .6); }
.pv-tabbar .pv-ic { width: 22px; height: 22px; }
.pv-tabbar em { font-style: normal; font-size: calc(var(--fs-cap) * .85); font-weight: 500; }
.pv-tabbar .on { color: var(--primary); font-weight: 700; }

/* 치수 보기: 설정값을 요소 위에 표시 */
.pv [data-spec] { position: relative; }
.pv.spec [data-spec]::after { content: attr(data-spec); position: absolute; top: -8px; right: 6px; z-index: 6; font: 600 11px/1 Pretendard, -apple-system, sans-serif; letter-spacing: 0; text-transform: none; background: #4F46E5; color: #fff; padding: 4px 7px; border-radius: 6px; white-space: nowrap; box-shadow: 0 1px 3px rgba(0,0,0,.25); pointer-events: none; }
.pv.spec .pv-h1::after, .pv.spec .pv-h2::after, .pv.spec .pv-item-title::after { top: 50%; right: auto; left: 100%; margin-left: 8px; transform: translateY(-50%); }
.pv.spec .pv-h1, .pv.spec .pv-h2, .pv.spec .pv-item-title { display: inline-block; max-width: 100%; }
.pv.spec .pv-input, .pv.spec .pv-card[data-spec], .pv.spec .pv-btn.primary { outline: 1.5px dashed #4F46E5; outline-offset: -1.5px; }
.pv.spec .pv-gap::after { top: 0; right: auto; left: 0; transform: translate(-50%, -50%); }
.pv.spec .pv-card[data-spec]::after { top: 6px; right: 6px; }
.pv.spec .pv-gap::before { content: ""; position: absolute; left: 0; top: -40px; height: 80px; border-left: 1.5px dashed #4F46E5; transform: translateX(-50%); }
.pv.spec .pv-body::before, .pv.spec .pv-body::after { content: ""; position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed #4F46E5; opacity: .9; pointer-events: none; z-index: 5; }
.pv.spec .pv-body::before { left: var(--pad); }
.pv.spec .pv-body::after { right: var(--pad); border-left: 0; border-right: 1.5px dashed #4F46E5; }
.pv.spec .pv-padtag { display: block; }
.pv-padtag { display: none; position: absolute; left: 2px; top: 2px; z-index: 6; font: 600 11px/1 Pretendard, -apple-system, sans-serif; background: #4F46E5; color: #fff; padding: 4px 7px; border-radius: 6px; white-space: nowrap; }

/* 스타일별 */
.pv::before, .pv::after { content: none; position: absolute; border-radius: 50%; pointer-events: none; }
/* 미니멀리즘: 넉넉한 여백, 면 대신 선, 장식 최소화 */
.pv[data-style="minimal"] .pv-body { gap: calc(var(--gap) * 1.3); }
.pv[data-style="minimal"] .pv-card, .pv[data-style="minimal"] .pv-item { background: transparent; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.pv[data-style="minimal"] .pv-input { background: transparent; border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); }
.pv[data-style="minimal"] .pv-chip.chip0 { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.pv[data-style="minimal"] .pv-chip.chip1 { background: transparent; color: var(--secondary); border: 1px solid var(--secondary); }
.pv[data-style="minimal"] .pv-tag { border: 0; padding: 0; }
.pv[data-style="minimal"] .pv-btn.ghost { border-width: 1px; }
.pv[data-style="minimal"] .pv-tabbar { background: transparent; }
/* 글래스모피즘: 컬러 블롭 위에 반투명·블러 레이어 */
.pv[data-style="glass"] { background: radial-gradient(120% 80% at 0% 0%, var(--primary-soft), transparent 60%), radial-gradient(100% 70% at 100% 100%, color-mix(in srgb, var(--secondary) 28%, var(--bg)), transparent 60%), var(--bg); }
.pv[data-style="glass"]::before { content: ""; width: 60%; aspect-ratio: 1; left: -20%; top: 8%; background: var(--primary); opacity: .45; filter: blur(40px); }
.pv[data-style="glass"]::after { content: ""; width: 55%; aspect-ratio: 1; right: -18%; bottom: 10%; background: var(--secondary); opacity: .45; filter: blur(40px); }
.pv[data-style="glass"] .pv-shell, .pv[data-style="glass"] .pv-status, .pv[data-style="glass"] .pv-tabbar { position: relative; z-index: 1; }
.pv[data-style="glass"] .pv-card, .pv[data-style="glass"] .pv-item, .pv[data-style="glass"] .pv-input, .pv[data-style="glass"] .pv-side-item.on, .pv[data-style="glass"] .pv-tabbar, .pv[data-style="glass"] .pv-btn.ghost, .pv[data-style="glass"] .pv-chip.chip2 { background: rgba(255,255,255,.45); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 8px 24px rgba(31,41,55,.08); }
.pv[data-style="glass"] .pv-btn.ghost { color: var(--primary); }
.pv[data-style="glass"] .pv-tag { background: rgba(255,255,255,.5); }
.pv[data-style="glass"] .pv-btn.primary { background: color-mix(in srgb, var(--primary) 85%, #fff); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); border: 1px solid rgba(255,255,255,.6); }
/* 뉴모피즘: 배경색 면 + 이중 그림자 */
.pv[data-style="neumorphism"] .pv-card, .pv[data-style="neumorphism"] .pv-item, .pv[data-style="neumorphism"] .pv-btn, .pv[data-style="neumorphism"] .pv-chip, .pv[data-style="neumorphism"] .pv-side-item.on, .pv[data-style="neumorphism"] .pv-avatar { box-shadow: 6px 6px 12px rgba(0,0,0,.12), -6px -6px 12px rgba(255,255,255,.95); }
.pv[data-style="neumorphism"] .pv-chip.chip2 { background: var(--bg); border: 0; }
.pv[data-style="neumorphism"] .pv-input { box-shadow: inset 4px 4px 8px rgba(0,0,0,.1), inset -4px -4px 8px rgba(255,255,255,.9); }
.pv[data-style="neumorphism"] .pv-btn.ghost { border: 0; background: var(--bg); }
.pv[data-style="neumorphism"] .pv-tabbar { background: var(--bg); border-top: 0; box-shadow: 0 -6px 12px rgba(255,255,255,.9), 0 -2px 6px rgba(0,0,0,.06); }
/* 다크 모드 */
.pv[data-style="dark"] .pv-card, .pv[data-style="dark"] .pv-item, .pv[data-style="dark"] .pv-input { border: 1px solid rgba(255,255,255,.06); }
/* 플랫: 그림자 없는 단색 면, 또렷한 색 블록 */
.pv[data-style="flat"] .pv-card, .pv[data-style="flat"] .pv-item, .pv[data-style="flat"] .pv-btn, .pv[data-style="flat"] .pv-chip { box-shadow: none; }
.pv[data-style="flat"] .pv-card { background: var(--primary); color: var(--on-primary); }
.pv[data-style="flat"] .pv-card:nth-child(2n) { background: var(--secondary); color: var(--on-secondary); }
.pv[data-style="flat"] .pv-cover::after { background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--primary) 85%, #000) 100%); }
.pv[data-style="flat"] .pv-card:nth-child(2n) .pv-cover::after { background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--secondary) 85%, #000) 100%); }
.pv[data-style="flat"] .pv-thumb, .pv[data-style="flat"] .pv-avatar { border-radius: 4px; }
.pv[data-style="flat"] .pv-tag { background: var(--secondary); color: var(--on-secondary); border: 0; }
.pv[data-style="flat"] .pv-btn.ghost { border: 0; background: var(--card); color: var(--text); }
.pv[data-style="flat"] .pv-tabbar { border-top: 0; }
.pv[data-style="flat"] .pv-tabbar .on { background: var(--primary); color: var(--on-primary); border-radius: 6px; }
/* 브루탈리즘 */
.pv[data-style="brutalism"] { font-weight: 600; }
.pv[data-style="brutalism"] .pv-h2, .pv[data-style="brutalism"] .pv-card-title, .pv[data-style="brutalism"] .pv-item-title, .pv[data-style="brutalism"] .pv-chip, .pv[data-style="brutalism"] .pv-tabbar em { text-transform: uppercase; }
.pv[data-style="brutalism"] .pv-h1 { font-weight: 900; text-transform: uppercase; letter-spacing: -0.03em; }
.pv[data-style="brutalism"] .pv-card, .pv[data-style="brutalism"] .pv-item, .pv[data-style="brutalism"] .pv-input, .pv[data-style="brutalism"] .pv-btn, .pv[data-style="brutalism"] .pv-chip, .pv[data-style="brutalism"] .pv-avatar { border: 3px solid #000; box-shadow: 5px 5px 0 #000; }
.pv[data-style="brutalism"] .pv-thumb { border: 2px solid #000; border-radius: 0; }
.pv[data-style="brutalism"] .pv-cover::after { background: linear-gradient(180deg, transparent 52%, rgba(0,0,0,.9) 52%); }
.pv[data-style="brutalism"] .pv-card:nth-child(2n) { background: var(--secondary); }
.pv[data-style="brutalism"] .pv-chip.chip2 { background: #fff; color: #000; }
.pv[data-style="brutalism"] .pv-tag { color: #000; background: var(--secondary); border: 2px solid #000; }
.pv[data-style="brutalism"] .pv-btn.ghost { color: #000; background: var(--secondary); }
.pv[data-style="brutalism"] .pv-link { color: #000; text-decoration: underline; }
.pv[data-style="brutalism"] .pv-tabbar { background: #fff; border-top: 3px solid #000; color: #000; }
.pv[data-style="brutalism"] .pv-tabbar .on { background: var(--secondary); border-radius: 0; border: 2px solid #000; color: #000; }
.pv[data-style="brutalism"] .pv-side { border-color: #000; border-width: 3px; }
/* 맥시멀리즘 */
.pv[data-style="maximalism"] { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 18%, var(--bg)), var(--bg) 45%, color-mix(in srgb, var(--secondary) 22%, var(--bg))); }
.pv[data-style="maximalism"] .pv-card { background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--secondary) 18%, var(--card))); border: 2px solid color-mix(in srgb, var(--primary) 50%, #fff); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 22%, transparent); }
.pv[data-style="maximalism"] .pv-item { border: 2px solid color-mix(in srgb, var(--secondary) 45%, #fff); }
.pv[data-style="maximalism"] .pv-thumb { background: repeating-linear-gradient(45deg, var(--primary) 0 8px, var(--secondary) 8px 16px); }
.pv[data-style="maximalism"] .pv-cover::after { background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 35%, transparent) 0%, color-mix(in srgb, var(--primary) 90%, #000) 100%); }
.pv[data-style="maximalism"] .pv-btn.primary, .pv[data-style="maximalism"] .pv-chip.chip0 { background: linear-gradient(90deg, var(--primary), var(--secondary)); color: var(--on-primary); }
.pv[data-style="maximalism"] .pv-chip.chip1 { background: linear-gradient(90deg, var(--secondary), var(--primary)); }
.pv[data-style="maximalism"] .pv-h1 { font-weight: 900; font-size: calc(var(--fs-h1) * 1.15); background: linear-gradient(90deg, var(--primary), var(--secondary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv[data-style="maximalism"] .pv-tabbar { background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 30%, var(--bg)), color-mix(in srgb, var(--secondary) 30%, var(--bg))); border-top: 0; }

/* 혼합: 두 번째(포인트) 스타일을 버튼·카드·칩·입력창에 적용 */
.pv[data-accent="minimal"] .pv-card, .pv[data-accent="minimal"] .pv-item { background: transparent; border: 1px solid color-mix(in srgb, var(--text) 14%, transparent); box-shadow: none; }
.pv[data-accent="minimal"] .pv-chip { background: transparent; color: var(--text); border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); box-shadow: none; }
.pv[data-accent="minimal"] .pv-btn.ghost { border-width: 1px; box-shadow: none; }
.pv[data-accent="glass"] .pv-card, .pv[data-accent="glass"] .pv-item, .pv[data-accent="glass"] .pv-input, .pv[data-accent="glass"] .pv-btn.ghost, .pv[data-accent="glass"] .pv-chip.chip2 { background: color-mix(in srgb, var(--card) 55%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.7); box-shadow: 0 8px 24px rgba(31,41,55,.10); color: var(--text); }
.pv[data-accent="glass"] .pv-btn.primary { background: color-mix(in srgb, var(--primary) 85%, #fff); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent); border: 1px solid rgba(255,255,255,.6); }
.pv[data-accent="neumorphism"] .pv-card, .pv[data-accent="neumorphism"] .pv-item, .pv[data-accent="neumorphism"] .pv-btn, .pv[data-accent="neumorphism"] .pv-chip { background: var(--bg); color: var(--text); border: 0; box-shadow: 6px 6px 12px rgba(0,0,0,.12), -6px -6px 12px rgba(255,255,255,.9); }
.pv[data-accent="neumorphism"] .pv-btn.primary { background: var(--primary); color: var(--on-primary); }
.pv[data-accent="neumorphism"] .pv-input { background: var(--bg); border: 0; box-shadow: inset 4px 4px 8px rgba(0,0,0,.1), inset -4px -4px 8px rgba(255,255,255,.9); }
.pv[data-accent="dark"] .pv-card, .pv[data-accent="dark"] .pv-item, .pv[data-accent="dark"] .pv-input { background: #1E293B; color: #F8FAFC; border: 1px solid rgba(255,255,255,.06); box-shadow: none; }
.pv[data-accent="dark"] .pv-card .pv-card-sub, .pv[data-accent="dark"] .pv-item-sub, .pv[data-accent="dark"] .pv-input { color: #94A3B8; }
.pv[data-accent="dark"] .pv-chip.chip2 { background: #1E293B; color: #F8FAFC; border-color: transparent; }
.pv[data-accent="dark"] .pv-btn.ghost { background: #0F172A; border-color: #0F172A; color: #F8FAFC; }
.pv[data-accent="flat"] .pv-card, .pv[data-accent="flat"] .pv-item, .pv[data-accent="flat"] .pv-btn, .pv[data-accent="flat"] .pv-chip { box-shadow: none; border: 0; backdrop-filter: none; }
.pv[data-accent="flat"] .pv-card { background: var(--primary); color: var(--on-primary); }
.pv[data-accent="flat"] .pv-card:nth-child(2n) { background: var(--secondary); color: var(--on-secondary); }
.pv[data-accent="flat"] .pv-cover::after { background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--primary) 85%, #000) 100%); }
.pv[data-accent="flat"] .pv-card:nth-child(2n) .pv-cover::after { background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--secondary) 85%, #000) 100%); }
.pv[data-accent="flat"] .pv-btn.ghost { border: 0; background: var(--card); color: var(--text); }
.pv[data-accent="flat"] .pv-tag { background: var(--secondary); color: var(--on-secondary); border: 0; }
.pv[data-accent="brutalism"] .pv-card, .pv[data-accent="brutalism"] .pv-item, .pv[data-accent="brutalism"] .pv-input, .pv[data-accent="brutalism"] .pv-btn, .pv[data-accent="brutalism"] .pv-chip { border: 3px solid #000; box-shadow: 5px 5px 0 #000; backdrop-filter: none; }
.pv[data-accent="brutalism"] .pv-btn.ghost { color: #000; background: var(--secondary); }
.pv[data-accent="brutalism"] .pv-card-title, .pv[data-accent="brutalism"] .pv-item-title, .pv[data-accent="brutalism"] .pv-chip { text-transform: uppercase; }
.pv[data-accent="brutalism"] .pv-thumb { border: 2px solid #000; border-radius: 0; }
.pv[data-accent="maximalism"] .pv-card { background: linear-gradient(135deg, var(--card), color-mix(in srgb, var(--secondary) 18%, var(--card))); border: 2px solid color-mix(in srgb, var(--primary) 50%, #fff); box-shadow: 0 10px 24px color-mix(in srgb, var(--primary) 22%, transparent); }
.pv[data-accent="maximalism"] .pv-item { border: 2px solid color-mix(in srgb, var(--secondary) 45%, #fff); }
.pv[data-accent="maximalism"] .pv-cover::after { background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 35%, transparent) 0%, color-mix(in srgb, var(--primary) 90%, #000) 100%); }
.pv[data-accent="maximalism"] .pv-btn.primary, .pv[data-accent="maximalism"] .pv-chip.chip0 { background: linear-gradient(90deg, var(--primary), var(--secondary)); color: var(--on-primary); }

/* ---------- 갤러리 ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.filter { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--muted); }
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; padding-bottom: 96px; }
.g-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); text-align: left; padding: 0; display: flex; flex-direction: column; transition: border-color .15s, transform .15s, box-shadow .15s; }
.g-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.g-thumb { background: var(--panel); padding: 16px 16px 0; height: 260px; overflow: hidden; display: flex; justify-content: center; }
.g-thumb .pv-frame { border-radius: 10px 10px 0 0; border-bottom: 0; width: 100%; }
.g-thumb .g-img { width: 100%; height: 100%; object-fit: cover; object-position: left top; border-radius: 10px 10px 0 0; border: 1px solid var(--line); border-bottom: 0; background: var(--surface); display: block; }
.modal-image img { width: 100%; display: block; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.modal-image .hint { margin-top: 8px; }
.modal-image.zoomable img { cursor: zoom-in; }
/* 상세 창의 화면 전환 탭 (Home · Explore · … · Design System) */
.img-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.img-tabs [role=tab] { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 5px 11px; font-size: 12px; color: var(--muted); }
.img-tabs [role=tab]:hover { border-color: var(--ink); color: var(--ink); }
.img-tabs [role=tab][aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.modal-image.zoomable img:hover { border-color: var(--line-strong); }
/* 디자인 스타일 상세의 큰 화면 보기 */
.pv-modal-box.img-box { width: auto; max-width: min(100%, 1600px); z-index: 46; }
.pv-modal-box.img-box img { display: block; max-width: 100%; max-height: calc(100vh - 110px); width: auto; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.g-info { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.g-info strong { font-size: 15px; }
.g-info .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.empty { color: var(--muted); padding: 48px 0; text-align: center; grid-column: 1 / -1; }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 40; display: none; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow: auto; background: var(--ink-a45); }
.modal.show { display: flex; }
.modal-box { background: var(--surface); border-radius: 20px; width: min(1040px, 100%); padding: 32px; position: relative; display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 32px; }
.modal-close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 18px; line-height: 1; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .desc { color: var(--muted); margin-bottom: 16px; }
.modal pre, .detail pre { overflow-wrap: anywhere; }
.modal pre { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; max-height: 360px; overflow: auto; margin: 0 0 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.modal .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; margin: 12px 0 16px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; display: flex; align-items: center; gap: 6px; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0,0,0,.1); }

/* ---------- 커뮤니티 ---------- */
.feed { display: flex; flex-direction: column; gap: 12px; padding-bottom: 96px; max-width: 800px; }
.post { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 20px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--surface); text-align: left; transition: border-color .15s; }
.post:hover { border-color: var(--line-strong); }
.post .who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.post h3 { font-size: 17px; margin: 8px 0 6px; }
.post .excerpt { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .stats { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.post .thumb { height: 150px; overflow: hidden; border-radius: 10px; background: var(--panel); }
.post .thumb .pv-frame { border: 0; border-radius: 0; }
.sortbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; max-width: 800px; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; padding-bottom: 96px; align-items: start; }
.detail article h1 { font-size: 28px; margin: 12px 0 16px; }
.detail .body { font-size: 16px; line-height: 1.8; margin-bottom: 28px; }
.detail h2 { font-size: 16px; margin: 32px 0 12px; }
.detail pre { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.65; white-space: pre-wrap; margin: 0 0 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.comments { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.comment .avatar { flex: none; }
.comment .name { font-weight: 600; font-size: 13px; margin-right: 6px; }
.comment-box { display: flex; gap: 8px; margin-top: 16px; }
.comment-box .input { flex: 1; min-width: 0; height: var(--control-h); }
.comment-box .btn { height: var(--control-h); flex: none; }
.comment { position: relative; }
.comment .meta { font-size: 12px; color: var(--soft); margin-left: 6px; }
.comment .del { margin-left: 8px; font-size: 12px; color: var(--muted); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.comment .del:hover { color: var(--danger); }
.comment-login { font-size: 13px; color: var(--muted); margin-top: 12px; }
.design-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.design-summary .dot { width: 10px; height: 10px; margin-right: 4px; vertical-align: -1px; }
.like { display: inline-flex; align-items: center; gap: 6px; }
.like.on { color: var(--like); border-color: var(--like); }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--ink); }

/* 글쓰기 */
.community-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 800px; margin-bottom: 16px; flex-wrap: wrap; }
.community-bar .hint { font-size: 13px; color: var(--muted); }
.post .tag.mine { border-color: var(--ink); color: var(--ink); }
/* 게시글 유형 배지 */
.tag.kind { font-weight: 600; border-color: transparent; }
.tag.kind-design { background: #EEF2FF; color: #4338CA; }
.tag.kind-notice, .tag.role-admin { background: var(--warn-bg); color: var(--warn-ink); }
.tag.kind-info { background: #ECFDF5; color: #047857; }
.tag.kind-free { background: var(--hover); color: var(--ink-3); }
.tag.secret { background: var(--danger-bg); color: var(--danger-ink); border-color: transparent; font-weight: 600; }
.post.locked { color: var(--muted); background: var(--panel); }
.prep-note { border: 1px dashed var(--line-strong); border-radius: 16px; padding: 28px 24px; text-align: center; max-width: 800px; }
.prep-note strong { font-size: 18px; }
.post.locked h3 { color: var(--muted); font-weight: 500; }
.write-form .secret-row { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.write-form .secret-row input { width: 16px; height: 16px; accent-color: var(--ink); }
.write-form .secret-row .hint { font-size: 12px; color: var(--muted); }
.community-bar .filters { margin: 0; }
.kind-seg { width: 100%; display: flex; }
.kind-seg button { flex: 1 1 auto; }
.write-design .toggle { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.write-design .toggle input { width: 16px; height: 16px; accent-color: var(--ink); }
.post.no-thumb { grid-template-columns: minmax(0, 1fr); }
.write-form { display: flex; flex-direction: column; gap: 20px; }
.write-form textarea.input { min-height: 160px; }
.write-form textarea.input.prompt { min-height: 200px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
.write-form .field-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.write-form .field-head .btn-sm { height: 28px; font-size: 12px; }
.write-form .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 8px; }
.write-form .actions .spacer { flex: 1; }
.write-form .count { font-size: 12px; color: var(--muted); text-align: right; }
.write-design .hint { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.write-design .row { margin-top: 10px; }
/* 글쓰기 이미지 첨부 */
/* 첨부 칸도 게시물 사진처럼 자르지 않고 줄마다 높이를 맞춘다(community.js justifyImages). 크기는 계산 전 기본값 */
.w-images { --row-h: 160px; display: flex; flex-wrap: wrap; gap: 10px; }
.w-img { flex: none; width: var(--row-h); height: var(--row-h); position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.w-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.w-img.busy img { opacity: .4; }
.w-img .state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); }
.w-img .rm { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--ink-a75); color: var(--surface); font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.w-img .rm:hover { background: var(--ink); }
.w-add { flex: none; width: calc(var(--row-h) * .85); height: var(--row-h); padding: 0 6px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.w-add b { font-size: 22px; font-weight: 400; line-height: 1; }
.w-add:hover { color: var(--ink); border-color: var(--ink); }
.w-add:disabled { opacity: .5; cursor: not-allowed; }
/* 게시물 이미지 */
/* 사진은 자르지 않고 원래 비율 그대로 둔다. 줄 나눔과 크기는 community.js 의 justifyImages 가 계산한다.
   --row-h: 한 줄의 기준 높이(사진 1장일 때는 최대 높이) */
/* 글·댓글 안의 링크: 긴 주소도 줄바꿈되어 화면 밖으로 나가지 않게 */
.detail .body a, .comment-text a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.detail .body a:hover, .comment-text a:hover { opacity: .8; }
.post-images { --row-h: 220px; display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.post-images.n1 { --row-h: 560px; }
.post-images img { flex: none; max-width: 100%; height: auto; object-fit: cover; display: block; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: zoom-in; }
.post .thumb img.thumb-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn-danger { color: var(--danger); border-color: var(--danger-line); }
.btn-danger:hover { background: var(--danger-bg); }
.detail .owner-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- 소개 ---------- */
.page-head .about-lead { font-weight: 700; color: var(--ink); }
.about { max-width: 720px; padding-bottom: 96px; }
.about h2 { font-size: 20px; margin: 40px 0 12px; }
.about p { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.about ol, .about ul { padding-left: 20px; color: var(--ink-2); line-height: 1.8; }
.about .steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.about .step { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.about .step b { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.about p a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.about .made-by { margin-top: 28px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--muted); }

/* ---------- 검색 ---------- */
.results { display: flex; flex-direction: column; gap: 40px; padding-bottom: 96px; }
.results h2 { font-size: 16px; margin-bottom: 12px; }
.results .list { display: flex; flex-direction: column; gap: 8px; }
.r-item { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.r-item:hover { border-color: var(--ink); }
.r-item strong { display: block; font-size: 15px; }
.r-item span { color: var(--muted); font-size: 13px; }
mark { background: var(--mark); color: inherit; border-radius: 2px; padding: 0 1px; }

/* ---------- 인증 ---------- */
.auth { max-width: 400px; margin: 72px auto 96px; }
.auth h1 { font-size: 26px; margin-bottom: 6px; }
.auth > p { color: var(--muted); margin-bottom: 28px; }
.auth form { display: flex; flex-direction: column; gap: 16px; }
.auth .field { display: flex; flex-direction: column; gap: 6px; }
.auth .field label { font-size: 13px; font-weight: 500; }
.auth .btn-primary { height: 48px; border-radius: 12px; font-size: 15px; margin-top: 8px; }
.auth .foot { margin-top: 20px; font-size: 14px; color: var(--muted); text-align: center; }
.auth .foot a { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.notice { display: none; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-ink); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.notice.show { display: block; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.auth .field[hidden] { display: none; }
.btn-kakao { width: 100%; height: 48px; border-radius: 12px; font-size: 15px; background: var(--kakao); border-color: var(--kakao); color: var(--kakao-ink); }
.btn-kakao:hover { background: var(--kakao-hover); }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 24px 0 20px; font-size: 13px; color: var(--muted); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; min-width: 0; height: var(--control-h); }
.input-row .btn { height: var(--control-h); flex: none; min-width: 112px; }
.input-row .btn:disabled { opacity: .55; cursor: default; }
.hint-ok { display: none; font-size: 13px; color: var(--ok-ink); line-height: 1.5; }
.hint-ok.show { display: block; }
.notice-err { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); margin-bottom: 16px; }
.auth .btn-primary:disabled { opacity: .6; cursor: default; }
.hdr-user { font-size: 14px; font-weight: 600; color: var(--ink); padding: 0 8px; max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check input { margin-top: 4px; }

/* ---------- 푸터 ---------- */
.ftr { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--muted); font-size: 14px; }
.ftr-brand { font-weight: 700; font-size: 20px; color: var(--brand); letter-spacing: -0.03em; margin-bottom: 14px; }
.ftr-links { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.ftr-links a { color: var(--muted); padding: 2px 0; }
.ftr-links a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ftr-links span { color: var(--line-strong); }
.ftr-copy { margin-top: 18px; font-size: 13px; color: var(--soft); }
.legal { max-width: 720px; padding-bottom: 96px; color: var(--ink-2); line-height: 1.8; }
.legal h2 { font-size: 17px; margin: 28px 0 8px; color: var(--ink); }
.legal p, .legal li { font-size: 15px; }
.legal .meta { color: var(--soft); font-size: 13px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .gen { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .gen-side { position: static; order: -1; padding-top: 0; }
  .modal-box { grid-template-columns: 1fr; }
  .detail { grid-template-columns: minmax(0, 1fr); }
  .detail article, .detail aside { min-width: 0; }
}
@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .hdr { backdrop-filter: none; background: var(--surface); } /* backdrop-filter가 fixed 드로어의 기준 박스를 만들지 않도록 */
  .hdr-in { gap: 4px; height: 60px; }
  .brand { font-size: 24px; gap: 5px; } /* 모바일 로고는 조금 더 크게 */
  .hdr-right { gap: 0; flex: none; }
  .hdr-right .btn-text { padding: 0 3px; font-size: 12px; min-height: 44px; height: 44px; background: transparent; border: 0; }
  .hdr-right .icon-btn { width: 32px; height: 44px; }
  .hdr-right .icon-btn svg { width: 17px; height: 17px; }
  /* 햄버거 메뉴는 진한 색·굵은 선으로 또렷하게 */
  .hdr-right .hdr-menu-btn { color: var(--ink); width: 36px; }
  .hdr-right .hdr-menu-btn svg { width: 22px; height: 22px; stroke-width: 2.5; }
  .lang-switch.in-bar { margin-left: 2px; gap: 0; }
  .lang-switch.in-bar .full { display: none; }
  .lang-switch.in-bar .short { display: inline; }
  .lang-switch.in-bar button { padding: 0 4px; height: 28px; font-size: 12px; }
  .gen-side { display: none; }
  .gen-form > .sec:first-child { margin-top: 12px; } /* 모바일: 만들고 싶은 화면 영역을 히어로에서 조금 띄운다 */
  .mobile-only { display: block; }
  /* 푸터 메뉴 4개가 한 줄에 들어가도록: 구분점 대신 균등 배치, 글자 조금 작게 */
  .ftr-links { flex-wrap: nowrap; justify-content: flex-start; gap: 0 14px; font-size: 13px; letter-spacing: -0.01em; }
  .ftr-links a { white-space: nowrap; }
  .ftr-links span { display: none; }
  /* 커뮤니티: 로그인 안내와 글쓰기 버튼을 오른쪽에 */
  .community-bar > .row { width: 100%; justify-content: flex-end; }
  .sec-title { font-size: 21px; } /* 모바일 섹션 제목은 조금 더 크게 */
  .sec-title small { font-size: 14px; margin-top: 6px; }
  /* 모바일: "반영 안 함" 버튼을 그 섹션의 옵션 영역 아래로 내린다 (제목 → 설명 → 옵션 → 버튼) */
  .sec-title:has(.skip-toggle) { display: contents; }
  .sec-title:has(.skip-toggle) > span { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
  .sec-title:has(.skip-toggle) > small { order: 1; margin-top: -6px; }
  .sec:has(.skip-toggle) .sec-body { order: 2; margin-top: 4px; }
  .sec:has(.skip-toggle) .skip-toggle { order: 3; margin-top: 0; justify-self: start; }
  .preview-open-wrap { padding-top: 4px; }
  .preview-open-wrap .btn { width: 100%; height: 44px; }
  .hero-desc .line { display: block; }
  .hero-desc .d { display: none; }
  .hero h1 .lead { display: none; }
  #desc-title { padding-top: 0; }
  .gen-note { text-align: center; }
  .row > .field, .row > .col { flex: 1 1 140px; }
  .row > .field > .unit-wrap, .row > .field > .input, .input-num { width: 100%; }
  .field > .sep { display: none; }
  .field:has(> .sep) { display: none; }
  .seg { display: flex; width: 100%; }
  .seg button { flex: 1 1 auto; padding: 0 8px; color: var(--ink-3); }
  /* 모바일: 선택한 칸 글자를 확실히 진하게 (iOS Safari 가 버튼 글자색을 흐리게 그리는 경우까지) */
  .seg button.on { color: var(--ink); -webkit-text-fill-color: var(--ink); font-weight: 700; }
  .color-field .hex { flex: 1; width: auto; min-width: 0; }
  .row > .field { min-width: 0; }
  .search-form { height: 52px; }
  .hero { padding: 40px 0 24px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; letter-spacing: -0.01em; }
  .sec { grid-template-columns: 1fr; gap: 12px; }
  /* 햄버거 → 오른쪽에서 밀려 나오는 반 폭 드로어 */
  .nav { display: flex; position: fixed; top: 0; right: 0; bottom: 0; width: 50%; min-width: 200px; max-width: 320px; background: var(--surface); flex-direction: column; gap: 2px; padding: 0 12px 20px; box-shadow: -12px 0 32px rgba(0,0,0,.14); transform: translateX(100%); visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s; z-index: 60; overflow-y: auto; }
  .hdr.open .nav { transform: none; visibility: visible; transition: transform .28s ease; }
  .nav-head { display: flex; align-items: center; justify-content: space-between; height: 60px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
  .nav-brand { font-weight: 700; font-size: 20px; letter-spacing: -0.03em; color: var(--brand); }
  .nav-close { width: 40px; height: 40px; }
  .nav a { padding: 13px 10px; font-size: 15px; border-radius: 8px; }
  .nav a.active { background: var(--hover); }
  .nav-backdrop { display: block; position: fixed; inset: 0; background: var(--ink-a40); z-index: 55; }
  .nav-backdrop[hidden] { display: none; }
  body.nav-open { overflow: hidden; }
  .hdr-menu-btn { display: inline-flex; }
  .lang-switch.in-menu { display: inline-flex; margin: auto 0 0; padding: 14px 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
  .lang-switch.in-menu button { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .style-mix-row > .field { max-width: none; }
  .ratio { grid-template-columns: 1fr 1fr; }
  .ratio .track { grid-column: 1 / -1; order: 3; }
  .ratio .side .lbl { max-width: none; }
  .hdr-right .btn { height: 34px; }
  .post-images { --row-h: 170px; gap: 8px; }
  .w-images { --row-h: 120px; gap: 8px; }
  .w-img .rm { top: 4px; right: 4px; width: 22px; height: 22px; font-size: 13px; } /* 좁은 타일에서 사진을 덜 가리도록 */
  .post-images.n1 { --row-h: 440px; }
  .modal-box .img-tabs { padding-right: 40px; } /* 닫기(×) 버튼과 겹치지 않도록 */
  .post { grid-template-columns: 1fr; }
  .post .thumb { display: none; }
  .modal { padding: 16px 8px; }
  .modal-box { padding: 24px 16px; }
  .gen-actions { flex-direction: column; align-items: stretch; }
  .gen-actions-btns { order: 1; margin-left: 0; flex-direction: column-reverse; }
  .gen-note { order: 2; margin-top: 0; }
  .gen-actions .btn { width: 100%; }
  .result-head .row { width: 100%; }
  .result-head .row .btn { flex: 1 1 auto; }
}
@media (max-width: 760px) {
  .hdr-user { max-width: 5.5em; font-size: 13px; padding: 0 4px; }
}

/* ---------- 관리자 통계 (admin.html) ---------- */
.nav a.nav-admin { color: var(--brand); }
.stats { padding-bottom: 96px; }
.stats .page-head { padding-bottom: 20px; }
#stats-body { display: flex; flex-direction: column; gap: 20px; transition: opacity .15s; }
#stats-body.loading .st-kpis, #stats-body.loading .st-card:not(.st-live) { opacity: .5; }
.st-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; background: var(--surface); min-width: 0; }
.st-card h2 { font-size: 16px; font-weight: 700; }
.st-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.st-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.seg.seg-sm { min-height: 0; }
.seg.seg-sm button { height: 28px; padding: 0 12px; font-size: 12.5px; }

/* 실시간 */
.st-live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.st-live-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.st-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(5,150,105,.5); animation: st-pulse 2s infinite; }
@keyframes st-pulse { 70% { box-shadow: 0 0 0 7px rgba(5,150,105,0); } 100% { box-shadow: 0 0 0 0 rgba(5,150,105,0); } }
@media (prefers-reduced-motion: reduce) { .st-live-dot { animation: none; } }
.st-live-grid { display: grid; grid-template-columns: auto auto minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: end; }
.st-live-num { display: flex; flex-direction: column; gap: 2px; }
.st-live-num strong { font-size: 34px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.st-spark { display: flex; align-items: flex-end; gap: 2px; height: 48px; border-bottom: 1px solid var(--line); }
.st-spark span { flex: 1; min-height: 0; background: var(--chart-1); border-radius: 2px 2px 0 0; }
.st-spark span:hover { background: var(--chart-1-strong); }
.st-spark-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--soft); margin-top: 4px; }
.st-live-pages { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.st-live-pages li { display: flex; justify-content: space-between; gap: 8px; }
.st-live-pages li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-live-pages em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 기간 선택 */
.st-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 68px; z-index: 5; background: var(--surface-glass); padding: 10px 0; margin: -10px 0; }
.st-filters .seg button[aria-pressed="true"] { background: var(--surface); }
.st-custom { display: flex; align-items: center; gap: 6px; }
.st-custom .input { width: 150px; }
.st-custom .sep { width: 10px; }
.st-range-label { font-variant-numeric: tabular-nums; }

/* 핵심 지표 */
.st-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.st-kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.st-kpi strong { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.st-kpi .hint { font-size: 12px; }
.st-delta { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.st-delta.good { color: var(--ok); }
.st-delta.bad { color: var(--danger); }
.st-delta-vs { color: var(--soft); font-weight: 400; }

/* 라인 차트 */
.st-legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin: -4px 0 6px; flex-wrap: wrap; align-items: center; }
.st-legend span { display: inline-flex; align-items: center; gap: 6px; }
.st-key { width: 14px; height: 2px; border-radius: 2px; display: inline-block; }
.st-chart { width: 100%; min-height: 240px; touch-action: pan-y; }
.st-chart svg { display: block; overflow: visible; }
.st-grid { stroke: var(--line); stroke-width: 1; }
.st-cross { stroke: var(--line-strong); stroke-width: 1; }
.st-tick { font-size: 11px; fill: var(--soft); font-variant-numeric: tabular-nums; }
.st-end { font-size: 12px; font-weight: 600; fill: var(--ink); }
.st-table-toggle { margin-top: 8px; font-size: 13px; }
.st-table-toggle summary { cursor: pointer; color: var(--muted); width: fit-content; }
.st-table-toggle[open] summary { margin-bottom: 8px; }
.st-table-toggle .st-table-wrap { max-height: 320px; overflow: auto; }

/* 툴팁 */
.st-tip { position: fixed; z-index: 50; pointer-events: none; background: var(--ink); color: var(--surface); border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.5; display: flex; flex-direction: column; gap: 1px; min-width: 120px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.st-tip b { font-weight: 600; margin-bottom: 2px; }
.st-tip span { display: flex; align-items: center; gap: 6px; }
.st-tip em { font-style: normal; font-weight: 600; margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.st-sw { width: 8px; height: 8px; border-radius: 2px; display: inline-block; flex: none; }

/* 가로 막대 */
.st-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-bars li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 76px; align-items: center; gap: 10px; font-size: 13px; }
.st-bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-bar-track { height: 16px; display: flex; }
.st-bar { height: 100%; background: var(--chart-1); border-radius: 0 4px 4px 0; }
.st-bars li:hover .st-bar { background: var(--chart-1-strong); }
.st-bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.st-bar-val .muted { font-weight: 400; font-size: 12px; }

/* 표 */
.st-table-wrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 0 8px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table td { padding: 8px; border-bottom: 1px solid var(--hover); vertical-align: top; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-table .rank { width: 28px; color: var(--soft); font-variant-numeric: tabular-nums; padding-left: 0; }
.st-page { font-weight: 600; }
.st-page:hover { text-decoration: underline; }
.st-path { display: block; font-size: 11.5px; color: var(--soft); }

/* 사용자 환경 */
.st-env { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.st-env-g h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.st-seg { display: flex; gap: 2px; height: 28px; }
.st-seg-part { min-width: 3px; border-radius: 4px; font-size: 11.5px; font-weight: 600; display: flex; align-items: center; padding-left: 7px; overflow: hidden; white-space: nowrap; outline-offset: 2px; }
.st-env-legend { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.st-env-legend li { display: flex; align-items: center; gap: 8px; }
.st-env-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-env-val { font-variant-numeric: tabular-nums; color: var(--muted); }

@media (max-width: 1024px) {
  .st-live-grid { grid-template-columns: auto auto minmax(0, 1fr); }
  .st-live-pages { grid-column: 1 / -1; }
  .st-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .st-filters { top: 60px; }
  .st-card { padding: 16px; }
  .st-grid-2, .st-env { grid-template-columns: minmax(0, 1fr); }
  .st-live-grid { grid-template-columns: 1fr 1fr; gap: 16px 20px; }
  .st-live-spark { grid-column: 1 / -1; }
  .st-live-num strong { font-size: 28px; }
  .st-kpi { padding: 14px; }
  .st-kpi strong { font-size: 24px; }
  .st-filters .seg { width: 100%; }
  .st-custom { width: 100%; }
  .st-custom .input { flex: 1; width: auto; min-width: 0; }
  .st-bars li { grid-template-columns: 80px minmax(0, 1fr) 70px; }
}
.st-login { text-decoration: underline; font-weight: 600; color: var(--ink); }

/* 관리자 하위 메뉴·회원 목록 */
.st-subnav { margin: -8px 0 20px; }
.st-subnav a.filter { text-decoration: none; }
.st-search { width: 240px; height: 36px; font-size: 13px; }
.st-role { height: 32px; padding: 0 28px 0 10px; font-size: 13px; width: auto; background-position: right 8px center; }
.feed-more { display: flex; justify-content: center; padding: 8px 0 0; }
@media (max-width: 760px) { .st-search { width: 100%; } }

/* 실시간 접속 회원·국가 */
.st-members { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.st-members h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.st-members h3 .hint { font-weight: 400; margin-left: 4px; }
.st-members-table td { white-space: nowrap; }
.st-cc { display: inline-block; min-width: 26px; margin-right: 6px; padding: 1px 4px; border: 1px solid var(--line); border-radius: 4px; font-size: 10.5px; font-weight: 600; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
#country-chart .st-bars li { grid-template-columns: 140px minmax(0, 1fr) 76px; }
.st-credit { margin: 14px 0 0; font-size: 11.5px; }
.st-credit a { color: inherit; text-decoration: underline; }

/* ---------- 관리자 설정 (admin-settings) ---------- */
.set-card { max-width: 880px; }
.set-card .st-card-head { margin-bottom: 6px; }
.set-desc { margin: 0 0 8px; }
.set-status { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); }
.set-status.ok { color: var(--ok); border-color: currentColor; background: transparent; }
.set-status.off { color: var(--danger); border-color: currentColor; background: transparent; }
.set-rows { display: flex; flex-direction: column; }
.set-rows[hidden] { display: none; }
.set-row { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 8px 24px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.set-label { display: flex; flex-direction: column; gap: 2px; }
.set-label strong { font-size: 14px; }
.set-label .hint { font-size: 12.5px; }
.set-row .seg { justify-self: start; }
.set-input { width: 100%; max-width: 360px; }
.set-key { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.set-key .set-input { flex: 1 1 220px; }
.set-money { display: inline-flex; align-items: center; gap: 6px; flex: 0 1 200px; color: var(--muted); }
.set-money .set-input { width: 100%; }
.set-test { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.set-test .hint { overflow-wrap: anywhere; }
.set-usage { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.set-usage .lbl { display: inline-block; min-width: 6.5em; color: var(--muted); }
.set-alert { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; }
.set-alert[hidden] { display: none; }
@media (max-width: 760px) {
  .set-row { grid-template-columns: minmax(0, 1fr); }
  .set-input { max-width: none; }
}

/* ---------- 계정 메뉴 (로그인했을 때 헤더 아이콘) ---------- */
.acct { position: relative; display: inline-flex; }
.acct-btn { color: var(--ink); }
.acct-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; max-width: 280px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(17,24,39,.14); padding: 6px; z-index: 35; display: flex; flex-direction: column; }
.acct-menu[hidden] { display: none; }
.acct-who { padding: 10px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acct-who strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-menu [role=menuitem] { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.acct-menu [role=menuitem]:hover, .acct-menu [role=menuitem]:focus-visible { background: var(--hover); color: var(--ink); outline: none; }
.acct-menu [role=menuitem].active { font-weight: 600; color: var(--ink); }
.acct-menu [data-logout] { color: var(--muted); border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; }

/* ---------- Claude 로 페이지 만들기 (생성기 결과 아래) ---------- */
.claude-gen { margin-top: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.claude-gen[hidden] { display: none; }
.claude-gen .txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.claude-gen .txt strong { font-size: 14px; }
.claude-gen .txt span { font-size: 12.5px; color: var(--muted); }
.claude-gen a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.saved-note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* 만든 페이지 보기 (팝업) */
.dz { position: fixed; inset: 0; z-index: 45; background: var(--ink-a60); display: flex; align-items: stretch; justify-content: center; padding: 24px; }
.dz[hidden] { display: none; }
.dz-box { background: var(--surface); border-radius: 16px; width: min(1280px, 100%); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 64px rgba(0,0,0,.3); }
.dz-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.dz-head h2 { font-size: 15px; font-weight: 700; flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dz-head .hint { font-size: 12.5px; }
.dz-actions { display: flex; gap: 6px; align-items: center; }
.dz-body { flex: 1; min-height: 0; position: relative; background: var(--hover); }
.dz-body iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.dz-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; color: var(--muted); font-size: 14px; }
.dz-wait strong { color: var(--ink); font-size: 16px; }
.dz-wait[hidden] { display: none; }
.dz-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: dz-spin 0.9s linear infinite; }
@keyframes dz-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dz-spin { animation-duration: 3s; } }
.dz-wait.err .dz-spin { display: none; }
.dz-wait.mini { inset: auto 16px 16px auto; flex-direction: row; gap: 10px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(17,24,39,.16); }
.dz-wait.mini #dz-wait-s { display: none; }
.dz-wait.mini strong { font-size: 13px; }
.dz-wait.mini .dz-spin { width: 18px; height: 18px; border-width: 2px; }
.dz-wait.err strong { color: var(--danger); }
@media (max-width: 760px) {
  .dz { padding: 0; }
  .dz-box { border-radius: 0; }
  .dz-head { padding: 10px 10px 10px 16px; }
}

/* ---------- My Prompt ---------- */
.my { padding-bottom: 96px; max-width: 880px; }
#my-detail-view { padding-top: 40px; }
.my-day { margin-top: 28px; }
.my-day h2 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.my-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.my-list li + li { border-top: 1px solid var(--line); }
.my-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 14px 18px; color: inherit; }
.my-item:hover { background: var(--panel); }
.my-item strong { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.my-item .meta { grid-column: 1; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
.my-item .side { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; }
.my-empty { margin-top: 28px; padding: 40px 20px; border: 1px dashed var(--line-strong); border-radius: var(--radius); text-align: center; color: var(--muted); }
.my-empty a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.my-back { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.my-back:hover { color: var(--ink); }
.my-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.my-title h1 { font-size: 28px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.my-title form { display: flex; gap: 8px; flex: 1 1 320px; }
.my-title form .input { flex: 1; font-size: 18px; font-weight: 600; }
.my-meta { color: var(--muted); font-size: 13.5px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }
.my-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 12px; }
.my-sec { margin-top: 28px; }
.my-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.my-sec-head h2 { font-size: 16px; font-weight: 700; }
.my-prompt { width: 100%; min-height: 320px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.65; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); resize: vertical; color: var(--ink-2); }
.my-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.my-design { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; text-align: left; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.my-design:hover { border-color: var(--line-strong); }
.my-design .thumb { height: 160px; overflow: hidden; position: relative; background: var(--hover); pointer-events: none; }
.my-design .thumb iframe { width: 900px; height: 900px; border: 0; transform-origin: 0 0; position: absolute; left: 0; top: 0; background: #fff; }
.my-design .thumb .state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--muted); }
.my-design .cap { padding: 10px 12px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.my-design.failed .thumb .state { color: var(--danger); }
@media (max-width: 760px) {
  .my-item { padding: 12px 14px; }
  .my-title h1 { font-size: 22px; }
}

/* 작은 대화상자 (이름 변경) */
.mini-dlg { position: fixed; inset: 0; z-index: 50; background: var(--ink-a45); display: flex; align-items: flex-start; justify-content: center; padding: 18vh 16px 16px; }
.mini-dlg[hidden] { display: none; }
.mini-dlg-box { background: var(--surface); border-radius: 16px; width: min(400px, 100%); padding: 24px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 24px 64px rgba(0,0,0,.25); }
.mini-dlg-box h2 { font-size: 18px; }
.mini-dlg-box .row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
/* 문의하기 */
#contact-dlg { padding-top: 10vh; overflow-y: auto; }
.contact-box { width: min(480px, 100%); }
.contact-box > .hint { margin: -4px 0 4px; line-height: 1.6; }
.contact-box .lbl { margin-top: 4px; }
.contact-box textarea.input { min-height: 160px; }
.contact-box .input.fixed { background: var(--panel); color: var(--muted); }
.contact-box .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 560px) { #contact-dlg { padding-top: 16px; } }
