@font-face { font-family: "Pretendard"; font-weight: 400; font-display: swap; src: url("/fonts/Pretendard-Regular.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 500; font-display: swap; src: url("/fonts/Pretendard-Medium.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 600; font-display: swap; src: url("/fonts/Pretendard-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 700; font-display: swap; src: url("/fonts/Pretendard-Bold.woff2") format("woff2"); }
@font-face { font-family: "Pretendard"; font-weight: 800; font-display: swap; src: url("/fonts/Pretendard-ExtraBold.woff2") format("woff2"); }
/* 포인트 글꼴(⑥ 디자인 패널 · 사용 조건 /fonts/point/LICENSES.txt) — 고른 덱에서만 실제로 내려받는다 */
@font-face { font-family: "PF Fighting"; font-display: swap; src: url("/fonts/point/PeoplefirstFighting.otf") format("opentype"); }
@font-face { font-family: "HS Jiptokki Black"; font-display: swap; src: url("/fonts/point/HSJiptokki-Black.woff2") format("woff2"); }
@font-face { font-family: "HS Jiptokki Round"; font-display: swap; src: url("/fonts/point/HSJiptokki-Round.woff2") format("woff2"); }
@font-face { font-family: "Gangwon Hyeonok"; font-display: swap; src: url("/fonts/point/GangwonEduHyeonokT_OTFMediumA.woff") format("woff"); }

:root {
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f9fafb;
  --danger: #ef4444;
  --insta: linear-gradient(45deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  padding-bottom: 64px; /* 상태 줄 자리 */
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 머리 */
.top { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); z-index: 5; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px 8px; max-width: 1080px; margin: 0 auto; }
.brand {
  margin: 0; font-size: 26px; font-weight: 800;
  background: var(--insta); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tabs { display: flex; gap: 4px; padding: 0 16px; max-width: 1080px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; position: relative; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--muted); padding: 12px 16px; min-height: 48px; white-space: nowrap;
}
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px; background: var(--insta); }

/* 본문 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 32px 24px; }
.panel[hidden] { display: none; }
.panel-lead { font-size: 19px; font-weight: 600; margin: 0 0 32px; }

/* 공통 부품 */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.empty { text-align: center; color: var(--muted); padding: 56px 24px; background: var(--surface); }
.empty p { margin: 0 0 8px; color: var(--ink); }
.empty small { font-size: 14px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--insta); color: #fff; border: 0; }
.btn-danger { color: var(--danger); border-color: var(--danger); }
.btn-ghost { border-color: transparent; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px; text-align: left; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 15px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

.stack > * + * { margin-top: 16px; }
#ref-form-card, #design-learn-card { margin-bottom: 32px; }
.card-title { margin: 0; font-size: 21px; }
.muted { color: var(--muted); margin: 0; }
.small { font-size: 14px; }
.field textarea { font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.fold { padding: 0; }
.fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 18px 24px; min-height: 44px; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: "펼치기 ▾"; margin-left: auto; color: var(--muted); font-size: 15px; }
.fold[open] > summary::after { content: "접기 ▴"; }
.fold > summary small { color: var(--muted); }
.fold-body { padding: 0 24px 24px; }
.more { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.more summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.more summary small { color: var(--muted); font-weight: 500; }
.more[open] summary { margin-bottom: 12px; }
.drop { position: relative; border: 2px dashed var(--line); border-radius: 12px; padding: 20px; text-align: center; color: var(--muted); }
.drop.over, .drop:focus { border-color: #d62976; outline: none; background: #fff7fb; }
.drop input[type=file] { display: block; margin: 0 auto 8px; font: inherit; font-size: 15px; }
.drop p { margin: 0; font-size: 15px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 72px; height: 90px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(17,24,39,.75); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }
.thumb .no { position: absolute; left: 4px; bottom: 2px; font-size: 12px; color: #fff; text-shadow: 0 0 3px #000; }

.style-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.style-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.style-card.is-default { border: 2px solid #d62976; }
.style-card h3 { margin: 0 0 8px; font-size: 17px; }
.swatches { display: flex; gap: 4px; margin: 8px 0; }
.swatch { flex: 1; height: 32px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }
.hexes { font-size: 12px; color: var(--muted); word-break: break-all; }
.style-card dl { margin: 8px 0; font-size: 14px; }
.style-card dt { font-weight: 700; margin-top: 6px; }
.style-card dd { margin: 0; color: var(--muted); }

.ref-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: #fff; cursor: pointer; font: inherit; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.ref-list { display: flex; flex-direction: column; gap: 16px; }
.ref-card { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px; cursor: pointer; }
.ref-thumb { width: 96px; height: 120px; border-radius: 8px; background: var(--surface); object-fit: cover; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.ref-body p { margin: 0 0 8px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.badge.hot { background: #fff1f2; border-color: #fecdd3; color: #be123c; }
.ref-meta { font-size: 14px; color: var(--muted); }
.ref-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ref-actions .btn { min-height: 40px; font-size: 15px; }
.ref-detail { grid-column: 1 / -1; display: none; }
.ref-card.open .ref-detail { display: block; }
.ref-detail pre { white-space: pre-wrap; font: inherit; background: var(--surface); border-radius: 12px; padding: 16px; margin: 0 0 12px; }
.ref-slides { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.ref-slides img { height: 240px; border-radius: 8px; border: 1px solid var(--line); }
#ref-storage { margin-top: 16px; }
#ref-storage.warn { color: #b45309; font-weight: 600; }

/* 설정 판 */
.overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: flex; align-items: flex-start; justify-content: center; padding: 64px 16px; z-index: 20; overflow-y: auto; }
.overlay[hidden] { display: none; }
.sheet { width: 100%; max-width: 560px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.sheet-head h2 { margin: 0; font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-weight: 600; }
.field small { color: var(--muted); font-weight: 500; }
.field input { font: inherit; min-height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.field-read { margin: 0 0 16px; color: var(--muted); }
.error { color: var(--danger); margin: 0 0 16px; font-weight: 600; }
.logs { margin: 24px 0 0; max-height: 260px; overflow: auto; background: var(--surface); border-radius: 12px; padding: 16px; font-size: 13px; white-space: pre-wrap; }

.ai-box { border-top: 1px solid var(--line); margin: 8px 0 24px; padding-top: 24px; }
.ai-box h3 { margin: 0 0 12px; font-size: 19px; }
.ai-result { margin: 16px 0 0; white-space: pre-wrap; }
.ai-result.ok { color: #047857; }
.ai-result.bad { color: var(--danger); font-weight: 600; }

/* 상태 줄 */
.status { position: fixed; left: 0; right: 0; bottom: 0; min-height: 48px; padding: 12px 24px; background: var(--ink); color: #fff; font-size: 15px; text-align: center; z-index: 30; transition: opacity .2s; }
.status:empty { opacity: 0; pointer-events: none; }

/* ③ 내 계정 */
.field.bad input, .field.bad textarea { border: 2px solid var(--danger); }
.error-inline { color: var(--danger); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.acc-look { display: grid; grid-template-columns: 1fr 216px; gap: 24px; align-items: start; }
.color-row { display: flex; gap: 8px; align-items: center; }
.color-row input[type=color] { width: 48px; height: 48px; padding: 2px; border: 1px solid var(--line); border-radius: 12px; background: #fff; min-height: 0; }
.color-row input:not([type=color]) { width: 130px; font-family: ui-monospace, monospace; }
.swatch-chip { width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.acc-preview-wrap { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.acc-preview { width: 216px; height: 270px; border-radius: 12px; padding: 20px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.12); overflow: hidden; }
.acc-preview small { margin-bottom: auto; font-weight: 700; font-size: 12px; opacity: .9; }
.acc-preview b { font-size: 24px; line-height: 1.2; word-break: keep-all; }
.acc-preview span { font-size: 14px; font-weight: 600; opacity: .9; }
.field.ai-filled input, .field.ai-filled textarea { background: #fffbeb; }

/* ④ 만들기 */
.style-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.style-opt { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer; font: inherit; min-height: 44px; }
.style-opt[aria-checked="true"] { border: 2px solid #d62976; padding: 11px 13px; }
.style-opt b { display: block; font-size: 15px; }
.style-opt small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.style-opt .dots { display: flex; gap: 4px; margin-top: 8px; }
.style-opt .dots i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.style-info { font-size: 14px; color: var(--muted); }
.style-info .chips { margin: 6px 0; }
.photo-row { align-items: center; }
.photo-row img { width: 64px; height: 80px; object-fit: cover; border-radius: 8px; }
.strip { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.slide-cell { flex: 0 0 auto; width: 216px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; background: none; border: 0; padding: 0; font: inherit; text-align: left; }
.slide-cell canvas { width: 216px; height: 270px; border-radius: 10px; border: 1px solid var(--line); display: block; }
.slide-cell[aria-pressed="true"] canvas { outline: 3px solid #d62976; outline-offset: 2px; }
.slide-cell .meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; }
.badge.over { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.badge.warn { background: #fef3c7; color: #92400e; border-color: #fde68a; }
#mk-ed-title, #mk-ed-body { font: inherit; }
select { font: inherit; min-height: 48px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* ② 분석 */
.check { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; }
.check small { color: var(--muted); }
.warn-text { color: #b45309; font-weight: 600; margin: 0; }
.section-title { margin: 8px 0 0; font-size: 21px; }
.patterns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pattern { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.pattern .no { display: inline-block; font-weight: 800; background: var(--insta); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 22px; }
.pattern h3 { margin: 4px 0 8px; font-size: 18px; }
.pattern p { margin: 0 0 8px; color: var(--ink); }
.pattern .evidence { font-size: 14px; color: var(--muted); }
.an-reco { margin: 0; font-weight: 600; }
.dna-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.dna-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.dna-chip { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 13px; }
.dna-chip span { display: block; height: 56px; border-bottom: 1px solid var(--line); }
.dna-chip b, .dna-chip em { display: block; padding: 4px 8px 0; font-style: normal; }
.dna-chip em { color: var(--muted); padding-bottom: 6px; }
.dna-ai { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dna-ai i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,.1); display: inline-block; }
.dna-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dna-layouts div { background: var(--surface); border-radius: 12px; padding: 14px; }
.dna-layouts h3 { margin: 0 0 6px; font-size: 15px; }
.dna-layouts p { margin: 0; font-size: 15px; }
.table-wrap { overflow-x: auto; }
.an-table { min-width: 1100px; font-size: 14px; }
.an-table th { white-space: nowrap; background: var(--surface); }
.an-table td { vertical-align: top; }
.an-table tbody tr { cursor: pointer; }
.an-table tbody tr:hover { background: var(--surface); }
.an-table tr.gone { cursor: default; color: var(--muted); }
.an-table img { width: 48px; height: 60px; object-fit: cover; border-radius: 6px; display: block; }
.an-table .n { font-weight: 800; }
.an-table td:first-child { min-width: 110px; }
.an-table .badge { white-space: nowrap; }
.ref-card { scroll-margin-top: 140px; }
.an-foot { justify-content: space-between; align-items: center; }
.an-foot p { margin: 0; }
.ref-card.flash { outline: 3px solid #d62976; }

@media (max-width: 720px) {
  .patterns, .dna-layouts, .acc-look { grid-template-columns: 1fr; }
  .acc-preview-wrap { order: -1; }
  .dna-chips { grid-template-columns: repeat(3, 1fr); }
  .top-row { padding: 12px 16px 4px; }
  .brand { font-size: 22px; }
  .wrap { padding: 24px 16px; }
  .row { flex-direction: column; }
  .row .btn, .field input { width: 100%; }
  .grid2 { grid-template-columns: 1fr; }
  .ref-card { grid-template-columns: 72px 1fr; }
  .ref-thumb { width: 72px; height: 90px; }
  .fold > summary { padding: 16px; }
  .fold-body { padding: 0 16px 16px; }
}

/* ⑤ 내보내기 */
.panel[data-panel="내보내기"] > .card + .card { margin-top: 20px; }
.ex-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ex-item { display: grid; grid-template-columns: 80px 1fr auto; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.ex-item.on { border-color: #d62976; box-shadow: 0 0 0 2px #fbcfe8; }
.ex-pick { padding: 0; border: 0; background: none; cursor: pointer; }
.ex-pick canvas { width: 80px; height: 100px; border-radius: 8px; border: 1px solid var(--line); display: block; }
.ex-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ex-info b { overflow-wrap: anywhere; }
.ex-info .badge { align-self: flex-start; }
.badge.done { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.ex-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ex-acts .btn { min-height: 40px; font-size: 15px; }
#ex-strip .slide-cell { cursor: default; }
.ex-check { font-weight: 600; }
.ex-check.ok { color: #166534; }
.ex-check.bad { color: var(--danger); }
.ex-check ul { margin: 8px 0 12px; padding-left: 20px; }
.ex-eye-box summary { cursor: pointer; }
.ex-eye-box > * + * { margin-top: 12px; }
.ex-eye-list { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ex-eye-list li.bad { color: #b45309; font-weight: 600; }
.tell-palette { display: flex; flex-wrap: wrap; gap: 8px; }
.tell-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 4px 10px 4px 4px; border: 1px solid var(--line, #e5e7eb); border-radius: 999px; }
.tell-sw i { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: inline-block; }
label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (max-width: 640px) {
  .ex-item { grid-template-columns: 64px 1fr; }
  .ex-pick canvas { width: 64px; height: 80px; }
  .ex-acts { grid-column: 1 / -1; }
  .ex-acts .btn { flex: 1; }
}
#ex-singles { display: grid; grid-template-columns: repeat(7, minmax(0, 72px)); gap: 8px; }
#ex-singles[hidden] { display: none; }
@media (max-width: 640px) { #ex-singles { grid-template-columns: repeat(4, 1fr); } #ex-singles .btn { width: 100%; padding: 0; } }

/* ⑥ 카드 편집 */
.panel[data-panel="카드 편집"] > .card + .card { margin-top: 20px; }
.ce-start { align-items: center; }
.ce-ratio { border: 0; padding: 0; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.ce-ratio legend { float: left; font-weight: 600; margin-right: 8px; padding: 0; }
.ce-ratio label { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; cursor: pointer; }
.ce-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.ce-cell { margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ce-cell figcaption { display: flex; gap: 6px; align-items: center; font-size: 14px; }
@media (max-width: 900px) { .ce-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .ce-grid { grid-template-columns: 1fr; } }
.ce-pane { border-top: 1px solid var(--line); padding-top: 16px; }
.ce-pane[hidden] { display: none; }
.ce-pane textarea { width: 100%; font: inherit; font-size: 16px; line-height: 1.6; }
.ce-from-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ce-from-list button { width: 100%; justify-content: space-between; text-align: left; min-height: 52px; }
.ce-from-list small { color: var(--muted); font-weight: 500; }
.ce-cell figcaption { flex-wrap: wrap; }
.ce-cell select { font: inherit; font-size: 14px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; background: #fff; }
.ce-cell .badge.auto { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.panel[data-panel="카드 편집"] .ce-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.ce-theme-group { grid-column: 1 / -1; margin-top: 4px; }
.ce-theme { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 2px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.ce-theme .cn-frame { border-radius: 8px; pointer-events: none; }
.ce-theme-text { display: flex; flex-direction: column; gap: 2px; }
.ce-theme-text small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.ce-theme[aria-checked="true"] { border-color: transparent; background: linear-gradient(#fff, #fff) padding-box, var(--insta) border-box; }
@media (max-width: 520px) { .panel[data-panel="카드 편집"] .ce-themes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ce-work { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 20px; align-items: start; margin-top: 16px; }
.ce-work .ce-grid { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 고치려면 글이 보여야 한다 — 넓은 화면만 3열 */
@media (min-width: 1500px) { .ce-work .ce-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ce-panel { position: sticky; top: 140px; max-height: calc(100vh - 156px); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface, #fafafa); }
.ce-panel h3 { margin: 0; font-size: 17px; }
.ce-panel hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.ce-panel .btn { min-height: 40px; font-size: 15px; }
.ce-panel .btn[aria-pressed="true"] { background: #8134af; color: #fff; border-color: #8134af; }
.ce-slider { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.ce-slider span { display: flex; justify-content: space-between; }
.ce-slider input { width: 100%; }
.ce-saved { font-size: 13px; }
.ce-tools { position: sticky; top: 120px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #1f2937; color: #fff; }
.ce-tools[hidden] { display: none; }
.ce-tools .btn { min-height: 36px; padding: 0 12px; font-size: 15px; background: #374151; color: #fff; border-color: #4b5563; }
.ce-tools .btn-ghost { background: transparent; }
.ce-tools label { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.ce-tools input[type="color"] { width: 40px; height: 32px; border: 0; padding: 0; background: none; }
.ce-tools select { font: inherit; font-size: 14px; min-height: 32px; border-radius: 8px; }
.ce-size-now { min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.ce-photo-btns { display: flex; gap: 6px; }
.ce-photo-btns .btn { min-height: 32px; padding: 0 10px; font-size: 13px; }
@media (max-width: 900px) { .ce-work { grid-template-columns: 1fr; } .ce-panel { position: static; order: -1; } }
@media (max-width: 520px) { .ce-work .ce-grid { grid-template-columns: 1fr; } }
.ce-actions { margin-top: 12px; align-items: center; }
.ce-check { color: var(--danger); font-weight: 600; }
.ce-check ul { margin: 6px 0 0; padding-left: 20px; }
.ce-check[hidden] { display: none; }
#ce-eye-box { margin-top: 12px; }
.panel[data-panel="카드 편집"] #ce-sets-card { margin-top: 20px; }
.ce-ops { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
.ce-ops .btn { min-height: 30px; padding: 0 8px; font-size: 13px; }
.ce-ops .btn:disabled { opacity: .35; }
.ce-undo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ce-undo-row .btn { padding: 0 6px; }
.ce-boxcolor { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.ce-boxcolor label { display: inline-flex; align-items: center; gap: 8px; }
.ce-boxcolor input[type="color"] { width: 40px; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; }
.ce-boxcolor .btn { min-height: 30px; padding: 0 8px; font-size: 13px; }

/* 11 보강 — 트래킹 표 · 종류/프리셋 거르기 */
#ref-track-card { margin-bottom: 32px; }
.track-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.track-wrap { overflow-x: auto; }
.track-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.track-table th, .track-table td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.track-table td:first-child { white-space: normal; min-width: 160px; }
.track-table th { color: var(--muted); font-weight: 600; }
.track-in { display: flex; gap: 6px; }
.track-in input { width: 84px; min-height: 40px; }
.ref-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ref-filters p { margin: 0; }
.acct-list { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.acct { padding: 8px 12px; border-radius: 10px; background: var(--surface); }
.acct.thin { color: var(--muted); }

/* 12 크롬 확장에서 받은 글의 디자인 DNA(6색) */
.ref-dna { display: flex; align-items: center; gap: 8px; }
.ref-dna .swatches { flex: 1; max-width: 220px; margin: 4px 0; }
.ref-dna .swatch { height: 18px; }
.ce-check-row { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.ce-more summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.ce-more[open] { display: flex; flex-direction: column; gap: 12px; }
.mk-structure { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mk-structure legend { font-weight: 600; margin-bottom: 4px; }
.mk-st { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.ce-syms { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.ce-sym { min-width: 30px; min-height: 30px; padding: 0 4px; font-size: 16px; line-height: 1; }
.ce-sysfont { display: grid; gap: 4px; margin: -4px 0 6px; }
.ce-sysfont .btn { justify-self: start; }
