/* 카드 편집 화면 */
.editor-view{padding:28px 32px 48px;flex:1;min-width:0}
.editor-body{display:grid;grid-template-columns:272px minmax(0,1fr);gap:28px;align-items:start}
.editor-list{position:sticky;top:16px;display:flex;flex-direction:column;gap:12px;max-height:calc(100vh - 110px);max-height:calc(100dvh - 110px)}
.editor-list .search-field{width:100%}
.editor-filters{display:flex;gap:6px;flex-wrap:wrap}
.editor-filters button{font:inherit;font-size:11px;padding:5px 10px;border-radius:999px;border:1px solid rgba(236,230,216,.16);background:transparent;color:var(--muted);cursor:pointer}
.editor-filters button:hover{color:var(--ink)}
.editor-filters button[aria-pressed="true"]{color:var(--gold);border-color:var(--gold-soft);background:rgba(201,164,92,.1)}
.editor-card-list{list-style:none;margin:0;padding:0;overflow-y:auto;min-height:0;border:1px solid rgba(236,230,216,.1);border-radius:10px;background:rgba(12,9,22,.36)}
.editor-card-list button{display:flex;align-items:center;gap:8px;width:100%;padding:9px 12px;border:0;border-bottom:1px solid rgba(236,230,216,.06);background:transparent;color:var(--ink);font:inherit;font-size:12px;text-align:left;cursor:pointer}
.editor-card-list li:last-child button{border-bottom:0}
.editor-card-list button:hover{background:rgba(236,230,216,.05)}
.editor-card-list button[aria-current="true"]{background:rgba(201,164,92,.12);color:var(--gold)}
.editor-card-list .num{color:var(--muted);font-variant-numeric:tabular-nums;flex:none}
.editor-card-list .ko{font-weight:500;flex:none}
.editor-card-list .en{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.status-dot{margin-left:auto;flex:none;width:8px;height:8px;border-radius:50%;background:#5e586f}
.status-dot.reviewed{background:#d9b15c}
.status-dot.confirmed{background:#6fbf8a}

.editor-form{display:flex;flex-direction:column;gap:20px;min-width:0;container-type:inline-size}
.editor-top{display:grid;grid-template-columns:minmax(200px,280px) minmax(0,1fr);gap:22px;align-items:start}
.editor-top-main{display:flex;flex-direction:column;gap:16px;min-width:0}
.editor-art{display:block;width:100%;padding:0;border:1px solid rgba(236,230,216,.12);border-radius:10px;background:#211b2d;overflow:hidden;cursor:zoom-in;transition:border-color .18s}
.editor-art:hover{border-color:var(--gold-soft)}
.editor-art img{display:block;width:100%;height:auto;aspect-ratio:1187/1882;object-fit:cover}
.editor-head{display:flex;flex-direction:column;align-items:flex-start;flex-wrap:nowrap;gap:0;padding:4px 2px 0;text-align:left}
.editor-head .eyebrow{margin-bottom:6px}
/* 폼 칸이 좁으면(사이드바 펼친 노트북 등) 이미지를 위로 */
@container (max-width: 640px){
  .editor-top{grid-template-columns:1fr;gap:14px}
  .editor-art{max-width:260px;margin:0 auto}
  .editor-head{align-items:center;text-align:center}
}
.editor-head h2{margin:0;font-size:24px;letter-spacing:-.03em;font-weight:600}
.editor-astro{margin:8px 0 0;color:var(--muted);font-size:13px}
.editor-saved{margin:6px 0 0;color:var(--muted);font-size:11px}

.editor-section{padding:18px 20px 20px;border:1px solid rgba(236,230,216,.1);border-radius:12px;background:rgba(236,230,216,.025)}
.editor-section h3{margin:0 0 14px;font-size:14px;font-weight:600}
.editor-section h3 small,.editor-view label small{font-weight:400;color:var(--muted);font-size:11px;margin-left:6px}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.section-head h3{margin:0}

.field-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px 14px}
.editor-view label:not(.search-field){display:flex;flex-direction:column;gap:5px;font-size:11px;color:var(--muted);min-width:0}
.editor-view .wide{grid-column:1/-1}
.editor-view input:not([type="search"]),.editor-view textarea,.editor-view select{font:inherit;font-size:13px;color:var(--ink);background:rgba(12,9,22,.4);border:1px solid rgba(236,230,216,.16);border-radius:8px;padding:8px 10px;width:100%;min-width:0}
.editor-view textarea{resize:vertical;line-height:1.55}
.editor-view input:not([type="search"]):focus,.editor-view textarea:focus,.editor-view select:focus{outline:none;border-color:var(--gold)}
.editor-view select option{background:#1d1a29}

.figure-list,.metaphor-list{display:flex;flex-direction:column;gap:12px}
.figure{border:1px solid rgba(236,230,216,.12);border-radius:10px;padding:12px 14px 14px;margin:0;min-width:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px 12px}
.figure-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.figure-head strong{font-size:13px}
.mode-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px}
.mode{border:1px solid rgba(236,230,216,.12);border-radius:10px;padding:12px 14px 14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.mode h4{margin:0 0 2px;font-size:13px;font-weight:600}
.metaphor{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}
.btn.small{padding:4px 10px;font-size:12px}
.refs-list{display:flex;flex-direction:column;gap:8px}
.refs-source{border:1px solid rgba(236,230,216,.12);border-radius:10px;padding:10px 14px}
.refs-source summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--gold)}
.refs-source dl{margin:12px 0 0;display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 14px;font-size:12px}
.refs-source dt{color:var(--muted);white-space:nowrap}
.refs-source dd{margin:0;line-height:1.65;color:var(--ink);white-space:pre-wrap}
.btn.danger:hover{border-color:#d66;color:#f0a0a0}
.list-empty{padding:22px 12px;text-align:center;color:var(--muted);font-size:12px}

.editor-actions{display:flex;align-items:center;gap:10px;justify-content:flex-end;position:sticky;bottom:0;padding:12px 0 8px;background:linear-gradient(to bottom,transparent,var(--bg) 35%)}
.editor-status{margin-right:auto;font-size:12px;color:var(--muted)}
.editor-status.error{color:#e08a8a}
.editor-status.ok{color:#8fd1a5}
.editor-setup,.editor-empty{text-align:center;padding:70px 12px;color:var(--muted)}
.editor-setup>span,.editor-empty>span{font-size:42px;color:var(--gold)}
.editor-setup h3{font-size:17px;font-weight:500;color:var(--ink)}
.editor-setup p,.editor-empty p{font-size:13px;line-height:1.7}
.editor-setup code{color:var(--gold)}
.editor-error{color:#e08a8a;font-size:12px}
.editor-error:empty{display:none}

@media(max-width:760px){
  .editor-view{padding:20px 16px 32px}
  .editor-body{grid-template-columns:1fr;gap:18px}
  .editor-list{position:static;max-height:none}
  .editor-card-list{max-height:200px}
  .editor-top{grid-template-columns:1fr;gap:14px}
  .editor-art{max-width:220px;margin:0 auto}
  .editor-head{text-align:center;align-items:center}
  .editor-head h2{font-size:20px}
  .metaphor{grid-template-columns:1fr}
  .editor-actions{flex-wrap:wrap}
  .editor-status{flex-basis:100%;margin-right:0}
}
