.ed { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 900px) { .ed { grid-template-columns: 1fr; } .ed-side { position: static; height: auto; } }

.ed-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 16px; border-right: 1px solid var(--surface-border); display: flex; flex-direction: column; gap: 16px; }
.side-head { display: flex; align-items: center; gap: 8px; }
.side-head h1 { font-size: 18px; letter-spacing: -0.02em; }
.pack-list { display: flex; flex-direction: column; gap: 4px; }
.pack-item { text-align: left; padding: 10px 12px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--fg-2); font: 700 13px var(--font); cursor: pointer; }
.pack-item small { display: block; color: var(--fg-4); font-weight: 500; font-size: 11px; margin-top: 2px; }
.pack-item:hover { background: var(--surface); color: var(--fg); }
.pack-item.sel { border-color: var(--brand); color: var(--fg); background: rgba(61, 232, 202, .06); }
.pack-item .active-mark { color: var(--brand); font-size: 11px; font-weight: 800; }
.side-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.ed-main { padding: 20px 24px 40px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ed-empty { margin: auto; color: var(--fg-3); font-size: 15px; }

.ed-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; position: sticky; top: 6px; z-index: 10; background: var(--bg); padding: 8px 0; }
.ed-bar .title-input { font-size: 22px; font-weight: 800; flex: 1; min-width: 240px; background: transparent; border-color: transparent; letter-spacing: -0.02em; }
.ed-bar .title-input:hover, .ed-bar .title-input:focus { border-color: var(--border); }
.dirty { color: var(--accent-purple); font-weight: 700; font-size: 12px; }
.saved { color: var(--fg-4); font-size: 12px; }

.settings { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--fg-2); }
.field input, .field select, .field textarea { font-weight: 500; }

.round-tabs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--surface-border); padding-bottom: 10px; }
.round-tabs .btn.current { border-color: var(--brand); color: var(--brand); }
.round-head { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

.workspace { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1300px) { .workspace { grid-template-columns: 1fr; } }

.themes { display: flex; flex-direction: column; gap: 8px; }
.theme-row { display: grid; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px; border-radius: 8px; background: var(--surface); border: 1px solid var(--surface-border); }
.theme-row input.theme-name { font-weight: 800; border-left: 3px solid var(--brand); }
.qcells { display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; min-width: 0; }
.qcell { position: relative; flex: none; min-width: 52px; height: 44px; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(61, 232, 202, .35); background: rgba(61, 232, 202, .06); color: var(--brand); font: 800 15px var(--font); cursor: pointer; }
.qcell:hover { background: rgba(61, 232, 202, .16); }
.qcell.sel { background: var(--brand); color: var(--bg); }
.qcell.empty-q { border-style: dashed; color: var(--fg-3); }
.qcell .tag { position: absolute; top: 2px; right: 3px; width: 12px; height: 12px; }
.qcell .tag.cat { color: var(--accent-violet); }
.qcell .tag.auction { color: var(--accent-cyan); }
.qcell.sel .tag { color: var(--bg); }
.qcell.add { border-style: dashed; border-color: var(--border); color: var(--fg-3); background: transparent; min-width: 36px; }
.row-actions { display: flex; gap: 0; }
.row-actions .btn { padding: 0 6px; }

.qform { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 64px; }
.qform .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qform textarea { resize: vertical; min-height: 64px; width: 100%; }
.qform textarea.mono { min-height: 120px; tab-size: 4; }
.qform .field { width: 100%; }
.qform .field input { width: 100%; }
.qform .hint { color: var(--fg-4); font-weight: 500; font-size: 11px; }
.qform-head { display: flex; align-items: center; gap: 8px; }
.qform-head h3 { font-size: 14px; }
.qform-head .sp { flex: 1; }
.cat-fields { padding: 10px; border-radius: 8px; border: 1px solid rgba(168, 124, 255, .4); background: rgba(168, 124, 255, .06); }

.preview { display: flex; flex-direction: column; gap: 8px; }
.preview-tabs { display: flex; gap: 6px; }
.preview-tabs .btn.current { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.preview iframe { width: 100%; aspect-ratio: 16 / 9; border: 1px solid var(--surface-border); border-radius: 8px; background: var(--bg); }
