.ed-bar { display: flex; justify-content: space-between; align-items: end; gap: 14px 24px; flex-wrap: wrap; padding-block: clamp(14px, 3vw, 32px) 18px; }
.ed-title { font-size: clamp(32px, 4.6vw, 54px); font-weight: 900; letter-spacing: -0.03em; }
.ed-title span { display: block; font: 500 14px var(--mono); letter-spacing: 0; margin-top: 8px; }
.ed-bar .row .btn { padding: 9px 16px; font-size: 14px; }
.ed { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .ed { grid-template-columns: 1fr; } }
.ed-tools { position: sticky; top: 76px; }
@media (max-width: 980px) { .ed-tools { position: static; } }
.ed-main { display: grid; gap: 20px; min-width: 0; }
.ed-lower { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.ed-lower h2 { font-size: 20px; }

.ed-canvas-wrap { position: relative; display: grid; place-items: center; background: var(--goggle); border-radius: 12px; padding: 10px; overflow: auto; max-height: 70vh; }
.ed-canvas-wrap canvas { image-rendering: pixelated; touch-action: none; cursor: crosshair; max-width: 100%; }
.ed-canvas-wrap img { position: absolute; pointer-events: none; image-rendering: pixelated; opacity: .5; }

.swatches { display: flex; gap: 6px; }
.swatch { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch[data-v="0"] { background: #000; }
.swatch[data-v="1"] { background: repeating-conic-gradient(#3a4856 0 25%, #2c3743 0 50%) 0 0 / 10px 10px; }
.swatch[data-v="2"] { background: #fff; }
.swatch[aria-checked="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }

.tool-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tool-grid.four { grid-template-columns: repeat(4, 1fr); }
.tool-grid.three { grid-template-columns: repeat(3, 1fr); }
.tool-grid.two { grid-template-columns: repeat(2, 1fr); }
.tool-grid button, #compose, .ed-tools .row > button {
  border: 1.5px solid var(--line); background: var(--panel-2); color: var(--ink); border-radius: 999px;
  padding: 8px 6px; font: 600 13px var(--body); cursor: pointer;
}
.tool-grid button:hover, #compose:hover, .ed-tools .row > button:hover { border-color: var(--ink); }
.tool-grid button[aria-pressed="true"], #compose[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.tool-grid button.danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
#compose { width: 100%; }
.compose-panel { display: grid; gap: 8px; font-size: 14px; }
.ed-tools label.btn { width: 100%; }
#glyph { flex: 1; }

.logo-canvas { width: 100%; image-rendering: pixelated; background: repeating-conic-gradient(#3a4856 0 25%, #2c3743 0 50%) 0 0 / 12px 12px; border-radius: 8px; }
.ed-lower .screen { border-radius: 10px; }
