.sccr { max-width: 720px; }
.sccr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sccr-tab {
  padding: 8px 12px; font-size: 13px; font-weight: 700; border: 1px solid #d9e0d4; border-radius: 6px;
  background: #fff; cursor: pointer; color: #27331f;
}
.sccr-tab-active { background: #19616a; border-color: #19616a; color: #fff; }
.sccr-panel { display: flex; flex-direction: column; gap: 18px; }
.sccr-panel label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: #27331f; }
.sccr-panel input, .sccr-panel select, .sccr-panel textarea {
  padding: 9px 11px; font-size: 14.5px; border: 1px solid #d9e0d4; border-radius: 6px; font-family: inherit;
}
.sccr-panel input:focus, .sccr-panel select:focus, .sccr-panel textarea:focus { outline: 2px solid #19616a; outline-offset: 1px; }

/* ---- Symbol groups ---- */
.sccr-group { display: flex; flex-direction: column; gap: 8px; }
.sccr-group-title { font-size: 12.5px; font-weight: 700; color: #5b6b56; text-transform: uppercase; letter-spacing: 0.03em; }
.sccr-symbol-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.sccr-symbol-btn {
  position: relative; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
  font-size: 19px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; color: #27331f;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.sccr-symbol-btn:hover { background: #fff; border-color: #19616a; }
.sccr-symbol-btn:focus-visible { outline: 2px solid #19616a; outline-offset: 1px; }
.sccr-symbol-btn.sccr-copied { background: #19616a; border-color: #19616a; color: #fff; }
.sccr-symbol-btn .sccr-flash {
  position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; color: #19616a; background: #fff; border: 1px solid #d9e0d4;
  border-radius: 4px; padding: 1px 6px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.sccr-symbol-btn .sccr-flash.sccr-flash-show { opacity: 1; }

/* ---- Builder row (symbol tab) ---- */
.sccr-builder { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; }
.sccr-builder-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sccr-builder-row input[type="text"] { flex: 1 1 240px; }
.sccr-btn {
  padding: 9px 14px; font-size: 13px; font-weight: 700; border: 1px solid #19616a; border-radius: 6px;
  background: #19616a; color: #fff; cursor: pointer; white-space: nowrap;
}
.sccr-btn:hover { background: #124851; }
.sccr-btn.sccr-btn-outline { background: #fff; color: #19616a; }
.sccr-btn.sccr-btn-outline:hover { background: #f3f4f8; }

/* ---- Color chips ---- */
.sccr-color-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sccr-color-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px;
  background: #fff; border: 1px solid #d9e0d4; border-radius: 6px; cursor: pointer; position: relative;
}
.sccr-color-chip:hover { border-color: #19616a; }
.sccr-color-chip:focus-visible { outline: 2px solid #19616a; outline-offset: 1px; }
.sccr-swatch { width: 100%; height: 22px; border-radius: 4px; border: 1px solid #d9e0d4; }
.sccr-color-chip .sccr-chip-label { font-size: 11.5px; font-weight: 700; color: #27331f; text-align: center; }
.sccr-color-chip .sccr-chip-tag {
  display: block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  color: #a15c00; margin-top: 2px;
}
.sccr-color-chip .sccr-chip-codes { font-size: 11px; color: #5b6b56; font-family: ui-monospace, monospace; display: flex; gap: 6px; }
.sccr-color-chip.sccr-copied { background: #19616a; }
.sccr-color-chip.sccr-copied .sccr-chip-label,
.sccr-color-chip.sccr-copied .sccr-chip-codes { color: #fff; }

.sccr-format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sccr-format-chip {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px;
  background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; cursor: pointer;
}
.sccr-format-chip:hover { border-color: #19616a; }
.sccr-format-chip:focus-visible { outline: 2px solid #19616a; outline-offset: 1px; }
.sccr-format-chip .sccr-chip-label { font-size: 11.5px; font-weight: 700; color: #27331f; text-align: center; }
.sccr-format-chip .sccr-chip-codes { font-size: 11px; color: #5b6b56; font-family: ui-monospace, monospace; display: flex; gap: 6px; }
.sccr-format-chip.sccr-copied { background: #19616a; }
.sccr-format-chip.sccr-copied .sccr-chip-label,
.sccr-format-chip.sccr-copied .sccr-chip-codes { color: #fff; }

/* ---- Text builder (color tab) ---- */
.sccr-textbuilder { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: #f3f4f8; border: 1px solid #d9e0d4; border-radius: 6px; }
.sccr-textbuilder textarea { min-height: 64px; resize: vertical; }
.sccr-raw-out {
  font-family: ui-monospace, monospace; font-size: 13px; color: #19616a; font-weight: 700;
  background: #fff; border: 1px solid #d9e0d4; border-radius: 6px; padding: 10px 12px; word-break: break-all;
}
.sccr-preview {
  background: #000; color: #fff; border-radius: 6px; padding: 12px 14px; font-size: 15px;
  min-height: 24px; line-height: 1.5; word-break: break-word;
}
.sccr-preview .sccr-run { display: inline; }
.sccr-preview .sccr-obf { filter: blur(2.5px); user-select: none; }
.sccr-hint { font-size: 12.5px; color: #5b6b56; margin: 0; }
.sccr-note { margin-top: 16px; font-size: 13px; color: #5b6b56; }

@media (max-width: 560px) {
  .sccr-color-grid { grid-template-columns: repeat(2, 1fr); }
  .sccr-format-grid { grid-template-columns: repeat(2, 1fr); }
}
