/* CSS Grid generator — tool UI. Chrome from shared.css/utilities.css. */
.gr-layout { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; max-width: 960px; margin: 0 auto; }
@media (max-width: 760px) { .gr-layout { grid-template-columns: 1fr; } }

.gr-controls { display: flex; flex-direction: column; gap: 16px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.gr-ctrl label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gr-ctrl label code { font-family: var(--mono); }
.gr-range { width: 100%; accent-color: var(--accent); }

.gr-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-seg button { font: inherit; font-family: var(--mono); font-size: .78rem; padding: 6px 12px; border-radius: var(--radius); cursor: pointer; background: var(--surface2); color: var(--text); border: 1px solid var(--border); transition: all .12s ease; }
.gr-seg button:hover { border-color: var(--accent-light); }
.gr-seg button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.gr-preview-wrap { min-width: 0; }
.gr-preview {
  display: grid; min-height: 300px; padding: 14px;
  background: repeating-conic-gradient(var(--surface2) 0% 25%, var(--surface) 0% 50%) 50% / 24px 24px;
  border: 2px solid var(--border); border-radius: var(--radius-lg);
}
.gr-item {
  min-width: 40px; min-height: 40px; padding: 8px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: #fff;
  border-radius: var(--radius); font-family: var(--mono); font-weight: 700; box-shadow: var(--shadow);
}

.gr-code-head { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 6px; }
.gr-code-head span { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.gr-code {
  margin: 0; padding: 16px; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--mono); font-size: .88rem; line-height: 1.6; color: var(--text); white-space: pre;
}
