.ky-cz-wrap {
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 12px;
}

.ky-cz-wrap,
.ky-cz-wrap * {
  box-sizing: border-box;
}

.ky-cz-wrap {
  color: #1f1f21;
}

.ky-cz-wrap button,
.ky-cz-wrap input,
.ky-cz-wrap select {
  font: inherit;
}

.ky-cz-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.25fr);
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px) {
  .ky-cz-grid {
    grid-template-columns: 1fr;
  }
}

.ky-cz-card {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  padding: 18px;
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 248, 250, 0.92));
  backdrop-filter: blur(18px);
}

.ky-cz-card h3,
.ky-cz-editor-head h4 {
  margin: 0 0 12px;
}

.ky-cz-card label {
  display: block;
  font-size: 14px;
  margin: 10px 0 6px;
}

.ky-cz-card input[type="number"],
.ky-cz-card input[type="time"],
.ky-cz-card input[type="date"],
.ky-cz-card input[type="text"],
.ky-cz-card select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.ky-cz-card input:focus,
.ky-cz-card select:focus,
.ky-cz-type-pill:focus,
.ky-cz-mini-btn:focus,
.ky-cz-btn:focus {
  outline: none;
  border-color: rgba(38, 99, 235, 0.35);
  box-shadow: 0 0 0 4px rgba(38, 99, 235, 0.08);
}

.ky-cz-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 640px) {
  .ky-cz-row,
  .ky-cz-slot-grid {
    grid-template-columns: 1fr;
  }
}

.ky-cz-btn {
  margin-top: 14px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 0;
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(180deg, #1c1c1e, #09090b);
  color: #fff;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.18);
  appearance: none;
  -webkit-appearance: none;
}

.ky-cz-btn-secondary,
.ky-cz-mini-btn {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.86);
  color: #151515;
  appearance: none;
  -webkit-appearance: none;
}

.ky-cz-hr {
  border: 0;
  border-top: 1px solid #eee;
  margin: 14px 0;
}

.ky-cz-hint {
  opacity: 0.75;
  font-size: 13px;
  margin: 10px 0 0;
}

.ky-cz-summary {
  font-size: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 246, 248, 0.92));
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.ky-cz-summary > div + div {
  margin-top: 8px;
}

.ky-cz-tablewrap {
  display: none;
}

.ky-cz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ky-cz-table th,
.ky-cz-table td {
  border-bottom: 1px solid #eee;
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.ky-cz-badge {
  display: inline-block;
  min-width: 54px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  color: rgba(31, 31, 33, 0.78);
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.ky-cz-format {
  display: flex;
  gap: 10px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.ky-cz-format-btn {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-weight: 700;
  appearance: none;
  -webkit-appearance: none;
}

.ky-cz-format-btn.is-active {
  border-color: rgba(17, 17, 17, 0.18);
  background: linear-gradient(180deg, #1c1c1e, #09090b);
  color: #fff;
}

.ky-cz-divisions {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
}

.ky-cz-div-row {
  margin: 10px 0 14px;
}

.ky-cz-div-grid,
.ky-cz-adv-labels {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
  margin-top: 6px;
}

.ky-cz-div-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ky-cz-div-head span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ky-cz-editor {
  margin-top: 18px;
  max-width: 100%;
  min-width: 0;
}

.ky-cz-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 2px 2px 8px;
}

.ky-cz-editor-head p {
  margin: 0;
  font-size: 13px;
  opacity: 0.78;
}

.ky-cz-editor-subtitle {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 8px;
}

.ky-cz-floating {
  margin-bottom: 14px;
}

.ky-cz-floating-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.ky-cz-floating-item + .ky-cz-floating-item {
  margin-top: 8px;
}

.ky-cz-slots {
  display: grid;
  gap: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 247, 249, 0.94));
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  overflow: hidden;
}

.ky-cz-slot-head {
  display: grid;
  grid-template-columns: minmax(94px, 0.88fr) 96px minmax(144px, 1.82fr) 68px 28px;
  gap: 12px;
  padding: 14px 14px 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(31, 31, 33, 0.48);
  background: rgba(255, 255, 255, 0.72);
}

.ky-cz-slot-head span:nth-child(2) {
  justify-self: start;
}

.ky-cz-slot {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.ky-cz-slot.is-drop-target {
  box-shadow: inset 0 0 0 2px rgba(17, 17, 17, 0.08);
}

.ky-cz-slot.is-dragging {
  opacity: 0.55;
}

.ky-cz-slot.is-open {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(251, 251, 252, 0.98));
}

.ky-cz-slot-row {
  display: grid;
  grid-template-columns: minmax(94px, 0.88fr) 96px minmax(144px, 1.82fr) 68px 28px;
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.ky-cz-slot-time,
.ky-cz-slot-title,
.ky-cz-slot-duration {
  min-width: 0;
  font-size: 12px;
  color: rgba(31, 31, 33, 0.76);
}

.ky-cz-slot-time,
.ky-cz-slot-duration {
  word-break: break-word;
}

.ky-cz-slot-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ky-cz-slot-duration {
  text-align: left;
}

.ky-cz-slot-type,
.ky-cz-slot-grip {
  display: flex;
  align-items: center;
}

.ky-cz-slot-type {
  justify-content: flex-start;
  justify-self: start;
}

.ky-cz-slot-grip {
  justify-content: flex-end;
}

.ky-cz-type-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: flex-start;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  width: auto;
  max-width: fit-content;
  padding: 0;
  border-radius: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
  color: rgba(31, 31, 33, 0.78) !important;
  white-space: nowrap;
  transition: transform 160ms ease;
  appearance: none;
  -webkit-appearance: none;
}

.ky-cz-type-pill:hover,
.ky-cz-type-pill:focus-visible {
  transform: translateY(-1px);
}

.ky-cz-type-pill:hover .ky-cz-badge,
.ky-cz-type-pill:focus-visible .ky-cz-badge {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.1);
}

.ky-cz-type-pill:hover .ky-cz-pill-arrow,
.ky-cz-type-pill:focus-visible .ky-cz-pill-arrow {
  background: rgba(15, 23, 42, 0.1);
  color: rgba(31, 31, 33, 0.72);
}

.ky-cz-pill-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  color: rgba(31, 31, 33, 0.5);
  background: rgba(15, 23, 42, 0.05);
  font-size: 12px;
  line-height: 1;
}

.ky-cz-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  cursor: grab;
  font-weight: 700;
  color: rgba(31, 31, 33, 0.52);
}

.ky-cz-mini-btn {
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 12px;
}

.ky-cz-slot-panel {
  display: none;
  padding: 0 14px 14px;
  background: rgba(248, 248, 250, 0.84);
}

.ky-cz-slot.is-open .ky-cz-slot-panel {
  display: block;
}

.ky-cz-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.ky-cz-slot-grid label,
.ky-cz-slot-label {
  font-size: 12px;
}

.ky-cz-slot-grid input,
.ky-cz-slot-grid select,
.ky-cz-slot-label input {
  padding: 8px 10px;
  min-height: 42px;
  font-size: 12px;
}

.ky-cz-slot-label {
  margin-top: 8px;
}

.ky-cz-slot-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 1100px) {
  .ky-cz-slot-head,
  .ky-cz-slot-row {
    grid-template-columns: minmax(88px, 0.82fr) 90px minmax(122px, 1.52fr) 62px 24px;
  }
}

@media (max-width: 780px) {
  .ky-cz-wrap {
    margin: 16px auto;
    padding: 0 10px;
  }

  .ky-cz-card {
    border-radius: 20px;
    padding: 14px;
  }

  .ky-cz-slot-head {
    display: none;
  }

  .ky-cz-slots {
    border-radius: 20px;
  }

  .ky-cz-slot-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "time duration"
      "type grip"
      "title title";
    gap: 8px 10px;
    align-items: start;
    padding: 12px;
  }

  .ky-cz-slot-time {
    grid-area: time;
  }

  .ky-cz-slot-duration {
    grid-area: duration;
    justify-self: end;
    text-align: right;
  }

  .ky-cz-slot-type {
    grid-area: type;
    justify-self: start;
  }

  .ky-cz-slot-grip {
    grid-area: grip;
    justify-self: end;
  }

  .ky-cz-slot-title {
    grid-area: title;
    white-space: normal;
  }

  .ky-cz-type-pill {
    width: auto;
  }

  .ky-cz-slot-row {
    min-width: 0;
  }

  .ky-cz-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ky-cz-slot-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  .ky-cz-grid {
    gap: 12px;
  }

  .ky-cz-row,
  .ky-cz-slot-grid,
  .ky-cz-div-grid,
  .ky-cz-adv-labels {
    grid-template-columns: 1fr;
  }

  .ky-cz-div-head,
  .ky-cz-floating-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .ky-cz-slot-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "time"
      "type"
      "title"
      "duration"
      "grip";
  }

  .ky-cz-slot-duration,
  .ky-cz-slot-grip {
    justify-self: start;
    text-align: left;
  }

  .ky-cz-slot-panel {
    padding: 0 12px 12px;
  }
}
