#ks-kalkulator {
  font-family: inherit;
  padding: 1rem 0 1.5rem;
  max-width: 720px;
}
.ks-section { margin-bottom: 2rem; }
.ks-section-title {
  font-size: 13px; font-weight: 600; color: #555; margin: 0 0 10px;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid #eee; padding-bottom: 6px;
}
.ks-minwert { font-size: 11px; color: #aaa; font-weight: 400; }
.ks-hint-small { font-size: 12px; color: #aaa; margin: 6px 0 0; }

/* TEXT EINGABE */
#ks-text {
  width: 100%; box-sizing: border-box; padding: 10px 14px;
  border: 1px solid #ddd; border-radius: 8px; font-size: 16px;
  color: #111; background: #fff;
}
#ks-text:focus { outline: none; border-color: #555; }

/* SCHRIFTARTEN */
.ks-font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.ks-font-item {
  border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 10px 14px;
  cursor: pointer; transition: border-color 0.15s, background 0.15s;
  background: #fff;
}
.ks-font-item:hover { border-color: #999; background: #fafafa; }
.ks-font-item.selected { border-color: #111; background: #f5f5f5; }
.ks-font-name { font-size: 12px; color: #888; margin: 0 0 4px; }
.ks-font-preview { font-size: 18px; color: #111; margin: 0; line-height: 1.3; }

/* FARBEN */
.ks-farb-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.ks-farb-item {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px;
  border: 1px solid #ddd; border-radius: 6px; cursor: pointer;
  font-size: 13px; color: #111; background: #fff;
  transition: border-color 0.15s; user-select: none;
}
.ks-farb-item:hover { border-color: #999; }
.ks-farb-item.selected { border: 2px solid #111; background: #f5f5f5; }
.ks-swatch { width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(0,0,0,0.12); flex-shrink: 0; }
.ks-farb-nr { font-size: 10px; font-weight: 700; color: #999; background: #f0f0f0; border-radius: 3px; padding: 1px 4px; font-family: monospace; }

/* MASSE */
#ks-kalkulator label { font-size: 13px; color: #666; display: block; margin-bottom: 5px; }
#ks-kalkulator input[type=number] {
  width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid #ddd; border-radius: 6px; font-size: 15px; background: #fff; color: #111;
}
#ks-kalkulator input[type=number]:focus { outline: none; border-color: #555; }
.ks-grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

/* VORSCHAU */
.ks-vorschau {
  background: #f8f8f8;
  border: 1.5px solid #e0e0e0;
  border-radius: 10px;
  padding: 2rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
}
.ks-vorschau-inner {
  width: 100%;
  text-align: center;
  word-break: break-word;
}
#ks-vorschau-text {
  font-size: 36px;
  color: #1a1a1a;
  display: block;
  line-height: 1.3;
  transition: all 0.2s;
}
.ks-vorschau-hint { font-size: 11px; color: #bbb; margin: 0; }

/* PRODUKTION */
.ks-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 500px) { .ks-option-grid { grid-template-columns: 1fr; } }
.ks-option-item {
  border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 11px 13px;
  cursor: pointer; display: flex; align-items: center; gap: 10px;
  transition: border-color 0.15s, background 0.15s; background: #fff;
}
.ks-option-item:hover { border-color: #999; background: #fafafa; }
.ks-option-item.selected { border-color: #111; background: #f5f5f5; }
.ks-option-check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #ccc; flex-shrink: 0; transition: all 0.15s;
}
.ks-option-check.checked { border-color: #111; background: #111; box-shadow: inset 0 0 0 3px #fff; }
.ks-option-body { flex: 1; }
.ks-option-name { font-size: 14px; font-weight: 600; color: #111; margin: 0 0 2px; }
.ks-option-desc { font-size: 12px; color: #888; margin: 0; }
.ks-option-price { font-size: 13px; font-weight: 600; color: #333; white-space: nowrap; margin-left: auto; }

/* PREIS */
#ks-result { display: none; }
.ks-divider { border: none; border-top: 1px solid #e0e0e0; margin: 0 0 1.25rem; }
.ks-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 1rem; }
.ks-metric { background: #f5f5f5; border-radius: 6px; padding: 0.85rem 1rem; }
.ks-metric-highlight { background: #111; }
.ks-metric-highlight .ks-metric-label { color: #aaa; }
.ks-metric-highlight .ks-metric-value { color: #fff; }
.ks-metric-label { font-size: 12px; color: #666; margin: 0 0 4px; }
.ks-metric-value { font-size: 20px; font-weight: 600; margin: 0; color: #111; }

/* WARENKORB */
.ks-cart-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.ks-note { font-size: 11px; color: #aaa; margin: 0; }
.ks-cart-btn {
  background: #111; color: #fff; border: none; border-radius: 8px;
  padding: 12px 24px; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: background 0.15s; white-space: nowrap;
}
.ks-cart-btn:hover { background: #333; }
.ks-cart-msg { margin-top: 12px; padding: 10px 14px; border-radius: 6px; font-size: 13px; font-weight: 500; }
.ks-cart-msg.success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.ks-cart-msg.error   { background: #fdecea; color: #c62828; border: 1px solid #ef9a9a; }
.ks-hint { font-size: 13px; color: #888; margin-top: 8px; min-height: 18px; }

/* STICKY PREIS */
#ks-sticky-preis {
  display: none;
  position: relative;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 1rem;
  margin-top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
#ks-sticky-preis.sichtbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ks-sticky-label { font-size: 12px; color: #aaa; margin: 0; }
.ks-sticky-wert { font-size: 24px; font-weight: 700; color: #fff; margin: 0; }
.ks-sticky-hint { font-size: 11px; color: #888; margin: 0; }

/* ZEILEN */
.ks-zeilen-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ks-zeile-row { display: flex; align-items: center; gap: 8px; }
.ks-zeile-nr {
  width: 24px; height: 24px; border-radius: 50%; background: #111; color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ks-zeile-input {
  flex: 1; padding: 9px 11px; border: 1px solid #ddd; border-radius: 6px;
  font-size: 15px; color: #111; background: #fff; box-sizing: border-box;
}
.ks-zeile-input:focus { outline: none; border-color: #555; }
.ks-zeile-delete {
  width: 28px; height: 28px; border: none; background: none; cursor: pointer;
  color: #bbb; font-size: 18px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; flex-shrink: 0;
}
.ks-zeile-delete:hover { color: #cc0000; background: #fdecea; }
.ks-add-zeile-btn {
  background: none; border: 1.5px dashed #ccc; border-radius: 6px;
  padding: 7px 14px; font-size: 13px; color: #666; cursor: pointer;
  transition: border-color 0.15s, color 0.15s; margin-top: 4px;
}
.ks-add-zeile-btn:hover { border-color: #555; color: #111; }

/* AUSRICHTUNG */
.ks-ausrichtung-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.ks-ausrichtung-item {
  border: 1.5px solid #e0e0e0; border-radius: 8px; padding: 12px 10px;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px;
  transition: border-color 0.15s, background 0.15s; background: #fff;
}
.ks-ausrichtung-item:hover { border-color: #999; background: #fafafa; }
.ks-ausrichtung-item.selected { border-color: #111; background: #f5f5f5; }
.ks-align-icon { font-size: 10px; color: #666; line-height: 1.6; display: block; }
.ks-align-label { font-size: 12px; font-weight: 600; color: #111; }

/* ZUSATZOPTIONEN */
.ks-multi-hint { font-size: 11px; color: #bbb; font-weight: 400; text-transform: none; letter-spacing: 0; }

/* VORSCHAU MASSE */
.ks-vorschau-masse-top {
  display: flex; align-items: center; gap: 6px; width: 100%; margin-bottom: 6px;
}
.ks-masse-linie {
  flex: 1; height: 1px; background: #ccc;
  position: relative;
}
.ks-masse-linie::before, .ks-masse-linie::after {
  content: ''; position: absolute; top: -3px;
  width: 1px; height: 7px; background: #ccc;
}
.ks-masse-linie::before { left: 0; }
.ks-masse-linie::after { right: 0; }
.ks-masse-wert {
  font-size: 11px; color: #999; white-space: nowrap; font-weight: 500;
}
.ks-vorschau-content-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
}
.ks-vorschau-masse-side {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px; flex-shrink: 0;
}
.ks-masse-wert-side {
  font-size: 11px; color: #999; font-weight: 500;
  writing-mode: vertical-rl; text-orientation: mixed;
  transform: rotate(180deg);
}
