/* Kolorowanie tekstu */
main.tc { max-width: var(--max); margin: 0 auto; padding: 0 20px 40px; }
.tc-head { text-align: center; padding: 50px 0 28px; }
.tc-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  background: linear-gradient(90deg, #ff375f, #ff8a3d 45%, #ffd166 70%, #b56cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.tc-head p { max-width: 600px; margin: 12px auto 0; color: var(--muted); font-size: 1.05rem; }

.preview { border-radius: var(--radius); padding: 18px; margin-bottom: 18px; }
.chat-line {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  border-radius: 16px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
}
.preview[data-bg="dark"] .chat-line { background: #101012; }
.preview[data-bg="light"] .chat-line { background: #e9e9ee; }
.preview[data-bg="grass"] .chat-line { background: linear-gradient(180deg, #7cbd4a 0 60%, #79553a 60%); image-rendering: pixelated; }
.preview[data-bg="chat"] .chat-line { background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), linear-gradient(180deg, #6aa9ff, #a8d4ff); }
.mc { font-family: "RedPixel", monospace; font-size: clamp(1.6rem, 4.6vw, 2.7rem); line-height: 1.3; white-space: pre; letter-spacing: 0.02em; }
.mc span { display: inline-block; }
.mc .b { font-weight: 700; -webkit-text-stroke: 0.6px currentColor; }
.mc .i { font-style: italic; }
.mc .u { text-decoration: underline; text-decoration-thickness: 0.12em; }
.mc .s { text-decoration: line-through; text-decoration-thickness: 0.12em; }
.mc .u.s { text-decoration: underline line-through; }
.preview-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.chip { padding: 5px 12px; border: 0; border-radius: 999px; font-size: 0.8rem; color: var(--muted-strong); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); cursor: pointer; }
.chip:hover { color: #fff; }
.chip.on { color: #fff; background: rgba(255, 55, 95, 0.25); box-shadow: inset 0 0 0 1px rgba(255, 55, 95, 0.6); }

.tc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .tc-grid { grid-template-columns: 1fr; } }
.card { border-radius: var(--radius); padding: 20px; }
.field.big { font-size: 1.1rem; padding: 12px 16px; margin-bottom: 18px; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-size: 0.86rem; }
textarea.field { resize: vertical; min-height: 120px; word-break: break-all; }
.top-gap { margin-top: 18px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.mini-actions { display: flex; gap: 12px; }
.mini-actions button { border: 0; background: none; padding: 0; color: var(--red-soft); font-size: 0.8rem; cursor: pointer; }
.hint { margin-top: 6px; font-size: 0.78rem; color: var(--faint); }
.count { font-size: 0.78rem; color: var(--faint); }
.count.warn { color: #ffb020; }

.bar { height: 14px; border-radius: 999px; margin-bottom: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); }
.stops { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.stop { display: flex; align-items: center; gap: 8px; }
.stop input[type="color"] { width: 44px; height: 38px; padding: 0; border: 0; border-radius: 12px; background: none; cursor: pointer; flex: 0 0 auto; }
.stop input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.stop input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.stop input[type="color"]::-moz-color-swatch { border: 0; border-radius: 12px; }
.stop .field { flex: 1; min-width: 0; text-transform: uppercase; }
.stop .rm { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.06); color: var(--muted-strong); cursor: pointer; font-size: 1.1rem; }
.stop .rm:hover { background: rgba(255, 55, 95, 0.25); color: #fff; }
.stop .rm:disabled { opacity: 0.3; cursor: default; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset { display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: var(--muted-strong); font-size: 0.82rem; cursor: pointer; transition: background 0.2s ease; }
.preset:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.preset i { width: 34px; height: 20px; border-radius: 999px; }

.styles { display: flex; gap: 6px; }
.styles button { width: 44px; height: 38px; border: 0; border-radius: 12px; background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); color: var(--muted-strong); font-size: 1rem; cursor: pointer; }
.styles button:hover { color: #fff; }
.styles button.on { color: #fff; background: linear-gradient(180deg, #ff5c7a, var(--red-deep)); box-shadow: 0 4px 14px rgba(255, 55, 95, 0.35); }

.out-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
